@sava-info-systems/api-maker-with-extensions 1.18.1 → 1.19.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 (84) hide show
  1. package/dist/{1351.c372d4232c6551fb.js → 1351.48e08341fba9b889.js} +1 -1
  2. package/dist/{1417.336e9ca469a92f03.js → 1417.5caf023140e7c67f.js} +1 -1
  3. package/dist/1468.d42293f7d802a787.js +1 -0
  4. package/dist/1959.a22fe393419f10c5.js +1 -0
  5. package/dist/{2162.bb1f670dabb5c84a.js → 2162.3c94f3d66c6312d5.js} +1 -1
  6. package/dist/{2442.18887167a25c7dee.js → 2442.adbc5b49349bb569.js} +1 -1
  7. package/dist/{2818.dd50a60acfbaad6b.js → 2818.71176f4848a9419f.js} +1 -1
  8. package/dist/3488.ada60be2dbcd9845.js +1 -0
  9. package/dist/{3545.d415d4baf2d79163.js → 3545.b5585792e9fe1447.js} +1 -1
  10. package/dist/{3605.e398ec79072f4bf2.js → 3605.3c6cdf2a08c47301.js} +1 -1
  11. package/dist/{3611.59468f2dba2cd6df.js → 3611.9577d58af5f1f4aa.js} +1 -1
  12. package/dist/{3621.43633d73990c0546.js → 3621.412300a009ea6346.js} +1 -1
  13. package/dist/{3732.d698a74f1f0e24e6.js → 3732.b5ac36f1448e215c.js} +1 -1
  14. package/dist/{379.0d35e4e001b196b4.js → 379.d3e61f3350a595dc.js} +1 -1
  15. package/dist/{3929.a017182a7e24cf7f.js → 3929.9ac933e926943db2.js} +1 -1
  16. package/dist/{4092.b7a59976bb87bf26.js → 4092.71b0eccc0cb429f0.js} +1 -1
  17. package/dist/{4124.1dab3feb76c9c039.js → 4124.a8329e77343e7087.js} +1 -1
  18. package/dist/{4316.3745e74e3d9c2865.js → 4316.542be541e58dff84.js} +1 -1
  19. package/dist/4344.d8f42d425eaec852.js +1 -0
  20. package/dist/{4689.4f5958fddadc577e.js → 4689.e827720779e0cf34.js} +1 -1
  21. package/dist/{4709.bd58a5ca8c74f29c.js → 4709.262c34f60b50ebc9.js} +1 -1
  22. package/dist/{4774.088c1fbbb2988ee5.js → 4774.a4368f3ce2e778da.js} +1 -1
  23. package/dist/{4880.968e1ffff2f417d9.js → 4880.70ca405524206be7.js} +1 -1
  24. package/dist/{5011.f661999b271a98de.js → 5011.ed9a6465223f760d.js} +1 -1
  25. package/dist/{5090.fb3787137ba94607.js → 5090.c8bf74c35b0a5d26.js} +1 -1
  26. package/dist/{5140.05120f243608b828.js → 5140.581ccd2699e2a8a8.js} +1 -1
  27. package/dist/{5362.4514e2ffb27ce0ac.js → 5362.912e053f78479e90.js} +1 -1
  28. package/dist/{5442.454ac3ebe7c10659.js → 5442.186b40719e7c1da9.js} +1 -1
  29. package/dist/{5455.c1f4f3493ea016d4.js → 5455.a1d0d507419e3c59.js} +1 -1
  30. package/dist/5729.f0ee236ba6579a94.js +1 -0
  31. package/dist/{5826.650d402e8a957ea3.js → 5826.44efead20568788a.js} +1 -1
  32. package/dist/{6053.fa624fe98db9a213.js → 6053.67f38f7b35484475.js} +1 -1
  33. package/dist/6220.b6c29e6e3e717880.js +1 -0
  34. package/dist/{6415.6b8243526609c494.js → 6415.a48241737e134178.js} +1 -1
  35. package/dist/{6589.1003b792dd929437.js → 6589.b9c83295e466e464.js} +1 -1
  36. package/dist/{6679.e71f655f0e7e3e6c.js → 6679.c5073d3a60b67e2e.js} +1 -1
  37. package/dist/{6828.e0cfd2be83bbc047.js → 6828.36c6805f2b3c6f38.js} +1 -1
  38. package/dist/{6866.2b7ff38ea0ea8d8f.js → 6866.4dd76a41246a20be.js} +1 -1
  39. package/dist/{6882.c12e0aff75132b05.js → 6882.fe03a3df377ca119.js} +1 -1
  40. package/dist/{7014.8aa576d25335a412.js → 7014.5db4db60cc21782e.js} +1 -1
  41. package/dist/7152.dab3cc50472f703f.js +1 -0
  42. package/dist/{7367.bd5d43e22b265555.js → 7367.ba1e63db0f9b97f4.js} +1 -1
  43. package/dist/{7374.b0ad763987f68749.js → 7374.ebfe1004d1773912.js} +1 -1
  44. package/dist/{7597.9fe66d68836d18f4.js → 7597.177f15771dcdea42.js} +1 -1
  45. package/dist/7759.2b4ed39a62323abd.js +1 -0
  46. package/dist/{807.2ba5cc740aa4efa0.js → 807.dba59148bbbbe7fb.js} +1 -1
  47. package/dist/{8219.46ff63825141f651.js → 8219.2c97945d465ab185.js} +1 -1
  48. package/dist/{8447.17357e24b9438857.js → 8447.87b3cf73f79cd889.js} +1 -1
  49. package/dist/{8970.3abda875c6d7de4f.js → 8970.8eece52bbc1c316c.js} +1 -1
  50. package/dist/9036.876c1f0c1ce4e82b.js +1 -0
  51. package/dist/{9347.cb017d6396c7f64e.js → 9347.4e7d02eee86c5778.js} +1 -1
  52. package/dist/{9429.3ce31b960b639d09.js → 9429.9299aa0abda3dc76.js} +1 -1
  53. package/dist/{9785.edd131cfe4b5abdb.js → 9785.35cc7f0c3778344e.js} +1 -1
  54. package/dist/{9882.1e4cda6c65811bb5.js → 9882.a94c746b42e5fc0e.js} +1 -1
  55. package/dist/{9957.baf57c960e56a490.js → 9957.47ed0e74bdfeddd5.js} +1 -1
  56. package/dist/assets/schema-types/store-types.ts +1 -0
  57. package/dist/assets/schema-types/types.ts +1 -0
  58. package/dist/assets/styles/out/colors-dark.css +1 -1
  59. package/dist/assets/styles/out/styles.css +1 -1
  60. package/dist/assets/styles/styles.scss +2 -0
  61. package/dist/{common.2e05fdf2a25495d6.js → common.d4eb1616e93e21e1.js} +1 -1
  62. package/dist/index.html +1 -1
  63. package/dist/main.ffc8631f3e17b1c3.js +1 -0
  64. package/dist/runtime.f7e0fa10d087fa0b.js +1 -0
  65. package/main.js +1 -1
  66. package/package.json +4 -4
  67. package/sandbox/Dockerfile +1 -0
  68. package/sandbox/assets/schema-types/store-types.js +1 -0
  69. package/sandbox/package.json +2 -1
  70. package/sandbox/sandbox.js +1 -1
  71. package/src/assets/schema-types/store-types.ts +1 -0
  72. package/src/assets/schema-types/types.ts +1 -0
  73. package/src/tools/local-client.js +1 -1215
  74. package/dist/1468.7643522cc3e89857.js +0 -1
  75. package/dist/1959.59ee99be25f59755.js +0 -1
  76. package/dist/3488.7052042211d08d07.js +0 -1
  77. package/dist/4344.b6f194f896eb2205.js +0 -1
  78. package/dist/5729.9b201708284e16bc.js +0 -1
  79. package/dist/6220.7d7df941537ed662.js +0 -1
  80. package/dist/7152.4f047369765b7ac5.js +0 -1
  81. package/dist/7759.6c363b1156e3658a.js +0 -1
  82. package/dist/9036.18609df03a18bbdb.js +0 -1
  83. package/dist/main.b85e625cdc44b214.js +0 -1
  84. package/dist/runtime.f9839e08ff0d235d.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[1468],{1078:(ee,F,s)=>{s.d(F,{h:()=>Z});var M=s(467),e=s(4341),u=s(6645),f=s(5046),m=s(8727),I=s(2676),t=s(540),C=s(6708),P=s(7668),D=s(6129),S=s(1987),y=s(7237),U=s(3864),b=s(5938),B=s(334),T=s(177),x=s(3478),R=s(7515),K=s(8150),L=s(5430);function G(d,v){1&d&&(t.j41(0,"span"),t.nrm(1,"i",34),t.EFF(2," Add Interval"),t.k0s())}function W(d,v){1&d&&(t.j41(0,"span"),t.nrm(1,"i",35),t.EFF(2," View Interval"),t.k0s())}function N(d,v){1&d&&(t.j41(0,"span"),t.nrm(1,"i",36),t.EFF(2," Edit Interval"),t.k0s())}function V(d,v){1&d&&(t.j41(0,"div",39)(1,"a",40),t.EFF(2,"Reference"),t.k0s()())}function w(d,v){if(1&d){const i=t.RV6();t.j41(0,"div",15)(1,"label",16),t.EFF(2,"Custom"),t.k0s(),t.j41(3,"div",14)(4,"input",37),t.bIt("blur",function(l){t.eBV(i);const O=t.XpG();return t.Njj(O.validateCronExpression(l))}),t.k0s(),t.DNE(5,V,3,0,"div",38),t.k0s()()}if(2&d){const i=t.XpG();t.R7$(5),t.Y8G("ngIf",i.form.get("timeInterval").value===i.ESchedulerInterval.CUSTOM)}}function A(d,v){1&d&&(t.j41(0,"div",41)(1,"div",42)(2,"div",43)(3,"div",44),t.EFF(4,"Custom CRON writing guide"),t.k0s(),t.j41(5,"div",45)(6,"table",46)(7,"tr")(8,"td",47),t.EFF(9,"Seconds"),t.k0s(),t.j41(10,"td",48),t.EFF(11," : "),t.k0s(),t.j41(12,"td",49),t.EFF(13,"0-59"),t.k0s()(),t.j41(14,"tr")(15,"td",47),t.EFF(16,"Minutes"),t.k0s(),t.j41(17,"td",48),t.EFF(18," : "),t.k0s(),t.j41(19,"td",49),t.EFF(20,"0-59"),t.k0s()(),t.j41(21,"tr")(22,"td",47),t.EFF(23,"Hours"),t.k0s(),t.j41(24,"td",48),t.EFF(25," : "),t.k0s(),t.j41(26,"td",49),t.EFF(27,"0-23"),t.k0s()(),t.j41(28,"tr")(29,"td",47),t.EFF(30,"Day of Month"),t.k0s(),t.j41(31,"td",48),t.EFF(32," : "),t.k0s(),t.j41(33,"td",49),t.EFF(34,"1-31"),t.k0s()(),t.j41(35,"tr")(36,"td",47),t.EFF(37,"Months"),t.k0s(),t.j41(38,"td",48),t.EFF(39," : "),t.k0s(),t.j41(40,"td",49),t.EFF(41,"0-11 (Jan-Dec)"),t.k0s()(),t.j41(42,"tr")(43,"td",47),t.EFF(44,"Day of Week"),t.k0s(),t.j41(45,"td",48),t.EFF(46," : "),t.k0s(),t.j41(47,"td",49),t.EFF(48,"0-6 (Sun-Sat)"),t.k0s()()()()(),t.j41(49,"div",50)(50,"span"),t.EFF(51,"Note:- "),t.k0s(),t.j41(52,"span")(53,"a",40),t.EFF(54,"Reference"),t.k0s(),t.EFF(55," is having only 5 fields and this cron expression support 6 fields, precision upto seconds."),t.k0s()()()())}function X(d,v){1&d&&(t.j41(0,"span"),t.EFF(1,"Save"),t.k0s())}function Y(d,v){1&d&&(t.j41(0,"span"),t.EFF(1,"Update interval"),t.k0s())}function H(d,v){if(1&d){const i=t.RV6();t.j41(0,"button",51),t.bIt("click",function(){t.eBV(i);const l=t.XpG();return t.Njj(l.save())}),t.nrm(1,"i",52),t.DNE(2,X,2,0,"span",4),t.DNE(3,Y,2,0,"span",4),t.k0s()}if(2&d){const i=t.XpG();t.Y8G("disabled",i.form.invalid),t.R7$(2),t.Y8G("ngIf",i.data.mode===i.EFormMode.ADD),t.R7$(1),t.Y8G("ngIf",i.data.mode===i.EFormMode.EDIT)}}function k(d,v){1&d&&t.nrm(0,"p-progressSpinner",53)}let Z=(()=>{class d{fb;ns;schedulerS;generalS;constantsS;authCS;monacoS;dataProviderS;eventCenterCS;data;loading={form:!1};EFormMode=f.X;form;ESchedulerInterval=I.Y;subscriptions=[];intervalList=[];timezoneList=[];constructor(i,c,l,O,j,J,z,Q,q){this.fb=i,this.ns=c,this.schedulerS=l,this.generalS=O,this.constantsS=j,this.authCS=J,this.monacoS=z,this.dataProviderS=Q,this.eventCenterCS=q}ngOnInit(){var i=this;this.intervalList=this.dataProviderS.getSchedulerIntervals(),this.timezoneList=this.dataProviderS.getTimeZones(),this.createForm(),this.subscriptions.push(this.data.eventChannel.subscribe(function(){var c=(0,M.A)(function*(l){l&&(i.form.enable(),l.action===m.K.OPEN_FORM_IN_EDIT_MODE?(i.form.reset(),i.form.patchValue(i.data.formData)):l.action===m.K.OPEN_FORM_IN_VIEW_MODE?(i.form.patchValue(i.data.formData),i.form.reset(),i.form.disable()):l.action===m.K.OPEN_FORM_IN_ADD_MODE&&(i.form.reset(),i.form.get("active").setValue(!1)))});return function(l){return c.apply(this,arguments)}}()))}createForm(){this.form=this.fb.group({timeZone:[null,[e.k0.required]],timeInterval:[null,[e.k0.required]],customInterval:[null,[]],active:[null,[]]}),this.manageValidations()}showModal(){$("#idIntervals").modal("show"),this.form.get(u.W$.active).setValue(!0)}hideModal(){$("#idIntervals").modal("hide")}manageValidations(){const i=this.form.get("timeInterval"),c=this.form.get("customInterval");i.valueChanges.subscribe(l=>{c.setValidators(l===I.Y.CUSTOM?[e.k0.required]:[]),c.updateValueAndValidity()})}validateCronExpression(i){var c=this;return(0,M.A)(function*(){const l=c.form.get("customInterval"),O=l.value;(yield c.schedulerS.isCronExpressionValid(O).toPromise()).data.valid||l.setValue("")})()}save(){var i=this;return(0,M.A)(function*(){const c=i.form.value;try{if(i.data.mode===f.X.ADD)i.eventCenterCS.intervalArr.next(c);else if(i.data.mode===f.X.EDIT){const l=Object.assign(i.data.formData,c);i.eventCenterCS.intervalArr.next(l)}i.data.eventChannel.emit({action:i.data.mode===f.X.ADD?m.K.SAVED:m.K.UPDATED})}catch(l){console.log(l)}})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(c){return new(c||d)(t.rXU(e.ok),t.rXU(C.m),t.rXU(P.t),t.rXU(D.f),t.rXU(S.X),t.rXU(y.l),t.rXU(U.e),t.rXU(b.n),t.rXU(B.u))};static \u0275cmp=t.VBU({type:d,selectors:[["app-intervals-add-edit"]],inputs:{data:"data"},decls:50,vars:13,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"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-3","mr-1","mt-n1",2,"font-size","25px"],[1,"modal-body","overflow-auto"],[1,"container","pt-3",3,"formGroup"],[1,"form-group","row"],[1,"col-8"],[1,"row"],[1,"col-4","col-form-label","col-form-label-sm","text-right"],[1,"col-2","input-group","input-group-sm"],[1,"input-group-prepend"],["id","spanTimeInterval",1,"input-group-text","form-control","form-control-sm"],[1,"col-10","pl-0"],["formControlName","timeInterval","optionLabel","name","optionValue","id","filterBy","name","appendTo","body","styleClass","w-100 p-input-filled",3,"options","filter"],[1,"col-4"],["class","row",4,"ngIf"],["formControlName","timeZone","optionLabel","name","optionValue","id","filterBy","name","appendTo","body","styleClass","w-100 p-input-filled",3,"options","filter"],[1,"col-6","col-form-label","col-form-label-sm","text-right"],[1,"col-6","col-form-label","col-form-label-sm","align-middle","mb-0","pt-1"],["formControlName","active",3,"binary"],["class","form-group row mt-5",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"],["formControlName","customInterval","name","customInterval","placeholder","Custom","spellcheck","false","type","text",1,"form-control","form-control-sm",3,"blur"],["class","text-center",4,"ngIf"],[1,"text-center"],["href","https://crontab.guru","target","_blank",1,"text-info",2,"text-decoration","underline"],[1,"form-group","row","mt-5"],[1,"col-12"],[1,"border"],[1,"h6","border-bottom","p-3","m-0","text-center"],[1,"p-3","font-monospaced"],[1,"table","table-sm","table-condensed","w-100","mb-0"],[1,"text-right","pr-1","border-0",2,"width","49%"],[1,"border-0",2,"width","10px"],[1,"border-0"],[1,"text-center","small","border-left","border-right","border-bottom","p-2"],["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(c,l){1&c&&(t.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),t.DNE(4,G,3,0,"span",4),t.DNE(5,W,3,0,"span",4),t.DNE(6,N,3,0,"span",4),t.j41(7,"div",5)(8,"button",6)(9,"span",7),t.nrm(10,"i",8),t.k0s()(),t.j41(11,"a",9),t.nrm(12,"img",10),t.k0s()()(),t.j41(13,"div",11)(14,"form",12)(15,"div",13)(16,"div",14)(17,"div",15)(18,"label",16),t.EFF(19,"Time Interval"),t.k0s(),t.j41(20,"div",14)(21,"div",15)(22,"div",17)(23,"div",18)(24,"span",19),t.EFF(25,"Every "),t.k0s()()(),t.j41(26,"div",20),t.nrm(27,"p-dropdown",21),t.k0s()()()()(),t.j41(28,"div",22),t.DNE(29,w,6,1,"div",23),t.k0s()(),t.j41(30,"div",13)(31,"div",14)(32,"div",15)(33,"label",16),t.EFF(34,"Time Zone"),t.k0s(),t.j41(35,"div",14),t.nrm(36,"p-dropdown",24),t.k0s()()(),t.j41(37,"div",22)(38,"div",15)(39,"label",25),t.EFF(40,"Active"),t.k0s(),t.j41(41,"label",26),t.nrm(42,"p-checkbox",27),t.k0s()()()(),t.DNE(43,A,56,0,"div",28),t.k0s()(),t.j41(44,"div",29)(45,"button",30),t.nrm(46,"i",31),t.EFF(47," Close"),t.k0s(),t.DNE(48,H,4,3,"button",32),t.k0s(),t.DNE(49,k,1,0,"p-progressSpinner",33),t.k0s()()()),2&c&&(t.R7$(4),t.Y8G("ngIf",l.data.mode===l.EFormMode.ADD),t.R7$(1),t.Y8G("ngIf",l.data.mode===l.EFormMode.VIEW),t.R7$(1),t.Y8G("ngIf",l.data.mode===l.EFormMode.EDIT),t.R7$(8),t.Y8G("formGroup",l.form),t.R7$(13),t.Y8G("options",l.intervalList)("filter",!0),t.R7$(2),t.Y8G("ngIf",l.form.get("timeInterval").value===l.ESchedulerInterval.CUSTOM),t.R7$(7),t.Y8G("options",l.timezoneList)("filter",!0),t.R7$(6),t.Y8G("binary",!0),t.R7$(1),t.Y8G("ngIf",l.form.get("timeInterval").value===l.ESchedulerInterval.CUSTOM),t.R7$(5),t.Y8G("ngIf",l.data.mode!==l.EFormMode.VIEW),t.R7$(1),t.Y8G("ngIf",l.loading.form))},dependencies:[e.qT,e.me,e.BC,e.cb,e.j4,e.JD,T.bT,x.U,R.p,K.ms,L.Sc],encapsulation:2})}return d})()},4370:(ee,F,s)=>{s.d(F,{X:()=>Ee});var M=s(467),e=s(540),u=s(4341),f=s(8727),m=s(5046),I=s(7376),C=s(2676),P=s(4388),D=s(6645),S=s(5312),y=s(5632),U=s(9239),b=s(8677),B=s(2133),T=s(6708),x=s(7668),R=s(6129),K=s(1987),L=s(7237),G=s(3864),W=s(6268),N=s(334),V=s(3966),w=s(5938),A=s(177),X=s(3478),Y=s(4098),H=s(6914),k=s(7645),Z=s(5779),d=s(7515),v=s(4945),i=s(8542),c=s(5430),l=s(4466),O=s(1078);const j=["intervalsAddEditC"],J=["insertCodeModalC"],z=["monacoEditorModalC"];function Q(r,p){1&r&&(e.j41(0,"span"),e.nrm(1,"i",52),e.EFF(2," Add Scheduler"),e.k0s())}function q(r,p){1&r&&(e.j41(0,"span"),e.nrm(1,"i",53),e.EFF(2," View Scheduler"),e.k0s())}function te(r,p){if(1&r&&(e.j41(0,"span"),e.nrm(1,"i",54),e.EFF(2," Edit Scheduler "),e.j41(3,"span",55),e.EFF(4),e.k0s()()),2&r){const o=e.XpG();e.R7$(4),e.JRh(o.form.get("name").value)}}function ae(r,p){if(1&r&&(e.j41(0,"span",56),e.EFF(1),e.k0s()),2&r){const o=e.XpG();e.R7$(1),e.SpI("The system will allow ",o.form.get(o.ISchedulerProps.schedulerTimeoutInMinutes).value," minutes for the scheduler to complete its work.")}}function oe(r,p){if(1&r){const o=e.RV6();e.j41(0,"div",57)(1,"app-monaco-editor",58),e.bIt("editorGenerated",function(n){e.eBV(o);const _=e.XpG();return e.Njj(_.editorGenerated(n))}),e.k0s()()}if(2&r){const o=e.XpG();e.R7$(1),e.Y8G("isSchemaEditor",!0)("editorOptions",o.editorOptionsSchedulers)}}function ne(r,p){if(1&r){const o=e.RV6();e.j41(0,"span",59),e.bIt("click",function(){e.eBV(o);const n=e.XpG();return e.Njj(n.add())}),e.nrm(1,"i",60),e.k0s()}}function se(r,p){1&r&&(e.j41(0,"tr"),e.nrm(1,"th",61),e.j41(2,"th"),e.EFF(3,"Time Interval"),e.k0s(),e.j41(4,"th"),e.EFF(5,"Time Zone"),e.k0s(),e.j41(6,"th"),e.EFF(7,"Custom Interval"),e.k0s(),e.j41(8,"th",62),e.EFF(9,"Action"),e.k0s()())}function re(r,p){1&r&&e.nrm(0,"i",67)}function ie(r,p){1&r&&e.nrm(0,"i",68)}function le(r,p){if(1&r){const o=e.RV6();e.j41(0,"div",69)(1,"button",70),e.bIt("click",function(n){e.eBV(o);const _=e.XpG().$implicit,E=e.XpG();return e.Njj(E.edit(n,_))}),e.nrm(2,"i",71),e.k0s(),e.j41(3,"button",72),e.bIt("click",function(n){e.eBV(o);const _=e.XpG().$implicit,E=e.XpG();return e.Njj(E.deleteInterval(n,_))}),e.nrm(4,"i",73),e.k0s()()}}function de(r,p){if(1&r&&(e.j41(0,"tr",63)(1,"td"),e.DNE(2,re,1,0,"i",64),e.DNE(3,ie,1,0,"i",65),e.k0s(),e.j41(4,"td")(5,"span"),e.EFF(6),e.k0s()(),e.j41(7,"td"),e.EFF(8),e.k0s(),e.j41(9,"td")(10,"span"),e.EFF(11),e.k0s()(),e.j41(12,"td"),e.DNE(13,le,5,0,"div",66),e.k0s()()),2&r){const o=p.$implicit,a=e.XpG();e.Y8G("pSelectableRow",o),e.R7$(2),e.Y8G("ngIf",o.active),e.R7$(1),e.Y8G("ngIf",!o.active),e.R7$(3),e.SpI("Every ",a.intervalListMap[o.timeInterval].name,""),e.R7$(2),e.JRh(o.timeZone),e.R7$(3),e.JRh(a.intervalListMap[o.timeInterval].name===a.ESchedulerInterval.CUSTOM?o.customInterval:""),e.R7$(2),e.Y8G("ngIf",!o.isReadOnly&&a.data.mode!==a.EFormMode.VIEW)}}function _e(r,p){if(1&r){const o=e.RV6();e.j41(0,"a",74),e.bIt("click",function(){e.eBV(o);const n=e.XpG();return e.Njj(n.viewError())}),e.EFF(1,"View error"),e.k0s()}}function ce(r,p){1&r&&(e.j41(0,"span"),e.EFF(1,"Save"),e.k0s())}function me(r,p){1&r&&(e.j41(0,"span"),e.EFF(1,"Update"),e.k0s())}function fe(r,p){if(1&r){const o=e.RV6();e.j41(0,"button",75),e.bIt("click",function(){e.eBV(o);const n=e.XpG();return e.Njj(n.save(!0))}),e.nrm(1,"i",76),e.DNE(2,ce,2,0,"span",4),e.DNE(3,me,2,0,"span",4),e.k0s()}if(2&r){const o=e.XpG();e.Y8G("disabled",o.form.invalid),e.R7$(2),e.Y8G("ngIf",o.data.mode===o.EFormMode.ADD),e.R7$(1),e.Y8G("ngIf",o.data.mode===o.EFormMode.EDIT)}}function ue(r,p){1&r&&e.nrm(0,"p-progressSpinner",77)}const pe=function(r){return{"text-danger font-weight-bold":r}};let Ee=(()=>{class r{fb;ns;schedulerS;generalS;constantsS;authCS;monacoS;instanceS;notificationS;eventCenterCS;eventCenterS;dataProviderS;generalCS;data;loading={form:!1};EFormMode=m.X;form;subscriptions=[];ESchedulerInterval=C.Y;editorSchedulers;editorOptionsSchedulers={readOnly:!1,language:"typescript",contextmenu:!0};intervalList=[];selectedRows=[];rows=[];rowsMap={};dataItem={mode:m.X.ADD,eventChannel:new e.bkB,formData:void 0};intervalListMap={};gridKey="id";idCounter=0;BE_HOST_PORT=S.c.BE_HOST_PORT;DOCS_HOST_PORT=S.c.DOCS_HOST_PORT;shouldLoadMonacoEditor=!1;lastError;editorOptionsMonacoEditorModal={readOnly:!0,language:"json",contextmenu:!0};ISchedulerProps=D.VC;intervalsAddEditC;insertCodeModalC;viewDockerfileModelC;constructor(o,a,n,_,E,g,h,ve,he,Me,Ie,Ce,De){this.fb=o,this.ns=a,this.schedulerS=n,this.generalS=_,this.constantsS=E,this.authCS=g,this.monacoS=h,this.instanceS=ve,this.notificationS=he,this.eventCenterCS=Me,this.eventCenterS=Ie,this.dataProviderS=Ce,this.generalCS=De}ngOnInit(){var o=this;this.intervalList=this.dataProviderS.getSchedulerIntervals(),this.intervalListMap=I.keyBy(this.intervalList,D.qb.id),this.createForm(),this.subscriptions.push(this.data.eventChannel.subscribe(function(){var a=(0,M.A)(function*(n){if(n)if(o.form.enable(),n.action===f.K.OPEN_FORM_IN_EDIT_MODE)yield o.updateEditCommon();else if(n.action===f.K.OPEN_FORM_IN_VIEW_MODE)yield o.updateEditCommon(),o.form.disable();else if(n.action===f.K.OPEN_FORM_IN_ADD_MODE){o.form.reset(),o.rows=[];const _=yield o.instanceS.getDefaultContent(o.BE_HOST_PORT,y.O.SCHEDULERS).toPromise();o.generalCS.setValueInEditor(o,"editorSchedulers",_.data),o.form.get(D.VC.isActive).setValue(!1),o.form.get(D.VC.runOnNativeProcess).setValue(!1)}});return function(n){return a.apply(this,arguments)}}())),this.subscriptions.push(this.dataItem.eventChannel.subscribe(function(){var a=(0,M.A)(function*(n){n&&(o.form.enable(),(n.action===f.K.SAVED||n.action===f.K.UPDATED)&&(o.intervalsAddEditC.hideModal(),o.loadGridData()))});return function(n){return a.apply(this,arguments)}}())),this.subscriptions.push(this.eventCenterCS.intervalArr.subscribe(a=>{this.dataItem.mode===m.X.ADD&&(this.rows.unshift(a),this.loadGridData())}))}createForm(){this.form=this.fb.group({name:[null,[u.k0.required]],schedulerTimeoutInMinutes:[null,[u.k0.min(1),u.k0.max(43200)]],isActive:[null,[]],runOnNativeProcess:[null,[]]})}showInsertCodeModel(){this.generalCS.messageReceivedFor=P.r.All,this.insertCodeModalC.showModal(b.Z.SchedulerManFormC)}updateEditCommon(){var o=this;return(0,M.A)(function*(){const a=yield o.schedulerS.getById(o.data.formData._id).toPromise();o.form.reset(),o.form.patchValue(a.data),o.rows=a.data?.intervalArr||[],o.generalCS.setValueInEditor(o,"editorSchedulers",a.data?.schedulerCode||""),o.loadGridData()})()}loadGridData(){this.selectedRows=[];for(const o of this.rows)o.id=this.idCounter++;this.rowsMap=I.keyBy(this.rows,this.gridKey)}reqActiveIndex=0;tabIndexReq={Basic:0,Code:1,Intervals:2};save(o){var a=this;return(0,M.A)(function*(){const n=a.form.getRawValue();let _;_=a.data.formData&&a.data.formData._id?(yield a.schedulerS.getById(a.data.formData._id).toPromise()).data:{};const E=I.find(_.versions||[],{isActive:!0});E&&(E.apiCodeStr=a.editorSchedulers.getValue());const g=Object.assign({},_,n);g.user=a.authCS.getUserId(),g.intervalArr=a.rows,g.schedulerCode=a.editorSchedulers.getValue();for(const h of g?.versions||[])h.version=h.version.toString();try{let h;a.loading.form=!0,a.lastError=void 0,a.data.mode===m.X.ADD?h=yield a.schedulerS.post(g).toPromise():a.data.mode===m.X.EDIT&&(h=yield a.schedulerS.put(a.data.formData._id,g,{select:D.GX._id}).toPromise()),a.ns.showSuccess(a.data.mode===m.X.ADD?a.constantsS.schedulers.addSuccess:a.constantsS.schedulers.editSuccess),a.data.eventChannel.emit({action:a.data.mode===m.X.ADD?f.K.SAVED:f.K.UPDATED,closeModal:o}),a.form.get("name").disable(),a.eventCenterS.schedulerSavedAndUpdate.next(!0),a.loading.form=!1}catch(h){"Please Provide Interval."===h.error.errors[0].message&&(a.reqActiveIndex=a.tabIndexReq.Intervals),a.loading.form=!1,a.ns.showErrorFromResponse(h.error||h,"Unable to save scheduler."),a.lastError=h.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=m.X.ADD,this.dataItem.eventChannel.emit({action:f.K.OPEN_FORM_IN_ADD_MODE}),this.intervalsAddEditC.showModal()}view(){this.dataItem.formData=this.rowsMap[this.selectedRows[0]],this.dataItem.mode=m.X.VIEW,this.dataItem.eventChannel.emit({action:f.K.OPEN_FORM_IN_VIEW_MODE}),this.intervalsAddEditC.showModal()}edit(o,a){o.stopPropagation(),o.preventDefault(),this.dataItem.formData=a,this.dataItem.mode=m.X.EDIT,this.dataItem.eventChannel.emit({action:f.K.OPEN_FORM_IN_EDIT_MODE}),this.intervalsAddEditC.showModal()}deleteInterval(o,a){o.stopPropagation(),o.preventDefault(),this.rows.splice(this.rows.indexOf(a),1),this.notificationS.showSuccess(this.constantsS.interval.removePermanent)}editorGenerated(o){var a=this;return(0,M.A)(function*(){a.editorSchedulers=o,yield a.monacoS.loadSchemaEditorSettings(a.BE_HOST_PORT,a.authCS.getUserId(),null),a.monacoS.addSaveCodeKeyBinding(o,n=>{a.form.valid&&a.save(!0)}),a.monacoS.addInsertCodeKeyBinding(o,n=>{a.generalCS.messageReceivedFor=P.r.All,a.data.mode!==m.X.VIEW&&a.insertCodeModalC.showModal(b.Z.SchedulerManFormC)}),a.subscriptions.push(a.generalS.messageReceived.subscribe(n=>{n.type&&n.type===B.R.TEXT_COPIED&&n.componentName===b.Z.SchedulerManFormC&&(a.monacoS.insertAtCursor(o,n.selectedText),a.insertCodeModalC.hideModal())}))})()}viewError(){this.viewDockerfileModelC.showModal(this.generalS.stringify(this.lastError),U.L.json)}dblClickIntervalOpenModel(o){this.selectedRows.length&&this.data.mode!==m.X.VIEW&&this.edit(o,this.selectedRows[0])}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions),this.eventCenterS.schedulerSavedAndUpdate.next(!1)}static \u0275fac=function(a){return new(a||r)(e.rXU(u.ok),e.rXU(T.m),e.rXU(x.t),e.rXU(R.f),e.rXU(K.X),e.rXU(L.l),e.rXU(G.e),e.rXU(W.J),e.rXU(T.m),e.rXU(N.u),e.rXU(V.d),e.rXU(w.n),e.rXU(R.f))};static \u0275cmp=e.VBU({type:r,selectors:[["app-w-scheduler-man-form"]],viewQuery:function(a,n){if(1&a&&(e.GBs(j,5),e.GBs(J,5),e.GBs(z,5)),2&a){let _;e.mGM(_=e.lsd())&&(n.intervalsAddEditC=_.first),e.mGM(_=e.lsd())&&(n.insertCodeModalC=_.first),e.mGM(_=e.lsd())&&(n.viewDockerfileModelC=_.first)}},inputs:{data:"data"},decls:69,vars:30,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"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-3","mr-1","mt-n2",2,"font-size","25px"],[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"],["src","/assets/images/logo/logo_docs.svg",1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px"],["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(a,n){1&a&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.DNE(4,Q,3,0,"span",4),e.DNE(5,q,3,0,"span",4),e.DNE(6,te,5,1,"span",4),e.j41(7,"div",5)(8,"button",6),e.bIt("click",function(){return n.hideModal()}),e.j41(9,"span",7),e.nrm(10,"i",8),e.k0s()(),e.j41(11,"span",9),e.bIt("click",function(){return n.showInsertCodeModel()}),e.nrm(12,"i",10),e.k0s(),e.j41(13,"a",11),e.nrm(14,"img",12),e.k0s()()(),e.j41(15,"div",13)(16,"p-tabView",14),e.bIt("activeIndexChange",function(E){return n.reqActiveIndex=E}),e.j41(17,"p-tabPanel",15)(18,"form",16)(19,"div",17)(20,"label",18),e.EFF(21,"Name"),e.k0s(),e.j41(22,"div",19),e.nrm(23,"input",20),e.k0s()(),e.j41(24,"div",17)(25,"label",18),e.EFF(26,"Timeout in minutes"),e.k0s(),e.j41(27,"div",19),e.nrm(28,"input",21),e.DNE(29,ae,2,1,"span",22),e.k0s()(),e.j41(30,"div",17),e.nrm(31,"label",18),e.j41(32,"div",19)(33,"label",23),e.nrm(34,"p-checkbox",24),e.k0s()()(),e.j41(35,"div",17),e.nrm(36,"label",18),e.j41(37,"div",19)(38,"label",23),e.nrm(39,"p-checkbox",25),e.k0s()()()()(),e.j41(40,"p-tabPanel",26),e.DNE(41,oe,2,2,"div",27),e.k0s(),e.j41(42,"p-tabPanel",28)(43,"div",29)(44,"div",30)(45,"div",31)(46,"span"),e.nrm(47,"i",32),e.EFF(48," Interval"),e.k0s(),e.j41(49,"a",33),e.nrm(50,"img",34),e.k0s(),e.DNE(51,ne,2,0,"span",35),e.k0s(),e.j41(52,"div",36)(53,"p-table",37),e.bIt("selectionChange",function(E){return n.selectedRows=E})("dblclick",function(E){return n.dblClickIntervalOpenModel(E)}),e.DNE(54,se,10,0,"ng-template",38),e.DNE(55,de,14,7,"ng-template",39),e.k0s()()()()()()(),e.j41(56,"div",40),e.DNE(57,_e,2,0,"a",41),e.j41(58,"button",42),e.bIt("click",function(){return n.hideModal()}),e.nrm(59,"i",43),e.EFF(60," Close"),e.k0s(),e.DNE(61,fe,4,3,"button",44),e.k0s(),e.DNE(62,ue,1,0,"p-progressSpinner",45),e.k0s()()(),e.nrm(63,"app-intervals-add-edit",46,47)(65,"app-insert-code-modal",48,49)(67,"app-monaco-editor-modal",50,51)),2&a&&(e.R7$(4),e.Y8G("ngIf",n.data.mode===n.EFormMode.ADD),e.R7$(1),e.Y8G("ngIf",n.data.mode===n.EFormMode.VIEW),e.R7$(1),e.Y8G("ngIf",n.data.mode===n.EFormMode.EDIT),e.R7$(10),e.Y8G("activeIndex",n.reqActiveIndex),e.R7$(2),e.Y8G("formGroup",n.form),e.R7$(10),e.Y8G("min",1),e.R7$(1),e.Y8G("ngIf",n.form.get(n.ISchedulerProps.schedulerTimeoutInMinutes).value),e.R7$(5),e.Y8G("binary",!0),e.R7$(5),e.Y8G("ngClass",e.eq3(28,pe,!0===n.form.get(n.ISchedulerProps.runOnNativeProcess).value))("binary",!0),e.R7$(2),e.Y8G("ngIf",n.shouldLoadMonacoEditor),e.R7$(10),e.Y8G("ngIf",n.data.mode!==n.EFormMode.VIEW),e.R7$(2),e.Y8G("selectionMode","multiple")("metaKeySelection",!0)("selection",n.selectedRows)("dataKey",n.gridKey)("scrollable",!0)("value",n.rows),e.R7$(4),e.Y8G("ngIf",n.lastError),e.R7$(4),e.Y8G("ngIf",n.data.mode!==n.EFormMode.VIEW),e.R7$(1),e.Y8G("ngIf",n.loading.form),e.R7$(1),e.Y8G("data",n.dataItem),e.R7$(2),e.Y8G("frameId","idInsertCodeSchedulers")("modalId","idInsertCodeSchedulersForm")("docsHostPort",n.DOCS_HOST_PORT),e.R7$(2),e.Y8G("modalId","idMonacoEditorModalInScheduler")("editorOptionsMonacoEditorModal",n.editorOptionsMonacoEditorModal)("modalTitle","Error info"))},dependencies:[u.qT,u.me,u.Q0,u.BC,u.cb,u.VZ,u.j4,u.JD,A.YU,A.bT,X.U,Y.V,H.A,k.XI,Z.Ei,k.d5,d.p,v.JQ,v.Kp,i.m,c.Sc,l.J,O.h],encapsulation:2})}return r})()},1468:(ee,F,s)=>{s.d(F,{X:()=>t});var M=s(7431),f=(s(4370),s(1078),s(2508)),m=s(540);let t=(()=>{class C{static \u0275fac=function(S){return new(S||C)};static \u0275mod=m.$C({type:C});static \u0275inj=m.G2t({imports:[M.u,f.v]})}return C})()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[1959],{1959:(O,S,i)=>{i.r(S),i.d(S,{SchedulerManM:()=>I});var c=i(7060),e=i(7431),o=i(540),h=i(4565);let m=(()=>{class _{constructor(){}ngOnInit(){}static \u0275fac=function(p){return new(p||_)};static \u0275cmp=o.VBU({type:_,selectors:[["app-scheduler-man-layout"]],decls:2,vars:0,consts:[[1,"pt-1","pl-1","pr-1"]],template:function(p,x){1&p&&(o.j41(0,"div",0),o.nrm(1,"app-scheduler-man-w"),o.k0s())},dependencies:[h.g],encapsulation:2})}return _})();var d=i(2173),R=i(1468);const g=[{path:"scheduler-layout",component:m,canActivate:[d.Z]}];let I=(()=>{class _{static \u0275fac=function(p){return new(p||_)};static \u0275mod=o.$C({type:_});static \u0275inj=o.G2t({imports:[c.iI.forChild(g),e.u,R.X]})}return _})()},4565:(O,S,i)=>{i.d(S,{g:()=>ue});var c=i(467),e=i(540),o=i(8727),h=i(5046),m=i(7326),d=i(7376),g=i(6645),P=i(5632),I=i(1325),_=i(7668),y=i(6129),M=i(6708),p=i(5779),x=i(7337),L=i(7237),A=i(1987),W=i(3966),T=i(7060),G=i(4341),w=i(177),C=i(7645),b=i(7515),N=i(8542),j=i(5430),k=i(4370);const U=["schedulerManFormC"];function B(n,r){if(1&n){const t=e.RV6();e.j41(0,"span",17),e.bIt("click",function(){e.eBV(t);const a=e.XpG(2);return e.Njj(a.edit())}),e.nrm(1,"i",18),e.k0s()}}function X(n,r){if(1&n){const t=e.RV6();e.j41(0,"span",19),e.bIt("click",function(){e.eBV(t);const a=e.XpG(2);return e.Njj(a.clone())}),e.nrm(1,"i",20),e.k0s()}}function F(n,r){if(1&n){const t=e.RV6();e.j41(0,"span",21),e.bIt("click",function(){e.eBV(t);const a=e.XpG(2);return e.Njj(a.removePermanentDialog())}),e.nrm(1,"i",22),e.k0s()}}function K(n,r){if(1&n){const t=e.RV6();e.j41(0,"span")(1,"span",12),e.bIt("click",function(){e.eBV(t);const a=e.XpG();return e.Njj(a.add())}),e.nrm(2,"i",13),e.k0s(),e.DNE(3,B,2,0,"span",14),e.DNE(4,X,2,0,"span",15),e.DNE(5,F,2,0,"span",16),e.k0s()}if(2&n){const t=e.XpG();e.R7$(3),e.Y8G("ngIf",t.selectedRows.length),e.R7$(1),e.Y8G("ngIf",t.selectedRows.length),e.R7$(1),e.Y8G("ngIf",t.selectedRows.length)}}function $(n,r){if(1&n){const t=e.RV6();e.j41(0,"span",23)(1,"label",24)(2,"p-checkbox",25),e.bIt("ngModelChange",function(a){e.eBV(t);const l=e.XpG();return e.Njj(l.eventCenterS.group.apisRegex.allSchedulers=a)}),e.k0s()()()}if(2&n){const t=e.XpG();e.R7$(2),e.Y8G("ngModel",t.eventCenterS.group.apisRegex.allSchedulers)("binary",!0)}}function Y(n,r){if(1&n){const t=e.RV6();e.j41(0,"span",23)(1,"label",24)(2,"p-checkbox",25),e.bIt("ngModelChange",function(a){e.eBV(t);const l=e.XpG();return e.Njj(l.eventCenterS.filterInLog.apisRegex.allSchedulers=a)}),e.k0s()()()}if(2&n){const t=e.XpG();e.R7$(2),e.Y8G("ngModel",t.eventCenterS.filterInLog.apisRegex.allSchedulers)("binary",!0)}}function V(n,r){if(1&n&&(e.j41(0,"div")(1,"div",26),e.EFF(2),e.k0s()()),2&n){const t=e.XpG();e.R7$(2),e.JRh(t.constantsS.group.allSchedulersPermitted)}}function Q(n,r){1&n&&(e.j41(0,"th",34),e.nrm(1,"p-tableHeaderCheckbox"),e.k0s())}function H(n,r){1&n&&e.nrm(0,"th",36)}function J(n,r){1&n&&e.nrm(0,"th")}function z(n,r){1&n&&e.nrm(0,"th",37)}function Z(n,r){if(1&n&&(e.j41(0,"tr"),e.DNE(1,Q,2,0,"th",32),e.DNE(2,H,1,0,"th",33),e.nrm(3,"th",34),e.j41(4,"th"),e.EFF(5,"Name"),e.k0s(),e.DNE(6,J,1,0,"th",6),e.DNE(7,z,1,0,"th",35),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("ngIf",t.isMultiSelect),e.R7$(1),e.Y8G("ngIf",!t.isDependentOnGroup&&!t.isLPM&&!t.isFilterLogTable),e.R7$(4),e.Y8G("ngIf",t.isLPM),e.R7$(1),e.Y8G("ngIf",!t.isDependentOnGroup&&!t.isLPM&&!t.isFilterLogTable)}}function q(n,r){if(1&n&&(e.j41(0,"td"),e.nrm(1,"p-tableCheckbox",43),e.k0s()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.Y8G("value",t)("pSelectableRow",t)}}function ee(n,r){if(1&n&&(e.j41(0,"td",44)(1,"span"),e.EFF(2),e.k0s()()),2&n){const t=e.XpG().rowIndex;e.R7$(2),e.JRh(t+1)}}function te(n,r){1&n&&e.nrm(0,"i",45)}function ne(n,r){1&n&&e.nrm(0,"i",46)}function se(n,r){1&n&&e.nrm(0,"i",47)}function ae(n,r){if(1&n){const t=e.RV6();e.j41(0,"div")(1,"label",48)(2,"p-checkbox",49),e.bIt("ngModelChange",function(a){e.eBV(t);const l=e.XpG(2).$implicit;return e.Njj(l.saveResponseInLog=a)})("click",function(a){e.eBV(t);const l=e.XpG(4);return e.Njj(l.generalS.stopPropagation(a))}),e.k0s()()()}if(2&n){const t=e.XpG(2).$implicit;e.R7$(2),e.Y8G("ngModel",t.saveResponseInLog)("binary",!0)}}function ie(n,r){if(1&n&&(e.j41(0,"td"),e.DNE(1,ae,3,2,"div",6),e.k0s()),2&n){const t=e.XpG().$implicit,s=e.XpG(2);e.R7$(1),e.Y8G("ngIf",s.selectedRows.indexOf(t)>=0)}}const re=function(){return["/api-info/api-testing/testing"]},le=function(n,r){return{at_category:"SCHEDULERS",at_user:n,at_api:r}};function oe(n,r){if(1&n&&(e.j41(0,"td")(1,"div",44)(2,"a",50),e.bIt("click",function(s){return s.stopPropagation()}),e.nrm(3,"i",51),e.k0s()()()),2&n){const t=e.XpG().$implicit,s=e.XpG(2);e.R7$(2),e.Y8G("routerLink",e.lJ4(2,re))("queryParams",e.l_i(3,le,s.authCS.getUserId(),t._id))}}function ce(n,r){if(1&n&&(e.j41(0,"tr",38),e.DNE(1,q,2,2,"td",6),e.DNE(2,ee,3,1,"td",39),e.j41(3,"td"),e.DNE(4,te,1,0,"i",40),e.DNE(5,ne,1,0,"i",41),e.k0s(),e.j41(6,"td")(7,"span"),e.EFF(8),e.k0s(),e.DNE(9,se,1,0,"i",42),e.k0s(),e.DNE(10,ie,2,1,"td",6),e.DNE(11,oe,4,6,"td",6),e.k0s()),2&n){const t=r.$implicit,s=e.XpG(2);e.Y8G("pSelectableRow",t),e.R7$(1),e.Y8G("ngIf",s.isMultiSelect),e.R7$(1),e.Y8G("ngIf",!s.isDependentOnGroup&&!s.isLPM&&!s.isFilterLogTable),e.R7$(2),e.Y8G("ngIf",t.isActive),e.R7$(1),e.Y8G("ngIf",!t.isActive),e.R7$(3),e.JRh(t.name),e.R7$(1),e.Y8G("ngIf",t.runOnNativeProcess),e.R7$(1),e.Y8G("ngIf",s.isLPM),e.R7$(1),e.Y8G("ngIf",!s.isDependentOnGroup&&!s.isLPM&&!s.isFilterLogTable)}}function _e(n,r){1&n&&e.nrm(0,"p-progressSpinner",52)}function de(n,r){if(1&n){const t=e.RV6();e.j41(0,"div",27)(1,"p-table",28),e.bIt("selectionChange",function(a){e.eBV(t);const l=e.XpG();return e.Njj(l.selectedRows=a)})("selectionChange",function(){e.eBV(t);const a=e.XpG();return e.Njj(a.selectionChange())})("dblclick",function(){e.eBV(t);const a=e.XpG();return e.Njj(a.dblClickSchedulerList())}),e.DNE(2,Z,8,4,"ng-template",29),e.DNE(3,ce,12,9,"ng-template",30),e.k0s(),e.DNE(4,_e,1,0,"p-progressSpinner",31),e.k0s()}if(2&n){const t=e.XpG();e.R7$(1),e.Y8G("selectionMode","multiple")("metaKeySelection",t.metaKeySelection)("selection",t.selectedRows)("dataKey",t.gridKey)("scrollable",!0)("value",t.rows),e.R7$(3),e.Y8G("ngIf",t.loading.grid)}}let ue=(()=>{class n{schedulerS;generalS;notificationS;confirmationService;navigationCS;authCS;constantsS;eventCenterS;cd;router;isReadOnly=!1;isMultiSelect=!1;isDependentOnGroup=!1;isLPM=!1;isFilterLogTable=!1;metaKeySelection=!0;loading={grid:!1};subscriptions=[];data={mode:h.X.ADD,eventChannel:new e.bkB,formData:void 0};rows=[];rowsMap={};rowsMapName={};showAll=!1;selectedRows=[];gridKey=g.GX._id;EUserType=I.l;schedulerManFormC;constructor(t,s,a,l,E,f,u,v,D,pe){this.schedulerS=t,this.generalS=s,this.notificationS=a,this.confirmationService=l,this.navigationCS=E,this.authCS=f,this.constantsS=u,this.eventCenterS=v,this.cd=D,this.router=pe}ngOnInit(){var t=this;this.loadGridData(),this.subscriptions.push(this.data.eventChannel.subscribe(s=>{s.action===o.K.SAVED?(this.schedulerManFormC.hideModal(),this.loadGridData()):s.action===o.K.UPDATED&&(s.closeModal&&this.schedulerManFormC.hideModal(),this.loadGridData())})),this.isDependentOnGroup&&this.subscriptions.push(this.eventCenterS.group.selectedGroups.subscribe(function(){var s=(0,c.A)(function*(a){a.length&&t.loadGridData()});return function(a){return s.apply(this,arguments)}}())),this.subscriptions.push(this.eventCenterS.filterInLog.refreshGrid.subscribe(s=>{s&&this.loadGridData()})),this.generalS.setNewTitle("API Maker - Scheduler")}loadGridData(){var t=this;this.loading.grid=!0;const s={find:{user:this.authCS.getUserId(),active:!0},select:{name:1,label:1,isActive:1,active:1,runOnNativeProcess:1},sort:{name:1}};this.showAll&&delete s.find.active,this.subscriptions.push(this.schedulerS.query(s).subscribe(function(){var a=(0,c.A)(function*(l){l.success?(t.selectedRows=[],t.rows=l.data||[],t.rowsMap=d.keyBy(t.rows,g.GX._id),t.rowsMapName=d.keyBy(t.rows,g.VC.name)):t.resetGridAndUrl();const E=t.navigationCS.getQueryParam(m.F.am_scheduler)||(t.isFilterLogTable?t.eventCenterS.filterInLog.schedulersIds.value.join(","):t.eventCenterS.group.schedulersIds.value.join(","))||(t.isDependentOnGroup&&t.eventCenterS.group.selectedGroups.value[0]?.queryParams?.schedulerNames?t.eventCenterS.group.selectedGroups.value[0]?.queryParams.schedulerNames.join(","):"");if(E){const f=E.split(","),u=d.intersection(d.keys(t.rowsMap),f),v=[];for(const D of u)t.rowsMap[D]&&v.push(t.rowsMap[D]);t.selectedRows=v,t.eventCenterS.group.selectedSchedulers.next(v),t.eventCenterS.group.schedulersIds.next(u),t.eventCenterS.filterInLog.schedulersIds.next(u)}if(t.isLPM&&t.eventCenterS.group.selectedGroups.value[0]?.queryParams?.schedulerNames?.length){const f=t.eventCenterS.group.selectedGroups.value[0];for(const u of f?.queryParams?.schedulerNames)t.rowsMapName[u]&&(t.rowsMapName[u].saveResponseInLog=f.schedulersLog?.[u]?.saveResponseInLog||!1);t.setResDataInEventCenter()}t.loading.grid=!1,t.cd.detectChanges()});return function(l){return a.apply(this,arguments)}}()))}add(){this.data.formData=void 0,this.data.mode=h.X.ADD,this.data.eventChannel.emit({action:o.K.OPEN_FORM_IN_ADD_MODE}),this.schedulerManFormC.showModal()}view(){this.data.formData=this.selectedRows[0],this.data.mode=h.X.VIEW,this.data.eventChannel.emit({action:o.K.OPEN_FORM_IN_VIEW_MODE}),this.schedulerManFormC.showModal()}edit(){this.data.formData=this.selectedRows[0],this.data.mode=h.X.EDIT,this.data.eventChannel.emit({action:o.K.OPEN_FORM_IN_EDIT_MODE}),this.schedulerManFormC.showModal()}clone(){var t=this;return(0,c.A)(function*(){try{if(!t.selectedRows[0]||!t.selectedRows[0])return;const s=(yield t.schedulerS.getById(t.selectedRows[0]._id).toPromise()).data;delete s._id,s.name=`${s.name}-clone`,(yield t.schedulerS.post(s).toPromise()).success?(t.notificationS.showSuccess(t.constantsS.schedulers.cloneSuccess),t.loadGridData()):t.notificationS.showSuccess(t.constantsS.schedulers.cloneSuccess)}catch{t.notificationS.showError(t.constantsS.schedulers.cloneError)}})()}setResDataInEventCenter(){this.isDependentOnGroup&&(this.eventCenterS.group.schedulersApis.next(this.selectedRows),this.eventCenterS.group.selectedSchedulers.next(this.selectedRows)),this.isFilterLogTable&&this.eventCenterS.filterInLog.schedulersApis.next(this.selectedRows)}removePermanentDialog(){var t=this;return(0,c.A)(function*(){var s;t.confirmationService.confirm({message:t.constantsS.schedulers.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(s=(0,c.A)(function*(){yield t.removePermanent()}),function(){return s.apply(this,arguments)})})})()}removePermanent(){var t=this;return(0,c.A)(function*(){t.loading.grid=!0;const s=yield t.schedulerS.permanentDelete(t.selectedRows[0]._id).toPromise();t.loading.grid=!1,s.success?(t.notificationS.showSuccess(t.constantsS.schedulers.removePermanent),t.resetGridAndUrl(),t.loadGridData()):t.notificationS.showErrorFromResponse(s,t.constantsS.schedulers.removePermanentError)})()}resetDependents(){var t=this;return(0,c.A)(function*(){yield t.navigationCS.setQueryParam(m.F.am_scheduler,null)})()}selectionChange(){var t=this;return(0,c.A)(function*(){t.resetDependents().then(),t.fillData().then(),t.selectedRows?.[0]?t.generalS.setNewTitle(t.selectedRows[0].name,P.O.SCHEDULERS):t.generalS.setNewTitle("API Maker - Scheduler")})()}resetGridAndUrl(){this.rows=[],this.selectedRows=[],this.rowsMap={},this.rowsMapName={}}fillData(){var t=this;return(0,c.A)(function*(){if(!t.selectedRows.length)return yield t.navigationCS.setQueryParam(m.F.am_scheduler,""),t.eventCenterS.group.schedulersIds.next([]),t.eventCenterS.group.schedulersApis.next([]),t.eventCenterS.filterInLog.schedulersIds.next([]),void t.eventCenterS.filterInLog.schedulersApis.next([]);if(t.isDependentOnGroup||t.isFilterLogTable)t.eventCenterS.group.schedulersIds.next(d.map(t.selectedRows,"_id")),t.eventCenterS.group.schedulersApis.next(t.selectedRows),t.isFilterLogTable&&(t.eventCenterS.filterInLog.schedulersIds.next(d.map(t.selectedRows,"_id")),t.eventCenterS.filterInLog.schedulersApis.next(t.selectedRows));else{const s=(yield t.schedulerS.getById(t.selectedRows[0]._id).toPromise()).data;s._id?yield t.navigationCS.setQueryParam(m.F.am_scheduler,s._id):t.resetDependents()}})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}dblClickSchedulerList(){this.selectedRows.length&&!this.isMultiSelect&&this.edit()}static \u0275fac=function(s){return new(s||n)(e.rXU(_.t),e.rXU(y.f),e.rXU(M.m),e.rXU(p.td),e.rXU(x.$),e.rXU(L.l),e.rXU(A.X),e.rXU(W.d),e.rXU(e.gRc),e.rXU(T.Ix))};static \u0275cmp=e.VBU({type:n,selectors:[["app-scheduler-man-w"]],viewQuery:function(s,a){if(1&s&&e.GBs(U,5),2&s){let l;e.mGM(l=e.lsd())&&(a.schedulerManFormC=l.first)}},inputs:{isReadOnly:["IsReadOnly","isReadOnly"],isMultiSelect:["IsMultiSelect","isMultiSelect"],isDependentOnGroup:["IsDependentOnGroup","isDependentOnGroup"],isLPM:"isLPM",isFilterLogTable:"isFilterLogTable",metaKeySelection:"metaKeySelection"},decls:16,vars:6,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],["src","/assets/images/icons/schedulers.svg","alt","Schedulers",1,"fa-fw","mr-1"],[1,"float-right"],["href","https://docs.apimaker.dev/v1/docs/apis-all/schedulers/user-created-schedulers-api.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-3","mr-1","mt-n1",2,"font-size","25px"],[4,"ngIf"],["class","float-right cursor-pointer","tooltipPosition","left","pTooltip","All Schedulers",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["class","h-100",4,"ngIf"],[3,"data"],["schedulerManFormC",""],["pTooltip","Add New",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-plus","text-success","fa-fw"],["class","float-right cursor-pointer ml-3","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Clone",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Permanent Delete",3,"click",4,"ngIf"],["pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["pTooltip","Clone",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-copy","text-warning","fa-fw"],["pTooltip","Permanent Delete",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],["tooltipPosition","left","pTooltip","All Schedulers",1,"float-right","cursor-pointer"],[1,"mb-0","mt--2px"],[3,"ngModel","binary","ngModelChange"],[1,"p-2","text-center","text-success"],[1,"h-100"],["styleClass","p-datatable-striped schedulers-grid-height","scrollHeight","flex",3,"selectionMode","metaKeySelection","selection","dataKey","scrollable","value","selectionChange","dblclick"],["pTemplate","header"],["pTemplate","body"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],["style","width: 40px;",4,"ngIf"],["style","width: 80px;",4,"ngIf"],[2,"width","40px"],["style","width: 60px;",4,"ngIf"],[2,"width","80px"],[2,"width","60px"],[3,"pSelectableRow"],["class","text-center",4,"ngIf"],["class","fas fa-circle fa-fw align-middle text-success text-v-small",4,"ngIf"],["class","fas fa-circle fa-fw align-middle text-muted text-v-small",4,"ngIf"],["pTooltip","Running on native process","class","fas fa-radiation ml-2 text-danger",4,"ngIf"],[3,"value","pSelectableRow"],[1,"text-center"],[1,"fas","fa-circle","fa-fw","align-middle","text-success","text-v-small"],[1,"fas","fa-circle","fa-fw","align-middle","text-muted","text-v-small"],["pTooltip","Running on native process",1,"fas","fa-radiation","ml-2","text-danger"],[1,"m-0","vertical-align-sub"],["label","Save Response In Log",3,"ngModel","binary","ngModelChange","click"],["href","javascript:","tooltipPosition","left","pTooltip","Test API",1,"btn","btn-xsm-custom","mr-3",3,"routerLink","queryParams","click"],[1,"fas","fa-vial","text-info","fa-fw","test-tube","pt-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(s,a){1&s&&(e.j41(0,"div",0)(1,"div",1)(2,"span"),e.nrm(3,"img",2),e.EFF(4," Scheduler List"),e.k0s(),e.j41(5,"div",3)(6,"a",4),e.nrm(7,"img",5),e.k0s()(),e.DNE(8,K,6,3,"span",6),e.DNE(9,$,3,2,"span",7),e.DNE(10,Y,3,2,"span",7),e.k0s(),e.j41(11,"div",8),e.DNE(12,V,3,1,"div",6),e.DNE(13,de,5,7,"div",9),e.k0s()(),e.nrm(14,"app-w-scheduler-man-form",10,11)),2&s&&(e.R7$(8),e.Y8G("ngIf",!a.isReadOnly),e.R7$(1),e.Y8G("ngIf",a.isDependentOnGroup),e.R7$(1),e.Y8G("ngIf",a.isFilterLogTable),e.R7$(2),e.Y8G("ngIf",a.eventCenterS.group.apisRegex.allSchedulers||a.eventCenterS.filterInLog.apisRegex.allSchedulers),e.R7$(1),e.Y8G("ngIf",!(a.eventCenterS.group.apisRegex.allSchedulers||a.eventCenterS.filterInLog.apisRegex.allSchedulers)),e.R7$(1),e.Y8G("data",a.data))},dependencies:[T.Wk,G.BC,G.vS,w.bT,C.XI,p.Ei,C.d5,C.S9,C.nA,b.p,N.m,j.Sc,k.X],encapsulation:2})}return n})()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[3488],{3534:(D,C,a)=>{a.d(C,{r:()=>ne});var m=a(467),c=a(8727),_=a(5046),E=a(7376),f=a(4388),u=a(6645),v=a(9773),O=a(5312),M=a(5632),F=a(9239),p=a(8677),g=a(2133),e=a(540),P=a(6708),S=a(123),h=a(6129),R=a(6268),A=a(1987),b=a(7237),B=a(3864),U=a(3966),y=a(177),j=a(3478),L=a(8026),K=a(4098),W=a(6914),G=a(7515),I=a(4945),V=a(8542),X=a(4466);const x=["QuillEditorC"],N=["insertCodeModalC"],k=["monacoEditorModalC"];function H(s,l){if(1&s&&e.nrm(0,"span",31),2&s){const t=e.XpG();e.Y8G("innerHTML",t.userNoteHtml,e.npT)}}function Y(s,l){1&s&&(e.j41(0,"span"),e.nrm(1,"i",32),e.EFF(2," Add Custom API"),e.k0s())}function w(s,l){1&s&&(e.j41(0,"span"),e.nrm(1,"i",33),e.EFF(2," View Custom API"),e.k0s())}function Q(s,l){if(1&s&&(e.j41(0,"span"),e.nrm(1,"i",34),e.EFF(2," Edit Custom API "),e.j41(3,"span",35),e.EFF(4),e.k0s()()),2&s){const t=e.XpG();e.R7$(4),e.JRh((null==t.updateObj?null:t.updateObj.name)||"")}}function J(s,l){if(1&s){const t=e.RV6();e.j41(0,"div",36)(1,"app-monaco-editor",37),e.bIt("editorGenerated",function(o){e.eBV(t);const i=e.XpG();return e.Njj(i.editorGeneratedBasicInfo(o))}),e.k0s()()}if(2&s){const t=e.XpG();e.R7$(1),e.Y8G("isSchemaEditor",!0)("editorOptions",t.editorOptionsSchema)}}function Z(s,l){if(1&s){const t=e.RV6();e.j41(0,"div",36)(1,"app-monaco-editor",37),e.bIt("editorGenerated",function(o){e.eBV(t);const i=e.XpG();return e.Njj(i.editorGenerated(o))}),e.k0s()()}if(2&s){const t=e.XpG();e.R7$(1),e.Y8G("isSchemaEditor",!0)("editorOptions",t.editorOptionsSchema)}}function z(s,l){if(1&s){const t=e.RV6();e.j41(0,"a",38),e.bIt("click",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.viewError())}),e.EFF(1,"View error"),e.k0s()}}function q(s,l){1&s&&(e.j41(0,"span"),e.EFF(1,"Save"),e.k0s())}function ee(s,l){1&s&&(e.j41(0,"span"),e.EFF(1,"Update"),e.k0s())}function te(s,l){if(1&s){const t=e.RV6();e.j41(0,"button",39),e.bIt("click",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.save())}),e.nrm(1,"i",40),e.DNE(2,q,2,0,"span",5),e.DNE(3,ee,2,0,"span",5),e.k0s()}if(2&s){const t=e.XpG();e.R7$(2),e.Y8G("ngIf",t.data.mode===t.EFormMode.ADD),e.R7$(1),e.Y8G("ngIf",t.data.mode===t.EFormMode.EDIT)}}function oe(s,l){1&s&&e.nrm(0,"p-progressSpinner",41)}let ne=(()=>{class s{ns;functionS;generalS;instanceS;constantsS;authCS;monacoS;eventCenterS;generalCS;data;loading={form:!1};EFormMode=_.X;subscriptions=[];EAPIAccessType=v.MW;editorFunctions;editorFunctionsBasicInfo;editorOptionsSchema={readOnly:!1,language:"typescript",contextmenu:!0};lastError;editorOptionsMonacoEditorModal={readOnly:!0,language:"json",contextmenu:!0};updateObj;QuillEditorC;userNoteHtml='\n <span class="font-weight-bold text-success">Note:</span><br/>\n <span>Name might be used in code,<br/> so consider changing in code also.</span>\n ';BE_HOST_PORT=O.c.BE_HOST_PORT;DOCS_HOST_PORT=O.c.DOCS_HOST_PORT;shouldLoadMonacoEditor=!1;insertCodeModalC;viewDockerfileModelC;constructor(t,n,o,i,r,d,ae,se,ie){this.ns=t,this.functionS=n,this.generalS=o,this.instanceS=i,this.constantsS=r,this.authCS=d,this.monacoS=ae,this.eventCenterS=se,this.generalCS=ie}ngOnInit(){var t=this;this.subscriptions.push(this.data.eventChannel.subscribe(function(){var n=(0,m.A)(function*(o){if(o)if(o.action===c.K.OPEN_FORM_IN_EDIT_MODE||o.action===c.K.OPEN_FORM_IN_VIEW_MODE){const i=`${t.data.formData.guid}:${t.data.formData.user}`,r=yield t.functionS.getById(i).toPromise();t.updateObj=r.data,t.generalCS.setValueInEditor(t,"editorFunctionsBasicInfo",r.data?.functionBasicInfo||""),t.generalCS.setValueInEditor(t,"editorFunctions",r.data?.functionCode||""),t.generalCS.setValueInEditor(t,"QuillEditorC",r.data?.apiDocs||"");const d={};t.updateObj.separateSandboxSettings?.enableSeparateSandboxForThis&&(d.enableSeparateSandboxForThis=t.updateObj.separateSandboxSettings.enableSeparateSandboxForThis,d.allowAllPackagesOfAdmin=t.updateObj.separateSandboxSettings?.packages?.allowAllPackagesOfAdmin??!1),yield t.monacoS.loadTypesInMonaco(t.BE_HOST_PORT,t.authCS.getUserId(),d)}else if(o.action===c.K.OPEN_FORM_IN_ADD_MODE){const i=yield t.instanceS.getDefaultContent(t.BE_HOST_PORT,M.O.CUSTOM_API_JSON).toPromise(),r=yield t.instanceS.getDefaultContent(t.BE_HOST_PORT,M.O.CUSTOM_APIS).toPromise();t.generalCS.setValueInEditor(t,"editorFunctionsBasicInfo",i.data),t.generalCS.setValueInEditor(t,"editorFunctions",r.data),setTimeout(()=>{t.QuillEditorC.quill.setContents([{insert:"### API "},{insert:"Documentation",attributes:{bold:!0}},{insert:"\n"}])},1e3),t.updateObj={}}});return function(o){return n.apply(this,arguments)}}()))}showModal(){this.lastError=void 0,this.shouldLoadMonacoEditor=!0,setTimeout(()=>{$("#idFunctionForm").modal("show")},100)}hideModal(){$("#idFunctionForm").modal("hide")}save(){var t=this;return(0,m.A)(function*(){let o;o=t.data.formData&&t.data.formData._id?(yield t.functionS.getById(t.data.formData._id).toPromise()).data:{};const i=E.find(o.versions||[],{isActive:!0});i&&(i.apiCodeStr=t.editorFunctions.getValue());let r=Object.assign({},o,{});r.user=t.authCS.getUserId(),r.functionCode=t.editorFunctions.getValue(),r.functionBasicInfo=t.editorFunctionsBasicInfo.getValue(),r.apiDocs=t.QuillEditorC.getValue();for(const d of r?.versions||[])d.version=d.version.toString();r=Object.assign({},t.updateObj||{},r);try{let d;t.loading.form=!0,t.lastError=void 0,t.data.mode===_.X.ADD?d=yield t.functionS.post(r).toPromise():t.data.mode===_.X.EDIT&&(d=yield t.functionS.replace(r._id,r,{select:u.GX._id}).toPromise()),t.ns.showSuccess(t.data.mode===_.X.ADD?t.constantsS.functions.addSuccess:t.constantsS.functions.editSuccess),t.data.eventChannel.emit({action:t.data.mode===_.X.ADD?c.K.SAVED:c.K.UPDATED}),t.eventCenterS.customApiSavedAndUpdate.next(!0),t.loading.form=!1}catch(d){t.ns.showErrorMessageFromErrorObject(d),t.loading.form=!1,t.lastError=d.error}})()}selectedTabTitle;tabSelected(t){this.selectedTabTitle=(t.originalEvent.originalTarget||t.originalEvent.currentTarget).text}setMessageReceiver(){this.generalCS.messageReceivedFor=void 0===this.selectedTabTitle||"Basic Info"===this.selectedTabTitle?f.r.Settings:f.r.All}showInsertCodeModel(){this.setMessageReceiver(),this.insertCodeModalC.showModal(p.Z.FunManFormC)}editorGenerated(t){var n=this;return(0,m.A)(function*(){n.editorFunctions=t,yield n.monacoS.loadSchemaEditorSettings(n.BE_HOST_PORT,n.authCS.getUserId(),null),n.monacoS.addSaveCodeKeyBinding(t,o=>{n.data.mode!==_.X.VIEW&&n.save()}),n.monacoS.addInsertCodeKeyBinding(t,o=>{n.data.mode!==_.X.VIEW&&(n.setMessageReceiver(),n.insertCodeModalC.showModal(p.Z.FunManFormC))}),n.subscriptions.push(n.generalS.messageReceived.subscribe(o=>{o.type&&o.type===g.R.TEXT_COPIED&&"Code"===n.selectedTabTitle&&o.componentName===p.Z.FunManFormC&&(n.monacoS.insertAtCursor(t,o.selectedText),n.insertCodeModalC.hideModal())}))})()}editorGeneratedBasicInfo(t){var n=this;return(0,m.A)(function*(){n.editorFunctionsBasicInfo=t,yield n.monacoS.loadSchemaEditorSettings(n.BE_HOST_PORT,n.authCS.getUserId(),null),n.monacoS.addSaveCodeKeyBinding(t,o=>{n.data.mode!==_.X.VIEW&&n.save()}),n.monacoS.addInsertCodeKeyBinding(t,o=>{n.data.mode!==_.X.VIEW&&(n.setMessageReceiver(),n.insertCodeModalC.showModal(p.Z.FunManFormC))}),n.subscriptions.push(n.generalS.messageReceived.subscribe(o=>{o.type&&o.type===g.R.TEXT_COPIED&&o.componentName===p.Z.FunManFormC&&(void 0===n.selectedTabTitle||"Basic Info"===n.selectedTabTitle)&&(n.monacoS.insertAtCursor(t,o.selectedText),n.insertCodeModalC.hideModal())}))})()}viewError(){this.viewDockerfileModelC.showModal(this.generalS.stringify(this.lastError),F.L.json)}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions),this.eventCenterS.customApiSavedAndUpdate.next(!1)}static \u0275fac=function(n){return new(n||s)(e.rXU(P.m),e.rXU(S.a),e.rXU(h.f),e.rXU(R.J),e.rXU(A.X),e.rXU(b.l),e.rXU(B.e),e.rXU(U.d),e.rXU(h.f))};static \u0275cmp=e.VBU({type:s,selectors:[["app-w-fun-man-form"]],viewQuery:function(n,o){if(1&n&&(e.GBs(x,5),e.GBs(N,5),e.GBs(k,5)),2&n){let i;e.mGM(i=e.lsd())&&(o.QuillEditorC=i.first),e.mGM(i=e.lsd())&&(o.insertCodeModalC=i.first),e.mGM(i=e.lsd())&&(o.viewDockerfileModelC=i.first)}},inputs:{data:"data"},decls:37,vars:14,consts:[["template",""],["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idFunctionForm","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/custom-apis/user-created-custom-api.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-2","mr-1","mt-n2",2,"font-size","25px"],[1,"modal-body","overflow-auto"],[3,"onChange"],["header","Basic Info"],["class","overflow-hidden","style","height: calc(100vh - 188px);",4,"ngIf"],["header","Code"],["header","Docs"],["QuillEditorC",""],[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,"click",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"frameId","modalId","docsHostPort"],["insertCodeModalC",""],[3,"modalId","editorOptionsMonacoEditorModal","modalTitle"],["monacoEditorModalC",""],[3,"innerHTML"],[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,"overflow-hidden",2,"height","calc(100vh - 188px)"],[3,"isSchemaEditor","editorOptions","editorGenerated"],["href","javascript:;",1,"text-danger",3,"click"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"click"],[1,"fas","fa-save","text-success","fa-fw","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(n,o){1&n&&(e.DNE(0,H,1,1,"ng-template",null,0,e.C5r),e.j41(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4),e.DNE(6,Y,3,0,"span",5),e.DNE(7,w,3,0,"span",5),e.DNE(8,Q,5,1,"span",5),e.j41(9,"div",6)(10,"button",7),e.bIt("click",function(){return o.hideModal()}),e.j41(11,"span",8),e.nrm(12,"i",9),e.k0s()(),e.j41(13,"span",10),e.bIt("click",function(){return o.showInsertCodeModel()}),e.nrm(14,"i",11),e.k0s(),e.j41(15,"a",12),e.nrm(16,"img",13),e.k0s()()(),e.j41(17,"div",14)(18,"p-tabView",15),e.bIt("onChange",function(r){return o.tabSelected(r)}),e.j41(19,"p-tabPanel",16),e.DNE(20,J,2,2,"div",17),e.k0s(),e.j41(21,"p-tabPanel",18),e.DNE(22,Z,2,2,"div",17),e.k0s(),e.j41(23,"p-tabPanel",19),e.nrm(24,"app-quill-editor",null,20),e.k0s()()(),e.j41(26,"div",21),e.DNE(27,z,2,0,"a",22),e.j41(28,"button",23),e.bIt("click",function(){return o.hideModal()}),e.nrm(29,"i",24),e.EFF(30," Close"),e.k0s(),e.DNE(31,te,4,2,"button",25),e.k0s(),e.DNE(32,oe,1,0,"p-progressSpinner",26),e.k0s()()(),e.nrm(33,"app-insert-code-modal",27,28)(35,"app-monaco-editor-modal",29,30)),2&n&&(e.R7$(6),e.Y8G("ngIf",o.data.mode===o.EFormMode.ADD),e.R7$(1),e.Y8G("ngIf",o.data.mode===o.EFormMode.VIEW),e.R7$(1),e.Y8G("ngIf",o.data.mode===o.EFormMode.EDIT),e.R7$(12),e.Y8G("ngIf",o.shouldLoadMonacoEditor),e.R7$(2),e.Y8G("ngIf",o.shouldLoadMonacoEditor),e.R7$(5),e.Y8G("ngIf",o.lastError),e.R7$(4),e.Y8G("ngIf",o.data.mode!==o.EFormMode.VIEW),e.R7$(1),e.Y8G("ngIf",o.loading.form),e.R7$(1),e.Y8G("frameId","idInsertCodeCusApi")("modalId","idInsertCodeCusApiForm")("docsHostPort",o.DOCS_HOST_PORT),e.R7$(2),e.Y8G("modalId","idMonacoEditorModalInCustomApi")("editorOptionsMonacoEditorModal",o.editorOptionsMonacoEditorModal)("modalTitle","Error info"))},dependencies:[y.bT,j.U,L.k,K.V,W.A,G.p,I.JQ,I.Kp,V.m,X.J],encapsulation:2})}return s})()},3488:(D,C,a)=>{a.d(C,{d:()=>f});var m=a(7431),c=a(2508),E=(a(3534),a(540));let f=(()=>{class u{static \u0275fac=function(M){return new(M||u)};static \u0275mod=E.$C({type:u});static \u0275inj=E.G2t({imports:[m.u,c.v]})}return u})()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[4344],{4339:(_e,G,l)=>{l.d(G,{m:()=>j});var C=l(467),e=l(5046),D=l(6147),P=l(7376),S=l(7326),T=l(6645),n=l(540),y=l(4341),k=l(6129),F=l(3851),w=l(6708),V=l(1987),i=l(7237),X=l(6268),K=l(7337),Y=l(9819),Q=l(6170),J=l(123),N=l(5938),H=l(177),U=l(5779),Z=l(7515),R=l(8150);function W(E,A){if(1&E){const o=n.RV6();n.j41(0,"div",2)(1,"span",3),n.EFF(2,"Database"),n.k0s(),n.j41(3,"p-dropdown",9),n.bIt("onChange",function(p){n.eBV(o);const r=n.XpG(2);return r.tab.database=p.value,n.Njj(r.loadCollections(!0))}),n.k0s()()}if(2&E){const o=n.XpG(2);n.R7$(3),n.Y8G("options",o.tab.allDatabases)("ngModel",o.tab.database)("filter",!0)}}function z(E,A){if(1&E){const o=n.RV6();n.j41(0,"div",2)(1,"span",3),n.EFF(2,"Collections"),n.k0s(),n.j41(3,"p-dropdown",4),n.bIt("onChange",function(p){n.eBV(o);const r=n.XpG(2);return r.tab.collection=p.value,n.Njj(r.loadInstanceAPIs(!0))}),n.k0s()()}if(2&E){const o=n.XpG(2);n.R7$(3),n.Y8G("options",o.tab.allCollections)("ngModel",o.tab.collection)("filter",!0)}}function q(E,A){if(1&E){const o=n.RV6();n.j41(0,"div",1)(1,"div",2)(2,"span",3),n.EFF(3,"Instances"),n.k0s(),n.j41(4,"p-dropdown",4),n.bIt("onChange",function(p){n.eBV(o);const r=n.XpG();return r.tab.instance=p.value,n.Njj(r.loadDatabases(!0))}),n.k0s()(),n.DNE(5,W,4,3,"div",8),n.DNE(6,z,4,3,"div",8),n.k0s()}if(2&E){const o=n.XpG();n.R7$(4),n.Y8G("options",o.tab.allInstances)("ngModel",o.tab.instance)("filter",!0),n.R7$(1),n.Y8G("ngIf",o.tab.apiCategory.id===o.EAPICategory.INSTANCES),n.R7$(1),n.Y8G("ngIf",o.tab.apiCategory.id===o.EAPICategory.INSTANCES)}}function ee(E,A){if(1&E){const o=n.RV6();n.j41(0,"div",2)(1,"span",3),n.EFF(2,"API Versions"),n.k0s(),n.j41(3,"p-dropdown",10),n.bIt("onChange",function(p){n.eBV(o);const r=n.XpG(2);return r.tab.tpStoreApiVersion=p.value,n.Njj(r.loadThirdPartyAPIs(!0))}),n.k0s()()}if(2&E){const o=n.XpG(2);n.R7$(3),n.Y8G("options",o.tab.allStoreApiVersions)("ngModel",o.tab.tpStoreApiVersion)("filter",!0)}}function L(E,A){if(1&E){const o=n.RV6();n.j41(0,"div",1)(1,"div",2)(2,"span",3),n.EFF(3,"API Bundle"),n.k0s(),n.j41(4,"p-dropdown",4),n.bIt("onChange",function(p){n.eBV(o);const r=n.XpG();return r.tab.tpApiBundle=p.value,n.Njj(r.loadStoreApiVersions(!0))}),n.k0s()(),n.DNE(5,ee,4,3,"div",8),n.k0s()}if(2&E){const o=n.XpG();n.R7$(4),n.Y8G("options",o.tab.allApiBundles)("ngModel",o.tab.tpApiBundle)("filter",!0),n.R7$(1),n.Y8G("ngIf",o.tab.apiCategory.id===o.EAPICategory.THIRD_PARTY_APIS)}}function B(E,A){if(1&E&&(n.j41(0,"span",18),n.EFF(1),n.k0s()),2&E){const o=n.XpG(2).$implicit;n.R7$(1),n.SpI(" - ",o.category.toLowerCase(),"")}}function te(E,A){if(1&E&&(n.j41(0,"span",19),n.EFF(1),n.k0s()),2&E){const o=n.XpG(2).$implicit;n.R7$(1),n.SpI(" - ",o.category.toLowerCase(),"")}}function ne(E,A){if(1&E&&(n.j41(0,"div")(1,"span"),n.EFF(2),n.k0s(),n.DNE(3,B,2,1,"span",16),n.DNE(4,te,2,1,"span",17),n.k0s()),2&E){const o=n.XpG().$implicit;n.R7$(2),n.JRh(o.name),n.R7$(1),n.Y8G("ngIf","SCHEMA"===o.category),n.R7$(1),n.Y8G("ngIf","GEN"===o.category)}}function ae(E,A){1&E&&n.DNE(0,ne,5,3,"div",15),2&E&&n.Y8G("ngIf",A.$implicit)}function se(E,A){if(1&E&&(n.j41(0,"span",18),n.EFF(1),n.k0s()),2&E){const o=n.XpG(2).$implicit;n.R7$(1),n.SpI(" - ",o.category.toLowerCase(),"")}}function oe(E,A){if(1&E&&(n.j41(0,"span",19),n.EFF(1),n.k0s()),2&E){const o=n.XpG(2).$implicit;n.R7$(1),n.SpI(" - ",o.category.toLowerCase(),"")}}function ie(E,A){if(1&E&&(n.j41(0,"div")(1,"span"),n.EFF(2),n.k0s(),n.DNE(3,se,2,1,"span",16),n.DNE(4,oe,2,1,"span",17),n.k0s()),2&E){const o=n.XpG().$implicit;n.R7$(2),n.JRh(o.name),n.R7$(1),n.Y8G("ngIf","SCHEMA"===o.category),n.R7$(1),n.Y8G("ngIf","GEN"===o.category)}}function re(E,A){1&E&&n.DNE(0,ie,5,3,"div",15),2&E&&n.Y8G("ngIf",A.$implicit)}function le(E,A){if(1&E){const o=n.RV6();n.j41(0,"div",11)(1,"div",1)(2,"div",12)(3,"span",3),n.EFF(4,"APIs"),n.k0s(),n.j41(5,"p-dropdown",4),n.bIt("onChange",function(p){n.eBV(o);const r=n.XpG();return n.Njj(r.tab.api=p.value)}),n.DNE(6,ae,1,1,"ng-template",13),n.DNE(7,re,1,1,"ng-template",14),n.k0s()()()()}if(2&E){const o=n.XpG();n.R7$(5),n.Y8G("options",o.tab.apiList)("ngModel",o.tab.api)("filter",!0)}}function x(E,A){1&E&&n.nrm(0,"p-progressSpinner",20)}let j=(()=>{class E{fb;generalS;webSocketEventsS;ns;constantsS;authCS;instanceS;navigationCS;tpStoreApiVersionS;tpInstalledApisS;functionS;dataProviderS;cd;EFormMode=e.X;form;subscriptions=[];tab={};apiCategories;loading={dropdown:!0};EAPICategory=D.O;tpAPIVersionMap={};apiCategoriesMap={};dbIdMap={};colIdMap={};tpLibraryMap={};tpPIMap={};constructor(o,t,p,r,d,u,c,v,f,I,h,_,b){this.fb=o,this.generalS=t,this.webSocketEventsS=p,this.ns=r,this.constantsS=d,this.authCS=u,this.instanceS=c,this.navigationCS=v,this.tpStoreApiVersionS=f,this.tpInstalledApisS=I,this.functionS=h,this.dataProviderS=_,this.cd=b}ngOnInit(){this.loadApiCategories().then()}loadApiCategories(){var o=this;return(0,C.A)(function*(){const t=o.dataProviderS.getApiCategoriesForWebSocketAndGroup();o.apiCategories=t.filter(r=>r.id!==D.O.SCHEDULERS&&r.id!==D.O.EVENTS),o.apiCategoriesMap=P.keyBy(o.apiCategories,T.qb.id);const p=o.navigationCS.getQueryParam(S.F.at_category);p&&o.tab&&(o.tab.apiCategory=P.find(o.apiCategories,{id:p})),o.tab.apiCategory||(o.tab.apiCategory=o.apiCategories[0]),yield o.apiCategoryChangedEvent(!1),yield o.categorySelected(!1),o.cd.detectChanges()})()}apiCategoryChangedEvent(o){var t=this;return(0,C.A)(function*(){t.loading.dropdown=!0,t.resetDependentObjects("INSTANCE"),yield t.categorySelected(o),t.tab.apiCategory.id===D.O.INSTANCES?yield t.loadInstances(o):t.tab.apiCategory.id===D.O.THIRD_PARTY_APIS?yield t.loadLibraries(o):t.tab.apiCategory.id===D.O.CUSTOM_APIS?yield t.loadCustomAPIs(o):t.tab.apiCategory.id===D.O.SYSTEM_APIS&&(yield t.loadSystemAPIs(o)),t.loading.dropdown=!1})()}loadInstances(o){var t=this;return(0,C.A)(function*(){t.resetDependentObjects("INSTANCE"),yield t.categorySelected(o),t.loading.dropdown=!0;try{const r={find:{user:t.authCS.getUserId(),active:!0},select:{name:1,active:1,user:1},sort:{name:1}};t.tab.allInstances=(yield t.instanceS.query(r).toPromise()).data||[]}catch(r){t.ns.showErrorMessageFromErrorObject(r),t.tab.allInstances=[]}const p=t.navigationCS.getQueryParam(S.F.at_instance);p&&(t.tab.instance=P.find(t.tab.allInstances,{name:p})),!t.tab.instance&&t.tab.allInstances.length&&(t.tab.instance=t.tab.allInstances[0]),yield t.loadDatabases(o),t.loading.dropdown=!1,t.cd.detectChanges()})()}loadDatabases(o){var t=this;return(0,C.A)(function*(){if(t.loading.dropdown=!0,t.resetDependentObjects("DATABASE"),yield t.setInstanceInURL(o),!t.tab.instance)return t.tab.allDatabases=[],t.tab.allCollections=[],void(t.tab.apiList=[]);try{t.tab.allDatabases=((yield t.instanceS.getDatabases([t.tab.instance]).toPromise()).data||[])[0]||[],t.dbIdMap=P.keyBy(t.tab.allDatabases,T.L3.db)}catch(r){t.ns.showErrorMessageFromErrorObject(r),t.tab.allDatabases=[]}const p=t.navigationCS.getQueryParam(S.F.at_database);p&&(t.tab.database=P.find(t.tab.allDatabases,{db:p})),!t.tab.database&&t.tab.allDatabases.length&&(t.tab.database=t.tab.allDatabases[0]),yield t.loadCollections(o),t.loading.dropdown=!1})()}loadCollections(o){var t=this;return(0,C.A)(function*(){if(t.loading.dropdown=!0,t.resetDependentObjects("COLLECTION"),yield t.setDatabaseInURL(o),!t.tab.instance||!t.tab.database)return t.tab.allCollections=[],void(t.tab.apiList=[]);try{t.tab.allCollections=((yield t.instanceS.getCollections([t.tab.database]).toPromise()).data||[])[0]||[],t.colIdMap=P.keyBy(t.tab.allCollections,T.qb.name)}catch(r){t.ns.showErrorMessageFromErrorObject(r),t.tab.allCollections=[]}const p=t.navigationCS.getQueryParam(S.F.at_collection);t.tab.collection=p?P.find(t.tab.allCollections,{name:p}):t.tab.allCollections[0],yield t.loadInstanceAPIs(o),t.loading.dropdown=!1,t.cd.detectChanges()})()}loadInstanceAPIs(o){var t=this;return(0,C.A)(function*(){if(t.loading.dropdown=!0,yield t.setCollectionInURL(o),!t.tab.instance||!t.tab.database||!t.tab.collection)return t.tab.apiList=[],void(t.loading.dropdown=!1);try{const r=t.tab.collection;r.removeStreamApisInResponse=!0,t.tab.apiList=(yield t.instanceS.instanceAPIList([r])).data||[]}catch(r){t.ns.showErrorMessageFromErrorObject(r),t.tab.apiList=[]}const p=t.navigationCS.getQueryParam(S.F.at_api);yield t.apiCommon(p)})()}loadLibraries(o){var t=this;return(0,C.A)(function*(){t.resetDependentObjects("LIBRARY"),t.loading.dropdown=!0,t.tab.allApiBundles=yield t.tpStoreApiVersionS.getAllAPIBundles(),t.tpLibraryMap=P.keyBy(t.tab.allApiBundles,"value");const p=t.navigationCS.getQueryParam(S.F.at_bundleName);p&&(t.tab.tpApiBundle=P.find(t.tab.allApiBundles,{value:p})),!t.tab.tpApiBundle&&t.tab.allApiBundles.length&&(t.tab.tpApiBundle=t.tab.allApiBundles[0]),yield t.loadStoreApiVersions(o),t.loading.dropdown=!1,t.cd.detectChanges()})()}loadStoreApiVersions(o){var t=this;return(0,C.A)(function*(){if(t.loading.dropdown=!0,t.resetDependentObjects("API_VERSION"),yield t.setLibraryInURL(o),!t.tab.tpApiBundle)return t.tab.allStoreApiVersions=[],void(t.tab.apiList=[]);t.tab.allStoreApiVersions=yield t.tpStoreApiVersionS.getAllStoreApiVersions([t.tab.tpApiBundle.value]);const p=t.navigationCS.getQueryParam(S.F.at_bundleName),r=t.navigationCS.getQueryParam(S.F.at_apiVersion);r&&(t.tab.tpStoreApiVersion=P.find(t.tab.allStoreApiVersions,{apiBundleName:p,storeApiVersion:r})),!t.tab.tpStoreApiVersion&&t.tab.allStoreApiVersions.length&&(t.tab.tpStoreApiVersion=t.tab.allStoreApiVersions[0]),yield t.loadThirdPartyAPIs(o),t.loading.dropdown=!1,t.cd.detectChanges()})()}loadThirdPartyAPIs(o){var t=this;return(0,C.A)(function*(){if(t.loading.dropdown=!0,yield t.setTPApiVersionInURL(o),!t.tab.tpApiBundle||!t.tab.tpStoreApiVersion)return void(t.tab.apiList=[]);t.tab.apiList=(yield t.tpInstalledApisS.getThirdPartyAPIListArray([t.tab.tpStoreApiVersion]).toPromise()).data,t.tpPIMap=P.keyBy(t.tab.apiList,T.GX._id);const p=t.navigationCS.getQueryParam(S.F.at_api);yield t.apiCommon(p)})()}loadCustomAPIs(o){var t=this;return(0,C.A)(function*(){t.loading.dropdown=!0;const p=yield t.functionS.getFunctionsAsAPI().toPromise();p.success&&p.data&&p.data.length&&(t.tab.apiList=p.data||[]);const r=t.navigationCS.getQueryParam(S.F.at_api);yield t.apiCommon(r)})()}loadSystemAPIs(o){var t=this;return(0,C.A)(function*(){t.loading.dropdown=!0;const p=yield t.instanceS.systemAPIList().toPromise();p?.data?.length&&(t.tab.apiList=p.data||[]);const r=t.navigationCS.getQueryParam(S.F.at_api);yield t.apiCommon(r)})()}apiCommon(o){var t=this;return(0,C.A)(function*(){t.loading.dropdown=!0,o?(t.tab.api=P.find(t.tab.apiList,{id:o}),t.tab.api||(t.tab.api=P.find(t.tab.apiList,{name:o}))):t.tab.api=t.tab.apiList[0],yield t.setApiInURL(),t.loading.dropdown=!1})()}categorySelected(o){var t=this;return(0,C.A)(function*(){t.tab.apiCategory&&(yield t.navigationCS.setQueryParam(S.F.at_category,t.tab.apiCategory.id),o&&(yield t.generalS.resetUrlParams([S.F.at_instance,S.F.at_database,S.F.at_collection,S.F.at_bundleName,S.F.at_apiVersion,S.F.at_api])))})()}resetDependentObjects(o){"INSTANCE"===o?(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"===o?(this.tab.allDatabases=this.tab.allCollections=this.tab.apiList=[],this.tab.database=this.tab.collection=this.tab.api=void 0):"COLLECTION"===o?(this.tab.allCollections=this.tab.apiList=[],this.tab.collection=this.tab.api=void 0):"LIBRARY"===o?(this.tab.allApiBundles=this.tab.allStoreApiVersions=this.tab.apiList=[],this.tab.tpApiBundle=this.tab.api=this.tab.tpStoreApiVersion=void 0):"API_VERSION"===o&&(this.tab.allStoreApiVersions=this.tab.apiList=[],this.tab.tpStoreApiVersion=this.tab.api=void 0)}setInstanceInURL(o){var t=this;return(0,C.A)(function*(){t.tab.instance&&t.tab.instance._id&&(yield t.navigationCS.setQueryParam(S.F.at_instance,t.tab.instance._id),o&&(yield t.generalS.resetUrlParams([S.F.at_database,S.F.at_collection,S.F.at_api])))})()}setDatabaseInURL(o){var t=this;return(0,C.A)(function*(){t.tab.database&&t.tab.database._id&&(yield t.navigationCS.setQueryParam(S.F.at_database,t.tab.database._id),o&&(yield t.generalS.resetUrlParams([S.F.at_collection,S.F.at_api])))})()}setCollectionInURL(o){var t=this;return(0,C.A)(function*(){t.tab.collection&&t.tab.collection._id&&(yield t.navigationCS.setQueryParam(S.F.at_collection,t.tab.collection._id),o&&(yield t.generalS.resetUrlParams([S.F.at_api])))})()}setLibraryInURL(o){var t=this;return(0,C.A)(function*(){t.tab.tpApiBundle&&t.tab.tpApiBundle.value&&(yield t.navigationCS.setQueryParam(S.F.at_bundleName,t.tab.tpApiBundle.value),o&&(yield t.generalS.resetUrlParams([S.F.at_apiVersion,S.F.at_api])))})()}setTPApiVersionInURL(o){var t=this;return(0,C.A)(function*(){t.tab.tpStoreApiVersion&&t.tab.tpStoreApiVersion._id&&(yield t.navigationCS.setQueryParam(S.F.at_apiVersion,t.tab.tpStoreApiVersion._id),o&&(yield t.generalS.resetUrlParams([S.F.at_api])))})()}setApiInURL(){var o=this;return(0,C.A)(function*(){o.tab?.api?.id&&(yield o.navigationCS.setQueryParam(S.F.at_api,o.tab.api.id))})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(t){return new(t||E)(n.rXU(y.ok),n.rXU(k.f),n.rXU(F.g),n.rXU(w.m),n.rXU(V.X),n.rXU(i.l),n.rXU(X.J),n.rXU(K.$),n.rXU(Y.V),n.rXU(Q.h),n.rXU(J.a),n.rXU(N.n),n.rXU(n.gRc))};static \u0275cmp=n.VBU({type:E,selectors:[["app-web-socket-events-form-second"]],decls:13,vars:7,consts:[[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"],["class","container mt-3 mb-3",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],["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"],[1,"container","mt-3","mb-3"],[1,"col-8"],["pTemplate","item"],["pTemplate","selectedItem"],[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"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(t,p){1&t&&(n.j41(0,"div")(1,"div",0)(2,"div",1)(3,"div",2)(4,"span",3),n.EFF(5,"API Category"),n.k0s(),n.j41(6,"p-dropdown",4),n.bIt("onChange",function(d){return p.tab.apiCategory=d.value,p.apiCategoryChangedEvent(!0)}),n.k0s()()()(),n.j41(7,"div",0),n.DNE(8,q,7,5,"div",5),n.k0s(),n.j41(9,"div",0),n.DNE(10,L,6,4,"div",5),n.k0s(),n.DNE(11,le,8,3,"div",6),n.DNE(12,x,1,0,"p-progressSpinner",7),n.k0s()),2&t&&(n.R7$(6),n.Y8G("options",p.apiCategories)("ngModel",p.tab.apiCategory)("filter",!0),n.R7$(2),n.Y8G("ngIf",p.tab.apiCategory.id===p.EAPICategory.INSTANCES),n.R7$(2),n.Y8G("ngIf",p.tab.apiCategory.id===p.EAPICategory.THIRD_PARTY_APIS),n.R7$(1),n.Y8G("ngIf",p.tab.apiCategory.id!==p.EAPICategory.WEB_SOCKET_EVENT),n.R7$(1),n.Y8G("ngIf",p.loading.dropdown))},dependencies:[y.BC,y.vS,H.bT,U.Ei,Z.p,R.ms],encapsulation:2})}return E})()},2199:(_e,G,l)=>{l.d(G,{o:()=>h});var C=l(467),e=l(540),D=l(8727),P=l(5046),s=l(7376),T=l(5632),n=l(7326),y=l(6645),k=l(6589),F=l(6129),w=l(6708),V=l(3851),i=l(7237),X=l(1987),K=l(3966),Y=l(334),Q=l(123),J=l(7337),N=l(5779),H=l(7060),U=l(4341),Z=l(177),R=l(7645),W=l(7515),z=l(8542),q=l(5430),ee=l(8061);const L=["webSocketEventsManFormC"];function B(_,b){if(1&_){const a=e.RV6();e.j41(0,"span",17),e.bIt("click",function(){e.eBV(a);const g=e.XpG(2);return e.Njj(g.navigateToTreeView())}),e.nrm(1,"i",18),e.k0s()}}function te(_,b){if(1&_){const a=e.RV6();e.j41(0,"span",19),e.bIt("click",function(){e.eBV(a);const g=e.XpG(2);return e.Njj(g.edit())}),e.nrm(1,"i",20),e.k0s()}}function ne(_,b){if(1&_){const a=e.RV6();e.j41(0,"span",21),e.bIt("click",function(){e.eBV(a);const g=e.XpG(2);return e.Njj(g.removePermanentDialog())}),e.nrm(1,"i",22),e.k0s()}}function ae(_,b){if(1&_){const a=e.RV6();e.j41(0,"span")(1,"span",12),e.bIt("click",function(){e.eBV(a);const g=e.XpG();return e.Njj(g.add())}),e.nrm(2,"i",13),e.k0s(),e.DNE(3,B,2,0,"span",14),e.DNE(4,te,2,0,"span",15),e.DNE(5,ne,2,0,"span",16),e.k0s()}if(2&_){const a=e.XpG();e.R7$(3),e.Y8G("ngIf",a.rows.length),e.R7$(1),e.Y8G("ngIf",a.selectedRows.length),e.R7$(1),e.Y8G("ngIf",a.selectedRows.length)}}function se(_,b){if(1&_){const a=e.RV6();e.j41(0,"span",23)(1,"label",24)(2,"p-checkbox",25),e.bIt("ngModelChange",function(g){e.eBV(a);const M=e.XpG();return e.Njj(M.eventCenterS.group.apisRegex.allWebSocketEvents=g)}),e.k0s()()()}if(2&_){const a=e.XpG();e.R7$(2),e.Y8G("ngModel",a.eventCenterS.group.apisRegex.allWebSocketEvents)("binary",!0)}}function oe(_,b){if(1&_){const a=e.RV6();e.j41(0,"span",23)(1,"label",24)(2,"p-checkbox",25),e.bIt("ngModelChange",function(g){e.eBV(a);const M=e.XpG();return e.Njj(M.eventCenterS.filterInLog.apisRegex.allWebSocketEvents=g)}),e.k0s()()()}if(2&_){const a=e.XpG();e.R7$(2),e.Y8G("ngModel",a.eventCenterS.filterInLog.apisRegex.allWebSocketEvents)("binary",!0)}}function ie(_,b){if(1&_&&(e.j41(0,"div")(1,"div",26),e.EFF(2),e.k0s()()),2&_){const a=e.XpG();e.R7$(2),e.JRh(a.constantsS.group.allWebSocketEventsPermitted)}}function re(_,b){1&_&&(e.j41(0,"th",36),e.nrm(1,"p-tableHeaderCheckbox"),e.k0s())}function le(_,b){1&_&&e.nrm(0,"th",37)}function x(_,b){1&_&&e.nrm(0,"th",38)}function j(_,b){if(1&_&&(e.j41(0,"tr"),e.DNE(1,re,2,0,"th",32),e.DNE(2,le,1,0,"th",33),e.j41(3,"th",34),e.EFF(4,"API Category"),e.k0s(),e.j41(5,"th"),e.EFF(6,"Name"),e.k0s(),e.DNE(7,x,1,0,"th",35),e.k0s()),2&_){const a=e.XpG(2);e.R7$(1),e.Y8G("ngIf",a.showCheckbox),e.R7$(1),e.Y8G("ngIf",!a.isDependentOnGroup&&!a.isLPM&&!a.isFilterLogTable),e.R7$(5),e.Y8G("ngIf",a.isLPM)}}function E(_,b){if(1&_&&(e.j41(0,"td"),e.nrm(1,"p-tableCheckbox",41),e.k0s()),2&_){const a=e.XpG().$implicit;e.R7$(1),e.Y8G("value",a)("pSelectableRow",a)}}function A(_,b){if(1&_&&(e.j41(0,"td",42)(1,"span"),e.EFF(2),e.k0s()()),2&_){const a=e.XpG().rowIndex;e.R7$(2),e.JRh(a+1)}}function o(_,b){if(1&_&&(e.j41(0,"div")(1,"span"),e.EFF(2),e.k0s(),e.j41(3,"span"),e.EFF(4," \u2192 "),e.k0s(),e.j41(5,"span"),e.EFF(6),e.k0s(),e.j41(7,"span"),e.EFF(8," \u2192 "),e.k0s(),e.j41(9,"span"),e.EFF(10),e.k0s(),e.j41(11,"span"),e.EFF(12," \u2192 "),e.k0s(),e.j41(13,"span"),e.EFF(14),e.k0s()()),2&_){const a=e.XpG().$implicit;e.R7$(2),e.JRh(a.instanceNameUI),e.R7$(4),e.JRh(a.databaseName),e.R7$(4),e.JRh(a.collectionName),e.R7$(4),e.JRh(a.apiNameUI)}}function t(_,b){if(1&_&&(e.j41(0,"div")(1,"span"),e.EFF(2),e.k0s(),e.j41(3,"span"),e.EFF(4," \u2192 "),e.k0s(),e.j41(5,"span"),e.EFF(6),e.k0s(),e.j41(7,"span"),e.EFF(8," \u2192 "),e.k0s(),e.j41(9,"span"),e.EFF(10),e.k0s()()),2&_){const a=e.XpG().$implicit;e.R7$(2),e.JRh(a.apiBundleNameUI),e.R7$(4),e.JRh(a.storeApiVersionUI),e.R7$(4),e.JRh(a.apiNameUI)}}function p(_,b){if(1&_&&(e.j41(0,"div")(1,"span"),e.EFF(2),e.k0s()()),2&_){const a=e.XpG().$implicit;e.R7$(2),e.JRh(a.apiNameUI)}}function r(_,b){if(1&_&&(e.j41(0,"div")(1,"span"),e.EFF(2),e.k0s()()),2&_){const a=e.XpG().$implicit;e.R7$(2),e.JRh(a.apiNameUI)}}function d(_,b){if(1&_&&(e.j41(0,"div")(1,"span"),e.EFF(2),e.k0s()()),2&_){const a=e.XpG().$implicit;e.R7$(2),e.JRh(a.apiNameUI)}}function u(_,b){if(1&_){const a=e.RV6();e.j41(0,"div")(1,"label",43)(2,"p-checkbox",44),e.bIt("ngModelChange",function(){e.eBV(a);const g=e.XpG(2).$implicit,M=e.XpG(2);return e.Njj(M.checkedChangeGridItem(g))})("ngModelChange",function(g){e.eBV(a);const M=e.XpG(2).$implicit;return e.Njj(M.saveResponseInLog=g)}),e.k0s()()()}if(2&_){const a=e.XpG(2).$implicit;e.R7$(2),e.Y8G("ngModel",a.saveResponseInLog)("binary",!0)}}function c(_,b){if(1&_&&(e.j41(0,"td"),e.DNE(1,u,3,2,"div",6),e.k0s()),2&_){const a=e.XpG().$implicit,m=e.XpG(2);e.R7$(1),e.Y8G("ngIf",m.selectedRows.indexOf(a)>=0)}}function v(_,b){if(1&_&&(e.j41(0,"tr",39),e.DNE(1,E,2,2,"td",6),e.DNE(2,A,3,1,"td",40),e.j41(3,"td"),e.EFF(4),e.k0s(),e.j41(5,"td"),e.DNE(6,o,15,4,"div",6),e.DNE(7,t,11,3,"div",6),e.DNE(8,p,3,1,"div",6),e.DNE(9,r,3,1,"div",6),e.DNE(10,d,3,1,"div",6),e.k0s(),e.DNE(11,c,2,1,"td",6),e.k0s()),2&_){const a=b.$implicit,m=e.XpG(2);e.Y8G("pSelectableRow",a),e.R7$(1),e.Y8G("ngIf",m.showCheckbox),e.R7$(1),e.Y8G("ngIf",!m.isDependentOnGroup&&!m.isLPM&&!m.isFilterLogTable),e.R7$(2),e.JRh(a.categoryUI),e.R7$(2),e.Y8G("ngIf",a.apiCategory===m.EAPICategory.INSTANCES),e.R7$(1),e.Y8G("ngIf",a.apiCategory===m.EAPICategory.THIRD_PARTY_APIS),e.R7$(1),e.Y8G("ngIf",a.apiCategory===m.EAPICategory.SYSTEM_APIS),e.R7$(1),e.Y8G("ngIf",a.apiCategory===m.EAPICategory.CUSTOM_APIS),e.R7$(1),e.Y8G("ngIf",a.apiCategory===m.EAPICategory.WEB_SOCKET_EVENT),e.R7$(1),e.Y8G("ngIf",m.isLPM)}}function f(_,b){1&_&&e.nrm(0,"p-progressSpinner",45)}function I(_,b){if(1&_){const a=e.RV6();e.j41(0,"div",27)(1,"p-table",28),e.bIt("selectionChange",function(g){e.eBV(a);const M=e.XpG();return e.Njj(M.selectedRows=g)})("selectionChange",function(){e.eBV(a);const g=e.XpG();return e.Njj(g.webSocketEventSelected())})("dblclick",function(){e.eBV(a);const g=e.XpG();return e.Njj(g.dblClickWebSocketEvent())}),e.DNE(2,j,8,3,"ng-template",29),e.DNE(3,v,12,10,"ng-template",30),e.k0s(),e.DNE(4,f,1,0,"p-progressSpinner",31),e.k0s()}if(2&_){const a=e.XpG();e.R7$(1),e.Y8G("selectionMode","multiple")("metaKeySelection",a.metaKeySelection)("selection",a.selectedRows)("dataKey",a.gridKey)("scrollable",!0)("value",a.rows),e.R7$(3),e.Y8G("ngIf",a.loading.grid)}}let h=(()=>{class _{generalS;notificationS;webSocketEventsS;authCS;constantsS;eventCenterS;cd;eventCenterCS;functionS;navigationCS;confirmationService;router;isReadOnly=!1;showCheckbox=!1;isDependentOnGroup=!1;isLPM=!1;isFilterLogTable=!1;metaKeySelection=!0;loading={grid:!1};subscriptions=[];data={mode:P.X.ADD,eventChannel:new e.bkB,formData:void 0};rows=[];rowsMap={};rowsMapName={};showAll=!1;selectedRows=[];gridKey=y.GX._id;EAPICategory=T.O;ERequestMethod=k.mO;webSocketEventsManFormC;constructor(a,m,g,M,O,ce,de,pe,me,ve,fe,Ee){this.generalS=a,this.notificationS=m,this.webSocketEventsS=g,this.authCS=M,this.constantsS=O,this.eventCenterS=ce,this.cd=de,this.eventCenterCS=pe,this.functionS=me,this.navigationCS=ve,this.confirmationService=fe,this.router=Ee}ngOnInit(){var a=this;this.loadGridData().then(),this.subscriptions.push(this.data.eventChannel.subscribe(m=>{(m.action===D.K.SAVED||m.action===D.K.UPDATED)&&(this.webSocketEventsManFormC.hideModal(),this.loadGridData().then())})),this.isDependentOnGroup&&this.subscriptions.push(this.eventCenterS.group.selectedGroups.subscribe(function(){var m=(0,C.A)(function*(g){g.length&&(yield a.loadGridData())});return function(g){return m.apply(this,arguments)}}())),this.subscriptions.push(this.eventCenterS.filterInLog.refreshGrid.subscribe(m=>{m&&this.loadGridData().then()})),this.generalS.setNewTitle("API Maker - WebSocket Events")}loadGridData(){var a=this;return(0,C.A)(function*(){if(a.isDependentOnGroup&&0===a.eventCenterS.group.selectedGroups.value.length)return void a.resetGridAndUrl();a.loading.grid=!0;const m=yield a.webSocketEventsS.getWSEventKGrid({}).toPromise();m.success?(a.selectedRows=[],a.rows=m.data,a.rowsMap=s.keyBy(a.rows,y.GX._id),a.rowsMapName=s.keyBy(a.rows,y.Wc.id)):a.resetGridAndUrl();const g=a.navigationCS.getQueryParam(n.F.am_ws_event)||(a.isFilterLogTable?a.eventCenterS.filterInLog.webSocketIds.value.join(","):a.eventCenterS.group.webSocketIds.value.join(","));if(g){const M=g.split(","),O=s.intersection(s.keys(a.rowsMap),M),ce=[];for(const de of O)a.rowsMap[de]&&ce.push(a.rowsMap[de]);a.selectedRows=ce,a.eventCenterS.webSocketEvents.selectedWebSocketEvents.next(ce),a.eventCenterS.filterInLog.webSocketIds.next(O)}if(a.isDependentOnGroup&&a.eventCenterS.group.webSocketIds.value.length&&(a.selectedRows=a.generalS.getObjectsFromIdArray(a.eventCenterS.group.webSocketIds.value,a.rowsMap),a.eventCenterS.group.webSocketApis.next(a.selectedRows)),a.isLPM&&a.eventCenterS.group.selectedGroups.value[0]?.queryParams?.webSocketEventNames?.length){const M=a.eventCenterS.group.selectedGroups.value[0];for(const O of M?.queryParams?.webSocketEventNames)a.rowsMapName[O]&&(a.rowsMapName[O].saveResponseInLog=M.webSocketEventsLog?.[O]?.saveResponseInLog||!1);a.setResDataInEventCenter()}setTimeout(()=>{a.loading.grid=!1,a.cd.detectChanges()},100)})()}add(){this.data.formData=void 0,this.data.mode=P.X.ADD,this.data.eventChannel.emit({action:D.K.OPEN_FORM_IN_ADD_MODE}),this.webSocketEventsManFormC.showModal().then()}view(){this.data.formData=this.selectedRows[0],this.data.mode=P.X.VIEW,this.data.eventChannel.emit({action:D.K.OPEN_FORM_IN_VIEW_MODE}),this.webSocketEventsManFormC.showModal().then()}edit(){this.data.formData=this.selectedRows[0],this.data.mode=P.X.EDIT,this.data.eventChannel.emit({action:D.K.OPEN_FORM_IN_EDIT_MODE}),this.webSocketEventsManFormC.showModal()}removePermanentDialog(){var a=this;return(0,C.A)(function*(){var m;a.confirmationService.confirm({message:a.constantsS.webSocketEvents.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(m=(0,C.A)(function*(){yield a.removePermanent()}),function(){return m.apply(this,arguments)})})})()}removePermanent(){var a=this;return(0,C.A)(function*(){a.loading.grid=!0;const m=yield a.webSocketEventsS.permanentDelete(a.selectedRows[0]._id).toPromise();a.loading.grid=!1,m.success?(a.notificationS.showSuccess(a.constantsS.webSocketEvents.removePermanent),a.resetGridAndUrl(),a.loadGridData().then(),a.selectedRows=[]):a.notificationS.showErrorFromResponse(m,a.constantsS.webSocketEvents.removePermanentError)})()}resetGridAndUrl(){this.rows=[],this.selectedRows=[],this.rowsMap={},this.rowsMapName={},this.eventCenterS.webSocketEvents.selectedWebSocketEvents.next([])}dblClickWebSocketEvent(){this.selectedRows.length&&this.edit()}navigateToTreeView(){this.router.navigate(["api-info","web-socket-events","layout-tree"]).then()}resetThisUrl(){var a=this;return(0,C.A)(function*(){a.eventCenterS.webSocketEvents.selectedWebSocketEvents.next([]),yield a.navigationCS.setQueryParam(n.F.am_ws_event,null)})()}setResDataInEventCenter(){this.isDependentOnGroup&&(this.eventCenterS.group.webSocketApis.next(this.selectedRows),this.eventCenterS.group.selectedWebSocket.next(this.selectedRows),this.eventCenterS.group.webSocketIds.next(s.map(this.selectedRows,"_id"))),this.isFilterLogTable&&this.eventCenterS.filterInLog.webSocketApis.next(this.selectedRows)}webSocketEventSelected(){var a=this;return(0,C.A)(function*(){if(a.fillData().then(),a.selectedRows?.[0]){const m=(a.selectedRows[0]?.nameUI||"").split("/");a.generalS.setNewTitle(m[m.length-1],T.O.WEB_SOCKET_EVENT)}})()}fillData(){var a=this;return(0,C.A)(function*(){if(!a.selectedRows.length)return yield a.navigationCS.setQueryParam(n.F.am_ws_event,""),a.eventCenterS.group.webSocketIds.next([]),a.eventCenterS.group.webSocketApis.next([]),a.eventCenterS.filterInLog.webSocketIds.next([]),void a.eventCenterS.filterInLog.webSocketApis.next([]);if(a.isDependentOnGroup||a.isFilterLogTable)a.eventCenterS.group.webSocketIds.next(s.map(a.selectedRows,"_id")),a.eventCenterS.group.webSocketApis.next(a.selectedRows),a.isFilterLogTable&&(a.eventCenterS.filterInLog.webSocketIds.next(s.map(a.selectedRows,"_id")),a.eventCenterS.filterInLog.webSocketApis.next(a.selectedRows));else{const m=(yield a.webSocketEventsS.getById(a.selectedRows[0]._id).toPromise()).data;m._id?(yield a.navigationCS.setQueryParam(n.F.am_ws_event,m._id),a.eventCenterS.webSocketEvents.selectedWebSocketEvents.next([m])):a.resetThisUrl()}})()}checkedChangeGridItem(a){var m=this;setTimeout((0,C.A)(function*(){m.selectedRows.push(a),m.selectedRows=s.uniq(m.selectedRows);for(const g in m.rowsMap){const M=m.rowsMap[g];-1===m.selectedRows.indexOf(M)&&(M.saveResponseInLog=!1)}m.setResDataInEventCenter(),m.cd.detectChanges()}),100)}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(m){return new(m||_)(e.rXU(F.f),e.rXU(w.m),e.rXU(V.g),e.rXU(i.l),e.rXU(X.X),e.rXU(K.d),e.rXU(e.gRc),e.rXU(Y.u),e.rXU(Q.a),e.rXU(J.$),e.rXU(N.td),e.rXU(H.Ix))};static \u0275cmp=e.VBU({type:_,selectors:[["app-web-socket-events-grid"]],viewQuery:function(m,g){if(1&m&&e.GBs(L,5),2&m){let M;e.mGM(M=e.lsd())&&(g.webSocketEventsManFormC=M.first)}},inputs:{isReadOnly:["IsReadOnly","isReadOnly"],showCheckbox:"showCheckbox",isDependentOnGroup:["IsDependentOnGroup","isDependentOnGroup"],isLPM:"isLPM",isFilterLogTable:"isFilterLogTable",metaKeySelection:"metaKeySelection"},decls:16,vars:6,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],["src","/assets/images/icons/web.svg","alt","WebSocket Events",1,"fa-fw","mr-1"],[1,"float-right"],["href","https://docs.apimaker.dev/v1/docs/pages/web-socket-event-page.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px"],[4,"ngIf"],["class","float-right cursor-pointer","tooltipPosition","left","pTooltip","All WebSocket Events",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],["class","h-100",4,"ngIf"],[3,"data"],["webSocketEventsManFormC",""],["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","Permanent Delete",3,"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","Permanent Delete",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],["tooltipPosition","left","pTooltip","All WebSocket Events",1,"float-right","cursor-pointer"],[1,"align-middle","mb-0","mt--2px"],[3,"ngModel","binary","ngModelChange"],[1,"p-2","text-center","text-success"],[1,"h-100"],["styleClass","p-datatable-striped ws-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"],[2,"width","200px"],["style","width: 60px;",4,"ngIf"],[2,"width","45px"],[2,"width","80px"],[2,"width","60px"],[3,"pSelectableRow"],["class","text-center",4,"ngIf"],[3,"value","pSelectableRow"],[1,"text-center"],[1,"m-0","vertical-align-sub"],["label","Save Response In Log",3,"ngModel","binary","ngModelChange"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(m,g){1&m&&(e.j41(0,"div",0)(1,"div",1)(2,"span"),e.nrm(3,"img",2),e.EFF(4," WebSocket Events"),e.k0s(),e.j41(5,"div",3)(6,"a",4),e.nrm(7,"img",5),e.k0s()(),e.DNE(8,ae,6,3,"span",6),e.DNE(9,se,3,2,"span",7),e.DNE(10,oe,3,2,"span",7),e.k0s(),e.j41(11,"div",8),e.DNE(12,ie,3,1,"div",6),e.DNE(13,I,5,7,"div",9),e.k0s()(),e.nrm(14,"app-web-socket-events-man-form",10,11)),2&m&&(e.R7$(8),e.Y8G("ngIf",!g.isDependentOnGroup&&!g.isLPM&&!g.isFilterLogTable),e.R7$(1),e.Y8G("ngIf",g.isDependentOnGroup),e.R7$(1),e.Y8G("ngIf",g.isFilterLogTable),e.R7$(2),e.Y8G("ngIf",g.eventCenterS.group.apisRegex.allWebSocketEvents||g.eventCenterS.filterInLog.apisRegex.allWebSocketEvents),e.R7$(1),e.Y8G("ngIf",!(g.eventCenterS.group.apisRegex.allWebSocketEvents||g.eventCenterS.filterInLog.apisRegex.allWebSocketEvents)),e.R7$(1),e.Y8G("data",g.data))},dependencies:[U.BC,U.vS,Z.bT,R.XI,N.Ei,R.d5,R.S9,R.nA,W.p,z.m,q.Sc,ee.Y],styles:[".custom-tab-title[_ngcontent-%COMP%]{padding:.5rem}.min-width[_ngcontent-%COMP%], .none[_ngcontent-%COMP%], .delete[_ngcontent-%COMP%], .post[_ngcontent-%COMP%], .put[_ngcontent-%COMP%], .get[_ngcontent-%COMP%]{width:45px;display:inline-block}.get[_ngcontent-%COMP%]{color:var(--accent-success)}.put[_ngcontent-%COMP%]{color:var(--brand-secondary)}.post[_ngcontent-%COMP%]{color:var(--accent-warning)}.delete[_ngcontent-%COMP%]{color:var(--accent-error)}.none[_ngcontent-%COMP%]{color:var(--accent-success--shade--three)}.width-160[_ngcontent-%COMP%]{width:160px}"]})}return _})()},8061:(_e,G,l)=>{l.d(G,{Y:()=>r});var C=l(467),e=l(4341),D=l(8727),P=l(5046),s=l(6147),S=l(7376),n=l(4388),y=l(7326),k=l(6645),F=l(5312),w=l(8677),V=l(2133),i=l(540),X=l(6129),K=l(3851),Y=l(6708),Q=l(1987),J=l(7237),N=l(3864),H=l(6170),U=l(6268),Z=l(9819),R=l(7337),W=l(177),z=l(3478),q=l(4098),ee=l(6914),L=l(7515),B=l(4945),te=l(8542),ne=l(5430),ae=l(4339);const se=["webSocketEventsFormSecondC"],oe=["insertCodeModalC"];function ie(d,u){1&d&&(i.j41(0,"span"),i.nrm(1,"i",30),i.EFF(2," Add WebSocket Event"),i.k0s())}function re(d,u){1&d&&(i.j41(0,"span"),i.nrm(1,"i",31),i.EFF(2," View WebSocket Event"),i.k0s())}function le(d,u){1&d&&(i.j41(0,"span"),i.nrm(1,"i",32),i.EFF(2," Edit WebSocket Event"),i.k0s())}function x(d,u){1&d&&(i.j41(0,"div",33)(1,"div",34)(2,"span",35),i.EFF(3,"Name"),i.k0s(),i.nrm(4,"input",36),i.k0s()())}function j(d,u){if(1&d){const c=i.RV6();i.j41(0,"div",37)(1,"app-monaco-editor",38),i.bIt("editorGenerated",function(f){i.eBV(c);const I=i.XpG();return i.Njj(I.editorGenerated(f))}),i.k0s()()}if(2&d){const c=i.XpG();i.R7$(1),i.Y8G("isSchemaEditor",!0)("editorOptions",c.editorOptionsSchedulers)}}function E(d,u){1&d&&(i.j41(0,"span"),i.EFF(1,"Save"),i.k0s())}function A(d,u){1&d&&(i.j41(0,"span"),i.EFF(1,"Update"),i.k0s())}function o(d,u){if(1&d){const c=i.RV6();i.j41(0,"button",39),i.bIt("click",function(){i.eBV(c);const f=i.XpG();return i.Njj(f.save())}),i.nrm(1,"i",40),i.DNE(2,E,2,0,"span",4),i.DNE(3,A,2,0,"span",4),i.k0s()}if(2&d){const c=i.XpG();i.R7$(2),i.Y8G("ngIf",c.data.mode===c.EFormMode.ADD),i.R7$(1),i.Y8G("ngIf",c.data.mode===c.EFormMode.EDIT)}}function t(d,u){1&d&&i.nrm(0,"p-progressSpinner",41)}const p=function(d){return{"text-danger font-weight-bold":d}};let r=(()=>{class d{fb;generalCS;webSocketEventsS;ns;constantsS;authCS;monacoS;tpInstalledApisS;instanceS;tpStoreApiVersionS;navigationCS;cd;data;EFormMode=P.X;form;subscriptions=[];loading={form:!1};EAPICategory=s.O;reqActiveIndex=0;tabIndexReq={Basic:0,Code:1,Intervals:2};BE_HOST_PORT=F.c.BE_HOST_PORT;DOCS_HOST_PORT=F.c.DOCS_HOST_PORT;shouldLoadMonacoEditor=!1;editorWSNotifications;editorOptionsSchedulers={readOnly:!1,language:"typescript",contextmenu:!0};wsFormSecondC;insertCodeModalC;constructor(c,v,f,I,h,_,b,a,m,g,M,O){this.fb=c,this.generalCS=v,this.webSocketEventsS=f,this.ns=I,this.constantsS=h,this.authCS=_,this.monacoS=b,this.tpInstalledApisS=a,this.instanceS=m,this.tpStoreApiVersionS=g,this.navigationCS=M,this.cd=O}ngOnInit(){var c=this;this.createForm(),this.subscriptions.push(this.data.eventChannel.subscribe(function(){var v=(0,C.A)(function*(f){if(f)if(c.form.enable(),f.action===D.K.OPEN_FORM_IN_EDIT_MODE){if(!c.data.formData)return;const I=yield c.webSocketEventsS.getById(c.data.formData._id).toPromise();c.form.reset(),yield c.editModelLoadData(I.data),c.form.patchValue(I.data)}else if(f.action===D.K.OPEN_FORM_IN_VIEW_MODE){if(!c.data.formData)return;const I=yield c.webSocketEventsS.getById(c.data.formData._id).toPromise();c.form.reset(),c.form.patchValue(I.data),c.form.disable()}else if(f.action===D.K.OPEN_FORM_IN_ADD_MODE){c.form.reset();const I=yield c.instanceS.getDefaultContent(c.BE_HOST_PORT,s.O.WEB_SOCKET_EVENT_CAN_USER_CONNECT_CODE).toPromise();c.generalCS.setValueInEditor(c,"editorWSNotifications",I.data)}});return function(f){return v.apply(this,arguments)}}()))}createForm(){this.form=this.fb.group({name:[null,[e.k0.required]],runOnNativeProcess:[!1,[]]})}showInsertCodeModel(){this.generalCS.messageReceivedFor=n.r.All,this.insertCodeModalC.showModal(w.Z.WebSocketFormC)}showModal(){var c=this;return(0,C.A)(function*(){c.shouldLoadMonacoEditor=!0,$("#idWebSocketEventsForm").modal("show"),setTimeout((0,C.A)(function*(){yield c.wsFormSecondC.loadApiCategories()}),100)})()}hideModal(){$("#idWebSocketEventsForm").modal("hide")}editModelLoadData(c){var v=this;return(0,C.A)(function*(){if(yield v.wsFormSecondC.categorySelected(!0),v.wsFormSecondC.tab.apiCategory=v.wsFormSecondC.apiCategoriesMap[c.apiCategory],yield v.navigationCS.setQueryParam(y.F.at_category,c.apiCategory),c.apiCategory===s.O.SYSTEM_APIS)yield v.navigationCS.setQueryParam(y.F.at_api,c.systemApiName);else if(c.apiCategory===s.O.CUSTOM_APIS)yield v.navigationCS.setQueryParam(y.F.at_api,c.customApiName);else if(c.apiCategory===s.O.INSTANCES)yield v.navigationCS.setQueryParam(y.F.at_instance,c.instanceName),yield v.navigationCS.setQueryParam(y.F.at_database,c.databaseName),yield v.navigationCS.setQueryParam(y.F.at_collection,c.collectionName),yield v.navigationCS.setQueryParam(y.F.at_api,c.instanceApiName);else if(c.apiCategory===s.O.THIRD_PARTY_APIS){const f=(yield v.tpInstalledApisS.query({find:{bundleName:c.tpInstalledApiBundleName,apiVersion:c.tpInstalledApiVersion,name:c.tpInstalledApiName,user:c.user,active:!0},limit:1}).toPromise())?.data?.[0];if(f){const I=(yield v.tpStoreApiVersionS.query({find:{apiBundleName:f.bundleName,storeApiVersion:f.apiVersion,user:f.user,active:!0},limit:1}).toPromise()).data?.[0];yield v.navigationCS.setQueryParam(y.F.at_bundleName,f.bundleName),yield v.navigationCS.setQueryParam(y.F.at_apiVersion,I.storeApiVersion),yield v.navigationCS.setQueryParam(y.F.at_api,f.name)}}v.generalCS.setValueInEditor(v,"editorWSNotifications",c.canUserConnectViaWSCode||"")})()}save(){var c=this;return(0,C.A)(function*(){try{c.loading.form=!0;const v=c.form.getRawValue();let f;v.user=c.authCS.getUserId(),v.apiCategory=c.wsFormSecondC.tab.apiCategory.id,f=c.data.formData&&c.data.formData._id?(yield c.webSocketEventsS.getById(c.data.formData._id).toPromise()).data:{};const I=S.find(f.versions||[],{isActive:!0});I&&(I.apiCodeStr=c.editorWSNotifications.getValue());const h=Object.assign({},f,v);h.user=c.authCS.getUserId(),h.canUserConnectViaWSCode=c.editorWSNotifications.getValue();for(const b of h?.versions||[])b.version=b.version.toString();if(h.apiCategory===s.O.WEB_SOCKET_EVENT&&!h.name)return c.ns.showError("Please provide websocket events name.");let _;h.apiCategory===s.O.CUSTOM_APIS&&(h.customApiName=c.wsFormSecondC.tab.api.customApiName),h.apiCategory===s.O.SYSTEM_APIS&&(h.systemApiName=c.wsFormSecondC.tab.api.systemApiId),h.apiCategory===s.O.THIRD_PARTY_APIS&&(h.tpInstalledApiBundleName=c.wsFormSecondC.tab.api.bundleName,h.tpInstalledApiVersion=c.wsFormSecondC.tab.api.apiVersion,h.tpInstalledApiName=c.wsFormSecondC.tab.api.name),h.apiCategory===s.O.INSTANCES&&(h.instanceName=c.wsFormSecondC.tab.instance.name,h.databaseName=c.wsFormSecondC.tab.database.db,h.collectionName=c.wsFormSecondC.tab.collection.name,h.instanceApiName=c.wsFormSecondC.tab.api.id),h.apiCategory!==s.O.WEB_SOCKET_EVENT&&delete h.name,c.data.mode===P.X.ADD?_=yield c.webSocketEventsS.post(h).toPromise():c.data.mode===P.X.EDIT&&(_=yield c.webSocketEventsS.put(c.data.formData._id,h,{select:k.GX._id}).toPromise()),_&&(c.ns.showSuccess(c.data.mode===P.X.ADD?c.constantsS.webSocketEvents.addSuccess:c.constantsS.webSocketEvents.editSuccess),c.data.eventChannel.emit({action:c.data.mode===P.X.ADD?D.K.SAVED:D.K.UPDATED})),c.loading.form=!1}catch(v){c.loading.form=!1,c.ns.showErrorFromResponse(v.error||v,"Unable to save websocket event.")}c.cd.detectChanges()})()}editorGenerated(c){var v=this;return(0,C.A)(function*(){v.editorWSNotifications=c,yield v.monacoS.loadSchemaEditorSettings(v.BE_HOST_PORT,v.authCS.getUserId(),null),v.monacoS.addSaveCodeKeyBinding(c,f=>{v.form.valid&&v.save()}),v.monacoS.addInsertCodeKeyBinding(c,f=>{v.generalCS.messageReceivedFor=n.r.All,v.data.mode!==P.X.VIEW&&v.insertCodeModalC.showModal(w.Z.WebSocketFormC)}),v.subscriptions.push(v.generalCS.messageReceived.subscribe(f=>{f.type&&f.type===V.R.TEXT_COPIED&&f.componentName===w.Z.WebSocketFormC&&(v.monacoS.insertAtCursor(c,f.selectedText),v.insertCodeModalC.hideModal())}))})()}ngOnDestroy(){this.generalCS.unsubscribe(this.subscriptions)}ISchedulerProps=k.VC;static \u0275fac=function(v){return new(v||d)(i.rXU(e.ok),i.rXU(X.f),i.rXU(K.g),i.rXU(Y.m),i.rXU(Q.X),i.rXU(J.l),i.rXU(N.e),i.rXU(H.h),i.rXU(U.J),i.rXU(Z.V),i.rXU(R.$),i.rXU(i.gRc))};static \u0275cmp=i.VBU({type:d,selectors:[["app-web-socket-events-man-form"]],viewQuery:function(v,f){if(1&v&&(i.GBs(se,5),i.GBs(oe,5)),2&v){let I;i.mGM(I=i.lsd())&&(f.wsFormSecondC=I.first),i.mGM(I=i.lsd())&&(f.insertCodeModalC=I.first)}},inputs:{data:"data"},decls:34,vars:16,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idWebSocketEventsForm","role","dialog","data-backdrop","static","data-keyboard","false",1,"modal"],["role","document",1,"modal-dialog","modal-xl"],[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",2,"font-size","1.4em",3,"click"],[1,"fas","fa-info-circle","text-info","fa-fw"],[1,"modal-body","overflow-auto"],[1,"w-100",3,"activeIndex","activeIndexChange"],["header","Basic Info"],[1,"container","pt-3",3,"formGroup"],["webSocketEventsFormSecondC",""],["class","form-group row m-0",4,"ngIf"],[1,"form-group","row"],[1,"col-12"],[1,"align-middle","mb-0","ml-3"],["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 Code On Native Process",3,"ngClass","binary"],["header","Code"],["class","overflow-hidden mb-3","style","height: calc(100vh - 270px);",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,"click",4,"ngIf"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",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"],[1,"form-group","row","m-0"],[1,"col-4"],[1,"small"],["formControlName","name","name","name","spellcheck","false","type","text","placeholder","level1/level2/name",1,"form-control","form-control-sm"],[1,"overflow-hidden","mb-3",2,"height","calc(100vh - 270px)"],[3,"isSchemaEditor","editorOptions","editorGenerated"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"click"],[1,"fas","fa-save","text-success","fa-fw","mr-1"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(v,f){if(1&v&&(i.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),i.DNE(4,ie,3,0,"span",4),i.DNE(5,re,3,0,"span",4),i.DNE(6,le,3,0,"span",4),i.j41(7,"div",5)(8,"button",6)(9,"span",7),i.nrm(10,"i",8),i.k0s()(),i.j41(11,"span",9),i.bIt("click",function(){return f.showInsertCodeModel()}),i.nrm(12,"i",10),i.k0s()()(),i.j41(13,"div",11)(14,"p-tabView",12),i.bIt("activeIndexChange",function(h){return f.reqActiveIndex=h}),i.j41(15,"p-tabPanel",13)(16,"form",14),i.nrm(17,"app-web-socket-events-form-second",null,15),i.DNE(19,x,5,0,"div",16),i.j41(20,"div",17)(21,"div",18)(22,"label",19),i.nrm(23,"p-checkbox",20),i.k0s()()()()(),i.j41(24,"p-tabPanel",21),i.DNE(25,j,2,2,"div",22),i.k0s()()(),i.j41(26,"div",23)(27,"button",24),i.nrm(28,"i",25),i.EFF(29," Close"),i.k0s(),i.DNE(30,o,4,2,"button",26),i.k0s(),i.DNE(31,t,1,0,"p-progressSpinner",27),i.k0s()()(),i.nrm(32,"app-insert-code-modal",28,29)),2&v){const I=i.sdS(18);i.R7$(4),i.Y8G("ngIf",f.data.mode===f.EFormMode.ADD),i.R7$(1),i.Y8G("ngIf",f.data.mode===f.EFormMode.VIEW),i.R7$(1),i.Y8G("ngIf",f.data.mode===f.EFormMode.EDIT),i.R7$(8),i.Y8G("activeIndex",f.reqActiveIndex),i.R7$(2),i.Y8G("formGroup",f.form),i.R7$(3),i.Y8G("ngIf",I.tab.apiCategory.id===f.EAPICategory.WEB_SOCKET_EVENT),i.R7$(4),i.Y8G("ngClass",i.eq3(14,p,!0===f.form.get(f.ISchedulerProps.runOnNativeProcess).value))("binary",!0),i.R7$(2),i.Y8G("ngIf",f.shouldLoadMonacoEditor),i.R7$(5),i.Y8G("ngIf",f.data.mode!==f.EFormMode.VIEW),i.R7$(1),i.Y8G("ngIf",f.loading.form),i.R7$(1),i.Y8G("frameId","idInsertCodeWebSocketFrame")("modalId","idInsertCodeWebSocketModal")("docsHostPort",f.DOCS_HOST_PORT)}},dependencies:[e.qT,e.me,e.BC,e.cb,e.j4,e.JD,W.YU,W.bT,z.U,q.V,ee.A,L.p,B.JQ,B.Kp,te.m,ne.Sc,ae.m],encapsulation:2})}return d})()},4344:(_e,G,l)=>{l.r(G),l.d(G,{WebSocketEventsM:()=>o});var C=l(7060),e=l(7431),D=l(2173),s=(l(4339),l(540)),S=l(2199);let T=(()=>{class t{constructor(){}ngOnInit(){}static \u0275fac=function(d){return new(d||t)};static \u0275cmp=s.VBU({type:t,selectors:[["app-web-socket-events-layout-grid"]],decls:2,vars:1,consts:[[1,"pt-1","pl-1","pr-1"],[3,"showCheckbox"]],template:function(d,u){1&d&&(s.j41(0,"div",0),s.nrm(1,"app-web-socket-events-grid",1),s.k0s()),2&d&&(s.R7$(1),s.Y8G("showCheckbox",!1))},dependencies:[S.o],encapsulation:2})}return t})();var n=l(467),y=l(8727),k=l(5046),F=l(5632),w=l(7326),V=l(6645),i=l(6589),X=l(6129),K=l(6708),Y=l(3851),Q=l(7237),J=l(1987),N=l(3966),H=l(334),U=l(123),Z=l(7337),R=l(5779),W=l(177),z=l(9861),q=l(7515),ee=l(8542),L=l(8061);const B=["webSocketEventsManFormC"];function te(t,p){if(1&t){const r=s.RV6();s.j41(0,"span",19),s.bIt("click",function(){s.eBV(r);const u=s.XpG();return s.Njj(u.edit())}),s.nrm(1,"i",20),s.k0s()}}function ne(t,p){if(1&t){const r=s.RV6();s.j41(0,"span",21),s.bIt("click",function(){s.eBV(r);const u=s.XpG();return s.Njj(u.removePermanentDialog())}),s.nrm(1,"i",22),s.k0s()}}function ae(t,p){if(1&t&&(s.j41(0,"div")(1,"div",23),s.EFF(2),s.k0s()()),2&t){const r=s.XpG();s.R7$(2),s.JRh(r.constantsS.group.allWebSocketEventsPermitted)}}function se(t,p){if(1&t&&(s.j41(0,"div"),s.EFF(1),s.k0s()),2&t){const r=s.XpG().$implicit;s.R7$(1),s.JRh(r.label)}}const oe=function(t,p,r,d){return{get:t,put:p,post:r,delete:d}};function ie(t,p){if(1&t&&(s.j41(0,"div")(1,"span",25),s.EFF(2),s.k0s(),s.j41(3,"span"),s.EFF(4),s.k0s()()),2&t){const r=s.XpG().$implicit,d=s.XpG();s.R7$(1),s.Y8G("ngClass",s.ziG(3,oe,r.data.requestMethod===d.ERequestMethod.GET,r.data.requestMethod===d.ERequestMethod.PUT,r.data.requestMethod===d.ERequestMethod.POST,r.data.requestMethod===d.ERequestMethod.DELETE)),s.R7$(1),s.JRh(r.data.requestMethod),s.R7$(2),s.JRh(r.data.name||r.label)}}function re(t,p){if(1&t){const r=s.RV6();s.j41(0,"div",24),s.bIt("click",function(){const c=s.eBV(r).$implicit,v=s.XpG();return c.children&&(c.isExpanded=!0),s.Njj(v.selectedRows=[c._id])}),s.DNE(1,se,2,1,"div",12),s.DNE(2,ie,5,8,"div",12),s.k0s()}if(2&t){const r=p.$implicit,d=s.XpG();s.R7$(1),s.Y8G("ngIf",(null==r.children?null:r.children.length)||(null==r||null==r.data?null:r.data.apiCategory)!==d.EAPICategory.CUSTOM_APIS),s.R7$(1),s.Y8G("ngIf",!(null!=r.children&&r.children.length)&&(null==r||null==r.data?null:r.data.apiCategory)===d.EAPICategory.CUSTOM_APIS)}}function le(t,p){1&t&&s.nrm(0,"p-progressSpinner",26)}let x=(()=>{class t{generalS;notificationS;webSocketEventsS;authCS;constantsS;eventCenterS;cd;eventCenterCS;functionS;navigationCS;confirmationService;router;isReadOnly=!1;loading={grid:!1};subscriptions=[];data={mode:k.X.ADD,eventChannel:new s.bkB,formData:void 0};rows=[];rowsMap={};rowsMapName={};showAll=!1;selectedRows=[];gridKey=V.GX._id;EAPICategory=F.O;ERequestMethod=i.mO;treeNodes=[];allTreeItemsMap={};leafSelected=!1;webSocketEventsManFormC;constructor(r,d,u,c,v,f,I,h,_,b,a,m){this.generalS=r,this.notificationS=d,this.webSocketEventsS=u,this.authCS=c,this.constantsS=v,this.eventCenterS=f,this.cd=I,this.eventCenterCS=h,this.functionS=_,this.navigationCS=b,this.confirmationService=a,this.router=m}ngOnInit(){this.loadTreeData().then(),this.subscriptions.push(this.data.eventChannel.subscribe(r=>{(r.action===y.K.SAVED||r.action===y.K.UPDATED)&&(this.webSocketEventsManFormC.hideModal(),this.loadTreeData().then())})),this.generalS.setNewTitle("API Maker - WebSocket Events")}add(){this.data.formData=void 0,this.data.mode=k.X.ADD,this.data.eventChannel.emit({action:y.K.OPEN_FORM_IN_ADD_MODE}),this.webSocketEventsManFormC.showModal().then()}edit(){this.selectedRows.length&&(this.data.formData=this.selectedRows[0].data,this.data.mode=k.X.EDIT,this.data.eventChannel.emit({action:y.K.OPEN_FORM_IN_EDIT_MODE}),this.webSocketEventsManFormC.showModal().then())}removePermanentDialog(){var r=this;return(0,n.A)(function*(){var d;r.confirmationService.confirm({message:r.constantsS.webSocketEvents.removePermanentConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(d=(0,n.A)(function*(){yield r.removePermanent()}),function(){return d.apply(this,arguments)})})})()}removePermanent(){var r=this;return(0,n.A)(function*(){r.loading.grid=!0;const d=r.selectedRows[0].data,u=yield r.webSocketEventsS.permanentDelete(d._id).toPromise();r.loading.grid=!1,u.success?(r.notificationS.showSuccess(r.constantsS.webSocketEvents.removePermanent),r.resetGridAndUrl(),r.loadTreeData().then(),r.selectedRows=[]):r.notificationS.showErrorFromResponse(u,r.constantsS.webSocketEvents.removePermanentError)})()}resetGridAndUrl(){this.rows=[],this.selectedRows=[],this.rowsMap={},this.rowsMapName={},this.eventCenterS.webSocketEvents.selectedWebSocketEvents.next([])}navigateToGrid(){var r=this;return(0,n.A)(function*(){r.router.navigate(["api-info","web-socket-events","layout-grid"]).then()})()}loadTreeData(){var r=this;return(0,n.A)(function*(){const d=(yield r.functionS.getWSEventKTree().toPromise()).data;for(const c of d)r.generalS.convertKTreeItemToPrimeNGTreeItem(c);const u={};r.generalS.getMapOfAllItems(u,d),r.generalS.setIsExpandedStateFromOldMap(r.allTreeItemsMap,u),r.treeNodes=d,r.allTreeItemsMap=u,r.loading.grid=!1,r.cd.detectChanges()})()}resetThisUrl(){var r=this;return(0,n.A)(function*(){r.eventCenterS.webSocketEvents.selectedWebSocketEvents.next([]),yield r.navigationCS.setQueryParam(w.F.am_ws_event,null)})()}selectedKeysChange(){var r=this;return(0,n.A)(function*(){if(r.selectedRows.length){const d=r.selectedRows[0];d.children?.length?r.leafSelected=!1:(r.leafSelected=!0,d&&d?.label?r.generalS.setNewTitle(d.label,F.O.WEB_SOCKET_EVENT):r.generalS.setNewTitle("API Maker - WebSocket Events"),yield r.resetThisUrl())}else r.leafSelected=!1})()}dblClickTreeEvent(){this.leafSelected&&this.selectedRows.length&&this.edit()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(d){return new(d||t)(s.rXU(X.f),s.rXU(K.m),s.rXU(Y.g),s.rXU(Q.l),s.rXU(J.X),s.rXU(N.d),s.rXU(s.gRc),s.rXU(H.u),s.rXU(U.a),s.rXU(Z.$),s.rXU(R.td),s.rXU(C.Ix))};static \u0275cmp=s.VBU({type:t,selectors:[["app-web-socket-events-tree"]],viewQuery:function(d,u){if(1&d&&s.GBs(B,5),2&d){let c;s.mGM(c=s.lsd())&&(u.webSocketEventsManFormC=c.first)}},inputs:{isReadOnly:["IsReadOnly","isReadOnly"]},decls:22,vars:7,consts:[[1,"card","shadow-sm","h-100"],[1,"card-header"],["src","/assets/images/icons/web.svg","alt","WebSocket Events",1,"fa-fw","mr-1"],["href","https://docs.apimaker.dev/v1/docs/pages/web-socket-event-page.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"float-right","fa-fw","ml-3","mr-1",2,"font-size","25px"],["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"],["class","float-right cursor-pointer ml-3","pTooltip","Edit",3,"click",4,"ngIf"],["class","float-right cursor-pointer ml-3","pTooltip","Permanent Delete",3,"click",4,"ngIf"],[1,"card-body","p-0","h-100","overflow-hidden"],[4,"ngIf"],[1,"h-100"],["scrollHeight","flex","selectionMode","multiple",1,"w-full",3,"value","selection","selectionChange","dblclick"],["pTemplate","default"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[3,"data"],["webSocketEventsManFormC",""],["pTooltip","Edit",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"fas","fa-pencil-alt","text-light","fa-fw"],["pTooltip","Permanent Delete",1,"float-right","cursor-pointer","ml-3",3,"click"],[1,"far","fa-trash-alt","fa-fw","text-danger"],[1,"p-2","text-center","text-success"],[1,"w-100","prevent-text-selection","cursor-pointer",3,"click"],[1,"small","font-weight-bold","d-inline-block","mr-2",3,"ngClass"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(d,u){1&d&&(s.j41(0,"div",0)(1,"div",1)(2,"span"),s.nrm(3,"img",2),s.EFF(4," WebSocket Events"),s.k0s(),s.j41(5,"span")(6,"a",3),s.nrm(7,"img",4),s.k0s(),s.j41(8,"span",5),s.bIt("click",function(){return u.add()}),s.nrm(9,"i",6),s.k0s(),s.j41(10,"span",7),s.bIt("click",function(){return u.navigateToGrid()}),s.nrm(11,"i",8),s.k0s(),s.DNE(12,te,2,0,"span",9),s.DNE(13,ne,2,0,"span",10),s.k0s()(),s.j41(14,"div",11),s.DNE(15,ae,3,1,"div",12),s.j41(16,"div",13)(17,"p-tree",14),s.bIt("selectionChange",function(v){return u.selectedRows=v})("dblclick",function(){return u.dblClickTreeEvent()})("selectionChange",function(){return u.selectedKeysChange()}),s.DNE(18,re,3,2,"ng-template",15),s.k0s(),s.DNE(19,le,1,0,"p-progressSpinner",16),s.k0s()()(),s.nrm(20,"app-web-socket-events-man-form",17,18)),2&d&&(s.R7$(12),s.Y8G("ngIf",u.leafSelected),s.R7$(1),s.Y8G("ngIf",u.leafSelected),s.R7$(2),s.Y8G("ngIf",u.eventCenterS.group.apisRegex.allWebSocketEvents||u.eventCenterS.filterInLog.apisRegex.allWebSocketEvents),s.R7$(2),s.Y8G("value",u.treeNodes)("selection",u.selectedRows),s.R7$(2),s.Y8G("ngIf",u.loading.grid),s.R7$(1),s.Y8G("data",u.data))},dependencies:[W.YU,W.bT,R.Ei,z.PH,q.p,ee.m,L.Y],styles:[".custom-tab-title[_ngcontent-%COMP%]{padding:.5rem}.min-width[_ngcontent-%COMP%], .none[_ngcontent-%COMP%], .delete[_ngcontent-%COMP%], .post[_ngcontent-%COMP%], .put[_ngcontent-%COMP%], .get[_ngcontent-%COMP%]{width:45px;display:inline-block}.get[_ngcontent-%COMP%]{color:var(--accent-success)}.put[_ngcontent-%COMP%]{color:var(--brand-secondary)}.post[_ngcontent-%COMP%]{color:var(--accent-warning)}.delete[_ngcontent-%COMP%]{color:var(--accent-error)}.none[_ngcontent-%COMP%]{color:var(--accent-success--shade--three)}.width-160[_ngcontent-%COMP%]{width:160px}"]})}return t})();const E=[{path:"",redirectTo:"layout-tree",pathMatch:"full"},{path:"layout-tree",component:(()=>{class t{constructor(){}ngOnInit(){}static \u0275fac=function(d){return new(d||t)};static \u0275cmp=s.VBU({type:t,selectors:[["app-web-socket-events-layout-tree"]],decls:2,vars:0,consts:[[1,"pt-1","pl-1","pr-1"]],template:function(d,u){1&d&&(s.j41(0,"div",0),s.nrm(1,"app-web-socket-events-tree"),s.k0s())},dependencies:[x],encapsulation:2})}return t})(),canActivate:[D.Z]},{path:"layout-grid",component:T,canActivate:[D.Z]}];let o=(()=>{class t{static \u0275fac=function(d){return new(d||t)};static \u0275mod=s.$C({type:t});static \u0275inj=s.G2t({imports:[C.iI.forChild(E),e.u]})}return t})()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[5729],{5729:(Pt,T,d)=>{d.r(T),d.d(T,{LogTableM:()=>Tt});var B=d(7060),Y=d(7431),X=d(2173),V=d(4344),u=d(467),e=d(540),r=d(7376),F=d(6589),P=d(8727),D=d(5046),p=d(6645),c=d(5632),N=d(4611),q=d(7237),j=d(6129),U=d(6268),H=d(123),L=d(3966),K=d(7668),Q=d(2712),J=d(3851),W=d(5938),S=d(5779),b=d(1987),G=d(4341),h=d(177),R=d(7645),k=d(7515),x=d(8542),z=d(9851),Z=d(4827),M=d(6708),ee=d(3478),te=d(572),ie=d(4218),se=d(6204),ae=d(6976),ne=d(3199),le=d(4525),oe=d(2290),re=d(3183),de=d(3173),pe=d(4565),ce=d(9041),ue=d(2199);function me(a,o){1&a&&(e.j41(0,"div",38),e.nrm(1,"app-w-instances",39),e.k0s()),2&a&&(e.R7$(1),e.Y8G("metaKeySelection",!1)("IsReadOnly",!0)("IsFilterLogTable",!0))}function ge(a,o){1&a&&(e.j41(0,"div",40),e.nrm(1,"app-w-databases",39),e.k0s()),2&a&&(e.R7$(1),e.Y8G("metaKeySelection",!1)("IsReadOnly",!0)("IsFilterLogTable",!0))}function he(a,o){1&a&&e.nrm(0,"p-progressSpinner",41)}const ve=function(){return[50,50]};let _e=(()=>{class a{eventCenterS;notificationS;constantsS;data;EAPICategory=c.O;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:P.K.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.rXU(L.d),e.rXU(M.m),e.rXU(b.X))};static \u0275cmp=e.VBU({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.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span"),e.nrm(5,"i",4),e.EFF(6,"Filter "),e.k0s(),e.j41(7,"button",5)(8,"span",6),e.nrm(9,"i",7),e.k0s()()(),e.j41(10,"div",8)(11,"div",9)(12,"div",10)(13,"div",11),e.nrm(14,"app-w-api-categories",12),e.k0s()(),e.j41(15,"div",13)(16,"p-splitter",14),e.DNE(17,me,2,3,"ng-template",15),e.DNE(18,ge,2,3,"ng-template",15),e.k0s()(),e.j41(19,"div",16)(20,"div",11),e.nrm(21,"app-w-collections",17),e.k0s()(),e.j41(22,"div",18)(23,"div",19),e.nrm(24,"app-w-supported-api",20),e.k0s()(),e.j41(25,"div",21)(26,"div",22),e.nrm(27,"app-w-supported-tp-api",23),e.k0s()(),e.j41(28,"div",24)(29,"div",11),e.nrm(30,"app-custom-api-grid",25),e.k0s()(),e.j41(31,"div",26)(32,"div",11),e.nrm(33,"app-system-api-w",25),e.k0s()(),e.j41(34,"div",27)(35,"div",11),e.nrm(36,"app-events-grid",25),e.k0s()(),e.j41(37,"div",28)(38,"div",11),e.nrm(39,"app-scheduler-man-w",29),e.k0s()(),e.j41(40,"div",30)(41,"div",11),e.nrm(42,"app-web-socket-events-grid",31),e.k0s()()()(),e.j41(43,"div",32)(44,"button",33),e.nrm(45,"i",34),e.EFF(46," Cancel"),e.k0s(),e.j41(47,"button",35),e.bIt("click",function(){return s.applyFilter()}),e.nrm(48,"i",36),e.j41(49,"span"),e.EFF(50,"Apply Filter"),e.k0s()()(),e.DNE(51,he,1,0,"p-progressSpinner",37),e.k0s()()()),2&i&&(e.R7$(14),e.Y8G("isFilterLogTable",!0)("typeIsGroup","LOG_PROFILE"),e.R7$(1),e.xc7("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.R7$(1),e.Y8G("panelSizes",e.lJ4(53,ve)),e.R7$(3),e.xc7("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.R7$(2),e.Y8G("metaKeySelection",!1)("IsReadOnly",!0)("IsFilterLogTable",!0),e.R7$(1),e.xc7("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.R7$(2),e.Y8G("isLPM",!1)("isFilterLogTable",!0)("treeViewId","treeViewFromLogFilterPanel"),e.R7$(1),e.xc7("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.R7$(2),e.Y8G("isFilterLogTable",!0)("isLPM",!1)("IsDependentOnGroup",!1),e.R7$(1),e.xc7("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.R7$(2),e.Y8G("metaKeySelection",!1)("IsReadOnly",!0)("isFilterLogTable",!0)("isLPM",!1),e.R7$(1),e.xc7("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.R7$(2),e.Y8G("metaKeySelection",!1)("IsReadOnly",!0)("isFilterLogTable",!0)("isLPM",!1),e.R7$(1),e.xc7("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.R7$(2),e.Y8G("metaKeySelection",!1)("IsReadOnly",!0)("isFilterLogTable",!0)("isLPM",!1),e.R7$(1),e.xc7("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.R7$(2),e.Y8G("metaKeySelection",!1)("IsReadOnly",!0)("IsMultiSelect",!0)("isFilterLogTable",!0)("isLPM",!1),e.R7$(1),e.xc7("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.R7$(2),e.Y8G("metaKeySelection",!1)("showCheckbox",!0)("IsReadOnly",!0)("isFilterLogTable",!0)("isLPM",!1),e.R7$(9),e.Y8G("ngIf",s.loading.form))},dependencies:[h.bT,ee.U,S.Ei,k.p,te.O,ie._,se.o,ae.l,ne.c,le.i,oe.d,re.u,de.e,pe.g,ce.N,ue.o],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 _=d(9773),fe=d(3864),ye=d(6914);function Ce(a,o){1&a&&(e.j41(0,"tr")(1,"th"),e.EFF(2,"Keys"),e.k0s(),e.j41(3,"th"),e.EFF(4,"Value"),e.k0s()())}function Ie(a,o){if(1&a&&(e.j41(0,"tr",43)(1,"td",44)(2,"span"),e.EFF(3),e.k0s()(),e.j41(4,"td")(5,"span"),e.EFF(6),e.k0s()()()),2&a){const t=o.$implicit;e.Y8G("pSelectableRow",t),e.R7$(3),e.JRh(t.toString().split(",")[0]),e.R7$(3),e.JRh(t.toString().split(",")[1]||"")}}function Fe(a,o){1&a&&(e.j41(0,"tr")(1,"th"),e.EFF(2,"Keys"),e.k0s(),e.j41(3,"th"),e.EFF(4,"Value"),e.k0s()())}function Se(a,o){if(1&a&&(e.j41(0,"tr",43)(1,"td",44)(2,"span"),e.EFF(3),e.k0s()(),e.j41(4,"td")(5,"span"),e.EFF(6),e.k0s()()()),2&a){const t=o.$implicit;e.Y8G("pSelectableRow",t),e.R7$(3),e.JRh(t.toString().split(",")[0]),e.R7$(3),e.JRh(t.toString().split(",")[1]||"")}}const Re=function(a,o,t,i){return{get:a,put:o,post:t,delete:i}},w=function(){return{color:"#26b47f"}},O=function(){return{color:"#ed4b48"}};let Ae=(()=>{class a{ec;notificationS;generalCS;logS;cd;monacoS;constantsS;EAPICategory=c.O;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=F.mO;constructor(t,i,s,n,l,m,v){this.ec=t,this.notificationS=i,this.generalCS=s,this.logS=n,this.cd=l,this.monacoS=m,this.constantsS=v}ngOnInit(){}hideModal(){$("#idLogDetailsLayoutModal").modal("hide")}showModal(t){var i=this;return(0,u.A)(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.A)(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 m of i.getKeys(l))s[m]=l[m];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[F.v$.CONTENT_TYPE];yield i.setResponseBodyLanguage(l)}else i.resHeaders=[];let n=i.selectedRowData.resPayload;(!i.selectedRowData.resHeaders||i.selectedRowData.resHeaders&&i.selectedRowData.resHeaders[F.v$.CONTENT_TYPE].indexOf(_.R6.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.A)(function*(){t.indexOf(_.R6.JSON)>=0?(i.editorOptionResBody.language="json",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(_.R6.HTML)>=0?(i.editorOptionResBody.language="html",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(_.R6.XML)>=0?(i.editorOptionResBody.language="xml",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(_.R6.YAML)>=0?(i.editorOptionResBody.language="yaml",i.monacoS.setLanguage(i.editorResBody,i.editorOptionResBody.language)):t.indexOf(_.R6.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.rXU(L.d),e.rXU(M.m),e.rXU(j.f),e.rXU(N.u),e.rXU(e.gRc),e.rXU(fe.e),e.rXU(b.X))};static \u0275cmp=e.VBU({type:a,selectors:[["app-log-details-layout-model"]],decls:141,vars:50,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"],[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.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span",4),e.nrm(5,"i",5),e.EFF(6,"Detail view "),e.k0s(),e.j41(7,"div",6)(8,"button",7)(9,"span",8),e.nrm(10,"i",9),e.k0s()(),e.j41(11,"span",10)(12,"i",11),e.bIt("click",function(){return s.expandAll()}),e.k0s()(),e.j41(13,"span",12)(14,"i",13),e.bIt("click",function(){return s.collapseAll()}),e.k0s()()()(),e.j41(15,"div",14)(16,"div",15)(17,"table",16)(18,"colgroup"),e.nrm(19,"col",17)(20,"col",18)(21,"col"),e.k0s(),e.j41(22,"tr")(23,"td"),e.EFF(24,"URL"),e.k0s(),e.j41(25,"td"),e.EFF(26," :"),e.k0s(),e.j41(27,"td",19),e.EFF(28),e.k0s()(),e.j41(29,"tr")(30,"td"),e.EFF(31,"Method"),e.k0s(),e.j41(32,"td"),e.EFF(33," :"),e.k0s(),e.j41(34,"td",19)(35,"span",20),e.EFF(36),e.k0s()()(),e.j41(37,"tr")(38,"td"),e.EFF(39,"Type"),e.k0s(),e.j41(40,"td"),e.EFF(41," :"),e.k0s(),e.j41(42,"td",19),e.EFF(43),e.k0s()(),e.j41(44,"tr")(45,"td"),e.EFF(46,"Name"),e.k0s(),e.j41(47,"td"),e.EFF(48," :"),e.k0s(),e.j41(49,"td",19),e.EFF(50),e.k0s()(),e.j41(51,"tr")(52,"td"),e.EFF(53,"Time"),e.k0s(),e.j41(54,"td"),e.EFF(55," :"),e.k0s(),e.j41(56,"td",19),e.EFF(57),e.k0s()(),e.j41(58,"tr")(59,"td"),e.EFF(60,"Status"),e.k0s(),e.j41(61,"td"),e.EFF(62," :"),e.k0s(),e.j41(63,"td",19)(64,"span",21),e.EFF(65),e.k0s()()(),e.j41(66,"tr")(67,"td"),e.EFF(68,"Status Code"),e.k0s(),e.j41(69,"td"),e.EFF(70," :"),e.k0s(),e.j41(71,"td",19)(72,"span",21),e.EFF(73),e.k0s()()()()(),e.j41(74,"div",22),e.bIt("click",function(){return s.requestHeaderClick()}),e.j41(75,"span",23),e.EFF(76,"Request Header "),e.k0s(),e.j41(77,"div",24),e.nrm(78,"i",25),e.k0s(),e.j41(79,"div",24),e.nrm(80,"i",26),e.k0s()(),e.j41(81,"div",27)(82,"p-table",28),e.DNE(83,Ce,5,0,"ng-template",29),e.DNE(84,Ie,7,3,"ng-template",30),e.k0s()(),e.j41(85,"div",31),e.bIt("click",function(){return s.requestQueryParamsClick()}),e.j41(86,"span",23),e.EFF(87,"Request Query params "),e.k0s(),e.j41(88,"div",24),e.nrm(89,"i",25),e.k0s(),e.j41(90,"div",24),e.nrm(91,"i",26),e.k0s()(),e.j41(92,"div",27)(93,"div",32)(94,"app-monaco-editor",33),e.bIt("editorGenerated",function(l){return s.editorReqQueryParams=l}),e.k0s()()(),e.j41(95,"div",34),e.bIt("click",function(){return s.requestBodyClick()}),e.j41(96,"span",23),e.EFF(97,"Request Body "),e.k0s(),e.j41(98,"div",24),e.nrm(99,"i",25),e.k0s(),e.j41(100,"div",24),e.nrm(101,"i",26),e.k0s()(),e.j41(102,"div",27)(103,"div",32)(104,"app-monaco-editor",33),e.bIt("editorGenerated",function(l){return s.editorReqBody=l}),e.k0s()()(),e.j41(105,"div",35),e.bIt("click",function(){return s.responseHeaderClick()}),e.j41(106,"span",23),e.EFF(107,"Response Header "),e.k0s(),e.j41(108,"div",24),e.nrm(109,"i",25),e.k0s(),e.j41(110,"div",24),e.nrm(111,"i",26),e.k0s()(),e.j41(112,"div",27)(113,"p-table",28),e.DNE(114,Fe,5,0,"ng-template",29),e.DNE(115,Se,7,3,"ng-template",30),e.k0s()(),e.j41(116,"div",36),e.bIt("click",function(){return s.responseBodyClick()}),e.j41(117,"span",23),e.EFF(118,"Response Body "),e.k0s(),e.j41(119,"div",24),e.nrm(120,"i",25),e.k0s(),e.j41(121,"div",24),e.nrm(122,"i",26),e.k0s()(),e.j41(123,"div",27)(124,"div",32)(125,"app-monaco-editor",33),e.bIt("editorGenerated",function(l){return s.editorResBody=l}),e.k0s()()(),e.j41(126,"div",37),e.bIt("click",function(){return s.logsBodyClick()}),e.j41(127,"span",38),e.EFF(128,"Logs "),e.k0s(),e.j41(129,"div",24),e.nrm(130,"i",25),e.k0s(),e.j41(131,"div",24),e.nrm(132,"i",26),e.k0s()(),e.j41(133,"div",27)(134,"div",32)(135,"app-monaco-editor",33),e.bIt("editorGenerated",function(l){return s.editorLogs=l}),e.k0s()()()(),e.j41(136,"div",39)(137,"button",40),e.nrm(138,"i",41),e.EFF(139," Cancel"),e.k0s()(),e.nrm(140,"p-progressSpinner",42),e.k0s()()()),2&i&&(e.R7$(28),e.JRh(null==s.inputData?null:s.inputData.url),e.R7$(7),e.Y8G("ngClass",e.ziG(41,Re,(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.R7$(1),e.SpI(" ",null==s.inputData||null==s.inputData.requestMethod?null:s.inputData.requestMethod.toUpperCase()," "),e.R7$(7),e.JRh(null==s.inputData?null:s.inputData.category),e.R7$(7),e.JRh(null==s.inputData?null:s.inputData.logNameForUI),e.R7$(7),e.JRh(null==s.inputData?null:s.inputData.createdAt),e.R7$(7),e.Y8G("ngStyle",null!=s.inputData&&s.inputData.success?e.lJ4(46,w):e.lJ4(47,O)),e.R7$(1),e.JRh(null!=s.inputData&&s.inputData.success?"Success":"Fail"),e.R7$(7),e.Y8G("ngStyle",null!=s.inputData&&s.inputData.success?e.lJ4(48,w):e.lJ4(49,O)),e.R7$(1),e.JRh(null==s.inputData?null:s.inputData.statusCode),e.R7$(4),e.Y8G("hidden",s.reqHeaderCollapse),e.R7$(2),e.Y8G("hidden",!s.reqHeaderCollapse),e.R7$(2),e.Y8G("hidden",!s.reqHeaderCollapse),e.R7$(1),e.Y8G("selectionMode","multiple")("metaKeySelection",!0)("scrollable",!0)("value",s.reqHeaders),e.R7$(6),e.Y8G("hidden",s.reqQueryParamsCollapse),e.R7$(2),e.Y8G("hidden",!s.reqQueryParamsCollapse),e.R7$(2),e.Y8G("hidden",!s.reqQueryParamsCollapse),e.R7$(2),e.Y8G("editorOptions",s.editorOptionReqQueryParams),e.R7$(4),e.Y8G("hidden",s.reqBodyCollapse),e.R7$(2),e.Y8G("hidden",!s.reqBodyCollapse),e.R7$(2),e.Y8G("hidden",!s.reqBodyCollapse),e.R7$(2),e.Y8G("editorOptions",s.editorOptionReqBody),e.R7$(4),e.Y8G("hidden",s.resHeaderCollapse),e.R7$(2),e.Y8G("hidden",!s.resHeaderCollapse),e.R7$(2),e.Y8G("hidden",!s.resHeaderCollapse),e.R7$(1),e.Y8G("selectionMode","multiple")("metaKeySelection",!0)("scrollable",!0)("value",s.resHeaders),e.R7$(6),e.Y8G("hidden",s.resBodyCollapse),e.R7$(2),e.Y8G("hidden",!s.resBodyCollapse),e.R7$(2),e.Y8G("hidden",!s.resBodyCollapse),e.R7$(2),e.Y8G("editorOptions",s.editorOptionResBody),e.R7$(4),e.Y8G("hidden",s.logsBodyCollapse),e.R7$(2),e.Y8G("hidden",!s.logsBodyCollapse),e.R7$(2),e.Y8G("hidden",!s.logsBodyCollapse),e.R7$(2),e.Y8G("editorOptions",s.editorOptionLogs),e.R7$(5),e.Y8G("hidden",!s.loading.form))},dependencies:[h.YU,h.B3,ye.A,R.XI,S.Ei,R.d5,k.p,x.m],encapsulation:2})}return a})();const Ee=["logFilterPanelLayoutModelC"],Le=["logDetailsLayoutModelC"];function be(a,o){if(1&a&&(e.j41(0,"div",7)(1,"span",8)(2,"h4",9),e.EFF(3),e.k0s()()()),2&a){const t=e.XpG(2);e.R7$(3),e.JRh(t.constantsS.logTable.setupExternalLogs)}}function ke(a,o){1&a&&(e.j41(0,"div",48),e.EFF(1,"ALL INSTANCES"),e.k0s())}function Te(a,o){if(1&a){const t=e.RV6();e.j41(0,"p-chip",50)(1,"div"),e.EFF(2),e.j41(3,"i",51),e.bIt("click",function(){const n=e.eBV(t).$implicit,l=e.XpG(4);return e.Njj(l.instanceClickData([n]))}),e.k0s()()()}if(2&a){const t=o.$implicit;e.R7$(2),e.SpI("",null==t?null:t.name," ")}}function Pe(a,o){if(1&a&&(e.j41(0,"div"),e.DNE(1,Te,4,1,"p-chip",49),e.k0s()),2&a){const t=e.XpG(3);e.R7$(1),e.Y8G("ngForOf",t.instances)}}function De(a,o){1&a&&(e.j41(0,"div",48),e.EFF(1,"ALL DATABASES"),e.k0s())}function Ne(a,o){if(1&a){const t=e.RV6();e.j41(0,"p-chip",53)(1,"div"),e.EFF(2),e.j41(3,"i",51),e.bIt("click",function(){const n=e.eBV(t).$implicit,l=e.XpG(4);return e.Njj(l.removeDbClick([n]))}),e.k0s()()()}if(2&a){const t=o.$implicit;e.R7$(2),e.SpI("",null==t?null:t.db," ")}}function je(a,o){if(1&a&&(e.j41(0,"div"),e.DNE(1,Ne,4,1,"p-chip",52),e.k0s()),2&a){const t=e.XpG(3);e.R7$(1),e.Y8G("ngForOf",t.databases)}}function Ge(a,o){1&a&&(e.j41(0,"div",48),e.EFF(1,"ALL COLLECTIONS"),e.k0s())}function xe(a,o){if(1&a){const t=e.RV6();e.j41(0,"p-chip",55)(1,"div"),e.EFF(2),e.j41(3,"i",51),e.bIt("click",function(){const n=e.eBV(t).$implicit,l=e.XpG(4);return e.Njj(l.removeCollectionClick([n]))}),e.k0s()()()}if(2&a){const t=o.$implicit;e.R7$(2),e.SpI("",null==t?null:t.name," ")}}function $e(a,o){if(1&a&&(e.j41(0,"div"),e.DNE(1,xe,4,1,"p-chip",54),e.k0s()),2&a){const t=e.XpG(3);e.R7$(1),e.Y8G("ngForOf",t.collections)}}function Me(a,o){1&a&&(e.j41(0,"div",48),e.EFF(1,"ALL APIS"),e.k0s())}function we(a,o){if(1&a){const t=e.RV6();e.j41(0,"p-chip",57)(1,"div"),e.EFF(2),e.j41(3,"i",51),e.bIt("click",function(){const n=e.eBV(t).$implicit,l=e.XpG(4);return e.Njj(l.removeApiClick([n]))}),e.k0s()()()}if(2&a){const t=o.$implicit;e.R7$(2),e.SpI("",null==t?null:t.name," ")}}function Oe(a,o){if(1&a&&(e.j41(0,"div"),e.DNE(1,we,4,1,"p-chip",56),e.k0s()),2&a){const t=e.XpG(3);e.R7$(1),e.Y8G("ngForOf",t.supportedAPIs)}}function Be(a,o){1&a&&(e.j41(0,"td",29)(1,"div",48),e.EFF(2,"ALL THIRD PARTY APIS"),e.k0s()())}function Ye(a,o){if(1&a){const t=e.RV6();e.j41(0,"p-chip",53)(1,"div"),e.EFF(2),e.j41(3,"i",51),e.bIt("click",function(){const n=e.eBV(t).$implicit,l=e.XpG(4);return e.Njj(l.npmPackageClickData(n,"L_1"))}),e.k0s()()()}if(2&a){const t=o.$implicit;e.R7$(2),e.SpI("",null==t?null:t.name," ")}}function Xe(a,o){if(1&a&&(e.j41(0,"td",23),e.DNE(1,Ye,4,1,"p-chip",52),e.k0s()),2&a){const t=e.XpG(3);e.R7$(1),e.Y8G("ngForOf",t.tpBundles)}}function Ve(a,o){if(1&a){const t=e.RV6();e.j41(0,"p-chip",55)(1,"div"),e.EFF(2),e.j41(3,"i",51),e.bIt("click",function(){const n=e.eBV(t).$implicit,l=e.XpG(4);return e.Njj(l.npmPackageClickData(n,"L_2"))}),e.k0s()()()}if(2&a){const t=o.$implicit;e.R7$(2),e.SpI("",null==t?null:t.nameId," ")}}function qe(a,o){if(1&a&&(e.j41(0,"td",23),e.DNE(1,Ve,4,1,"p-chip",54),e.k0s()),2&a){const t=e.XpG(3);e.R7$(1),e.Y8G("ngForOf",t.tpApiVersions)}}function Ue(a,o){if(1&a){const t=e.RV6();e.j41(0,"p-chip",57)(1,"div"),e.EFF(2),e.j41(3,"i",51),e.bIt("click",function(){const n=e.eBV(t).$implicit,l=e.XpG(4);return e.Njj(l.npmPackageClickData(n,"L_3"))}),e.k0s()()()}if(2&a){const t=o.$implicit;e.R7$(2),e.SpI("",null==t?null:t.nameId," ")}}function He(a,o){if(1&a&&(e.j41(0,"td",58),e.DNE(1,Ue,4,1,"p-chip",56),e.k0s()),2&a){const t=e.XpG(3);e.R7$(1),e.Y8G("ngForOf",t.tpApis)}}function Ke(a,o){1&a&&(e.j41(0,"div",48),e.EFF(1,"ALL CUSTOM APIS"),e.k0s())}function Qe(a,o){if(1&a){const t=e.RV6();e.j41(0,"p-chip",57)(1,"div"),e.EFF(2),e.j41(3,"i",51),e.bIt("click",function(){const n=e.eBV(t).$implicit,l=e.XpG(4);return e.Njj(l.customApisClick([n]))}),e.k0s()()()}if(2&a){const t=o.$implicit;e.R7$(2),e.SpI("",null==t?null:t.name," ")}}function Je(a,o){if(1&a&&(e.j41(0,"div"),e.DNE(1,Qe,4,1,"p-chip",56),e.k0s()),2&a){const t=e.XpG(3);e.R7$(1),e.Y8G("ngForOf",t.customApis)}}function We(a,o){1&a&&(e.j41(0,"div",48),e.EFF(1,"ALL SYSTEM APIS"),e.k0s())}function ze(a,o){if(1&a){const t=e.RV6();e.j41(0,"p-chip",57)(1,"div"),e.EFF(2),e.j41(3,"i",51),e.bIt("click",function(){const n=e.eBV(t).$implicit,l=e.XpG(4);return e.Njj(l.systemsApisClick([n]))}),e.k0s()()()}if(2&a){const t=o.$implicit;e.R7$(2),e.SpI("",null==t?null:t.name," ")}}function Ze(a,o){if(1&a&&(e.j41(0,"div"),e.DNE(1,ze,4,1,"p-chip",56),e.k0s()),2&a){const t=e.XpG(3);e.R7$(1),e.Y8G("ngForOf",t.systemsApis)}}function et(a,o){1&a&&(e.j41(0,"div",48),e.EFF(1,"ALL EVENTS"),e.k0s())}function tt(a,o){if(1&a){const t=e.RV6();e.j41(0,"p-chip",57)(1,"div"),e.EFF(2),e.j41(3,"i",51),e.bIt("click",function(){const n=e.eBV(t).$implicit,l=e.XpG(4);return e.Njj(l.amEventsClick([n]))}),e.k0s()()()}if(2&a){const t=o.$implicit;e.R7$(2),e.SpI("",null==t?null:t.name," ")}}function it(a,o){if(1&a&&(e.j41(0,"div"),e.DNE(1,tt,4,1,"p-chip",56),e.k0s()),2&a){const t=e.XpG(3);e.R7$(1),e.Y8G("ngForOf",t.amEvents)}}function st(a,o){1&a&&(e.j41(0,"div",48),e.EFF(1,"ALL SCHEDULERS"),e.k0s())}function at(a,o){if(1&a){const t=e.RV6();e.j41(0,"p-chip",57)(1,"div"),e.EFF(2),e.j41(3,"i",51),e.bIt("click",function(){const n=e.eBV(t).$implicit,l=e.XpG(4);return e.Njj(l.schedulersClick([n]))}),e.k0s()()()}if(2&a){const t=o.$implicit;e.R7$(2),e.SpI("",null==t?null:t.name," ")}}function nt(a,o){if(1&a&&(e.j41(0,"div"),e.DNE(1,at,4,1,"p-chip",56),e.k0s()),2&a){const t=e.XpG(3);e.R7$(1),e.Y8G("ngForOf",t.schedulersApis)}}function lt(a,o){1&a&&(e.j41(0,"div",48),e.EFF(1,"ALL WEBSOCKET EVENTS"),e.k0s())}function ot(a,o){if(1&a){const t=e.RV6();e.j41(0,"p-chip",57)(1,"div"),e.EFF(2),e.j41(3,"i",51),e.bIt("click",function(){const n=e.eBV(t).$implicit,l=e.XpG(4);return e.Njj(l.wsEventClick([n]))}),e.k0s()()()}if(2&a){const t=o.$implicit;e.R7$(2),e.SpI("",null==t?null:t.nameUI," ")}}function rt(a,o){if(1&a&&(e.j41(0,"div"),e.DNE(1,ot,4,1,"p-chip",56),e.k0s()),2&a){const t=e.XpG(3);e.R7$(1),e.Y8G("ngForOf",t.wsEvents)}}function dt(a,o){1&a&&(e.j41(0,"tr")(1,"th",59),e.EFF(2,"Index"),e.k0s(),e.j41(3,"th",60),e.EFF(4,"Date & Time"),e.k0s(),e.j41(5,"th",61),e.EFF(6,"Method"),e.k0s(),e.j41(7,"th",62),e.EFF(8,"Status"),e.k0s(),e.j41(9,"th",60),e.EFF(10,"API Type"),e.k0s(),e.j41(11,"th"),e.EFF(12,"API Name"),e.k0s()())}const f=function(a){return{"selected-row":a}},pt=function(a,o,t,i){return{get:a,put:o,post:t,delete:i}},ct=function(){return{color:"#26b47f"}},ut=function(){return{color:"#ed4b48"}};function mt(a,o){if(1&a&&(e.j41(0,"tr",63)(1,"td")(2,"div",64),e.EFF(3),e.k0s()(),e.j41(4,"td")(5,"div",65),e.EFF(6),e.k0s()(),e.j41(7,"td")(8,"div",65)(9,"span",66),e.EFF(10),e.k0s()()(),e.j41(11,"td")(12,"div",67),e.EFF(13),e.k0s()(),e.j41(14,"td")(15,"div",65),e.EFF(16),e.k0s()(),e.j41(17,"td")(18,"div",65),e.EFF(19),e.k0s()()()),2&a){const t=o.$implicit,i=o.rowIndex,s=e.XpG(3);e.Y8G("pSelectableRow",t),e.R7$(2),e.Y8G("ngClass",e.eq3(15,f,t.isNewInGrid)),e.R7$(1),e.JRh(i+1),e.R7$(2),e.Y8G("ngClass",e.eq3(17,f,t.isNewInGrid)),e.R7$(1),e.JRh(t.createdAt),e.R7$(2),e.Y8G("ngClass",e.eq3(19,f,t.isNewInGrid)),e.R7$(1),e.Y8G("ngClass",e.ziG(21,pt,(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.R7$(1),e.SpI("",null==t?null:t.requestMethod," "),e.R7$(2),e.Y8G("ngStyle",t.success?e.lJ4(26,ct):e.lJ4(27,ut))("ngClass",e.eq3(28,f,t.isNewInGrid)),e.R7$(1),e.SpI("",t.success?"Success":"Fail"," "),e.R7$(2),e.Y8G("ngClass",e.eq3(30,f,t.isNewInGrid)),e.R7$(1),e.JRh(t.category),e.R7$(2),e.Y8G("ngClass",e.eq3(32,f,t.isNewInGrid)),e.R7$(1),e.JRh(t.logNameForUI)}}const gt=function(){return[50,200,500]};function ht(a,o){if(1&a){const t=e.RV6();e.j41(0,"div",4)(1,"div",10)(2,"div",11)(3,"span"),e.nrm(4,"i",12),e.EFF(5," Log Table Summary"),e.k0s(),e.j41(6,"div",13)(7,"a",14),e.nrm(8,"img",15),e.k0s()(),e.j41(9,"span",16),e.bIt("click",function(){e.eBV(t);const s=e.XpG(2);return e.Njj(s.loadGridData(!1))}),e.nrm(10,"i",17),e.EFF(11," Apply "),e.k0s(),e.j41(12,"span",18),e.bIt("click",function(){e.eBV(t);const s=e.XpG(2);return e.Njj(s.showFilterPanelModel())}),e.nrm(13,"i",19),e.k0s()(),e.j41(14,"div",20)(15,"table",21)(16,"tbody")(17,"tr")(18,"td",22),e.EFF(19," Instances"),e.k0s(),e.j41(20,"td",23),e.DNE(21,ke,2,0,"div",24),e.DNE(22,Pe,2,1,"div",25),e.k0s(),e.j41(23,"td",23),e.DNE(24,De,2,0,"div",24),e.DNE(25,je,2,1,"div",25),e.k0s(),e.j41(26,"td",23),e.DNE(27,Ge,2,0,"div",24),e.DNE(28,$e,2,1,"div",25),e.k0s(),e.j41(29,"td"),e.DNE(30,Me,2,0,"div",24),e.DNE(31,Oe,2,1,"div",25),e.k0s()(),e.j41(32,"tr")(33,"td",22),e.EFF(34," Third Party APIs"),e.k0s(),e.DNE(35,Be,3,0,"td",26),e.DNE(36,Xe,2,1,"td",27),e.DNE(37,qe,2,1,"td",27),e.DNE(38,He,2,1,"td",28),e.k0s(),e.j41(39,"tr")(40,"td",22),e.EFF(41," Custom APIs"),e.k0s(),e.j41(42,"td",29),e.DNE(43,Ke,2,0,"div",24),e.DNE(44,Je,2,1,"div",25),e.k0s()(),e.j41(45,"tr")(46,"td",22),e.EFF(47," System APIs"),e.k0s(),e.j41(48,"td",29),e.DNE(49,We,2,0,"div",24),e.DNE(50,Ze,2,1,"div",25),e.k0s()(),e.j41(51,"tr")(52,"td",22),e.EFF(53," Events"),e.k0s(),e.j41(54,"td",29),e.DNE(55,et,2,0,"div",24),e.DNE(56,it,2,1,"div",25),e.k0s()(),e.j41(57,"tr")(58,"td",22),e.EFF(59," Schedulers"),e.k0s(),e.j41(60,"td",29),e.DNE(61,st,2,0,"div",24),e.DNE(62,nt,2,1,"div",25),e.k0s()(),e.j41(63,"tr")(64,"td",22),e.EFF(65," WebSocket Events"),e.k0s(),e.j41(66,"td",29),e.DNE(67,lt,2,0,"div",24),e.DNE(68,rt,2,1,"div",25),e.k0s()(),e.j41(69,"tr")(70,"td",30)(71,"span",31),e.EFF(72,"Date"),e.k0s()(),e.j41(73,"td",32)(74,"p-calendar",33),e.bIt("ngModelChange",function(s){e.eBV(t);const n=e.XpG(2);return e.Njj(n.gridFilter.rangeDates=s)}),e.k0s(),e.j41(75,"span",34),e.bIt("click",function(){e.eBV(t);const s=e.XpG(2);return e.Njj(s.clearDate())}),e.nrm(76,"i",35),e.k0s()()()()()()(),e.j41(77,"div",36)(78,"div",11)(79,"span"),e.nrm(80,"img",37),e.EFF(81," Log Table"),e.k0s(),e.j41(82,"span",38),e.bIt("click",function(){e.eBV(t);const s=e.XpG(2);return e.Njj(s.showFilterPanelModel())}),e.nrm(83,"i",19),e.k0s(),e.j41(84,"span",39),e.bIt("click",function(){e.eBV(t);const s=e.XpG(2);return e.Njj(s.clearAllLogsDialog())}),e.nrm(85,"i",40),e.k0s(),e.j41(86,"span",41),e.bIt("click",function(){e.eBV(t);const s=e.XpG(2);return e.Njj(s.refresh())}),e.nrm(87,"i",42),e.k0s()()(),e.j41(88,"div",43)(89,"div",44)(90,"p-table",45),e.bIt("selectionChange",function(s){e.eBV(t);const n=e.XpG(2);return e.Njj(n.selectedRows=s)})("dblclick",function(){e.eBV(t);const s=e.XpG(2);return e.Njj(s.dblClickLogs())}),e.DNE(91,dt,13,0,"ng-template",46),e.DNE(92,mt,20,34,"ng-template",47),e.k0s()()()()}if(2&a){const t=e.XpG(2);e.R7$(21),e.Y8G("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allInstances),e.R7$(1),e.Y8G("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allInstances)),e.R7$(2),e.Y8G("ngIf",(null==t.gridFilter?null:t.gridFilter.apisRegex.allDatabases)||(null==t.gridFilter?null:t.gridFilter.apisRegex.allInstances)),e.R7$(1),e.Y8G("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allDatabases||null!=t.gridFilter&&t.gridFilter.apisRegex.allInstances)),e.R7$(2),e.Y8G("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.R7$(1),e.Y8G("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allCollections||null!=t.gridFilter&&t.gridFilter.apisRegex.allInstances||null!=t.gridFilter&&t.gridFilter.apisRegex.allDatabases)),e.R7$(2),e.Y8G("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.R7$(1),e.Y8G("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.R7$(4),e.Y8G("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allThirdPartyApis),e.R7$(1),e.Y8G("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allThirdPartyApis)),e.R7$(1),e.Y8G("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allThirdPartyApis)),e.R7$(1),e.Y8G("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allThirdPartyApis)),e.R7$(5),e.Y8G("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allCustomApis),e.R7$(1),e.Y8G("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allCustomApis)),e.R7$(5),e.Y8G("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allSystemApis),e.R7$(1),e.Y8G("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allSystemApis)),e.R7$(5),e.Y8G("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allEvents),e.R7$(1),e.Y8G("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allEvents)),e.R7$(5),e.Y8G("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allSchedulers),e.R7$(1),e.Y8G("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allSchedulers)),e.R7$(5),e.Y8G("ngIf",null==t.gridFilter?null:t.gridFilter.apisRegex.allWebSocketEvents),e.R7$(1),e.Y8G("ngIf",!(null!=t.gridFilter&&t.gridFilter.apisRegex.allWebSocketEvents)),e.R7$(6),e.Y8G("ngModel",t.gridFilter.rangeDates)("showIcon",!0)("showButtonBar",!0)("readonlyInput",!0),e.R7$(16),e.Y8G("selectionMode","multiple")("metaKeySelection",!0)("selection",t.selectedRows)("dataKey",t.gridKey)("scrollable",!0)("paginator",!0)("rows",50)("rowsPerPageOptions",e.lJ4(35,gt))("value",t.responseData)}}function vt(a,o){1&a&&e.nrm(0,"p-progressSpinner",68)}function _t(a,o){if(1&a&&(e.j41(0,"div",4),e.DNE(1,be,4,1,"div",5),e.DNE(2,ht,93,36,"div",0),e.DNE(3,vt,1,0,"p-progressSpinner",6),e.k0s()),2&a){const t=e.XpG();e.R7$(1),e.Y8G("ngIf",!t.isExternalLogsSetupDoneByRoot),e.R7$(1),e.Y8G("ngIf",t.isExternalLogsSetupDoneByRoot),e.R7$(1),e.Y8G("ngIf",t.loading)}}let ft=(()=>{class a{logS;authCS;generalS;instanceS;functionS;eventCenterS;schedulerS;amEventS;webSocketEventsS;dataProviderS;confirmationService;constantsS;cd;responseData=[];loading;allApiCategories=[];tab={apiCategory:this.allApiCategories[0]};subscriptions=[];settings={maxRowsLimit:1e4};data={mode:D.X.ADD,eventChannel:new e.bkB,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=F.mO;constructor(t,i,s,n,l,m,v,I,y,g,A,E,C){this.logS=t,this.authCS=i,this.generalS=s,this.instanceS=n,this.functionS=l,this.eventCenterS=m,this.schedulerS=v,this.amEventS=I,this.webSocketEventsS=y,this.dataProviderS=g,this.confirmationService=A,this.constantsS=E,this.cd=C,this.allApiCategories=this.dataProviderS.getApiCategories()}ngOnInit(){var t=this;this.getExternalRedisSetupFromPackageJson(),this.subscriptions.push(this.data.eventChannel.subscribe(function(){var i=(0,u.A)(function*(s){if(s&&s.action===P.K.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("API Maker - Log Table Summary")}isExternalLogsSetupDoneByRoot;getExternalRedisSetupFromPackageJson(){var t=this;return(0,u.A)(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.A)(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,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("API Maker - Log Table Summary"),i.loading=!1,i.cd.detectChanges()})()}applyFilterInQuery(t,i){if(!i)return;t.$or=[],t.$and=[];const s={category:c.O.CUSTOM_APIS};i?.apisRegex?.allCustomApis?t.$or.push(s):r.isEmpty(i?.queryParams?.functions)||t.$or.push({category:c.O.CUSTOM_APIS,customApiName:{$in:this.customApiNames}});const n={category:c.O.SYSTEM_APIS};i?.apisRegex?.allSystemApis?t.$or.push(n):r.isEmpty(i?.queryParams?.systemApis)||t.$or.push({category:c.O.SYSTEM_APIS,systemApiName:{$in:this.systemApiNames}});const l={category:c.O.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 m={category:c.O.THIRD_PARTY_APIS};if(i?.apisRegex?.allThirdPartyApis)t.$or.push(m);else if(!r.isEmpty(this.tpApis)||!r.isEmpty(this.tpBundles)||!r.isEmpty(this.tpApiVersions)){const g=r.uniq(r.map(this.tpBundles,"bundleName")),A=r.uniq(r.map(this.tpApiVersions,"apiVersion")),E=r.uniq(r.map(this.tpApis,"apiName")),C={category:c.O.THIRD_PARTY_APIS};r.isEmpty(g)||(C.tpApiBundleName={$in:g}),r.isEmpty(A)||(C.apiVersion={$in:A}),r.isEmpty(E)||(C.tpApiName={$in:E}),t.$or.push(C)}const v={category:c.O.EVENTS};i?.apisRegex?.allEvents?t.$or.push(v):r.isEmpty(i?.queryParams?.eventIds)||t.$or.push({category:c.O.SYSTEM_APIS,eventName:{$in:this.amEventNames}});const I={category:c.O.SCHEDULERS};i?.apisRegex?.allSchedulers?t.$or.push(I):r.isEmpty(i?.queryParams?.schedulersIds)||t.$or.push({category:c.O.SCHEDULERS,schedulerName:{$in:this.schedulersNames}});const y={category:c.O.WEB_SOCKET_EVENT};i?.apisRegex?.allWebSocketEvents?t.$or.push(y):r.isEmpty(i?.queryParams?.webSocketIds)||t.$or.push({category:c.O.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.A)(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.GX._id),i.customApiNames=r.map(i.customApis,p.dG.name);const n=(yield i.instanceS.systemAPIList().toPromise()).data,l=r.keyBy(n,p.GX._id);i.systemsApis=[];for(const g of t?.queryParams.systemApis)l[g]&&i.systemsApis.push(l[g]);i.systemApiIds=r.map(i.systemsApis,p.GX._id),i.systemApiNames=r.map(i.systemsApis,p.ee.name);const m={find:{_id:t?.queryParams.eventIds},select:{name:1}};i.amEvents=(yield i.amEventS.query(m).toPromise()).data,i.amEventIds=r.map(i.amEvents,p.GX._id),i.amEventNames=r.map(i.amEvents,p.IP.name);const v={find:{_id:t?.queryParams.schedulersIds},select:{name:1}};i.schedulersApis=(yield i.schedulerS.query(v).toPromise()).data,i.schedulersIds=r.map(i.schedulersApis,p.GX._id),i.schedulersNames=r.map(i.schedulersApis,p.VC.name);const I=(yield i.webSocketEventsS.getWSEventKGrid({}).toPromise()).data,y=r.keyBy(I,p.GX._id);i.wsEvents=[];for(const g of t?.queryParams.webSocketIds)y[g]&&i.wsEvents.push(y[g]);i.wsEventIds=r.map(i.wsEvents,p.GX._id),i.wsEventsNames=r.map(i.wsEvents,p.Wc.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.GX._id),this.tpApiVersionMap=r.map(this.tpApiVersions,p.GX._id),this.tpApisMap=r.map(this.tpApis,p.GX._id)}loadInstances(t){var i=this;return(0,u.A)(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.GX._id),i.instanceNames=r.map(i.instances,p.Nl.name),yield i.loadDatabases(t)})()}loadDatabases(t){var i=this;return(0,u.A)(function*(){if(!i.instances)return i.databases=[],i.collections=[],void(i.supportedAPIs=[]);const s=(yield i.instanceS.getDatabases(i.instances).toPromise()).data||[],n=r.keyBy(r.flatten(s||[]),p.GX._id);i.databases=[];for(const l of t?.queryParams.databaseIds)n[l]&&i.databases.push(n[l]);i.databaseNames=r.map(i.databases,p.GX._id),yield i.loadCollection(t)})()}loadCollection(t){var i=this;return(0,u.A)(function*(){if(!i.instances||!i.databases)return i.collections=[],void(i.supportedAPIs=[]);const s=(yield i.instanceS.getCollections(i.databases).toPromise()).data||[],n=r.keyBy(r.flatten(s||[]),p.GX._id);i.collections=[];for(const l of t?.queryParams.collectionIds)n[l]&&i.collections.push(n[l]);i.collectionNames=r.map(i.collections,p.GX._id),yield i.loadSupportedApis(t)})()}loadSupportedApis(t){var i=this;return(0,u.A)(function*(){i.instances&&i.databases&&i.collections?(i.supportedAPIs=[],i.supportedAPIs=t.supportedAPIs||[],i.supportedApiNames=r.map(i.supportedAPIs,p.GX._id)):i.supportedAPIs=[]})()}doChangesInLogObject(t,i){t.createdAt=moment(t.createdAt).format("DD-MM-YYYY hh:mm:ss A"),t.isNewInGrid=i,t.category===c.O.INSTANCES?t.logNameForUI=t.instanceName+" \u2192 "+t.databaseName+" \u2192 "+t.collectionName+" \u2192 "+t.instanceApiName:t.category===c.O.CUSTOM_APIS?t.logNameForUI=t.customApiName:t.category===c.O.SYSTEM_APIS?t.logNameForUI=t.eventName?t.eventName:t.systemApiName:t.category===c.O.SCHEDULERS?t.logNameForUI=t.schedulerName:t.category===c.O.WEB_SOCKET_EVENT?t.logNameForUI=t.webSocketEventName:t.category===c.O.THIRD_PARTY_APIS&&(t.logNameForUI=t.tpApiBundleName+" \u2192 "+t.apiVersion+" \u2192 "+t.tpApiName)}showFilterPanelModel(){this.data.formData=void 0,this.data.mode=D.X.ADD,this.setDataForFilterModal(!0),this.logFilterPanelLayoutModelC.showModal()}instanceClickData(t){var i=this;return(0,u.A)(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.GX._id),i.instanceNames=r.map(i.instances,p.Nl.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.GX._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.GX._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.GX._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.GX._id),this.customApiNames=r.map(this.customApis,p.dG.name),this.eventCenterS.filterInLog.functionIds.next(this.instanceIds)}systemsApisClick(t){this.systemsApis.splice(this.systemsApis.indexOf(t),1),this.systemApiIds=r.map(this.systemsApis,p.GX._id),this.systemApiNames=r.map(this.systemsApis,p.ee.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.GX._id),this.amEventNames=r.map(this.amEvents,p.IP.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.GX._id),this.schedulersNames=r.map(this.schedulersApis,p.VC.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.GX._id),this.wsEventsNames=r.map(this.wsEvents,p.Wc.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.GX._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.GX._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.GX._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.A)(function*(){var i;t.confirmationService.confirm({message:t.constantsS.logTable.clearAllLogsConfirm,header:"Confirmation",icon:"pi pi-exclamation-triangle",accept:(i=(0,u.A)(function*(){yield t.clearAllLogs()}),function(){return i.apply(this,arguments)})})})()}clearAllLogs(){var t=this;return(0,u.A)(function*(){yield t.logS.clearUserLogs(t.authCS.getUserId()).toPromise(),t.loadGridData(!1)})()}refresh(){var t=this;return(0,u.A)(function*(){t.loadGridData(!0)})()}clearDate(){this.gridFilter.rangeDates=void 0}selectedRows=[];gridKey=p.GX._id;dblClickLogs(){var t=this;return(0,u.A)(function*(){yield t.logDetailsLayoutModelC.showModal(t.selectedRows)})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(i){return new(i||a)(e.rXU(N.u),e.rXU(q.l),e.rXU(j.f),e.rXU(U.J),e.rXU(H.a),e.rXU(L.d),e.rXU(K.t),e.rXU(Q.I),e.rXU(J.g),e.rXU(W.n),e.rXU(S.td),e.rXU(b.X),e.rXU(e.gRc))};static \u0275cmp=e.VBU({type:a,selectors:[["app-log-table-c"]],viewQuery:function(i,s){if(1&i&&(e.GBs(Ee,5),e.GBs(Le,5)),2&i){let n;e.mGM(n=e.lsd())&&(s.logFilterPanelLayoutModelC=n.first),e.mGM(n=e.lsd())&&(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"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-3","mr-1","mt-n1",2,"font-size","25px"],["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/mm/yy","inputId","filterDatePickerId",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"],["src","/assets/images/icons/log.svg","alt","Log Table",1,"fa-fw","mr-1"],["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.DNE(0,_t,4,3,"div",0),e.nrm(1,"app-log-filter-panel-layout-model",1,2)(3,"app-log-details-layout-model",null,3)),2&i&&(e.Y8G("ngIf",void 0!==s.isExternalLogsSetupDoneByRoot),e.R7$(1),e.Y8G("data",s.data))},dependencies:[G.BC,G.vS,h.YU,h.Sq,h.bT,h.B3,R.XI,S.Ei,R.d5,k.p,x.m,z.Vv,Z.v,_e,Ae],styles:[".table th,.table td{border-top:none}#filterDatePickerId,.w-date-input{width:210px}\n"],encapsulation:2,changeDetection:0})}return a})();var yt=d(2393),Ct=d(2818),It=d(807),Ft=d(8389),St=d(5826),Rt=d(9036),At=d(5493),Et=d(863),Lt=d(1959),bt=d(7597);const kt=[{path:"main",component:ft,canActivate:[X.Z]}];let Tt=(()=>{class a{static \u0275fac=function(i){return new(i||a)};static \u0275mod=e.$C({type:a});static \u0275inj=e.G2t({imports:[B.iI.forChild(kt),Y.u,yt.ApiTestingM,Ct.DashboardM,It.DbCellM,Ft.Q,St.SystemApiM,Rt.FunctionManM,At.I,Et.e,Lt.SchedulerManM,bt.AmEventsM,V.WebSocketEventsM]})}return a})()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[6220],{6220:(H,f,a)=>{a.r(f),a.d(f,{AuthM:()=>M});var c=a(7060),m=a(467),s=a(4341),p=a(1325),g=a(5312),e=a(540),v=a(2396),k=a(6129),C=a(6708),R=a(7237),S=a(4752),E=a(9819),I=a(334),y=a(177),G=a(3478),L=a(7515);function T(n,i){1&n&&(e.j41(0,"span"),e.nrm(1,"i",21),e.EFF(2," Login"),e.k0s())}function F(n,i){1&n&&(e.j41(0,"span"),e.nrm(1,"i",22),e.EFF(2," Register"),e.k0s())}function O(n,i){1&n&&(e.j41(0,"span"),e.nrm(1,"i",23),e.EFF(2," Forgot Password"),e.k0s())}const u=function(){return{mode:"LOGIN"}};function N(n,i){1&n&&(e.j41(0,"a",24),e.nrm(1,"i",25),e.EFF(2," Login"),e.k0s()),2&n&&e.Y8G("routerLink","/login")("state",e.lJ4(2,u))}function b(n,i){1&n&&(e.j41(0,"a",24),e.nrm(1,"i",25),e.EFF(2," Login"),e.k0s()),2&n&&e.Y8G("routerLink","/login")("state",e.lJ4(2,u))}function j(n,i){1&n&&(e.j41(0,"div",14)(1,"label",26),e.EFF(2,"Name"),e.k0s(),e.j41(3,"div",16),e.nrm(4,"input",27),e.k0s()())}function P(n,i){if(1&n){const t=e.RV6();e.j41(0,"div",14)(1,"label",28),e.EFF(2,"Password"),e.k0s(),e.j41(3,"div",16)(4,"input",29),e.bIt("keyup.enter",function(){e.eBV(t);const o=e.XpG();return e.Njj("LOGIN"===o.mode?o.save():"")}),e.k0s()()()}}function w(n,i){1&n&&(e.j41(0,"div",14)(1,"label",28),e.EFF(2,"API Path"),e.k0s(),e.j41(3,"div",16),e.nrm(4,"input",30),e.k0s()())}function _(n,i){1&n&&(e.j41(0,"div",14),e.nrm(1,"label",28),e.j41(2,"div",16),e.nrm(3,"div",31),e.k0s()())}function D(n,i){if(1&n){const t=e.RV6();e.j41(0,"div",14)(1,"label",28),e.EFF(2,"Captcha"),e.k0s(),e.j41(3,"div",16)(4,"div",32)(5,"input",33),e.bIt("keyup.enter",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.save())}),e.k0s(),e.j41(6,"span",34),e.bIt("click",function(){e.eBV(t);const o=e.XpG();return e.Njj(o.loadCaptcha())}),e.nrm(7,"i",35),e.k0s()()()()}}function A(n,i){1&n&&(e.j41(0,"span"),e.nrm(1,"i",36),e.EFF(2," Login"),e.k0s())}function x(n,i){1&n&&(e.j41(0,"span"),e.nrm(1,"i",37),e.EFF(2," Register"),e.k0s())}function U(n,i){1&n&&(e.j41(0,"span"),e.nrm(1,"i",38),e.EFF(2," Recover"),e.k0s())}function Y(n,i){1&n&&e.nrm(0,"p-progressSpinner",39)}let d=(()=>{class n{fb;userS;generalS;ns;route;router;authCS;navigationS;tpStoreApiVersionS;eventCenterCS;form;subscriptions=[];mode="LOGIN";loading={form:!1};version="";constructor(t,r,o,l,W,B,J,K,z,Z){this.fb=t,this.userS=r,this.generalS=o,this.ns=l,this.route=W,this.router=B,this.authCS=J,this.navigationS=K,this.tpStoreApiVersionS=z,this.eventCenterCS=Z,this.version=g.c.VERSION}ngOnInit(){this.createForm(),this.subscriptions.push(this.route.data.subscribe(t=>{this.mode=t.mode,this.loadCaptcha(),"REGISTER"===this.mode?(this.form.get("name").setValidators([s.k0.required,s.k0.minLength(3)]),this.form.get("apiPath").setValidators([s.k0.required,s.k0.minLength(3),s.k0.maxLength(25),s.k0.pattern("[a-zA-Z0-9_]*$")]),this.form.get("password").setValidators([s.k0.required,s.k0.minLength(4),s.k0.maxLength(40)])):"LOGIN"===this.mode&&this.form.get("password").setValidators([s.k0.required,s.k0.minLength(4),s.k0.maxLength(40)])}))}latestCaptchaKey;loadCaptcha(){var t=this;return(0,m.A)(function*(){try{const r=yield t.userS.getCaptcha();$("#idSvg").html(r.data),setTimeout(()=>{$("#idSvg svg").attr("height","50px").removeAttr("width")},100),t.latestCaptchaKey=r.key}catch(r){t.ns.showErrorFromResponse(r.error||r,"Unable to load captcha.")}})()}createForm(){this.form=this.fb.group({name:["",[]],email:["",[s.k0.required,s.k0.email]],password:["",[]],apiPath:["",[]],captcha:["",[s.k0.required]],captchaKey:["",[]]})}save(){var t=this;return(0,m.A)(function*(){"LOGIN"===t.mode?yield t.login():"REGISTER"===t.mode?yield t.register():"FORGOT_PASSWORD"===t.mode&&(yield t.forgotPassword())})()}login(){var t=this;return(0,m.A)(function*(){const r=t.form.getRawValue();if(r.captcha){if(t.form.invalid)return t.ns.showError("Please fill all required fields");try{t.loading.form=!0;const o=yield t.userS.login(r.email,r.password,t.latestCaptchaKey,r.captcha);if(o){if(o.hasOwnProperty("message"))return t.loading.form=!1,t.ns.showError("You have entered an invalid Captcha.");t.ns.showSuccess("Login Success."),t.authCS.setAccessToken(o.accessToken),t.authCS.setRefreshToken(o.refreshToken);const l=yield t.userS.getUserInfo(o._id);l.userType===p.l.DEVELOPER&&(l.user=yield t.userS.getUserInfo(l.user)),t.authCS.setUserToLocalStorage(l,g.c.crypto.passCommunication),yield t.userS.loadSettings(t.tpStoreApiVersionS,t.eventCenterCS),t.navigationS.gotoDashboard()}else t.ns.showError("Invalid Credentials.");t.loading.form=!1}catch(o){t.loading.form=!1,t.ns.showErrorFromResponse(o.error||o,"Unable to login."),yield t.loadCaptcha()}}})()}register(){var t=this;return(0,m.A)(function*(){const r=t.form.getRawValue();try{t.loading.form=!0,r.userType=p.l.ADMIN,(yield t.userS.register(r))&&(t.ns.showSuccess("Registration Success."),yield t.login()),t.loading.form=!1,t.form.reset()}catch(o){t.loading.form=!1,t.ns.showErrorFromResponse(o.error||o,"Unable to register.")}})()}forgotPassword(){return(0,m.A)(function*(){console.log("Forgot Password.")})()}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions)}static \u0275fac=function(r){return new(r||n)(e.rXU(s.ok),e.rXU(v.N),e.rXU(k.f),e.rXU(C.m),e.rXU(c.nX),e.rXU(c.Ix),e.rXU(R.l),e.rXU(S.O),e.rXU(E.V),e.rXU(I.u))};static \u0275cmp=e.VBU({type:n,selectors:[["app-login"]],decls:33,vars:17,consts:[[1,"login-form"],[1,"row","justify-content-center","mt-4","row"],[1,"col-12","col-lg-5","col-sm-10","shadow-lg","p-0","rounded"],[1,"card",2,"background-color","#14141478"],[1,"card-header"],[4,"ngIf"],["class","float-right",3,"routerLink","state",4,"ngIf"],[1,"float-right"],[1,"card-body"],[1,"row"],[1,"col-12","text-center"],["src","assets/images/logo/logo.svg","alt","API maker logo",1,"m-4","mt-3",2,"padding-bottom","10px"],[3,"formGroup"],["class","form-group row",4,"ngIf"],[1,"form-group","row"],["for","email",1,"col-4","col-form-label","col-form-label-sm","text-right"],[1,"col-6","pr-0"],["formControlName","email","id","email","name","email_address","spellcheck","false","type","email","placeholder","Please provide email",1,"form-control","form-control-sm",3,"keyup.enter"],[1,"col-8","offset-4",2,"padding-bottom","25px"],["sava-no-dbl-click","","type","button",1,"btn","btn-primary","btn-sm",3,"disabled","click"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s",4,"ngIf"],[1,"fas","fa-user-lock","text-info","fa-fw"],[1,"fas","fa-plus","text-success"],[1,"fas","fa-lock","text-warning","fa-fw"],[1,"float-right",3,"routerLink","state"],[1,"fas","fa-user-lock","text-info"],["for","name",1,"col-4","col-form-label","col-form-label-sm","text-right"],["formControlName","name","id","name","name","name","spellcheck","false","type","text","placeholder","Please provide name",1,"form-control","form-control-sm"],[1,"col-4","col-form-label","col-form-label-sm","text-right"],["formControlName","password","name","password","type","password","placeholder","Please provide password",1,"form-control","form-control-sm",3,"keyup.enter"],["formControlName","apiPath","name","apiPath","spellcheck","false","type","text","placeholder","Please provide API Path",1,"form-control","text-lowercase","form-control-sm"],["id","idSvg",2,"border-radius","5px","background","white","text-align","center"],[1,"input-group","input-group-sm","mb-3"],["formControlName","captcha","name","captcha","type","text","placeholder","Please provide captcha",1,"form-control","form-control-sm",3,"keyup.enter"],[1,"input-group-text","pl-3","pr-3","pt-0","pb-0","bg-dark","text-white","cursor-pointer",2,"border","1px solid #555555",3,"click"],[1,"fas","fa-redo","fa-fw","text-success"],[1,"fas","fa-sign-in-alt","text-success","fa-fw"],[1,"fas","fa-plus","text-success","fa-fw"],[1,"fas","fa-retweet","text-danger","fa-fw"],["styleClass","w-4rem h-4rem","strokeWidth","4","animationDuration",".5s"]],template:function(r,o){1&r&&(e.j41(0,"main",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),e.DNE(5,T,3,0,"span",5),e.DNE(6,F,3,0,"span",5),e.DNE(7,O,3,0,"span",5),e.DNE(8,N,3,3,"a",6),e.DNE(9,b,3,3,"a",6),e.j41(10,"span",7),e.EFF(11),e.k0s()(),e.j41(12,"div",8)(13,"div",9)(14,"div",10),e.nrm(15,"img",11),e.k0s()(),e.j41(16,"form",12),e.DNE(17,j,5,0,"div",13),e.j41(18,"div",14)(19,"label",15),e.EFF(20,"E-Mail Address"),e.k0s(),e.j41(21,"div",16)(22,"input",17),e.bIt("keyup.enter",function(){return"LOGIN"===o.mode?o.save():""}),e.k0s()()(),e.DNE(23,P,5,0,"div",13),e.DNE(24,w,5,0,"div",13),e.DNE(25,_,4,0,"div",13),e.DNE(26,D,8,0,"div",13),e.j41(27,"div",18)(28,"button",19),e.bIt("click",function(){return o.save()}),e.DNE(29,A,3,0,"span",5),e.DNE(30,x,3,0,"span",5),e.DNE(31,U,3,0,"span",5),e.k0s()()(),e.DNE(32,Y,1,0,"p-progressSpinner",20),e.k0s()()()()()),2&r&&(e.R7$(5),e.Y8G("ngIf","LOGIN"===o.mode),e.R7$(1),e.Y8G("ngIf","REGISTER"===o.mode),e.R7$(1),e.Y8G("ngIf","FORGOT_PASSWORD"===o.mode),e.R7$(1),e.Y8G("ngIf","REGISTER"===o.mode),e.R7$(1),e.Y8G("ngIf","FORGOT_PASSWORD"===o.mode),e.R7$(2),e.JRh(o.version),e.R7$(5),e.Y8G("formGroup",o.form),e.R7$(1),e.Y8G("ngIf","REGISTER"===o.mode),e.R7$(6),e.Y8G("ngIf","LOGIN"===o.mode||"REGISTER"===o.mode),e.R7$(1),e.Y8G("ngIf","REGISTER"===o.mode),e.R7$(1),e.Y8G("ngIf","LOGIN"===o.mode),e.R7$(1),e.Y8G("ngIf","LOGIN"===o.mode),e.R7$(2),e.Y8G("disabled",o.form.invalid),e.R7$(1),e.Y8G("ngIf","LOGIN"===o.mode),e.R7$(1),e.Y8G("ngIf","REGISTER"===o.mode),e.R7$(1),e.Y8G("ngIf","FORGOT_PASSWORD"===o.mode),e.R7$(1),e.Y8G("ngIf",o.loading.form))},dependencies:[c.Wk,s.qT,s.me,s.BC,s.cb,s.j4,s.JD,y.bT,G.U,L.p],styles:[".my-form[_ngcontent-%COMP%]{padding-top:1.5rem;padding-bottom:1.5rem}.my-form[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.login-form[_ngcontent-%COMP%]{padding-top:1.5rem;padding-bottom:1.5rem}.login-form[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}"]})}return n})();var V=a(7431),h=a(2459);const X=[{path:"",component:d,canActivate:[h.n],data:{mode:"LOGIN"}},{path:"login",component:d,canActivate:[h.n],data:{mode:"LOGIN"}},{path:"forgot-password",component:d,canActivate:[],data:{mode:"FORGOT_PASSWORD"}},{path:"register",component:d,canActivate:[],data:{mode:"REGISTER"}}];let M=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275mod=e.$C({type:n});static \u0275inj=e.G2t({imports:[c.iI.forChild(X),V.u]})}return n})()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkapi_maker_fe=self.webpackChunkapi_maker_fe||[]).push([[7152],{846:(C,E,s)=>{s.d(E,{s:()=>q});var m=s(467),n=s(4341),c=s(8727),_=s(5046),I=s(4388),u=s(6645),f=s(5312),h=s(5632),P=s(9239),p=s(8677),v=s(2133),e=s(540),O=s(6708),M=s(6129),g=s(1987),T=s(9818),R=s(7237),F=s(3864),S=s(6268),A=s(3966),b=s(2396),z=s(177),U=s(3478),y=s(4098),B=s(6914),L=s(7515),D=s(4945),K=s(8542),j=s(4466);const W=["insertCodeModalC"],G=["monacoEditorModalC"];function k(r,d){1&r&&(e.j41(0,"span"),e.nrm(1,"i",27),e.EFF(2," Add Process Initializer"),e.k0s())}function N(r,d){1&r&&(e.j41(0,"span"),e.nrm(1,"i",28),e.EFF(2," View Process Initializer"),e.k0s())}function X(r,d){if(1&r&&(e.j41(0,"span"),e.nrm(1,"i",29),e.EFF(2," Edit Process Initializer "),e.j41(3,"span",30),e.EFF(4),e.k0s()()),2&r){const o=e.XpG();e.R7$(4),e.JRh(o.form.get("name").value)}}function V(r,d){1&r&&(e.j41(0,"span",39),e.EFF(1,"You can not change name later, it can be used in script."),e.k0s())}function x(r,d){if(1&r&&(e.j41(0,"div")(1,"form",31)(2,"div",32)(3,"label",33),e.EFF(4,"Name"),e.k0s(),e.j41(5,"div",34),e.nrm(6,"input",35),e.DNE(7,V,2,0,"span",36),e.k0s()(),e.j41(8,"div",32)(9,"label",33),e.EFF(10,"Order"),e.k0s(),e.j41(11,"div",34),e.nrm(12,"input",37),e.k0s()(),e.j41(13,"div",32)(14,"label",33),e.EFF(15,"Timeout in minutes"),e.k0s(),e.j41(16,"div",34),e.nrm(17,"input",38),e.k0s()()()()),2&r){const o=e.XpG();e.R7$(1),e.Y8G("formGroup",o.form),e.R7$(6),e.Y8G("ngIf",o.data.mode===o.EFormMode.ADD)}}function Y(r,d){if(1&r){const o=e.RV6();e.j41(0,"div",40)(1,"app-monaco-editor",41),e.bIt("editorGenerated",function(t){e.eBV(o);const i=e.XpG();return e.Njj(i.editorGenerated(t))}),e.k0s()()}if(2&r){const o=e.XpG();e.R7$(1),e.Y8G("isSchemaEditor",!0)("editorOptions",o.editorOptionsProcessInitializer)}}function w(r,d){if(1&r){const o=e.RV6();e.j41(0,"a",42),e.bIt("click",function(){e.eBV(o);const t=e.XpG();return e.Njj(t.viewError())}),e.EFF(1,"View error"),e.k0s()}}function H(r,d){1&r&&(e.j41(0,"span"),e.EFF(1,"Save"),e.k0s())}function J(r,d){1&r&&(e.j41(0,"span"),e.EFF(1,"Update"),e.k0s())}function Q(r,d){if(1&r){const o=e.RV6();e.j41(0,"button",43),e.bIt("click",function(){e.eBV(o);const t=e.XpG();return e.Njj(t.save())}),e.nrm(1,"i",44),e.DNE(2,H,2,0,"span",4),e.DNE(3,J,2,0,"span",4),e.k0s()}if(2&r){const o=e.XpG();e.Y8G("disabled",o.form.invalid),e.R7$(2),e.Y8G("ngIf",o.data.mode===o.EFormMode.ADD),e.R7$(1),e.Y8G("ngIf",o.data.mode===o.EFormMode.EDIT)}}function Z(r,d){1&r&&e.nrm(0,"p-progressSpinner",45)}let q=(()=>{class r{fb;ns;generalS;constantsS;processInitializersS;authCS;monacoS;instanceS;eventCenterS;generalCS;userS;cd;data;loading={form:!1};EFormMode=_.X;form;subscriptions=[];formData;IEventData=c.K;id;BE_HOST_PORT=f.c.BE_HOST_PORT;DOCS_HOST_PORT=f.c.DOCS_HOST_PORT;instances=[];editorPI;editorOptionsProcessInitializer={readOnly:!1,language:"typescript",contextmenu:!0};lastError;editorOptionsMonacoEditorModal={readOnly:!0,language:"json",contextmenu:!0};insertCodeModalC;viewDockerfileModelC;shouldLoadMonacoEditor=!1;monacoDecorations=[];tab;constructor(o,a,t,i,l,ee,oe,te,se,ae,re,ie){this.fb=o,this.ns=a,this.generalS=t,this.constantsS=i,this.processInitializersS=l,this.authCS=ee,this.monacoS=oe,this.instanceS=te,this.eventCenterS=se,this.generalCS=ae,this.userS=re,this.cd=ie}ngOnInit(){var o=this;return(0,m.A)(function*(){o.createForm(),o.subscriptions.push(o.data.eventChannel.subscribe(function(){var a=(0,m.A)(function*(t){if(t)if(o.form.enable(),t.action===c.K.OPEN_FORM_IN_EDIT_MODE)yield o.editViewLoadData(),o.form.get("name").disable(),o.cd.detectChanges();else if(t.action===c.K.OPEN_FORM_IN_VIEW_MODE)yield o.editViewLoadData(),o.form.disable(),o.cd.detectChanges();else if(t.action===c.K.OPEN_FORM_IN_ADD_MODE){o.form.reset(),o.form.patchValue(t.data||{});const i=yield o.instanceS.getDefaultContent(o.BE_HOST_PORT,h.O.PROCESS_INITIALIZER).toPromise();o.editorOptionsProcessInitializer={readOnly:!1},o.generalCS.setValueInEditor(o,"editorPI",i.data),o.cd.detectChanges()}});return function(t){return a.apply(this,arguments)}}()))})()}editViewLoadData(){var o=this;return(0,m.A)(function*(){const a=yield o.processInitializersS.getById(o.data.formData._id).toPromise();o.form.reset(),o.form.patchValue(a.data),o.generalCS.setValueInEditor(o,"editorPI",a.data?.processInitializerCode||"")})()}createForm(){this.form=this.fb.group({name:[null,[n.k0.required]],order:[null,[n.k0.required]],processInitializerTimeoutInMinutes:[null,[]]})}showModal(){this.lastError=void 0,this.shouldLoadMonacoEditor=!0,setTimeout(()=>{$("#idProcessInitializerForm").modal("show")},100)}hideModal(){$("#idProcessInitializerForm").modal("hide")}save(){var o=this;return(0,m.A)(function*(){const a=o.form.getRawValue();let t;t=o.data.formData&&o.data.formData._id?(yield o.processInitializersS.getById(o.data.formData._id).toPromise()).data:{};const i=Object.assign({},t,a);i.user=o.authCS.getUserId(),i.processInitializerCode=o.editorPI.getValue();try{let l;o.loading.form=!0,o.lastError=void 0,o.monacoS.clearEditorDecorations(o.editorPI,o.monacoDecorations),o.data.mode===_.X.ADD?l=yield o.processInitializersS.post(i).toPromise():o.data.mode===_.X.EDIT&&(l=yield o.processInitializersS.put(i._id,i,{select:u.GX._id}).toPromise()),o.ns.showSuccess(o.data.mode===_.X.ADD?o.constantsS.processInitializer.addSuccess:o.constantsS.processInitializer.editSuccess),o.data.eventChannel.emit({action:o.data.mode===_.X.ADD?c.K.SAVED:c.K.UPDATED,data:l}),o.eventCenterS.processInitializersSavedAndUpdate.next(!0),o.loading.form=!1}catch(l){o.loading.form=!1,o.ns.showErrorFromResponse(l.error||l,"Unable to save process initializer."),o.lastError=l.error,o.tab=o.tab||{},o.tab.axiosResponse={data:l.error},o.monacoS.highlightErrorInMonacoEditor(o.editorPI,o.tab,"MainSandbox.ts",o.monacoDecorations)}o.cd.detectChanges()})()}showInsertCodeModel(){this.generalCS.messageReceivedFor=I.r.All,this.insertCodeModalC.showModal(p.Z.ProcessInitializersFormC).then()}editorGenerated(o){var a=this;return(0,m.A)(function*(){a.editorPI=o,yield a.monacoS.loadSchemaEditorSettings(a.BE_HOST_PORT,a.authCS.getUserId(),null),a.monacoS.addSaveCodeKeyBinding(o,t=>{a.form.valid&&a.save()}),a.monacoS.addInsertCodeKeyBinding(o,t=>{a.generalCS.messageReceivedFor=I.r.All,a.data.mode!==_.X.VIEW&&a.insertCodeModalC.showModal(p.Z.ProcessInitializersFormC)}),a.subscriptions.push(a.generalS.messageReceived.subscribe(t=>{t.type&&t.type===v.R.TEXT_COPIED&&t.componentName===p.Z.ProcessInitializersFormC&&(a.monacoS.insertAtCursor(o,t.selectedText),a.insertCodeModalC.hideModal())}))})()}viewError(){this.viewDockerfileModelC.showModal(this.generalS.stringify(this.lastError),P.L.json)}ngOnDestroy(){this.generalS.unsubscribe(this.subscriptions),this.eventCenterS.processInitializersSavedAndUpdate.next(!1)}static \u0275fac=function(a){return new(a||r)(e.rXU(n.ok),e.rXU(O.m),e.rXU(M.f),e.rXU(g.X),e.rXU(T.o),e.rXU(R.l),e.rXU(F.e),e.rXU(S.J),e.rXU(A.d),e.rXU(M.f),e.rXU(b.N),e.rXU(e.gRc))};static \u0275cmp=e.VBU({type:r,selectors:[["app-process-initializers-form"]],viewQuery:function(a,t){if(1&a&&(e.GBs(W,5),e.GBs(G,5)),2&a){let i;e.mGM(i=e.lsd())&&(t.insertCodeModalC=i.first),e.mGM(i=e.lsd())&&(t.viewDockerfileModelC=i.first)}},inputs:{data:"data"},decls:32,vars:14,consts:[["aria-hidden","true","aria-labelledby","exampleModalLabel","id","idProcessInitializerForm","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/features/process-initializers.html","target","_blank"],["src","/assets/images/logo/logo_docs.svg",1,"fa-fw","ml-3","mr-1","mt-n2",2,"font-size","25px"],[1,"modal-body","overflow-auto"],["header","Basic Info"],["header","Code"],["class","overflow-hidden","style","height: calc(100vh - 206px);",4,"ngIf"],[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,"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,"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"],["class","mt-1px small",4,"ngIf"],["formControlName","order","name","order","spellcheck","false","type","number","placeholder","Please provide order",1,"form-control","form-control-sm"],["formControlName","processInitializerTimeoutInMinutes","name","processInitializerTimeoutInMinutes","spellcheck","false","type","number","placeholder","10",1,"form-control","form-control-sm"],[1,"mt-1px","small"],[1,"overflow-hidden",2,"height","calc(100vh - 206px)"],[3,"isSchemaEditor","editorOptions","editorGenerated"],["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(a,t){1&a&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),e.DNE(4,k,3,0,"span",4),e.DNE(5,N,3,0,"span",4),e.DNE(6,X,5,1,"span",4),e.j41(7,"div",5)(8,"button",6),e.bIt("click",function(){return t.hideModal()}),e.j41(9,"span",7),e.nrm(10,"i",8),e.k0s()(),e.j41(11,"span",9),e.bIt("click",function(){return t.showInsertCodeModel()}),e.nrm(12,"i",10),e.k0s(),e.j41(13,"a",11),e.nrm(14,"img",12),e.k0s()()(),e.j41(15,"div",13)(16,"p-tabView")(17,"p-tabPanel",14),e.DNE(18,x,18,2,"div",4),e.k0s(),e.j41(19,"p-tabPanel",15),e.DNE(20,Y,2,2,"div",16),e.k0s()()(),e.j41(21,"div",17),e.DNE(22,w,2,0,"a",18),e.j41(23,"button",19),e.bIt("click",function(){return t.hideModal()}),e.nrm(24,"i",20),e.EFF(25," Close"),e.k0s(),e.DNE(26,Q,4,3,"button",21),e.k0s(),e.DNE(27,Z,1,0,"p-progressSpinner",22),e.k0s()()(),e.nrm(28,"app-insert-code-modal",23,24)(30,"app-monaco-editor-modal",25,26)),2&a&&(e.R7$(4),e.Y8G("ngIf",t.data.mode===t.EFormMode.ADD),e.R7$(1),e.Y8G("ngIf",t.data.mode===t.EFormMode.VIEW),e.R7$(1),e.Y8G("ngIf",t.data.mode===t.EFormMode.EDIT),e.R7$(12),e.Y8G("ngIf",t.shouldLoadMonacoEditor),e.R7$(2),e.Y8G("ngIf",t.shouldLoadMonacoEditor),e.R7$(2),e.Y8G("ngIf",t.lastError),e.R7$(4),e.Y8G("ngIf",t.data.mode!==t.EFormMode.VIEW),e.R7$(1),e.Y8G("ngIf",t.loading.form),e.R7$(1),e.Y8G("frameId","idInsertCodeDbMig")("modalId","idInsertCodeDbMigForm")("docsHostPort",t.DOCS_HOST_PORT),e.R7$(2),e.Y8G("modalId","idMonacoEditorModalInSysProcessInitializer")("editorOptionsMonacoEditorModal",t.editorOptionsMonacoEditorModal)("modalTitle","Error info"))},dependencies:[n.qT,n.me,n.Q0,n.BC,n.cb,n.j4,n.JD,z.bT,U.U,y.V,B.A,L.p,D.JQ,D.Kp,K.m,j.J],encapsulation:2,changeDetection:0})}return r})()},7152:(C,E,s)=>{s.d(E,{s:()=>u});var m=s(7431),c=(s(846),s(2508)),_=s(540);let u=(()=>{class f{static \u0275fac=function(p){return new(p||f)};static \u0275mod=_.$C({type:f});static \u0275inj=_.G2t({imports:[m.u,c.v]})}return f})()}}]);