@runeya/runeya 1.0.8 → 1.0.14

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 (89) hide show
  1. package/LICENSE.md +29 -0
  2. package/README.md +75 -0
  3. package/node-red-contrib-runeya.tar +0 -0
  4. package/package.json +1 -11
  5. package/public/assets/App-Bzzr3d8D.js +101 -0
  6. package/public/assets/App-ClT0daRA.css +1 -0
  7. package/public/assets/CurrentEditor-BgkRP7cS.js +1 -0
  8. package/public/assets/Editor-BC23IeB6.css +1 -0
  9. package/public/assets/Editor-BqvrNzb6.js +37826 -0
  10. package/public/assets/ImportCreate-B-lRmpLH.js +1 -0
  11. package/public/assets/Init-D3C4n99F.js +1 -0
  12. package/public/assets/LeftLogo-E7dYCAWT.js +1 -0
  13. package/public/assets/Markdown-CqAPHaPe.css +1 -0
  14. package/public/assets/Markdown-dzyZ7CTg.js +109 -0
  15. package/public/assets/Overview-YtPSCN3k.js +1 -0
  16. package/public/assets/{Section-eAe-gcF2.css → Section-Dz0BsVYl.css} +1 -1
  17. package/public/assets/{Section-8ldEsJSi.js → Section-YBL4Pzic.js} +1 -1
  18. package/public/assets/{Settings-Bsf3R9hf.css → Settings-BBbk67zT.css} +1 -1
  19. package/public/assets/Settings-DJaMzLUX.js +495 -0
  20. package/public/assets/StackChooser-BnNrvv4Y.js +1 -0
  21. package/public/assets/StackChooser-DAAV0Rat.js +1 -0
  22. package/public/assets/StackMultiple-D0ozn0Tf.js +30 -0
  23. package/public/assets/StackSingle-CHHH2rXO.js +1 -0
  24. package/public/assets/StackSingle-DBZX9nN_.css +1 -0
  25. package/public/assets/Tabs-D9ZNelJj.js +1 -0
  26. package/public/assets/Tabs-fu2myJd9.css +1 -0
  27. package/public/assets/{cssMode-CUrSSrg6.js → cssMode-BEnNoAFz.js} +1 -1
  28. package/public/assets/{freemarker2-dec3WQLB.js → freemarker2-z8zA5ezm.js} +1 -1
  29. package/public/assets/{handlebars-Da_reGXs.js → handlebars-DTrkysaX.js} +1 -1
  30. package/public/assets/{html-DiMqDoaf.js → html-BiGIRkmo.js} +1 -1
  31. package/public/assets/{htmlMode-wRbKtV-5.js → htmlMode-CGj06Oa8.js} +1 -1
  32. package/public/assets/index-CqmUSPWF.css +5 -0
  33. package/public/assets/index-G1ob8hK0.js +264 -0
  34. package/public/assets/{javascript-ByCKYcx1.js → javascript-DEAY-G4N.js} +1 -1
  35. package/public/assets/{jsonMode-BQtLraFt.js → jsonMode-CLJTah_r.js} +1 -1
  36. package/public/assets/{liquid-Ig1gPJ1q.js → liquid-Bt_q9jyv.js} +1 -1
  37. package/public/assets/{mdx-CYaZVbeY.js → mdx-BtbMy52t.js} +1 -1
  38. package/public/assets/{python-H9Bd9rT3.js → python-DIVYbK-C.js} +1 -1
  39. package/public/assets/{razor-Hy2I2roR.js → razor-ztrk2wBu.js} +1 -1
  40. package/public/assets/router-B2S_D5pC.js +4232 -0
  41. package/public/assets/router-imsD-DjM.css +32 -0
  42. package/public/assets/system-DYhoWbZ1.js +1 -0
  43. package/public/assets/{tsMode-C0bgKAt8.js → tsMode-Fc-Kxr3a.js} +1 -1
  44. package/public/assets/{typescript-B77iTojx.js → typescript-CHa_3xkF.js} +1 -1
  45. package/public/assets/{xml-uQhiANeS.js → xml-B2WXRoPu.js} +1 -1
  46. package/public/assets/{yaml-2OwCXstu.js → yaml-6vYkUkh3.js} +1 -1
  47. package/public/index.html +1 -1
  48. package/runeya.vsix +0 -0
  49. package/www.js +596 -2517
  50. package/www.js.map +1 -1
  51. package/public/assets/App-BE-jCGXm.css +0 -5
  52. package/public/assets/App-Bu4vGxO4.js +0 -94
  53. package/public/assets/CurrentEditor-yQstAvnQ.js +0 -1
  54. package/public/assets/Editor-BK8NbiL6.css +0 -1
  55. package/public/assets/Editor-DjNB5m3y.js +0 -721
  56. package/public/assets/ImportCreate-BkVY0Snd.js +0 -1
  57. package/public/assets/Init-PS5FZlf7.js +0 -1
  58. package/public/assets/LeftLogo-EmzH7l46.js +0 -1
  59. package/public/assets/Markdown-CpEumaO9.js +0 -103
  60. package/public/assets/Markdown-pSjwyqay.css +0 -1
  61. package/public/assets/Overview-BhYJL4nA.js +0 -1
  62. package/public/assets/Settings-bKLH4HnT.js +0 -188
  63. package/public/assets/StackChooser-CmoqSd4m.js +0 -1
  64. package/public/assets/StackChooser-D5EY2Av8.js +0 -1
  65. package/public/assets/StackMultiple-o8pd1Nmf.js +0 -1
  66. package/public/assets/StackSingle-BzrRRE-y.js +0 -1
  67. package/public/assets/StackSingle-DWbIQbAl.css +0 -1
  68. package/public/assets/Tabs-CZAdcV0_.css +0 -1
  69. package/public/assets/Tabs-Cpjfv5wC.js +0 -1
  70. package/public/assets/axios-BZk75tkI.js +0 -6
  71. package/public/assets/css.worker-7uusSYJx.js +0 -84
  72. package/public/assets/editor.worker-C6wdibMX.js +0 -11
  73. package/public/assets/fa-brands-400-C99Yv4gD.woff2 +0 -0
  74. package/public/assets/fa-brands-400-DtZKBM2a.ttf +0 -0
  75. package/public/assets/fa-regular-400-BMFokQJ2.ttf +0 -0
  76. package/public/assets/fa-regular-400-OOsPf1xj.woff2 +0 -0
  77. package/public/assets/fa-solid-900-DAI24fNt.woff2 +0 -0
  78. package/public/assets/fa-solid-900-DM0teJdg.ttf +0 -0
  79. package/public/assets/fa-v4compatibility-F0dlVTLQ.ttf +0 -0
  80. package/public/assets/fa-v4compatibility-aR9vOKaP.woff2 +0 -0
  81. package/public/assets/html.worker-BGQnBRGr.js +0 -458
  82. package/public/assets/index-DUMOL4cy.css +0 -1
  83. package/public/assets/index-aZm7xMRp.js +0 -233
  84. package/public/assets/json.worker-Be5ebZoT.js +0 -42
  85. package/public/assets/router-DdnNyrCa.css +0 -32
  86. package/public/assets/router-ZJYrvDkp.js +0 -4962
  87. package/public/assets/system-DC3M5FtK.js +0 -1
  88. package/public/assets/ts.worker-Dap_1Gm7.js +0 -37021
  89. package/public/assets/vue.runtime.esm-bundler-VmRDinbK.js +0 -9
