@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([[8125],{38125:(Se,ee,o)=>{o.r(ee),o.d(ee,{AmEventsM:()=>et});var E=o(77664),e=o(17017),t=o(94946),L=o(85219),g=o(55043),T=o(15861),A=o(33157),R=o(90328),U=o(56212),K=o(6990),q=o(51162),ae=o(60921),j=o(77240),z=o(99961),te=o(92189),ne=o(67145),O=o(95852),W=o(27414),I=o(32915),Z=o(21719),x=o(96814),F=o(95431),B=o(97680),X=o(33259),J=o(60095),oe=o(59361),re=o(20553),ie=o(45085),se=o(3531),le=o(39989),ce=o(53429),de=o(45809),_e=o(32660),D=o(5860),V=o(756),v=o(38057);const y=["insertCodeModalC"];function _(c,b){1&c&&(t.TgZ(0,"span"),t._UZ(1,"i",33),t._uU(2," Add Event Listener"),t.qZA())}function S(c,b){1&c&&(t.TgZ(0,"span"),t._UZ(1,"i",34),t._uU(2," View Event Listener"),t.qZA())}function G(c,b){1&c&&(t.TgZ(0,"span"),t._UZ(1,"i",35),t._uU(2," Edit Event Listener"),t.qZA())}function Q(c,b){1&c&&(t.TgZ(0,"span"),t._uU(1,"Save"),t.qZA())}function k(c,b){1&c&&(t.TgZ(0,"span"),t._uU(1,"Update"),t.qZA())}function h(c,b){if(1&c){const n=t.EpF();t.TgZ(0,"button",36),t.NdJ("click",function(){t.CHM(n);const l=t.oxw();return t.KtG(l.save())}),t._UZ(1,"i",37),t.YNc(2,Q,2,0,"span",4),t.YNc(3,k,2,0,"span",4),t.qZA()}if(2&c){const n=t.oxw();t.Q6J("disabled",n.form.invalid),t.xp6(2),t.Q6J("ngIf",n.data.mode===n.EFormMode.ADD),t.xp6(1),t.Q6J("ngIf",n.data.mode===n.EFormMode.EDIT)}}const N=function(c){return{"text-danger font-weight-bold":c}};let s=(()=>{class c{fb;ns;generalS;constantsS;instanceS;authCS;eventCenterS;monacoS;generalCS;data;eventData;EFormMode=R.D;form;subscriptions=[];editorEventListener;editorOptionsSchema={readOnly:!1,language:"typescript",contextmenu:!0};BE_HOST_PORT=re.N.BE_HOST_PORT;DOCS_HOST_PORT=re.N.DOCS_HOST_PORT;IAmEventListenerProps=q.Sh;insertCodeModalC;constructor(n,r,l,C,M,fe,Ce,Te,Ae){this.fb=n,this.ns=r,this.generalS=l,this.constantsS=C,this.instanceS=M,this.authCS=fe,this.eventCenterS=Ce,this.monacoS=Te,this.generalCS=Ae}ngOnInit(){var n=this;this.createForm(),this.subscriptions.push(this.data.eventChannel.subscribe(function(){var r=(0,T.Z)(function*(l){if(l)if(n.eventData=l,n.form.enable(),n.form.reset(),l.action===A.F.OPEN_FORM_IN_EDIT_MODE)n.form.patchValue(n.data.formData),n.generalCS.setValueInEditor(n,"editorEventListener",n.data.formData.apiCodeStr||"");else if(l.action===A.F.OPEN_FORM_IN_VIEW_MODE)n.form.patchValue(n.data.formData),n.generalCS.setValueInEditor(n,"editorEventListener",n.data.formData.apiCodeStr||""),n.form.disable();else if(l.action===A.F.OPEN_FORM_IN_ADD_MODE){const C=yield n.instanceS.getDefaultContent(n.BE_HOST_PORT,ie.R.EVENTS).toPromise();n.generalCS.setValueInEditor(n,"editorEventListener",C.data)}});return function(l){return r.apply(this,arguments)}}()))}createForm(){this.form=this.fb.group({name:[null,[J.kI.required]],eventListenerTimeoutInMinutes:[null,[]],runOnNativeProcess:[null,[]]})}showModal(){$("#idEventListenerForm").modal("show")}hideModal(){$("#idEventListenerForm").modal("hide")}showInsertCodeModel(){this.generalCS.messageReceivedFor=oe.H.All,this.insertCodeModalC.showModal(se.b.EventListenerFormC)}save(){var n=this;return(0,T.Z)(function*(){const r=n.form.getRawValue(),l=n.data.formData||{},C=K.find(l.versions||[],{isActive:!0});C&&(C.apiCodeStr=n.editorEventListener.getValue());const M=Object.assign({},l,r);M.apiCodeStr=n.editorEventListener.getValue();try{n.data.mode===R.D.ADD?n.data.sourceArr.push(M):n.data.mode===R.D.EDIT&&Object.assign(n.data.formData,M),n.data.eventChannel.emit({action:n.data.mode===R.D.ADD?A.F.SAVED:A.F.UPDATED}),n.eventCenterS.eventListenersSavedAndUpdate.next(M)}catch(fe){console.log(fe)}})()}editorGenerated(n){var r=this;return(0,T.Z)(function*(){r.editorEventListener=n,yield r.monacoS.loadSchemaEditorSettings(r.BE_HOST_PORT,r.authCS.getUserId(),null),r.monacoS.addSaveCodeKeyBinding(n,l=>{r.form.valid&&r.save()}),r.monacoS.addInsertCodeKeyBinding(n,l=>{r.generalCS.messageReceivedFor=oe.H.All,r.data.mode!==R.D.VIEW&&r.insertCodeModalC.showModal(se.b.EventListenerFormC)}),r.subscriptions.push(r.generalS.messageReceived.subscribe(l=>{l.type&&l.type===le.g.TEXT_COPIED&&l.componentName===se.b.EventListenerFormC&&(r.monacoS.insertAtCursor(n,l.selectedText),r.insertCodeModalC.hideModal())}))})()}ngOnDestroy(){this.eventCenterS.eventListenersSavedAndUpdate.next(void 0),this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(r){return new(r||c)(t.Y36(J.qu),t.Y36(z.W),t.Y36(j.b),t.Y36(W.L),t.Y36(ce.E),t.Y36(O.D),t.Y36(I.u),t.Y36(de.b),t.Y36(j.b))};static \u0275cmp=t.Xpm({type:c,selectors:[["app-w-event-listener-form"]],viewQuery:function(r,l){if(1&r&&t.Gf(y,5),2&r){let C;t.iGM(C=t.CRH())&&(l.insertCodeModalC=C.first)}},inputs:{data:"data"},decls:44,vars:14,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idEventListenerForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-full"],[1,"modal-content"],[1,"modal-header"],[4,"ngIf"],[1,"float-right"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],["pTooltip","Insert Code","sava-no-dbl-click","",1,"cursor-pointer","mr-1","text-info",2,"font-size","1.4em",3,"click"],[1,"fas","fa-info-circle","text-info","fa-fw"],[1,"modal-body"],[1,"pt-3",3,"formGroup"],[1,"form-group","row"],[1,"col-6"],[1,"row"],[1,"col-3","col-form-label","col-form-label-sm","text-right","pl-0","pr-0"],[1,"col-8"],["formControlName","name","name","name","spellcheck","false","type","text","placeholder","Please provide name",1,"form-control","form-control-sm"],[1,"col-3"],[1,"col-7","col-form-label","col-form-label-sm","text-right","pl-0","pr-0"],["formControlName","eventListenerTimeoutInMinutes","name","eventListenerTimeoutInMinutes","spellcheck","false","type","number","placeholder","10",1,"form-control","form-control-sm"],["pTooltip","Code will run on actual process and not in sandbox, so be careful with code. You can not use sandbox packages in this mode. You can use all Node.js packages + some packages on which API Maker is dependent on. You can use features of global variable 'g'.",1,"col-8","col-form-label","col-form-label-sm","text-right",3,"ngClass"],[1,"align-middle","mb-0","pt-1"],["formControlName","runOnNativeProcess",3,"binary"],[1,"overflow-hidden","mb-3",2,"height","calc(100vh - 270px)"],[3,"isSchemaEditor","editorOptions","editorGenerated"],[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"],[3,"frameId","modalId","docsHostPort"],["insertCodeModalC",""],[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"]],template:function(r,l){1&r&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),t.YNc(4,_,3,0,"span",4),t.YNc(5,S,3,0,"span",4),t.YNc(6,G,3,0,"span",4),t.TgZ(7,"div",5)(8,"button",6)(9,"span",7),t._UZ(10,"i",8),t.qZA()(),t.TgZ(11,"span",9),t.NdJ("click",function(){return l.showInsertCodeModel()}),t._UZ(12,"i",10),t.qZA()()(),t.TgZ(13,"div",11)(14,"form",12)(15,"div",13)(16,"div",14)(17,"div",15)(18,"label",16),t._uU(19,"Name"),t.qZA(),t.TgZ(20,"div",17),t._UZ(21,"input",18),t.qZA()()(),t.TgZ(22,"div",19)(23,"div",15)(24,"label",20),t._uU(25,"Timeout in minutes"),t.qZA(),t.TgZ(26,"div",19),t._UZ(27,"input",21),t.qZA()()(),t.TgZ(28,"div",19)(29,"div",15)(30,"label",22)(31,"span"),t._uU(32,"Run Native"),t.qZA()(),t.TgZ(33,"label",23),t._UZ(34,"p-checkbox",24),t.qZA()()()(),t.TgZ(35,"div",25)(36,"app-monaco-editor",26),t.NdJ("editorGenerated",function(M){return l.editorGenerated(M)}),t.qZA()()()(),t.TgZ(37,"div",27)(38,"button",28),t._UZ(39,"i",29),t._uU(40," Close"),t.qZA(),t.YNc(41,h,4,3,"button",30),t.qZA()()()(),t._UZ(42,"app-insert-code-modal",31,32)),2&r&&(t.xp6(4),t.Q6J("ngIf",l.data.mode===l.EFormMode.ADD),t.xp6(1),t.Q6J("ngIf",l.data.mode===l.EFormMode.VIEW),t.xp6(1),t.Q6J("ngIf",l.data.mode===l.EFormMode.EDIT),t.xp6(8),t.Q6J("formGroup",l.form),t.xp6(16),t.Q6J("ngClass",t.VKq(12,N,!0===l.form.get(l.IAmEventListenerProps.runOnNativeProcess).value)),t.xp6(4),t.Q6J("binary",!0),t.xp6(2),t.Q6J("isSchemaEditor",!0)("editorOptions",l.editorOptionsSchema),t.xp6(5),t.Q6J("ngIf",l.data.mode!==l.EFormMode.VIEW),t.xp6(1),t.Q6J("frameId","idInsertCodeEventLis")("modalId","idInsertCodeEventLisForm")("docsHostPort",l.DOCS_HOST_PORT))},dependencies:[J._Y,J.Fj,J.wV,J.JJ,J.JL,J.sg,J.u,x.mk,x.O5,_e.y,D.P,V.O,X.u,v.XZ],encapsulation:2})}return c})();var a=o(44879);const p=["eventListenerFormC"];function f(c,b){if(1&c){const n=t.EpF();t.TgZ(0,"span",17),t.NdJ("click",function(){t.CHM(n);const l=t.oxw(2);return t.KtG(l.add())}),t._UZ(1,"i",18),t.qZA()}}function pe(c,b){if(1&c){const n=t.EpF();t.TgZ(0,"span",19),t.NdJ("click",function(){t.CHM(n);const l=t.oxw(2);return t.KtG(l.edit())}),t._UZ(1,"i",20),t.qZA()}}function ge(c,b){if(1&c){const n=t.EpF();t.TgZ(0,"span",21),t.NdJ("click",function(){t.CHM(n);const l=t.oxw(2);return t.KtG(l.removePermanentDialog())}),t._UZ(1,"i",22),t.qZA()}if(2&c){const n=t.oxw(2);t.Q6J("pTooltip",n.selectedRows.length>1?"Permanent Delete ("+n.selectedRows.length+" selected)":"Permanent Delete")}}function ve(c,b){if(1&c&&(t.TgZ(0,"span"),t.YNc(1,f,2,0,"span",14),t.YNc(2,pe,2,0,"span",15),t.YNc(3,ge,2,1,"span",16),t.qZA()),2&c){const n=t.oxw();t.xp6(1),t.Q6J("ngIf",null==n.eventCenterS.amEvents.selectedEvents.value[0]?null:n.eventCenterS.amEvents.selectedEvents.value[0]._id),t.xp6(1),t.Q6J("ngIf",n.selectedRows.length),t.xp6(1),t.Q6J("ngIf",n.selectedRows.length>=1)}}function he(c,b){1&c&&(t.TgZ(0,"tr")(1,"th",23),t._UZ(2,"p-tableHeaderCheckbox"),t.qZA(),t.TgZ(3,"th"),t._uU(4,"Name"),t.qZA(),t._UZ(5,"th",24)(6,"th",25),t.qZA())}function Ee(c,b){1&c&&t._UZ(0,"i",33)}const m=function(){return["/api-info/api-testing/testing"]},w=function(c,b,n){return{at_category:"EVENTS",at_user:c,at_event:b,at_api:n}};function i(c,b){if(1&c&&(t.TgZ(0,"a",34),t.NdJ("click",function(r){return r.stopPropagation()}),t._UZ(1,"i",35),t.qZA()),2&c){const n=t.oxw().$implicit,r=t.oxw();t.Q6J("routerLink",t.DdM(2,m))("queryParams",t.kEZ(3,w,r.authCS.getUserId(),r.eventCenterS.amEvents.selectedEvents.value[0]._id,n._id))}}function d(c,b){if(1&c){const n=t.EpF();t.TgZ(0,"button",36),t.NdJ("click",function(l){t.CHM(n);const C=t.oxw().rowIndex,M=t.oxw();return M.moveS.moveUP(l,C,M.rows,M.selectedRows),t.KtG(M.saveEventListenersState())}),t._UZ(1,"i",37),t.qZA()}}function u(c,b){if(1&c){const n=t.EpF();t.TgZ(0,"button",38),t.NdJ("click",function(l){t.CHM(n);const C=t.oxw().rowIndex,M=t.oxw();return M.moveS.moveDown(l,C,M.rows,M.selectedRows),t.KtG(M.saveEventListenersState())}),t._UZ(1,"i",39),t.qZA()}}function P(c,b){if(1&c&&(t.TgZ(0,"tr",26)(1,"td"),t._UZ(2,"p-tableCheckbox",27),t.qZA(),t.TgZ(3,"td")(4,"span"),t._uU(5),t.qZA(),t.YNc(6,Ee,1,0,"i",28),t.qZA(),t.TgZ(7,"td")(8,"div",29),t.YNc(9,i,2,7,"a",30),t.qZA()(),t.TgZ(10,"td"),t.YNc(11,d,2,0,"button",31),t.YNc(12,u,2,0,"button",32),t.qZA()()),2&c){const n=b.$implicit,r=b.rowIndex,l=t.oxw();t.Q6J("pSelectableRow",n),t.xp6(2),t.Q6J("value",n)("pSelectableRow",n),t.xp6(3),t.Oqu(n.name),t.xp6(1),t.Q6J("ngIf",n.runOnNativeProcess),t.xp6(3),t.Q6J("ngIf",null==n?null:n._id),t.xp6(2),t.Q6J("ngIf",0!==r),t.xp6(1),t.Q6J("ngIf",r!==l.rows.length-1)}}function Y(c,b){1&c&&t._UZ(0,"p-progressSpinner",40)}let H=(()=>{class c{generalS;notificationS;navigationCS;amEventS;authCS;constantsS;eventCenterS;moveS;router;confirmationService;cd;isReadOnly=!1;loading={grid:!1};subscriptions=[];data={mode:R.D.ADD,eventChannel:new t.vpe,formData:void 0};rows=[];rowsMap={};showAll=!1;selectedRows=[];gridKey=q.GR.id;idCounter=0;EUserType=ae.d;eventListenerFormC;constructor(n,r,l,C,M,fe,Ce,Te,Ae,Me,Pe){this.generalS=n,this.notificationS=r,this.navigationCS=l,this.amEventS=C,this.authCS=M,this.constantsS=fe,this.eventCenterS=Ce,this.moveS=Te,this.router=Ae,this.confirmationService=Me,this.cd=Pe}ngOnInit(){var n=this;this.eventCenterS.amEvents.selectedEventListeners.next([]),this.subscriptions.push(this.data.eventChannel.subscribe(r=>{(r.action===A.F.SAVED||r.action===A.F.UPDATED)&&(this.eventListenerFormC.hideModal(),this.loadGridData())})),this.subscriptions.push(this.eventCenterS.amEvents.selectedEvents.subscribe(function(){var r=(0,T.Z)(function*(l){l&&l.length?n.loadGridData():n.resetGridAndUrl()});return function(l){return r.apply(this,arguments)}}()))}loadGridData(){this.loading.grid=!0;try{if(this.eventCenterS.amEvents.selectedEvents.value[0]){this.selectedRows=[],this.rows=this.eventCenterS.amEvents.selectedEvents.value[0].eventListeners;for(const r of this.rows)r.id=this.idCounter++;this.rowsMap=K.keyBy(this.rows,this.gridKey)}else this.resetGridAndUrl();const n=this.navigationCS.getQueryParam(U.p.am_event_listener);if(n){const r=n.split(","),l=K.intersection(K.keys(this.rowsMap),r),C=[];for(const M of l)this.rowsMap[M]&&C.push(this.rowsMap[M]);this.selectedRows=C,this.eventCenterS.amEvents.selectedEventListeners.next(C)}}catch(n){console.log(n)}this.loading.grid=!1,this.cd.detectChanges()}add(){this.data.formData=void 0,this.data.mode=R.D.ADD,this.data.sourceArr=this.getSourceArr(),this.data.eventChannel.emit({action:A.F.OPEN_FORM_IN_ADD_MODE}),this.eventListenerFormC.showModal()}view(){this.data.formData=this.selectedRows[0],this.data.mode=R.D.VIEW,this.data.sourceArr=this.getSourceArr(),this.data.eventChannel.emit({action:A.F.OPEN_FORM_IN_VIEW_MODE}),this.eventListenerFormC.showModal()}edit(){this.data.formData=this.selectedRows[0],this.data.mode=R.D.EDIT,this.data.sourceArr=this.getSourceArr(),this.data.eventChannel.emit({action:A.F.OPEN_FORM_IN_EDIT_MODE}),this.eventListenerFormC.showModal()}getSourceArr(){const n=this.eventCenterS.amEvents.selectedEvents.value[0];return n.eventListeners=n.eventListeners||[],n.eventListeners}removePermanentDialog(){var n=this;return(0,T.Z)(function*(){var l;n.confirmationService.confirm({message:n.selectedRows.length>1?n.constantsS.amEventListeners.removePermanentBulkConfirm(n.selectedRows.length):n.constantsS.amEventListeners.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(l=(0,T.Z)(function*(){yield n.removePermanent()}),function(){return l.apply(this,arguments)})})})()}removePermanent(){var n=this;return(0,T.Z)(function*(){if(!n.selectedRows.length)return;const r=n.selectedRows.length>1,l=n.selectedRows.length;n.loading.grid=!0;try{r?K.pullAll(n.rows,n.selectedRows):K.pull(n.rows,n.selectedRows[0]),n.rowsMap=K.keyBy(n.rows,n.gridKey),yield n.saveEventListenersState(),n.eventCenterS.eventListenersSavedAndUpdate.next(n.eventCenterS.amEvents.selectedEvents.value[0]),n.notificationS.showSuccess(r?n.constantsS.amEventListeners.removePermanentBulk(l):n.constantsS.amEventListeners.removePermanent),n.resetGridAndUrl(),n.loadGridData()}catch{n.notificationS.showError(n.constantsS.amEventListeners.removePermanentError)}n.loading.grid=!1})()}resetDependents(){var n=this;return(0,T.Z)(function*(){n.eventCenterS.amEvents.selectedEventListeners.next([]),yield n.navigationCS.setQueryParam(U.p.am_event_listener,null)})()}eventListenerSelected(){var n=this;return(0,T.Z)(function*(){n.resetDependents(),n.fillData()})()}resetGridAndUrl(){this.rows=[],this.selectedRows=[],this.rowsMap={},this.eventCenterS.amEvents.selectedEventListeners.next([])}fillData(){var n=this;return(0,T.Z)(function*(){if(!n.selectedRows.length)return yield n.navigationCS.setQueryParam(U.p.am_event_listener,""),void n.eventCenterS.amEvents.selectedEventListeners.next([]);const r=n.selectedRows[0];r.name?(yield n.navigationCS.setQueryParam(U.p.am_event_listener,r.name),n.eventCenterS.amEvents.selectedEventListeners.next([r])):n.resetDependents()})()}dblClickListeners(){this.selectedRows.length&&this.edit()}saveEventListenersState(){var n=this;return(0,T.Z)(function*(){const r=n.eventCenterS.amEvents.selectedEvents.value[0],l={eventListeners:n.rows,name:r.name};r&&(r.eventListeners=n.rows,yield n.amEventS.put(r._id,l,{select:q.iH._id}).toPromise())})()}ngOnDestroy(){this.eventCenterS.eventListenersSavedAndUpdate.next(void 0),this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(r){return new(r||c)(t.Y36(j.b),t.Y36(z.W),t.Y36(te.S),t.Y36(ne.l),t.Y36(O.D),t.Y36(W.L),t.Y36(I.u),t.Y36(Z.e),t.Y36(E.F0),t.Y36(L.YP),t.Y36(t.sBO))};static \u0275cmp=t.Xpm({type:c,selectors:[["app-listeners-w"]],viewQuery:function(r,l){if(1&r&&t.Gf(p,5),2&r){let C;t.iGM(C=t.CRH())&&(l.eventListenerFormC=C.first)}},inputs:{isReadOnly:["IsReadOnly","isReadOnly"]},decls:17,vars:12,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],[1,"fas","fa-headphones-alt","text-info","fa-fw","mr-1"],["href","https://docs.apimaker.dev/v1/docs/apis-all/events/user-created-events-api.html#event-listener","target","_blank"],[1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px",3,"src"],[4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],[1,"h-100"],["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 94px)",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"],["eventListenerFormC",""],["class","float-right cursor-pointer ml-3","pTooltip","Add New",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3",3,"pTooltip","click",4,"ngIf"],["pTooltip","Add New",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],["pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],[1,"float-right","cursor-pointer","ml-3",3,"pTooltip","click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],[2,"width","45px"],[2,"width","60px"],[2,"width","100px"],[3,"pSelectableRow"],[3,"value","pSelectableRow"],["pTooltip","Running on native process","class","fas fa-radiation ml-2 text-danger",4,"ngIf"],[1,"text-center"],["class","btn btn-xsm-custom mr-3","href","javascript:","tooltipPosition","left","pTooltip","Test API",3,"routerLink","queryParams","click",4,"ngIf"],["class","btn btn-xsm-custom btn-outline-secondary vertical-align-sub",3,"click",4,"ngIf"],["class","btn btn-xsm-custom btn-outline-secondary float-right vertical-align-sub",3,"click",4,"ngIf"],["pTooltip","Running on native process",1,"fas","fa-radiation","ml-2","text-danger"],["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"],[1,"btn","btn-xsm-custom","btn-outline-secondary","vertical-align-sub",3,"click"],[1,"fas","fa-arrow-up","fa-fw","cursor-pointer"],[1,"btn","btn-xsm-custom","btn-outline-secondary","float-right","vertical-align-sub",3,"click"],[1,"fas","fa-arrow-down","fa-fw","cursor-pointer"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(r,l){1&r&&(t.TgZ(0,"div",0)(1,"div",1)(2,"span"),t._UZ(3,"i",2),t._uU(4," Listeners"),t.qZA(),t.TgZ(5,"a",3),t._UZ(6,"img",4),t.ALo(7,"themeIcon"),t.qZA(),t.YNc(8,ve,4,3,"span",5),t.qZA(),t.TgZ(9,"div",6)(10,"div",7)(11,"p-table",8),t.NdJ("selectionChange",function(M){return l.selectedRows=M})("selectionChange",function(){return l.eventListenerSelected()})("dblclick",function(){return l.dblClickListeners()}),t.YNc(12,he,7,0,"ng-template",9),t.YNc(13,P,13,8,"ng-template",10),t.qZA(),t.YNc(14,Y,1,0,"p-progressSpinner",11),t.qZA()()(),t._UZ(15,"app-w-event-listener-form",12,13)),2&r&&(t.xp6(6),t.Q6J("src",t.lcZ(7,10,"/assets/images/logo/logo_docs.svg"),t.LSH),t.xp6(2),t.Q6J("ngIf",!l.isReadOnly),t.xp6(3),t.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",l.selectedRows)("dataKey",l.gridKey)("scrollable",!0)("value",l.rows),t.xp6(3),t.Q6J("ngIf",l.loading.grid),t.xp6(1),t.Q6J("data",l.data))},dependencies:[E.rH,x.O5,F.iA,L.jx,F.Ei,F.UA,F.Mo,B.G,X.u,s,a.w],encapsulation:2})}return c})();var me=o(96925),ue=o(25405),ye=o(67629),be=o(91396),Ie=o(13241);const Ne=["eventManFormC"];function Ue(c,b){if(1&c){const n=t.EpF();t.TgZ(0,"span",25),t.NdJ("click",function(){t.CHM(n);const l=t.oxw(2);return t.KtG(l.edit())}),t._UZ(1,"i",26),t.qZA()}}function Ge(c,b){if(1&c){const n=t.EpF();t.TgZ(0,"span",27),t.NdJ("click",function(){t.CHM(n);const l=t.oxw(2);return t.KtG(l.clone())}),t._UZ(1,"i",28),t.qZA()}}function Fe(c,b){if(1&c){const n=t.EpF();t.TgZ(0,"span",29),t.NdJ("click",function(){t.CHM(n);const l=t.oxw(2);return t.KtG(l.removePermanentDialog())}),t._UZ(1,"i",30),t.qZA()}if(2&c){const n=t.oxw(2);t.Q6J("pTooltip",n.getSelectedLeafRows().length>1?"Permanent Delete ("+n.getSelectedLeafRows().length+" selected)":"Permanent Delete")}}function Be(c,b){if(1&c){const n=t.EpF();t.TgZ(0,"span")(1,"span",14),t.NdJ("click",function(){t.CHM(n);const l=t.oxw();return t.KtG(l.add())}),t._UZ(2,"i",15),t.qZA(),t.TgZ(3,"span",16),t.NdJ("click",function(){t.CHM(n);const l=t.oxw();return t.KtG(l.openEventsGridPage())}),t._UZ(4,"i",17),t.qZA(),t.TgZ(5,"span",18),t.NdJ("click",function(){t.CHM(n);const l=t.oxw();return t.KtG(l.collapseAll())}),t._UZ(6,"i",19),t.qZA(),t.TgZ(7,"span",20),t.NdJ("click",function(){t.CHM(n);const l=t.oxw();return t.KtG(l.expandAll())}),t._UZ(8,"i",21),t.qZA(),t.YNc(9,Ue,2,0,"span",22),t.YNc(10,Ge,2,0,"span",23),t.YNc(11,Fe,2,1,"span",24),t.qZA()}if(2&c){const n=t.oxw();t.xp6(9),t.Q6J("ngIf",n.selectedRows.length),t.xp6(1),t.Q6J("ngIf",n.selectedRows.length),t.xp6(1),t.Q6J("ngIf",n.selectedRows.length||n.getSelectedLeafRows().length>1)}}function Je(c,b){if(1&c&&(t.TgZ(0,"div")(1,"div",31),t._uU(2),t.qZA()()),2&c){const n=t.oxw();t.xp6(2),t.Oqu(n.constantsS.group.allAmEventsPermitted)}}function Ye(c,b){if(1&c&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&c){const n=t.oxw().$implicit;t.xp6(1),t.Oqu(n.label)}}function Ke(c,b){if(1&c){const n=t.EpF();t.TgZ(0,"i",39),t.NdJ("click",function(l){t.CHM(n);const C=t.oxw(2).$implicit,M=t.oxw();return t.KtG(M.copyValue(l,C.data.text))}),t.qZA()}}function Qe(c,b){if(1&c&&(t.TgZ(0,"div")(1,"div")(2,"table",33)(3,"tr")(4,"td",34),t._UZ(5,"p-checkbox",35),t.qZA(),t.TgZ(6,"td",36)(7,"span",37)(8,"span"),t._uU(9),t.qZA(),t.YNc(10,Ke,1,0,"i",38),t.qZA()()()()()()),2&c){const n=t.oxw().$implicit,r=t.oxw();t.xp6(5),t.Q6J("ngModel",r.isNodeSelected(n))("binary",!0),t.xp6(4),t.Oqu(n.data.text),t.xp6(1),t.Q6J("ngIf",n.data.text)}}function We(c,b){if(1&c&&(t.TgZ(0,"div",32),t.YNc(1,Ye,2,1,"div",6),t.YNc(2,Qe,11,4,"div",6),t.qZA()),2&c){const n=b.$implicit;t.xp6(1),t.Q6J("ngIf",null==n.children?null:n.children.length),t.xp6(1),t.Q6J("ngIf",!(null!=n.children&&n.children.length))}}function ke(c,b){1&c&&t._UZ(0,"p-progressSpinner",40)}let xe=(()=>{class c{amEventS;generalS;notificationS;navigationCS;authCS;constantsS;cd;eventCenterS;eventCenterCS;functionS;router;confirmationService;isReadOnly=!1;eventManFormC;loading={grid:!1};subscriptions=[];data={mode:R.D.ADD,eventChannel:new t.vpe,formData:void 0};showAll=!1;selectedRows=[];gridKey=q.iH._id;treeNodes=[];allTreeItemsMap={};selectByKey="_id";EAPICategory=ie.R;ERequestMethod=me.Yp;constructor(n,r,l,C,M,fe,Ce,Te,Ae,Me,Pe,tt){this.amEventS=n,this.generalS=r,this.notificationS=l,this.navigationCS=C,this.authCS=M,this.constantsS=fe,this.cd=Ce,this.eventCenterS=Te,this.eventCenterCS=Ae,this.functionS=Me,this.router=Pe,this.confirmationService=tt}ngOnInit(){this.loadTreeData().then(),this.subscriptions.push(this.data.eventChannel.subscribe(n=>{(n.action===A.F.SAVED||n.action===A.F.UPDATED)&&(this.eventManFormC.hideModal(),this.loadTreeData().then())})),this.generalS.setNewTitle("Events")}add(){this.data.formData=void 0,this.data.mode=R.D.ADD,this.data.eventChannel.emit({action:A.F.OPEN_FORM_IN_ADD_MODE}),this.eventManFormC.showModal()}edit(){this.selectedRows[0]&&(this.data.formData=this.selectedRows[0].data,console.log(this.data.formData),this.data.mode=R.D.EDIT,this.data.eventChannel.emit({action:A.F.OPEN_FORM_IN_EDIT_MODE}),this.eventManFormC.showModal())}clone(){var n=this;return(0,T.Z)(function*(){var r;n.confirmationService.confirm({message:n.constantsS.amEvents.cloneConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(r=(0,T.Z)(function*(){try{if(!n.selectedRows[0])return;const l=(yield n.amEventS.getById(n.selectedRows[0].data._id).toPromise()).data;delete l._id,delete l.guid,l.name=`event-${Math.random().toString().substr(2,6)}`,(yield n.amEventS.post(l).toPromise()).success?(n.notificationS.showSuccess(n.constantsS.amEvents.cloneSuccess),yield n.loadTreeData()):n.notificationS.showSuccess(n.constantsS.amEvents.cloneSuccess)}catch{n.notificationS.showError(n.constantsS.amEvents.cloneError)}}),function(){return r.apply(this,arguments)})})})()}getSelectedLeafRows(){return(this.selectedRows||[]).filter(n=>!n.children?.length)}isNodeSelected(n){return!!this.selectedRows?.includes(n)}removePermanentDialog(){var n=this;return(0,T.Z)(function*(){var l;n.getSelectedLeafRows().length>1?n.removePermanentBulkDialog():n.confirmationService.confirm({message:n.constantsS.amEvents.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(l=(0,T.Z)(function*(){yield n.removePermanent()}),function(){return l.apply(this,arguments)})})})()}removePermanent(){var n=this;return(0,T.Z)(function*(){n.loading.grid=!0;const r=yield n.amEventS.permanentDelete(n.selectedRows[0].data._id).toPromise();n.loading.grid=!1,r.success?(n.notificationS.showSuccess(n.constantsS.amEvents.removePermanent),n.resetGridAndUrl(),yield n.loadTreeData(),n.selectedRows=[]):n.notificationS.showErrorFromResponse(r,n.constantsS.amEvents.removePermanentError)})()}removePermanentBulkDialog(){var n=this;const r=this.getSelectedLeafRows();var l;r.length<2||this.confirmationService.confirm({message:this.constantsS.amEvents.removePermanentBulkConfirm(r.length),header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(l=(0,T.Z)(function*(){yield n.removePermanentBulk()}),function(){return l.apply(this,arguments)})})}removePermanentBulk(){var n=this;return(0,T.Z)(function*(){const r=n.getSelectedLeafRows();if(!(r.length<2)){n.loading.grid=!0;try{const C=(yield Promise.all(r.map(M=>n.amEventS.permanentDelete(M.data._id).toPromise()))).filter(M=>!M.success).length;0===C?n.notificationS.showSuccess(n.constantsS.amEvents.removePermanentBulk(r.length)):n.notificationS.showError(C<r.length?`${r.length-C} of ${r.length} events removed. ${C} failed.`:n.constantsS.amEvents.removePermanentBulkError),n.resetGridAndUrl(),yield n.loadTreeData(),n.selectedRows=[]}catch{n.notificationS.showError(n.constantsS.amEvents.removePermanentBulkError)}n.loading.grid=!1}})()}resetDependents(){var n=this;return(0,T.Z)(function*(){n.eventCenterS.amEvents.selectedEvents.next([]),yield n.navigationCS.setQueryParam(U.p.am_events,null)})()}functionSelected(){var n=this;return(0,T.Z)(function*(){yield n.resetDependents(),yield n.fillData(),n.selectedRows[0]?n.generalS.setNewTitle(n.selectedRows[0].data?.name,ie.R.EVENTS):n.generalS.setNewTitle("Events")})()}resetGridAndUrl(){this.selectedRows=[],this.eventCenterS.amEvents.selectedEvents.next([])}fillData(){var n=this;return(0,T.Z)(function*(){const r=n.selectedRows?.[0]?.data;if(!r)return;const l=(yield n.amEventS.getById(r._id).toPromise()).data;l._id?(yield n.navigationCS.setQueryParam(U.p.am_events,l._id),n.eventCenterS.amEvents.selectedEvents.next([l])):n.resetDependents().then()})()}openEventsGridPage(){var n=this;return(0,T.Z)(function*(){n.router.navigate(["api-info","am-events","layout"]).then()})()}expandAll(){this.treeNodes=this.generalS.setTreeExpansion(this.treeNodes,!0),this.cd.detectChanges()}collapseAll(){this.treeNodes=this.generalS.setTreeExpansion(this.treeNodes,!1),this.cd.detectChanges()}loadTreeData(){var n=this;return(0,T.Z)(function*(){n.loading.grid=!0;try{const r=(yield n.functionS.getEventKTree().toPromise()).data;for(const C of r)n.generalS.convertKTreeItemToPrimeNGTreeItem(C);const l={};n.generalS.getMapOfAllItems(l,r),n.generalS.setIsExpandedStateFromOldMap(n.allTreeItemsMap,l),n.treeNodes=r,n.allTreeItemsMap=l,n.functionSelected().then()}catch(r){console.log(r)}n.loading.grid=!1,n.cd.detectChanges()})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}dblClickEvent(){this.selectedRows.length&&this.edit()}copyValue(n,r){n.stopPropagation(),this.generalS.copyToClipboard(r)?this.notificationS.showSuccess("Copied!"):this.notificationS.showError("Copy failed")}static \u0275fac=function(r){return new(r||c)(t.Y36(ne.l),t.Y36(j.b),t.Y36(z.W),t.Y36(te.S),t.Y36(O.D),t.Y36(W.L),t.Y36(t.sBO),t.Y36(I.u),t.Y36(ue.M),t.Y36(ye.d),t.Y36(E.F0),t.Y36(L.YP))};static \u0275cmp=t.Xpm({type:c,selectors:[["app-events-tree"]],viewQuery:function(r,l){if(1&r&&t.Gf(Ne,5),2&r){let C;t.iGM(C=t.CRH())&&(l.eventManFormC=C.first)}},inputs:{isReadOnly:["IsReadOnly","isReadOnly"]},decls:19,vars:13,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],["alt","Events",1,"fa-fw","mr-1",3,"src"],[1,"float-right"],["href","https://docs.apimaker.dev/v1/docs/apis-all/events/user-created-events-api.html","target","_blank"],[1,"fa-fw","ml-3","mr-1","mt-n1",2,"font-size","25px",3,"src"],[4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],[1,"h-100"],["scrollHeight","calc(100vh - 92px)","selectionMode","multiple",1,"w-full",3,"value","selection","selectionChange","dblclick"],["pTemplate","default"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"id","data"],["eventManFormC",""],["pTooltip","Add New",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],[1,"float-right","cursor-pointer","ml-3",3,"click"],["pTooltip","Grid View",1,"fas","fa-table","text-yellow","fa-fw"],["pTooltip","Collapse All","tooltipPosition","left",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-compress-alt","text-light","fa-fw"],["pTooltip","Expand All","tooltipPosition","left",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-expand-alt","text-light","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","tooltipPosition","left",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"],["tooltipPosition","left",1,"float-right","cursor-pointer","ml-3",3,"pTooltip","click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],[1,"p-2","text-center","text-success"],[1,"w-100","prevent-text-selection","cursor-pointer"],[1,"w-100",2,"table-layout","fixed"],[2,"width","30px"],[3,"ngModel","binary"],[2,"width","calc(100% - 30px)"],[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","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(r,l){1&r&&(t.TgZ(0,"div",0)(1,"div",1)(2,"span"),t._UZ(3,"img",2),t.ALo(4,"themeIcon"),t._uU(5," Events"),t.qZA(),t.TgZ(6,"div",3)(7,"a",4),t._UZ(8,"img",5),t.ALo(9,"themeIcon"),t.qZA()(),t.YNc(10,Be,12,3,"span",6),t.qZA(),t.TgZ(11,"div",7),t.YNc(12,Je,3,1,"div",6),t.TgZ(13,"div",8)(14,"p-tree",9),t.NdJ("selectionChange",function(M){return l.selectedRows=M})("dblclick",function(){return l.dblClickEvent()})("selectionChange",function(){return l.functionSelected()}),t.YNc(15,We,3,2,"ng-template",10),t.qZA(),t.YNc(16,ke,1,0,"p-progressSpinner",11),t.qZA()()(),t._UZ(17,"app-w-event-man-form",12,13)),2&r&&(t.xp6(3),t.Q6J("src",t.lcZ(4,9,"/assets/images/icons/event.svg"),t.LSH),t.xp6(5),t.Q6J("src",t.lcZ(9,11,"/assets/images/logo/logo_docs.svg"),t.LSH),t.xp6(2),t.Q6J("ngIf",!l.isReadOnly),t.xp6(2),t.Q6J("ngIf",l.eventCenterS.group.apisRegex.allEvents||l.eventCenterS.filterInLog.apisRegex.allEvents),t.xp6(2),t.Q6J("value",l.treeNodes)("selection",l.selectedRows),t.xp6(2),t.Q6J("ngIf",l.loading.grid),t.xp6(1),t.Q6J("id","idEventFormTree")("data",l.data))},dependencies:[J.JJ,J.On,x.O5,L.jx,be.mp,B.G,X.u,v.XZ,Ie.a,a.w],styles:["[_nghost-%COMP%] .copy-icon{opacity:0;transition:opacity .2s}[_nghost-%COMP%] tr:hover .copy-icon, [_nghost-%COMP%] p-treenode:hover .copy-icon{opacity:1}[_nghost-%COMP%] .copy-icon:hover{color:#4fc3f7!important}[_nghost-%COMP%] .copy-cell{display:inline-flex;align-items:center}"]})}return c})();function Ve(c,b){1&c&&t._UZ(0,"app-events-tree",3)}function He(c,b){1&c&&t._UZ(0,"app-listeners-w",3)}const De=function(){return[50,50]};let we=(()=>{class c{constructor(){}ngOnInit(){}static \u0275fac=function(r){return new(r||c)};static \u0275cmp=t.Xpm({type:c,selectors:[["app-event-man-layout-tree"]],decls:4,vars:4,consts:[[1,"pt-1","pl-1","pr-1"],["styleClass","full-body",3,"panelSizes","minSizes"],["pTemplate",""],[1,"w-100"]],template:function(r,l){1&r&&(t.TgZ(0,"div",0)(1,"p-splitter",1),t.YNc(2,Ve,1,0,"ng-template",2),t.YNc(3,He,1,0,"ng-template",2),t.qZA()()),2&r&&(t.xp6(1),t.Q6J("panelSizes",t.DdM(2,De))("minSizes",t.DdM(3,De)))},dependencies:[L.jx,g.q,H,xe],encapsulation:2})}return c})();var Ze=o(5305);function qe(c,b){1&c&&t._UZ(0,"app-events-grid",3),2&c&&t.Q6J("showCheckbox",!0)}function je(c,b){1&c&&t._UZ(0,"app-listeners-w",4)}const Oe=function(){return[50,50]};let Re=(()=>{class c{constructor(){}ngOnInit(){}static \u0275fac=function(r){return new(r||c)};static \u0275cmp=t.Xpm({type:c,selectors:[["app-event-man-layout"]],decls:4,vars:4,consts:[[1,"pt-1","pl-1","pr-1"],["styleClass","full-body",3,"panelSizes","minSizes"],["pTemplate",""],[1,"w-100",3,"showCheckbox"],[1,"w-100"]],template:function(r,l){1&r&&(t.TgZ(0,"div",0)(1,"p-splitter",1),t.YNc(2,qe,1,1,"ng-template",2),t.YNc(3,je,1,0,"ng-template",2),t.qZA()()),2&r&&(t.xp6(1),t.Q6J("panelSizes",t.DdM(2,Oe))("minSizes",t.DdM(3,Oe)))},dependencies:[L.jx,g.q,H,Ze.N],encapsulation:2})}return c})();var Le=o(63726);o(69701),o(26551);const Xe=[{path:"",redirectTo:"layout-tree",pathMatch:"full"},{path:"layout-tree",component:we,canActivate:[Le.P]},{path:"layout",component:Re,canActivate:[Le.P]}];let et=(()=>{class c{static \u0275fac=function(r){return new(r||c)};static \u0275mod=t.oAB({type:c});static \u0275inj=t.cJS({imports:[E.Bz.forChild(Xe),e.u]})}return c})()},13241:(Se,ee,o)=>{o.d(ee,{a:()=>_e});var E=o(15861),e=o(94946),t=o(60095),L=o(33157),g=o(90328),T=o(6990),R=o(51162),U=o(45085),K=o(99961),q=o(67145),ae=o(77240),j=o(27414),z=o(32915),te=o(95852),ne=o(67629),O=o(96814),W=o(32660),I=o(97680),Z=o(33259),x=o(38057),F=o(69701),B=o(26551);const X=["eventTriggerModalC"];function J(D,V){1&D&&(e.TgZ(0,"span"),e._UZ(1,"i",25),e._uU(2," Add Event"),e.qZA())}function oe(D,V){1&D&&(e.TgZ(0,"span"),e._UZ(1,"i",26),e._uU(2," View Event"),e.qZA())}function re(D,V){1&D&&(e.TgZ(0,"span"),e._UZ(1,"i",27),e._uU(2," Edit Event"),e.qZA())}function ie(D,V){if(1&D){const v=e.EpF();e.TgZ(0,"div",28)(1,"div",29)(2,"span"),e._UZ(3,"i",30),e._uU(4," Automatically Trigger On API Hit"),e.qZA(),e.TgZ(5,"span",31),e.NdJ("click",function(){e.CHM(v);const _=e.oxw();return e.KtG(_.showEventTriggerModel())}),e._UZ(6,"i",32),e.qZA()(),e.TgZ(7,"div",33),e._UZ(8,"app-api-grid",34),e.qZA()()}if(2&D){const v=e.oxw();e.xp6(8),e.Q6J("rows",v.apiGridsRows)("mode","EVENT_FORM_MODEL")}}function se(D,V){1&D&&(e.TgZ(0,"span"),e._uU(1,"Save"),e.qZA())}function le(D,V){1&D&&(e.TgZ(0,"span"),e._uU(1,"Update"),e.qZA())}function ce(D,V){if(1&D){const v=e.EpF();e.TgZ(0,"button",35),e.NdJ("click",function(){e.CHM(v);const _=e.oxw();return e.KtG(_.save())}),e._UZ(1,"i",36),e.YNc(2,se,2,0,"span",4),e.YNc(3,le,2,0,"span",4),e.qZA()}if(2&D){const v=e.oxw();e.Q6J("disabled",v.form.invalid),e.xp6(2),e.Q6J("ngIf",v.data.mode===v.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",v.data.mode===v.EFormMode.EDIT)}}function de(D,V){1&D&&e._UZ(0,"p-progressSpinner",37)}let _e=(()=>{class D{fb;ns;amEventS;generalS;constantsS;eventCenterS;authCS;functionS;cd;data;id;loading={form:!1};EFormMode=g.D;form;subscriptions=[];apiGridsRows=[];instanceMap={};customAPIMap={};tpAPIVersionMap={};allAPIBundles=[];tpAPIs=[];tpAPIMap={};EAPICategory=U.R;dataItem={eventChannel:new e.vpe};eventTriggerModalC;constructor(v,y,_,S,G,Q,k,h,N){this.fb=v,this.ns=y,this.amEventS=_,this.generalS=S,this.constantsS=G,this.eventCenterS=Q,this.authCS=k,this.functionS=h,this.cd=N}ngOnInit(){var v=this;this.createForm(),this.subscriptions.push(this.data.eventChannel.subscribe(function(){var y=(0,E.Z)(function*(_){if(_)if(v.form.enable(),_.action===L.F.OPEN_FORM_IN_EDIT_MODE){const S=yield v.amEventS.getById(v.data.formData._id).toPromise();v.form.reset(),v.form.patchValue(S.data),v.eventCenterS.eventTrigger.triggerOnApisArr=[],yield v.loadETriggerTable(S.data.triggerOnApis)}else if(_.action===L.F.OPEN_FORM_IN_VIEW_MODE){const S=yield v.amEventS.getById(v.data.formData._id).toPromise();v.form.reset(),v.form.patchValue(S.data),v.form.disable(),yield v.loadETriggerTable(S.data.triggerOnApis)}else _.action===L.F.OPEN_FORM_IN_ADD_MODE&&(v.form.reset(),v.resetData())});return function(_){return y.apply(this,arguments)}}())),this.subscriptions.push(this.eventCenterS.eventListenersSavedAndUpdate.subscribe(function(){var y=(0,E.Z)(function*(_){_&&(yield v.save(_))});return function(_){return y.apply(this,arguments)}}()))}createForm(){this.form=this.fb.group({name:[null,[t.kI.required]],isAutomaticallyTriggerOnApiHit:[null,[]]})}showModal(){$("#"+this.id).modal("show")}hideModal(){$("#"+this.id).modal("hide")}save(v,y){var _=this;return(0,E.Z)(function*(){if(v){y?.stopImmediatePropagation();const S=Object.assign({},v,_.eventCenterS.amEvents.selectedEvents.value[0]||{});if(S.user=_.authCS.getUserId(),!_.checkValidListeners(S))return;const G=yield _.amEventS.put(S._id,S,{select:R.iH._id}).toPromise();G&&G.success&&(_.ns.showSuccess(_.constantsS.amEvents.editSuccess),_.data.eventChannel.emit({action:_.data.mode===g.D.ADD?L.F.SAVED:L.F.UPDATED}))}else{const S=_.form.getRawValue();let G;G=_.data.formData&&_.data.formData._id?(yield _.amEventS.getById(_.data.formData._id).toPromise()).data:{};const Q=Object.assign({},G,S);Q.user=_.authCS.getUserId(),Q.triggerOnApis=_.eventCenterS.eventTrigger.triggerOnApisArr||[];try{let k;if(_.loading.form=!0,!_.checkValidListeners(Q))return;_.data.mode===g.D.ADD?k=yield _.amEventS.post(Q).toPromise():_.data.mode===g.D.EDIT&&(Q.eventListeners=(_.eventCenterS.amEvents.selectedEvents.value[0]||{}).eventListeners,k=yield _.amEventS.put(Q._id,Q,{select:R.iH._id}).toPromise()),_.ns.showSuccess(_.data.mode===g.D.ADD?_.constantsS.amEvents.addSuccess:_.constantsS.amEvents.editSuccess),_.data.eventChannel.emit({action:_.data.mode===g.D.ADD?L.F.SAVED:L.F.UPDATED})}catch(k){console.log(k),_.ns.showErrorFromResponse(k.error||k,"Unable to save event.")}_.loading.form=!1}})()}checkValidListeners(v){const y=T.uniq(T.map(v.eventListeners,R.l0.name));return!(y&&v&&v.eventListeners&&y.length!==v.eventListeners.length&&(this.ns.showError("Please provide unique names for listeners."),v.eventListeners.pop(),1))}showEventTriggerModel(){var v=this;return(0,E.Z)(function*(){v.dataItem.eventChannel.emit({action:L.F.OPEN_FORM_IN_ADD_MODE}),v.eventTriggerModalC.showModal()})()}loadETriggerTable(v){var y=this;return(0,E.Z)(function*(){y.resetData(),y.eventCenterS.eventTrigger.triggerOnApisArr=v,y.apiGridsRows=v,y.cd.detectChanges()})()}loadETriggerData(v){var y=this;return(0,E.Z)(function*(){const _=[];for(const S of v)S.apiCategory===U.R.INSTANCES?T.find(y.apiGridsRows,{instanceName:S.instanceName,databaseName:S.databaseName,collectionName:S.collectionName,instanceApiName:S.instanceApiName})||_.push(S):S.apiCategory===U.R.CUSTOM_APIS?T.find(y.apiGridsRows,{customApiName:S.customApiName})||_.push(S):S.apiCategory===U.R.SYSTEM_APIS?T.find(y.apiGridsRows,{systemApiName:S.systemApiName})||_.push(S):S.apiCategory===U.R.THIRD_PARTY_APIS&&(T.find(y.apiGridsRows,{tpInstalledApiBundleName:S.tpInstalledApiBundleName,tpInstalledApiVersion:S.tpInstalledApiVersion,tpInstalledApiName:S.tpInstalledApiName})||_.push(S));yield y.loadETriggerTable([...y.apiGridsRows,..._])})()}resetData(){this.instanceMap={},this.eventCenterS.eventTrigger.triggerOnApisArr=[],this.allAPIBundles=[],this.tpAPIMap={},this.apiGridsRows=[],this.customAPIMap={}}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(y){return new(y||D)(e.Y36(t.qu),e.Y36(K.W),e.Y36(q.l),e.Y36(ae.b),e.Y36(j.L),e.Y36(z.u),e.Y36(te.D),e.Y36(ne.d),e.Y36(e.sBO))};static \u0275cmp=e.Xpm({type:D,selectors:[["app-w-event-man-form"]],viewQuery:function(y,_){if(1&y&&e.Gf(X,5),2&y){let S;e.iGM(S=e.CRH())&&(_.eventTriggerModalC=S.first)}},inputs:{data:"data",id:"id"},decls:31,vars:10,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal",3,"id"],["role","document",1,"modal-dialog","modal-xl"],[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","level1/level2/name",1,"form-control","form-control-sm"],[1,"col-4"],[1,"align-middle","mb-0","pt-1"],["formControlName","isAutomaticallyTriggerOnApiHit","label","Automatically Trigger On API Hit",3,"binary"],["class","card shadow-sm h-100",4,"ngIf"],[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"],[3,"dataItem","apiGridSendData"],["eventTriggerModalC",""],[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"],[1,"card","shadow-sm","h-100"],[1,"card-header"],[1,"fas","fa-table","text-yellow","fa-fw","mr-1"],["pTooltip","Add",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],[1,"card-body","p-0","overflow-auto"],[3,"rows","mode"],["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(y,_){1&y&&(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,oe,3,0,"span",4),e.YNc(6,re,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),e._UZ(18,"div",14),e.TgZ(19,"div",12)(20,"label",15),e._UZ(21,"p-checkbox",16),e.qZA()()()(),e.YNc(22,ie,9,2,"div",17),e.qZA(),e.TgZ(23,"div",18)(24,"button",19),e._UZ(25,"i",20),e._uU(26," Close"),e.qZA(),e.YNc(27,ce,4,3,"button",21),e.qZA(),e.YNc(28,de,1,0,"p-progressSpinner",22),e.qZA()()(),e.TgZ(29,"app-event-trigger-modal",23,24),e.NdJ("apiGridSendData",function(G){return _.loadETriggerData(G)}),e.qZA()),2&y&&(e.s9C("id",_.id),e.xp6(4),e.Q6J("ngIf",_.data.mode===_.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",_.data.mode===_.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",_.data.mode===_.EFormMode.EDIT),e.xp6(5),e.Q6J("formGroup",_.form),e.xp6(10),e.Q6J("binary",!0),e.xp6(1),e.Q6J("ngIf",_.form.get("isAutomaticallyTriggerOnApiHit").value),e.xp6(5),e.Q6J("ngIf",_.data.mode!==_.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",_.loading.form),e.xp6(1),e.Q6J("dataItem",_.dataItem))},dependencies:[t._Y,t.Fj,t.JJ,t.JL,t.sg,t.u,O.O5,W.y,I.G,Z.u,x.XZ,F.p,B.u],encapsulation:2})}return D})()},26551:(Se,ee,o)=>{o.d(ee,{u:()=>ne});var E=o(15861),e=o(94946),t=o(51162),L=o(19394),g=o(45085),T=o(32915),A=o(96814),R=o(95431),U=o(85219),K=o(33259);function q(O,W){1&O&&(e.TgZ(0,"tr")(1,"th",3),e._uU(2,"API Category"),e.qZA(),e.TgZ(3,"th"),e._uU(4,"Instances | Databases | Collections"),e.qZA(),e.TgZ(5,"th"),e._uU(6,"API Bundles | API Versions"),e.qZA(),e.TgZ(7,"th",4),e._uU(8,"API Name"),e.qZA(),e._UZ(9,"th",5),e.qZA())}function ae(O,W){if(1&O&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&O){const I=e.oxw().$implicit;e.xp6(1),e.lnq("",I.instanceName," | ",I.databaseName," | ",I.collectionName,"")}}function j(O,W){if(1&O&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&O){const I=e.oxw().$implicit;e.xp6(1),e.AsE("",I.tpInstalledApiBundleName," | ",I.tpInstalledApiVersion,"")}}function z(O,W){if(1&O){const I=e.EpF();e.TgZ(0,"tr",6)(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e.YNc(4,ae,2,3,"span",7),e.qZA(),e.TgZ(5,"td"),e.YNc(6,j,2,2,"span",7),e.qZA(),e.TgZ(7,"td")(8,"div"),e._uU(9),e.qZA()(),e.TgZ(10,"td")(11,"div",8)(12,"i",9),e.NdJ("click",function(x){const B=e.CHM(I).$implicit,X=e.oxw();return e.KtG(X.unSelectApi(x,B))}),e.qZA()()()()}if(2&O){const I=W.$implicit,Z=e.oxw();e.Q6J("pSelectableRow",I),e.xp6(2),e.Oqu(Z.EAPICategoryNames[I.apiCategory]),e.xp6(2),e.Q6J("ngIf",null==I?null:I.instanceName),e.xp6(2),e.Q6J("ngIf",null==I?null:I.tpInstalledApiBundleName),e.xp6(3),e.Oqu(Z.EAPIIdToName[null==I?null:I.instanceApiName]||(null==I?null:I.customApiName)||Z.EAPIIdToName[null==I?null:I.systemApiName]||(null==I?null:I.tpInstalledApiName))}}const te=function(){return{height:"100%"}};let ne=(()=>{class O{ec;cd;rows;mode;selectedRows=[];gridKey=t.iH._id;EAPICategory=g.R;deleteAPIAddInBack=new e.vpe;EAPICategoryNames=g.a;EAPIIdToName=L.n4;constructor(I,Z){this.ec=I,this.cd=Z}ngOnInit(){}unSelectApi(I,Z){var x=this;return(0,E.Z)(function*(){if(I.stopPropagation(),I.preventDefault(),x.rows.splice(x.rows.indexOf(Z),1),"EVENT_TRIGGER_MODEL"===x.mode){const F=x.ec.eventTrigger.allApiIds.indexOf(Z._id);-1!==F&&x.ec.eventTrigger.allApiIds.splice(F,1),x.deleteAPIAddInBack.emit(Z)}else if("EVENT_FORM_MODEL"===x.mode){const F=x.ec.eventTrigger.triggerOnApisArr.findIndex(B=>B._id===Z._id);-1!==F&&x.ec.eventTrigger.triggerOnApisArr.splice(F,1)}})()}static \u0275fac=function(Z){return new(Z||O)(e.Y36(T.u),e.Y36(e.sBO))};static \u0275cmp=e.Xpm({type:O,selectors:[["app-api-grid"]],inputs:{rows:"rows",mode:"mode"},outputs:{deleteAPIAddInBack:"deleteAPIAddInBack"},decls:3,vars:8,consts:[["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 100px)",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","ngStyle","value","selectionChange"],["pTemplate","header"],["pTemplate","body"],[2,"width","140px"],[2,"width","260px"],[2,"width","45px"],[3,"pSelectableRow"],[4,"ngIf"],[1,"text-center"],["pTooltip","Delete",1,"far","fa-trash-alt","fa-fw","text-danger","cursor-pointer",3,"click"]],template:function(Z,x){1&Z&&(e.TgZ(0,"p-table",0),e.NdJ("selectionChange",function(B){return x.selectedRows=B}),e.YNc(1,q,10,0,"ng-template",1),e.YNc(2,z,13,5,"ng-template",2),e.qZA()),2&Z&&e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",x.selectedRows)("dataKey",x.gridKey)("scrollable",!0)("ngStyle",e.DdM(7,te))("value",x.rows)},dependencies:[A.O5,A.PC,R.iA,U.jx,R.Ei,K.u],encapsulation:2})}return O})()},69701:(Se,ee,o)=>{o.d(ee,{p:()=>k});var E=o(15861),e=o(94946),t=o(6990),g=o(56212),T=o(51162),A=o(45085),R=o(19394),U=o(77240),K=o(92189),q=o(99961),ae=o(95852),j=o(53429),z=o(10262),te=o(32915),ne=o(24977),O=o(12559),W=o(67629),I=o(81429),Z=o(60095),x=o(96814),F=o(32660),B=o(85219),X=o(53965),J=o(26551),oe=o(44879);const re=["apiDropdownGridC"];function ie(h,N){if(1&h){const s=e.EpF();e.TgZ(0,"div",20)(1,"span",21),e._uU(2,"Database"),e.qZA(),e.TgZ(3,"p-dropdown",35),e.NdJ("onChange",function(p){e.CHM(s);const f=e.oxw(3);return f.tab.database=p.value,e.KtG(f.loadCollections(!0))}),e.qZA()()}if(2&h){const s=e.oxw(3);e.xp6(3),e.Q6J("options",s.tab.allDatabases)("ngModel",s.tab.database)("filter",!0)}}function se(h,N){if(1&h){const s=e.EpF();e.TgZ(0,"div",20)(1,"span",21),e._uU(2,"Collections"),e.qZA(),e.TgZ(3,"p-dropdown",22),e.NdJ("onChange",function(p){e.CHM(s);const f=e.oxw(3);return f.tab.collection=p.value,e.KtG(f.loadInstanceAPIs(!0))}),e.qZA()()}if(2&h){const s=e.oxw(3);e.xp6(3),e.Q6J("options",s.tab.allCollections)("ngModel",s.tab.collection)("filter",!0)}}function le(h,N){if(1&h){const s=e.EpF();e.TgZ(0,"div",19)(1,"div",20)(2,"span",21),e._uU(3,"Instances"),e.qZA(),e.TgZ(4,"p-dropdown",22),e.NdJ("onChange",function(p){e.CHM(s);const f=e.oxw(2);return f.tab.instance=p.value,e.KtG(f.loadDatabases(!0))}),e.qZA()(),e.YNc(5,ie,4,3,"div",34),e.YNc(6,se,4,3,"div",34),e.qZA()}if(2&h){const s=e.oxw(2);e.xp6(4),e.Q6J("options",s.tab.allInstances)("ngModel",s.tab.instance)("filter",!0),e.xp6(1),e.Q6J("ngIf",s.tab.apiCategory.id===s.EAPICategory.INSTANCES),e.xp6(1),e.Q6J("ngIf",s.tab.apiCategory.id===s.EAPICategory.INSTANCES)}}function ce(h,N){if(1&h){const s=e.EpF();e.TgZ(0,"div",20)(1,"span",21),e._uU(2,"API Versions"),e.qZA(),e.TgZ(3,"p-dropdown",36),e.NdJ("onChange",function(p){e.CHM(s);const f=e.oxw(3);return f.tab.tpStoreApiVersion=p.value,e.KtG(f.loadThirdPartyAPIs(!0))}),e.qZA()()}if(2&h){const s=e.oxw(3);e.xp6(3),e.Q6J("options",s.tab.allStoreApiVersions)("ngModel",s.tab.tpStoreApiVersion)("filter",!0)}}function de(h,N){if(1&h){const s=e.EpF();e.TgZ(0,"div",19)(1,"div",20)(2,"span",21),e._uU(3,"API Bundle"),e.qZA(),e.TgZ(4,"p-dropdown",22),e.NdJ("onChange",function(p){e.CHM(s);const f=e.oxw(2);return f.tab.tpApiBundle=p.value,e.KtG(f.loadStoreApiVersions(!0))}),e.qZA()(),e.YNc(5,ce,4,3,"div",34),e.qZA()}if(2&h){const s=e.oxw(2);e.xp6(4),e.Q6J("options",s.tab.allApiBundles)("ngModel",s.tab.tpApiBundle)("filter",!0),e.xp6(1),e.Q6J("ngIf",s.tab.apiCategory.id===s.EAPICategory.THIRD_PARTY_APIS)}}function _e(h,N){if(1&h&&(e.TgZ(0,"span",40),e._uU(1),e.qZA()),2&h){const s=e.oxw(2).$implicit;e.xp6(1),e.hij(" - ",s.category.toLowerCase(),"")}}function D(h,N){if(1&h&&(e.TgZ(0,"span",41),e._uU(1),e.qZA()),2&h){const s=e.oxw(2).$implicit;e.xp6(1),e.hij(" - ",s.category.toLowerCase(),"")}}function V(h,N){if(1&h&&(e.TgZ(0,"div")(1,"span"),e._uU(2),e.qZA(),e.YNc(3,_e,2,1,"span",38),e.YNc(4,D,2,1,"span",39),e.qZA()),2&h){const s=e.oxw().$implicit;e.xp6(2),e.Oqu(s.name),e.xp6(1),e.Q6J("ngIf","SCHEMA"===s.category),e.xp6(1),e.Q6J("ngIf","GEN"===s.category)}}function v(h,N){1&h&&e.YNc(0,V,5,3,"div",37),2&h&&e.Q6J("ngIf",N.$implicit)}function y(h,N){if(1&h&&(e.TgZ(0,"span",40),e._uU(1),e.qZA()),2&h){const s=e.oxw(2).$implicit;e.xp6(1),e.hij(" - ",s.category.toLowerCase(),"")}}function _(h,N){if(1&h&&(e.TgZ(0,"span",41),e._uU(1),e.qZA()),2&h){const s=e.oxw(2).$implicit;e.xp6(1),e.hij(" - ",s.category.toLowerCase(),"")}}function S(h,N){if(1&h&&(e.TgZ(0,"div")(1,"span"),e._uU(2),e.qZA(),e.YNc(3,y,2,1,"span",38),e.YNc(4,_,2,1,"span",39),e.qZA()),2&h){const s=e.oxw().$implicit;e.xp6(2),e.Oqu(s.name),e.xp6(1),e.Q6J("ngIf","SCHEMA"===s.category),e.xp6(1),e.Q6J("ngIf","GEN"===s.category)}}function G(h,N){1&h&&e.YNc(0,S,5,3,"div",37),2&h&&e.Q6J("ngIf",N.$implicit)}function Q(h,N){if(1&h){const s=e.EpF();e.TgZ(0,"div",17)(1,"div",18)(2,"div",19)(3,"div",20)(4,"span",21),e._uU(5,"API Category"),e.qZA(),e.TgZ(6,"p-dropdown",22),e.NdJ("onChange",function(p){e.CHM(s);const f=e.oxw();return f.tab.apiCategory=p.value,e.KtG(f.apiCategoryChangedEvent(!0))}),e.qZA()()()(),e.TgZ(7,"div",18),e.YNc(8,le,7,5,"div",23),e.qZA(),e.TgZ(9,"div",18),e.YNc(10,de,6,4,"div",23),e.qZA(),e.TgZ(11,"div",18)(12,"div",19)(13,"div",24)(14,"span",21),e._uU(15,"APIs"),e.qZA(),e.TgZ(16,"p-dropdown",25),e.NdJ("onChange",function(p){e.CHM(s);const f=e.oxw();return f.tab.api=p.value,e.KtG(f.selectAPI(!0))}),e.YNc(17,v,1,1,"ng-template",26),e.YNc(18,G,1,1,"ng-template",27),e.qZA()()()(),e.TgZ(19,"div",28)(20,"div",29)(21,"div",30)(22,"span"),e._UZ(23,"i",31),e._uU(24," APIs "),e.qZA()(),e.TgZ(25,"div",32)(26,"app-api-grid",33),e.NdJ("deleteAPIAddInBack",function(p){e.CHM(s);const f=e.oxw();return e.KtG(f.deleteAPIAddInBack(p))}),e.qZA()()()()()}if(2&h){const s=e.oxw();e.xp6(6),e.Q6J("options",s.apiCategories)("ngModel",s.tab.apiCategory)("filter",!0),e.xp6(2),e.Q6J("ngIf",s.tab.apiCategory.id===s.EAPICategory.INSTANCES),e.xp6(2),e.Q6J("ngIf",s.tab.apiCategory.id===s.EAPICategory.THIRD_PARTY_APIS),e.xp6(6),e.Q6J("options",s.tab.apiList)("ngModel",s.tab.api)("filter",!0),e.xp6(10),e.Q6J("rows",s.apiGridsRows)("mode","EVENT_TRIGGER_MODEL")}}let k=(()=>{class h{generalS;navigationCS;ns;authCS;instanceS;webSocketEventsS;ec;tpStoreApiVersionS;tpInstalledApisS;functionS;dataProviderS;cd;dataItem;subscriptions=[];tab={};apiCategories;loading={dropdown:!0};EAPICategory=A.R;apiDropdownGridC;apiGridsRows=[];apiGridSendData=new e.vpe;idCounter=0;constructor(s,a,p,f,pe,ge,ve,he,Ee,m,w,i){this.generalS=s,this.navigationCS=a,this.ns=p,this.authCS=f,this.instanceS=pe,this.webSocketEventsS=ge,this.ec=ve,this.tpStoreApiVersionS=he,this.tpInstalledApisS=Ee,this.functionS=m,this.dataProviderS=w,this.cd=i}ngOnInit(){var s=this;return(0,E.Z)(function*(){s.subscriptions.push(s.dataItem.eventChannel.subscribe(function(){var a=(0,E.Z)(function*(p){p&&(yield s.loadApiCategories(),s.cd.detectChanges())});return function(p){return a.apply(this,arguments)}}())),yield s.loadApiCategories()})()}showModal(){$("#idEventTriggerModal").modal("show")}hideModal(){$("#idEventTriggerModal").modal("hide"),this.generalS.resetUrlParams([g.p.at_category,g.p.at_instance,g.p.at_database,g.p.at_collection,g.p.at_bundleName,g.p.at_apiVersion,g.p.at_api])}loadApiCategories(){var s=this;return(0,E.Z)(function*(){const a=s.dataProviderS.getApiCategories();s.apiCategories=a.filter(f=>f.id!==A.R.SCHEDULERS&&f.id!==A.R.EVENTS&&f.id!==A.R.MIGRATION_SCRIPT&&f.id!==A.R.WEB_SOCKET_EVENT_CAN_USER_CONNECT_CODE&&f.id!==A.R.PROCESS_INITIALIZER&&f.id!==A.R.UTILITY_CLASS);const p=s.navigationCS.getQueryParam(g.p.at_category);p&&s.tab&&(s.tab.apiCategory=t.find(s.apiCategories,{id:p})),s.tab.apiCategory||(s.tab.apiCategory=s.apiCategories[0]),s.apiCategoryChangedEvent(!1),s.categorySelected(!1)})()}apiCategoryChangedEvent(s){var a=this;return(0,E.Z)(function*(){a.loading.dropdown=!0,a.resetDependentObjects("INSTANCE"),a.categorySelected(s),a.apiGridsRows=[],a.ec.eventTrigger.allApiIds=[],a.tab.apiCategory.id===A.R.INSTANCES?yield a.loadInstances(s):a.tab.apiCategory.id===A.R.THIRD_PARTY_APIS?yield a.loadLibraries(s):a.tab.apiCategory.id===A.R.CUSTOM_APIS?yield a.loadCustomAPIs(s):a.tab.apiCategory.id===A.R.SYSTEM_APIS?yield a.loadSystemAPIs(s):a.tab.apiCategory.id===A.R.WEB_SOCKET_EVENT_CAN_USER_CONNECT_CODE&&(yield a.loadWebSocketEventCanUserConnectCode(s)),a.apiDropdownGridC&&(a.apiDropdownGridC.rows=[],a.apiDropdownGridC.cd.detectChanges())})()}loadInstances(s){var a=this;return(0,E.Z)(function*(){a.resetDependentObjects("INSTANCE"),yield a.categorySelected(s),a.loading.dropdown=!0;try{a.tab.allInstances=(yield a.instanceS.query({find:{user:a.authCS.getUserId(),active:1},select:{name:1,active:1,user:1},sort:{name:1}}).toPromise()).data||[]}catch(f){a.ns.showErrorMessageFromErrorObject(f),a.tab.allInstances=[]}const p=a.navigationCS.getQueryParam(g.p.at_instance);p&&(a.tab.instance=t.find(a.tab.allInstances,{_id:p})),!a.tab.instance&&a.tab.allInstances.length&&(a.tab.instance=a.tab.allInstances[0]),yield a.loadDatabases(s),a.loading.dropdown=!1,a.cd.detectChanges()})()}loadDatabases(s){var a=this;return(0,E.Z)(function*(){if(a.loading.dropdown=!0,a.resetDependentObjects("DATABASE"),yield a.instanceSelected(s),!a.tab.instance)return a.tab.allDatabases=[],a.tab.allCollections=[],void(a.tab.apiList=[]);try{a.tab.allDatabases=((yield a.instanceS.getDatabases([a.tab.instance],null).toPromise()).data||[])[0]||[]}catch(f){a.ns.showErrorMessageFromErrorObject(f),a.tab.allDatabases=[]}const p=a.navigationCS.getQueryParam(g.p.at_database);p&&(a.tab.database=t.find(a.tab.allDatabases,{_id:p})),!a.tab.database&&a.tab.allDatabases.length&&(a.tab.database=a.tab.allDatabases[0]),yield a.loadCollections(s),a.loading.dropdown=!1})()}loadCollections(s){var a=this;return(0,E.Z)(function*(){if(a.loading.dropdown=!0,a.resetDependentObjects("COLLECTION"),yield a.databaseSelected(s),!a.tab.instance||!a.tab.database)return a.tab.allCollections=[],void(a.tab.apiList=[]);try{a.tab.allCollections=((yield a.instanceS.getCollections([a.tab.database],null).toPromise()).data||[])[0]||[]}catch(f){a.ns.showErrorMessageFromErrorObject(f),a.tab.allCollections=[]}const p=a.navigationCS.getQueryParam(g.p.at_collection);a.tab.collection=p?t.find(a.tab.allCollections,{_id:p}):a.tab.allCollections[0],yield a.loadInstanceAPIs(s),a.loading.dropdown=!1,a.cd.detectChanges()})()}loadInstanceAPIs(s){var a=this;return(0,E.Z)(function*(){if(a.loading.dropdown=!0,yield a.collectionSelected(s),!a.tab.instance||!a.tab.database||!a.tab.collection)return a.tab.apiList=[],void(a.loading.dropdown=!1);try{a.tab.apiList=(yield a.instanceS.instanceAPIList([a.tab.collection],void 0)).data||[]}catch(f){a.ns.showErrorMessageFromErrorObject(f),a.tab.apiList=[]}const p=a.navigationCS.getQueryParam(g.p.at_api);yield a.apiCommon(p)})()}loadLibraries(s){var a=this;return(0,E.Z)(function*(){a.resetDependentObjects("LIBRARY"),a.loading.dropdown=!0,a.tab.allApiBundles=yield a.tpStoreApiVersionS.getAllAPIBundles();const p=a.navigationCS.getQueryParam(g.p.at_bundleName);p&&(a.tab.tpApiBundle=t.find(a.tab.allApiBundles,{value:p})),!a.tab.tpApiBundle&&a.tab.allApiBundles.length&&(a.tab.tpApiBundle=a.tab.allApiBundles[0]),yield a.loadStoreApiVersions(s),a.loading.dropdown=!1,a.cd.detectChanges()})()}loadStoreApiVersions(s){var a=this;return(0,E.Z)(function*(){if(a.loading.dropdown=!0,a.resetDependentObjects("API_VERSION"),yield a.librarySelected(s),!a.tab.tpApiBundle)return a.tab.allStoreApiVersions=[],void(a.tab.apiList=[]);a.tab.allStoreApiVersions=yield a.tpStoreApiVersionS.getAllStoreApiVersions([a.tab.tpApiBundle.value]);const p=a.navigationCS.getQueryParam(g.p.at_bundleName),f=a.navigationCS.getQueryParam(g.p.at_apiVersion);f&&(a.tab.tpStoreApiVersion=t.find(a.tab.allStoreApiVersions,{apiBundleName:p,storeApiVersion:f})),!a.tab.tpStoreApiVersion&&a.tab.allStoreApiVersions.length&&(a.tab.tpStoreApiVersion=a.tab.allStoreApiVersions[0]),yield a.loadThirdPartyAPIs(s),a.loading.dropdown=!1,a.cd.detectChanges()})()}loadThirdPartyAPIs(s){var a=this;return(0,E.Z)(function*(){if(a.loading.dropdown=!0,yield a.tpApiVersionSelected(s),!a.tab.tpApiBundle||!a.tab.tpStoreApiVersion)return void(a.tab.apiList=[]);a.tab.apiList=(yield a.tpInstalledApisS.getThirdPartyAPIListArray([a.tab.tpStoreApiVersion]).toPromise()).data;const p=a.navigationCS.getQueryParam(g.p.at_api);yield a.apiCommon(p)})()}loadCustomAPIs(s){var a=this;return(0,E.Z)(function*(){a.loading.dropdown=!0;const p=yield a.functionS.getFunctionsAsAPI().toPromise();for(const pe of p.data)pe._id=a.idCounter++;p.success&&p.data&&p.data.length&&(a.tab.apiList=p.data||[]);const f=a.navigationCS.getQueryParam(g.p.custom_api);yield a.apiCommon(f)})()}loadSystemAPIs(s){var a=this;return(0,E.Z)(function*(){a.loading.dropdown=!0;const p=yield a.instanceS.systemAPIList().toPromise();p?.data?.length&&(a.tab.apiList=p.data||[]);const f=a.navigationCS.getQueryParam(g.p.system_api);yield a.apiCommon(f)})()}loadWebSocketEventCanUserConnectCode(s){var a=this;return(0,E.Z)(function*(){a.loading.dropdown=!0;const p=yield a.webSocketEventsS.loadWebSocketEventCanUserConnectCode().toPromise();p?.data?.length&&(a.tab.apiList=p.data||[]);const f=a.navigationCS.getQueryParam(g.p.web_socket_user_can_connect_api_list);yield a.apiCommon(f)})()}apiCommon(s){var a=this;return(0,E.Z)(function*(){a.tab.apiList.unshift({id:"SelectAPI",name:""});const p=t.keyBy(a.tab.apiList,T.iH._id);for(const f of a.ec.eventTrigger.allApiIds)p[f]&&a.tab.apiList.splice(a.tab.apiList.indexOf(p[f]),1);a.tab.api=a.tab.apiList[0],a.loading.dropdown=!1,a.cd.detectChanges()})()}selectAPI(s){var a=this;return(0,E.Z)(function*(){if(s){if("SelectAPI"===a.tab.api.id)return;a.tab.api.apiCategory=a.tab.apiCategory.id,a.apiGridsRows.push(a.tab.api),a.ec.eventTrigger.allApiIds.push(a.tab.api._id),a.ns.showSuccess("API added successfully.!!"),a.tab.apiList=a.tab.apiList.filter(p=>p._id!==a.tab.api._id)}a.tab.api={id:"SelectAPI",name:""}})()}deleteAPIAddInBack(s){(this.tab.apiCategory.id===A.R.INSTANCES&&s.instanceName===this.tab.instance.name&&s.databaseName===this.tab.database.db&&s.collectionName===this.tab.collection.name||this.tab.apiCategory.id===A.R.SYSTEM_APIS||this.tab.apiCategory.id===A.R.CUSTOM_APIS||this.tab.apiCategory.id===A.R.THIRD_PARTY_APIS&&this.tab.tpApiBundle.name===s.bundleName&&this.tab.tpStoreApiVersion.storeApiVersion===s.apiVersion)&&this.tab.apiList.push(s)}categorySelected(s){var a=this;return(0,E.Z)(function*(){a.tab.apiCategory&&(yield a.navigationCS.setQueryParam(g.p.at_category,a.tab.apiCategory.id),s&&(yield a.generalS.resetUrlParams([g.p.at_instance,g.p.at_database,g.p.at_collection,g.p.at_bundleName,g.p.at_apiVersion,g.p.at_api])))})()}resetDependentObjects(s){"INSTANCE"===s?(this.tab.allInstances=this.tab.allDatabases=this.tab.allCollections=this.tab.apiList=[],this.tab.instance=this.tab.database=this.tab.collection=this.tab.api=void 0):"DATABASE"===s?(this.tab.allDatabases=this.tab.allCollections=this.tab.apiList=[],this.tab.database=this.tab.collection=this.tab.api=void 0):"COLLECTION"===s?(this.tab.allCollections=this.tab.apiList=[],this.tab.collection=this.tab.api=void 0):"LIBRARY"===s?(this.tab.allApiBundles=this.tab.allStoreApiVersions=this.tab.apiList=[],this.tab.tpApiBundle=this.tab.api=this.tab.tpStoreApiVersion=void 0):"API_VERSION"===s&&(this.tab.allStoreApiVersions=this.tab.apiList=[],this.tab.tpStoreApiVersion=this.tab.api=void 0)}instanceSelected(s){var a=this;return(0,E.Z)(function*(){a.tab.instance&&a.tab.instance._id&&(yield a.navigationCS.setQueryParam(g.p.at_instance,a.tab.instance._id),s&&(yield a.generalS.resetUrlParams([g.p.at_database,g.p.at_collection,g.p.at_api])))})()}databaseSelected(s){var a=this;return(0,E.Z)(function*(){a.tab.database&&a.tab.database._id&&(yield a.navigationCS.setQueryParam(g.p.at_database,a.tab.database._id),s&&(yield a.generalS.resetUrlParams([g.p.at_collection,g.p.at_api])))})()}collectionSelected(s){var a=this;return(0,E.Z)(function*(){a.tab.collection&&a.tab.collection._id&&(yield a.navigationCS.setQueryParam(g.p.at_collection,a.tab.collection._id),s&&(yield a.generalS.resetUrlParams([g.p.at_api])))})()}librarySelected(s){var a=this;return(0,E.Z)(function*(){a.tab.tpApiBundle&&a.tab.tpApiBundle.value&&(yield a.navigationCS.setQueryParam(g.p.at_bundleName,a.tab.tpApiBundle.value),s&&(yield a.generalS.resetUrlParams([g.p.at_apiVersion,g.p.at_api])))})()}tpApiVersionSelected(s){var a=this;return(0,E.Z)(function*(){a.tab.tpStoreApiVersion&&a.tab.tpStoreApiVersion._id&&(yield a.navigationCS.setQueryParam(g.p.at_apiVersion,a.tab.tpStoreApiVersion._id),s&&(yield a.generalS.resetUrlParams([g.p.at_api])))})()}apiGridSend(){const s=[];for(const a of this.apiGridsRows)this.tab.apiCategory.id===A.R.INSTANCES?s.push({apiCategory:A.R.INSTANCES,instanceName:a.instanceName,databaseName:a.databaseName,collectionName:a.collectionName,instanceApiName:a.id,nameUI:R.n4[a.id],_id:this.generalS.generateMongoObjectId()}):this.tab.apiCategory.id===A.R.CUSTOM_APIS?s.push({apiCategory:A.R.CUSTOM_APIS,customApiName:a.customApiName,_id:this.generalS.generateMongoObjectId()}):this.tab.apiCategory.id===A.R.SYSTEM_APIS?s.push({apiCategory:A.R.SYSTEM_APIS,systemApiName:a.id,_id:this.generalS.generateMongoObjectId()}):this.tab.apiCategory.id===A.R.THIRD_PARTY_APIS&&s.push({apiCategory:A.R.THIRD_PARTY_APIS,tpInstalledApiBundleName:a.bundleName,tpInstalledApiVersion:a.apiVersion,tpInstalledApiName:a.name,_id:this.generalS.generateMongoObjectId()});this.apiGridSendData.emit(s),this.hideModal()}static \u0275fac=function(a){return new(a||h)(e.Y36(U.b),e.Y36(K.S),e.Y36(q.W),e.Y36(ae.D),e.Y36(j.E),e.Y36(z.a),e.Y36(te.u),e.Y36(ne.f),e.Y36(O.d),e.Y36(W.d),e.Y36(I.B),e.Y36(e.sBO))};static \u0275cmp=e.Xpm({type:h,selectors:[["app-event-trigger-modal"]],viewQuery:function(a,p){if(1&a&&e.Gf(re,5),2&a){let f;e.iGM(f=e.CRH())&&(p.apiDropdownGridC=f.first)}},inputs:{dataItem:"dataItem"},outputs:{apiGridSendData:"apiGridSendData"},decls:23,vars:5,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idEventTriggerModal","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-xl"],[1,"modal-content"],[1,"modal-header"],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],[1,"float-right"],["href","https://docs.apimaker.dev/v1/docs/apis-all/events/user-created-events-api.html#triggers","target","_blank"],[1,"fa-fw","mr-1","mt-n1",2,"font-size","25px",3,"src"],["aria-label","Close","type","button",1,"close",3,"click"],["aria-hidden","true"],[1,"fas","fa-window-close"],["class","modal-body overflow-auto p-0","style","height: calc(100vh - 110px);",4,"ngIf"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary",3,"click"],[1,"fas","fa-times","text-danger","fa-fw"],["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"],[1,"modal-body","overflow-auto","p-0",2,"height","calc(100vh - 110px)"],[1,"container","mt-3"],[1,"row"],[1,"col-4"],[1,"small"],["optionLabel","name","filterBy","name","appendTo","body","styleClass","w-100 p-input-filled",3,"options","ngModel","filter","onChange"],["class","row",4,"ngIf"],[1,"col-8"],["optionLabel","name","filterBy","name","appendTo","body","styleClass","w-100 p-input-filled fix-height-issue",3,"options","ngModel","filter","onChange"],["pTemplate","item"],["pTemplate","selectedItem"],[1,"row","ml-0","mr-0","mt-4"],[1,"card","shadow-sm","h-100","w-100","p-3"],[1,"card-header"],[1,"fas","fa-table","text-yellow","fa-fw","mr-1"],[1,"card-body","h-100","p-0"],[1,"w-100",3,"rows","mode","deleteAPIAddInBack"],["class","col-4",4,"ngIf"],["optionLabel","db","filterBy","db","appendTo","body","styleClass","w-100 p-input-filled",3,"options","ngModel","filter","onChange"],["optionLabel","displayText","filterBy","displayText","appendTo","body","styleClass","w-100 p-input-filled",3,"options","ngModel","filter","onChange"],[4,"ngIf"],["class","small text-success italic",4,"ngIf"],["class","small text-info italic",4,"ngIf"],[1,"small","text-success","italic"],[1,"small","text-info","italic"]],template:function(a,p){1&a&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span"),e._UZ(5,"i",4),e._uU(6," Event Trigger"),e.qZA(),e.TgZ(7,"div",5)(8,"a",6),e._UZ(9,"img",7),e.ALo(10,"themeIcon"),e.qZA(),e.TgZ(11,"button",8),e.NdJ("click",function(){return p.hideModal()}),e.TgZ(12,"span",9),e._UZ(13,"i",10),e.qZA()()()(),e.YNc(14,Q,27,10,"div",11),e.TgZ(15,"div",12)(16,"button",13),e.NdJ("click",function(){return p.hideModal()}),e._UZ(17,"i",14),e._uU(18," Close"),e.qZA(),e.TgZ(19,"button",15),e.NdJ("click",function(){return p.apiGridSend()}),e._UZ(20,"i",16),e.TgZ(21,"span"),e._uU(22,"Save"),e.qZA()()()()()()),2&a&&(e.xp6(9),e.Q6J("src",e.lcZ(10,3,"/assets/images/logo/logo_docs.svg"),e.LSH),e.xp6(5),e.Q6J("ngIf",p.tab),e.xp6(5),e.Q6J("disabled",!p.apiGridsRows.length))},dependencies:[Z.JJ,Z.On,x.O5,F.y,B.jx,X.Lt,J.u,oe.w],encapsulation:2,changeDetection:0})}return h})()},5305:(Se,ee,o)=>{o.d(ee,{N:()=>Ee});var E=o(15861),e=o(94946),t=o(33157),L=o(90328),g=o(56212),T=o(6990),R=o(45085),U=o(51162),K=o(96925),q=o(67145),ae=o(77240),j=o(99961),z=o(92189),te=o(95852),ne=o(27414),O=o(32915),W=o(25405),I=o(77664),Z=o(85219),x=o(60095),F=o(96814),B=o(95431),X=o(97680),J=o(33259),oe=o(38057),re=o(13241),ie=o(44879);const se=["eventManFormC"];function le(m,w){if(1&m){const i=e.EpF();e.TgZ(0,"span",18),e.NdJ("click",function(){e.CHM(i);const u=e.oxw(2);return e.KtG(u.toggleTreeView())}),e._UZ(1,"i",19),e.qZA()}}function ce(m,w){if(1&m){const i=e.EpF();e.TgZ(0,"span",20),e.NdJ("click",function(){e.CHM(i);const u=e.oxw(2);return e.KtG(u.edit())}),e._UZ(1,"i",21),e.qZA()}}function de(m,w){if(1&m){const i=e.EpF();e.TgZ(0,"span",22),e.NdJ("click",function(){e.CHM(i);const u=e.oxw(2);return e.KtG(u.clone())}),e._UZ(1,"i",23),e.qZA()}}function _e(m,w){if(1&m){const i=e.EpF();e.TgZ(0,"span",24),e.NdJ("click",function(){e.CHM(i);const u=e.oxw(2);return e.KtG(u.removePermanentDialog())}),e._UZ(1,"i",25),e.qZA()}if(2&m){const i=e.oxw(2);e.Q6J("pTooltip",i.selectedRows.length>1?"Permanent Delete ("+i.selectedRows.length+" selected)":"Permanent Delete")}}function D(m,w){if(1&m){const i=e.EpF();e.TgZ(0,"span")(1,"span",12),e.NdJ("click",function(){e.CHM(i);const u=e.oxw();return e.KtG(u.add())}),e._UZ(2,"i",13),e.qZA(),e.YNc(3,le,2,0,"span",14),e.YNc(4,ce,2,0,"span",15),e.YNc(5,de,2,0,"span",16),e.YNc(6,_e,2,1,"span",17),e.qZA()}if(2&m){const i=e.oxw();e.xp6(3),e.Q6J("ngIf",i.rows.length),e.xp6(1),e.Q6J("ngIf",i.selectedRows.length),e.xp6(1),e.Q6J("ngIf",i.selectedRows.length),e.xp6(1),e.Q6J("ngIf",i.selectedRows.length>=1)}}function V(m,w){if(1&m){const i=e.EpF();e.TgZ(0,"span",26)(1,"p-checkbox",27),e.NdJ("ngModelChange",function(u){e.CHM(i);const P=e.oxw();return e.KtG(P.eventCenterS.group.apisRegex.allEvents=u)}),e.qZA()()}if(2&m){const i=e.oxw();e.xp6(1),e.Q6J("ngModel",i.eventCenterS.group.apisRegex.allEvents)("binary",!0)}}function v(m,w){if(1&m){const i=e.EpF();e.TgZ(0,"span",26)(1,"p-checkbox",27),e.NdJ("ngModelChange",function(u){e.CHM(i);const P=e.oxw();return e.KtG(P.eventCenterS.filterInLog.apisRegex.allEvents=u)}),e.qZA()()}if(2&m){const i=e.oxw();e.xp6(1),e.Q6J("ngModel",i.eventCenterS.filterInLog.apisRegex.allEvents)("binary",!0)}}function y(m,w){if(1&m&&(e.TgZ(0,"div")(1,"div",28),e._uU(2),e.qZA()()),2&m){const i=e.oxw();e.xp6(2),e.Oqu(i.constantsS.group.allAmEventsPermitted)}}function _(m,w){1&m&&(e.TgZ(0,"th",37),e._UZ(1,"p-tableHeaderCheckbox"),e.qZA())}function S(m,w){1&m&&e._UZ(0,"th",38)}function G(m,w){1&m&&e._UZ(0,"th")}function Q(m,w){1&m&&e._UZ(0,"th",39)}function k(m,w){if(1&m&&(e.TgZ(0,"tr"),e.YNc(1,_,2,0,"th",34),e.YNc(2,S,1,0,"th",35),e.TgZ(3,"th"),e._uU(4,"Name"),e.qZA(),e.YNc(5,G,1,0,"th",6),e.YNc(6,Q,1,0,"th",36),e.qZA()),2&m){const i=e.oxw(2);e.xp6(1),e.Q6J("ngIf",i.showCheckbox),e.xp6(1),e.Q6J("ngIf",!i.isDependentOnGroup&&!i.isLPM&&!i.isFilterLogTable),e.xp6(3),e.Q6J("ngIf",i.isLPM),e.xp6(1),e.Q6J("ngIf",!i.isDependentOnGroup&&!i.isLPM&&!i.isFilterLogTable)}}function h(m,w){if(1&m&&(e.TgZ(0,"td"),e._UZ(1,"p-tableCheckbox",44),e.qZA()),2&m){const i=e.oxw().$implicit;e.xp6(1),e.Q6J("value",i)("pSelectableRow",i)}}function N(m,w){if(1&m&&(e.TgZ(0,"td",45)(1,"span"),e._uU(2),e.qZA()()),2&m){const i=e.oxw().rowIndex;e.xp6(2),e.Oqu(i+1)}}function s(m,w){if(1&m){const i=e.EpF();e.TgZ(0,"i",46),e.NdJ("click",function(u){e.CHM(i);const P=e.oxw().$implicit,Y=e.oxw(2);return e.KtG(Y.copyValue(u,P.name))}),e.qZA()}}function a(m,w){if(1&m){const i=e.EpF();e.TgZ(0,"div")(1,"label",47)(2,"p-checkbox",48),e.NdJ("ngModelChange",function(){e.CHM(i);const u=e.oxw(2).$implicit,P=e.oxw(2);return e.KtG(P.checkedChangeGridItem(u))})("ngModelChange",function(u){e.CHM(i);const P=e.oxw(2).$implicit;return e.KtG(P.saveResponseInLog=u)}),e.qZA()()()}if(2&m){const i=e.oxw(2).$implicit;e.xp6(2),e.Q6J("ngModel",i.saveResponseInLog)("binary",!0)}}function p(m,w){if(1&m&&(e.TgZ(0,"td"),e.YNc(1,a,3,2,"div",6),e.qZA()),2&m){const i=e.oxw().$implicit,d=e.oxw(2);e.xp6(1),e.Q6J("ngIf",d.selectedRows.indexOf(i)>=0)}}function f(m,w){if(1&m){const i=e.EpF();e.TgZ(0,"i",50),e.NdJ("click",function(u){e.CHM(i);const P=e.oxw(2).$implicit;e.oxw(2);const Y=e.MAs(17);return e.KtG(Y.save(P,u))}),e.qZA()}}function pe(m,w){if(1&m&&(e.TgZ(0,"td")(1,"div",45),e.YNc(2,f,1,0,"i",49),e.qZA()()),2&m){const i=e.oxw().$implicit,d=e.oxw(2);e.xp6(2),e.Q6J("ngIf",d.selectedRows.indexOf(i)>-1)}}function ge(m,w){if(1&m&&(e.TgZ(0,"tr",40),e.YNc(1,h,2,2,"td",6),e.YNc(2,N,3,1,"td",41),e.TgZ(3,"td")(4,"span",42)(5,"span"),e._uU(6),e.qZA(),e.YNc(7,s,1,0,"i",43),e.qZA()(),e.YNc(8,p,2,1,"td",6),e.YNc(9,pe,3,1,"td",6),e.qZA()),2&m){const i=w.$implicit,d=e.oxw(2);e.Q6J("pSelectableRow",i),e.xp6(1),e.Q6J("ngIf",d.showCheckbox),e.xp6(1),e.Q6J("ngIf",!d.isDependentOnGroup&&!d.isLPM&&!d.isFilterLogTable),e.xp6(4),e.Oqu(i.name),e.xp6(1),e.Q6J("ngIf",i.name),e.xp6(1),e.Q6J("ngIf",d.isLPM),e.xp6(1),e.Q6J("ngIf",!d.isDependentOnGroup&&!d.isLPM&&!d.isFilterLogTable)}}function ve(m,w){1&m&&e._UZ(0,"p-progressSpinner",51)}function he(m,w){if(1&m){const i=e.EpF();e.TgZ(0,"div",29)(1,"p-table",30),e.NdJ("selectionChange",function(u){e.CHM(i);const P=e.oxw();return e.KtG(P.selectedRows=u)})("selectionChange",function(){e.CHM(i);const u=e.oxw();return e.KtG(u.functionSelected())})("dblclick",function(){e.CHM(i);const u=e.oxw();return e.KtG(u.dblClickEvent())}),e.YNc(2,k,7,4,"ng-template",31),e.YNc(3,ge,10,7,"ng-template",32),e.qZA(),e.YNc(4,ve,1,0,"p-progressSpinner",33),e.qZA()}if(2&m){const i=e.oxw();e.xp6(1),e.Q6J("selectionMode","multiple")("metaKeySelection",i.metaKeySelection)("selection",i.selectedRows)("dataKey",i.gridKey)("scrollable",!0)("value",i.rows),e.xp6(3),e.Q6J("ngIf",i.loading.grid)}}let Ee=(()=>{class m{amEventS;generalS;notificationS;navigationCS;authCS;constantsS;cd;eventCenterS;eventCenterCS;router;confirmationService;isReadOnly=!1;showCheckbox=!0;isDependentOnGroup=!1;isLPM=!1;isFilterLogTable=!1;metaKeySelection=!0;loading={grid:!1};subscriptions=[];data={mode:L.D.ADD,eventChannel:new e.vpe,formData:void 0};rows=[];rowsMap={};rowsMapName={};showAll=!1;selectedRows=[];gridKey=U.iH._id;treeNodes=[];eventManFormC;EAPICategory=R.R;ERequestMethod=K.Yp;constructor(i,d,u,P,Y,H,me,ue,ye,be,Ie){this.amEventS=i,this.generalS=d,this.notificationS=u,this.navigationCS=P,this.authCS=Y,this.constantsS=H,this.cd=me,this.eventCenterS=ue,this.eventCenterCS=ye,this.router=be,this.confirmationService=Ie}ngOnInit(){var i=this;this.loadGridData(),this.subscriptions.push(this.data.eventChannel.subscribe(d=>{(d.action===t.F.SAVED||d.action===t.F.UPDATED)&&(this.eventManFormC.hideModal(),this.loadGridData())})),this.isDependentOnGroup&&this.subscriptions.push(this.eventCenterS.group.selectedGroups.subscribe(function(){var d=(0,E.Z)(function*(u){u.length&&(yield i.loadGridData())});return function(u){return d.apply(this,arguments)}}())),(this.isFilterLogTable||this.isLPM)&&this.subscriptions.push(this.eventCenterS.filterInLog.refreshGrid.subscribe(d=>{d&&this.loadGridData()})),this.generalS.setNewTitle("Events")}loadGridData(){var i=this;return(0,E.Z)(function*(){i.loading.grid=!0;try{const d={find:{user:i.authCS.getUserId(),active:!0},select:{name:1,eventListeners:1,active:1},sort:{name:1}};i.showAll&&delete d.find.active;const u=yield i.amEventS.query(d).toPromise();u.success?(i.selectedRows=[],i.rows=u.data||[],i.rowsMap=T.keyBy(i.rows,U.iH._id),i.rowsMapName=T.keyBy(i.rows,U.l0.name)):i.resetGridAndUrl();const P=i.navigationCS.getQueryParam(g.p.am_events)||(i.isFilterLogTable?i.eventCenterS.filterInLog.eventIds.value.join(","):i.eventCenterS.group.eventIds.value.join(","))||(i.isDependentOnGroup&&i.eventCenterS.group.selectedGroups.value[0]?.queryParams?.eventNames?i.eventCenterS.group.selectedGroups.value[0]?.queryParams.eventNames.join(","):"");if(P){const Y=P.split(","),H=T.intersection(T.keys(i.rowsMap),Y),me=[];for(const ue of H)i.rowsMap[ue]&&me.push(i.rowsMap[ue]);i.selectedRows=me,i.eventCenterS.amEvents.selectedEvents.next(me),i.eventCenterS.group.eventIds.next(H),i.eventCenterS.filterInLog.eventIds.next(H)}if(i.isLPM&&i.eventCenterS.group.selectedGroups.value[0]?.queryParams?.eventNames?.length){const Y=i.eventCenterS.group.selectedGroups.value[0];for(const H of Y?.queryParams?.eventNames)i.rowsMapName[H]&&(i.rowsMapName[H].saveResponseInLog=Y.eventLog?.[H]?.saveResponseInLog||!1);i.setResDataInEventCenter()}}catch(d){console.log(d)}i.loading.grid=!1,i.cd.detectChanges()})()}setResDataInEventCenter(){this.isDependentOnGroup&&(this.eventCenterS.group.eventsApis.next(this.selectedRows),this.eventCenterS.group.selectedEvents.next(this.selectedRows)),this.isFilterLogTable&&this.eventCenterS.filterInLog.eventsApis.next(this.selectedRows)}add(){this.data.formData=void 0,this.data.mode=L.D.ADD,this.data.eventChannel.emit({action:t.F.OPEN_FORM_IN_ADD_MODE}),this.eventManFormC.showModal()}edit(){this.selectedRows[0]&&(this.data.formData=this.selectedRows[0],this.data.mode=L.D.EDIT,this.data.eventChannel.emit({action:t.F.OPEN_FORM_IN_EDIT_MODE}),this.eventManFormC.showModal())}clone(){var i=this;return(0,E.Z)(function*(){try{if(!i.selectedRows[0])return;const d=(yield i.amEventS.getById(i.selectedRows[0]._id).toPromise()).data;delete d._id,delete d.guid,d.name=`event-${Math.random().toString().substr(2,6)}`,(yield i.amEventS.post(d).toPromise()).success?(i.notificationS.showSuccess(i.constantsS.amEvents.cloneSuccess),i.loadGridData()):i.notificationS.showSuccess(i.constantsS.amEvents.cloneSuccess)}catch{i.notificationS.showError(i.constantsS.amEvents.cloneError)}})()}removePermanentDialog(){var i=this;return(0,E.Z)(function*(){var d;i.selectedRows.length>1?i.removePermanentBulkDialog():i.confirmationService.confirm({message:i.constantsS.amEvents.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(d=(0,E.Z)(function*(){yield i.removePermanent()}),function(){return d.apply(this,arguments)})})})()}removePermanent(){var i=this;return(0,E.Z)(function*(){i.loading.grid=!0;const d=yield i.amEventS.permanentDelete(i.selectedRows[0]._id).toPromise();i.loading.grid=!1,d.success?(i.notificationS.showSuccess(i.constantsS.amEvents.removePermanent),i.resetGridAndUrl(),i.loadGridData(),i.selectedRows=[]):i.notificationS.showErrorFromResponse(d,i.constantsS.amEvents.removePermanentError)})()}removePermanentBulkDialog(){var d,i=this;this.selectedRows.length<2||this.confirmationService.confirm({message:this.constantsS.amEvents.removePermanentBulkConfirm(this.selectedRows.length),header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(d=(0,E.Z)(function*(){yield i.removePermanentBulk()}),function(){return d.apply(this,arguments)})})}removePermanentBulk(){var i=this;return(0,E.Z)(function*(){if(i.selectedRows.length<2)return;i.loading.grid=!0;const d=i.selectedRows;try{const P=(yield Promise.all(d.map(Y=>i.amEventS.permanentDelete(Y._id).toPromise()))).filter(Y=>!Y.success).length;0===P?i.notificationS.showSuccess(i.constantsS.amEvents.removePermanentBulk(d.length)):i.notificationS.showError(P<d.length?`${d.length-P} of ${d.length} events removed. ${P} failed.`:i.constantsS.amEvents.removePermanentBulkError),i.resetGridAndUrl(),i.loadGridData()}catch{i.notificationS.showError(i.constantsS.amEvents.removePermanentBulkError)}i.loading.grid=!1})()}resetDependents(){var i=this;return(0,E.Z)(function*(){i.eventCenterS.amEvents.selectedEvents.next([]),yield i.navigationCS.setQueryParam(g.p.am_events,null)})()}functionSelected(){var i=this;return(0,E.Z)(function*(){setTimeout(()=>{i.resetDependents();for(const d of i.rows)-1===i.selectedRows.indexOf(d)&&(d.saveResponseInLog=!1);i.fillData(),i.selectedRows?.[0]?.eventListeners?.[0]?.name?i.generalS.setNewTitle(i.selectedRows[0].eventListeners[0].name,R.R.EVENTS):i.generalS.setNewTitle("Events")},100)})()}resetGridAndUrl(){this.rows=[],this.selectedRows=[],this.rowsMap={},this.rowsMapName={},this.eventCenterS.amEvents.selectedEvents.next([])}fillData(){var i=this;return(0,E.Z)(function*(){if(!i.selectedRows.length)return i.eventCenterS.amEvents.selectedEvents.next([]),void(yield i.navigationCS.setQueryParam(g.p.am_events,""));if(i.isDependentOnGroup||i.isFilterLogTable)i.eventCenterS.group.eventIds.next(T.map(i.selectedRows,"_id")),i.eventCenterS.group.eventsApis.next(i.selectedRows),i.isFilterLogTable&&(i.eventCenterS.filterInLog.eventIds.next(T.map(i.selectedRows,"_id")),i.eventCenterS.filterInLog.eventsApis.next(i.selectedRows));else{const d=(yield i.amEventS.getById(i.selectedRows[0]._id).toPromise()).data;d._id?(yield i.navigationCS.setQueryParam(g.p.am_events,d._id),i.eventCenterS.amEvents.selectedEvents.next([d])):i.resetDependents()}})()}checkedChangeGridItem(i){var d=this;setTimeout((0,E.Z)(function*(){d.selectedRows.push(i),d.selectedRows=T.uniq(d.selectedRows);for(const u in d.rowsMap){const P=d.rowsMap[u];-1===d.selectedRows.indexOf(P)&&(P.saveResponseInLog=!1)}d.setResDataInEventCenter(),d.cd.detectChanges()}),100)}toggleTreeView(){var i=this;return(0,E.Z)(function*(){i.router.navigate(["api-info","am-events","layout-tree"])})()}copyValue(i,d){var u=this;return(0,E.Z)(function*(){i.stopPropagation(),d&&((yield u.generalS.copyToClipboard(d))?u.notificationS.showSuccess(`Copied "${d}" to clipboard.`):u.notificationS.showError("Unable to copy to clipboard."))})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}dblClickEvent(){this.selectedRows.length&&this.edit()}static \u0275fac=function(d){return new(d||m)(e.Y36(q.l),e.Y36(ae.b),e.Y36(j.W),e.Y36(z.S),e.Y36(te.D),e.Y36(ne.L),e.Y36(e.sBO),e.Y36(O.u),e.Y36(W.M),e.Y36(I.F0),e.Y36(Z.YP))};static \u0275cmp=e.Xpm({type:m,selectors:[["app-events-grid"]],viewQuery:function(d,u){if(1&d&&e.Gf(se,5),2&d){let P;e.iGM(P=e.CRH())&&(u.eventManFormC=P.first)}},inputs:{isReadOnly:["IsReadOnly","isReadOnly"],showCheckbox:"showCheckbox",isDependentOnGroup:["IsDependentOnGroup","isDependentOnGroup"],isLPM:"isLPM",isFilterLogTable:"isFilterLogTable",metaKeySelection:"metaKeySelection"},decls:18,vars:13,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],["alt","Events",1,"fa-fw","mr-1",3,"src"],[1,"float-right"],["href","https://docs.apimaker.dev/v1/docs/apis-all/events/user-created-events-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","pTooltip","All Events",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["class","h-100",4,"ngIf"],[3,"id","data"],["eventManFormC",""],["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",3,"click",4,"ngIf"],["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","tooltipPosition","left",3,"pTooltip","click",4,"ngIf"],[1,"float-right","cursor-pointer","ml-3",3,"click"],["pTooltip","Tree View",1,"fas","fa-sitemap","text-yellow","fa-fw","fa-rotate-270"],["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"],["tooltipPosition","left",1,"float-right","cursor-pointer","ml-3",3,"pTooltip","click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],["pTooltip","All Events",1,"float-right","cursor-pointer"],[3,"ngModel","binary","ngModelChange"],[1,"p-2","text-center","text-success"],[1,"h-100"],["styleClass","p-datatable-striped events-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: 80px;",4,"ngIf"],["style","width: 65px;",4,"ngIf"],[2,"width","45px"],[2,"width","80px"],[2,"width","65px"],[3,"pSelectableRow"],["class","text-center",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"],[1,"text-center"],["pTooltip","Copy name","tooltipPosition","top",1,"fas","fa-copy","fa-fw","ml-2","cursor-pointer","text-muted","copy-icon",3,"click"],[1,"m-0","vertical-align-sub"],["label","Save Response In Log",3,"ngModel","binary","ngModelChange"],["class","fas fa-save text-success fa-fw cursor-pointer","pTooltip","Save",3,"click",4,"ngIf"],["pTooltip","Save",1,"fas","fa-save","text-success","fa-fw","cursor-pointer",3,"click"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(d,u){1&d&&(e.TgZ(0,"div",0)(1,"div",1)(2,"span"),e._UZ(3,"img",2),e.ALo(4,"themeIcon"),e._uU(5," Events"),e.qZA(),e.TgZ(6,"div",3)(7,"a",4),e._UZ(8,"img",5),e.ALo(9,"themeIcon"),e.qZA()(),e.YNc(10,D,7,4,"span",6),e.YNc(11,V,2,2,"span",7),e.YNc(12,v,2,2,"span",7),e.qZA(),e.TgZ(13,"div",8),e.YNc(14,y,3,1,"div",6),e.YNc(15,he,5,7,"div",9),e.qZA()(),e._UZ(16,"app-w-event-man-form",10,11)),2&d&&(e.xp6(3),e.Q6J("src",e.lcZ(4,9,"/assets/images/icons/event.svg"),e.LSH),e.xp6(5),e.Q6J("src",e.lcZ(9,11,"/assets/images/logo/logo_docs.svg"),e.LSH),e.xp6(2),e.Q6J("ngIf",!u.isReadOnly),e.xp6(1),e.Q6J("ngIf",u.isDependentOnGroup),e.xp6(1),e.Q6J("ngIf",u.isFilterLogTable),e.xp6(2),e.Q6J("ngIf",u.eventCenterS.group.apisRegex.allEvents||u.eventCenterS.filterInLog.apisRegex.allEvents),e.xp6(1),e.Q6J("ngIf",!(u.eventCenterS.group.apisRegex.allEvents||u.eventCenterS.filterInLog.apisRegex.allEvents)),e.xp6(1),e.Q6J("id","idEventFormGrid")("data",u.data))},dependencies:[x.JJ,x.On,F.O5,B.iA,Z.jx,B.Ei,B.UA,B.Mo,X.G,J.u,oe.XZ,re.a,ie.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 m})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[8266],{58266:(gt,b,s)=>{s.r(b),s.d(b,{DatabasesMigrationM:()=>it});var f=s(77664),x=s(17017),D=s(63726),t=s(94946),r=s(15861),d=s(6990),g=s(33157),h=s(90328),p=s(56212),v=s(51162),w=s(45085),Z=s(60921),T=s(90602),P=s(77240),M=s(99961),A=s(92189),E=s(95852),C=s(27414),R=s(32915),k=s(33835),I=s(53429),_=s(85219),U=s(96814),m=s(95431),L=s(97680),F=s(33259),N=s(96522),J=s(44879);const Y=["databasesMigrationFormC"];function Q(n,l){if(1&n){const e=t.EpF();t.TgZ(0,"span",19),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.playAll())}),t._UZ(1,"i",20),t.qZA()}}function G(n,l){if(1&n){const e=t.EpF();t.TgZ(0,"span",21),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.markAll())}),t._UZ(1,"i",22),t.qZA()}}function O(n,l){if(1&n){const e=t.EpF();t.TgZ(0,"span",23),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.edit())}),t._UZ(1,"i",24),t.qZA()}}function B(n,l){if(1&n){const e=t.EpF();t.TgZ(0,"span",25),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.clone())}),t._UZ(1,"i",26),t.qZA()}}function H(n,l){if(1&n){const e=t.EpF();t.TgZ(0,"span",27),t.NdJ("click",function(){t.CHM(e);const a=t.oxw();return t.KtG(a.removePermanentDialog())}),t._UZ(1,"i",28),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("pTooltip",e.selectedRows.length>1?"Permanent Delete ("+e.selectedRows.length+" selected)":"Permanent Delete")}}function K(n,l){1&n&&(t.TgZ(0,"th",32),t._UZ(1,"p-tableHeaderCheckbox"),t.qZA())}function $(n,l){if(1&n&&(t.TgZ(0,"tr"),t.YNc(1,K,2,0,"th",29),t._UZ(2,"th",30),t.TgZ(3,"th",31),t._uU(4,"Order"),t.qZA(),t.TgZ(5,"th"),t._uU(6,"Name"),t.qZA(),t.TgZ(7,"th"),t._uU(8,"Label"),t.qZA(),t._UZ(9,"th",31)(10,"th",31),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.showCheckbox)}}function j(n,l){if(1&n&&(t.TgZ(0,"td"),t._UZ(1,"p-tableCheckbox",41),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("value",e)("pSelectableRow",e)}}function W(n,l){1&n&&t._UZ(0,"i",42)}const z=function(){return["/api-info/api-testing/testing"]},X=function(n,l,e){return{at_category:n,at_user:l,at_api:e}};function q(n,l){if(1&n){const e=t.EpF();t.TgZ(0,"tr",33),t.YNc(1,j,2,2,"td",34),t.TgZ(2,"td"),t.YNc(3,W,1,0,"i",35),t.qZA(),t.TgZ(4,"td"),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")(11,"div",36)(12,"button",37),t.NdJ("click",function(){const o=t.CHM(e).$implicit,c=t.oxw();return t.KtG(c.playSingle(o))}),t._UZ(13,"i",38),t.qZA()()(),t.TgZ(14,"td")(15,"div",36)(16,"a",39),t.NdJ("click",function(a){return a.stopPropagation()}),t._UZ(17,"i",40),t.qZA()()()()}if(2&n){const e=l.$implicit,i=t.oxw();t.Q6J("pSelectableRow",e),t.xp6(1),t.Q6J("ngIf",i.showCheckbox),t.xp6(2),t.Q6J("ngIf",e.isScriptExecutedCalculated),t.xp6(2),t.Oqu(e.order),t.xp6(2),t.Oqu(e.name),t.xp6(2),t.Oqu(e.label),t.xp6(7),t.Q6J("routerLink",t.DdM(8,z))("queryParams",t.kEZ(9,X,i.EAPICategory.MIGRATION_SCRIPT,i.authCS.getUserId(),e._id))}}function V(n,l){1&n&&t._UZ(0,"p-progressSpinner",43)}let y=(()=>{class n{dbMigrationS;generalS;notificationS;navigationCS;authCS;constantsS;eventCenterS;router;userS;instanceS;ns;cs;confirmationService;cd;showCheckbox=!0;loading={grid:!1};subscriptions=[];data={mode:h.D.ADD,eventChannel:new t.vpe,formData:void 0};rows=[];rowsMap={};showAll=!1;EUserType=Z.d;gridKey=v.iH._id;EAPICategory=w.R;selectedRows=[];databasesMigrationFormC;constructor(e,i,a,o,c,u,at,nt,st,ot,rt,ct,lt,dt){this.dbMigrationS=e,this.generalS=i,this.notificationS=a,this.navigationCS=o,this.authCS=c,this.constantsS=u,this.eventCenterS=at,this.router=nt,this.userS=st,this.instanceS=ot,this.ns=rt,this.cs=ct,this.confirmationService=lt,this.cd=dt}ngOnInit(){var e=this;return(0,r.Z)(function*(){e.eventCenterS.dbMigration.selectedDbMigration.next(void 0),yield e.loadGridData(),e.subscriptions.push(e.data.eventChannel.subscribe(function(){var i=(0,r.Z)(function*(a){(a.action===g.F.SAVED||a.action===g.F.UPDATED)&&(e.databasesMigrationFormC.hideModal(),yield e.loadGridData())});return function(a){return i.apply(this,arguments)}}())),e.generalS.setNewTitle("Database Migration")})()}loadGridData(){var e=this;return(0,r.Z)(function*(){e.loading.grid=!0;const i=(yield e.userS.getById(e.authCS.gUser._id).toPromise()).data;i.executedMigrationScripts=i.executedMigrationScripts||{};const a={find:{user:e.authCS.getUserId(),active:!0},select:{name:1,label:1,active:1,user:1,order:1},sort:{order:1}};e.showAll&&delete a.find.active;const o=yield e.dbMigrationS.query(a).toPromise();o&&(e.selectedRows=[],e.rows=o.data,e.rowsMap=d.keyBy(e.rows,v.iH._id));for(const u of e.rows)u.isScriptExecutedCalculated=i.executedMigrationScripts[u.name];let c=e.navigationCS.getQueryParam(p.p.am_db_migration);c&&!e.rowsMap[c]&&e.rows.length&&(c=e.rows[0]._id),e.rowsMap[c]?yield e.fillData():e.eventCenterS.dbMigration.selectedDbMigration.next(void 0),e.loading.grid=!1,e.cd.detectChanges()})()}add(){this.data.formData={order:(d.max(d.map(this.rows,"order"))||0)+1},this.data.mode=h.D.ADD,this.data.eventChannel.emit({action:g.F.OPEN_FORM_IN_ADD_MODE,data:this.data.formData}),this.databasesMigrationFormC.showModal()}markAll(){var e=this;return(0,r.Z)(function*(){try{e.confirmationService.confirm({message:e.cs.dbMigration.markAllConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(i=(0,r.Z)(function*(){yield e.markAsExecuted()}),function(){return i.apply(this,arguments)})})}catch(i){e.ns.showErrorFromResponse(i.error,e.cs.dbMigration.playError)}var i})()}markAsExecuted(){var e=this;return(0,r.Z)(function*(){e.loading.grid=!0,e.cd.detectChanges();try{const i=(yield e.userS.getById(e.authCS.gUser._id).toPromise()).data,a={};for(let o=0;o<e.selectedRows.length;o++)a.executedMigrationScripts=i.executedMigrationScripts,a.executedMigrationScripts[e.selectedRows[o].name]=!0;yield e.userS.put(e.authCS.gUser._id,a,{select:v.iH._id}).toPromise(),e.ns.showSuccess("Database migration scripts marked successfully."),yield e.loadGridData()}catch(i){e.ns.showErrorFromResponse(i.error||i,"Unable to mark database migration scripts.")}e.loading.grid=!1,e.cd.detectChanges()})()}playAll(){var e=this;return(0,r.Z)(function*(){try{e.confirmationService.confirm({message:e.cs.dbMigration.playAllConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(i=(0,r.Z)(function*(){yield e.playAllOriginal()}),function(){return i.apply(this,arguments)})})}catch(i){e.ns.showErrorFromResponse(i.error,e.cs.dbMigration.playError)}var i})()}playAllOriginal(){var e=this;return(0,r.Z)(function*(){e.loading.grid=!0,e.cd.detectChanges();try{(yield e.instanceS.executeDataMigrationScript(d.map(e.selectedRows,"_id")))&&(e.ns.showSuccess("Database migration scripts executed successfully."),yield e.loadGridData())}catch(i){e.ns.showErrorFromResponse(i.error||i,"Unable to execute database migration scripts.")}e.loading.grid=!1,e.cd.detectChanges()})()}playSingle(e){var i=this;return(0,r.Z)(function*(){try{i.confirmationService.confirm({message:i.cs.dbMigration.playConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(a=(0,r.Z)(function*(){yield i.playSingleOriginal(e)}),function(){return a.apply(this,arguments)})})}catch(a){i.ns.showErrorFromResponse(a.error,i.cs.dbMigration.playError)}var a})()}playSingleOriginal(e){var i=this;return(0,r.Z)(function*(){i.loading.grid=!0,i.cd.detectChanges();try{(yield i.instanceS.executeDataMigrationScript(e._id))&&(i.ns.showSuccess("Database migration script executed successfully."),yield i.loadGridData())}catch(a){i.ns.showErrorFromResponse(a.error||a,"Unable to execute database migration script.")}i.loading.grid=!1,i.cd.detectChanges()})()}edit(){this.data.formData=this.rowsMap[d.map(this.selectedRows,"_id")[0]],this.data.mode=h.D.EDIT,this.data.eventChannel.emit({action:g.F.OPEN_FORM_IN_EDIT_MODE}),this.databasesMigrationFormC.showModal()}clone(){var e=this;return(0,r.Z)(function*(){try{if(!e.selectedRows[0]||!e.rowsMap[d.map(e.selectedRows,"_id")[0]])return;const i=e.rowsMap[d.map(e.selectedRows,"_id")[0]]._id,a=(yield e.dbMigrationS.getById(i).toPromise()).data;delete a._id,delete a.guid,a.name=`${a.name}-clone`,a.label=`${a.label} Clone`,a.order=(d.max(d.map(e.rows,"order"))||0)+1,(yield e.dbMigrationS.post(a).toPromise()).success?(e.notificationS.showSuccess(e.constantsS.dbMigration.cloneSuccess),e.loadGridData()):e.notificationS.showSuccess(e.constantsS.dbMigration.cloneSuccess)}catch{e.notificationS.showError(e.constantsS.dbMigration.cloneError)}})()}removePermanentDialog(){var i,e=this;this.selectedRows.length>1?this.removePermanentBulkDialog():this.confirmationService.confirm({message:this.cs.dbMigration.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*(){if(e.selectedRows.length){e.loading.grid=!0,e.cd.detectChanges();try{yield e.hardDelete(e.selectedRows[0]._id),e.ns.showSuccess(e.cs.dbMigration.removePermanent),yield e.loadGridData()}catch(i){e.ns.showErrorFromResponse(i.error||i,e.cs.dbMigration.removePermanentError)}e.loading.grid=!1,e.cd.detectChanges()}})()}removePermanentBulkDialog(){var i,e=this;this.selectedRows.length<2||this.confirmationService.confirm({message:this.cs.dbMigration.removePermanentBulkConfirm(this.selectedRows.length),header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(i=(0,r.Z)(function*(){yield e.removePermanentBulk()}),function(){return i.apply(this,arguments)})})}removePermanentBulk(){var e=this;return(0,r.Z)(function*(){if(e.selectedRows.length<2)return;e.loading.grid=!0,e.cd.detectChanges();const i=e.selectedRows;try{const o=(yield Promise.all(i.map(c=>e.dbMigrationS.permanentDelete(c._id).toPromise()))).filter(c=>!c.success).length;0===o?e.ns.showSuccess(e.cs.dbMigration.removePermanentBulk(i.length)):e.ns.showError(o<i.length?`${i.length-o} of ${i.length} database migrations removed. ${o} failed.`:e.cs.dbMigration.removePermanentBulkError),yield e.loadGridData()}catch(a){e.ns.showErrorFromResponse(a.error||a,e.cs.dbMigration.removePermanentBulkError)}e.loading.grid=!1,e.cd.detectChanges()})()}hardDelete(e){var i=this;return(0,r.Z)(function*(){yield i.dbMigrationS.permanentDelete(e).toPromise()})()}resetSelectedRows(){this.selectedRows.length=0,this.eventCenterS.dbMigration.selectedDbMigration.next(void 0)}resetThisUrl(){var e=this;return(0,r.Z)(function*(){e.eventCenterS.dbMigration.selectedDbMigration.next(void 0),yield e.navigationCS.setQueryParam(p.p.am_db_migration,null)})()}itemSelected(){var e=this;return(0,r.Z)(function*(){yield e.resetThisUrl(),setTimeout(e.fillData.bind(e))})()}fillData(){var e=this;return(0,r.Z)(function*(){if(!e.selectedRows.length)return yield e.navigationCS.setQueryParam(p.p.am_db_migration,""),void e.eventCenterS.dbMigration.selectedDbMigration.next(null);const i=e.selectedRows[0];i?(yield e.navigationCS.setQueryParam(p.p.am_db_migration,i._id),e.eventCenterS.dbMigration.selectedDbMigration.next(i)):yield e.resetThisUrl()})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}dblClickDBMigration(){this.selectedRows.length&&this.edit()}static \u0275fac=function(i){return new(i||n)(t.Y36(T.j),t.Y36(P.b),t.Y36(M.W),t.Y36(A.S),t.Y36(E.D),t.Y36(C.L),t.Y36(R.u),t.Y36(f.F0),t.Y36(k.K),t.Y36(I.E),t.Y36(M.W),t.Y36(C.L),t.Y36(_.YP),t.Y36(t.sBO))};static \u0275cmp=t.Xpm({type:n,selectors:[["app-databases-migration-list"]],viewQuery:function(i,a){if(1&i&&t.Gf(Y,5),2&i){let o;t.iGM(o=t.CRH())&&(a.databasesMigrationFormC=o.first)}},inputs:{showCheckbox:"showCheckbox"},decls:23,vars:19,consts:[[1,"card","shadow-sm","h-100"],["pTooltip","",1,"card-header"],["alt","Database Migration",1,"fa-fw","mr-1",3,"src"],["href","https://docs.apimaker.dev/v1/docs/features/database-migration.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","tooltipPosition","left","pTooltip","Execute Selected Migration",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","tooltipPosition","left","pTooltip","Mark as executed",3,"click",4,"ngIf"],["tooltipPosition","left","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","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",3,"pTooltip","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"],["databasesMigrationFormC",""],["tooltipPosition","left","pTooltip","Execute Selected Migration",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-check-double","text-warning"],["tooltipPosition","left","pTooltip","Mark as executed",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-solid","fa-marker","text-warning"],["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-warning","fa-fw"],["tooltipPosition","left",1,"float-right","cursor-pointer","ml-3",3,"pTooltip","click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],["style","width: 45px;",4,"ngIf"],[2,"width","30px"],[2,"width","70px"],[2,"width","45px"],[3,"pSelectableRow"],[4,"ngIf"],["pTooltip","Script Executed","class","fas fa-solid fa-check fa-fw align-middle text-success text-v-small pr-1",4,"ngIf"],[1,"text-center"],["tooltipPosition","left","pTooltip","Execute script",1,"btn","btn-xsm-custom",3,"click"],[1,"fas","fa-check","text-success"],["href","javascript:","pTooltip","Test API","tooltipPosition","left",1,"btn","btn-xsm-custom","mr-3",3,"routerLink","queryParams","click"],[1,"fas","fa-vial","text-info","fa-fw","test-tube","pt-1"],[3,"value","pSelectableRow"],["pTooltip","Script Executed",1,"fas","fa-solid","fa-check","fa-fw","align-middle","text-success","text-v-small","pr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(i,a){1&i&&(t.TgZ(0,"div",0)(1,"div",1)(2,"span"),t._UZ(3,"img",2),t.ALo(4,"themeIcon"),t._uU(5," Database Migration"),t.qZA(),t.TgZ(6,"a",3),t._UZ(7,"img",4),t.ALo(8,"themeIcon"),t.qZA(),t.YNc(9,Q,2,0,"span",5),t.YNc(10,G,2,0,"span",6),t.TgZ(11,"span",7),t.NdJ("click",function(){return a.add()}),t._UZ(12,"i",8),t.qZA(),t.YNc(13,O,2,0,"span",9),t.YNc(14,B,2,0,"span",10),t.YNc(15,H,2,1,"span",11),t.qZA(),t.TgZ(16,"div",12)(17,"p-table",13),t.NdJ("selectionChange",function(c){return a.selectedRows=c})("selectionChange",function(){return a.itemSelected()})("dblclick",function(){return a.dblClickDBMigration()}),t.YNc(18,$,11,1,"ng-template",14),t.YNc(19,q,18,13,"ng-template",15),t.qZA(),t.YNc(20,V,1,0,"p-progressSpinner",16),t.qZA()(),t._UZ(21,"app-databases-migration-form",17,18)),2&i&&(t.xp6(3),t.Q6J("src",t.lcZ(4,15,"/assets/images/icons/db-m.svg"),t.LSH),t.xp6(4),t.Q6J("src",t.lcZ(8,17,"/assets/images/logo/logo_docs.svg"),t.LSH),t.xp6(2),t.Q6J("ngIf",null==a.selectedRows?null:a.selectedRows.length),t.xp6(1),t.Q6J("ngIf",null==a.selectedRows?null:a.selectedRows.length),t.xp6(3),t.Q6J("ngIf",a.selectedRows.length&&a.selectedRows.length<2),t.xp6(1),t.Q6J("ngIf",a.selectedRows.length&&a.selectedRows.length<2),t.xp6(1),t.Q6J("ngIf",a.selectedRows.length),t.xp6(2),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),t.xp6(1),t.Q6J("data",a.data))},dependencies:[f.rH,U.O5,m.iA,_.jx,m.Ei,m.UA,m.Mo,L.G,F.u,N.i,J.w],encapsulation:2,changeDetection:0})}return n})(),S=(()=>{class n{constructor(){}ngOnInit(){}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=t.Xpm({type:n,selectors:[["app-databases-migration-layout"]],decls:2,vars:0,consts:[[1,"pt-1","pl-1","pr-1","overflow-auto"]],template:function(i,a){1&i&&(t.TgZ(0,"div",0),t._UZ(1,"app-databases-migration-list"),t.qZA())},dependencies:[y],encapsulation:2})}return n})();var tt=s(97975);const et=[{path:"main",component:S,canActivate:[D.P]}];let it=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=t.oAB({type:n});static \u0275inj=t.cJS({imports:[f.Bz.forChild(et),x.u,tt.d]})}return n})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[8296],{48296:(Rt,P,d)=>{d.r(P),d.d(P,{LogTableM:()=>Ft});var J=d(77664),Q=d(17017),B=d(63726),H=d(81025),u=d(15861),e=d(94946),r=d(6990),T=d(96925),N=d(33157),E=d(90328),p=d(51162),c=d(45085),D=d(70819),Y=d(95852),F=d(77240),G=d(53429),K=d(67629),L=d(32915),V=d(31042),j=d(67145),W=d(10262),X=d(81429),Z=d(85219),b=d(27414),M=d(90204),R=d(60095),_=d(96814),x=d(95431),q=d(97680),w=d(33259),z=d(51532),ee=d(42169),U=d(99961),te=d(32660),ie=d(55043),se=d(63885),ae=d(559),ne=d(86937),le=d(40356),oe=d(79329),re=d(37595),de=d(53824),pe=d(58651),ce=d(86607),ue=d(5305),ge=d(72726);function me(a,o){1&a&&(e.TgZ(0,"div",38),e._UZ(1,"app-w-instances",39),e.qZA()),2&a&&(e.xp6(1),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsFilterLogTable",!0))}function _e(a,o){1&a&&(e.TgZ(0,"div",40),e._UZ(1,"app-w-databases",39),e.qZA()),2&a&&(e.xp6(1),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsFilterLogTable",!0))}function he(a,o){1&a&&e._UZ(0,"p-progressSpinner",41)}const ve=function(){return[50,50]};let fe=(()=>{class a{eventCenterS;notificationS;constantsS;data;EAPICategory=c.R;loading={form:!1};constructor(t,i,s){this.eventCenterS=t,this.notificationS=i,this.constantsS=s}ngOnInit(){}showModal(){$("#idFilterPanelInLogsTableForm").modal("show")}hideModal(){$("#idFilterPanelInLogsTableForm").modal("hide")}applyFilter(){const t={};t.supportedAPIs=this.eventCenterS.filterInLog.supportedAPIs.value,t.customApis=this.getPermissionMapFunctions(this.eventCenterS.filterInLog.functions.value),t.systemApis=this.getPermissionMapFunctions(this.eventCenterS.filterInLog.systemApis.value),t.eventsApis=this.getPermissionMapFunctions(this.eventCenterS.filterInLog.eventsApis.value),t.schedulersApis=this.getPermissionMapFunctions(this.eventCenterS.filterInLog.schedulersApis.value),t.webSocketEvents=this.getPermissionMapFunctions(this.eventCenterS.filterInLog.webSocketApis.value),t.thirdPartyApis=this.eventCenterS.filterInLog.thirdPartyAPIs.value,t.queryParams={},t.apisRegex=this.eventCenterS.filterInLog.apisRegex,this.setDataInObjectFromEventCenter(t),this.data.eventChannel.emit({action:N.F.APPLY_FILTER,data:t}),this.notificationS.showSuccess("Success.")}setDataInObjectFromEventCenter(t){t.queryParams.instanceIds=this.eventCenterS.filterInLog.instanceIds.value,t.queryParams.databaseIds=this.eventCenterS.filterInLog.databaseIds.value,t.queryParams.databaseNames=this.eventCenterS.filterInLog.databaseNames.value,t.queryParams.collectionIds=this.eventCenterS.filterInLog.collectionIds.value,t.queryParams.collectionNames=this.eventCenterS.filterInLog.collectionNames.value,t.queryParams.supportedApiIds=this.eventCenterS.filterInLog.supportedApiIds.value,t.queryParams.supportedApiNames=this.eventCenterS.filterInLog.supportedApiNames.value,t.queryParams.functions=this.eventCenterS.filterInLog.functionIds.value,t.queryParams.systemApis=this.eventCenterS.filterInLog.systemApiIds.value,t.queryParams.eventIds=this.eventCenterS.filterInLog.eventIds.value,t.queryParams.schedulersIds=this.eventCenterS.filterInLog.schedulersIds.value,t.queryParams.webSocketIds=this.eventCenterS.filterInLog.webSocketIds.value,this.setThirdPartyApiIds(t)}setThirdPartyApiIds(t){const i=this.eventCenterS.filterInLog.thirdPartyApiIds.value,s=[];for(const n of i)n.length>=24&&s.push(n);t.queryParams.thirdPartyApis=s}getPermissionMapFunctions(t){const i={};for(const s of t||[])i[s._id]=!0;return i}ngOnDestroy(){this.eventCenterS.filterInLog.apisRegex={}}static \u0275fac=function(i){return new(i||a)(e.Y36(L.u),e.Y36(U.W),e.Y36(b.L))};static \u0275cmp=e.Xpm({type:a,selectors:[["app-log-filter-panel-layout-model"]],inputs:{data:"data"},decls:52,vars:54,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idFilterPanelInLogsTableForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-full"],[1,"modal-content",2,"max-height","calc(100vh - 58px)"],[1,"modal-header"],[1,"fas","fa-plus","text-success","fa-fw","mr-1"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],[1,"modal-body","overflow-auto"],[2,"width","max-content"],[1,"v-div","w-categories"],[1,"vertical-height-max"],[3,"isFilterLogTable","typeIsGroup"],[1,"v-div","w-ins-db"],["layout","vertical",3,"panelSizes"],["pTemplate",""],[1,"v-div","w-collection"],[3,"metaKeySelection","IsReadOnly","IsFilterLogTable"],[1,"v-div","w-ins-apis"],[1,"vertical-height-max",2,"width","500px"],[3,"isLPM","isFilterLogTable","treeViewId"],[1,"v-div","w-third-party"],[1,"vertical-height-tp-api"],[3,"isFilterLogTable","isLPM","IsDependentOnGroup"],[1,"v-div","w-custom-apis"],[3,"metaKeySelection","IsReadOnly","isFilterLogTable","isLPM"],[1,"v-div","w-system-apis"],[1,"v-div","w-events"],[1,"v-div","w-schedulers"],[3,"metaKeySelection","IsReadOnly","IsMultiSelect","isFilterLogTable","isLPM"],[1,"v-div","w-web-sockets"],[3,"metaKeySelection","showCheckbox","IsReadOnly","isFilterLogTable","isLPM"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary"],[1,"fas","fa-times","text-danger","fa-fw"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"click"],[1,"fas","fa-filter","text-yellow","fa-fw","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"vertical-height-instances","w-100"],[1,"w-100",3,"metaKeySelection","IsReadOnly","IsFilterLogTable"],[1,"vertical-height-db","w-100"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(i,s){1&i&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span"),e._UZ(5,"i",4),e._uU(6,"Filter "),e.qZA(),e.TgZ(7,"button",5)(8,"span",6),e._UZ(9,"i",7),e.qZA()()(),e.TgZ(10,"div",8)(11,"div",9)(12,"div",10)(13,"div",11),e._UZ(14,"app-w-api-categories",12),e.qZA()(),e.TgZ(15,"div",13)(16,"p-splitter",14),e.YNc(17,me,2,3,"ng-template",15),e.YNc(18,_e,2,3,"ng-template",15),e.qZA()(),e.TgZ(19,"div",16)(20,"div",11),e._UZ(21,"app-w-collections",17),e.qZA()(),e.TgZ(22,"div",18)(23,"div",19),e._UZ(24,"app-w-supported-api",20),e.qZA()(),e.TgZ(25,"div",21)(26,"div",22),e._UZ(27,"app-w-supported-tp-api",23),e.qZA()(),e.TgZ(28,"div",24)(29,"div",11),e._UZ(30,"app-custom-api-grid",25),e.qZA()(),e.TgZ(31,"div",26)(32,"div",11),e._UZ(33,"app-system-api-w",25),e.qZA()(),e.TgZ(34,"div",27)(35,"div",11),e._UZ(36,"app-events-grid",25),e.qZA()(),e.TgZ(37,"div",28)(38,"div",11),e._UZ(39,"app-scheduler-man-w",29),e.qZA()(),e.TgZ(40,"div",30)(41,"div",11),e._UZ(42,"app-web-socket-events-grid",31),e.qZA()()()(),e.TgZ(43,"div",32)(44,"button",33),e._UZ(45,"i",34),e._uU(46," Cancel"),e.qZA(),e.TgZ(47,"button",35),e.NdJ("click",function(){return s.applyFilter()}),e._UZ(48,"i",36),e.TgZ(49,"span"),e._uU(50,"Apply Filter"),e.qZA()()(),e.YNc(51,he,1,0,"p-progressSpinner",37),e.qZA()()()),2&i&&(e.xp6(14),e.Q6J("isFilterLogTable",!0)("typeIsGroup","LOG_PROFILE"),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.INSTANCES?"block":"none"),e.xp6(1),e.Q6J("panelSizes",e.DdM(53,ve)),e.xp6(3),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.INSTANCES?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsFilterLogTable",!0),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.INSTANCES?"block":"none"),e.xp6(2),e.Q6J("isLPM",!1)("isFilterLogTable",!0)("treeViewId","treeViewFromLogFilterPanel"),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.THIRD_PARTY_APIS?"block":"none"),e.xp6(2),e.Q6J("isFilterLogTable",!0)("isLPM",!1)("IsDependentOnGroup",!1),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.CUSTOM_APIS?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("isFilterLogTable",!0)("isLPM",!1),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.SYSTEM_APIS?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("isFilterLogTable",!0)("isLPM",!1),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.EVENTS?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("isFilterLogTable",!0)("isLPM",!1),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.SCHEDULERS?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("IsReadOnly",!0)("IsMultiSelect",!0)("isFilterLogTable",!0)("isLPM",!1),e.xp6(1),e.Udp("display",(null==s.eventCenterS.apiCategory.selectedApiCategory||null==s.eventCenterS.apiCategory.selectedApiCategory.value[0]?null:s.eventCenterS.apiCategory.selectedApiCategory.value[0].id)===s.EAPICategory.WEB_SOCKET_EVENT?"block":"none"),e.xp6(2),e.Q6J("metaKeySelection",!1)("showCheckbox",!0)("IsReadOnly",!0)("isFilterLogTable",!0)("isLPM",!1),e.xp6(9),e.Q6J("ngIf",s.loading.form))},dependencies:[_.O5,te.y,Z.jx,q.G,ie.q,se.f,ae.O,ne.n,le.T,oe.X,re.G,de.d,pe.A,ce.V,ue.N,ge.x],styles:[".vertical-height-instances[_ngcontent-%COMP%]{height:248px}.vertical-height-db[_ngcontent-%COMP%]{height:calc(100vh - 410px)}.vertical-height-max[_ngcontent-%COMP%], .vertical-height-tp-api[_ngcontent-%COMP%]{height:calc(100vh - 154px)}.v-div[_ngcontent-%COMP%]{display:inline-block;height:calc(100vh - 158px);float:left}.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 - 24.5rem)}"]})}return a})();var f=d(27672),ye=d(45809),Ce=d(756),Ae=d(84066);function Te(a,o){if(1&a&&(e.TgZ(0,"tr")(1,"td"),e._uU(2,"Tenant Username"),e.qZA(),e.TgZ(3,"td"),e._uU(4," :"),e.qZA(),e.TgZ(5,"td",19),e._uU(6),e.qZA()()),2&a){const t=e.oxw();e.xp6(6),e.Oqu(null==t.inputData?null:t.inputData.tenantUsername)}}function Ze(a,o){1&a&&(e.TgZ(0,"tr")(1,"th"),e._uU(2,"Keys"),e.qZA(),e.TgZ(3,"th"),e._uU(4,"Value"),e.qZA()())}function xe(a,o){if(1&a&&(e.TgZ(0,"tr",44)(1,"td",45)(2,"span"),e._uU(3),e.qZA()(),e.TgZ(4,"td")(5,"span"),e._uU(6),e.qZA()()()),2&a){const t=o.$implicit;e.Q6J("pSelectableRow",t),e.xp6(3),e.Oqu(t.toString().split(",")[0]),e.xp6(3),e.Oqu(t.toString().split(",")[1]||"")}}function Ie(a,o){1&a&&(e.TgZ(0,"tr")(1,"th"),e._uU(2,"Keys"),e.qZA(),e.TgZ(3,"th"),e._uU(4,"Value"),e.qZA()())}function Se(a,o){if(1&a&&(e.TgZ(0,"tr",44)(1,"td",45)(2,"span"),e._uU(3),e.qZA()(),e.TgZ(4,"td")(5,"span"),e._uU(6),e.qZA()()()),2&a){const t=o.$implicit;e.Q6J("pSelectableRow",t),e.xp6(3),e.Oqu(t.toString().split(",")[0]),e.xp6(3),e.Oqu(t.toString().split(",")[1]||"")}}const Le=function(a,o,t,i){return{get:a,put:o,post:t,delete:i}},O=function(){return{color:"#26b47f"}},k=function(){return{color:"#ed4b48"}};let be=(()=>{class a{ec;notificationS;generalCS;constantsCS;logS;cd;monacoS;constantsS;EAPICategory=c.R;loading={form:!1};selectedRowData;reqHeaders=[];resHeaders=[];inputData;editorReqQueryParams;editorOptionReqQueryParams={readOnly:!1,language:"json",contextmenu:!1};editorReqBody;editorOptionReqBody={readOnly:!1,language:"json",contextmenu:!1};editorResBody;editorOptionResBody={readOnly:!1,language:"json",contextmenu:!1};editorLogs;editorOptionLogs={readOnly:!1,language:"text",contextmenu:!1};reqHeaderCollapse;reqQueryParamsCollapse;reqBodyCollapse;resHeaderCollapse;resQueryParamsCollapse;resBodyCollapse;logsBodyCollapse;ERequestMethod=T.Yp;constructor(t,i,s,n,l,g,h,v){this.ec=t,this.notificationS=i,this.generalCS=s,this.constantsCS=n,this.logS=l,this.cd=g,this.monacoS=h,this.constantsS=v}ngOnInit(){}hideModal(){$("#idLogDetailsLayoutModal").modal("hide")}showModal(t){var i=this;return(0,u.Z)(function*(){try{if(i.inputData=t[0],!i.inputData)return;yield i.getLogByID(i.inputData._id),i.collapseAll(),$("#idLogDetailsLayoutModal").modal("show")}catch(s){console.log(s)}})()}getLogByID(t){var i=this;return(0,u.Z)(function*(){const s=(yield i.logS.getById(t).toPromise()).data;if(i.inputData=Object.assign({},i.inputData,s),s){s.pathVariables=JSON.parse(s.pathVariables||"{}"),s.meta&&(s.executionTime=s.meta?.executionTime),s.createdAt=moment(s.createdAt).format("DD-MM-YYYY hh:mm:ss A"),s.updatedAt=moment(s.updatedAt).format("DD-MM-YYYY hh:mm:ss A");for(const l of i.getKeys(s.pathVariables))s[l]=s.pathVariables[l];for(const l of s.apiErrors||[])for(const g of i.getKeys(l))s[g]=l[g];delete s.pathVariables,delete s.apiErrors,delete s.meta,delete s._id,delete s.user,delete s.instance,delete s.apiUser}if(i.selectedRowData=s,i.reqHeaders=i.selectedRowData?.reqHeaders?Object.entries(i.selectedRowData.reqHeaders):[],i.generalCS.setValueInEditor(i,"editorReqQueryParams",i.selectedRowData.queryParams||""),i.generalCS.setValueInEditor(i,"editorReqBody",i.selectedRowData.reqPayload||""),i.selectedRowData.resHeaders){i.resHeaders=Object.entries(i.selectedRowData.resHeaders);const l=i.selectedRowData.resHeaders[T.Eg.CONTENT_TYPE];yield i.setResponseBodyLanguage(l)}else i.resHeaders=[];let n=i.selectedRowData.resPayload;(!i.selectedRowData.resHeaders||i.selectedRowData.resHeaders&&i.selectedRowData.resHeaders[T.Eg.CONTENT_TYPE].indexOf(f.g7.JSON)>=0)&&(n=JSON.stringify(i.selectedRowData.resPayload)),i.generalCS.setValueInEditor(i,"editorResBody",n||""),i.generalCS.setValueInEditor(i,"editorLogs",i.selectedRowData.logs||""),i.cd.detectChanges()})()}setResponseBodyLanguage(t){var i=this;return(0,u.Z)(function*(){t.indexOf(f.g7.JSON)>=0?(i.editorOptionResBody.language="json",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(f.g7.HTML)>=0?(i.editorOptionResBody.language="html",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(f.g7.XML)>=0?(i.editorOptionResBody.language="xml",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(f.g7.YAML)>=0?(i.editorOptionResBody.language="yaml",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(f.g7.TEXT)>=0&&(i.editorOptionResBody.language="plaintext",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language))})()}getKeys(t){return t?Object.keys(t):[]}requestHeaderClick(){this.reqHeaderCollapse=!this.reqHeaderCollapse}requestQueryParamsClick(){void 0!==this.editorReqQueryParams&&this.monacoS.formatDocument(this.editorReqQueryParams),this.reqQueryParamsCollapse=!this.reqQueryParamsCollapse}requestBodyClick(){void 0!==this.editorReqBody&&this.monacoS.formatDocument(this.editorReqBody),this.reqBodyCollapse=!this.reqBodyCollapse}responseHeaderClick(){this.resHeaderCollapse=!this.resHeaderCollapse}responseBodyClick(){void 0!==this.editorResBody&&this.monacoS.formatDocument(this.editorResBody),this.resBodyCollapse=!this.resBodyCollapse}logsBodyClick(){void 0!==this.editorLogs&&this.monacoS.formatDocument(this.editorLogs),this.logsBodyCollapse=!this.logsBodyCollapse}expandAll(){this.reqHeaderCollapse=!0,this.reqQueryParamsCollapse=!0,this.reqBodyCollapse=!0,this.resHeaderCollapse=!0,this.resQueryParamsCollapse=!0,this.resBodyCollapse=!0,this.logsBodyCollapse=!0,void 0!==this.editorReqQueryParams&&this.monacoS.formatDocument(this.editorReqQueryParams),void 0!==this.editorReqBody&&this.monacoS.formatDocument(this.editorReqBody),void 0!==this.editorResBody&&this.monacoS.formatDocument(this.editorResBody),void 0!==this.editorLogs&&this.monacoS.formatDocument(this.editorLogs),this.cd.detectChanges()}collapseAll(){this.reqHeaderCollapse=!1,this.reqQueryParamsCollapse=!1,this.reqBodyCollapse=!1,this.resHeaderCollapse=!1,this.resQueryParamsCollapse=!1,this.resBodyCollapse=!1,this.logsBodyCollapse=!1,this.cd.detectChanges()}ngOnDestroy(){this.ec.filterInLog.apisRegex={}}static \u0275fac=function(i){return new(i||a)(e.Y36(L.u),e.Y36(U.W),e.Y36(F.b),e.Y36(M.s),e.Y36(D.e),e.Y36(e.sBO),e.Y36(ye.b),e.Y36(b.L))};static \u0275cmp=e.Xpm({type:a,selectors:[["app-log-details-layout-model"]],decls:143,vars:54,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idLogDetailsLayoutModal","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-full"],[1,"modal-content"],[1,"modal-header"],[2,"margin-top","1px"],[1,"fas","fa-info-circle","text-success","fa-fw","mr-1"],[1,"float-right"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],["pTooltip","Expand",1,"cursor-pointer"],[1,"btn-outline-light","btn-sm","mr-1","mt-1px","ng-star-inserted","text-danger","fas","fa-expand-alt",3,"click"],["pTooltip","Collapse",1,"cursor-pointer"],[1,"btn-outline-light","btn-sm","mr-1","mt-1px","ng-star-inserted","fas","fa-compress-alt",3,"click"],[1,"modal-body","p-4",2,"overflow-y","scroll"],[1,""],[1,"table","table-hover","table-striped","table-bordered","table-sm"],[2,"width","150px"],[2,"width","10px"],[1,"pl-2"],[3,"ngClass"],[4,"ngIf"],[3,"ngStyle"],["id","reqHeader",1,"cursor-pointer","logs-collapse-div",3,"click"],[2,"margin-left","10px"],[1,"float-right","mr-2",3,"hidden"],[1,"fas","fa-caret-down"],[1,"fas","fa-caret-up"],[1,"mt-1",2,"background","#373b3d","border-radius","10px",3,"hidden"],["styleClass","p-datatable-striped","scrollHeight","calc(100vh - 100px)",3,"selectionMode","metaKeySelection","scrollable","value"],["pTemplate","header"],["pTemplate","body"],["id","reqQueryParams",1,"mt-1","cursor-pointer","logs-collapse-div",3,"click"],[1,"overflow-auto",2,"height","300px !important"],[3,"editorOptions","editorGenerated"],["id","reqBody",1,"mt-1","cursor-pointer","logs-collapse-div",3,"click"],["id","resHeader",1,"mt-1","cursor-pointer","logs-collapse-div",3,"click"],["id","resBody",1,"mt-1","cursor-pointer","logs-collapse-div",3,"click"],["id","logsBody",1,"mt-1","cursor-pointer","logs-collapse-div",3,"click"],[1,"ml-2"],[1,"modal-footer"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary"],[1,"fas","fa-times","text-danger","fa-fw"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",3,"hidden"],[3,"pSelectableRow"],[2,"white-space","nowrap"]],template:function(i,s){1&i&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span",4),e._UZ(5,"i",5),e._uU(6,"Detail view "),e.qZA(),e.TgZ(7,"div",6)(8,"button",7)(9,"span",8),e._UZ(10,"i",9),e.qZA()(),e.TgZ(11,"span",10)(12,"i",11),e.NdJ("click",function(){return s.expandAll()}),e.qZA()(),e.TgZ(13,"span",12)(14,"i",13),e.NdJ("click",function(){return s.collapseAll()}),e.qZA()()()(),e.TgZ(15,"div",14)(16,"div",15)(17,"table",16)(18,"colgroup"),e._UZ(19,"col",17)(20,"col",18)(21,"col"),e.qZA(),e.TgZ(22,"tr")(23,"td"),e._uU(24,"URL"),e.qZA(),e.TgZ(25,"td"),e._uU(26," :"),e.qZA(),e.TgZ(27,"td",19),e._uU(28),e.qZA()(),e.TgZ(29,"tr")(30,"td"),e._uU(31,"Method"),e.qZA(),e.TgZ(32,"td"),e._uU(33," :"),e.qZA(),e.TgZ(34,"td",19)(35,"span",20),e._uU(36),e.qZA()()(),e.TgZ(37,"tr")(38,"td"),e._uU(39,"Type"),e.qZA(),e.TgZ(40,"td"),e._uU(41," :"),e.qZA(),e.TgZ(42,"td",19),e._uU(43),e.qZA()(),e.YNc(44,Te,7,1,"tr",21),e.TgZ(45,"tr")(46,"td"),e._uU(47,"Name"),e.qZA(),e.TgZ(48,"td"),e._uU(49," :"),e.qZA(),e.TgZ(50,"td",19),e._uU(51),e.qZA()(),e.TgZ(52,"tr")(53,"td"),e._uU(54,"Time"),e.qZA(),e.TgZ(55,"td"),e._uU(56," :"),e.qZA(),e.TgZ(57,"td",19),e._uU(58),e.ALo(59,"moment"),e.qZA()(),e.TgZ(60,"tr")(61,"td"),e._uU(62,"Status"),e.qZA(),e.TgZ(63,"td"),e._uU(64," :"),e.qZA(),e.TgZ(65,"td",19)(66,"span",22),e._uU(67),e.qZA()()(),e.TgZ(68,"tr")(69,"td"),e._uU(70,"Status Code"),e.qZA(),e.TgZ(71,"td"),e._uU(72," :"),e.qZA(),e.TgZ(73,"td",19)(74,"span",22),e._uU(75),e.qZA()()()()(),e.TgZ(76,"div",23),e.NdJ("click",function(){return s.requestHeaderClick()}),e.TgZ(77,"span",24),e._uU(78,"Request Header "),e.qZA(),e.TgZ(79,"div",25),e._UZ(80,"i",26),e.qZA(),e.TgZ(81,"div",25),e._UZ(82,"i",27),e.qZA()(),e.TgZ(83,"div",28)(84,"p-table",29),e.YNc(85,Ze,5,0,"ng-template",30),e.YNc(86,xe,7,3,"ng-template",31),e.qZA()(),e.TgZ(87,"div",32),e.NdJ("click",function(){return s.requestQueryParamsClick()}),e.TgZ(88,"span",24),e._uU(89,"Request Query params "),e.qZA(),e.TgZ(90,"div",25),e._UZ(91,"i",26),e.qZA(),e.TgZ(92,"div",25),e._UZ(93,"i",27),e.qZA()(),e.TgZ(94,"div",28)(95,"div",33)(96,"app-monaco-editor",34),e.NdJ("editorGenerated",function(l){return s.editorReqQueryParams=l}),e.qZA()()(),e.TgZ(97,"div",35),e.NdJ("click",function(){return s.requestBodyClick()}),e.TgZ(98,"span",24),e._uU(99,"Request Body "),e.qZA(),e.TgZ(100,"div",25),e._UZ(101,"i",26),e.qZA(),e.TgZ(102,"div",25),e._UZ(103,"i",27),e.qZA()(),e.TgZ(104,"div",28)(105,"div",33)(106,"app-monaco-editor",34),e.NdJ("editorGenerated",function(l){return s.editorReqBody=l}),e.qZA()()(),e.TgZ(107,"div",36),e.NdJ("click",function(){return s.responseHeaderClick()}),e.TgZ(108,"span",24),e._uU(109,"Response Header "),e.qZA(),e.TgZ(110,"div",25),e._UZ(111,"i",26),e.qZA(),e.TgZ(112,"div",25),e._UZ(113,"i",27),e.qZA()(),e.TgZ(114,"div",28)(115,"p-table",29),e.YNc(116,Ie,5,0,"ng-template",30),e.YNc(117,Se,7,3,"ng-template",31),e.qZA()(),e.TgZ(118,"div",37),e.NdJ("click",function(){return s.responseBodyClick()}),e.TgZ(119,"span",24),e._uU(120,"Response Body "),e.qZA(),e.TgZ(121,"div",25),e._UZ(122,"i",26),e.qZA(),e.TgZ(123,"div",25),e._UZ(124,"i",27),e.qZA()(),e.TgZ(125,"div",28)(126,"div",33)(127,"app-monaco-editor",34),e.NdJ("editorGenerated",function(l){return s.editorResBody=l}),e.qZA()()(),e.TgZ(128,"div",38),e.NdJ("click",function(){return s.logsBodyClick()}),e.TgZ(129,"span",39),e._uU(130,"Logs "),e.qZA(),e.TgZ(131,"div",25),e._UZ(132,"i",26),e.qZA(),e.TgZ(133,"div",25),e._UZ(134,"i",27),e.qZA()(),e.TgZ(135,"div",28)(136,"div",33)(137,"app-monaco-editor",34),e.NdJ("editorGenerated",function(l){return s.editorLogs=l}),e.qZA()()()(),e.TgZ(138,"div",40)(139,"button",41),e._UZ(140,"i",42),e._uU(141," Cancel"),e.qZA()(),e._UZ(142,"p-progressSpinner",43),e.qZA()()()),2&i&&(e.xp6(28),e.Oqu(null==s.inputData?null:s.inputData.url),e.xp6(7),e.Q6J("ngClass",e.l5B(45,Le,(null==s.inputData?null:s.inputData.requestMethod)===s.ERequestMethod.GET,(null==s.inputData?null:s.inputData.requestMethod)===s.ERequestMethod.PUT,(null==s.inputData?null:s.inputData.requestMethod)===s.ERequestMethod.POST,(null==s.inputData?null:s.inputData.requestMethod)===s.ERequestMethod.DELETE)),e.xp6(1),e.hij(" ",null==s.inputData||null==s.inputData.requestMethod?null:s.inputData.requestMethod.toUpperCase()," "),e.xp6(7),e.Oqu(null==s.inputData?null:s.inputData.category),e.xp6(1),e.Q6J("ngIf",null==s.inputData?null:s.inputData.tenantUsername),e.xp6(7),e.Oqu(null==s.inputData?null:s.inputData.logNameForUI),e.xp6(7),e.Oqu(e.xi3(59,42,null==s.inputData?null:s.inputData.createdAt,s.constantsCS.DATETIME_FORMAT_USER_WITH_SECONDS)),e.xp6(8),e.Q6J("ngStyle",null!=s.inputData&&s.inputData.success?e.DdM(50,O):e.DdM(51,k)),e.xp6(1),e.Oqu(null!=s.inputData&&s.inputData.success?"Success":"Fail"),e.xp6(7),e.Q6J("ngStyle",null!=s.inputData&&s.inputData.success?e.DdM(52,O):e.DdM(53,k)),e.xp6(1),e.Oqu(null==s.inputData?null:s.inputData.statusCode),e.xp6(4),e.Q6J("hidden",s.reqHeaderCollapse),e.xp6(2),e.Q6J("hidden",!s.reqHeaderCollapse),e.xp6(2),e.Q6J("hidden",!s.reqHeaderCollapse),e.xp6(1),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("scrollable",!0)("value",s.reqHeaders),e.xp6(6),e.Q6J("hidden",s.reqQueryParamsCollapse),e.xp6(2),e.Q6J("hidden",!s.reqQueryParamsCollapse),e.xp6(2),e.Q6J("hidden",!s.reqQueryParamsCollapse),e.xp6(2),e.Q6J("editorOptions",s.editorOptionReqQueryParams),e.xp6(4),e.Q6J("hidden",s.reqBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.reqBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.reqBodyCollapse),e.xp6(2),e.Q6J("editorOptions",s.editorOptionReqBody),e.xp6(4),e.Q6J("hidden",s.resHeaderCollapse),e.xp6(2),e.Q6J("hidden",!s.resHeaderCollapse),e.xp6(2),e.Q6J("hidden",!s.resHeaderCollapse),e.xp6(1),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("scrollable",!0)("value",s.resHeaders),e.xp6(6),e.Q6J("hidden",s.resBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.resBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.resBodyCollapse),e.xp6(2),e.Q6J("editorOptions",s.editorOptionResBody),e.xp6(4),e.Q6J("hidden",s.logsBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.logsBodyCollapse),e.xp6(2),e.Q6J("hidden",!s.logsBodyCollapse),e.xp6(2),e.Q6J("editorOptions",s.editorOptionLogs),e.xp6(5),e.Q6J("hidden",!s.loading.form))},dependencies:[_.mk,_.O5,_.PC,Ce.O,x.iA,Z.jx,x.Ei,q.G,w.u,Ae.d],encapsulation:2})}return a})();var qe=d(44879);const Pe=["logFilterPanelLayoutModelC"],Ne=["logDetailsLayoutModelC"];function Ee(a,o){if(1&a&&(e.TgZ(0,"div",7)(1,"span",8)(2,"h4",9),e._uU(3),e.qZA()()()),2&a){const t=e.oxw(2);e.xp6(3),e.Oqu(t.constantsS.logTable.setupExternalLogs)}}function De(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL INSTANCES"),e.qZA())}function Fe(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",50)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.instanceClickData([n]))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function Me(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,Fe,4,1,"p-chip",49),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.instances)}}function Re(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL DATABASES"),e.qZA())}function we(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",53)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.removeDbClick([n]))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.db," ")}}function Ue(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,we,4,1,"p-chip",52),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.databases)}}function Oe(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL COLLECTIONS"),e.qZA())}function ke(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",55)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.removeCollectionClick([n]))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function Je(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,ke,4,1,"p-chip",54),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.collections)}}function Qe(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL APIS"),e.qZA())}function Be(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.removeApiClick([n]))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function He(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,Be,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.supportedAPIs)}}function Ye(a,o){1&a&&(e.TgZ(0,"td",29)(1,"div",48),e._uU(2,"ALL THIRD PARTY APIS"),e.qZA()())}function $e(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",53)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.npmPackageClickData(n,"L_1"))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function Ge(a,o){if(1&a&&(e.TgZ(0,"td",23),e.YNc(1,$e,4,1,"p-chip",52),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.tpBundles)}}function Ke(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",55)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.npmPackageClickData(n,"L_2"))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.nameId," ")}}function Ve(a,o){if(1&a&&(e.TgZ(0,"td",23),e.YNc(1,Ke,4,1,"p-chip",54),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.tpApiVersions)}}function je(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.npmPackageClickData(n,"L_3"))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.nameId," ")}}function We(a,o){if(1&a&&(e.TgZ(0,"td",58),e.YNc(1,je,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.tpApis)}}function Xe(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL CUSTOM APIS"),e.qZA())}function ze(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.customApisClick(n))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function et(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,ze,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.customApis)}}function tt(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL SYSTEM APIS"),e.qZA())}function it(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.systemsApisClick(n))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function st(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,it,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.systemsApis)}}function at(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL EVENTS"),e.qZA())}function nt(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.amEventsClick(n))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function lt(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,nt,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.amEvents)}}function ot(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL SCHEDULERS"),e.qZA())}function rt(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.schedulersClick(n))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.name," ")}}function dt(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,rt,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.schedulersApis)}}function pt(a,o){1&a&&(e.TgZ(0,"div",48),e._uU(1,"ALL WEBSOCKET EVENTS"),e.qZA())}function ct(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"p-chip",57)(1,"div"),e._uU(2),e.TgZ(3,"i",51),e.NdJ("click",function(){const n=e.CHM(t).$implicit,l=e.oxw(4);return e.KtG(l.wsEventClick(n))}),e.qZA()()()}if(2&a){const t=o.$implicit;e.xp6(2),e.hij("",null==t?null:t.nameUI," ")}}function ut(a,o){if(1&a&&(e.TgZ(0,"div"),e.YNc(1,ct,4,1,"p-chip",56),e.qZA()),2&a){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.wsEvents)}}function gt(a,o){1&a&&(e.TgZ(0,"tr")(1,"th",59),e._uU(2,"Index"),e.qZA(),e.TgZ(3,"th",60),e._uU(4,"Date & Time"),e.qZA(),e.TgZ(5,"th",61),e._uU(6,"Method"),e.qZA(),e.TgZ(7,"th",62),e._uU(8,"Status"),e.qZA(),e.TgZ(9,"th",60),e._uU(10,"API Type"),e.qZA(),e.TgZ(11,"th"),e._uU(12,"API Name"),e.qZA()())}const y=function(a){return{"selected-row":a}},mt=function(a,o,t,i){return{get:a,put:o,post:t,delete:i}},_t=function(){return{color:"#26b47f"}},ht=function(){return{color:"#ed4b48"}};function vt(a,o){if(1&a&&(e.TgZ(0,"tr",63)(1,"td")(2,"div",64),e._uU(3),e.qZA()(),e.TgZ(4,"td")(5,"div",65),e._uU(6),e.qZA()(),e.TgZ(7,"td")(8,"div",65)(9,"span",66),e._uU(10),e.qZA()()(),e.TgZ(11,"td")(12,"div",67),e._uU(13),e.qZA()(),e.TgZ(14,"td")(15,"div",65),e._uU(16),e.qZA()(),e.TgZ(17,"td")(18,"div",65),e._uU(19),e.qZA()()()),2&a){const t=o.$implicit,i=o.rowIndex,s=e.oxw(3);e.Q6J("pSelectableRow",t),e.xp6(2),e.Q6J("ngClass",e.VKq(15,y,t.isNewInGrid)),e.xp6(1),e.Oqu(i+1),e.xp6(2),e.Q6J("ngClass",e.VKq(17,y,t.isNewInGrid)),e.xp6(1),e.Oqu(t.createdAt),e.xp6(2),e.Q6J("ngClass",e.VKq(19,y,t.isNewInGrid)),e.xp6(1),e.Q6J("ngClass",e.l5B(21,mt,(null==t?null:t.requestMethod)===s.ERequestMethod.GET,(null==t?null:t.requestMethod)===s.ERequestMethod.PUT,(null==t?null:t.requestMethod)===s.ERequestMethod.POST,(null==t?null:t.requestMethod)===s.ERequestMethod.DELETE)),e.xp6(1),e.hij("",null==t?null:t.requestMethod," "),e.xp6(2),e.Q6J("ngStyle",t.success?e.DdM(26,_t):e.DdM(27,ht))("ngClass",e.VKq(28,y,t.isNewInGrid)),e.xp6(1),e.hij("",t.success?"Success":"Fail"," "),e.xp6(2),e.Q6J("ngClass",e.VKq(30,y,t.isNewInGrid)),e.xp6(1),e.Oqu(t.category),e.xp6(2),e.Q6J("ngClass",e.VKq(32,y,t.isNewInGrid)),e.xp6(1),e.Oqu(t.logNameForUI)}}const ft=function(){return[50,200,500]};function yt(a,o){if(1&a){const t=e.EpF();e.TgZ(0,"div",4)(1,"div",10)(2,"div",11)(3,"span"),e._UZ(4,"i",12),e._uU(5," Log Table Summary"),e.qZA(),e.TgZ(6,"div",13)(7,"a",14),e._UZ(8,"img",15),e.ALo(9,"themeIcon"),e.qZA()(),e.TgZ(10,"span",16),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.loadGridData(!1))}),e._UZ(11,"i",17),e._uU(12," Apply "),e.qZA(),e.TgZ(13,"span",18),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.showFilterPanelModel())}),e._UZ(14,"i",19),e.qZA()(),e.TgZ(15,"div",20)(16,"table",21)(17,"tbody")(18,"tr")(19,"td",22),e._uU(20," Instances"),e.qZA(),e.TgZ(21,"td",23),e.YNc(22,De,2,0,"div",24),e.YNc(23,Me,2,1,"div",25),e.qZA(),e.TgZ(24,"td",23),e.YNc(25,Re,2,0,"div",24),e.YNc(26,Ue,2,1,"div",25),e.qZA(),e.TgZ(27,"td",23),e.YNc(28,Oe,2,0,"div",24),e.YNc(29,Je,2,1,"div",25),e.qZA(),e.TgZ(30,"td"),e.YNc(31,Qe,2,0,"div",24),e.YNc(32,He,2,1,"div",25),e.qZA()(),e.TgZ(33,"tr")(34,"td",22),e._uU(35," Third Party APIs"),e.qZA(),e.YNc(36,Ye,3,0,"td",26),e.YNc(37,Ge,2,1,"td",27),e.YNc(38,Ve,2,1,"td",27),e.YNc(39,We,2,1,"td",28),e.qZA(),e.TgZ(40,"tr")(41,"td",22),e._uU(42," Custom APIs"),e.qZA(),e.TgZ(43,"td",29),e.YNc(44,Xe,2,0,"div",24),e.YNc(45,et,2,1,"div",25),e.qZA()(),e.TgZ(46,"tr")(47,"td",22),e._uU(48," System APIs"),e.qZA(),e.TgZ(49,"td",29),e.YNc(50,tt,2,0,"div",24),e.YNc(51,st,2,1,"div",25),e.qZA()(),e.TgZ(52,"tr")(53,"td",22),e._uU(54," Events"),e.qZA(),e.TgZ(55,"td",29),e.YNc(56,at,2,0,"div",24),e.YNc(57,lt,2,1,"div",25),e.qZA()(),e.TgZ(58,"tr")(59,"td",22),e._uU(60," Schedulers"),e.qZA(),e.TgZ(61,"td",29),e.YNc(62,ot,2,0,"div",24),e.YNc(63,dt,2,1,"div",25),e.qZA()(),e.TgZ(64,"tr")(65,"td",22),e._uU(66," WebSocket Events"),e.qZA(),e.TgZ(67,"td",29),e.YNc(68,pt,2,0,"div",24),e.YNc(69,ut,2,1,"div",25),e.qZA()(),e.TgZ(70,"tr")(71,"td",30)(72,"span",31),e._uU(73,"Date"),e.qZA()(),e.TgZ(74,"td",32)(75,"p-calendar",33),e.NdJ("ngModelChange",function(s){e.CHM(t);const n=e.oxw(2);return e.KtG(n.gridFilter.rangeDates=s)}),e.qZA(),e.TgZ(76,"span",34),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.clearDate())}),e._UZ(77,"i",35),e.qZA()()()()()()(),e.TgZ(78,"div",36)(79,"div",11)(80,"span"),e._UZ(81,"img",37),e.ALo(82,"themeIcon"),e._uU(83," Log Table"),e.qZA(),e.TgZ(84,"span",38),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.showFilterPanelModel())}),e._UZ(85,"i",19),e.qZA(),e.TgZ(86,"span",39),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.clearAllLogsDialog())}),e._UZ(87,"i",40),e.qZA(),e.TgZ(88,"span",41),e.NdJ("click",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.refresh())}),e._UZ(89,"i",42),e.qZA()()(),e.TgZ(90,"div",43)(91,"div",44)(92,"p-table",45),e.NdJ("selectionChange",function(s){e.CHM(t);const n=e.oxw(2);return e.KtG(n.selectedRows=s)})("dblclick",function(){e.CHM(t);const s=e.oxw(2);return e.KtG(s.dblClickLogs())}),e.YNc(93,gt,13,0,"ng-template",46),e.YNc(94,vt,20,34,"ng-template",47),e.qZA()()()()}if(2&a){const t=e.oxw(2);e.xp6(8),e.Q6J("src",e.lcZ(9,37,"/assets/images/logo/logo_docs.svg"),e.LSH),e.xp6(14),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allInstances),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allInstances)),e.xp6(2),e.Q6J("ngIf",(null==t.gridFilter?null:t.gridFilter.apisRegex.allDatabases)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allInstances)),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allDatabases||null!=t.gridFilter&&t.gridFilter.apisRegex.allInstances)),e.xp6(2),e.Q6J("ngIf",(null==t.gridFilter?null:t.gridFilter.apisRegex.allCollections)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allInstances)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allDatabases)),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allCollections||null!=t.gridFilter&&t.gridFilter.apisRegex.allInstances||null!=t.gridFilter&&t.gridFilter.apisRegex.allDatabases)),e.xp6(2),e.Q6J("ngIf",(null==t.gridFilter?null:t.gridFilter.apisRegex.allInstanceApis)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allInstances)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allDatabases)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allCollections)),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allInstanceApis||null!=t.gridFilter&&t.gridFilter.apisRegex.allInstances||null!=t.gridFilter&&t.gridFilter.apisRegex.allDatabases||null!=t.gridFilter&&t.gridFilter.apisRegex.allCollections)),e.xp6(4),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allThirdPartyApis),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allThirdPartyApis)),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allThirdPartyApis)),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allThirdPartyApis)),e.xp6(5),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allCustomApis),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allCustomApis)),e.xp6(5),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allSystemApis),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allSystemApis)),e.xp6(5),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allEvents),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allEvents)),e.xp6(5),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allSchedulers),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allSchedulers)),e.xp6(5),e.Q6J("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allWebSocketEvents),e.xp6(1),e.Q6J("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allWebSocketEvents)),e.xp6(6),e.Q6J("ngModel",t.gridFilter.rangeDates)("showIcon",!0)("showButtonBar",!0)("readonlyInput",!0),e.xp6(6),e.Q6J("src",e.lcZ(82,39,"/assets/images/icons/log.svg"),e.LSH),e.xp6(11),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",t.selectedRows)("dataKey",t.gridKey)("scrollable",!0)("paginator",!0)("rows",50)("rowsPerPageOptions",e.DdM(41,ft))("value",t.responseData)}}function Ct(a,o){1&a&&e._UZ(0,"p-progressSpinner",68)}function At(a,o){if(1&a&&(e.TgZ(0,"div",4),e.YNc(1,Ee,4,1,"div",5),e.YNc(2,yt,95,42,"div",0),e.YNc(3,Ct,1,0,"p-progressSpinner",6),e.qZA()),2&a){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 Tt=(()=>{class a{logS;authCS;generalS;instanceS;functionS;eventCenterS;schedulerS;amEventS;webSocketEventsS;dataProviderS;confirmationService;constantsS;constantsCS;cd;responseData=[];loading;allApiCategories=[];tab={apiCategory:this.allApiCategories[0]};subscriptions=[];settings={maxRowsLimit:1e4};data={mode:E.D.ADD,eventChannel:new e.vpe,formData:void 0};instances;instanceIds;instanceNames;databases;databaseNames;collections;collectionNames;supportedAPIs;supportedApiNames;customApis;functionIds;customApiNames;systemsApis;systemApiIds;systemApiNames;amEvents;amEventIds;amEventNames;schedulersApis;schedulersIds;schedulersNames;wsEvents;wsEventIds;wsEventsNames;tpBundles;tpBundleMap=[];tpApiVersions;tpApiVersionMap=[];tpApis;tpApisMap=[];allTreeItemsMap={};value=new Date;range={start:null,end:null};logFilterPanelLayoutModelC;logDetailsLayoutModelC;gridFilter={queryParams:{},apisRegex:{},supportedAPIs:{}};ERequestMethod=T.Yp;constructor(t,i,s,n,l,g,h,v,C,m,I,S,A,Mt){this.logS=t,this.authCS=i,this.generalS=s,this.instanceS=n,this.functionS=l,this.eventCenterS=g,this.schedulerS=h,this.amEventS=v,this.webSocketEventsS=C,this.dataProviderS=m,this.confirmationService=I,this.constantsS=S,this.constantsCS=A,this.cd=Mt,this.allApiCategories=this.dataProviderS.getApiCategories()}ngOnInit(){var t=this;this.getExternalRedisSetupFromPackageJson(),this.subscriptions.push(this.data.eventChannel.subscribe(function(){var i=(0,u.Z)(function*(s){if(s&&s.action===N.F.APPLY_FILTER){const n=t.gridFilter;t.gridFilter=s.data,t.gridFilter.rangeDates=n.rangeDates,yield t.loadInstances(s.data),yield t.logTableSummaryData(s.data),t.logFilterPanelLayoutModelC&&t.logFilterPanelLayoutModelC.hideModal(),yield t.loadGridData(!1)}});return function(s){return i.apply(this,arguments)}}())),this.generalS.setNewTitle("Log Summary")}isExternalLogsSetupDoneByRoot;getExternalRedisSetupFromPackageJson(){var t=this;return(0,u.Z)(function*(){t.loading=!0;try{const i=(yield t.instanceS.getExternalSetupStatus().toPromise()).data;t.loading=!1,!0===i.isLogsSetupDone?(t.isExternalLogsSetupDoneByRoot=!0,t.loadGridData(!1)):t.isExternalLogsSetupDoneByRoot=!1}catch{t.isExternalLogsSetupDoneByRoot=!1}t.cd.detectChanges()})()}loadGridData(t){var i=this;return(0,u.Z)(function*(){const s={find:{user:i.authCS.getUserId()},select:{createdAt:1,success:1,category:1,requestMethod:1,instanceName:1,databaseName:1,collectionName:1,instanceApiName:1,customApiName:1,systemApiName:1,eventName:1,tpApiBundleName:1,apiVersion:1,tpApiName:1,schedulerName:1,webSocketEventName:1,tenantUsername:1,url:1},sort:{_id:-1},limit:i.settings.maxRowsLimit};if(i.setDataForFilterModal(!1),i.gridFilter&&i.logFilterPanelLayoutModelC&&i.logFilterPanelLayoutModelC.setDataInObjectFromEventCenter(i.gridFilter),i.applyFilterInQuery(s.find,i.gridFilter),t){const l=i.responseData?.[0]?._id;l&&(s.find._id={$gt:l})}const n=yield i.logS.query(s).toPromise();if(t){for(const l of i.responseData)l.isNewInGrid=!1;i.responseData=[...n.data,...i.responseData];for(const l of n.data)i.doChangesInLogObject(l,!0)}else{i.responseData=n.data;for(const l of i.responseData)i.doChangesInLogObject(l,!1)}i.generalS.setNewTitle("Log Summary"),i.loading=!1,i.cd.detectChanges()})()}applyFilterInQuery(t,i){if(!i)return;t.$or=[],t.$and=[];const s={category:c.R.CUSTOM_APIS};i?.apisRegex?.allCustomApis?t.$or.push(s):r.isEmpty(i?.queryParams?.functions)||t.$or.push({category:c.R.CUSTOM_APIS,customApiName:{$in:this.customApiNames}});const n={category:c.R.SYSTEM_APIS};i?.apisRegex?.allSystemApis?t.$or.push(n):r.isEmpty(i?.queryParams?.systemApis)||t.$or.push({category:c.R.SYSTEM_APIS,systemApiName:{$in:this.systemApiNames}});const l={category:c.R.INSTANCES};i?.apisRegex?.allInstances?t.$or.push(l):r.isEmpty(i?.queryParams?.instanceIds)||(l.instanceName={$in:this.instanceNames},r.isEmpty(i.queryParams.databaseNames)||(l.databaseName={$in:i.queryParams.databaseNames}),r.isEmpty(i.queryParams.collectionNames)||(l.collectionName={$in:i.queryParams.collectionNames}),r.isEmpty(i.queryParams.supportedApiNames)||(l.instanceApiName={$in:i.queryParams.supportedApiNames}),t.$or.push(l));const g={category:c.R.THIRD_PARTY_APIS};if(i?.apisRegex?.allThirdPartyApis)t.$or.push(g);else if(!r.isEmpty(this.tpApis)||!r.isEmpty(this.tpBundles)||!r.isEmpty(this.tpApiVersions)){const m=r.uniq(r.map(this.tpBundles,"bundleName")),I=r.uniq(r.map(this.tpApiVersions,"apiVersion")),S=r.uniq(r.map(this.tpApis,"apiName")),A={category:c.R.THIRD_PARTY_APIS};r.isEmpty(m)||(A.tpApiBundleName={$in:m}),r.isEmpty(I)||(A.apiVersion={$in:I}),r.isEmpty(S)||(A.tpApiName={$in:S}),t.$or.push(A)}const h={category:c.R.EVENTS};i?.apisRegex?.allEvents?t.$or.push(h):r.isEmpty(i?.queryParams?.eventIds)||t.$or.push({category:c.R.SYSTEM_APIS,eventName:{$in:this.amEventNames}});const v={category:c.R.SCHEDULERS};i?.apisRegex?.allSchedulers?t.$or.push(v):r.isEmpty(i?.queryParams?.schedulersIds)||t.$or.push({category:c.R.SCHEDULERS,schedulerName:{$in:this.schedulersNames}});const C={category:c.R.WEB_SOCKET_EVENT};i?.apisRegex?.allWebSocketEvents?t.$or.push(C):r.isEmpty(i?.queryParams?.webSocketIds)||t.$or.push({category:c.R.WEB_SOCKET_EVENT,webSocketEventName:{$in:this.wsEventsNames}}),i?.rangeDates?.[0]&&t.$and.push({createdAt:{$gte:i.rangeDates[0]}}),i?.rangeDates?.[1]&&t.$and.push({createdAt:{$lte:i.rangeDates[1]}}),r.isEmpty(t.$or)&&delete t.$or,r.isEmpty(t.$and)&&delete t.$and}logTableSummaryData(t){var i=this;return(0,u.Z)(function*(){const s={find:{_id:t?.queryParams.functions},select:{name:1}};i.customApis=(yield i.functionS.query(s).toPromise()).data,i.functionIds=r.map(i.customApis,p.iH._id),i.customApiNames=r.map(i.customApis,p.eb.name);const n=(yield i.instanceS.systemAPIList().toPromise()).data,l=r.keyBy(n,p.iH._id);i.systemsApis=[];for(const m of t?.queryParams.systemApis)l[m]&&i.systemsApis.push(l[m]);i.systemApiIds=r.map(i.systemsApis,p.iH._id),i.systemApiNames=r.map(i.systemsApis,p.aV.name);const g={find:{_id:t?.queryParams.eventIds},select:{name:1}};i.amEvents=(yield i.amEventS.query(g).toPromise()).data,i.amEventIds=r.map(i.amEvents,p.iH._id),i.amEventNames=r.map(i.amEvents,p.l0.name);const h={find:{_id:t?.queryParams.schedulersIds},select:{name:1}};i.schedulersApis=(yield i.schedulerS.query(h).toPromise()).data,i.schedulersIds=r.map(i.schedulersApis,p.iH._id),i.schedulersNames=r.map(i.schedulersApis,p.qH.name);const v=(yield i.webSocketEventsS.getWSEventKGrid({}).toPromise()).data,C=r.keyBy(v,p.iH._id);i.wsEvents=[];for(const m of t?.queryParams.webSocketIds)C[m]&&i.wsEvents.push(C[m]);i.wsEventIds=r.map(i.wsEvents,p.iH._id),i.wsEventsNames=r.map(i.wsEvents,p.of.id),i.calculateThirdPartyApiDataForUI(t)})()}calculateThirdPartyApiDataForUI(t){this.tpBundles=[],this.tpApiVersions=[],this.tpApis=[];for(const i of t.thirdPartyApis)i.level0?this.tpBundles.push(i):i.level1?this.tpApiVersions.push(i):i.level2&&this.tpApis.push(i);this.generalS.getMapOfAllItems(this.allTreeItemsMap,t.thirdPartyApis),this.tpBundleMap=r.map(this.tpBundles,p.iH._id),this.tpApiVersionMap=r.map(this.tpApiVersions,p.iH._id),this.tpApisMap=r.map(this.tpApis,p.iH._id)}loadInstances(t){var i=this;return(0,u.Z)(function*(){const s={find:{_id:t?.queryParams.instanceIds},select:{name:1},sort:{name:1}};i.instances=(yield i.instanceS.query(s).toPromise()).data,i.instanceIds=r.map(i.instances,p.iH._id),i.instanceNames=r.map(i.instances,p.Il.name),yield i.loadDatabases(t)})()}loadDatabases(t){var i=this;return(0,u.Z)(function*(){if(!i.instances)return i.databases=[],i.collections=[],void(i.supportedAPIs=[]);const s=(yield i.instanceS.getDatabases(i.instances,null).toPromise()).data||[],n=r.keyBy(r.flatten(s||[]),p.iH._id);i.databases=[];for(const l of t?.queryParams.databaseIds)n[l]&&i.databases.push(n[l]);i.databaseNames=r.map(i.databases,p.iH._id),yield i.loadCollection(t)})()}loadCollection(t){var i=this;return(0,u.Z)(function*(){if(!i.instances||!i.databases)return i.collections=[],void(i.supportedAPIs=[]);const s=(yield i.instanceS.getCollections(i.databases,null).toPromise()).data||[],n=r.keyBy(r.flatten(s||[]),p.iH._id);i.collections=[];for(const l of t?.queryParams.collectionIds)n[l]&&i.collections.push(n[l]);i.collectionNames=r.map(i.collections,p.iH._id),yield i.loadSupportedApis(t)})()}loadSupportedApis(t){var i=this;return(0,u.Z)(function*(){i.instances&&i.databases&&i.collections?(i.supportedAPIs=[],i.supportedAPIs=t.supportedAPIs||[],i.supportedApiNames=r.map(i.supportedAPIs,p.iH._id)):i.supportedAPIs=[]})()}doChangesInLogObject(t,i){t.createdAt=moment(t.createdAt).format(this.constantsCS.DATETIME_FORMAT_USER_WITH_SECONDS),t.isNewInGrid=i,t.category===c.R.INSTANCES?t.logNameForUI=[[t.instanceName,t.tenantUsername].filter(s=>!!s).join("::"),t.databaseName,t.collectionName,t.instanceApiName].filter(s=>!!s).join(" \u2192 "):t.category===c.R.CUSTOM_APIS?t.logNameForUI=t.customApiName:t.category===c.R.SYSTEM_APIS?t.logNameForUI=t.eventName?t.eventName:t.systemApiName:t.category===c.R.SCHEDULERS?t.logNameForUI=t.schedulerName:t.category===c.R.WEB_SOCKET_EVENT?t.logNameForUI=t.webSocketEventName:t.category===c.R.THIRD_PARTY_APIS&&(t.logNameForUI=t.tpApiBundleName+" \u2192 "+t.apiVersion+" \u2192 "+t.tpApiName)}showFilterPanelModel(){this.data.formData=void 0,this.data.mode=E.D.ADD,this.setDataForFilterModal(!0),this.logFilterPanelLayoutModelC.showModal()}instanceClickData(t){var i=this;return(0,u.Z)(function*(){const s=[];for(const n of t){i.instances.splice(i.instances.indexOf(n),1);for(const l of i.databases)l.instanceId===n._id&&s.push(l)}i.instanceIds=r.map(i.instances,p.iH._id),i.instanceNames=r.map(i.instances,p.Il.name),i.eventCenterS.filterInLog.instanceIds.next(i.instanceIds),i.removeDbClick(s)})()}removeDbClick(t){const i=[];for(const s of t){this.databases.splice(this.databases.indexOf(s),1);for(const n of this.collections)n.instanceName===s.instanceName&&n.databaseName===s.db&&i.push(n)}this.databaseNames=r.map(this.databases,p.iH._id),this.eventCenterS.filterInLog.databaseIds.next(this.databaseNames),this.removeCollectionClick(i)}removeCollectionClick(t){const i=[];for(const s of t){this.collections.splice(this.collections.indexOf(s),1);for(const n of this.supportedAPIs)s.instanceName&&n.databaseName===s.databaseName&&n.collectionName===s.name&&i.push(n)}this.collectionNames=r.map(this.collections,p.iH._id),this.eventCenterS.filterInLog.collectionIds.next(this.collectionNames),this.removeApiClick(i)}removeApiClick(t){for(const i of t)this.supportedAPIs.splice(this.supportedAPIs.indexOf(i),1);this.supportedApiNames=r.map(this.supportedAPIs,p.iH._id),this.eventCenterS.filterInLog.supportedApiIds.next(this.supportedApiNames),this.setRegexOnRemove()}setRegexOnRemove(){(0===this.instances.length||0===this.databases.length||0===this.collections.length||0===this.supportedAPIs.length)&&(this.gridFilter.apisRegex={})}customApisClick(t){this.customApis.splice(this.customApis.indexOf(t),1),this.functionIds=r.map(this.customApis,p.iH._id),this.customApiNames=r.map(this.customApis,p.eb.name),this.eventCenterS.filterInLog.functionIds.next(this.functionIds)}systemsApisClick(t){this.systemsApis.splice(this.systemsApis.indexOf(t),1),this.systemApiIds=r.map(this.systemsApis,p.iH._id),this.systemApiNames=r.map(this.systemsApis,p.aV.name),this.eventCenterS.filterInLog.systemApiIds.next(this.systemApiIds)}amEventsClick(t){this.amEvents.splice(this.amEvents.indexOf(t),1),this.amEventIds=r.map(this.amEvents,p.iH._id),this.amEventNames=r.map(this.amEvents,p.l0.name),this.eventCenterS.filterInLog.eventIds.next(this.amEventIds)}schedulersClick(t){this.schedulersApis.splice(this.schedulersApis.indexOf(t),1),this.schedulersIds=r.map(this.schedulersApis,p.iH._id),this.schedulersNames=r.map(this.schedulersApis,p.qH.name),this.eventCenterS.filterInLog.schedulersIds.next(this.schedulersIds)}wsEventClick(t){this.wsEvents.splice(this.wsEvents.indexOf(t),1),this.wsEventIds=r.map(this.wsEvents,p.iH._id),this.wsEventsNames=r.map(this.wsEvents,p.of.id),this.eventCenterS.filterInLog.webSocketIds.next(this.wsEventIds)}npmPackageClickData(t,i){"L_1"===i?this.bundleAndVersionAndApiRemove(t):"L_2"===i?this.allTreeItemsMap[t._id]&&this.apiVersionClickData(this.allTreeItemsMap[t._id]):"L_3"===i&&this.allTreeItemsMap[t._id]&&this.tpApiClickData(this.allTreeItemsMap[t._id])}bundleAndVersionAndApiRemove(t){if(t.level0&&this.tpBundles.indexOf(t)>=0){for(const i of t.children||[])this.apiVersionClickData(i);this.tpBundles.splice(this.tpBundles.indexOf(t),1)}this.tpBundleMap=r.map(this.tpBundles,p.iH._id),this.apiVersionClickData(t)}apiVersionClickData(t){t.level1&&this.tpApiVersions.indexOf(t)>=0&&this.tpApiVersions.splice(this.tpApiVersions.indexOf(t),1),this.tpApiVersionMap=r.map(this.tpApiVersions,p.iH._id),this.tpApiClickData(t)}tpApiClickData(t){if(t.level1)for(const i of t.children||[])this.tpApis.indexOf(i)>=0&&this.tpApis.splice(this.tpApis.indexOf(i),1);else if(t.level0)for(const i of t.children||[])for(const s of i.children||[])this.tpApis.indexOf(s)>=0&&this.tpApis.splice(this.tpApis.indexOf(s),1);else t.level2&&this.tpApis.indexOf(t)>=0&&this.tpApis.splice(this.tpApis.indexOf(t),1);this.tpApisMap=r.map(this.tpApis,p.iH._id)}setDataForFilterModal(t){this.eventCenterS.filterInLog.instanceIds.next(this.instanceIds?this.instanceIds:[]),this.eventCenterS.filterInLog.functionIds.next(this.functionIds?this.functionIds:[]),this.eventCenterS.filterInLog.systemApiIds.next(this.systemApiIds?this.systemApiIds:[]),this.eventCenterS.filterInLog.eventIds.next(this.amEventIds?this.amEventIds:[]),this.eventCenterS.filterInLog.schedulersIds.next(this.schedulersIds?this.schedulersIds:[]),this.eventCenterS.filterInLog.webSocketIds.next(this.wsEventIds?this.wsEventIds:[]),this.eventCenterS.filterInLog.databaseIds.next(this.databaseNames?this.databaseNames:[]),this.eventCenterS.filterInLog.collectionIds.next(this.collectionNames?this.collectionNames:[]),this.eventCenterS.filterInLog.supportedApiIds.next(this.supportedApiNames?this.supportedApiNames:[]);const i=[...this.tpBundleMap,...this.tpApiVersionMap,...this.tpApisMap];this.eventCenterS.filterInLog.thirdPartyApiIds.next(i.length?i:[]),t&&this.eventCenterS.filterInLog.refreshGrid.next(Math.random())}clearAllLogsDialog(){var t=this;return(0,u.Z)(function*(){var i;t.confirmationService.confirm({message:t.constantsS.logTable.clearAllLogsConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(i=(0,u.Z)(function*(){yield t.clearAllLogs()}),function(){return i.apply(this,arguments)})})})()}clearAllLogs(){var t=this;return(0,u.Z)(function*(){yield t.logS.clearUserLogs(t.authCS.getUserId()).toPromise(),t.loadGridData(!1)})()}refresh(){var t=this;return(0,u.Z)(function*(){t.loadGridData(!0)})()}clearDate(){this.gridFilter.rangeDates=void 0}selectedRows=[];gridKey=p.iH._id;dblClickLogs(){var t=this;return(0,u.Z)(function*(){yield t.logDetailsLayoutModelC.showModal(t.selectedRows)})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(i){return new(i||a)(e.Y36(D.e),e.Y36(Y.D),e.Y36(F.b),e.Y36(G.E),e.Y36(K.d),e.Y36(L.u),e.Y36(V.Z),e.Y36(j.l),e.Y36(W.a),e.Y36(X.B),e.Y36(Z.YP),e.Y36(b.L),e.Y36(M.s),e.Y36(e.sBO))};static \u0275cmp=e.Xpm({type:a,selectors:[["app-log-table-c"]],viewQuery:function(i,s){if(1&i&&(e.Gf(Pe,5),e.Gf(Ne,5)),2&i){let n;e.iGM(n=e.CRH())&&(s.logFilterPanelLayoutModelC=n.first),e.iGM(n=e.CRH())&&(s.logDetailsLayoutModelC=n.first)}},decls:5,vars:2,consts:[["class","pt-1 pl-1 pr-1",4,"ngIf"],[3,"data"],["logFilterPanelLayoutModelC",""],["logDetailsLayoutModelC",""],[1,"pt-1","pl-1","pr-1"],["class","overflow-hidden","style","height: calc(100vh - 46px);",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,"card","shadow-sm","h-100"],[1,"card-header"],[1,"fas","fa-table","text-yellow","fa-fw","mr-1"],[1,"float-right"],["href","https://docs.apimaker.dev/v1/docs/logs/log-table.html","target","_blank"],[1,"fa-fw","ml-3","mr-1","mt-n1",2,"font-size","25px",3,"src"],["tooltipPosition","left","pTooltip","Apply Filter",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-check","fa-fw","align-middle","text-success"],["tooltipPosition","left","pTooltip","Show Filter Modal",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fa","fa-filter","text-yellow","fa-fw"],[1,"card-body","p-0","overflow-auto",2,"height","278px"],[1,"table","table-striped","table-sm","mb-0"],[1,"w-10-nowrap","text-right","font-weight-bold","border-right","pr-2","pl-2"],[1,"border-right"],["class","text-center text-success",4,"ngIf"],[4,"ngIf"],["colspan","4",4,"ngIf"],["class","border-right",4,"ngIf"],["colspan","2",4,"ngIf"],["colspan","4"],[1,"w-10-nowrap","text-right","font-weight-bold","border-right","pr-2","pl-2","pt-2"],[1,"mt-1","d-inline-block"],["colspan","4",1,""],["appendTo","body","selectionMode","range","dateFormat","dd-M-yy","inputId","filterDatePickerId",1,"form-control-sm",3,"ngModel","showIcon","showButtonBar","readonlyInput","ngModelChange"],["pTooltip","Clear",1,"cursor-pointer",3,"click"],[1,"fas","fa-ban","fa-fw","ml-4","align-middle","text-danger"],[1,"card","shadow-sm","h-100","mt-2"],["alt","Log Table",1,"fa-fw","mr-1",3,"src"],["tooltipPosition","left","pTooltip","Show Apply Filter",1,"float-right","cursor-pointer","ml-3",3,"click"],["tooltipPosition","left","pTooltip","Clear All Logs",1,"float-right","cursor-pointer","ml-3","text-danger",3,"click"],[1,"far","fa-trash-alt","text-danger","fa-fw"],["tooltipPosition","left","pTooltip","Refresh Logs",1,"float-right","cursor-pointer","ml-3","text-success",3,"click"],[1,"fas","fa-sync-alt","text-info","fa-fw"],[1,"overflow-hidden"],[2,"height","calc(100vh - 418px)","width","calc(100% - 2px)"],["styleClass","p-datatable-striped","scrollHeight","flex",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","paginator","rows","rowsPerPageOptions","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],[1,"text-center","text-success"],["class","ml-1","styleClass","bg-danger text-dark",4,"ngFor","ngForOf"],["styleClass","bg-danger text-dark",1,"ml-1"],[1,"fas","fa-times-circle","cursor-pointer",3,"click"],["class","ml-1","styleClass","bg-warning text-dark",4,"ngFor","ngForOf"],["styleClass","bg-warning text-dark",1,"ml-1"],["class","ml-1","styleClass","bg-info text-dark",4,"ngFor","ngForOf"],["styleClass","bg-info text-dark",1,"ml-1"],["class","ml-1","styleClass","bg-light text-dark",4,"ngFor","ngForOf"],["styleClass","bg-light text-dark",1,"ml-1"],["colspan","2"],[1,"text-center",2,"width","80px"],[2,"width","200px"],[2,"width","130px"],[2,"width","100px"],[3,"pSelectableRow"],[1,"text-center",3,"ngClass"],[1,"text-nowrap",3,"ngClass"],[1,"small","font-weight-bold","mr-3",3,"ngClass"],[1,"text-nowrap",3,"ngStyle","ngClass"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(i,s){1&i&&(e.YNc(0,At,4,3,"div",0),e._UZ(1,"app-log-filter-panel-layout-model",1,2)(3,"app-log-details-layout-model",null,3)),2&i&&(e.Q6J("ngIf",void 0!==s.isExternalLogsSetupDoneByRoot),e.xp6(1),e.Q6J("data",s.data))},dependencies:[R.JJ,R.On,_.mk,_.sg,_.O5,_.PC,x.iA,Z.jx,x.Ei,q.G,w.u,z.f,ee.A,fe,be,qe.w],styles:[".table th,.table td{border-top:none}#filterDatePickerId,.w-date-input{width:210px}\n"],encapsulation:2,changeDetection:0})}return a})();var Zt=d(70292),xt=d(1678),It=d(64211),St=d(21434),Lt=d(84186),bt=d(95765),qt=d(2777),Pt=d(57705),Nt=d(31558),Et=d(38125);const Dt=[{path:"main",component:Tt,canActivate:[B.P]}];let Ft=(()=>{class a{static \u0275fac=function(i){return new(i||a)};static \u0275mod=e.oAB({type:a});static \u0275inj=e.cJS({imports:[J.Bz.forChild(Dt),Q.u,Zt.ApiTestingM,xt.DashboardM,It.DbCellM,St.B,Lt.SystemApiM,bt.FunctionManM,qt.u,Pt.L,Nt.SchedulerManM,Et.AmEventsM,H.WebSocketEventsM]})}return a})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[885],{38487:(le,x,r)=>{r.d(x,{L:()=>se});var O=r(15861),e=r(60095),h=r(51162),g=r(90328),p=r(33157),T=r(39490),t=r(94946),P=r(99961),w=r(31042),D=r(77240),S=r(27414),W=r(95852),K=r(45809),U=r(81429),J=r(25405),y=r(96814),G=r(32660),R=r(85219),H=r(97680),Y=r(53965),k=r(38057),Q=r(44879);function V(l,f){1&l&&(t.TgZ(0,"span"),t._UZ(1,"i",32),t._uU(2," Add Interval"),t.qZA())}function q(l,f){1&l&&(t.TgZ(0,"span"),t._UZ(1,"i",33),t._uU(2," View Interval"),t.qZA())}function z(l,f){1&l&&(t.TgZ(0,"span"),t._UZ(1,"i",34),t._uU(2," Edit Interval"),t.qZA())}function F(l,f){if(1&l&&(t.TgZ(0,"span",38),t._uU(1),t.qZA()),2&l){const a=t.oxw().$implicit;t.xp6(1),t.Oqu(a.offset)}}function j(l,f){if(1&l&&(t.TgZ(0,"span",35)(1,"span",36),t._uU(2),t.qZA(),t.YNc(3,F,2,1,"span",37),t.qZA()),2&l){const a=f.$implicit;t.xp6(2),t.Oqu(a.zone||a.id),t.xp6(1),t.Q6J("ngIf",a.offset)}}function X(l,f){if(1&l&&(t.TgZ(0,"span",39)(1,"span",36),t._uU(2),t.qZA(),t.TgZ(3,"span",38),t._uU(4),t.qZA()()),2&l){const a=f.$implicit;t.xp6(2),t.Oqu(a.zone),t.xp6(2),t.Oqu(a.offset)}}const ee=function(l,f){return{"fa-check-circle":l,"fa-times-circle":f}};function N(l,f){if(1&l&&t._UZ(0,"i",48),2&l){const a=t.oxw(2);t.Q6J("ngClass",t.WLB(1,ee,"valid"===a.cronStatus,"invalid"===a.cronStatus))}}function te(l,f){if(1&l&&(t.TgZ(0,"div",49),t._UZ(1,"i",50),t.TgZ(2,"span"),t._uU(3),t.qZA()()),2&l){const a=t.oxw(2);t.ekj("cron-status--ok","valid"===a.cronStatus)("cron-status--err","invalid"===a.cronStatus),t.xp6(1),t.Q6J("ngClass","valid"===a.cronStatus?"fa-check":"fa-exclamation-triangle"),t.xp6(2),t.Oqu(a.cronMessage)}}function ne(l,f){if(1&l){const a=t.EpF();t.TgZ(0,"div",13)(1,"label",14),t._uU(2,"Custom"),t.qZA(),t.TgZ(3,"div",15)(4,"div",40)(5,"input",41),t.NdJ("input",function(){t.CHM(a);const s=t.oxw();return t.KtG(s.onCronInput())}),t.qZA(),t.YNc(6,N,1,4,"i",42),t.qZA(),t.YNc(7,te,4,6,"div",43),t.TgZ(8,"div",44)(9,"span",45),t._uU(10,"sec \xb7 min \xb7 hour \xb7 day-of-month \xb7 month \xb7 day-of-week"),t.qZA(),t.TgZ(11,"a",46),t._UZ(12,"i",47),t._uU(13," Reference"),t.qZA()()()()}if(2&l){const a=t.oxw();t.xp6(4),t.ekj("is-valid","valid"===a.cronStatus)("is-invalid","invalid"===a.cronStatus),t.xp6(2),t.Q6J("ngIf","empty"!==a.cronStatus),t.xp6(1),t.Q6J("ngIf","empty"!==a.cronStatus)}}function B(l,f){1&l&&(t.TgZ(0,"div",51)(1,"div",52)(2,"div",53)(3,"div",54),t._UZ(4,"i",55),t._uU(5," Custom CRON writing guide"),t.qZA(),t.TgZ(6,"div",56)(7,"div",57)(8,"span",58),t._uU(9,"Seconds"),t.qZA(),t.TgZ(10,"span",59),t._uU(11,"0\u201359"),t.qZA()(),t.TgZ(12,"div",57)(13,"span",58),t._uU(14,"Minutes"),t.qZA(),t.TgZ(15,"span",59),t._uU(16,"0\u201359"),t.qZA()(),t.TgZ(17,"div",57)(18,"span",58),t._uU(19,"Hours"),t.qZA(),t.TgZ(20,"span",59),t._uU(21,"0\u201323"),t.qZA()(),t.TgZ(22,"div",57)(23,"span",58),t._uU(24,"Day of Month"),t.qZA(),t.TgZ(25,"span",59),t._uU(26,"1\u201331"),t.qZA()(),t.TgZ(27,"div",57)(28,"span",58),t._uU(29,"Months"),t.qZA(),t.TgZ(30,"span",59),t._uU(31,"0\u201311 "),t.TgZ(32,"span",60),t._uU(33,"(Jan\u2013Dec)"),t.qZA()()(),t.TgZ(34,"div",57)(35,"span",58),t._uU(36,"Day of Week"),t.qZA(),t.TgZ(37,"span",59),t._uU(38,"0\u20136 "),t.TgZ(39,"span",60),t._uU(40,"(Sun\u2013Sat)"),t.qZA()()()(),t.TgZ(41,"div",61),t._UZ(42,"i",62),t.TgZ(43,"span")(44,"a",63),t._uU(45,"crontab.guru reference"),t.qZA(),t._uU(46," has only 5 fields \u2014 this expression supports "),t.TgZ(47,"b"),t._uU(48,"6 fields"),t.qZA(),t._uU(49," (precision up to seconds)."),t.qZA()()()()())}function oe(l,f){1&l&&(t.TgZ(0,"span"),t._uU(1,"Save"),t.qZA())}function ae(l,f){1&l&&(t.TgZ(0,"span"),t._uU(1,"Update interval"),t.qZA())}function re(l,f){if(1&l){const a=t.EpF();t.TgZ(0,"button",64),t.NdJ("click",function(){t.CHM(a);const s=t.oxw();return t.KtG(s.save())}),t._UZ(1,"i",65),t.YNc(2,oe,2,0,"span",4),t.YNc(3,ae,2,0,"span",4),t.qZA()}if(2&l){const a=t.oxw();t.Q6J("disabled",a.form.invalid),t.xp6(2),t.Q6J("ngIf",a.data.mode===a.EFormMode.ADD),t.xp6(1),t.Q6J("ngIf",a.data.mode===a.EFormMode.EDIT)}}function ie(l,f){1&l&&t._UZ(0,"p-progressSpinner",66)}let se=(()=>{class l{fb;ns;schedulerS;generalS;constantsS;authCS;monacoS;dataProviderS;eventCenterCS;data;loading={form:!1};EFormMode=g.D;form;ESchedulerInterval=T.M;subscriptions=[];intervalList=[];timezoneList=[];cronStatus="empty";cronMessage="";cronFields=[{label:"Seconds",min:0,max:59},{label:"Minutes",min:0,max:59},{label:"Hours",min:0,max:23},{label:"Day of Month",min:1,max:31},{label:"Months",min:0,max:11},{label:"Day of Week",min:0,max:6}];constructor(a,_,s,m,u,I,M,b,Z){this.fb=a,this.ns=_,this.schedulerS=s,this.generalS=m,this.constantsS=u,this.authCS=I,this.monacoS=M,this.dataProviderS=b,this.eventCenterCS=Z}ngOnInit(){var a=this;this.intervalList=this.dataProviderS.getSchedulerIntervals(),this.timezoneList=this.buildTimeZoneList(this.dataProviderS.getTimeZones()),this.createForm(),this.subscriptions.push(this.data.eventChannel.subscribe(function(){var _=(0,O.Z)(function*(s){s&&(a.form.enable(),s.action===p.F.OPEN_FORM_IN_EDIT_MODE?(a.form.reset(),a.form.patchValue(a.data.formData)):s.action===p.F.OPEN_FORM_IN_VIEW_MODE?(a.form.patchValue(a.data.formData),a.form.reset(),a.form.disable()):s.action===p.F.OPEN_FORM_IN_ADD_MODE&&(a.form.reset(),a.form.get("active").setValue(!1)))});return function(s){return _.apply(this,arguments)}}()))}buildTimeZoneList(a){const _=(a||[]).map(s=>{const m=this.getTimeZoneOffsetMinutes(s.id),u=this.formatOffset(m);return{id:s.id,data:m,name:`${s.id} (${u})`,zone:s.id,offset:u}});return _.sort((s,m)=>s.data-m.data||s.id.localeCompare(m.id)),_}getTimeZoneOffsetMinutes(a){try{const _=new Date,s=new Intl.DateTimeFormat("en-US",{timeZone:a,hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}),m={};for(const b of s.formatToParts(_))m[b.type]=b.value;const I=Date.UTC(+m.year,+m.month-1,+m.day,"24"===m.hour?0:+m.hour,+m.minute,+m.second),M=1e3*Math.floor(_.getTime()/1e3);return Math.round((I-M)/6e4)}catch{return 0}}formatOffset(a){const _=a<0?"-":"+",s=Math.abs(a);return`UTC${_}${String(Math.floor(s/60)).padStart(2,"0")}:${String(s%60).padStart(2,"0")}`}createForm(){this.form=this.fb.group({timeZone:[null,[e.kI.required]],timeInterval:[null,[e.kI.required]],customInterval:[null,[]],active:[null,[]]}),this.manageValidations()}showModal(){$("#idIntervals").modal("show"),this.form.get(h._h.active).setValue(!0)}hideModal(){$("#idIntervals").modal("hide")}cronValidator=a=>{const _=(a.value||"").trim();if(!_)return{required:!0};const s=this.validateCron(_);return s?{cron:s}:null};manageValidations(){const a=this.form.get("timeInterval"),_=this.form.get("customInterval");a.valueChanges.subscribe(s=>{s===T.M.CUSTOM?_.setValidators([e.kI.required,this.cronValidator]):(_.setValidators([]),this.cronStatus="empty",this.cronMessage=""),_.updateValueAndValidity(),this.onCronInput()})}onCronInput(){const a=(this.form.get("customInterval").value||"").trim();if(!a)return this.cronStatus="empty",void(this.cronMessage="");const _=this.validateCron(a);_?(this.cronStatus="invalid",this.cronMessage=_):(this.cronStatus="valid",this.cronMessage="Valid 6-field CRON expression.")}validateCron(a){const _=a.trim().split(/\s+/);if(6!==_.length)return`Expected 6 fields (sec min hour day-of-month month day-of-week), got ${_.length}.`;for(let s=0;s<6;s++){const m=this.cronFields[s],u=this.validateCronField(_[s],m.min,m.max);if(u)return`${m.label}: ${u}`}return""}validateCronField(a,_,s){if("*"===a)return"";for(const m of a.split(",")){if(!m)return`empty value in "${a}".`;const[u,I]=m.split("/");if(void 0!==I){const M=Number(I);if(!Number.isInteger(M)||M<=0)return`invalid step "/${I}".`}if("*"!==u)if(u.includes("-")){const[M,b]=u.split("-"),Z=Number(M),L=Number(b);if(!Number.isInteger(Z)||!Number.isInteger(L))return`invalid range "${u}".`;if(Z<_||L>s||Z>L)return`range "${u}" out of bounds (${_}-${s}).`}else{const M=Number(u);if(!Number.isInteger(M))return`"${u}" is not a number.`;if(M<_||M>s)return`"${u}" out of bounds (${_}-${s}).`}}return""}save(){var a=this;return(0,O.Z)(function*(){const _=a.form.value;try{if(a.data.mode===g.D.ADD)a.eventCenterCS.intervalArr.next(_);else if(a.data.mode===g.D.EDIT){const s=Object.assign(a.data.formData,_);a.eventCenterCS.intervalArr.next(s)}a.data.eventChannel.emit({action:a.data.mode===g.D.ADD?p.F.SAVED:p.F.UPDATED})}catch(s){console.log(s)}})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(_){return new(_||l)(t.Y36(e.qu),t.Y36(P.W),t.Y36(w.Z),t.Y36(D.b),t.Y36(S.L),t.Y36(W.D),t.Y36(K.b),t.Y36(U.B),t.Y36(J.M))};static \u0275cmp=t.Xpm({type:l,selectors:[["app-intervals-add-edit"]],inputs:{data:"data"},decls:45,vars:16,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idIntervals","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"],[1,"float-right"],["aria-label","Close","data-dismiss","modal","type","button",1,"close"],["aria-hidden","true"],[1,"fas","fa-window-close"],["href","https://docs.apimaker.dev/v1/docs/apis-all/schedulers/user-created-schedulers-api.html#interval-time","target","_blank"],[1,"fa-fw","ml-3","mr-1","mt-n1",2,"font-size","25px",3,"src"],[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-8"],[1,"input-group","input-group-sm","flex-nowrap","interval-every-group"],[1,"input-group-prepend"],["id","spanTimeInterval",1,"input-group-text"],["formControlName","timeInterval","optionLabel","name","optionValue","id","filterBy","name","appendTo","body","styleClass","w-100 p-input-filled",3,"options","filter"],["formControlName","timeZone","optionLabel","name","optionValue","id","filterBy","name","appendTo","body","panelStyleClass","tz-dropdown-panel","styleClass","w-100 p-input-filled",3,"options","filter"],["pTemplate","selectedItem"],["pTemplate","item"],[1,"col-8","pt-1"],["formControlName","active",3,"binary"],["class","form-group row",4,"ngIf"],["class","form-group row mt-4",4,"ngIf"],[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"],[1,"tz-row"],[1,"tz-row__zone"],["class","tz-row__offset",4,"ngIf"],[1,"tz-row__offset"],[1,"tz-row","tz-row--item"],[1,"cron-input-wrap"],["formControlName","customInterval","name","customInterval","placeholder","* * * * * *","spellcheck","false","type","text",1,"form-control","form-control-sm","font-monospaced","cron-input",3,"input"],["class","cron-input__icon fas fa-fw",3,"ngClass",4,"ngIf"],["class","cron-status",3,"cron-status--ok","cron-status--err",4,"ngIf"],[1,"cron-legend"],[1,"cron-legend__order"],["href","https://crontab.guru","target","_blank",1,"cron-legend__ref"],[1,"fas","fa-external-link-alt","fa-fw"],[1,"cron-input__icon","fas","fa-fw",3,"ngClass"],[1,"cron-status"],[1,"fas","fa-fw",3,"ngClass"],[1,"form-group","row","mt-4"],[1,"col-12"],[1,"cron-guide"],[1,"cron-guide__head"],[1,"fas","fa-clock","fa-fw","mr-2"],[1,"cron-guide__body"],[1,"cron-field"],[1,"cron-field__name"],[1,"cron-field__val"],[1,"cron-field__note"],[1,"cron-guide__note"],[1,"fas","fa-info-circle","fa-fw","mr-1"],["href","https://crontab.guru","target","_blank"],["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(_,s){1&_&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),t.YNc(4,V,3,0,"span",4),t.YNc(5,q,3,0,"span",4),t.YNc(6,z,3,0,"span",4),t.TgZ(7,"div",5)(8,"button",6)(9,"span",7),t._UZ(10,"i",8),t.qZA()(),t.TgZ(11,"a",9),t._UZ(12,"img",10),t.ALo(13,"themeIcon"),t.qZA()()(),t.TgZ(14,"div",11)(15,"form",12)(16,"div",13)(17,"label",14),t._uU(18,"Time Interval"),t.qZA(),t.TgZ(19,"div",15)(20,"div",16)(21,"div",17)(22,"span",18),t._uU(23,"Every"),t.qZA()(),t._UZ(24,"p-dropdown",19),t.qZA()()(),t.TgZ(25,"div",13)(26,"label",14),t._uU(27,"Time Zone"),t.qZA(),t.TgZ(28,"div",15)(29,"p-dropdown",20),t.YNc(30,j,4,2,"ng-template",21),t.YNc(31,X,5,2,"ng-template",22),t.qZA()()(),t.TgZ(32,"div",13)(33,"label",14),t._uU(34,"Active"),t.qZA(),t.TgZ(35,"div",23),t._UZ(36,"p-checkbox",24),t.qZA()(),t.YNc(37,ne,14,6,"div",25),t.YNc(38,B,50,0,"div",26),t.qZA()(),t.TgZ(39,"div",27)(40,"button",28),t._UZ(41,"i",29),t._uU(42," Close"),t.qZA(),t.YNc(43,re,4,3,"button",30),t.qZA(),t.YNc(44,ie,1,0,"p-progressSpinner",31),t.qZA()()()),2&_&&(t.xp6(4),t.Q6J("ngIf",s.data.mode===s.EFormMode.ADD),t.xp6(1),t.Q6J("ngIf",s.data.mode===s.EFormMode.VIEW),t.xp6(1),t.Q6J("ngIf",s.data.mode===s.EFormMode.EDIT),t.xp6(6),t.Q6J("src",t.lcZ(13,14,"/assets/images/logo/logo_docs.svg"),t.LSH),t.xp6(3),t.Q6J("formGroup",s.form),t.xp6(9),t.Q6J("options",s.intervalList)("filter",!0),t.xp6(5),t.Q6J("options",s.timezoneList)("filter",!0),t.xp6(7),t.Q6J("binary",!0),t.xp6(1),t.Q6J("ngIf",s.form.get("timeInterval").value===s.ESchedulerInterval.CUSTOM),t.xp6(1),t.Q6J("ngIf",s.form.get("timeInterval").value===s.ESchedulerInterval.CUSTOM),t.xp6(5),t.Q6J("ngIf",s.data.mode!==s.EFormMode.VIEW),t.xp6(1),t.Q6J("ngIf",s.loading.form))},dependencies:[e._Y,e.Fj,e.JJ,e.JL,e.sg,e.u,y.mk,y.O5,G.y,R.jx,H.G,Y.Lt,k.XZ,Q.w],styles:[".interval-every-group[_ngcontent-%COMP%]{align-items:stretch}.interval-every-group[_ngcontent-%COMP%] .input-group-prepend[_ngcontent-%COMP%]{flex:0 0 auto}.interval-every-group[_ngcontent-%COMP%] .input-group-text[_ngcontent-%COMP%]{display:flex;align-items:center;border-top-right-radius:0;border-bottom-right-radius:0;border-right:0}.interval-every-group[_ngcontent-%COMP%] p-dropdown[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0;display:block}.interval-every-group[_ngcontent-%COMP%] .p-dropdown{width:100%;border-top-left-radius:0!important;border-bottom-left-radius:0!important}[_nghost-%COMP%] .modal-body{padding:1.25rem 1.5rem!important}.container[_ngcontent-%COMP%] .form-group.row[_ngcontent-%COMP%]{margin-bottom:1.25rem}.cron-guide[_ngcontent-%COMP%]{border:1px solid rgba(97,175,239,.2);border-radius:10px;overflow:hidden;background:rgba(97,175,239,.04)}.cron-guide__head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:.6rem 1rem;font-weight:700;font-size:.95rem;color:#61afef;background:linear-gradient(90deg,rgba(12,83,164,.2) 0%,rgba(0,137,63,.12) 100%);border-bottom:1px solid rgba(97,175,239,.18)}.cron-guide__body[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:.4rem;padding:1rem 1.5rem}.cron-field[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.35rem .7rem;border-radius:6px;background:rgba(8,14,22,.3);border:1px solid rgba(97,175,239,.12)}.cron-field__name[_ngcontent-%COMP%]{font-size:.82rem;color:#c7d2e0;font-weight:600}.cron-field__val[_ngcontent-%COMP%]{font-family:JetBrains Mono,monospace;font-size:.82rem;color:#6fdcaa}.cron-field__note[_ngcontent-%COMP%]{color:#8ea3bd;font-size:.74rem}.cron-guide__note[_ngcontent-%COMP%]{display:flex;align-items:flex-start;padding:.6rem 1rem;font-size:.78rem;line-height:1.45;color:#9fb3cc;border-top:1px solid rgba(97,175,239,.15);background:rgba(8,14,22,.2)}.cron-guide__note[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#2fb36a}.cron-guide__note[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{color:#d7dae0}html.LIGHT[_nghost-%COMP%] .cron-guide[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .cron-guide[_ngcontent-%COMP%]{border-color:#0c53a433;background:rgba(12,83,164,.03)}html.LIGHT[_nghost-%COMP%] .cron-guide__head[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .cron-guide__head[_ngcontent-%COMP%]{color:#0c53a4;background:linear-gradient(90deg,rgba(12,83,164,.12) 0%,rgba(0,137,63,.08) 100%);border-bottom-color:#0c53a42e}html.LIGHT[_nghost-%COMP%] .cron-field[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .cron-field[_ngcontent-%COMP%]{background:#f1f5fa;border-color:#0c53a424}html.LIGHT[_nghost-%COMP%] .cron-field__name[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .cron-field__name[_ngcontent-%COMP%]{color:#2b3340}html.LIGHT[_nghost-%COMP%] .cron-field__val[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .cron-field__val[_ngcontent-%COMP%]{color:#1d8a4e}html.LIGHT[_nghost-%COMP%] .cron-field__note[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .cron-field__note[_ngcontent-%COMP%]{color:#6b7686}html.LIGHT[_nghost-%COMP%] .cron-guide__note[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .cron-guide__note[_ngcontent-%COMP%]{color:#5a6a82;border-top-color:#0c53a426;background:rgba(12,83,164,.02)}html.LIGHT[_nghost-%COMP%] .cron-guide__note[_ngcontent-%COMP%] a[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .cron-guide__note[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#1d8a4e}html.LIGHT[_nghost-%COMP%] .cron-guide__note[_ngcontent-%COMP%] b[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .cron-guide__note[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{color:#243446}.cron-input-wrap[_ngcontent-%COMP%]{position:relative;display:flex}.cron-input[_ngcontent-%COMP%]{padding-right:2rem;letter-spacing:.04em}.cron-input__icon[_ngcontent-%COMP%]{position:absolute;top:50%;right:.55rem;transform:translateY(-50%);font-size:.95rem;pointer-events:none}.cron-input-wrap.is-valid[_ngcontent-%COMP%] .cron-input[_ngcontent-%COMP%]{border-color:#2fb36a99!important}.cron-input-wrap.is-valid[_ngcontent-%COMP%] .cron-input__icon[_ngcontent-%COMP%]{color:#2fb36a}.cron-input-wrap.is-invalid[_ngcontent-%COMP%] .cron-input[_ngcontent-%COMP%]{border-color:#dc262699!important}.cron-input-wrap.is-invalid[_ngcontent-%COMP%] .cron-input__icon[_ngcontent-%COMP%]{color:#ff6b6b}.cron-status[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.4rem;margin-top:.4rem;font-size:.78rem;line-height:1.4}.cron-status--ok[_ngcontent-%COMP%]{color:#2fb36a}.cron-status--err[_ngcontent-%COMP%]{color:#ff6b6b}.cron-legend[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-top:.45rem}.cron-legend__order[_ngcontent-%COMP%]{font-family:JetBrains Mono,monospace;font-size:.7rem;color:#8ea3bd}.cron-legend__ref[_ngcontent-%COMP%]{font-size:.75rem;color:#2fb36a;white-space:nowrap}html.LIGHT[_nghost-%COMP%] .cron-status--ok[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .cron-status--ok[_ngcontent-%COMP%]{color:#1d8a4e}html.LIGHT[_nghost-%COMP%] .cron-status--err[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .cron-status--err[_ngcontent-%COMP%]{color:#c0392b}html.LIGHT[_nghost-%COMP%] .cron-input-wrap.is-invalid[_ngcontent-%COMP%] .cron-input__icon[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .cron-input-wrap.is-invalid[_ngcontent-%COMP%] .cron-input__icon[_ngcontent-%COMP%]{color:#c0392b}html.LIGHT[_nghost-%COMP%] .cron-input-wrap.is-valid[_ngcontent-%COMP%] .cron-input__icon[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .cron-input-wrap.is-valid[_ngcontent-%COMP%] .cron-input__icon[_ngcontent-%COMP%]{color:#1d8a4e}html.LIGHT[_nghost-%COMP%] .cron-legend__order[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .cron-legend__order[_ngcontent-%COMP%]{color:#6b7686}html.LIGHT[_nghost-%COMP%] .cron-legend__ref[_ngcontent-%COMP%], html.LIGHT [_nghost-%COMP%] .cron-legend__ref[_ngcontent-%COMP%]{color:#1d8a4e}"]})}return l})()},98479:(le,x,r)=>{r.d(x,{o:()=>he});var O=r(15861),e=r(94946),h=r(60095),g=r(33157),p=r(90328),T=r(6990),P=r(39490),w=r(59361),D=r(51162),S=r(20553),W=r(45085),K=r(91601),U=r(3531),J=r(39989),y=r(99961),G=r(31042),R=r(77240),H=r(27414),Y=r(95852),k=r(45809),Q=r(53429),V=r(25405),q=r(32915),z=r(81429),F=r(96814),j=r(32660),X=r(5860),ee=r(756),N=r(95431),te=r(85219),ne=r(97680),B=r(14844),oe=r(33259),ae=r(38057),re=r(25025),ie=r(38487),se=r(44879);const l=["intervalsAddEditC"],f=["insertCodeModalC"],a=["monacoEditorModalC"];function _(d,v){1&d&&(e.TgZ(0,"span"),e._UZ(1,"i",52),e._uU(2," Add Scheduler"),e.qZA())}function s(d,v){1&d&&(e.TgZ(0,"span"),e._UZ(1,"i",53),e._uU(2," View Scheduler"),e.qZA())}function m(d,v){if(1&d&&(e.TgZ(0,"span"),e._UZ(1,"i",54),e._uU(2," Edit Scheduler "),e.TgZ(3,"span",55),e._uU(4),e.qZA()()),2&d){const o=e.oxw();e.xp6(4),e.Oqu(o.form.get("name").value)}}function u(d,v){if(1&d&&(e.TgZ(0,"span",56),e._uU(1),e.qZA()),2&d){const o=e.oxw();e.xp6(1),e.hij("The system will allow ",o.form.get(o.ISchedulerProps.schedulerTimeoutInMinutes).value," minutes for the scheduler to complete its work.")}}function I(d,v){if(1&d){const o=e.EpF();e.TgZ(0,"div",57)(1,"app-monaco-editor",58),e.NdJ("editorGenerated",function(i){e.CHM(o);const c=e.oxw();return e.KtG(c.editorGenerated(i))}),e.qZA()()}if(2&d){const o=e.oxw();e.xp6(1),e.Q6J("isSchemaEditor",!0)("editorOptions",o.editorOptionsSchedulers)}}function M(d,v){if(1&d){const o=e.EpF();e.TgZ(0,"span",59),e.NdJ("click",function(){e.CHM(o);const i=e.oxw();return e.KtG(i.add())}),e._UZ(1,"i",60),e.qZA()}}function b(d,v){1&d&&(e.TgZ(0,"tr"),e._UZ(1,"th",61),e.TgZ(2,"th"),e._uU(3,"Time Interval"),e.qZA(),e.TgZ(4,"th"),e._uU(5,"Time Zone"),e.qZA(),e.TgZ(6,"th"),e._uU(7,"Custom Interval"),e.qZA(),e.TgZ(8,"th",62),e._uU(9,"Action"),e.qZA()())}function Z(d,v){1&d&&e._UZ(0,"i",67)}function L(d,v){1&d&&e._UZ(0,"i",68)}function de(d,v){if(1&d){const o=e.EpF();e.TgZ(0,"div",69)(1,"button",70),e.NdJ("click",function(i){e.CHM(o);const c=e.oxw().$implicit,C=e.oxw();return e.KtG(C.edit(i,c))}),e._UZ(2,"i",71),e.qZA(),e.TgZ(3,"button",72),e.NdJ("click",function(i){e.CHM(o);const c=e.oxw().$implicit,C=e.oxw();return e.KtG(C.deleteInterval(i,c))}),e._UZ(4,"i",73),e.qZA()()}}function _e(d,v){if(1&d&&(e.TgZ(0,"tr",63)(1,"td"),e.YNc(2,Z,1,0,"i",64),e.YNc(3,L,1,0,"i",65),e.qZA(),e.TgZ(4,"td")(5,"span"),e._uU(6),e.qZA()(),e.TgZ(7,"td"),e._uU(8),e.qZA(),e.TgZ(9,"td")(10,"span"),e._uU(11),e.qZA()(),e.TgZ(12,"td"),e.YNc(13,de,5,0,"div",66),e.qZA()()),2&d){const o=v.$implicit,n=e.oxw();e.Q6J("pSelectableRow",o),e.xp6(2),e.Q6J("ngIf",o.active),e.xp6(1),e.Q6J("ngIf",!o.active),e.xp6(3),e.hij("Every ",n.intervalListMap[o.timeInterval].name,""),e.xp6(2),e.Oqu(o.timeZone),e.xp6(3),e.Oqu(n.intervalListMap[o.timeInterval].name===n.ESchedulerInterval.CUSTOM?o.customInterval:""),e.xp6(2),e.Q6J("ngIf",!o.isReadOnly&&n.data.mode!==n.EFormMode.VIEW)}}function ce(d,v){if(1&d){const o=e.EpF();e.TgZ(0,"a",74),e.NdJ("click",function(){e.CHM(o);const i=e.oxw();return e.KtG(i.viewError())}),e._uU(1,"View error"),e.qZA()}}function me(d,v){1&d&&(e.TgZ(0,"span"),e._uU(1,"Save"),e.qZA())}function ue(d,v){1&d&&(e.TgZ(0,"span"),e._uU(1,"Update"),e.qZA())}function pe(d,v){if(1&d){const o=e.EpF();e.TgZ(0,"button",75),e.NdJ("click",function(){e.CHM(o);const i=e.oxw();return e.KtG(i.save(!0))}),e._UZ(1,"i",76),e.YNc(2,me,2,0,"span",4),e.YNc(3,ue,2,0,"span",4),e.qZA()}if(2&d){const o=e.oxw();e.Q6J("disabled",o.form.invalid),e.xp6(2),e.Q6J("ngIf",o.data.mode===o.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",o.data.mode===o.EFormMode.EDIT)}}function fe(d,v){1&d&&e._UZ(0,"p-progressSpinner",77)}const ge=function(d){return{"text-danger font-weight-bold":d}};let he=(()=>{class d{fb;ns;schedulerS;generalS;constantsS;authCS;monacoS;instanceS;notificationS;eventCenterCS;eventCenterS;dataProviderS;generalCS;data;loading={form:!1};EFormMode=p.D;form;subscriptions=[];ESchedulerInterval=P.M;editorSchedulers;editorOptionsSchedulers={readOnly:!1,language:"typescript",contextmenu:!0};intervalList=[];selectedRows=[];rows=[];rowsMap={};dataItem={mode:p.D.ADD,eventChannel:new e.vpe,formData:void 0};intervalListMap={};gridKey="id";idCounter=0;BE_HOST_PORT=S.N.BE_HOST_PORT;DOCS_HOST_PORT=S.N.DOCS_HOST_PORT;shouldLoadMonacoEditor=!1;lastError;editorOptionsMonacoEditorModal={readOnly:!0,language:"json",contextmenu:!0};ISchedulerProps=D.qH;intervalsAddEditC;insertCodeModalC;viewDockerfileModelC;constructor(o,n,i,c,C,A,E,ve,Me,Ce,Ee,Oe,Ie){this.fb=o,this.ns=n,this.schedulerS=i,this.generalS=c,this.constantsS=C,this.authCS=A,this.monacoS=E,this.instanceS=ve,this.notificationS=Me,this.eventCenterCS=Ce,this.eventCenterS=Ee,this.dataProviderS=Oe,this.generalCS=Ie}ngOnInit(){var o=this;this.intervalList=this.dataProviderS.getSchedulerIntervals(),this.intervalListMap=T.keyBy(this.intervalList,D.GR.id),this.createForm(),this.subscriptions.push(this.data.eventChannel.subscribe(function(){var n=(0,O.Z)(function*(i){if(i)if(o.form.enable(),i.action===g.F.OPEN_FORM_IN_EDIT_MODE)yield o.updateEditCommon();else if(i.action===g.F.OPEN_FORM_IN_VIEW_MODE)yield o.updateEditCommon(),o.form.disable();else if(i.action===g.F.OPEN_FORM_IN_ADD_MODE){o.form.reset(),o.rows=[];const c=yield o.instanceS.getDefaultContent(o.BE_HOST_PORT,W.R.SCHEDULERS).toPromise();o.generalCS.setValueInEditor(o,"editorSchedulers",c.data),o.form.get(D.qH.isActive).setValue(!1),o.form.get(D.qH.runOnNativeProcess).setValue(!1)}});return function(i){return n.apply(this,arguments)}}())),this.subscriptions.push(this.dataItem.eventChannel.subscribe(function(){var n=(0,O.Z)(function*(i){i&&(o.form.enable(),(i.action===g.F.SAVED||i.action===g.F.UPDATED)&&(o.intervalsAddEditC.hideModal(),o.loadGridData()))});return function(i){return n.apply(this,arguments)}}())),this.subscriptions.push(this.eventCenterCS.intervalArr.subscribe(n=>{this.dataItem.mode===p.D.ADD&&(this.rows.unshift(n),this.loadGridData())}))}createForm(){this.form=this.fb.group({name:[null,[h.kI.required]],schedulerTimeoutInMinutes:[null,[h.kI.min(1),h.kI.max(43200)]],isActive:[null,[]],runOnNativeProcess:[null,[]]})}showInsertCodeModel(){this.generalCS.messageReceivedFor=w.H.All,this.insertCodeModalC.showModal(U.b.SchedulerManFormC)}updateEditCommon(){var o=this;return(0,O.Z)(function*(){const n=yield o.schedulerS.queryOne({find:{guid:o.data.formData.guid,user:o.authCS.gUser._id}});o.form.reset(),o.form.patchValue(n),o.rows=n.intervalArr||[],o.generalCS.setValueInEditor(o,"editorSchedulers",n.schedulerCode||""),o.loadGridData()})()}loadGridData(){this.selectedRows=[];for(const o of this.rows)o.id=this.idCounter++;this.rowsMap=T.keyBy(this.rows,this.gridKey)}reqActiveIndex=0;tabIndexReq={Basic:0,Code:1,Intervals:2};save(o){var n=this;return(0,O.Z)(function*(){const i=n.form.getRawValue();let c;c=n.data.formData&&n.data.formData._id?yield n.schedulerS.queryOne({find:{guid:n.data.formData.guid,user:n.authCS.gUser._id}}):{};const C=T.find(c.versions||[],{isActive:!0});C&&(C.apiCodeStr=n.editorSchedulers.getValue());const A=Object.assign({},c,i);A.user=n.authCS.getUserId(),A.intervalArr=n.rows,A.schedulerCode=n.editorSchedulers.getValue();for(const E of A?.versions||[])E.version=E.version.toString();try{let E;n.loading.form=!0,n.lastError=void 0,n.data.mode===p.D.ADD?E=yield n.schedulerS.post(A).toPromise():n.data.mode===p.D.EDIT&&(E=yield n.schedulerS.put(c._id,A,{select:D.iH._id}).toPromise()),n.ns.showSuccess(n.data.mode===p.D.ADD?n.constantsS.schedulers.addSuccess:n.constantsS.schedulers.editSuccess),n.data.eventChannel.emit({action:n.data.mode===p.D.ADD?g.F.SAVED:g.F.UPDATED,closeModal:o}),n.form.get("name").disable(),n.eventCenterS.schedulerSavedAndUpdate.next(!0),n.loading.form=!1}catch(E){"Please Provide Interval."===E.error.errors[0].message&&(n.reqActiveIndex=n.tabIndexReq.Intervals),n.loading.form=!1,n.ns.showErrorFromResponse(E.error||E,"Unable to save scheduler."),n.lastError=E.error}})()}showModal(){this.lastError=void 0,this.shouldLoadMonacoEditor=!0,setTimeout(()=>{$("#idSchedulerForm").modal("show")},100)}hideModal(){$("#idSchedulerForm").modal("hide")}add(){this.dataItem.formData=void 0,this.dataItem.mode=p.D.ADD,this.dataItem.eventChannel.emit({action:g.F.OPEN_FORM_IN_ADD_MODE}),this.intervalsAddEditC.showModal()}view(){this.dataItem.formData=this.rowsMap[this.selectedRows[0]],this.dataItem.mode=p.D.VIEW,this.dataItem.eventChannel.emit({action:g.F.OPEN_FORM_IN_VIEW_MODE}),this.intervalsAddEditC.showModal()}edit(o,n){o.stopPropagation(),o.preventDefault(),this.dataItem.formData=n,this.dataItem.mode=p.D.EDIT,this.dataItem.eventChannel.emit({action:g.F.OPEN_FORM_IN_EDIT_MODE}),this.intervalsAddEditC.showModal()}deleteInterval(o,n){o.stopPropagation(),o.preventDefault(),this.rows.splice(this.rows.indexOf(n),1),this.notificationS.showSuccess(this.constantsS.interval.removePermanent)}editorGenerated(o){var n=this;return(0,O.Z)(function*(){n.editorSchedulers=o,yield n.monacoS.loadSchemaEditorSettings(n.BE_HOST_PORT,n.authCS.getUserId(),null),n.monacoS.addSaveCodeKeyBinding(o,i=>{n.form.valid&&n.save(!0)}),n.monacoS.addInsertCodeKeyBinding(o,i=>{n.generalCS.messageReceivedFor=w.H.All,n.data.mode!==p.D.VIEW&&n.insertCodeModalC.showModal(U.b.SchedulerManFormC)}),n.subscriptions.push(n.generalS.messageReceived.subscribe(i=>{i.type&&i.type===J.g.TEXT_COPIED&&i.componentName===U.b.SchedulerManFormC&&(n.monacoS.insertAtCursor(o,i.selectedText),n.insertCodeModalC.hideModal())}))})()}viewError(){this.viewDockerfileModelC.showModal(this.generalS.stringify(this.lastError),K.d.json)}dblClickIntervalOpenModel(o){this.selectedRows.length&&this.data.mode!==p.D.VIEW&&this.edit(o,this.selectedRows[0])}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions),this.eventCenterS.schedulerSavedAndUpdate.next(!1)}static \u0275fac=function(n){return new(n||d)(e.Y36(h.qu),e.Y36(y.W),e.Y36(G.Z),e.Y36(R.b),e.Y36(H.L),e.Y36(Y.D),e.Y36(k.b),e.Y36(Q.E),e.Y36(y.W),e.Y36(V.M),e.Y36(q.u),e.Y36(z.B),e.Y36(R.b))};static \u0275cmp=e.Xpm({type:d,selectors:[["app-w-scheduler-man-form"]],viewQuery:function(n,i){if(1&n&&(e.Gf(l,5),e.Gf(f,5),e.Gf(a,5)),2&n){let c;e.iGM(c=e.CRH())&&(i.intervalsAddEditC=c.first),e.iGM(c=e.CRH())&&(i.insertCodeModalC=c.first),e.iGM(c=e.CRH())&&(i.viewDockerfileModelC=c.first)}},inputs:{data:"data"},decls:71,vars:36,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idSchedulerForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-full"],[1,"modal-content"],[1,"modal-header"],[4,"ngIf"],[1,"float-right"],["aria-label","Close","data-dismiss","modal","type","button",1,"close",3,"click"],["aria-hidden","true"],[1,"fas","fa-window-close"],["pTooltip","Insert Code","sava-no-dbl-click","",1,"cursor-pointer","mr-1",2,"font-size","1.4em",3,"click"],[1,"fas","fa-info-circle","text-info","fa-fw"],["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-n2",2,"font-size","25px",3,"src"],[1,"modal-body","overflow-auto"],[1,"w-100",3,"activeIndex","activeIndexChange"],["header","Basic Info"],[1,"container","pt-3",3,"formGroup"],[1,"form-group","row"],[1,"col-3","col-form-label","col-form-label-sm","text-right"],[1,"col-7"],["formControlName","name","name","name","spellcheck","false","type","text","placeholder","Please provide name",1,"form-control","form-control-sm"],["formControlName","schedulerTimeoutInMinutes","name","schedulerTimeoutInMinutes","spellcheck","false","type","number","placeholder","10",1,"form-control","form-control-sm",3,"min"],["class","mt-1px small text-info",4,"ngIf"],[1,"align-middle","mb-0","pt-1"],["formControlName","isActive","label","Active",3,"binary"],["formControlName","runOnNativeProcess","pTooltip","Code will run on actual process and not in sandbox, so be careful with code. You can not use sandbox packages in this mode. You can use all Node.js packages + some packages on which API Maker is dependent on. You can use features of global variable 'g'.","label","Run Native",3,"ngClass","binary"],["header","Code"],["class","overflow-hidden mb-3","style","height: calc(100vh - 270px);",4,"ngIf"],["header","Intervals"],[1,"overflow-auto",2,"height","calc(100vh - 206px)"],[1,"card","shadow-sm","h-100","mr-1","ml-1"],[1,"card-header"],[1,"fas","fa-stopwatch","text-warning","fa-fw","mr-1"],["href","https://docs.apimaker.dev/v1/docs/apis-all/schedulers/user-created-schedulers-api.html#create-intervals-in-scheduler","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","Add New",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["styleClass","p-datatable-striped","scrollHeight","200px",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],[1,"modal-footer"],["href","javascript:;","class","text-danger",3,"click",4,"ngIf"],["data-dismiss","modal","type","button",1,"btn","btn-sm","btn-secondary",3,"click"],[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"],[3,"data"],["intervalsAddEditC",""],[3,"frameId","modalId","docsHostPort"],["insertCodeModalC",""],[3,"modalId","editorOptionsMonacoEditorModal","modalTitle"],["monacoEditorModalC",""],[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"],[1,"ml-2","font-weight-normal","small","text-muted"],[1,"mt-1px","small","text-info"],[1,"overflow-hidden","mb-3",2,"height","calc(100vh - 270px)"],[3,"isSchemaEditor","editorOptions","editorGenerated"],["pTooltip","Add New",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],[2,"width","40px"],[2,"width","100px"],[3,"pSelectableRow"],["class","fas fa-circle fa-fw text-success text-v-small",4,"ngIf"],["class","fas fa-circle fa-fw text-muted text-v-small",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"fas","fa-circle","fa-fw","text-success","text-v-small"],[1,"fas","fa-circle","fa-fw","text-muted","text-v-small"],[1,"text-center"],["pTooltip","Edit",1,"btn","btn-xsm-custom","mr-1",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw","cursor-pointer"],["pTooltip","Delete",1,"btn","btn-xsm-custom","ml-1",3,"click"],[1,"far","fa-trash-alt","text-danger","fa-fw","cursor-pointer"],["href","javascript:;",1,"text-danger",3,"click"],["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(n,i){1&n&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.YNc(4,_,3,0,"span",4),e.YNc(5,s,3,0,"span",4),e.YNc(6,m,5,1,"span",4),e.TgZ(7,"div",5)(8,"button",6),e.NdJ("click",function(){return i.hideModal()}),e.TgZ(9,"span",7),e._UZ(10,"i",8),e.qZA()(),e.TgZ(11,"span",9),e.NdJ("click",function(){return i.showInsertCodeModel()}),e._UZ(12,"i",10),e.qZA(),e.TgZ(13,"a",11),e._UZ(14,"img",12),e.ALo(15,"themeIcon"),e.qZA()()(),e.TgZ(16,"div",13)(17,"p-tabView",14),e.NdJ("activeIndexChange",function(C){return i.reqActiveIndex=C}),e.TgZ(18,"p-tabPanel",15)(19,"form",16)(20,"div",17)(21,"label",18),e._uU(22,"Name"),e.qZA(),e.TgZ(23,"div",19),e._UZ(24,"input",20),e.qZA()(),e.TgZ(25,"div",17)(26,"label",18),e._uU(27,"Timeout in minutes"),e.qZA(),e.TgZ(28,"div",19),e._UZ(29,"input",21),e.YNc(30,u,2,1,"span",22),e.qZA()(),e.TgZ(31,"div",17),e._UZ(32,"label",18),e.TgZ(33,"div",19)(34,"label",23),e._UZ(35,"p-checkbox",24),e.qZA()()(),e.TgZ(36,"div",17),e._UZ(37,"label",18),e.TgZ(38,"div",19)(39,"label",23),e._UZ(40,"p-checkbox",25),e.qZA()()()()(),e.TgZ(41,"p-tabPanel",26),e.YNc(42,I,2,2,"div",27),e.qZA(),e.TgZ(43,"p-tabPanel",28)(44,"div",29)(45,"div",30)(46,"div",31)(47,"span"),e._UZ(48,"i",32),e._uU(49," Interval"),e.qZA(),e.TgZ(50,"a",33),e._UZ(51,"img",34),e.ALo(52,"themeIcon"),e.qZA(),e.YNc(53,M,2,0,"span",35),e.qZA(),e.TgZ(54,"div",36)(55,"p-table",37),e.NdJ("selectionChange",function(C){return i.selectedRows=C})("dblclick",function(C){return i.dblClickIntervalOpenModel(C)}),e.YNc(56,b,10,0,"ng-template",38),e.YNc(57,_e,14,7,"ng-template",39),e.qZA()()()()()()(),e.TgZ(58,"div",40),e.YNc(59,ce,2,0,"a",41),e.TgZ(60,"button",42),e.NdJ("click",function(){return i.hideModal()}),e._UZ(61,"i",43),e._uU(62," Close"),e.qZA(),e.YNc(63,pe,4,3,"button",44),e.qZA(),e.YNc(64,fe,1,0,"p-progressSpinner",45),e.qZA()()(),e._UZ(65,"app-intervals-add-edit",46,47)(67,"app-insert-code-modal",48,49)(69,"app-monaco-editor-modal",50,51)),2&n&&(e.xp6(4),e.Q6J("ngIf",i.data.mode===i.EFormMode.ADD),e.xp6(1),e.Q6J("ngIf",i.data.mode===i.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",i.data.mode===i.EFormMode.EDIT),e.xp6(8),e.Q6J("src",e.lcZ(15,30,"/assets/images/logo/logo_docs.svg"),e.LSH),e.xp6(3),e.Q6J("activeIndex",i.reqActiveIndex),e.xp6(2),e.Q6J("formGroup",i.form),e.xp6(10),e.Q6J("min",1),e.xp6(1),e.Q6J("ngIf",i.form.get(i.ISchedulerProps.schedulerTimeoutInMinutes).value),e.xp6(5),e.Q6J("binary",!0),e.xp6(5),e.Q6J("ngClass",e.VKq(34,ge,!0===i.form.get(i.ISchedulerProps.runOnNativeProcess).value))("binary",!0),e.xp6(2),e.Q6J("ngIf",i.shouldLoadMonacoEditor),e.xp6(9),e.Q6J("src",e.lcZ(52,32,"/assets/images/logo/logo_docs.svg"),e.LSH),e.xp6(2),e.Q6J("ngIf",i.data.mode!==i.EFormMode.VIEW),e.xp6(2),e.Q6J("selectionMode","multiple")("metaKeySelection",!0)("selection",i.selectedRows)("dataKey",i.gridKey)("scrollable",!0)("value",i.rows),e.xp6(4),e.Q6J("ngIf",i.lastError),e.xp6(4),e.Q6J("ngIf",i.data.mode!==i.EFormMode.VIEW),e.xp6(1),e.Q6J("ngIf",i.loading.form),e.xp6(1),e.Q6J("data",i.dataItem),e.xp6(2),e.Q6J("frameId","idInsertCodeSchedulers")("modalId","idInsertCodeSchedulersForm")("docsHostPort",i.DOCS_HOST_PORT),e.xp6(2),e.Q6J("modalId","idMonacoEditorModalInScheduler")("editorOptionsMonacoEditorModal",i.editorOptionsMonacoEditorModal)("modalTitle","Error info"))},dependencies:[h._Y,h.Fj,h.wV,h.JJ,h.JL,h.qQ,h.sg,h.u,F.mk,F.O5,j.y,X.P,ee.O,N.iA,te.jx,N.Ei,ne.G,B.xf,B.x4,oe.u,ae.XZ,re.A,ie.L,se.w],encapsulation:2})}return d})()},10885:(le,x,r)=>{r.d(x,{R:()=>t});var O=r(17017),g=(r(98479),r(38487),r(44950)),p=r(94946);let t=(()=>{class P{static \u0275fac=function(S){return new(S||P)};static \u0275mod=p.oAB({type:P});static \u0275inj=p.cJS({imports:[O.u,g.A]})}return P})()}}]);