@@ -0,0 +1,495 @@
1
+ import{y as de,B as ce,a as h,o as p,g as L,I as $,h as j,r as k,j as J,S as se,K as pe,e as r,f as c,F as M,q,b as d,s as C,d as z,L as a,t as E,p as ie,k as D,ag as Re,ah as De,ai as Ue,a5 as Be,aj as Ae,ak as ae,al as Ke,l as oe,H as ue,T as Ce,G as Ne,m as ge,n as Se,aS as qe,c as Pe,b2 as He,w as ze,by as Ze,bz as Q,bA as ve,bB as Fe}from"./index-G1ob8hK0.js";import{P as We,_ as B}from"./Section-YBL4Pzic.js";import{S as _e,a as O,g as ee,e as Ge,s as U,l as Ye,M as K,m as Ie,o as R,n as P,q as Ve,r as Je,O as Qe,u as me,t as Xe,v as et,w as tt,x as st,R as ot,h as ne,y as Ee,i as Oe,z as X,A as ye,B as nt,C as at,b as lt}from"./router-B2S_D5pC.js";import{s as Le,b as H,a as te,d as rt}from"./Markdown-dzyZ7CTg.js";import{_ as A}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{C as it}from"./CurrentEditor-BgkRP7cS.js";import"./Editor-BqvrNzb6.js";var ut=de`
2
+ .p-divider-horizontal {
3
+ display: flex;
4
+ width: 100%;
5
+ position: relative;
6
+ align-items: center;
7
+ margin: dt('divider.horizontal.margin');
8
+ padding: dt('divider.horizontal.padding');
9
+ }
10
+
11
+ .p-divider-horizontal:before {
12
+ position: absolute;
13
+ display: block;
14
+ inset-block-start: 50%;
15
+ inset-inline-start: 0;
16
+ width: 100%;
17
+ content: '';
18
+ border-block-start: 1px solid dt('divider.border.color');
19
+ }
20
+
21
+ .p-divider-horizontal .p-divider-content {
22
+ padding: dt('divider.horizontal.content.padding');
23
+ }
24
+
25
+ .p-divider-vertical {
26
+ min-height: 100%;
27
+ display: flex;
28
+ position: relative;
29
+ justify-content: center;
30
+ margin: dt('divider.vertical.margin');
31
+ padding: dt('divider.vertical.padding');
32
+ }
33
+
34
+ .p-divider-vertical:before {
35
+ position: absolute;
36
+ display: block;
37
+ inset-block-start: 0;
38
+ inset-inline-start: 50%;
39
+ height: 100%;
40
+ content: '';
41
+ border-inline-start: 1px solid dt('divider.border.color');
42
+ }
43
+
44
+ .p-divider.p-divider-vertical .p-divider-content {
45
+ padding: dt('divider.vertical.content.padding');
46
+ }
47
+
48
+ .p-divider-content {
49
+ z-index: 1;
50
+ background: dt('divider.content.background');
51
+ color: dt('divider.content.color');
52
+ }
53
+
54
+ .p-divider-solid.p-divider-horizontal:before {
55
+ border-block-start-style: solid;
56
+ }
57
+
58
+ .p-divider-solid.p-divider-vertical:before {
59
+ border-inline-start-style: solid;
60
+ }
61
+
62
+ .p-divider-dashed.p-divider-horizontal:before {
63
+ border-block-start-style: dashed;
64
+ }
65
+
66
+ .p-divider-dashed.p-divider-vertical:before {
67
+ border-inline-start-style: dashed;
68
+ }
69
+
70
+ .p-divider-dotted.p-divider-horizontal:before {
71
+ border-block-start-style: dotted;
72
+ }
73
+
74
+ .p-divider-dotted.p-divider-vertical:before {
75
+ border-inline-start-style: dotted;
76
+ }
77
+
78
+ .p-divider-left:dir(rtl),
79
+ .p-divider-right:dir(rtl) {
80
+ flex-direction: row-reverse;
81
+ }
82
+ `,dt={root:function(t){var s=t.props;return{justifyContent:s.layout==="horizontal"?s.align==="center"||s.align===null?"center":s.align==="left"?"flex-start":s.align==="right"?"flex-end":null:null,alignItems:s.layout==="vertical"?s.align==="center"||s.align===null?"center":s.align==="top"?"flex-start":s.align==="bottom"?"flex-end":null:null}}},ct={root:function(t){var s=t.props;return["p-divider p-component","p-divider-"+s.layout,"p-divider-"+s.type,{"p-divider-left":s.layout==="horizontal"&&(!s.align||s.align==="left")},{"p-divider-center":s.layout==="horizontal"&&s.align==="center"},{"p-divider-right":s.layout==="horizontal"&&s.align==="right"},{"p-divider-top":s.layout==="vertical"&&s.align==="top"},{"p-divider-center":s.layout==="vertical"&&(!s.align||s.align==="center")},{"p-divider-bottom":s.layout==="vertical"&&s.align==="bottom"}]},content:"p-divider-content"},pt=ce.extend({name:"divider",style:ut,classes:ct,inlineStyles:dt}),mt={name:"BaseDivider",extends:Le,props:{align:{type:String,default:null},layout:{type:String,default:"horizontal"},type:{type:String,default:"solid"}},style:pt,provide:function(){return{$pcDivider:this,$parentInstance:this}}};function Z(e){"@babel/helpers - typeof";return Z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Z(e)}function le(e,t,s){return(t=ft(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function ft(e){var t=gt(e,"string");return Z(t)=="symbol"?t:t+""}function gt(e,t){if(Z(e)!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var n=s.call(e,t);if(Z(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var fe={name:"Divider",extends:mt,inheritAttrs:!1,computed:{dataP:function(){return H(le(le(le({},this.align,this.align),this.layout,this.layout),this.type,this.type))}}},vt=["aria-orientation","data-p"],yt=["data-p"];function bt(e,t,s,n,f,i){return p(),h("div",$({class:e.cx("root"),style:e.sx("root"),role:"separator","aria-orientation":e.layout,"data-p":i.dataP},e.ptmi("root")),[e.$slots.default?(p(),h("div",$({key:0,class:e.cx("content"),"data-p":i.dataP},e.ptm("content")),[j(e.$slots,"default")],16,yt)):L("",!0)],16,vt)}fe.render=bt;const ht={class:"line"},wt={class:"line"},kt={class:"text"},$t={__name:"Environments",setup(e){const t=k("");function s(u,o){u.envs[o]="",t.value=""}async function n(u){await S.value[u.label].open().promise}const f=k(!1),i=k("");function y(u){f.value||(i.value=`# key=value
83
+ ${Object.keys(u.envs).map(o=>`${o}=${u.envs[o]}`).sort((o,l)=>o.localeCompare(l)).join(`
84
+ `)}
85
+ `),f.value=!f.value}function w(u){u.envs={},i.value.split(`
86
+ `).filter(o=>!o.trim().startsWith("#")&&o.trim()).forEach(o=>{const[l,...V]=o.split("=");u.envs[l]=V.join("=")})}function _(u){return Object.keys(u).map(o=>({key:o,value:u[o]})).filter(({key:o})=>!o.endsWith("_RUNEYA_OVERRIDE"))}const S=k({}),I=k([]);J(async()=>{se.on("reloadEnvironments",x),x()}),pe(()=>{se.off("reloadEnvironments",x)});async function x(){I.value=await _e.getEnvironments()}async function v(u){setTimeout(async()=>{u.default&&I.value.forEach(o=>{o.label!==u.label&&(o.default=!1,v(o))}),await D.patch(`/stack/environments/${u.label}`,u).then(()=>P.next("success","Environment saved")).catch(()=>P.next("success","Environment cant be saved"))},100)}const b=k();async function g(u){await b.value.open().promise&&await D.delete(`/stack/environments/${u.label}`,u).then(()=>P.next("success","Environment deleted")).catch(()=>P.next("success","Environment cant be deleted"))}return(u,o)=>(p(),h(M,null,[r(B,{header:"Environments"},{default:c(()=>[(p(!0),h(M,null,q(I.value,(l,V)=>(p(),h("div",{key:l.label,class:"environment column"},[d("h3",null,[r(a(O),{size:"small",severity:"danger",icon:"fas fa-trash",onClick:m=>g(l)},null,8,["onClick"]),z(" "+E(l.label),1)]),d("div",null,[r(a(ee),null,{default:c(()=>[r(a(Ge),{size:"small",modelValue:l.extends[0],"onUpdate:modelValue":m=>l.extends[0]=m,options:["",...I.value.filter(m=>m.label!==l.label).map(m=>m.label)],onBlur:m=>v(l),fluid:"",placeholder:"Choose an environment"},null,8,["modelValue","onUpdate:modelValue","options","onBlur"]),o[2]||(o[2]=d("label",null,"Extend from",-1))]),_:2,__:[2]},1024),r(a(ee),null,{default:c(()=>[r(a(U),{size:"small",fluid:"",modelValue:l.color,"onUpdate:modelValue":m=>l.color=m,onBlur:m=>v(l),onKeypress:ie(m=>v(l),["enter"])},null,8,["modelValue","onUpdate:modelValue","onBlur","onKeypress"]),o[3]||(o[3]=d("label",null,"Color: ",-1))]),_:2,__:[3]},1024)]),d("div",null,[r(a(ee),null,{default:c(()=>[o[4]||(o[4]=d("label",null,"Background: ",-1)),r(a(U),{size:"small",fluid:"",modelValue:l.bgColor,"onUpdate:modelValue":m=>l.bgColor=m,onBlur:m=>v(l),onKeypress:ie(m=>v(l),["enter"])},null,8,["modelValue","onUpdate:modelValue","onBlur","onKeypress"])]),_:2,__:[4]},1024)]),d("div",ht,[r(a(Ye),{size:"small",modelValue:l.default,"onUpdate:modelValue":m=>l.default=m,onClick:m=>v(l)},null,8,["modelValue","onUpdate:modelValue","onClick"]),o[5]||(o[5]=d("label",null,"Default",-1))]),r(a(O),{label:"Envs",size:"small",onClick:m=>n(l)},null,8,["onClick"]),I.value[V+1]?(p(),C(a(fe),{key:0})):L("",!0),r(K,{ref_for:!0,ref:m=>S.value[l.label]=m,noScroll:!1,noCancel:!0,validateString:"Close"},{body:c(()=>[d("div",wt,[d("div",null,[f.value?L("",!0):(p(),C(a(U),{key:0,placeholder:"Add new variable",onChange:m=>s(l,m.target.value),modelValue:t.value,"onUpdate:modelValue":o[0]||(o[0]=m=>t.value=m)},null,8,["onChange","modelValue"]))]),r(a(O),{label:f.value?"Import view":"Env view",onClick:m=>y(l)},null,8,["label","onClick"])]),f.value?(p(),C(a(te),{key:1,modelValue:i.value,"onUpdate:modelValue":o[1]||(o[1]=m=>i.value=m),onInput:m=>w(l),onBlur:m=>v(l)},null,8,["modelValue","onInput","onBlur"])):(p(),C(a(Ie),{key:0,scrollable:"",class:"datatable",size:"small",sortField:"key",sortOrder:1,"resizable-columns":!0,value:_(l.envs),tableStyle:"width: 100%;"},{default:c(()=>[r(a(R),{field:"action",header:"",col:"",style:{width:"20px"},pt:{bodyCell:{style:{verticalAlign:"middle"}}}},{body:c(({data:m})=>[r(a(O),{size:"small",onClick:T=>delete l.envs[m.key]},{default:c(()=>o[6]||(o[6]=[d("i",{class:"fas fa-times"},null,-1)])),_:2,__:[6]},1032,["onClick"])]),_:2},1024),r(a(R),{field:"key",header:"Key",col:"",colspan:1,style:{"max-width":"5rem"},pt:{bodyCell:{style:{verticalAlign:"middle"}}}},{body:c(({data:m,field:T})=>[r(We,{appendTo:"parent",trigger:"mouseenter",placement:"top"},{trigger:c(()=>[z(E(m[T]),1)]),content:c(()=>[d("span",kt,E(m[T]),1)]),_:2},1024)]),_:1}),r(a(R),{field:"value",header:"Value",colspan:16,col:"",pt:{bodyCell:{style:{verticalAlign:"middle"}}}},{body:c(({data:m,field:T})=>[r(a(U),{modelValue:l.envs[m.key],"onUpdate:modelValue":N=>l.envs[m.key]=N,onBlur:N=>v(l),fluid:""},null,8,["modelValue","onUpdate:modelValue","onBlur"])]),_:2},1024),r(a(R),{field:"value",header:"Override",colspan:16,col:"",pt:{bodyCell:{style:{verticalAlign:"middle"}}}},{body:c(({data:m,field:T})=>[r(a(U),{modelValue:l.envs[m.key+"_RUNEYA_OVERRIDE"],"onUpdate:modelValue":N=>l.envs[m.key+"_RUNEYA_OVERRIDE"]=N,onBlur:N=>v(l),fluid:""},null,8,["modelValue","onUpdate:modelValue","onBlur"])]),_:2},1024)]),_:2},1032,["value"]))]),_:2},1536)]))),128))]),_:1}),r(K,{ref_key:"modalDeleteRef",ref:b,"validate-string":"Delete"},{body:c(()=>o[7]||(o[7]=[z(" Are you sure you want to delete this environment? ")])),_:1},512)],64))}},Ct=A($t,[["__scopeId","data-v-d721cb7f"]]);var Te={name:"EyeIcon",extends:Ve};function St(e,t,s,n,f,i){return p(),h("svg",$({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.pti()),t[0]||(t[0]=[d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.0535499 7.25213C0.208567 7.59162 2.40413 12.4 7 12.4C11.5959 12.4 13.7914 7.59162 13.9465 7.25213C13.9487 7.2471 13.9506 7.24304 13.952 7.24001C13.9837 7.16396 14 7.08239 14 7.00001C14 6.91762 13.9837 6.83605 13.952 6.76001C13.9506 6.75697 13.9487 6.75292 13.9465 6.74788C13.7914 6.4084 11.5959 1.60001 7 1.60001C2.40413 1.60001 0.208567 6.40839 0.0535499 6.74788C0.0512519 6.75292 0.0494023 6.75697 0.048 6.76001C0.0163137 6.83605 0 6.91762 0 7.00001C0 7.08239 0.0163137 7.16396 0.048 7.24001C0.0494023 7.24304 0.0512519 7.2471 0.0535499 7.25213ZM7 11.2C3.664 11.2 1.736 7.92001 1.264 7.00001C1.736 6.08001 3.664 2.80001 7 2.80001C10.336 2.80001 12.264 6.08001 12.736 7.00001C12.264 7.92001 10.336 11.2 7 11.2ZM5.55551 9.16182C5.98308 9.44751 6.48576 9.6 7 9.6C7.68891 9.59789 8.349 9.32328 8.83614 8.83614C9.32328 8.349 9.59789 7.68891 9.59999 7C9.59999 6.48576 9.44751 5.98308 9.16182 5.55551C8.87612 5.12794 8.47006 4.7947 7.99497 4.59791C7.51988 4.40112 6.99711 4.34963 6.49276 4.44995C5.98841 4.55027 5.52513 4.7979 5.16152 5.16152C4.7979 5.52513 4.55027 5.98841 4.44995 6.49276C4.34963 6.99711 4.40112 7.51988 4.59791 7.99497C4.7947 8.47006 5.12794 8.87612 5.55551 9.16182ZM6.2222 5.83594C6.45243 5.6821 6.7231 5.6 7 5.6C7.37065 5.6021 7.72553 5.75027 7.98762 6.01237C8.24972 6.27446 8.39789 6.62934 8.4 7C8.4 7.27689 8.31789 7.54756 8.16405 7.77779C8.01022 8.00802 7.79157 8.18746 7.53575 8.29343C7.27994 8.39939 6.99844 8.42711 6.72687 8.37309C6.4553 8.31908 6.20584 8.18574 6.01005 7.98994C5.81425 7.79415 5.68091 7.54469 5.6269 7.27312C5.57288 7.00155 5.6006 6.72006 5.70656 6.46424C5.81253 6.20842 5.99197 5.98977 6.2222 5.83594Z",fill:"currentColor"},null,-1)]),16)}Te.render=St;var xe={name:"EyeSlashIcon",extends:Ve};function Pt(e,t,s,n,f,i){return p(),h("svg",$({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.pti()),t[0]||(t[0]=[d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.9414 6.74792C13.9437 6.75295 13.9455 6.757 13.9469 6.76003C13.982 6.8394 14.0001 6.9252 14.0001 7.01195C14.0001 7.0987 13.982 7.1845 13.9469 7.26386C13.6004 8.00059 13.1711 8.69549 12.6674 9.33515C12.6115 9.4071 12.54 9.46538 12.4582 9.50556C12.3765 9.54574 12.2866 9.56678 12.1955 9.56707C12.0834 9.56671 11.9737 9.53496 11.8788 9.47541C11.7838 9.41586 11.7074 9.3309 11.6583 9.23015C11.6092 9.12941 11.5893 9.01691 11.6008 8.90543C11.6124 8.79394 11.6549 8.68793 11.7237 8.5994C12.1065 8.09726 12.4437 7.56199 12.7313 6.99995C12.2595 6.08027 10.3402 2.8014 6.99732 2.8014C6.63723 2.80218 6.27816 2.83969 5.92569 2.91336C5.77666 2.93304 5.62568 2.89606 5.50263 2.80972C5.37958 2.72337 5.29344 2.59398 5.26125 2.44714C5.22907 2.30031 5.2532 2.14674 5.32885 2.01685C5.40451 1.88696 5.52618 1.79021 5.66978 1.74576C6.10574 1.64961 6.55089 1.60134 6.99732 1.60181C11.5916 1.60181 13.7864 6.40856 13.9414 6.74792ZM2.20333 1.61685C2.35871 1.61411 2.5091 1.67179 2.6228 1.77774L12.2195 11.3744C12.3318 11.4869 12.3949 11.6393 12.3949 11.7983C12.3949 11.9572 12.3318 12.1097 12.2195 12.2221C12.107 12.3345 11.9546 12.3976 11.7956 12.3976C11.6367 12.3976 11.4842 12.3345 11.3718 12.2221L10.5081 11.3584C9.46549 12.0426 8.24432 12.4042 6.99729 12.3981C2.403 12.3981 0.208197 7.59135 0.0532336 7.25198C0.0509364 7.24694 0.0490875 7.2429 0.0476856 7.23986C0.0162332 7.16518 3.05176e-05 7.08497 3.05176e-05 7.00394C3.05176e-05 6.92291 0.0162332 6.8427 0.0476856 6.76802C0.631261 5.47831 1.46902 4.31959 2.51084 3.36119L1.77509 2.62545C1.66914 2.51175 1.61146 2.36136 1.61421 2.20597C1.61695 2.05059 1.6799 1.90233 1.78979 1.79244C1.89968 1.68254 2.04794 1.6196 2.20333 1.61685ZM7.45314 8.35147L5.68574 6.57609V6.5361C5.5872 6.78938 5.56498 7.06597 5.62183 7.33173C5.67868 7.59749 5.8121 7.84078 6.00563 8.03158C6.19567 8.21043 6.43052 8.33458 6.68533 8.39089C6.94014 8.44721 7.20543 8.43359 7.45314 8.35147ZM1.26327 6.99994C1.7351 7.91163 3.64645 11.1985 6.99729 11.1985C7.9267 11.2048 8.8408 10.9618 9.64438 10.4947L8.35682 9.20718C7.86027 9.51441 7.27449 9.64491 6.69448 9.57752C6.11446 9.51014 5.57421 9.24881 5.16131 8.83592C4.74842 8.42303 4.4871 7.88277 4.41971 7.30276C4.35232 6.72274 4.48282 6.13697 4.79005 5.64041L3.35855 4.2089C2.4954 5.00336 1.78523 5.94935 1.26327 6.99994Z",fill:"currentColor"},null,-1)]),16)}xe.render=Pt;var zt=de`
87
+ .p-password {
88
+ display: inline-flex;
89
+ position: relative;
90
+ }
91
+
92
+ .p-password .p-password-overlay {
93
+ min-width: 100%;
94
+ }
95
+
96
+ .p-password-meter {
97
+ height: dt('password.meter.height');
98
+ background: dt('password.meter.background');
99
+ border-radius: dt('password.meter.border.radius');
100
+ }
101
+
102
+ .p-password-meter-label {
103
+ height: 100%;
104
+ width: 0;
105
+ transition: width 1s ease-in-out;
106
+ border-radius: dt('password.meter.border.radius');
107
+ }
108
+
109
+ .p-password-meter-weak {
110
+ background: dt('password.strength.weak.background');
111
+ }
112
+
113
+ .p-password-meter-medium {
114
+ background: dt('password.strength.medium.background');
115
+ }
116
+
117
+ .p-password-meter-strong {
118
+ background: dt('password.strength.strong.background');
119
+ }
120
+
121
+ .p-password-fluid {
122
+ display: flex;
123
+ }
124
+
125
+ .p-password-fluid .p-password-input {
126
+ width: 100%;
127
+ }
128
+
129
+ .p-password-input::-ms-reveal,
130
+ .p-password-input::-ms-clear {
131
+ display: none;
132
+ }
133
+
134
+ .p-password-overlay {
135
+ padding: dt('password.overlay.padding');
136
+ background: dt('password.overlay.background');
137
+ color: dt('password.overlay.color');
138
+ border: 1px solid dt('password.overlay.border.color');
139
+ box-shadow: dt('password.overlay.shadow');
140
+ border-radius: dt('password.overlay.border.radius');
141
+ }
142
+
143
+ .p-password-content {
144
+ display: flex;
145
+ flex-direction: column;
146
+ gap: dt('password.content.gap');
147
+ }
148
+
149
+ .p-password-toggle-mask-icon {
150
+ inset-inline-end: dt('form.field.padding.x');
151
+ color: dt('password.icon.color');
152
+ position: absolute;
153
+ top: 50%;
154
+ margin-top: calc(-1 * calc(dt('icon.size') / 2));
155
+ width: dt('icon.size');
156
+ height: dt('icon.size');
157
+ }
158
+
159
+ .p-password:has(.p-password-toggle-mask-icon) .p-password-input {
160
+ padding-inline-end: calc((dt('form.field.padding.x') * 2) + dt('icon.size'));
161
+ }
162
+ `,_t={root:function(t){var s=t.props;return{position:s.appendTo==="self"?"relative":void 0}}},It={root:function(t){var s=t.instance;return["p-password p-component p-inputwrapper",{"p-inputwrapper-filled":s.$filled,"p-inputwrapper-focus":s.focused,"p-password-fluid":s.$fluid}]},pcInputText:"p-password-input",maskIcon:"p-password-toggle-mask-icon p-password-mask-icon",unmaskIcon:"p-password-toggle-mask-icon p-password-unmask-icon",overlay:"p-password-overlay p-component",content:"p-password-content",meter:"p-password-meter",meterLabel:function(t){var s=t.instance;return"p-password-meter-label ".concat(s.meter?"p-password-meter-"+s.meter.strength:"")},meterText:"p-password-meter-text"},Vt=ce.extend({name:"password",style:zt,classes:It,inlineStyles:_t}),Et={name:"BasePassword",extends:rt,props:{promptLabel:{type:String,default:null},mediumRegex:{type:[String,RegExp],default:"^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})"},strongRegex:{type:[String,RegExp],default:"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})"},weakLabel:{type:String,default:null},mediumLabel:{type:String,default:null},strongLabel:{type:String,default:null},feedback:{type:Boolean,default:!0},appendTo:{type:[String,Object],default:"body"},toggleMask:{type:Boolean,default:!1},hideIcon:{type:String,default:void 0},maskIcon:{type:String,default:void 0},showIcon:{type:String,default:void 0},unmaskIcon:{type:String,default:void 0},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:null},required:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelId:{type:String,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},overlayId:{type:String,default:null},overlayClass:{type:[String,Object],default:null},overlayStyle:{type:Object,default:null},overlayProps:{type:null,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null},autofocus:{type:Boolean,default:null}},style:Vt,provide:function(){return{$pcPassword:this,$parentInstance:this}}};function F(e){"@babel/helpers - typeof";return F=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},F(e)}function be(e,t,s){return(t=Ot(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function Ot(e){var t=Lt(e,"string");return F(t)=="symbol"?t:t+""}function Lt(e,t){if(F(e)!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var n=s.call(e,t);if(F(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var je={name:"Password",extends:Et,inheritAttrs:!1,emits:["change","focus","blur","invalid"],inject:{$pcFluid:{default:null}},data:function(){return{overlayVisible:!1,meter:null,infoText:null,focused:!1,unmasked:!1}},mediumCheckRegExp:null,strongCheckRegExp:null,resizeListener:null,scrollHandler:null,overlay:null,mounted:function(){this.infoText=this.promptText,this.mediumCheckRegExp=new RegExp(this.mediumRegex),this.strongCheckRegExp=new RegExp(this.strongRegex)},beforeUnmount:function(){this.unbindResizeListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(ae.clear(this.overlay),this.overlay=null)},methods:{onOverlayEnter:function(t){ae.set("overlay",t,this.$primevue.config.zIndex.overlay),Ke(t,{position:"absolute",top:"0"}),this.alignOverlay(),this.bindScrollListener(),this.bindResizeListener(),this.$attrSelector&&t.setAttribute(this.$attrSelector,"")},onOverlayLeave:function(){this.unbindScrollListener(),this.unbindResizeListener(),this.overlay=null},onOverlayAfterLeave:function(t){ae.clear(t)},alignOverlay:function(){this.appendTo==="self"?Ue(this.overlay,this.$refs.input.$el):(this.overlay.style.minWidth=Be(this.$refs.input.$el)+"px",Ae(this.overlay,this.$refs.input.$el))},testStrength:function(t){var s=0;return this.strongCheckRegExp.test(t)?s=3:this.mediumCheckRegExp.test(t)?s=2:t.length&&(s=1),s},onInput:function(t){this.writeValue(t.target.value,t),this.$emit("change",t)},onFocus:function(t){this.focused=!0,this.feedback&&(this.setPasswordMeter(this.d_value),this.overlayVisible=!0),this.$emit("focus",t)},onBlur:function(t){this.focused=!1,this.feedback&&(this.overlayVisible=!1),this.$emit("blur",t)},onKeyUp:function(t){if(this.feedback){var s=t.target.value,n=this.checkPasswordStrength(s),f=n.meter,i=n.label;if(this.meter=f,this.infoText=i,t.code==="Escape"){this.overlayVisible&&(this.overlayVisible=!1);return}this.overlayVisible||(this.overlayVisible=!0)}},setPasswordMeter:function(){if(!this.d_value){this.meter=null,this.infoText=this.promptText;return}var t=this.checkPasswordStrength(this.d_value),s=t.meter,n=t.label;this.meter=s,this.infoText=n,this.overlayVisible||(this.overlayVisible=!0)},checkPasswordStrength:function(t){var s=null,n=null;switch(this.testStrength(t)){case 1:s=this.weakText,n={strength:"weak",width:"33.33%"};break;case 2:s=this.mediumText,n={strength:"medium",width:"66.66%"};break;case 3:s=this.strongText,n={strength:"strong",width:"100%"};break;default:s=this.promptText,n=null;break}return{label:s,meter:n}},onInvalid:function(t){this.$emit("invalid",t)},bindScrollListener:function(){var t=this;this.scrollHandler||(this.scrollHandler=new De(this.$refs.input.$el,function(){t.overlayVisible&&(t.overlayVisible=!1)})),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var t=this;this.resizeListener||(this.resizeListener=function(){t.overlayVisible&&!Re()&&(t.overlayVisible=!1)},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},overlayRef:function(t){this.overlay=t},onMaskToggle:function(){this.unmasked=!this.unmasked},onOverlayClick:function(t){Qe.emit("overlay-click",{originalEvent:t,target:this.$el})}},computed:{inputType:function(){return this.unmasked?"text":"password"},weakText:function(){return this.weakLabel||this.$primevue.config.locale.weak},mediumText:function(){return this.mediumLabel||this.$primevue.config.locale.medium},strongText:function(){return this.strongLabel||this.$primevue.config.locale.strong},promptText:function(){return this.promptLabel||this.$primevue.config.locale.passwordPrompt},overlayUniqueId:function(){return this.$id+"_overlay"},containerDataP:function(){return H({fluid:this.$fluid})},meterDataP:function(){var t,s;return H(be({},(t=this.meter)===null||t===void 0?void 0:t.strength,(s=this.meter)===null||s===void 0?void 0:s.strength))},overlayDataP:function(){return H(be({},"portal-"+this.appendTo,"portal-"+this.appendTo))}},components:{InputText:U,Portal:Je,EyeSlashIcon:xe,EyeIcon:Te}};function W(e){"@babel/helpers - typeof";return W=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},W(e)}function he(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(f){return Object.getOwnPropertyDescriptor(e,f).enumerable})),s.push.apply(s,n)}return s}function re(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?he(Object(s),!0).forEach(function(n){Tt(e,n,s[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):he(Object(s)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(s,n))})}return e}function Tt(e,t,s){return(t=xt(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function xt(e){var t=jt(e,"string");return W(t)=="symbol"?t:t+""}function jt(e,t){if(W(e)!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var n=s.call(e,t);if(W(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Mt=["data-p"],Rt=["id","data-p"],Dt=["data-p"];function Ut(e,t,s,n,f,i){var y=oe("InputText"),w=oe("Portal");return p(),h("div",$({class:e.cx("root"),style:e.sx("root"),"data-p":i.containerDataP},e.ptmi("root")),[r(y,$({ref:"input",id:e.inputId,type:i.inputType,class:[e.cx("pcInputText"),e.inputClass],style:e.inputStyle,defaultValue:e.d_value,name:e.$formName,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-controls":e.overlayProps&&e.overlayProps.id||e.overlayId||e.panelProps&&e.panelProps.id||e.panelId||i.overlayUniqueId,"aria-haspopup":!0,placeholder:e.placeholder,required:e.required,fluid:e.fluid,disabled:e.disabled,variant:e.variant,invalid:e.invalid,size:e.size,autofocus:e.autofocus,onInput:i.onInput,onFocus:i.onFocus,onBlur:i.onBlur,onKeyup:i.onKeyUp,onInvalid:i.onInvalid},e.inputProps,{"data-p-has-e-icon":e.toggleMask,pt:e.ptm("pcInputText"),unstyled:e.unstyled}),null,16,["id","type","class","style","defaultValue","name","aria-labelledby","aria-label","aria-controls","placeholder","required","fluid","disabled","variant","invalid","size","autofocus","onInput","onFocus","onBlur","onKeyup","onInvalid","data-p-has-e-icon","pt","unstyled"]),e.toggleMask&&f.unmasked?j(e.$slots,e.$slots.maskicon?"maskicon":"hideicon",$({key:0,toggleCallback:i.onMaskToggle,class:[e.cx("maskIcon"),e.maskIcon]},e.ptm("maskIcon")),function(){return[(p(),C(ue(e.maskIcon?"i":"EyeSlashIcon"),$({class:[e.cx("maskIcon"),e.maskIcon],onClick:i.onMaskToggle},e.ptm("maskIcon")),null,16,["class","onClick"]))]}):L("",!0),e.toggleMask&&!f.unmasked?j(e.$slots,e.$slots.unmaskicon?"unmaskicon":"showicon",$({key:1,toggleCallback:i.onMaskToggle,class:[e.cx("unmaskIcon")]},e.ptm("unmaskIcon")),function(){return[(p(),C(ue(e.unmaskIcon?"i":"EyeIcon"),$({class:[e.cx("unmaskIcon"),e.unmaskIcon],onClick:i.onMaskToggle},e.ptm("unmaskIcon")),null,16,["class","onClick"]))]}):L("",!0),d("span",$({class:"p-hidden-accessible","aria-live":"polite"},e.ptm("hiddenAccesible"),{"data-p-hidden-accessible":!0}),E(f.infoText),17),r(w,{appendTo:e.appendTo},{default:c(function(){return[r(Ce,$({name:"p-connected-overlay",onEnter:i.onOverlayEnter,onLeave:i.onOverlayLeave,onAfterLeave:i.onOverlayAfterLeave},e.ptm("transition")),{default:c(function(){return[f.overlayVisible?(p(),h("div",$({key:0,ref:i.overlayRef,id:e.overlayId||e.panelId||i.overlayUniqueId,class:[e.cx("overlay"),e.panelClass,e.overlayClass],style:[e.overlayStyle,e.panelStyle],onClick:t[0]||(t[0]=function(){return i.onOverlayClick&&i.onOverlayClick.apply(i,arguments)}),"data-p":i.overlayDataP,role:"dialog","aria-live":"polite"},re(re(re({},e.panelProps),e.overlayProps),e.ptm("overlay"))),[j(e.$slots,"header"),j(e.$slots,"content",{},function(){return[d("div",$({class:e.cx("content")},e.ptm("content")),[d("div",$({class:e.cx("meter")},e.ptm("meter")),[d("div",$({class:e.cx("meterLabel"),style:{width:f.meter?f.meter.width:""},"data-p":i.meterDataP},e.ptm("meterLabel")),null,16,Dt)],16),d("div",$({class:e.cx("meterText")},e.ptm("meterText")),E(f.infoText),17)],16)]}),j(e.$slots,"footer")],16,Rt)):L("",!0)]}),_:3},16,["onEnter","onLeave","onAfterLeave"])]}),_:3},8,["appendTo"])],16,Mt)}je.render=Ut;const Bt={class:"line"},At={class:"conflict-header"},Kt={class:"conflict-sections"},Nt={class:"conflict-section"},qt={class:"conflict-actions"},Ht={class:"conflict-section"},Zt={class:"resolution-section"},Ft={__name:"Crypto",setup(e){const t=me(),s=k(""),n=k(""),f=k(),i=k(),y=k([]);J(async()=>{se.on("crypto:conflict",w),b()}),pe(()=>{se.off("crypto:conflict",w)});function w(o){const l=o.ourVersion;y.value.push({...o,resolution:l}),P.next("error","Git conflict detected in encrypted file","Conflict Detection")}function _(o){o>=0&&o<y.value.length&&(y.value[o].resolution=y.value[o].ourVersion)}function S(o){o>=0&&o<y.value.length&&(y.value[o].resolution=y.value[o].theirVersion)}function I(o){if(!o)return"Unknown error";if(typeof o=="object"&&o!==null){if("response"in o&&o.response&&typeof o.response=="object"&&"data"in o.response&&o.response.data&&typeof o.response.data=="object"&&"message"in o.response.data)return String(o.response.data.message);if("message"in o&&typeof o.message=="string")return o.message}try{return String(o)}catch{return"Unknown error"}}async function x(o){if(o>=0&&o<y.value.length)try{const l=y.value[o];await D.post("/crypto/resolve-conflict",{original:l.original,resolution:l.resolution}),P.next("success","Conflict resolved successfully"),v(o)}catch(l){P.next("error",`Failed to resolve conflict: ${I(l)}`)}}function v(o){o>=0&&o<y.value.length&&y.value.splice(o,1)}async function b(o){t.currentRoute.value.query.wrongKey&&!o&&i.value.open();const{data:l}=await D.get("/crypto/encryption-key");s.value=l,n.value=l}async function g(){return s.value===n.value?void 0:(await f.value.open().promise&&await D.post("/crypto/encryption-key",{key:n.value}).then(()=>P.next("success","Key saved")).catch(()=>P.next("error","Key cant be saved")),b(!0))}async function u(){if(!await f.value.open().promise)return b(!0);const{data:l}=await D.get("/crypto/generate-key");return await D.post("/crypto/encryption-key",{key:l}).then(()=>P.next("success","Key saved")).catch(()=>P.next("error","Key cant be saved")),b(!0)}return(o,l)=>(p(),h(M,null,[r(B,{header:"Encryption"},{default:c(()=>[l[1]||(l[1]=z(" Key used to encrypt most of the data ")),d("div",Bt,[r(a(je),{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=V=>n.value=V),feedback:!1,toggleMask:"",style:{width:"100%"},fluid:"",onBlur:g,onKeypress:ie(g,["enter"])},null,8,["modelValue"]),r(a(O),{icon:"fas fa-refresh",onClick:u})])]),_:1,__:[1]}),y.value.length>0?(p(),C(B,{key:0,header:"Git Conflicts"},{default:c(()=>[l[5]||(l[5]=d("p",null,"The following encrypted files have Git conflicts. Please resolve them:",-1)),(p(!0),h(M,null,q(y.value,(V,m)=>(p(),h("div",{key:m,class:"conflict-container"},[d("div",At,[d("h3",null,"Conflict "+E(m+1),1),r(a(O),{icon:"fas fa-times",class:"p-button-danger p-button-sm",onClick:T=>v(m)},null,8,["onClick"])]),r(a(fe)),d("div",Kt,[d("div",Nt,[l[2]||(l[2]=d("h4",null,"Your Version",-1)),r(a(te),{modelValue:V.ourVersion,"onUpdate:modelValue":T=>V.ourVersion=T,rows:"10",class:"conflict-content"},null,8,["modelValue","onUpdate:modelValue"])]),d("div",qt,[r(a(O),{icon:"fas fa-arrow-left",onClick:T=>_(m),tooltip:"Use Your Version"},null,8,["onClick"]),r(a(O),{icon:"fas fa-arrow-right",onClick:T=>S(m),tooltip:"Use Their Version"},null,8,["onClick"]),r(a(O),{icon:"fas fa-save",onClick:T=>x(m),class:"p-button-success",tooltip:"Save Resolution"},null,8,["onClick"])]),d("div",Ht,[l[3]||(l[3]=d("h4",null,"Their Version",-1)),r(a(te),{modelValue:V.theirVersion,"onUpdate:modelValue":T=>V.theirVersion=T,rows:"10",class:"conflict-content"},null,8,["modelValue","onUpdate:modelValue"])])]),d("div",Zt,[l[4]||(l[4]=d("h4",null,"Resolution",-1)),r(a(te),{modelValue:V.resolution,"onUpdate:modelValue":T=>V.resolution=T,rows:"10",class:"conflict-content"},null,8,["modelValue","onUpdate:modelValue"])])]))),128))]),_:1,__:[5]})):L("",!0),r(K,{ref_key:"overrideModalRef",ref:f,cancelString:"Cancel",validateString:"Ok"},{header:c(()=>l[6]||(l[6]=[z(" Destructive ")])),body:c(()=>l[7]||(l[7]=[z(" Are you sure to replace the encryption key. Data like environments can be lost. "),d("br",null,null,-1),z(" Save your data before. ")])),_:1},512),r(K,{ref_key:"wrongKeyModalRef",ref:i,"no-cancel":!0,validateString:"Ok"},{header:c(()=>l[8]||(l[8]=[z(" Wrong key ")])),body:c(()=>l[9]||(l[9]=[z(" It appears that Runeya is already configured with an encryption key. "),d("br",null,null,-1),z(" Please replace the existing key with the correct one to unlock the encrypted files. ")])),_:1},512)],64))}},Wt=A(Ft,[["__scopeId","data-v-7fd1f750"]]),Gt={class:"sections"},Yt={class:"line"},Jt={class:"actions"},Qt={class:"services"},Xt={class:"commands"},es={class:"command"},ts={class:"actions"},ss={__name:"Notifications",setup(e){const t=k(""),s=k([{label:"Hide errors",key:"error"}]),n=P.mutedNotifications;function f(w){n.value[w]||(n.value[w]={}),t.value=w}f("error");function i(w){n.value[t.value][w]=!0}function y(w){delete n.value[t.value][w]}return(w,_)=>(p(),h(M,null,[r(a(tt),{value:t.value,"onUpdate:value":_[0]||(_[0]=S=>f(S))},{default:c(()=>[r(a(Xe),null,{default:c(()=>[(p(!0),h(M,null,q(s.value,S=>(p(),C(a(et),{value:S.key},{default:c(()=>[z(E(S.label),1)]),_:2},1032,["value"]))),256))]),_:1})]),_:1},8,["value"]),d("div",Gt,[r(B,{header:"All"},{default:c(()=>[d("div",Yt,[d("div",Jt,[r(a(O),{severity:a(n)[t.value].MUTED_ALL?"danger":"secondary",icon:"fas fa-bell-slash",onClick:_[1]||(_[1]=S=>i("MUTED_ALL"))},null,8,["severity"]),r(a(O),{severity:a(n)[t.value].MUTED_ALL?"secondary":"success",icon:"fas fa-bell",onClick:_[2]||(_[2]=S=>y("MUTED_ALL"))},null,8,["severity"])]),_[3]||(_[3]=z(" All "))])]),_:1}),r(B,{header:"By services"},{default:c(()=>[d("div",Qt,[(p(!0),h(M,null,q(a(_e).services.value,S=>(p(),h("div",null,[d("h4",null,E(S.label),1),d("div",Xt,[(p(!0),h(M,null,q(S.commands,I=>{var x;return p(),h("div",es,[d("div",ts,[r(a(O),{severity:a(n)[t.value].MUTED_ALL||a(n)[t.value][I.id]?"danger":"secondary",icon:"fas fa-bell-slash",onClick:v=>i(I.id)},null,8,["severity","onClick"]),r(a(O),{severity:a(n)[t.value].MUTED_ALL||a(n)[t.value][I.id]?"secondary":"success",icon:"fas fa-bell",onClick:v=>y(I.id)},null,8,["severity","onClick"])]),z(" "+E(I.spawnCmd)+" "+E(((x=I.spawnArgs)==null?void 0:x.join(" "))||""),1)])}),256))])]))),256))])]),_:1})])],64))}},os=A(ss,[["__scopeId","data-v-1816ab37"]]),ns={class:"line"},as={__name:"General",setup(e){return(t,s)=>(p(),C(B,{header:"Editor",scroll:!1},{default:c(()=>[d("div",ns,[s[0]||(s[0]=z(" Default editor ")),r(it,{direction:"right",dark:!0})])]),_:1}))}},ls=A(as,[["__scopeId","data-v-832ff7c4"]]);var rs=de`
163
+ .p-message {
164
+ border-radius: dt('message.border.radius');
165
+ outline-width: dt('message.border.width');
166
+ outline-style: solid;
167
+ }
168
+
169
+ .p-message-content {
170
+ display: flex;
171
+ align-items: center;
172
+ padding: dt('message.content.padding');
173
+ gap: dt('message.content.gap');
174
+ height: 100%;
175
+ }
176
+
177
+ .p-message-icon {
178
+ flex-shrink: 0;
179
+ }
180
+
181
+ .p-message-close-button {
182
+ display: flex;
183
+ align-items: center;
184
+ justify-content: center;
185
+ flex-shrink: 0;
186
+ margin-inline-start: auto;
187
+ overflow: hidden;
188
+ position: relative;
189
+ width: dt('message.close.button.width');
190
+ height: dt('message.close.button.height');
191
+ border-radius: dt('message.close.button.border.radius');
192
+ background: transparent;
193
+ transition:
194
+ background dt('message.transition.duration'),
195
+ color dt('message.transition.duration'),
196
+ outline-color dt('message.transition.duration'),
197
+ box-shadow dt('message.transition.duration'),
198
+ opacity 0.3s;
199
+ outline-color: transparent;
200
+ color: inherit;
201
+ padding: 0;
202
+ border: none;
203
+ cursor: pointer;
204
+ user-select: none;
205
+ }
206
+
207
+ .p-message-close-icon {
208
+ font-size: dt('message.close.icon.size');
209
+ width: dt('message.close.icon.size');
210
+ height: dt('message.close.icon.size');
211
+ }
212
+
213
+ .p-message-close-button:focus-visible {
214
+ outline-width: dt('message.close.button.focus.ring.width');
215
+ outline-style: dt('message.close.button.focus.ring.style');
216
+ outline-offset: dt('message.close.button.focus.ring.offset');
217
+ }
218
+
219
+ .p-message-info {
220
+ background: dt('message.info.background');
221
+ outline-color: dt('message.info.border.color');
222
+ color: dt('message.info.color');
223
+ box-shadow: dt('message.info.shadow');
224
+ }
225
+
226
+ .p-message-info .p-message-close-button:focus-visible {
227
+ outline-color: dt('message.info.close.button.focus.ring.color');
228
+ box-shadow: dt('message.info.close.button.focus.ring.shadow');
229
+ }
230
+
231
+ .p-message-info .p-message-close-button:hover {
232
+ background: dt('message.info.close.button.hover.background');
233
+ }
234
+
235
+ .p-message-info.p-message-outlined {
236
+ color: dt('message.info.outlined.color');
237
+ outline-color: dt('message.info.outlined.border.color');
238
+ }
239
+
240
+ .p-message-info.p-message-simple {
241
+ color: dt('message.info.simple.color');
242
+ }
243
+
244
+ .p-message-success {
245
+ background: dt('message.success.background');
246
+ outline-color: dt('message.success.border.color');
247
+ color: dt('message.success.color');
248
+ box-shadow: dt('message.success.shadow');
249
+ }
250
+
251
+ .p-message-success .p-message-close-button:focus-visible {
252
+ outline-color: dt('message.success.close.button.focus.ring.color');
253
+ box-shadow: dt('message.success.close.button.focus.ring.shadow');
254
+ }
255
+
256
+ .p-message-success .p-message-close-button:hover {
257
+ background: dt('message.success.close.button.hover.background');
258
+ }
259
+
260
+ .p-message-success.p-message-outlined {
261
+ color: dt('message.success.outlined.color');
262
+ outline-color: dt('message.success.outlined.border.color');
263
+ }
264
+
265
+ .p-message-success.p-message-simple {
266
+ color: dt('message.success.simple.color');
267
+ }
268
+
269
+ .p-message-warn {
270
+ background: dt('message.warn.background');
271
+ outline-color: dt('message.warn.border.color');
272
+ color: dt('message.warn.color');
273
+ box-shadow: dt('message.warn.shadow');
274
+ }
275
+
276
+ .p-message-warn .p-message-close-button:focus-visible {
277
+ outline-color: dt('message.warn.close.button.focus.ring.color');
278
+ box-shadow: dt('message.warn.close.button.focus.ring.shadow');
279
+ }
280
+
281
+ .p-message-warn .p-message-close-button:hover {
282
+ background: dt('message.warn.close.button.hover.background');
283
+ }
284
+
285
+ .p-message-warn.p-message-outlined {
286
+ color: dt('message.warn.outlined.color');
287
+ outline-color: dt('message.warn.outlined.border.color');
288
+ }
289
+
290
+ .p-message-warn.p-message-simple {
291
+ color: dt('message.warn.simple.color');
292
+ }
293
+
294
+ .p-message-error {
295
+ background: dt('message.error.background');
296
+ outline-color: dt('message.error.border.color');
297
+ color: dt('message.error.color');
298
+ box-shadow: dt('message.error.shadow');
299
+ }
300
+
301
+ .p-message-error .p-message-close-button:focus-visible {
302
+ outline-color: dt('message.error.close.button.focus.ring.color');
303
+ box-shadow: dt('message.error.close.button.focus.ring.shadow');
304
+ }
305
+
306
+ .p-message-error .p-message-close-button:hover {
307
+ background: dt('message.error.close.button.hover.background');
308
+ }
309
+
310
+ .p-message-error.p-message-outlined {
311
+ color: dt('message.error.outlined.color');
312
+ outline-color: dt('message.error.outlined.border.color');
313
+ }
314
+
315
+ .p-message-error.p-message-simple {
316
+ color: dt('message.error.simple.color');
317
+ }
318
+
319
+ .p-message-secondary {
320
+ background: dt('message.secondary.background');
321
+ outline-color: dt('message.secondary.border.color');
322
+ color: dt('message.secondary.color');
323
+ box-shadow: dt('message.secondary.shadow');
324
+ }
325
+
326
+ .p-message-secondary .p-message-close-button:focus-visible {
327
+ outline-color: dt('message.secondary.close.button.focus.ring.color');
328
+ box-shadow: dt('message.secondary.close.button.focus.ring.shadow');
329
+ }
330
+
331
+ .p-message-secondary .p-message-close-button:hover {
332
+ background: dt('message.secondary.close.button.hover.background');
333
+ }
334
+
335
+ .p-message-secondary.p-message-outlined {
336
+ color: dt('message.secondary.outlined.color');
337
+ outline-color: dt('message.secondary.outlined.border.color');
338
+ }
339
+
340
+ .p-message-secondary.p-message-simple {
341
+ color: dt('message.secondary.simple.color');
342
+ }
343
+
344
+ .p-message-contrast {
345
+ background: dt('message.contrast.background');
346
+ outline-color: dt('message.contrast.border.color');
347
+ color: dt('message.contrast.color');
348
+ box-shadow: dt('message.contrast.shadow');
349
+ }
350
+
351
+ .p-message-contrast .p-message-close-button:focus-visible {
352
+ outline-color: dt('message.contrast.close.button.focus.ring.color');
353
+ box-shadow: dt('message.contrast.close.button.focus.ring.shadow');
354
+ }
355
+
356
+ .p-message-contrast .p-message-close-button:hover {
357
+ background: dt('message.contrast.close.button.hover.background');
358
+ }
359
+
360
+ .p-message-contrast.p-message-outlined {
361
+ color: dt('message.contrast.outlined.color');
362
+ outline-color: dt('message.contrast.outlined.border.color');
363
+ }
364
+
365
+ .p-message-contrast.p-message-simple {
366
+ color: dt('message.contrast.simple.color');
367
+ }
368
+
369
+ .p-message-text {
370
+ font-size: dt('message.text.font.size');
371
+ font-weight: dt('message.text.font.weight');
372
+ }
373
+
374
+ .p-message-icon {
375
+ font-size: dt('message.icon.size');
376
+ width: dt('message.icon.size');
377
+ height: dt('message.icon.size');
378
+ }
379
+
380
+ .p-message-enter-from {
381
+ opacity: 0;
382
+ }
383
+
384
+ .p-message-enter-active {
385
+ transition: opacity 0.3s;
386
+ }
387
+
388
+ .p-message.p-message-leave-from {
389
+ max-height: 1000px;
390
+ }
391
+
392
+ .p-message.p-message-leave-to {
393
+ max-height: 0;
394
+ opacity: 0;
395
+ margin: 0;
396
+ }
397
+
398
+ .p-message-leave-active {
399
+ overflow: hidden;
400
+ transition:
401
+ max-height 0.45s cubic-bezier(0, 1, 0, 1),
402
+ opacity 0.3s,
403
+ margin 0.3s;
404
+ }
405
+
406
+ .p-message-leave-active .p-message-close-button {
407
+ opacity: 0;
408
+ }
409
+
410
+ .p-message-sm .p-message-content {
411
+ padding: dt('message.content.sm.padding');
412
+ }
413
+
414
+ .p-message-sm .p-message-text {
415
+ font-size: dt('message.text.sm.font.size');
416
+ }
417
+
418
+ .p-message-sm .p-message-icon {
419
+ font-size: dt('message.icon.sm.size');
420
+ width: dt('message.icon.sm.size');
421
+ height: dt('message.icon.sm.size');
422
+ }
423
+
424
+ .p-message-sm .p-message-close-icon {
425
+ font-size: dt('message.close.icon.sm.size');
426
+ width: dt('message.close.icon.sm.size');
427
+ height: dt('message.close.icon.sm.size');
428
+ }
429
+
430
+ .p-message-lg .p-message-content {
431
+ padding: dt('message.content.lg.padding');
432
+ }
433
+
434
+ .p-message-lg .p-message-text {
435
+ font-size: dt('message.text.lg.font.size');
436
+ }
437
+
438
+ .p-message-lg .p-message-icon {
439
+ font-size: dt('message.icon.lg.size');
440
+ width: dt('message.icon.lg.size');
441
+ height: dt('message.icon.lg.size');
442
+ }
443
+
444
+ .p-message-lg .p-message-close-icon {
445
+ font-size: dt('message.close.icon.lg.size');
446
+ width: dt('message.close.icon.lg.size');
447
+ height: dt('message.close.icon.lg.size');
448
+ }
449
+
450
+ .p-message-outlined {
451
+ background: transparent;
452
+ outline-width: dt('message.outlined.border.width');
453
+ }
454
+
455
+ .p-message-simple {
456
+ background: transparent;
457
+ outline-color: transparent;
458
+ box-shadow: none;
459
+ }
460
+
461
+ .p-message-simple .p-message-content {
462
+ padding: dt('message.simple.content.padding');
463
+ }
464
+
465
+ .p-message-outlined .p-message-close-button:hover,
466
+ .p-message-simple .p-message-close-button:hover {
467
+ background: transparent;
468
+ }
469
+ `,is={root:function(t){var s=t.props;return["p-message p-component p-message-"+s.severity,{"p-message-outlined":s.variant==="outlined","p-message-simple":s.variant==="simple","p-message-sm":s.size==="small","p-message-lg":s.size==="large"}]},content:"p-message-content",icon:"p-message-icon",text:"p-message-text",closeButton:"p-message-close-button",closeIcon:"p-message-close-icon"},us=ce.extend({name:"message",style:rs,classes:is}),ds={name:"BaseMessage",extends:Le,props:{severity:{type:String,default:"info"},closable:{type:Boolean,default:!1},life:{type:Number,default:null},icon:{type:String,default:void 0},closeIcon:{type:String,default:void 0},closeButtonProps:{type:null,default:null},size:{type:String,default:null},variant:{type:String,default:null}},style:us,provide:function(){return{$pcMessage:this,$parentInstance:this}}};function G(e){"@babel/helpers - typeof";return G=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(e)}function we(e,t,s){return(t=cs(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function cs(e){var t=ps(e,"string");return G(t)=="symbol"?t:t+""}function ps(e,t){if(G(e)!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var n=s.call(e,t);if(G(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Me={name:"Message",extends:ds,inheritAttrs:!1,emits:["close","life-end"],timeout:null,data:function(){return{visible:!0}},mounted:function(){var t=this;this.life&&setTimeout(function(){t.visible=!1,t.$emit("life-end")},this.life)},methods:{close:function(t){this.visible=!1,this.$emit("close",t)}},computed:{closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0},dataP:function(){return H(we(we({outlined:this.variant==="outlined",simple:this.variant==="simple"},this.severity,this.severity),this.size,this.size))}},directives:{ripple:ot},components:{TimesIcon:st}};function Y(e){"@babel/helpers - typeof";return Y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Y(e)}function ke(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(f){return Object.getOwnPropertyDescriptor(e,f).enumerable})),s.push.apply(s,n)}return s}function $e(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?ke(Object(s),!0).forEach(function(n){ms(e,n,s[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):ke(Object(s)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(s,n))})}return e}function ms(e,t,s){return(t=fs(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function fs(e){var t=gs(e,"string");return Y(t)=="symbol"?t:t+""}function gs(e,t){if(Y(e)!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var n=s.call(e,t);if(Y(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vs=["data-p"],ys=["data-p"],bs=["data-p"],hs=["aria-label","data-p"],ws=["data-p"];function ks(e,t,s,n,f,i){var y=oe("TimesIcon"),w=Ne("ripple");return p(),C(Ce,$({name:"p-message",appear:""},e.ptmi("transition")),{default:c(function(){return[ge(d("div",$({class:e.cx("root"),role:"alert","aria-live":"assertive","aria-atomic":"true","data-p":i.dataP},e.ptm("root")),[e.$slots.container?j(e.$slots,"container",{key:0,closeCallback:i.close}):(p(),h("div",$({key:1,class:e.cx("content"),"data-p":i.dataP},e.ptm("content")),[j(e.$slots,"icon",{class:Se(e.cx("icon"))},function(){return[(p(),C(ue(e.icon?"span":null),$({class:[e.cx("icon"),e.icon],"data-p":i.dataP},e.ptm("icon")),null,16,["class","data-p"]))]}),e.$slots.default?(p(),h("div",$({key:0,class:e.cx("text"),"data-p":i.dataP},e.ptm("text")),[j(e.$slots,"default")],16,bs)):L("",!0),e.closable?ge((p(),h("button",$({key:1,class:e.cx("closeButton"),"aria-label":i.closeAriaLabel,type:"button",onClick:t[0]||(t[0]=function(_){return i.close(_)}),"data-p":i.dataP},$e($e({},e.closeButtonProps),e.ptm("closeButton"))),[j(e.$slots,"closeicon",{},function(){return[e.closeIcon?(p(),h("i",$({key:0,class:[e.cx("closeIcon"),e.closeIcon],"data-p":i.dataP},e.ptm("closeIcon")),null,16,ws)):(p(),C(y,$({key:1,class:[e.cx("closeIcon"),e.closeIcon],"data-p":i.dataP},e.ptm("closeIcon")),null,16,["class","data-p"]))]})],16,hs)),[[w]]):L("",!0)],16,ys))],16,vs),[[qe,f.visible]])]}),_:3},16)}Me.render=ks;const $s={class:"line"},Cs={class:"label"},Ss={__name:"Parsers",setup(e){function t(){return{label:"",readonly:!1,transform:`
470
+ /**
471
+ * @type {(msg: LogMessage, service?: Service | null) => LogMessage}
472
+ */
473
+ const parser = (line) => {
474
+ return line;
475
+ }
476
+ module.exports = parser;
477
+
478
+ /**
479
+ * @typedef {{
480
+ * msg: string,
481
+ * raw: string,
482
+ * timestamp: number,
483
+ * prompt?: boolean,
484
+ * id: string,
485
+ * source?: 'stdout' | 'stderr'
486
+ * json?: Record<any, any> | any[] | null,
487
+ * debug?: Record<any, any> | any[] | null,
488
+ * isSeparator?: boolean,
489
+ * label: string,
490
+ * pid?: number | null,
491
+ * hide?: boolean,
492
+ * cmd?: {cmd: string, args: string[], options: import('child_process').ExecOptions, status: 'running' | 'error' | 'exited'},
493
+ * }} LogMessage
494
+ */
495
+ `}}const s=k({}),n=k(),f=k(),i=k(),y=k(t()),w=k([]),_=Pe(()=>w.value.filter(g=>!g.readonly).map(g=>({key:g.id,label:g.label})));He(()=>{const g=Object.keys(s.value||{})[0];n.value=w.value.find(u=>u.id===g)});async function S(){w.value=await X.all()}async function I(){await X.update(n.value)}async function x(){await f.value.open().promise&&await X.create(y.value).then(async u=>{P.next("success","Parser created"),v.push({query:{...v.currentRoute.value.query,parser:u.id}}),n.value=u}).catch(()=>P.next("error","Parser cant be saved")),y.value=t(),await S()}const v=me();J(async()=>{var u;await S();const g=v.currentRoute.value.query.parser;n.value=g?w.value.find(o=>o.id===g):w.value.filter(o=>o.readonly===!1)[0],s.value[(u=n.value)==null?void 0:u.id]=!0}),ze(()=>s,()=>{const g=s.value.id;v.push({query:{...v.currentRoute.value.query,parser:g}})},{deep:!0});async function b(){await i.value.open().promise&&(await X.delete(n.value.id).then(()=>P.next("success","Parser deleted")).catch(()=>P.next("error","Parser cant be deleted")),await S())}return(g,u)=>{const o=oe("Editor");return p(),h(M,null,[r(a(Oe),{height:"100%",style:{height:"100%"}},{default:c(()=>{var l;return[r(a(ne),{size:1,style:{minWidth:"160px"},class:"left-panel"},{default:c(()=>[r(a(O),{fluid:"",icon:"fas fa-plus",label:"Add new",size:"small",class:"add-button",variant:"text",onClick:x}),r(a(Ee),{value:_.value,selectionKeys:s.value,"onUpdate:selectionKeys":u[0]||(u[0]=V=>s.value=V),selectionMode:"single",size:"small",class:"w-full md:w-[30rem]"},{default:c(V=>[d("div",$s,[d("div",Cs,E(V.node.label),1)])]),_:1},8,["value","selectionKeys"])]),_:1}),n.value&&((l=n.value)!=null&&l.label)?(p(),C(a(ne),{key:0,size:75,class:"right-panel"},{default:c(()=>[n.value?(p(),h(M,{key:0},[r(a(Me),{size:"small",severity:"warn",closable:""},{default:c(()=>u[3]||(u[3]=[z(" Caution: This script is designed to execute as is with an eval(). "),d("br",null,null,-1),z("Please ensure it does not contain harmful content. ")])),_:1,__:[3]}),r(B,{header:"Parser",class:"parsers",actions:n.value?[{icon:"fas fa-trash",style:{background:"red"},click:b}]:[]},{default:c(()=>[n.value?(p(),C(o,{key:0,onBlur:I,modelValue:n.value.transform,"onUpdate:modelValue":u[1]||(u[1]=V=>n.value.transform=V),style:{height:"100%"},language:"typescript"},null,8,["modelValue"])):L("",!0)]),_:1},8,["actions"])],64)):L("",!0)]),_:1})):L("",!0)]}),_:1}),r(K,{ref_key:"addModalRef",ref:f},{header:c(()=>u[4]||(u[4]=[z("Add new parser")])),body:c(()=>[r(a(ee),null,{default:c(()=>[r(a(U),{modelValue:y.value.label,"onUpdate:modelValue":u[2]||(u[2]=l=>y.value.label=l),fluid:""},null,8,["modelValue"]),u[5]||(u[5]=d("label",null,"Label",-1))]),_:1,__:[5]})]),_:1},512),r(K,{ref_key:"deleteModalRef",ref:i},{header:c(()=>u[6]||(u[6]=[z("Delete parser")])),body:c(()=>u[7]||(u[7]=[z(" Are you sure to delete this parser ? ")])),_:1},512)],64)}}},Ps=A(Ss,[["__scopeId","data-v-61a476f0"]]),zs={class:"plugins-container"},_s={class:"installed-plugins"},Is={class:"flex items-center gap-3"},Vs={class:"font-medium"},Es={class:"text-sm"},Os={class:"flex items-center gap-1"},Ls={class:"empty-state text-center py-8"},Ts={class:"text-lg font-medium mb-2"},xs={class:"mb-4"},js={class:"plugin-store"},Ms=["src"],Rs={class:"flex items-start gap-4"},Ds={class:"flex-1"},Us={class:"mb-2"},Bs={class:"text-sm"},As={class:"text-stone-500 text-xs mt-1"},Ks={class:"flex justify-end gap-2"},Ns={__name:"PluginsManager",setup(e){const{t}=Ze(),s=k(0),n=k(!1),f=k(null),i=k(""),y=k(!1),w=k(null),_=v=>{f.value=v,n.value=!0},S=()=>{n.value=!1,f.value=null,i.value=""},I=async()=>{var v,b;if(f.value){i.value=f.value.name||"",y.value=!0;try{await Fe.delete("/plugins/delete",{data:{name:f.value.name}}),await Q.init(),P.next("success",t("plugins.deleteSuccess")||"Plugin supprimé avec succès"),S()}catch(g){console.error("Delete plugin error:",g);const o=((b=(v=g.response)==null?void 0:v.data)==null?void 0:b.message)||t("plugins.deleteError")||"Erreur lors de la suppression du plugin";P.next("error",o),i.value=""}finally{y.value=!1}}},x=v=>{var b,g;v.data.type==="plugin-loaded"&&(console.log("plugin loaded"),(g=(b=w.value)==null?void 0:b.contentWindow)==null||g.postMessage({type:"iframed"},"*")),v.data.type==="download-plugin"&&Q.installPlugin(v.data.url).then(()=>{P.next("success",t("plugins.installSuccess")||"Plugin installé avec succès")}).catch(u=>{console.log(u.response.data.code),u.response.data.code==="400.68746854743512"&&P.next("error","The plugin is already installed with this version")})};return J(async()=>{window.addEventListener("message",x)}),pe(()=>{window.removeEventListener("message",x)}),(v,b)=>(p(),h("div",zs,[r(a(at),{activeIndex:s.value,"onUpdate:activeIndex":b[1]||(b[1]=g=>s.value=g),class:"plugins-tabs"},{default:c(()=>[r(a(ye),{header:v.$t("plugins.myPlugins")||"Mes Plugins",value:"0"},{default:c(()=>[d("div",_s,[r(a(Ie),{value:a(Q).plugins.value,paginator:a(Q).plugins.value.length>10,rows:10,class:"plugins-datatable",dataKey:"name",stripedRows:"",loading:!1},{empty:c(()=>[d("div",Ls,[b[3]||(b[3]=d("div",{class:"w-16 h-16 bg-stone-100 rounded-full flex items-center justify-center mx-auto mb-4"},[d("i",{class:"fas fa-puzzle-piece text-2xl"})],-1)),d("h3",Ts,E(v.$t("plugins.noPlugins")||"Aucun plugin installé"),1),d("p",xs,E(v.$t("plugins.noPluginsDescription")||"Explorez le store pour découvrir des plugins utiles"),1),r(a(O),{label:v.$t("plugins.browseStore")||"Parcourir le Store",icon:"fas fa-shopping-cart",onClick:b[0]||(b[0]=g=>s.value=1)},null,8,["label"])])]),default:c(()=>[r(a(R),{header:v.$t("plugins.plugin")||"Plugin",style:{width:"35%"}},{body:c(g=>{var u,o;return[d("div",Is,[d("div",Vs,E(((u=g.data)==null?void 0:u.displayName)||((o=g.data)==null?void 0:o.name)||"Plugin"),1)])]}),_:1},8,["header"]),r(a(R),{header:v.$t("plugins.description")||"Description",style:{width:"40%"}},{body:c(g=>{var u;return[d("p",Es,E(((u=g.data)==null?void 0:u.description)||"No description available"),1)]}),_:1},8,["header"]),r(a(R),{header:v.$t("plugins.version")||"Version",style:{width:"10%"}},{body:c(g=>{var u;return[r(a(nt),{value:((u=g.data)==null?void 0:u.version)||"1.0.0",severity:"info"},null,8,["value"])]}),_:1},8,["header"]),r(a(R),{header:v.$t("plugins.actions")||"Actions",style:{width:"15%"}},{body:c(g=>{var u,o;return[d("div",Os,[((u=g.data)==null?void 0:u.version)!=="development"?(p(),C(a(O),{key:0,icon:"fas fa-trash",severity:"danger",text:"",rounded:"",size:"small",title:v.$t("plugins.uninstall")||"Désinstaller",onClick:l=>_(g.data),loading:i.value===((o=g.data)==null?void 0:o.name)},null,8,["title","onClick","loading"])):L("",!0)])]}),_:1},8,["header"])]),_:1},8,["value","paginator"])])]),_:1},8,["header"]),r(a(ye),{header:v.$t("plugins.store")||"Store",value:"1"},{default:c(()=>[d("div",js,[a(ve).pluginsUrl&&s.value===1?(p(),h("iframe",{key:0,ref_key:"storeIframe",ref:w,class:"store-placeholder w-full h-full",src:`${a(ve).pluginsUrl}`,style:{height:"90vh"}},null,8,Ms)):L("",!0)])]),_:1},8,["header"])]),_:1},8,["activeIndex"]),r(a(lt),{visible:n.value,"onUpdate:visible":b[2]||(b[2]=g=>n.value=g),header:v.$t("plugins.confirmDelete")||"Confirmer la suppression",modal:"",closable:!1,class:"delete-confirmation-dialog",style:{width:"450px"}},{footer:c(()=>{var g;return[d("div",Ks,[r(a(O),{label:v.$t("plugins.cancel")||"Annuler",severity:"secondary",onClick:S,disabled:y.value},null,8,["label","disabled"]),((g=f.value)==null?void 0:g.version)!=="development"?(p(),C(a(O),{key:0,label:v.$t("plugins.delete")||"Supprimer",severity:"danger",onClick:I,loading:y.value,icon:"fas fa-trash"},null,8,["label","loading"])):L("",!0)])]}),default:c(()=>{var g,u;return[d("div",Rs,[b[4]||(b[4]=d("div",{class:"w-12 h-12 bg-red-100 rounded-full flex items-center justify-center flex-shrink-0"},[d("i",{class:"fas fa-exclamation-triangle text-red-600 text-xl"})],-1)),d("div",Ds,[d("p",Us,E(v.$t("plugins.deleteConfirmMessage")||"Êtes-vous sûr de vouloir supprimer ce plugin ?"),1),d("p",Bs,[d("strong",null,E(((g=f.value)==null?void 0:g.displayName)||((u=f.value)==null?void 0:u.name)),1)]),d("p",As,E(v.$t("plugins.deleteWarning")||"Cette action est irréversible."),1)])])]}),_:1},8,["visible","header"])]))}},qs=A(Ns,[["__scopeId","data-v-8c49e032"]]),Hs={class:"stack-create-root"},Zs={__name:"Settings",setup(e){let t=k({});const s=me();ze(()=>s.currentRoute.value,()=>{var i;t.value={[(i=s.currentRoute.value.params.setting)==null?void 0:i.toString()]:!0}},{deep:!0}),J(()=>{const i=s.currentRoute.value.params.setting;i&&(t.value={[i==null?void 0:i.toString()]:!0}),Object.keys(t.value).length||(t.value={[f.value[0].key]:!0})});function n(i){s.push({name:"settings",params:{setting:Object.keys(i)[0]}})}const f=Pe(()=>[{key:"general",label:"General",icon:"fas fa-home"},{key:"crypto",label:"Security",icon:"fas fa-shield-halved"},{key:"environments",label:"Environments",icon:"fas fa-home"},{key:"parsers",label:"Parsers",icon:"fas fa-scroll"},{key:"notifications",label:"Notifications",icon:"fas fa-bell"},{key:"pluginsManager",label:"Plugins",icon:"fas fa-plug"}]);return(i,y)=>(p(),h("div",Hs,[r(a(Oe),{style:{height:"100%"}},{default:c(()=>[r(a(ne),{size:1,style:{minWidth:"160px"},class:"leftPanel"},{default:c(()=>[r(a(Ee),{value:f.value,selectionKeys:a(t),"onUpdate:selectionKeys":n,selectionMode:"single",size:"small",class:"w-full md:w-[30rem]"},null,8,["value","selectionKeys"])]),_:1}),r(a(ne),{size:75,class:"rightPanel"},{default:c(()=>[d("div",{class:Se(["splitter-content",{full:a(t).parsers}])},[a(t).crypto?(p(),C(Wt,{key:0})):a(t).environments?(p(),C(Ct,{key:1})):a(t).parsers?(p(),C(Ps,{key:2})):a(t).general?(p(),C(ls,{key:3})):a(t).notifications?(p(),C(os,{key:4})):a(t).pluginsManager?(p(),C(qs,{key:5})):L("",!0)],2)]),_:1})]),_:1})]))}},eo=A(Zs,[["__scopeId","data-v-6343c1b9"]]);export{eo as default};
@@ -0,0 +1 @@
1
+ import a from"./system-DYhoWbZ1.js";import{B as c,L as i}from"./LeftLogo-E7dYCAWT.js";import{S as n}from"./StackChooser-DAAV0Rat.js";import{u as m}from"./router-B2S_D5pC.js";import{_ as l}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{a as p,o as f,e as t,b as s,t as u,L as r}from"./index-G1ob8hK0.js";import"./Section-YBL4Pzic.js";import"./Markdown-dzyZ7CTg.js";import"./Editor-BqvrNzb6.js";const _={class:"stack-chooser-root"},d={class:"right"},k={class:"version"},v={__name:"StackChooser",setup(h){const e=m();return(S,o)=>(f(),p("div",_,[t(c,{lowResources:!0}),t(i),s("div",d,[t(n,{class:"stack-chooser"})]),s("div",k,u(r(a).version.value),1),s("div",{class:"tools",onClick:o[0]||(o[0]=x=>r(e).push({name:"Toolbox"}))},o[1]||(o[1]=[s("i",{class:"fas fa-toolbox"},null,-1)]))]))}},$=l(v,[["__scopeId","data-v-3f1446fa"]]);export{$ as default};
@@ -0,0 +1 @@
1
+ import{u as G,S as d}from"./router-B2S_D5pC.js";import V from"./system-DYhoWbZ1.js";import{_ as I}from"./Section-YBL4Pzic.js";import{l as M,s as O,g as S,o as r,f as U,b as c,a as u,F as A,q as L,d as E,t as _,O as N,m as q,p as F,v as K,r as T,j,S as m,N as D,c as C,V as x}from"./index-G1ob8hK0.js";import{L as R,B as z}from"./LeftLogo-E7dYCAWT.js";import{_ as H}from"./_plugin-vue_export-helper-DlAUqK2U.js";const J={name:"StackChooser",components:{sectionCmp:I,BackgroundStackChooser:z,LeftLogo:R},props:{embed:{default:!1}},setup(){var o,h,f;const v=G(),t=T([]);async function b(){if(await d.loadServices(),!d.services.value.length)return v.push({name:"stack-single-no-view"});if(t.value=d.services.value.map(e=>{const l=localStorage.getItem(`automatic-toggle-${e.label}`);return{label:e.label,enabled:l==="true"||e.enabled||!1,groups:e.groups}}),v.currentRoute.value.name==="stack-chooser"){const e=d.services.value.find(l=>l.enabled);if(e){const l=d.services.value.find(a=>a.label===localStorage.getItem("last-service-visisted")&&a.enabled);l?v.push({name:"stack-single",params:{label:l.label}}):v.push({name:"stack-single",params:{label:e.label}})}}}j(b),(o=m)==null||o.on("stack:selectConf",b),(h=m)==null||h.on("service:start",b),(f=m)==null||f.on("stack:services-reloaded",b),D(()=>{var e,l,a;(e=m)==null||e.off("stack:selectConf",b),(l=m)==null||l.off("service:start",b),(a=m)==null||a.off("stack:services-reloaded",b)});const s=async()=>{var l,a;t.value.forEach(i=>{const w=d.services.value.find(B=>B.label===i.label);w&&(w.enabled=i.enabled)}),d.launchServices(t.value.map(i=>({label:i.label,enabled:i.enabled})));const e=await d.getEnabledServices();v.push({name:"stack-single",params:{label:((l=e[0])==null?void 0:l.label)||((a=d.services.value[0])==null?void 0:a.label)}})},g=e=>t.value.filter(l=>{var a;return((a=l.groups)==null?void 0:a.includes(e))||e==="All"}),y=e=>g(e).every(l=>l.enabled),p=T(""),n=async e=>{e!=null&&e.label&&localStorage.setItem(`automatic-toggle-${e.label}`,e.enabled==null?"false":e.enabled.toString())},k=async(e,l=null)=>{e!=null&&(e.enabled=l??!e.enabled,await n(e))};return{servicesToLaunch:t,search:p,isAllEnabled:C(()=>t.value.every(e=>e.enabled)),oneOrMoreEnabled:C(()=>t.value.some(e=>e.enabled)),groups:C(()=>{const e=t.value.reduce((l,a)=>(a.groups&&a.groups.forEach(i=>{l[i]||(l[i]=x({services:[],label:i})),l[i].services.push(a)}),l.All||(l.All=x({services:[],label:"All"})),l.All.services.push(a),l),{});return Object.keys(e).map(l=>e[l]).sort((l,a)=>l.label.localeCompare(a.label))}),toggleGroup(e){const l=y(e);g(e).map(a=>{k(a,!l)})},save:n,isGroupSelected:y,Stack:d,System:V,validate:s,displayedServices(e){return e.filter(l=>{var a;return(a=l.label)==null?void 0:a.toUpperCase().includes(p.value.toUpperCase())})},toggleService:k}}},P={class:"groups"},Q=["onClick"],W={class:"left-header"},X={key:0,class:"fas fa-chevron-down","aria-hidden":"true"},Y={class:"right-header"},Z=["onClick"],$={key:0,class:"far fa-check-square","aria-hidden":"true"},ee={key:1,class:"far fa-square","aria-hidden":"true"},le={key:0},ae=["onKeypress"],se=["id","value","checked","onChange"],te=["for"],ne={class:"actions"};function oe(v,t,b,s,g,y){const p=M("section-cmp");return s.servicesToLaunch?(r(),O(p,{key:0,class:"stack-chooser",header:"Choose all services to launch"},{default:U(()=>[c("div",P,[(r(!0),u(A,null,L(s.groups,n=>{var k;return r(),u("div",{key:n.label},[c("div",{class:"group-header",onClick:o=>n.show=!n.show},[c("div",W,[n.label!=="All"?(r(),u("i",X)):S("",!0),c("h3",null,[E(_(n.label)+" ",1),c("span",null,"("+_((k=n.services)==null?void 0:k.length)+")",1)])]),c("div",Y,[c("button",{onClick:N(o=>s.toggleGroup(n.label),["stop"]),class:"mini"},[s.isGroupSelected(n.label)?(r(),u("i",$)):(r(),u("i",ee))],8,Z)])],8,Q),n.show||n.label==="All"?(r(),u("ul",le,[q(c("input",{type:"text","onUpdate:modelValue":t[0]||(t[0]=o=>s.search=o),onKeypress:F(o=>s.toggleService(s.servicesToLaunch.find(h=>{var f;return h.label===((f=s.displayedServices(n.services)[0])==null?void 0:f.label)})),["enter"]),placeholder:"Type+Enter to toggle..."},null,40,ae),[[K,s.search]]),(r(!0),u(A,null,L(s.displayedServices(n.services),o=>{var h,f;return r(),u("li",{key:"services-"+o.label},[c("input",{type:"checkbox",id:"input-"+o.label,value:(h=s.servicesToLaunch.find(e=>e.label===o.label))==null?void 0:h.enabled,checked:(f=s.servicesToLaunch.find(e=>e.label===o.label))==null?void 0:f.enabled,onChange:e=>s.toggleService(s.servicesToLaunch.find(l=>l.label===o.label))},null,40,se),c("label",{for:"input-"+o.label},_(o.label),9,te)])}),128))])):S("",!0)])}),128))]),c("div",ne,[s.isAllEnabled?(r(),u("button",{key:1,onClick:t[2]||(t[2]=n=>s.toggleGroup("All"))},"Unselect all")):(r(),u("button",{key:0,onClick:t[1]||(t[1]=n=>s.toggleGroup("All"))},"Select all")),c("button",{onClick:t[3]||(t[3]=(...n)=>s.validate&&s.validate(...n)),class:"success"},[t[4]||(t[4]=c("i",{class:"fas fa-play","aria-hidden":"true"},null,-1)),E(" "+_(s.oneOrMoreEnabled?"Launch":"Open without launching"),1)])])]),_:1})):S("",!0)}const fe=H(J,[["render",oe],["__scopeId","data-v-cd4be6aa"]]);export{fe as S};