@autocode-cli/autocode 0.37.0 → 0.38.1

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 (88) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{CpaAmOT1.js → 2boNwi9_.js} +1 -1
  3. package/.output/public/_nuxt/{BNr40Cyx.js → AkOEraF8.js} +1 -1
  4. package/.output/public/_nuxt/{C1Dh6gFG.js → B-VWZquG.js} +1 -1
  5. package/.output/public/_nuxt/{up1a6xQr.js → B8Xf8MgC.js} +1 -1
  6. package/.output/public/_nuxt/{D3FsoLQm.js → BE3foYyN.js} +1 -1
  7. package/.output/public/_nuxt/{DyAfzMRU.js → BHlJJSYC.js} +1 -1
  8. package/.output/public/_nuxt/{G3RO7xM_.js → BJYkvAaS.js} +1 -1
  9. package/.output/public/_nuxt/{_S9g-Cdv.js → BJjQ3yAn.js} +1 -1
  10. package/.output/public/_nuxt/{BmfOZEEG.js → BK7XP8e6.js} +1 -1
  11. package/.output/public/_nuxt/{Cm1brjPJ.js → BKGmjLSc.js} +1 -1
  12. package/.output/public/_nuxt/{B6_0bWxd.js → BOlhM3xb.js} +1 -1
  13. package/.output/public/_nuxt/{cm-fPQZs.js → BQDdlBEq.js} +1 -1
  14. package/.output/public/_nuxt/{CjND9Y9S.js → BR3-ptv5.js} +1 -1
  15. package/.output/public/_nuxt/{n-2mvXdi.js → BRH5q8nN.js} +1 -1
  16. package/.output/public/_nuxt/{D3uRvzsu.js → BS4dJyOO.js} +1 -1
  17. package/.output/public/_nuxt/{CWELpXTp.js → BYGFND6L.js} +1 -1
  18. package/.output/public/_nuxt/{BE1Ftxsu.js → BcPXljcj.js} +1 -1
  19. package/.output/public/_nuxt/{CDRiuU72.js → BcoI-YOI.js} +1 -1
  20. package/.output/public/_nuxt/{Bx15WLHx.js → Bdk3yVyS.js} +1 -1
  21. package/.output/public/_nuxt/{DpJr9JIo.js → BlV64rQV.js} +1 -1
  22. package/.output/public/_nuxt/{hYe2UtEI.js → BpRdnvfJ.js} +1 -1
  23. package/.output/public/_nuxt/{Q3VbeUEc.js → C1bpPepg.js} +1 -1
  24. package/.output/public/_nuxt/{BHpbNCa8.js → C1oPz7MO.js} +1 -1
  25. package/.output/public/_nuxt/{BF5itqHW.js → C8OPhRYB.js} +1 -1
  26. package/.output/public/_nuxt/{c0R8lEWK.js → C8yVYDPb.js} +1 -1
  27. package/.output/public/_nuxt/CG2NonkS.js +1 -0
  28. package/.output/public/_nuxt/{DorDSzHT.js → CH2hw3Xi.js} +1 -1
  29. package/.output/public/_nuxt/{DPdNpAt1.js → CIA-RxRA.js} +1 -1
  30. package/.output/public/_nuxt/{CqtB_OH7.js → CJvMkYTY.js} +1 -1
  31. package/.output/public/_nuxt/CNOvs2qj.js +1 -0
  32. package/.output/public/_nuxt/{B9-SkqjX.js → CRsWdsU-.js} +3 -3
  33. package/.output/public/_nuxt/{qNJDhLpf.js → CTqAOy_C.js} +1 -1
  34. package/.output/public/_nuxt/{DvdVpK92.js → Cb7wEgIm.js} +1 -1
  35. package/.output/public/_nuxt/{CHFxtqug.js → CenZ_oU4.js} +1 -1
  36. package/.output/public/_nuxt/{CORW7tev.js → ClGsRO4L.js} +1 -1
  37. package/.output/public/_nuxt/{C1d_VCXk.js → CqPsTVMx.js} +1 -1
  38. package/.output/public/_nuxt/{3dDT4orS.js → Cx5FqDdc.js} +1 -1
  39. package/.output/public/_nuxt/{BPSRe1xo.js → D-TP4IfX.js} +1 -1
  40. package/.output/public/_nuxt/{DjSp0ni5.js → D1Q9L7QE.js} +3 -3
  41. package/.output/public/_nuxt/{BatC3POU.js → D7FSwrD_.js} +1 -1
  42. package/.output/public/_nuxt/{BJnlSHzy.js → DEgvru_U.js} +1 -1
  43. package/.output/public/_nuxt/{BJGB6i4C.js → DGqUQ3kF.js} +1 -1
  44. package/.output/public/_nuxt/{BDW6A7V8.js → DGsDmUyW.js} +1 -1
  45. package/.output/public/_nuxt/{_Lx_e17m.js → DWPIRlMD.js} +1 -1
  46. package/.output/public/_nuxt/{BBTritm-.js → Dcy-p3Z6.js} +1 -1
  47. package/.output/public/_nuxt/DdlskHvY.js +1 -0
  48. package/.output/public/_nuxt/{BcwrT42V.js → DnGW0m4Y.js} +1 -1
  49. package/.output/public/_nuxt/{B-L8_kPw.js → Dni4zvfP.js} +1 -1
  50. package/.output/public/_nuxt/{DL-48EFA.js → Do_bcNCY.js} +1 -1
  51. package/.output/public/_nuxt/{rFVztcxU.js → Dp5e-aom.js} +1 -1
  52. package/.output/public/_nuxt/{0VxesDuV.js → Dp8a_bbp.js} +1 -1
  53. package/.output/public/_nuxt/{mbPYOeR0.js → DswkzKY7.js} +1 -1
  54. package/.output/public/_nuxt/{D6s--CDK.js → DwzmElrD.js} +1 -1
  55. package/.output/public/_nuxt/{CH4xRPqk.js → DxWHIfkW.js} +1 -1
  56. package/.output/public/_nuxt/{CohKcwVk.js → DzALV0JB.js} +1 -1
  57. package/.output/public/_nuxt/{CvEn06t8.js → EiEi2wiH.js} +1 -1
  58. package/.output/public/_nuxt/{x9aAWeiI.js → IWVv-BBf.js} +1 -1
  59. package/.output/public/_nuxt/{C819KIPL.js → OpmtRlfX.js} +1 -1
  60. package/.output/public/_nuxt/{C3g32ML-.js → RhTS06Sf.js} +1 -1
  61. package/.output/public/_nuxt/{CQakkP7y.js → TfSMshAC.js} +1 -1
  62. package/.output/public/_nuxt/builds/latest.json +1 -1
  63. package/.output/public/_nuxt/builds/meta/b5a96400-b290-45af-84b6-99ea0c93f0ef.json +1 -0
  64. package/.output/public/_nuxt/{CTidC4T0.js → cFgYOPT2.js} +1 -1
  65. package/.output/public/_nuxt/{Dku8fc7v.js → fpPxFzzn.js} +1 -1
  66. package/.output/public/_nuxt/{BP-5A3ad.js → kW_0tHNx.js} +1 -1
  67. package/.output/public/_nuxt/{CHQoxcLf.js → rY9HrSkB.js} +1 -1
  68. package/.output/public/_nuxt/{_dIH-mlE.js → tQz6yja3.js} +1 -1
  69. package/.output/public/_nuxt/{G3ENYyJJ.js → uYf0EMki.js} +1 -1
  70. package/.output/public/api/_openapi.json +1 -1
  71. package/.output/public/docs/api/index.html +1 -272
  72. package/.output/public/docs/cli/index.html +1 -24
  73. package/.output/public/index.html +1 -1
  74. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  75. package/.output/server/chunks/build/server.mjs +2 -2
  76. package/.output/server/chunks/build/styles.mjs +21 -21
  77. package/.output/server/chunks/nitro/nitro.mjs +413 -445
  78. package/.output/server/package.json +1 -1
  79. package/package.json +1 -1
  80. package/.output/public/_i18n/Mqu2gZRD/en/messages.json +0 -1
  81. package/.output/public/_i18n/Mqu2gZRD/fr/messages.json +0 -1
  82. package/.output/public/_nuxt/BqOlVwUK.js +0 -1
  83. package/.output/public/_nuxt/CKyM99yH.js +0 -1
  84. package/.output/public/_nuxt/DbKMezC2.js +0 -1
  85. package/.output/public/_nuxt/builds/meta/cbc2f99e-ecf0-446a-810b-808825114bc3.json +0 -1
  86. package/.output/public/_payload.json +0 -1
  87. package/.output/public/docs/api/_payload.json +0 -1
  88. package/.output/public/docs/cli/_payload.json +0 -1
@@ -1 +1 @@
1
- import{b5 as f}from"./DjSp0ni5.js";import{ab as d}from"./B9-SkqjX.js";function s({container:e,accept:r,walk:i,enabled:t}){d(()=>{let a=e.value;if(!a||t!==void 0&&!t.value)return;let c=f(e);if(!c)return;let l=Object.assign(n=>r(n),{acceptNode:r}),o=c.createTreeWalker(a,NodeFilter.SHOW_ELEMENT,l,!1);for(;o.nextNode();)i(o.currentNode)})}export{s as i};
1
+ import{b5 as f}from"./D1Q9L7QE.js";import{ab as d}from"./CRsWdsU-.js";function s({container:e,accept:r,walk:i,enabled:t}){d(()=>{let a=e.value;if(!a||t!==void 0&&!t.value)return;let c=f(e);if(!c)return;let l=Object.assign(n=>r(n),{acceptNode:r}),o=c.createTreeWalker(a,NodeFilter.SHOW_ELEMENT,l,!1);for(;o.nextNode();)i(o.currentNode)})}export{s as i};
@@ -1 +1 @@
1
- import{d as q,j as S,b as n,w as a,e as w,t as T,f as c,h as s,g as b,m as I,s as R,k as V,A as Q,c as y,F as C,q as D,a9 as X,al as M,ak as A,r as E,o as re,R as H,n as G}from"./B9-SkqjX.js";import{g as P,T as B,L as ne,bc as L,bd as N,z as J,be as ce,bf as ie,r as ue,bg as de,aA as g,ay as Y,aB as pe,bh as me,aS as fe,bi as he,k as ye,bj as ve,bk as be,M as Z,aD as we,N as ee,bl as xe,bm as ke,bn as Ve,bo as ge,bp as Se,bq as _e,n as $e,C as Ue,aC as Ce,aF as Ae}from"./DjSp0ni5.js";const Oe={class:"text-c-2 mb-4 text-sm leading-normal"},ze={class:"flex justify-between gap-2"},te=q({__name:"DeleteRequestAuthModal",props:{state:{},scheme:{}},emits:["close","delete"],setup(l,{emit:U}){const f=l,h=U,{securitySchemeMutators:x}=P(),k=()=>{f.scheme?.id&&x.delete(f.scheme.id),h("delete")};return(o,p)=>(n(),S(s(ne),{size:"xxs",state:o.state,title:"Delete Security Scheme"},{default:a(()=>[w("p",Oe," This cannot be undone. You're about to delete the "+T(o.scheme?.label)+" security scheme from the collection. ",1),w("div",ze,[c(s(B),{class:"flex h-8 cursor-pointer items-center gap-1.5 px-3 shadow-none focus:outline-none",type:"button",variant:"outlined",onClick:p[0]||(p[0]=i=>h("close"))},{default:a(()=>[...p[1]||(p[1]=[b(" Cancel ",-1)])]),_:1}),c(s(B),{class:"flex h-8 cursor-pointer items-center gap-1.5 px-3 shadow-none focus:outline-none",type:"submit",onClick:k},{default:a(()=>[b(" Delete "+T(o.scheme?.label),1)]),_:1})])]),_:1},8,["state"]))}}),le=(l,U,f,{securitySchemeMutators:h,securitySchemes:x},k=!1)=>{if(h.edit(l,U,f),!!k)try{const o=JSON.parse(L().getItem(N.AUTH)??"{}"),p=x[l];if(o&&p?.nameKey){const i=o[p.nameKey]||={};i[U]=f,L().setItem(N.AUTH,JSON.stringify(o))}}catch(o){console.error(o)}},Te=(l,U)=>{try{const{collectionMutators:f,securitySchemes:h,securitySchemeMutators:x}=l,k=JSON.parse(L().getItem(N.AUTH)??"{}"),o=Object.keys(h).reduce((i,t)=>{const e=h[t];return e&&(i[e.nameKey]=e.uid),i},{});Object.entries(k).forEach(([i,t])=>{const e=o[i];e&&Object.entries(t).forEach(([r,u])=>{x.edit(e,r,u)})});const p=JSON.parse(L().getItem(N.SELECTED_SECURITY_SCHEMES)??"[]").map(i=>Array.isArray(i)?i.map(t=>o[t]).filter(J):o[i]).filter(J);f.edit(U,"selectedSecuritySchemeUids",p)}catch(f){console.error(f)}},Ie={class:"flex h-fit w-full"},Re={class:"flex-1"},Be={class:"flex items-center gap-1.75"},qe={class:"grid auto-rows-auto",style:{gridTemplateColumns:"1fr auto"}},je={key:0},Ee={class:"font-code text-xs"},Me=q({__name:"OAuthScopesInput",props:{flow:{},updateScheme:{type:Function}},setup(l){const U=I(()=>Object.entries(l.flow?.scopes??{}).map(([p,i])=>({id:p,label:p,description:i}))),f=I(()=>l.flow?.selectedScopes||[]);function h(p,i){i?l.updateScheme(`flows.${l.flow.type}.selectedScopes`,[...f.value,p]):l.updateScheme(`flows.${l.flow.type}.selectedScopes`,f.value.filter(t=>t!==p))}const x=I(()=>l.flow?.selectedScopes?.length===Object.keys(l.flow?.scopes??{}).length),k=()=>{l.updateScheme(`flows.${l.flow.type}.selectedScopes`,Object.keys(l.flow?.scopes??{}))},o=()=>{l.updateScheme(`flows.${l.flow.type}.selectedScopes`,[])};return(p,i)=>(n(),S(s(Y),{class:"h-auto !max-h-[initial] min-h-8 items-center"},{default:a(()=>[w("div",Ie,[i[2]||(i[2]=w("div",{class:"text-c-1 h-full items-center"},null,-1)),c(s(ce),{as:"div",class:"bl flex w-full flex-col"},{default:a(()=>[c(s(ie),{class:R(["group/scopes-accordion hover:text-c-1 flex h-auto min-h-8 cursor-pointer items-center gap-1.5 pr-2.25 pl-3 text-left",(p.flow?.selectedScopes?.length||0)>0?"text-c-1":"text-c-3"])},{default:a(({open:t})=>[w("div",Re," Scopes Selected "+T(p.flow?.selectedScopes?.length||0)+" / "+T(Object.keys(p.flow?.scopes??{}).length||0),1),w("div",Be,[x.value?(n(),S(s(B),{key:0,class:"pr-0.75 pl-1 transition-none",size:"sm",variant:"ghost",onClick:Q(o,["stop"])},{default:a(()=>[...i[0]||(i[0]=[b(" Deselect All ",-1)])]),_:1})):V("",!0),x.value?V("",!0):(n(),S(s(B),{key:1,class:"pr-0.75 pl-1 transition-none",size:"sm",variant:"ghost",onClick:Q(k,["stop"])},{default:a(()=>[...i[1]||(i[1]=[b(" Select All ",-1)])]),_:1})),c(s(ue),{class:"text-c-3 group-hover/scopes-accordion:text-c-2",icon:t?"ChevronDown":"ChevronRight",size:"md"},null,8,["icon"])])]),_:1},8,["class"]),c(s(de),{as:"template"},{default:a(()=>[w("table",qe,[(n(!0),y(C,null,D(U.value,({id:t,label:e,description:r})=>(n(),S(s(g),{key:t,class:"text-c-2",onClick:u=>h(t,!f.value.includes(t))},{default:a(()=>[c(s(Y),{class:"hover:text-c-1 box-border !max-h-[initial] w-full cursor-pointer px-3 py-1.5"},{default:a(()=>[r?(n(),y("div",je,[w("span",Ee,T(e),1),b(" – "+T(r),1)])):V("",!0)]),_:2},1024),c(s(pe),{modelValue:f.value.includes(t),"onUpdate:modelValue":()=>{}},null,8,["modelValue"])]),_:2},1032,["onClick"]))),128))])]),_:1})]),_:1})])]),_:1}))}}),Fe=["for"],z=q({__name:"RequestAuthDataTableInput",props:{type:{},containerClass:{},required:{type:Boolean,default:!1},modelValue:{},readOnly:{type:Boolean,default:!1},environment:{},envVariables:{},workspace:{}},emits:["update:modelValue","inputFocus","inputBlur","selectVariable"],setup(l,{emit:U}){const f=l,h=U,x=X();return(k,o)=>(n(),S(me,A({id:s(x),canAddCustomEnumValue:!f.readOnly,containerClass:f.containerClass},k.$attrs,{envVariables:f.envVariables,environment:f.environment,lineWrapping:"",modelValue:f.modelValue,readOnly:f.readOnly,required:f.required,type:f.type,workspace:f.workspace,onInputBlur:o[0]||(o[0]=p=>h("inputBlur")),onInputFocus:o[1]||(o[1]=p=>h("inputFocus")),onSelectVariable:o[2]||(o[2]=p=>h("selectVariable",p)),"onUpdate:modelValue":o[3]||(o[3]=p=>h("update:modelValue",p))}),{default:a(()=>[w("label",{for:s(x)},[M(k.$slots,"default")],8,Fe)]),icon:a(()=>[M(k.$slots,"icon")]),_:3},16,["id","canAddCustomEnumValue","containerClass","envVariables","environment","modelValue","readOnly","required","type","workspace"]))}}),De={class:"flex h-8 items-center justify-end border-t"},Le={class:"flex h-8 w-full items-center justify-end border-t"},Ne=q({__name:"OAuth2",props:{collection:{},environment:{},envVariables:{},flow:{},persistAuth:{type:Boolean,default:!1},scheme:{},server:{},workspace:{}},emits:["authorized"],setup(l,{emit:U}){const f=U,h=fe(),{toast:x}=ye(),k=P(),o=(t,e)=>le(l.scheme.uid,t,e,k,l.persistAuth),p=async()=>{if(h.isActive||!l.collection?.uid)return;if(!l.server){x("No server selected","error");return}h.start();const[t,e]=await ve(l.flow,l.server,l.workspace?.proxyUrl);await h.clear(),e?(o(`flows.${l.flow.type}.token`,e),f("authorized")):(console.error(t),x(t?.message??"Failed to authorize","error"))},i={environment:l.environment,envVariables:l.envVariables,workspace:l.workspace};return(t,e)=>(n(),y(C,null,[t.flow.token?(n(),y(C,{key:0},[c(s(g),null,{default:a(()=>[c(z,A(i,{class:"border-r-transparent",modelValue:t.flow.token,placeholder:"QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",type:"password","onUpdate:modelValue":e[0]||(e[0]=r=>o(`flows.${t.flow.type}.token`,r))}),{default:a(()=>[...e[10]||(e[10]=[b(" Access Token ",-1)])]),_:1},16,["modelValue"])]),_:1}),c(s(g),{class:"min-w-full"},{default:a(()=>[w("div",De,[c(s(B),{class:"mr-1 p-0 px-2 py-0.5",loader:s(h),size:"sm",variant:"outlined",onClick:e[1]||(e[1]=r=>o(`flows.${t.flow.type}.token`,""))},{default:a(()=>[...e[11]||(e[11]=[b(" Clear ",-1)])]),_:1},8,["loader"]),M(t.$slots,"oauth-actions")])]),_:3})],64)):(n(),y(C,{key:1},[c(s(g),null,{default:a(()=>["authorizationUrl"in t.flow?(n(),S(z,A({key:0},i,{containerClass:"border-r-0",modelValue:t.flow.authorizationUrl,placeholder:"https://galaxy.scalar.com/authorize","onUpdate:modelValue":e[2]||(e[2]=r=>o(`flows.${t.flow.type}.authorizationUrl`,r))}),{default:a(()=>[...e[12]||(e[12]=[b(" Auth URL ",-1)])]),_:1},16,["modelValue"])):V("",!0),"tokenUrl"in t.flow?(n(),S(z,A({key:1},i,{modelValue:t.flow.tokenUrl,placeholder:"https://galaxy.scalar.com/token","onUpdate:modelValue":e[3]||(e[3]=r=>o(`flows.${t.flow.type}.tokenUrl`,r))}),{default:a(()=>[...e[13]||(e[13]=[b(" Token URL ",-1)])]),_:1},16,["modelValue"])):V("",!0)]),_:1}),"x-scalar-redirect-uri"in t.flow?(n(),S(s(g),{key:0},{default:a(()=>[c(z,A(i,{modelValue:t.flow["x-scalar-redirect-uri"],placeholder:"https://galaxy.scalar.com/callback","onUpdate:modelValue":e[4]||(e[4]=r=>o(`flows.${t.flow.type}.x-scalar-redirect-uri`,r))}),{default:a(()=>[...e[14]||(e[14]=[b(" Redirect URL ",-1)])]),_:1},16,["modelValue"])]),_:1})):V("",!0),t.flow.type==="password"?(n(),y(C,{key:1},[c(s(g),null,{default:a(()=>[c(z,A(i,{class:"text-c-2",modelValue:t.flow.username,placeholder:"janedoe","onUpdate:modelValue":e[5]||(e[5]=r=>o(`flows.${t.flow.type}.username`,r))}),{default:a(()=>[...e[15]||(e[15]=[b(" Username ",-1)])]),_:1},16,["modelValue"])]),_:1}),c(s(g),null,{default:a(()=>[c(z,A(i,{modelValue:t.flow.password,placeholder:"********",type:"password","onUpdate:modelValue":e[6]||(e[6]=r=>o(`flows.${t.flow.type}.password`,r))}),{default:a(()=>[...e[16]||(e[16]=[b(" Password ",-1)])]),_:1},16,["modelValue"])]),_:1})],64)):V("",!0),c(s(g),null,{default:a(()=>[c(z,A(i,{modelValue:t.flow["x-scalar-client-id"],placeholder:"12345","onUpdate:modelValue":e[7]||(e[7]=r=>o(`flows.${t.flow.type}.x-scalar-client-id`,r))}),{default:a(()=>[...e[17]||(e[17]=[b(" Client ID ",-1)])]),_:1},16,["modelValue"])]),_:1}),"clientSecret"in t.flow?(n(),S(s(g),{key:2},{default:a(()=>[c(z,A(i,{modelValue:t.flow.clientSecret,placeholder:"XYZ123",type:"password","onUpdate:modelValue":e[8]||(e[8]=r=>o(`flows.${t.flow.type}.clientSecret`,r))}),{default:a(()=>[...e[18]||(e[18]=[b(" Client Secret ",-1)])]),_:1},16,["modelValue"])]),_:1})):V("",!0),"x-usePkce"in t.flow?(n(),S(s(g),{key:3},{default:a(()=>[c(z,A(i,{enum:s(he),modelValue:t.flow["x-usePkce"],readOnly:"","onUpdate:modelValue":e[9]||(e[9]=r=>o(`flows.${t.flow.type}.x-usePkce`,r))}),{default:a(()=>[...e[19]||(e[19]=[b(" Use PKCE ",-1)])]),_:1},16,["enum","modelValue"])]),_:1})):V("",!0),Object.keys(t.flow.scopes??{}).length?(n(),S(s(g),{key:4},{default:a(()=>[c(Me,{flow:t.flow,updateScheme:o},null,8,["flow"])]),_:1})):V("",!0)],64)),t.flow.token?V("",!0):(n(),S(s(g),{key:2,class:"min-w-full"},{default:a(()=>[w("div",Le,[c(s(B),{class:"mr-0.75 p-0 px-2 py-0.5",loader:s(h),size:"sm",variant:"outlined",onClick:p},{default:a(()=>[...e[20]||(e[20]=[b(" Authorize ",-1)])]),_:1},8,["loader"])])]),_:1}))],64))}}),Pe={class:"bg-b-1 text-c-2 outline-b-3 top-0 z-1 h-full w-full overflow-hidden px-3 py-1.25 text-ellipsis group-hover/auth:absolute group-hover/auth:h-auto group-hover/auth:border-b *:first:line-clamp-1 *:first:text-ellipsis group-hover/auth:*:first:line-clamp-none"},Ke={key:0,class:"flex min-h-8 border-t text-base"},He={class:"flex h-8 max-w-full gap-2.5 overflow-x-auto px-3"},Qe=["onClick"],Je={class:"relative z-10"},Ye=q({__name:"RequestAuthTab",props:{collection:{},environment:{},envVariables:{},layout:{},persistAuth:{type:Boolean,default:!1},securitySchemeUids:{},server:{},workspace:{}},emits:["authorized"],setup(l,{emit:U}){const f=U,h=P(),{securitySchemes:x}=h,k=I(()=>l.securitySchemeUids.map(e=>({scheme:x[e]}))),o=E(""),p=e=>{const r=e.description?`: ${e.description}`:"",u=`${H(e.nameKey)}${r||`: ${e.type}`}`;if(e.type==="apiKey")return`${H(e.nameKey)}${r||`: ${e.in}`}`;if(e.type==="oauth2"){const _=Object.values(e.flows??{})[0];return`${H(e.nameKey)}: ${o.value?o.value:_?.type??""}${r}`}return e.type==="http"?`${H(e.nameKey)}: ${e.scheme}${r}`:`${u}${r}`},i=(e,r,u)=>{le(e,r,u,h,l.persistAuth)};re(()=>{l.persistAuth&&Te(h,l.collection.uid)});const t={environment:l.environment,envVariables:l.envVariables,workspace:l.workspace};return(e,r)=>(n(!0),y(C,null,D(k.value,({scheme:u})=>(n(),y(C,{key:u?.uid},[k.value.length>1&&u?(n(),S(s(g),{key:0},{default:a(()=>[c(s(Y),{"aria-label":p(u),class:"text-c-2 group/auth flex items-center leading-[22px] whitespace-nowrap outline-none hover:whitespace-normal"},{default:a(()=>[w("p",Pe,T(p(u)),1)]),_:2},1032,["aria-label"])]),_:2},1024)):V("",!0),u?.description&&k.value.length<=1?(n(),S(s(g),{key:1},{default:a(()=>[c(s(Y),{"aria-label":u.description,class:"max-h-[auto]"},{default:a(()=>[c(s(be),{class:"auth-description bg-b-1 text-c-2 min-w-0 flex-1 px-3 py-1.25",value:u.description},null,8,["value"])]),_:2},1032,["aria-label"])]),_:2},1024)):V("",!0),u?.type==="http"?(n(),y(C,{key:2},[u.scheme==="bearer"?(n(),S(s(g),{key:0},{default:a(()=>[c(z,A({ref_for:!0},t,{containerClass:e.layout==="reference"&&"border-t",modelValue:u.token,placeholder:"Token",type:"password","onUpdate:modelValue":_=>i(u.uid,"token",_)}),{default:a(()=>[...r[1]||(r[1]=[b(" Bearer Token ",-1)])]),_:1},16,["containerClass","modelValue","onUpdate:modelValue"])]),_:2},1024)):u?.scheme==="basic"?(n(),y(C,{key:1},[c(s(g),null,{default:a(()=>[c(z,A({ref_for:!0},t,{class:"text-c-2",modelValue:u.username,placeholder:"janedoe",required:"","onUpdate:modelValue":_=>i(u.uid,"username",_)}),{default:a(()=>[...r[2]||(r[2]=[b(" Username ",-1)])]),_:1},16,["modelValue","onUpdate:modelValue"])]),_:2},1024),c(s(g),null,{default:a(()=>[c(z,A({ref_for:!0},t,{modelValue:u.password,placeholder:"********",type:"password","onUpdate:modelValue":_=>i(u.uid,"password",_)}),{default:a(()=>[...r[3]||(r[3]=[b(" Password ",-1)])]),_:1},16,["modelValue","onUpdate:modelValue"])]),_:2},1024)],64)):V("",!0)],64)):u?.type==="apiKey"?(n(),y(C,{key:3},[c(s(g),null,{default:a(()=>[c(z,A({ref_for:!0},t,{containerClass:e.layout==="reference"&&"border-t",modelValue:u.name,placeholder:"api-key","onUpdate:modelValue":_=>i(u.uid,"name",_)}),{default:a(()=>[...r[4]||(r[4]=[b(" Name ",-1)])]),_:1},16,["containerClass","modelValue","onUpdate:modelValue"])]),_:2},1024),c(s(g),null,{default:a(()=>[c(z,A({ref_for:!0},t,{modelValue:u.value,placeholder:"QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",type:"password","onUpdate:modelValue":_=>i(u.uid,"value",_)}),{default:a(()=>[...r[5]||(r[5]=[b(" Value ",-1)])]),_:1},16,["modelValue","onUpdate:modelValue"])]),_:2},1024)],64)):u?.type==="oauth2"?(n(),y(C,{key:4},[c(s(g),null,{default:a(()=>[Object.keys(u.flows).length>1?(n(),y("div",Ke,[w("div",He,[(n(!0),y(C,null,D(u?.flows,(_,O,j)=>(n(),y("button",{key:O,class:R(["floating-bg text-c-3 relative cursor-pointer border-b-[1px] border-transparent py-1 text-base font-medium",{"!text-c-1 !rounded-none border-b-[1px] !border-current":e.layout!=="reference"&&(o.value===O||j===0&&!o.value),"!text-c-1 !rounded-none border-b-[1px] !border-current opacity-100":e.layout==="reference"&&(o.value===O||j===0&&!o.value)}]),type:"button",onClick:K=>o.value=O},[w("span",Je,T(O),1)],10,Qe))),128))])])):V("",!0)]),_:2},1024),(n(!0),y(C,null,D(u?.flows,(_,O,j)=>(n(),y(C,{key:O},[o.value===O||j===0&&!o.value?(n(),S(Ne,A({key:0,ref_for:!0},t,{collection:e.collection,flow:_,persistAuth:e.persistAuth,scheme:u,server:e.server,workspace:e.workspace,onAuthorized:r[0]||(r[0]=K=>f("authorized"))}),{"oauth-actions":a(()=>[M(e.$slots,"oauth-actions")]),_:3},16,["collection","flow","persistAuth","scheme","server","workspace"])):V("",!0)],64))),128))],64)):u?.type==="openIdConnect"?(n(),y("div",{key:5,class:R(["text-c-3 bg-b-1 flex min-h-[calc(4rem+1px)] items-center justify-center border-t border-b-0 px-4 text-base",{"rounded-b-lg":e.layout==="reference"}])}," Coming soon ",2)):V("",!0)],64))),128))}}),We=["onClick"],Ge={class:"relative z-10 font-medium whitespace-nowrap"},Xe={key:0,class:"absolute inset-x-1 bottom-[var(--scalar-border-width)] left-1/2 z-1 h-px w-full -translate-x-1/2 bg-current"},Ze=q({__name:"RequestAuthDataTable",props:{collection:{},environment:{},envVariables:{},layout:{default:"client"},persistAuth:{type:Boolean,default:!1},selectedSchemeOptions:{default:()=>[]},server:{},workspace:{}},emits:["authorized","activeSchemes"],setup(l,{emit:U}){const f=U,{securitySchemes:h}=P(),x=Z(),k=E(null),o=E(0),p=I(()=>{if(!l.selectedSchemeOptions||l.selectedSchemeOptions.length===0)return[];const t=l.selectedSchemeOptions[o.value];if(!t)return[];const e=t.id.split(",").filter(Boolean);return e.length>1?e:[t.id]});G(p,t=>{f("activeSchemes",t.map(e=>h[e]).filter(J))},{immediate:!0});const i=I(()=>p.value.length>0);return G(()=>l.selectedSchemeOptions,t=>{(!t||!t[o.value])&&(o.value=Math.max(0,o.value-1))}),(t,e)=>(n(),y("form",{onSubmit:e[2]||(e[2]=Q(()=>{},["prevent"]))},[t.selectedSchemeOptions.length>1?(n(),y("div",{key:0,class:R(["box-content flex flex-wrap gap-x-2.5 overflow-hidden border border-b-0 px-3",t.layout==="client"&&"border-x-0"])},[(n(!0),y(C,null,D(t.selectedSchemeOptions,(r,u)=>(n(),y("div",{key:r.id,class:R(["relative z-1 -mb-[var(--scalar-border-width)] flex h-8 cursor-pointer",[o.value===u?"text-c-1":"text-c-3"]])},[w("button",{class:"floating-bg relative cursor-pointer border-b-[1px] border-transparent py-1 text-sm font-medium",type:"button",onClick:_=>o.value=u},[w("span",Ge,T(r.label),1)],8,We),o.value===u?(n(),y("div",Xe)):V("",!0)],2))),128))],2)):V("",!0),i.value?(n(),S(s(we),{key:1,class:R(["flex-1",t.layout==="reference"&&"bg-b-1 rounded-b-lg border border-t-0"]),columns:[""],presentational:""},{default:a(()=>[c(Ye,{collection:t.collection,envVariables:t.envVariables,environment:t.environment,layout:t.layout,persistAuth:t.persistAuth,securitySchemeUids:p.value,server:t.server,workspace:t.workspace,onAuthorized:e[0]||(e[0]=r=>f("authorized"))},{"oauth-actions":a(()=>[M(t.$slots,"oauth-actions",{},void 0,!0)]),_:3},8,["collection","envVariables","environment","layout","persistAuth","securitySchemeUids","server","workspace"])]),_:3},8,["class"])):(n(),y("div",{key:2,class:R(["text-c-3 bg-b-1 flex min-h-16 items-center justify-center border-t px-4 text-sm",t.layout==="reference"&&"min-h-[calc(4rem+0.5px)] rounded-b-lg border"])}," No authentication selected ",2)),c(te,{scheme:k.value,state:s(x),onClose:e[1]||(e[1]=r=>s(x).hide())},null,8,["scheme","state"])],32))}}),et=ee(Ze,[["__scopeId","data-v-0bb98074"]]),tt=["id"],lt={class:"flex flex-1"},at={class:"min-w-0 flex-1 truncate"},ot=q({__name:"RequestAuth",props:{collection:{},isReadOnly:{type:Boolean,default:!1},environment:{},envVariables:{},layout:{},operation:{},persistAuth:{type:Boolean,default:!1},selectedSecuritySchemeUids:{},server:{},title:{},workspace:{}},emits:["authorized","activeSchemes"],setup(l,{emit:U}){const f=U,{securitySchemes:h,securitySchemeMutators:x,requestMutators:k,collectionMutators:o}=P(),p=X(),i=E(null),t=Z(),e=E(null),r=E(!1),u=I(()=>{const m=xe(l.operation,l.collection);return{filteredRequirements:m.filter(d=>Object.keys(d).length),requirements:m}}),_=I(()=>{const{filteredRequirements:m,requirements:d}=u.value;if(!d.length)return null;const v=!d.some($=>Object.keys($).length>1)&&m.length<d.length;return{icon:v?"Unlock":"Lock",text:v?"Optional":"Required"}}),O=I(()=>l.selectedSecuritySchemeUids.map(m=>{if(Array.isArray(m))return ke(m,h);const d=h[m??""];if(d)return Ve(d)}).filter(J));function j(m){const d=m.find($=>$.payload),v=m.filter($=>!$.payload).map(({id:$})=>{const F=$.split(",");return F.length>1?F:$});if(d?.payload){const $=x.add(d.payload,l.collection?.uid);$&&v.push($.uid)}K(v)}const K=m=>{if(l.collection.useCollectionSecurity){if(o.edit(l.collection.uid,"selectedSecuritySchemeUids",m),!l.persistAuth)return;const d=m.map(v=>Array.isArray(v)?v.map($=>h[$]?.nameKey):h[v]?.nameKey);L().setItem(N.SELECTED_SECURITY_SCHEMES,JSON.stringify(d))}else l.operation?.uid&&k.edit(l.operation.uid,"selectedSecuritySchemeUids",m)};function W({id:m,label:d}){e.value={id:m,label:d},t.show()}const ae=m=>{if(!m)return;const d=l.selectedSecuritySchemeUids.filter(v=>{const $=m.split(",");return $.length>1&&Array.isArray(v)&&$.length===v.length?v.every(F=>!$.includes(F)):v!==m});K(d),i.value?.$el.focus(),t.hide()},oe=I(()=>ge(u.value.filteredRequirements,l.collection?.securitySchemes??[],h,l.isReadOnly)),se=m=>{r.value&&m.stopPropagation(),i.value?.$el.click()};return(m,d)=>(n(),S(Ae,{class:"group/params relative",itemCount:O.value.length,layout:m.layout,"onUpdate:modelValue":d[4]||(d[4]=v=>r.value=v)},{title:a(()=>[w("div",{id:s(p),class:"inline-flex items-center gap-0.5 leading-[20px]"},[w("span",null,T(m.title),1),_.value?(n(),y("span",{key:0,class:R(["text-c-3 hover:bg-b-3 hover:text-c-1 -mr-1 cursor-pointer rounded px-1 py-0.5 text-xs leading-[normal]",{"text-c-1":_.value.text==="Required"}]),onClick:se},T(_.value.text),3)):V("",!0)],8,tt)]),actions:a(()=>[w("div",lt,[c(s(Se),{class:"w-72 text-xs",modelValue:O.value,multiple:"",options:oe.value,placement:"bottom-end",teleport:"",onDelete:W,"onUpdate:modelValue":j},{option:a(({option:v,selected:$})=>[c(s($e),{multiselect:"",selected:$},null,8,["selected"]),w("div",at,T(v.label),1),v.isDeletable??!m.isReadOnly?(n(),S(s(Ue),{key:0,class:"-m-0.5 shrink-0 p-0.5 opacity-0 group-hover/item:opacity-100",icon:s(Ce),label:`Delete ${v.label}`,size:"xs",onClick:Q(F=>W(v),["stop"])},null,8,["icon","label","onClick"])):V("",!0)]),default:a(()=>[c(s(B),{ref_key:"comboboxButtonRef",ref:i,"aria-describedby":s(p),class:"group/combobox-button hover:text-c-1 text-c-2 flex h-fit w-full items-center gap-1 px-0.75 py-0.25 text-base font-normal transition-transform",variant:"ghost"},{default:a(()=>[O.value.length===1?(n(),y(C,{key:0},[d[5]||(d[5]=w("span",{class:"sr-only"},"Selected Auth Type:",-1)),b(" "+T(O.value[0]?.label),1)],64)):O.value.length>1?(n(),y(C,{key:1},[d[6]||(d[6]=b(" Multiple ",-1)),d[7]||(d[7]=w("span",{class:"sr-only"},"Auth Types Selected",-1))],64)):(n(),y(C,{key:2},[d[8]||(d[8]=w("span",{class:"sr-only"},"Select",-1)),d[9]||(d[9]=b(" Auth Type ",-1))],64)),c(s(_e),{class:"size-3 shrink-0 transition-transform duration-100 group-aria-expanded/combobox-button:rotate-180",weight:"bold"})]),_:1},8,["aria-describedby"])]),_:1},8,["modelValue","options"])])]),default:a(()=>[c(et,{collection:m.collection,envVariables:m.envVariables,environment:m.environment,layout:m.layout,persistAuth:m.persistAuth,selectedSchemeOptions:O.value,server:m.server,workspace:m.workspace,onActiveSchemes:d[0]||(d[0]=v=>f("activeSchemes",v)),onAuthorized:d[1]||(d[1]=v=>f("authorized"))},{"oauth-actions":a(()=>[M(m.$slots,"oauth-actions",{},void 0,!0)]),_:3},8,["collection","envVariables","environment","layout","persistAuth","selectedSchemeOptions","server","workspace"]),c(te,{scheme:e.value,state:s(t),onClose:d[2]||(d[2]=v=>s(t).hide()),onDelete:d[3]||(d[3]=v=>ae(e.value?.id))},null,8,["scheme","state"])]),_:3},8,["itemCount","layout"]))}}),nt=ee(ot,[["__scopeId","data-v-3f1067a4"]]);export{nt as f};
1
+ import{d as q,j as S,b as n,w as a,e as w,t as T,f as c,h as s,g as b,m as I,s as R,k as V,A as Q,c as y,F as C,q as D,a9 as X,al as M,ak as A,r as E,o as re,R as H,n as G}from"./CRsWdsU-.js";import{g as P,T as B,L as ne,bc as L,bd as N,z as J,be as ce,bf as ie,r as ue,bg as de,aA as g,ay as Y,aB as pe,bh as me,aS as fe,bi as he,k as ye,bj as ve,bk as be,M as Z,aD as we,N as ee,bl as xe,bm as ke,bn as Ve,bo as ge,bp as Se,bq as _e,n as $e,C as Ue,aC as Ce,aF as Ae}from"./D1Q9L7QE.js";const Oe={class:"text-c-2 mb-4 text-sm leading-normal"},ze={class:"flex justify-between gap-2"},te=q({__name:"DeleteRequestAuthModal",props:{state:{},scheme:{}},emits:["close","delete"],setup(l,{emit:U}){const f=l,h=U,{securitySchemeMutators:x}=P(),k=()=>{f.scheme?.id&&x.delete(f.scheme.id),h("delete")};return(o,p)=>(n(),S(s(ne),{size:"xxs",state:o.state,title:"Delete Security Scheme"},{default:a(()=>[w("p",Oe," This cannot be undone. You're about to delete the "+T(o.scheme?.label)+" security scheme from the collection. ",1),w("div",ze,[c(s(B),{class:"flex h-8 cursor-pointer items-center gap-1.5 px-3 shadow-none focus:outline-none",type:"button",variant:"outlined",onClick:p[0]||(p[0]=i=>h("close"))},{default:a(()=>[...p[1]||(p[1]=[b(" Cancel ",-1)])]),_:1}),c(s(B),{class:"flex h-8 cursor-pointer items-center gap-1.5 px-3 shadow-none focus:outline-none",type:"submit",onClick:k},{default:a(()=>[b(" Delete "+T(o.scheme?.label),1)]),_:1})])]),_:1},8,["state"]))}}),le=(l,U,f,{securitySchemeMutators:h,securitySchemes:x},k=!1)=>{if(h.edit(l,U,f),!!k)try{const o=JSON.parse(L().getItem(N.AUTH)??"{}"),p=x[l];if(o&&p?.nameKey){const i=o[p.nameKey]||={};i[U]=f,L().setItem(N.AUTH,JSON.stringify(o))}}catch(o){console.error(o)}},Te=(l,U)=>{try{const{collectionMutators:f,securitySchemes:h,securitySchemeMutators:x}=l,k=JSON.parse(L().getItem(N.AUTH)??"{}"),o=Object.keys(h).reduce((i,t)=>{const e=h[t];return e&&(i[e.nameKey]=e.uid),i},{});Object.entries(k).forEach(([i,t])=>{const e=o[i];e&&Object.entries(t).forEach(([r,u])=>{x.edit(e,r,u)})});const p=JSON.parse(L().getItem(N.SELECTED_SECURITY_SCHEMES)??"[]").map(i=>Array.isArray(i)?i.map(t=>o[t]).filter(J):o[i]).filter(J);f.edit(U,"selectedSecuritySchemeUids",p)}catch(f){console.error(f)}},Ie={class:"flex h-fit w-full"},Re={class:"flex-1"},Be={class:"flex items-center gap-1.75"},qe={class:"grid auto-rows-auto",style:{gridTemplateColumns:"1fr auto"}},je={key:0},Ee={class:"font-code text-xs"},Me=q({__name:"OAuthScopesInput",props:{flow:{},updateScheme:{type:Function}},setup(l){const U=I(()=>Object.entries(l.flow?.scopes??{}).map(([p,i])=>({id:p,label:p,description:i}))),f=I(()=>l.flow?.selectedScopes||[]);function h(p,i){i?l.updateScheme(`flows.${l.flow.type}.selectedScopes`,[...f.value,p]):l.updateScheme(`flows.${l.flow.type}.selectedScopes`,f.value.filter(t=>t!==p))}const x=I(()=>l.flow?.selectedScopes?.length===Object.keys(l.flow?.scopes??{}).length),k=()=>{l.updateScheme(`flows.${l.flow.type}.selectedScopes`,Object.keys(l.flow?.scopes??{}))},o=()=>{l.updateScheme(`flows.${l.flow.type}.selectedScopes`,[])};return(p,i)=>(n(),S(s(Y),{class:"h-auto !max-h-[initial] min-h-8 items-center"},{default:a(()=>[w("div",Ie,[i[2]||(i[2]=w("div",{class:"text-c-1 h-full items-center"},null,-1)),c(s(ce),{as:"div",class:"bl flex w-full flex-col"},{default:a(()=>[c(s(ie),{class:R(["group/scopes-accordion hover:text-c-1 flex h-auto min-h-8 cursor-pointer items-center gap-1.5 pr-2.25 pl-3 text-left",(p.flow?.selectedScopes?.length||0)>0?"text-c-1":"text-c-3"])},{default:a(({open:t})=>[w("div",Re," Scopes Selected "+T(p.flow?.selectedScopes?.length||0)+" / "+T(Object.keys(p.flow?.scopes??{}).length||0),1),w("div",Be,[x.value?(n(),S(s(B),{key:0,class:"pr-0.75 pl-1 transition-none",size:"sm",variant:"ghost",onClick:Q(o,["stop"])},{default:a(()=>[...i[0]||(i[0]=[b(" Deselect All ",-1)])]),_:1})):V("",!0),x.value?V("",!0):(n(),S(s(B),{key:1,class:"pr-0.75 pl-1 transition-none",size:"sm",variant:"ghost",onClick:Q(k,["stop"])},{default:a(()=>[...i[1]||(i[1]=[b(" Select All ",-1)])]),_:1})),c(s(ue),{class:"text-c-3 group-hover/scopes-accordion:text-c-2",icon:t?"ChevronDown":"ChevronRight",size:"md"},null,8,["icon"])])]),_:1},8,["class"]),c(s(de),{as:"template"},{default:a(()=>[w("table",qe,[(n(!0),y(C,null,D(U.value,({id:t,label:e,description:r})=>(n(),S(s(g),{key:t,class:"text-c-2",onClick:u=>h(t,!f.value.includes(t))},{default:a(()=>[c(s(Y),{class:"hover:text-c-1 box-border !max-h-[initial] w-full cursor-pointer px-3 py-1.5"},{default:a(()=>[r?(n(),y("div",je,[w("span",Ee,T(e),1),b(" – "+T(r),1)])):V("",!0)]),_:2},1024),c(s(pe),{modelValue:f.value.includes(t),"onUpdate:modelValue":()=>{}},null,8,["modelValue"])]),_:2},1032,["onClick"]))),128))])]),_:1})]),_:1})])]),_:1}))}}),Fe=["for"],z=q({__name:"RequestAuthDataTableInput",props:{type:{},containerClass:{},required:{type:Boolean,default:!1},modelValue:{},readOnly:{type:Boolean,default:!1},environment:{},envVariables:{},workspace:{}},emits:["update:modelValue","inputFocus","inputBlur","selectVariable"],setup(l,{emit:U}){const f=l,h=U,x=X();return(k,o)=>(n(),S(me,A({id:s(x),canAddCustomEnumValue:!f.readOnly,containerClass:f.containerClass},k.$attrs,{envVariables:f.envVariables,environment:f.environment,lineWrapping:"",modelValue:f.modelValue,readOnly:f.readOnly,required:f.required,type:f.type,workspace:f.workspace,onInputBlur:o[0]||(o[0]=p=>h("inputBlur")),onInputFocus:o[1]||(o[1]=p=>h("inputFocus")),onSelectVariable:o[2]||(o[2]=p=>h("selectVariable",p)),"onUpdate:modelValue":o[3]||(o[3]=p=>h("update:modelValue",p))}),{default:a(()=>[w("label",{for:s(x)},[M(k.$slots,"default")],8,Fe)]),icon:a(()=>[M(k.$slots,"icon")]),_:3},16,["id","canAddCustomEnumValue","containerClass","envVariables","environment","modelValue","readOnly","required","type","workspace"]))}}),De={class:"flex h-8 items-center justify-end border-t"},Le={class:"flex h-8 w-full items-center justify-end border-t"},Ne=q({__name:"OAuth2",props:{collection:{},environment:{},envVariables:{},flow:{},persistAuth:{type:Boolean,default:!1},scheme:{},server:{},workspace:{}},emits:["authorized"],setup(l,{emit:U}){const f=U,h=fe(),{toast:x}=ye(),k=P(),o=(t,e)=>le(l.scheme.uid,t,e,k,l.persistAuth),p=async()=>{if(h.isActive||!l.collection?.uid)return;if(!l.server){x("No server selected","error");return}h.start();const[t,e]=await ve(l.flow,l.server,l.workspace?.proxyUrl);await h.clear(),e?(o(`flows.${l.flow.type}.token`,e),f("authorized")):(console.error(t),x(t?.message??"Failed to authorize","error"))},i={environment:l.environment,envVariables:l.envVariables,workspace:l.workspace};return(t,e)=>(n(),y(C,null,[t.flow.token?(n(),y(C,{key:0},[c(s(g),null,{default:a(()=>[c(z,A(i,{class:"border-r-transparent",modelValue:t.flow.token,placeholder:"QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",type:"password","onUpdate:modelValue":e[0]||(e[0]=r=>o(`flows.${t.flow.type}.token`,r))}),{default:a(()=>[...e[10]||(e[10]=[b(" Access Token ",-1)])]),_:1},16,["modelValue"])]),_:1}),c(s(g),{class:"min-w-full"},{default:a(()=>[w("div",De,[c(s(B),{class:"mr-1 p-0 px-2 py-0.5",loader:s(h),size:"sm",variant:"outlined",onClick:e[1]||(e[1]=r=>o(`flows.${t.flow.type}.token`,""))},{default:a(()=>[...e[11]||(e[11]=[b(" Clear ",-1)])]),_:1},8,["loader"]),M(t.$slots,"oauth-actions")])]),_:3})],64)):(n(),y(C,{key:1},[c(s(g),null,{default:a(()=>["authorizationUrl"in t.flow?(n(),S(z,A({key:0},i,{containerClass:"border-r-0",modelValue:t.flow.authorizationUrl,placeholder:"https://galaxy.scalar.com/authorize","onUpdate:modelValue":e[2]||(e[2]=r=>o(`flows.${t.flow.type}.authorizationUrl`,r))}),{default:a(()=>[...e[12]||(e[12]=[b(" Auth URL ",-1)])]),_:1},16,["modelValue"])):V("",!0),"tokenUrl"in t.flow?(n(),S(z,A({key:1},i,{modelValue:t.flow.tokenUrl,placeholder:"https://galaxy.scalar.com/token","onUpdate:modelValue":e[3]||(e[3]=r=>o(`flows.${t.flow.type}.tokenUrl`,r))}),{default:a(()=>[...e[13]||(e[13]=[b(" Token URL ",-1)])]),_:1},16,["modelValue"])):V("",!0)]),_:1}),"x-scalar-redirect-uri"in t.flow?(n(),S(s(g),{key:0},{default:a(()=>[c(z,A(i,{modelValue:t.flow["x-scalar-redirect-uri"],placeholder:"https://galaxy.scalar.com/callback","onUpdate:modelValue":e[4]||(e[4]=r=>o(`flows.${t.flow.type}.x-scalar-redirect-uri`,r))}),{default:a(()=>[...e[14]||(e[14]=[b(" Redirect URL ",-1)])]),_:1},16,["modelValue"])]),_:1})):V("",!0),t.flow.type==="password"?(n(),y(C,{key:1},[c(s(g),null,{default:a(()=>[c(z,A(i,{class:"text-c-2",modelValue:t.flow.username,placeholder:"janedoe","onUpdate:modelValue":e[5]||(e[5]=r=>o(`flows.${t.flow.type}.username`,r))}),{default:a(()=>[...e[15]||(e[15]=[b(" Username ",-1)])]),_:1},16,["modelValue"])]),_:1}),c(s(g),null,{default:a(()=>[c(z,A(i,{modelValue:t.flow.password,placeholder:"********",type:"password","onUpdate:modelValue":e[6]||(e[6]=r=>o(`flows.${t.flow.type}.password`,r))}),{default:a(()=>[...e[16]||(e[16]=[b(" Password ",-1)])]),_:1},16,["modelValue"])]),_:1})],64)):V("",!0),c(s(g),null,{default:a(()=>[c(z,A(i,{modelValue:t.flow["x-scalar-client-id"],placeholder:"12345","onUpdate:modelValue":e[7]||(e[7]=r=>o(`flows.${t.flow.type}.x-scalar-client-id`,r))}),{default:a(()=>[...e[17]||(e[17]=[b(" Client ID ",-1)])]),_:1},16,["modelValue"])]),_:1}),"clientSecret"in t.flow?(n(),S(s(g),{key:2},{default:a(()=>[c(z,A(i,{modelValue:t.flow.clientSecret,placeholder:"XYZ123",type:"password","onUpdate:modelValue":e[8]||(e[8]=r=>o(`flows.${t.flow.type}.clientSecret`,r))}),{default:a(()=>[...e[18]||(e[18]=[b(" Client Secret ",-1)])]),_:1},16,["modelValue"])]),_:1})):V("",!0),"x-usePkce"in t.flow?(n(),S(s(g),{key:3},{default:a(()=>[c(z,A(i,{enum:s(he),modelValue:t.flow["x-usePkce"],readOnly:"","onUpdate:modelValue":e[9]||(e[9]=r=>o(`flows.${t.flow.type}.x-usePkce`,r))}),{default:a(()=>[...e[19]||(e[19]=[b(" Use PKCE ",-1)])]),_:1},16,["enum","modelValue"])]),_:1})):V("",!0),Object.keys(t.flow.scopes??{}).length?(n(),S(s(g),{key:4},{default:a(()=>[c(Me,{flow:t.flow,updateScheme:o},null,8,["flow"])]),_:1})):V("",!0)],64)),t.flow.token?V("",!0):(n(),S(s(g),{key:2,class:"min-w-full"},{default:a(()=>[w("div",Le,[c(s(B),{class:"mr-0.75 p-0 px-2 py-0.5",loader:s(h),size:"sm",variant:"outlined",onClick:p},{default:a(()=>[...e[20]||(e[20]=[b(" Authorize ",-1)])]),_:1},8,["loader"])])]),_:1}))],64))}}),Pe={class:"bg-b-1 text-c-2 outline-b-3 top-0 z-1 h-full w-full overflow-hidden px-3 py-1.25 text-ellipsis group-hover/auth:absolute group-hover/auth:h-auto group-hover/auth:border-b *:first:line-clamp-1 *:first:text-ellipsis group-hover/auth:*:first:line-clamp-none"},Ke={key:0,class:"flex min-h-8 border-t text-base"},He={class:"flex h-8 max-w-full gap-2.5 overflow-x-auto px-3"},Qe=["onClick"],Je={class:"relative z-10"},Ye=q({__name:"RequestAuthTab",props:{collection:{},environment:{},envVariables:{},layout:{},persistAuth:{type:Boolean,default:!1},securitySchemeUids:{},server:{},workspace:{}},emits:["authorized"],setup(l,{emit:U}){const f=U,h=P(),{securitySchemes:x}=h,k=I(()=>l.securitySchemeUids.map(e=>({scheme:x[e]}))),o=E(""),p=e=>{const r=e.description?`: ${e.description}`:"",u=`${H(e.nameKey)}${r||`: ${e.type}`}`;if(e.type==="apiKey")return`${H(e.nameKey)}${r||`: ${e.in}`}`;if(e.type==="oauth2"){const _=Object.values(e.flows??{})[0];return`${H(e.nameKey)}: ${o.value?o.value:_?.type??""}${r}`}return e.type==="http"?`${H(e.nameKey)}: ${e.scheme}${r}`:`${u}${r}`},i=(e,r,u)=>{le(e,r,u,h,l.persistAuth)};re(()=>{l.persistAuth&&Te(h,l.collection.uid)});const t={environment:l.environment,envVariables:l.envVariables,workspace:l.workspace};return(e,r)=>(n(!0),y(C,null,D(k.value,({scheme:u})=>(n(),y(C,{key:u?.uid},[k.value.length>1&&u?(n(),S(s(g),{key:0},{default:a(()=>[c(s(Y),{"aria-label":p(u),class:"text-c-2 group/auth flex items-center leading-[22px] whitespace-nowrap outline-none hover:whitespace-normal"},{default:a(()=>[w("p",Pe,T(p(u)),1)]),_:2},1032,["aria-label"])]),_:2},1024)):V("",!0),u?.description&&k.value.length<=1?(n(),S(s(g),{key:1},{default:a(()=>[c(s(Y),{"aria-label":u.description,class:"max-h-[auto]"},{default:a(()=>[c(s(be),{class:"auth-description bg-b-1 text-c-2 min-w-0 flex-1 px-3 py-1.25",value:u.description},null,8,["value"])]),_:2},1032,["aria-label"])]),_:2},1024)):V("",!0),u?.type==="http"?(n(),y(C,{key:2},[u.scheme==="bearer"?(n(),S(s(g),{key:0},{default:a(()=>[c(z,A({ref_for:!0},t,{containerClass:e.layout==="reference"&&"border-t",modelValue:u.token,placeholder:"Token",type:"password","onUpdate:modelValue":_=>i(u.uid,"token",_)}),{default:a(()=>[...r[1]||(r[1]=[b(" Bearer Token ",-1)])]),_:1},16,["containerClass","modelValue","onUpdate:modelValue"])]),_:2},1024)):u?.scheme==="basic"?(n(),y(C,{key:1},[c(s(g),null,{default:a(()=>[c(z,A({ref_for:!0},t,{class:"text-c-2",modelValue:u.username,placeholder:"janedoe",required:"","onUpdate:modelValue":_=>i(u.uid,"username",_)}),{default:a(()=>[...r[2]||(r[2]=[b(" Username ",-1)])]),_:1},16,["modelValue","onUpdate:modelValue"])]),_:2},1024),c(s(g),null,{default:a(()=>[c(z,A({ref_for:!0},t,{modelValue:u.password,placeholder:"********",type:"password","onUpdate:modelValue":_=>i(u.uid,"password",_)}),{default:a(()=>[...r[3]||(r[3]=[b(" Password ",-1)])]),_:1},16,["modelValue","onUpdate:modelValue"])]),_:2},1024)],64)):V("",!0)],64)):u?.type==="apiKey"?(n(),y(C,{key:3},[c(s(g),null,{default:a(()=>[c(z,A({ref_for:!0},t,{containerClass:e.layout==="reference"&&"border-t",modelValue:u.name,placeholder:"api-key","onUpdate:modelValue":_=>i(u.uid,"name",_)}),{default:a(()=>[...r[4]||(r[4]=[b(" Name ",-1)])]),_:1},16,["containerClass","modelValue","onUpdate:modelValue"])]),_:2},1024),c(s(g),null,{default:a(()=>[c(z,A({ref_for:!0},t,{modelValue:u.value,placeholder:"QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",type:"password","onUpdate:modelValue":_=>i(u.uid,"value",_)}),{default:a(()=>[...r[5]||(r[5]=[b(" Value ",-1)])]),_:1},16,["modelValue","onUpdate:modelValue"])]),_:2},1024)],64)):u?.type==="oauth2"?(n(),y(C,{key:4},[c(s(g),null,{default:a(()=>[Object.keys(u.flows).length>1?(n(),y("div",Ke,[w("div",He,[(n(!0),y(C,null,D(u?.flows,(_,O,j)=>(n(),y("button",{key:O,class:R(["floating-bg text-c-3 relative cursor-pointer border-b-[1px] border-transparent py-1 text-base font-medium",{"!text-c-1 !rounded-none border-b-[1px] !border-current":e.layout!=="reference"&&(o.value===O||j===0&&!o.value),"!text-c-1 !rounded-none border-b-[1px] !border-current opacity-100":e.layout==="reference"&&(o.value===O||j===0&&!o.value)}]),type:"button",onClick:K=>o.value=O},[w("span",Je,T(O),1)],10,Qe))),128))])])):V("",!0)]),_:2},1024),(n(!0),y(C,null,D(u?.flows,(_,O,j)=>(n(),y(C,{key:O},[o.value===O||j===0&&!o.value?(n(),S(Ne,A({key:0,ref_for:!0},t,{collection:e.collection,flow:_,persistAuth:e.persistAuth,scheme:u,server:e.server,workspace:e.workspace,onAuthorized:r[0]||(r[0]=K=>f("authorized"))}),{"oauth-actions":a(()=>[M(e.$slots,"oauth-actions")]),_:3},16,["collection","flow","persistAuth","scheme","server","workspace"])):V("",!0)],64))),128))],64)):u?.type==="openIdConnect"?(n(),y("div",{key:5,class:R(["text-c-3 bg-b-1 flex min-h-[calc(4rem+1px)] items-center justify-center border-t border-b-0 px-4 text-base",{"rounded-b-lg":e.layout==="reference"}])}," Coming soon ",2)):V("",!0)],64))),128))}}),We=["onClick"],Ge={class:"relative z-10 font-medium whitespace-nowrap"},Xe={key:0,class:"absolute inset-x-1 bottom-[var(--scalar-border-width)] left-1/2 z-1 h-px w-full -translate-x-1/2 bg-current"},Ze=q({__name:"RequestAuthDataTable",props:{collection:{},environment:{},envVariables:{},layout:{default:"client"},persistAuth:{type:Boolean,default:!1},selectedSchemeOptions:{default:()=>[]},server:{},workspace:{}},emits:["authorized","activeSchemes"],setup(l,{emit:U}){const f=U,{securitySchemes:h}=P(),x=Z(),k=E(null),o=E(0),p=I(()=>{if(!l.selectedSchemeOptions||l.selectedSchemeOptions.length===0)return[];const t=l.selectedSchemeOptions[o.value];if(!t)return[];const e=t.id.split(",").filter(Boolean);return e.length>1?e:[t.id]});G(p,t=>{f("activeSchemes",t.map(e=>h[e]).filter(J))},{immediate:!0});const i=I(()=>p.value.length>0);return G(()=>l.selectedSchemeOptions,t=>{(!t||!t[o.value])&&(o.value=Math.max(0,o.value-1))}),(t,e)=>(n(),y("form",{onSubmit:e[2]||(e[2]=Q(()=>{},["prevent"]))},[t.selectedSchemeOptions.length>1?(n(),y("div",{key:0,class:R(["box-content flex flex-wrap gap-x-2.5 overflow-hidden border border-b-0 px-3",t.layout==="client"&&"border-x-0"])},[(n(!0),y(C,null,D(t.selectedSchemeOptions,(r,u)=>(n(),y("div",{key:r.id,class:R(["relative z-1 -mb-[var(--scalar-border-width)] flex h-8 cursor-pointer",[o.value===u?"text-c-1":"text-c-3"]])},[w("button",{class:"floating-bg relative cursor-pointer border-b-[1px] border-transparent py-1 text-sm font-medium",type:"button",onClick:_=>o.value=u},[w("span",Ge,T(r.label),1)],8,We),o.value===u?(n(),y("div",Xe)):V("",!0)],2))),128))],2)):V("",!0),i.value?(n(),S(s(we),{key:1,class:R(["flex-1",t.layout==="reference"&&"bg-b-1 rounded-b-lg border border-t-0"]),columns:[""],presentational:""},{default:a(()=>[c(Ye,{collection:t.collection,envVariables:t.envVariables,environment:t.environment,layout:t.layout,persistAuth:t.persistAuth,securitySchemeUids:p.value,server:t.server,workspace:t.workspace,onAuthorized:e[0]||(e[0]=r=>f("authorized"))},{"oauth-actions":a(()=>[M(t.$slots,"oauth-actions",{},void 0,!0)]),_:3},8,["collection","envVariables","environment","layout","persistAuth","securitySchemeUids","server","workspace"])]),_:3},8,["class"])):(n(),y("div",{key:2,class:R(["text-c-3 bg-b-1 flex min-h-16 items-center justify-center border-t px-4 text-sm",t.layout==="reference"&&"min-h-[calc(4rem+0.5px)] rounded-b-lg border"])}," No authentication selected ",2)),c(te,{scheme:k.value,state:s(x),onClose:e[1]||(e[1]=r=>s(x).hide())},null,8,["scheme","state"])],32))}}),et=ee(Ze,[["__scopeId","data-v-0bb98074"]]),tt=["id"],lt={class:"flex flex-1"},at={class:"min-w-0 flex-1 truncate"},ot=q({__name:"RequestAuth",props:{collection:{},isReadOnly:{type:Boolean,default:!1},environment:{},envVariables:{},layout:{},operation:{},persistAuth:{type:Boolean,default:!1},selectedSecuritySchemeUids:{},server:{},title:{},workspace:{}},emits:["authorized","activeSchemes"],setup(l,{emit:U}){const f=U,{securitySchemes:h,securitySchemeMutators:x,requestMutators:k,collectionMutators:o}=P(),p=X(),i=E(null),t=Z(),e=E(null),r=E(!1),u=I(()=>{const m=xe(l.operation,l.collection);return{filteredRequirements:m.filter(d=>Object.keys(d).length),requirements:m}}),_=I(()=>{const{filteredRequirements:m,requirements:d}=u.value;if(!d.length)return null;const v=!d.some($=>Object.keys($).length>1)&&m.length<d.length;return{icon:v?"Unlock":"Lock",text:v?"Optional":"Required"}}),O=I(()=>l.selectedSecuritySchemeUids.map(m=>{if(Array.isArray(m))return ke(m,h);const d=h[m??""];if(d)return Ve(d)}).filter(J));function j(m){const d=m.find($=>$.payload),v=m.filter($=>!$.payload).map(({id:$})=>{const F=$.split(",");return F.length>1?F:$});if(d?.payload){const $=x.add(d.payload,l.collection?.uid);$&&v.push($.uid)}K(v)}const K=m=>{if(l.collection.useCollectionSecurity){if(o.edit(l.collection.uid,"selectedSecuritySchemeUids",m),!l.persistAuth)return;const d=m.map(v=>Array.isArray(v)?v.map($=>h[$]?.nameKey):h[v]?.nameKey);L().setItem(N.SELECTED_SECURITY_SCHEMES,JSON.stringify(d))}else l.operation?.uid&&k.edit(l.operation.uid,"selectedSecuritySchemeUids",m)};function W({id:m,label:d}){e.value={id:m,label:d},t.show()}const ae=m=>{if(!m)return;const d=l.selectedSecuritySchemeUids.filter(v=>{const $=m.split(",");return $.length>1&&Array.isArray(v)&&$.length===v.length?v.every(F=>!$.includes(F)):v!==m});K(d),i.value?.$el.focus(),t.hide()},oe=I(()=>ge(u.value.filteredRequirements,l.collection?.securitySchemes??[],h,l.isReadOnly)),se=m=>{r.value&&m.stopPropagation(),i.value?.$el.click()};return(m,d)=>(n(),S(Ae,{class:"group/params relative",itemCount:O.value.length,layout:m.layout,"onUpdate:modelValue":d[4]||(d[4]=v=>r.value=v)},{title:a(()=>[w("div",{id:s(p),class:"inline-flex items-center gap-0.5 leading-[20px]"},[w("span",null,T(m.title),1),_.value?(n(),y("span",{key:0,class:R(["text-c-3 hover:bg-b-3 hover:text-c-1 -mr-1 cursor-pointer rounded px-1 py-0.5 text-xs leading-[normal]",{"text-c-1":_.value.text==="Required"}]),onClick:se},T(_.value.text),3)):V("",!0)],8,tt)]),actions:a(()=>[w("div",lt,[c(s(Se),{class:"w-72 text-xs",modelValue:O.value,multiple:"",options:oe.value,placement:"bottom-end",teleport:"",onDelete:W,"onUpdate:modelValue":j},{option:a(({option:v,selected:$})=>[c(s($e),{multiselect:"",selected:$},null,8,["selected"]),w("div",at,T(v.label),1),v.isDeletable??!m.isReadOnly?(n(),S(s(Ue),{key:0,class:"-m-0.5 shrink-0 p-0.5 opacity-0 group-hover/item:opacity-100",icon:s(Ce),label:`Delete ${v.label}`,size:"xs",onClick:Q(F=>W(v),["stop"])},null,8,["icon","label","onClick"])):V("",!0)]),default:a(()=>[c(s(B),{ref_key:"comboboxButtonRef",ref:i,"aria-describedby":s(p),class:"group/combobox-button hover:text-c-1 text-c-2 flex h-fit w-full items-center gap-1 px-0.75 py-0.25 text-base font-normal transition-transform",variant:"ghost"},{default:a(()=>[O.value.length===1?(n(),y(C,{key:0},[d[5]||(d[5]=w("span",{class:"sr-only"},"Selected Auth Type:",-1)),b(" "+T(O.value[0]?.label),1)],64)):O.value.length>1?(n(),y(C,{key:1},[d[6]||(d[6]=b(" Multiple ",-1)),d[7]||(d[7]=w("span",{class:"sr-only"},"Auth Types Selected",-1))],64)):(n(),y(C,{key:2},[d[8]||(d[8]=w("span",{class:"sr-only"},"Select",-1)),d[9]||(d[9]=b(" Auth Type ",-1))],64)),c(s(_e),{class:"size-3 shrink-0 transition-transform duration-100 group-aria-expanded/combobox-button:rotate-180",weight:"bold"})]),_:1},8,["aria-describedby"])]),_:1},8,["modelValue","options"])])]),default:a(()=>[c(et,{collection:m.collection,envVariables:m.envVariables,environment:m.environment,layout:m.layout,persistAuth:m.persistAuth,selectedSchemeOptions:O.value,server:m.server,workspace:m.workspace,onActiveSchemes:d[0]||(d[0]=v=>f("activeSchemes",v)),onAuthorized:d[1]||(d[1]=v=>f("authorized"))},{"oauth-actions":a(()=>[M(m.$slots,"oauth-actions",{},void 0,!0)]),_:3},8,["collection","envVariables","environment","layout","persistAuth","selectedSchemeOptions","server","workspace"]),c(te,{scheme:e.value,state:s(t),onClose:d[2]||(d[2]=v=>s(t).hide()),onDelete:d[3]||(d[3]=v=>ae(e.value?.id))},null,8,["scheme","state"])]),_:3},8,["itemCount","layout"]))}}),nt=ee(ot,[["__scopeId","data-v-3f1067a4"]]);export{nt as f};
@@ -1 +1 @@
1
- import{r as w,L as S,g as N,aE as U,T as B,k as M}from"./DjSp0ni5.js";import{a as W}from"./C3g32ML-.js";import{d as V,r as f,m as j,n as I,c as k,b as n,k as b,F as D,p as z,s as d,j as x,h as v,e as u,q as $,D as L,E as P,f as p,z as R,w as m,g as q,t as A}from"./B9-SkqjX.js";import{h as J,E as G}from"./BBTritm-.js";const H=["onClick"],K=["placeholder"],T=V({__name:"EnvironmentColors",props:{activeColor:{},selector:{type:Boolean,default:!1}},emits:["select"],setup(g,{emit:y}){const l=g,C=y,a=f(""),i=f(null),c=f(!1),s=f(!1),o=[{color:"#FFFFFF"},{color:"#EF0006"},{color:"#EDBE20"},{color:"#069061"},{color:"#FB892C"},{color:"#0082D0"},{color:"#5203D1"},{color:"#FFC0CB"}],h=j(()=>l.activeColor&&!o.some(e=>e.color===l.activeColor)||a.value?`background-color: ${l.activeColor||a.value};`:"background: linear-gradient(to right, rgb(235, 87, 87), rgb(242, 201, 76), rgb(76, 183, 130), rgb(78, 167, 252), rgb(250, 96, 122));"),F=()=>{c.value=!c.value,l.selector&&(s.value=!1),R(()=>{i.value&&i.value.focus()})};I(a,e=>{e&&!e.startsWith("#")&&(a.value=`#${e}`),c.value=!0});const _=()=>{l.selector&&(s.value=!s.value)},E=e=>{C("select",e),l.selector&&(s.value=!1)};return(e,t)=>(n(),k("div",null,[c.value?b("",!0):(n(),k(D,{key:0},[l.selector&&!s.value?(n(),k("div",{key:0,class:d(["flex cursor-pointer items-center justify-center rounded-full",l.selector?"h-4 w-4":"h-5 w-5"]),style:z({backgroundColor:e.activeColor}),onClick:_},[e.activeColor?(n(),x(v(w),{key:0,class:d(["text-c-btn",l.selector&&"p-0.5"]),icon:"Checkmark",size:"xs"},null,8,["class"])):b("",!0)],6)):b("",!0),s.value||!l.selector?(n(),k("div",{key:1,class:d(["color-selector flex flex-row items-center justify-between gap-1.5 space-x-1",l.selector?"h-4":"min-h-10 min-w-[296px]"])},[(n(),k(D,null,$(o,r=>u("div",{key:r.color,class:d(["flex cursor-pointer items-center justify-center rounded-full",l.selector?"h-4 w-4":"h-5 w-5"]),style:z({backgroundColor:r.color}),onClick:X=>E(r.color)},[e.activeColor===r.color&&!a.value?(n(),x(v(w),{key:0,class:d(["text-c-btn",l.selector&&"p-0.5"]),icon:"Checkmark",size:"xs"},null,8,["class"])):b("",!0)],14,H)),64)),t[2]||(t[2]=u("hr",{class:"border-ghost h-5 w-0.5 border-l"},null,-1)),u("label",{class:d(["z-10 flex cursor-pointer flex-row items-center justify-center gap-2 rounded-full",l.selector?"h-4 w-4":"h-5 w-5"]),style:z(h.value),onClick:F},[!c.value&&(e.activeColor===a.value||e.activeColor&&!o.some(r=>r.color===e.activeColor))?(n(),x(v(w),{key:0,class:"text-c-btn",icon:"Checkmark",size:"xs"})):b("",!0)],6)],2)):b("",!0)],64)),c.value?(n(),k("div",{key:1,class:d(["color-selector flex flex-1 items-center gap-2 rounded",l.selector?"h-4":"min-h-10"])},[u("span",{class:d(["absolute rounded-full border border-dashed",l.selector?"h-4 w-4":"h-5 w-5"])},null,2),u("span",{class:d(["z-[1] rounded-full",l.selector?"h-4 w-4":"h-5 w-5"]),style:z(h.value)},null,6),L(u("input",{ref_key:"customColorInputRef",ref:i,"onUpdate:modelValue":t[0]||(t[0]=r=>a.value=r),class:"w-full flex-1 border-transparent text-sm outline-none",placeholder:e.activeColor||"#000000",type:"text",onInput:t[1]||(t[1]=r=>E(a.value))},null,40,K),[[P,a.value]]),u("button",{class:"text-c-3 hover:bg-b-2 rounded-lg p-1.5",type:"button",onClick:F},[p(v(w),{icon:"Checkmark",size:"xs"})])],2)):b("",!0)]))}}),O={class:"flex flex-col gap-4"},oe=V({__name:"EnvironmentColorModal",props:{state:{},selectedColor:{}},emits:["cancel","submit"],setup(g,{emit:y}){const l=g,C=y,a=f(""),i=s=>{a.value=s},c=()=>{C("submit",a.value),a.value=""};return(s,o)=>(n(),x(v(S),{size:"xxs",state:s.state,title:"Edit Environment Color"},{default:m(()=>[u("div",O,[p(T,{activeColor:a.value||l.selectedColor,class:"w-full p-1",onSelect:i},null,8,["activeColor"]),p(W,{onCancel:o[0]||(o[0]=h=>C("cancel")),onSubmit:c})])]),_:1},8,["state"]))}}),Q={class:"flex items-start gap-2"},te=V({__name:"EnvironmentModal",props:{state:{},activeWorkspaceCollections:{},collectionId:{}},emits:["cancel","submit"],setup(g,{emit:y}){const l=g,C=y,{events:a}=N(),i=f(""),c=f("#FFFFFF"),s=j(()=>[...l.activeWorkspaceCollections.filter(e=>e.info?.title!=="Drafts").map(e=>({id:e.uid,label:e.info?.title??"Untitled Collection"}))]),o=f(s.value.find(e=>e.id===l.collectionId)),{toast:h}=M(),F=e=>{c.value=e};I(()=>l.state.open,e=>{e&&(i.value="",c.value="#FFFFFF",l.collectionId?o.value=s.value.find(t=>t.id===l.collectionId):o.value=void 0)});const _=()=>{if(!i.value.trim()){h("Please enter a name before adding an environment.","error");return}if(!o.value?.id){h("Please select a collection before adding an environment.","error");return}C("submit",{name:i.value,color:c.value,type:o.value?.id==="global"?"global":"collection",collectionId:o.value?.id!=="global"?o.value?.id:void 0})},E=()=>{l.state.hide(),a.commandPalette.emit({commandName:"Create Collection"})};return(e,t)=>(n(),x(v(S),{bodyClass:"border-t-0 rounded-t-lg",size:"xs",state:e.state},{default:m(()=>[p(J,{disabled:!o.value||!i.value.trim(),onCancel:t[2]||(t[2]=r=>C("cancel")),onSubmit:_},{options:m(()=>[p(v(U),{modelValue:o.value,"onUpdate:modelValue":t[1]||(t[1]=r=>o.value=r),options:s.value,placeholder:"Select Type"},{default:m(()=>[s.value.length>0?(n(),x(v(B),{key:0,class:"hover:bg-b-2 max-h-8 w-fit justify-between gap-1 p-2 text-xs",variant:"outlined"},{default:m(()=>[u("span",{class:d(o.value?"text-c-1":"text-c-3")},A(o.value?o.value.label:"Select Collection"),3),p(v(w),{class:"text-c-3",icon:"ChevronDown",size:"xs"})]),_:1})):(n(),x(v(B),{key:1,class:"hover:bg-b-2 max-h-8 justify-between gap-1 p-2 text-xs",variant:"outlined",onClick:E},{default:m(()=>[...t[3]||(t[3]=[u("span",{class:"text-c-1"},"Create Collection",-1)])]),_:1}))]),_:1},8,["modelValue","options"])]),submit:m(()=>[...t[4]||(t[4]=[q(" Add Environment ",-1)])]),default:m(()=>[u("div",Q,[p(T,{activeColor:c.value,class:"peer",selector:"",onSelect:F},null,8,["activeColor"]),p(G,{modelValue:i.value,"onUpdate:modelValue":t[0]||(t[0]=r=>i.value=r),class:"-mt-[.5px] !p-0 peer-has-[.color-selector]:hidden",placeholder:"Environment name"},null,8,["modelValue"])])]),_:1},8,["disabled"])]),_:1},8,["state"]))}});export{te as J,oe as M};
1
+ import{r as w,L as S,g as N,aE as U,T as B,k as M}from"./D1Q9L7QE.js";import{a as W}from"./RhTS06Sf.js";import{d as V,r as f,m as j,n as I,c as k,b as n,k as b,F as D,p as z,s as d,j as x,h as v,e as u,q as $,D as L,E as P,f as p,z as R,w as m,g as q,t as A}from"./CRsWdsU-.js";import{h as J,E as G}from"./Dcy-p3Z6.js";const H=["onClick"],K=["placeholder"],T=V({__name:"EnvironmentColors",props:{activeColor:{},selector:{type:Boolean,default:!1}},emits:["select"],setup(g,{emit:y}){const l=g,C=y,a=f(""),i=f(null),c=f(!1),s=f(!1),o=[{color:"#FFFFFF"},{color:"#EF0006"},{color:"#EDBE20"},{color:"#069061"},{color:"#FB892C"},{color:"#0082D0"},{color:"#5203D1"},{color:"#FFC0CB"}],h=j(()=>l.activeColor&&!o.some(e=>e.color===l.activeColor)||a.value?`background-color: ${l.activeColor||a.value};`:"background: linear-gradient(to right, rgb(235, 87, 87), rgb(242, 201, 76), rgb(76, 183, 130), rgb(78, 167, 252), rgb(250, 96, 122));"),F=()=>{c.value=!c.value,l.selector&&(s.value=!1),R(()=>{i.value&&i.value.focus()})};I(a,e=>{e&&!e.startsWith("#")&&(a.value=`#${e}`),c.value=!0});const _=()=>{l.selector&&(s.value=!s.value)},E=e=>{C("select",e),l.selector&&(s.value=!1)};return(e,t)=>(n(),k("div",null,[c.value?b("",!0):(n(),k(D,{key:0},[l.selector&&!s.value?(n(),k("div",{key:0,class:d(["flex cursor-pointer items-center justify-center rounded-full",l.selector?"h-4 w-4":"h-5 w-5"]),style:z({backgroundColor:e.activeColor}),onClick:_},[e.activeColor?(n(),x(v(w),{key:0,class:d(["text-c-btn",l.selector&&"p-0.5"]),icon:"Checkmark",size:"xs"},null,8,["class"])):b("",!0)],6)):b("",!0),s.value||!l.selector?(n(),k("div",{key:1,class:d(["color-selector flex flex-row items-center justify-between gap-1.5 space-x-1",l.selector?"h-4":"min-h-10 min-w-[296px]"])},[(n(),k(D,null,$(o,r=>u("div",{key:r.color,class:d(["flex cursor-pointer items-center justify-center rounded-full",l.selector?"h-4 w-4":"h-5 w-5"]),style:z({backgroundColor:r.color}),onClick:X=>E(r.color)},[e.activeColor===r.color&&!a.value?(n(),x(v(w),{key:0,class:d(["text-c-btn",l.selector&&"p-0.5"]),icon:"Checkmark",size:"xs"},null,8,["class"])):b("",!0)],14,H)),64)),t[2]||(t[2]=u("hr",{class:"border-ghost h-5 w-0.5 border-l"},null,-1)),u("label",{class:d(["z-10 flex cursor-pointer flex-row items-center justify-center gap-2 rounded-full",l.selector?"h-4 w-4":"h-5 w-5"]),style:z(h.value),onClick:F},[!c.value&&(e.activeColor===a.value||e.activeColor&&!o.some(r=>r.color===e.activeColor))?(n(),x(v(w),{key:0,class:"text-c-btn",icon:"Checkmark",size:"xs"})):b("",!0)],6)],2)):b("",!0)],64)),c.value?(n(),k("div",{key:1,class:d(["color-selector flex flex-1 items-center gap-2 rounded",l.selector?"h-4":"min-h-10"])},[u("span",{class:d(["absolute rounded-full border border-dashed",l.selector?"h-4 w-4":"h-5 w-5"])},null,2),u("span",{class:d(["z-[1] rounded-full",l.selector?"h-4 w-4":"h-5 w-5"]),style:z(h.value)},null,6),L(u("input",{ref_key:"customColorInputRef",ref:i,"onUpdate:modelValue":t[0]||(t[0]=r=>a.value=r),class:"w-full flex-1 border-transparent text-sm outline-none",placeholder:e.activeColor||"#000000",type:"text",onInput:t[1]||(t[1]=r=>E(a.value))},null,40,K),[[P,a.value]]),u("button",{class:"text-c-3 hover:bg-b-2 rounded-lg p-1.5",type:"button",onClick:F},[p(v(w),{icon:"Checkmark",size:"xs"})])],2)):b("",!0)]))}}),O={class:"flex flex-col gap-4"},oe=V({__name:"EnvironmentColorModal",props:{state:{},selectedColor:{}},emits:["cancel","submit"],setup(g,{emit:y}){const l=g,C=y,a=f(""),i=s=>{a.value=s},c=()=>{C("submit",a.value),a.value=""};return(s,o)=>(n(),x(v(S),{size:"xxs",state:s.state,title:"Edit Environment Color"},{default:m(()=>[u("div",O,[p(T,{activeColor:a.value||l.selectedColor,class:"w-full p-1",onSelect:i},null,8,["activeColor"]),p(W,{onCancel:o[0]||(o[0]=h=>C("cancel")),onSubmit:c})])]),_:1},8,["state"]))}}),Q={class:"flex items-start gap-2"},te=V({__name:"EnvironmentModal",props:{state:{},activeWorkspaceCollections:{},collectionId:{}},emits:["cancel","submit"],setup(g,{emit:y}){const l=g,C=y,{events:a}=N(),i=f(""),c=f("#FFFFFF"),s=j(()=>[...l.activeWorkspaceCollections.filter(e=>e.info?.title!=="Drafts").map(e=>({id:e.uid,label:e.info?.title??"Untitled Collection"}))]),o=f(s.value.find(e=>e.id===l.collectionId)),{toast:h}=M(),F=e=>{c.value=e};I(()=>l.state.open,e=>{e&&(i.value="",c.value="#FFFFFF",l.collectionId?o.value=s.value.find(t=>t.id===l.collectionId):o.value=void 0)});const _=()=>{if(!i.value.trim()){h("Please enter a name before adding an environment.","error");return}if(!o.value?.id){h("Please select a collection before adding an environment.","error");return}C("submit",{name:i.value,color:c.value,type:o.value?.id==="global"?"global":"collection",collectionId:o.value?.id!=="global"?o.value?.id:void 0})},E=()=>{l.state.hide(),a.commandPalette.emit({commandName:"Create Collection"})};return(e,t)=>(n(),x(v(S),{bodyClass:"border-t-0 rounded-t-lg",size:"xs",state:e.state},{default:m(()=>[p(J,{disabled:!o.value||!i.value.trim(),onCancel:t[2]||(t[2]=r=>C("cancel")),onSubmit:_},{options:m(()=>[p(v(U),{modelValue:o.value,"onUpdate:modelValue":t[1]||(t[1]=r=>o.value=r),options:s.value,placeholder:"Select Type"},{default:m(()=>[s.value.length>0?(n(),x(v(B),{key:0,class:"hover:bg-b-2 max-h-8 w-fit justify-between gap-1 p-2 text-xs",variant:"outlined"},{default:m(()=>[u("span",{class:d(o.value?"text-c-1":"text-c-3")},A(o.value?o.value.label:"Select Collection"),3),p(v(w),{class:"text-c-3",icon:"ChevronDown",size:"xs"})]),_:1})):(n(),x(v(B),{key:1,class:"hover:bg-b-2 max-h-8 justify-between gap-1 p-2 text-xs",variant:"outlined",onClick:E},{default:m(()=>[...t[3]||(t[3]=[u("span",{class:"text-c-1"},"Create Collection",-1)])]),_:1}))]),_:1},8,["modelValue","options"])]),submit:m(()=>[...t[4]||(t[4]=[q(" Add Environment ",-1)])]),default:m(()=>[u("div",Q,[p(T,{activeColor:c.value,class:"peer",selector:"",onSelect:F},null,8,["activeColor"]),p(G,{modelValue:i.value,"onUpdate:modelValue":t[0]||(t[0]=r=>i.value=r),class:"-mt-[.5px] !p-0 peer-has-[.color-selector]:hidden",placeholder:"Environment name"},null,8,["modelValue"])])]),_:1},8,["disabled"])]),_:1},8,["state"]))}});export{te as J,oe as M};
@@ -1 +1 @@
1
- import{_ as D}from"./c0R8lEWK.js";import{d as E,H as F,r as h,x as v,m as I,n as L,v as N,c as i,f as R,e as t,h as a,t as c,A as x,D as B,E as V,I as O,F as U,q as W,b as m,_ as j}from"./B9-SkqjX.js";import{d as q}from"./C0Rlrcoy.js";import{u as z}from"./CTidC4T0.js";import{u as J}from"./D6s--CDK.js";import{u as y}from"./C819KIPL.js";import{u as P}from"./hYe2UtEI.js";import"./Dku8fc7v.js";const Y={class:"issue-comments-page"},G={class:"comments-content card"},K=["placeholder"],Q=["disabled"],X={key:0,class:"loading"},Z={key:1,class:"empty"},ee={key:2,class:"comments-list"},te={class:"comment-header"},se={class:"comment-author"},oe={class:"comment-date"},ae=["innerHTML"],ne=E({__name:"comments",async setup(re){let s,l;const b=F(),{success:g,error:w}=z(),{getErrorMessage:$}=J(),u=b.params.id,o=h(""),d=h(!1),{data:n}=([s,l]=v(()=>y(`/api/issues/${u}`,"$sHdW2Rruhz")),s=await s,l(),s),C=I(()=>{if(!n.value)return null;const e={id:n.value.key,title:n.value.title,column:n.value.column_slug};return n.value.priority&&(e.priority=n.value.priority),e}),{data:p,status:k,refresh:_}=([s,l]=v(()=>y(`/api/issues/${u}/comments`,"$2TYRtwuSoA")),s=await s,l(),s),{lastMessage:S}=P();L(S,e=>{e?.type==="comment"&&e.issueId===u&&_()});const H=e=>new Date(e).toLocaleString(),M=e=>q(e),A=async()=>{if(o.value.trim()){d.value=!0;try{await fetch(`/api/issues/${u}/comments`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:o.value})}),o.value="",g("Comment added"),_()}catch(e){w($(e,"Failed to add comment"))}finally{d.value=!1}}};return N({title:`Comments - ${u} - AutoCode`}),(e,f)=>{const T=D;return m(),i("div",Y,[R(T,{issue:a(C),"active-tab":"comments"},null,8,["issue"]),t("div",G,[t("h2",null,c(e.$t("issue.comments")),1),t("form",{class:"comment-form",onSubmit:x(A,["prevent"])},[B(t("textarea",{"onUpdate:modelValue":f[0]||(f[0]=r=>O(o)?o.value=r:null),class:"form-input comment-input",placeholder:e.$t("issue.addComment"),rows:"3"},null,8,K),[[V,a(o)]]),t("button",{type:"submit",class:"btn btn-primary",disabled:!a(o).trim()||a(d)},c(e.$t("form.save")),9,Q)],32),a(k)==="pending"?(m(),i("div",X,c(e.$t("app.loading")),1)):a(p)?.length?(m(),i("ul",ee,[(m(!0),i(U,null,W(a(p),r=>(m(),i("li",{key:r.id,class:"comment"},[t("div",te,[t("span",se,c(r.author||"User"),1),t("time",oe,c(H(r.createdAt)),1)]),t("div",{class:"comment-body",innerHTML:M(r.content)},null,8,ae)]))),128))])):(m(),i("div",Z,c(e.$t("issue.noComments")),1))])])}}}),fe=j(ne,[["__scopeId","data-v-b988772a"]]);export{fe as default};
1
+ import{_ as D}from"./C8yVYDPb.js";import{d as E,H as F,r as h,x as v,m as I,n as L,v as N,c as i,f as R,e as t,h as a,t as c,A as x,D as B,E as V,I as O,F as U,q as W,b as m,_ as j}from"./CRsWdsU-.js";import{d as q}from"./C0Rlrcoy.js";import{u as z}from"./cFgYOPT2.js";import{u as J}from"./DwzmElrD.js";import{u as y}from"./OpmtRlfX.js";import{u as P}from"./BpRdnvfJ.js";import"./fpPxFzzn.js";const Y={class:"issue-comments-page"},G={class:"comments-content card"},K=["placeholder"],Q=["disabled"],X={key:0,class:"loading"},Z={key:1,class:"empty"},ee={key:2,class:"comments-list"},te={class:"comment-header"},se={class:"comment-author"},oe={class:"comment-date"},ae=["innerHTML"],ne=E({__name:"comments",async setup(re){let s,l;const b=F(),{success:g,error:w}=z(),{getErrorMessage:$}=J(),u=b.params.id,o=h(""),d=h(!1),{data:n}=([s,l]=v(()=>y(`/api/issues/${u}`,"$sHdW2Rruhz")),s=await s,l(),s),C=I(()=>{if(!n.value)return null;const e={id:n.value.key,title:n.value.title,column:n.value.column_slug};return n.value.priority&&(e.priority=n.value.priority),e}),{data:p,status:k,refresh:_}=([s,l]=v(()=>y(`/api/issues/${u}/comments`,"$2TYRtwuSoA")),s=await s,l(),s),{lastMessage:S}=P();L(S,e=>{e?.type==="comment"&&e.issueId===u&&_()});const H=e=>new Date(e).toLocaleString(),M=e=>q(e),A=async()=>{if(o.value.trim()){d.value=!0;try{await fetch(`/api/issues/${u}/comments`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:o.value})}),o.value="",g("Comment added"),_()}catch(e){w($(e,"Failed to add comment"))}finally{d.value=!1}}};return N({title:`Comments - ${u} - AutoCode`}),(e,f)=>{const T=D;return m(),i("div",Y,[R(T,{issue:a(C),"active-tab":"comments"},null,8,["issue"]),t("div",G,[t("h2",null,c(e.$t("issue.comments")),1),t("form",{class:"comment-form",onSubmit:x(A,["prevent"])},[B(t("textarea",{"onUpdate:modelValue":f[0]||(f[0]=r=>O(o)?o.value=r:null),class:"form-input comment-input",placeholder:e.$t("issue.addComment"),rows:"3"},null,8,K),[[V,a(o)]]),t("button",{type:"submit",class:"btn btn-primary",disabled:!a(o).trim()||a(d)},c(e.$t("form.save")),9,Q)],32),a(k)==="pending"?(m(),i("div",X,c(e.$t("app.loading")),1)):a(p)?.length?(m(),i("ul",ee,[(m(!0),i(U,null,W(a(p),r=>(m(),i("li",{key:r.id,class:"comment"},[t("div",te,[t("span",se,c(r.author||"User"),1),t("time",oe,c(H(r.createdAt)),1)]),t("div",{class:"comment-body",innerHTML:M(r.content)},null,8,ae)]))),128))])):(m(),i("div",Z,c(e.$t("issue.noComments")),1))])])}}}),fe=j(ne,[["__scopeId","data-v-b988772a"]]);export{fe as default};
@@ -1 +1 @@
1
- import{d,g as m,bs as p,N as v}from"./DjSp0ni5.js";import{f}from"./DvdVpK92.js";import{d as h,c as y,b as s,e as l,j as x,k as S,f as V,h as e,s as b}from"./B9-SkqjX.js";import"./92s3wAHG.js";import"./C819KIPL.js";import"./CTidC4T0.js";import"./D3FsoLQm.js";const C={class:"flex h-full w-full flex-col gap-12 px-1.5 pt-8"},k={class:"flex flex-col gap-4"},g={class:"flex flex-col gap-2"},w={class:"flex h-8 items-center justify-between"},N=h({__name:"CollectionAuthentication",setup(A){const{activeCollection:t,activeEnvVariables:c,activeEnvironment:i,activeServer:n,activeWorkspace:a}=d(),{collectionMutators:r}=m(),u=()=>{t.value?.uid&&r.edit(t.value.uid,"useCollectionSecurity",!t.value.useCollectionSecurity)};return(B,o)=>(s(),y("div",C,[l("div",k,[l("div",g,[l("div",w,[o[0]||(o[0]=l("h3",{class:"font-bold"},"Authentication",-1)),V(e(p),{class:"w-4",modelValue:e(t)?.useCollectionSecurity??!1,"onUpdate:modelValue":u},null,8,["modelValue"])]),o[1]||(o[1]=l("p",{class:"pr-6 text-sm"}," Added authentication will apply to all requests under this collection. You can override this by specifying another one in the request. ",-1))]),e(t)&&e(a)?(s(),x(e(f),{key:0,class:b(["scalar-collection-auth",!e(t)?.useCollectionSecurity&&"pointer-events-none opacity-50 mix-blend-luminosity"]),collection:e(t),envVariables:e(c),environment:e(i),layout:"client",selectedSecuritySchemeUids:e(t)?.selectedSecuritySchemeUids??[],server:e(n),title:"Authentication",workspace:e(a)},null,8,["class","collection","envVariables","environment","selectedSecuritySchemeUids","server","workspace"])):S("",!0)])]))}}),M=v(N,[["__scopeId","data-v-cc87292e"]]);export{M as default};
1
+ import{d,g as m,bs as p,N as v}from"./D1Q9L7QE.js";import{f}from"./Cb7wEgIm.js";import{d as h,c as y,b as s,e as l,j as x,k as S,f as V,h as e,s as b}from"./CRsWdsU-.js";import"./92s3wAHG.js";import"./OpmtRlfX.js";import"./cFgYOPT2.js";import"./BE3foYyN.js";const C={class:"flex h-full w-full flex-col gap-12 px-1.5 pt-8"},k={class:"flex flex-col gap-4"},g={class:"flex flex-col gap-2"},w={class:"flex h-8 items-center justify-between"},N=h({__name:"CollectionAuthentication",setup(A){const{activeCollection:t,activeEnvVariables:c,activeEnvironment:i,activeServer:n,activeWorkspace:a}=d(),{collectionMutators:r}=m(),u=()=>{t.value?.uid&&r.edit(t.value.uid,"useCollectionSecurity",!t.value.useCollectionSecurity)};return(B,o)=>(s(),y("div",C,[l("div",k,[l("div",g,[l("div",w,[o[0]||(o[0]=l("h3",{class:"font-bold"},"Authentication",-1)),V(e(p),{class:"w-4",modelValue:e(t)?.useCollectionSecurity??!1,"onUpdate:modelValue":u},null,8,["modelValue"])]),o[1]||(o[1]=l("p",{class:"pr-6 text-sm"}," Added authentication will apply to all requests under this collection. You can override this by specifying another one in the request. ",-1))]),e(t)&&e(a)?(s(),x(e(f),{key:0,class:b(["scalar-collection-auth",!e(t)?.useCollectionSecurity&&"pointer-events-none opacity-50 mix-blend-luminosity"]),collection:e(t),envVariables:e(c),environment:e(i),layout:"client",selectedSecuritySchemeUids:e(t)?.selectedSecuritySchemeUids??[],server:e(n),title:"Authentication",workspace:e(a)},null,8,["class","collection","envVariables","environment","selectedSecuritySchemeUids","server","workspace"])):S("",!0)])]))}}),M=v(N,[["__scopeId","data-v-cc87292e"]]);export{M as default};
@@ -1 +1 @@
1
- import{_ as d}from"./Dku8fc7v.js";import{d as r,H as u,m as _,v as p,c as i,e,f as l,g as o,t as c,h as m,w as f,b as x,_ as b}from"./B9-SkqjX.js";const k={class:"test-page card"},v=r({__name:"[id]",setup(N){const a=u(),s=_(()=>a.params.id);return p({title:`Test ${s.value} - AutoCode`}),(g,t)=>{const n=d;return x(),i("div",k,[t[2]||(t[2]=e("h1",null,"Test Route Dynamique",-1)),e("p",null,[t[0]||(t[0]=o(" ID: ",-1)),e("code",null,c(m(s)),1)]),l(n,{to:"/kanban",class:"btn btn-secondary"},{default:f(()=>[...t[1]||(t[1]=[o(" Retour ",-1)])]),_:1})])}}}),C=b(v,[["__scopeId","data-v-bd9f8600"]]);export{C as default};
1
+ import{_ as d}from"./fpPxFzzn.js";import{d as r,H as u,m as _,v as p,c as i,e,f as l,g as o,t as c,h as m,w as f,b as x,_ as b}from"./CRsWdsU-.js";const k={class:"test-page card"},v=r({__name:"[id]",setup(N){const a=u(),s=_(()=>a.params.id);return p({title:`Test ${s.value} - AutoCode`}),(g,t)=>{const n=d;return x(),i("div",k,[t[2]||(t[2]=e("h1",null,"Test Route Dynamique",-1)),e("p",null,[t[0]||(t[0]=o(" ID: ",-1)),e("code",null,c(m(s)),1)]),l(n,{to:"/kanban",class:"btn btn-secondary"},{default:f(()=>[...t[1]||(t[1]=[o(" Retour ",-1)])]),_:1})])}}}),C=b(v,[["__scopeId","data-v-bd9f8600"]]);export{C as default};
@@ -1 +1 @@
1
- import{u as W}from"./BcwrT42V.js";import{x as D}from"./B-L8_kPw.js";import{r as h,bu as F,aW as g,aX as T,T as b,d as N,g as O,bv as M}from"./DjSp0ni5.js";import{d as j,m as q,j as u,b as o,h as e,c as y,f,w as r,e as s,g as n,s as d,k as p,al as z,t as $,F as B,q as L,p as A,r as G,am as P}from"./B9-SkqjX.js";import"./92s3wAHG.js";import"./C819KIPL.js";import"./CTidC4T0.js";import"./D3FsoLQm.js";const H=j({__name:"IntegrationLogo",props:{integration:{}},setup(w){const t=w,i=["adonisjs","astro","dotnet","elysiajs","express","fastapi","fastify","go","hono","laravel","litestar","nestjs","nextjs","nitro","nuxt","platformatic","react","rust","svelte"],k=q(()=>{const x="Openapi",l=t.integration?.toLocaleLowerCase();if(!l)return x;const m=l.charAt(0).toUpperCase()+l.slice(1);return i.includes(l)?m:x});return(x,l)=>(o(),u(e(h),{class:"h-full w-full rounded-lg",logo:k.value},null,8,["logo"]))}}),R={class:"flex flex-col gap-2"},X=j({__name:"SettingsAppearance",setup(w){const{colorMode:t,setColorMode:i}=F(),k=T({base:"w-full shadow-none text-c-1 justify-start pl-2 gap-2 border",variants:{active:{true:"bg-primary text-c-1 hover:bg-inherit",false:"bg-b-1 hover:bg-b-2"}}});return(x,l)=>(o(),y("div",R,[f(e(b),{class:d(e(g)(e(k)({active:e(t)==="system"}))),onClick:l[0]||(l[0]=m=>e(i)("system"))},{default:r(()=>[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",{"bg-c-accent text-b-1 border-transparent":e(t)==="system"}])},[e(t)==="system"?(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"})):p("",!0)],2),l[3]||(l[3]=n(" System Preference (default) ",-1))]),_:1},8,["class"]),f(e(b),{class:d(e(g)(e(k)({active:e(t)==="light"}))),onClick:l[1]||(l[1]=m=>e(i)("light"))},{default:r(()=>[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",{"bg-c-accent text-b-1 border-transparent":e(t)==="light"}])},[e(t)==="light"?(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"})):p("",!0)],2),l[4]||(l[4]=n(" Light Mode Always ",-1))]),_:1},8,["class"]),f(e(b),{class:d(e(g)(e(k)({active:e(t)==="dark"}))),onClick:l[2]||(l[2]=m=>e(i)("dark"))},{default:r(()=>[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",{"bg-c-accent text-b-1 border-transparent":e(t)==="dark"}])},[e(t)==="dark"?(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"})):p("",!0)],2),l[5]||(l[5]=n(" Dark Mode Always ",-1))]),_:1},8,["class"])]))}}),E={class:"flex flex-col gap-2"},J={key:0,class:"font-bold"},K={key:1,class:"text-c-2 mb-4 leading-[21px]"},S=j({__name:"SettingsSection",setup(w){return(t,i)=>(o(),y("div",E,[t.$slots.title?(o(),y("h3",J,[z(t.$slots,"title")])):p("",!0),t.$slots.description?(o(),y("p",K,[z(t.$slots,"description")])):p("",!0),z(t.$slots,"default")]))}}),Q={class:"bg-b-1 h-full w-full overflow-auto"},Y={class:"mr-auto ml-auto w-full max-w-[720px] px-5 py-5"},Z={class:"flex flex-col gap-8"},ee={class:"flex flex-col gap-2"},te={class:"flex flex-col gap-2"},ae={class:"grid grid-cols-2 gap-2"},se={class:"flex items-center gap-2"},re={class:"flex items-center gap-1"},le={class:"grid grid-cols-2 gap-2"},ce={class:"flex items-center gap-2"},oe={class:"flex items-center gap-1"},ne={class:"size-7 rounded-xl"},_="https://proxy.scalar.com",ie=j({__name:"SettingsGeneral",setup(w){const{activeWorkspace:t}=N(),{proxyUrl:i,workspaceMutators:k}=O(),x=["default","alternate","purple","solarized","saturn","kepler"],l=["elysiajs","fastify"],m=v=>({default:{light:"#fff",dark:"#0f0f0f",accent:"#0099ff"},alternate:{light:"#f9f9f9",dark:"#131313",accent:"#e7e7e7"},moon:{light:"#ccc9b3",dark:"#313332",accent:"#645b0f"},purple:{light:"#f5f6f8",dark:"#22252b",accent:"#5469d4"},solarized:{light:"#fdf6e3",dark:"#00212b",accent:"#007acc"},bluePlanet:{light:"#f0f2f5",dark:"#000e23",accent:"#e0e2e6"},saturn:{light:"#e4e4df",dark:"#2c2c30",accent:"#1763a6"},kepler:{light:"#f6f6f6",dark:"#0d0f1e",accent:"#7070ff"},mars:{light:"#f2efe8",dark:"#321116",accent:"#c75549"},deepSpace:{light:"#f4f4f5",dark:"#09090b",accent:"#8ab4f8"},laserwave:{light:"#f4f2f7",dark:"#27212e",accent:"#ed78c2"},none:{light:"#ffffff",dark:"#000000",accent:"#3b82f6"}})[v]||{light:"#ffffff",dark:"#000000",accent:"#3b82f6"},I=v=>k.edit(t.value?.uid,"themeId",v),C=T({base:"w-full shadow-none text-c-1 justify-start pl-2 gap-2 border",variants:{active:{true:"bg-primary text-c-1 hover:bg-inherit",false:"bg-b-1 hover:bg-b-2"}}}),U=v=>k.edit(t.value?.uid,"proxyUrl",v);return(v,a)=>(o(),y("div",Q,[s("div",Y,[s("div",Z,[a[13]||(a[13]=s("div",null,[s("h2",{class:"mt-10 text-xl font-bold"},"Settings")],-1)),f(S,null,{title:r(()=>[...a[3]||(a[3]=[n(" CORS Proxy ",-1)])]),description:r(()=>[...a[4]||(a[4]=[n(" Browsers block cross-origin requests for security. We provide a public proxy to ",-1),s("a",{class:"hover:text-c-1 underline-offset-2",href:"https://en.wikipedia.org/wiki/Cross-origin_resource_sharing",target:"_blank"}," bypass CORS issues ",-1),n(" . Check the ",-1),s("a",{class:"hover:text-c-1 underline-offset-2",href:"https://github.com/scalar/scalar/tree/main/examples/proxy-server",target:"_blank"}," source code on GitHub ",-1),n(" . ",-1)])]),default:r(()=>[s("div",ee,[f(e(b),{class:d(e(g)(e(C)({active:e(t)?.proxyUrl===_}))),onClick:a[0]||(a[0]=c=>U(_))},{default:r(()=>[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",{"bg-c-accent text-b-1 border-transparent":e(t)?.proxyUrl===_}])},[e(t)?.proxyUrl===_?(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"})):p("",!0)],2),a[5]||(a[5]=n(" Use proxy.scalar.com (default) ",-1))]),_:1},8,["class"]),e(i)&&e(i)!==_?(o(),u(e(b),{key:0,class:d(e(g)(e(C)({active:e(t)?.proxyUrl===e(i)}))),onClick:a[1]||(a[1]=c=>U(e(i)))},{default:r(()=>[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",{"bg-c-accent text-b-1 border-transparent":e(t)?.proxyUrl===e(i)}])},[e(t)?.proxyUrl===e(i)?(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"})):p("",!0)],2),n(" Use custom proxy ("+$(e(i))+") ",1)]),_:1},8,["class"])):p("",!0),f(e(b),{class:d(e(g)(e(C)({active:!e(t)?.proxyUrl}))),onClick:a[2]||(a[2]=c=>U(void 0))},{default:r(()=>[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",!e(t)?.proxyUrl&&"bg-c-accent text-b-1 border-transparent"])},[e(t)?.proxyUrl?p("",!0):(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"}))],2),a[6]||(a[6]=n(" Skip the proxy ",-1))]),_:1},8,["class"])])]),_:1}),f(S,null,{title:r(()=>[...a[7]||(a[7]=[n(" Themes ",-1)])]),description:r(()=>[...a[8]||(a[8]=[n(" We've got a whole rainbow of themes for you to play with: ",-1)])]),default:r(()=>[s("div",te,[s("div",ae,[(o(),y(B,null,L(x,c=>f(e(b),{key:c,class:d(e(g)(e(C)({active:e(t)?.themeId===c}))),onClick:V=>I(c)},{default:r(()=>[s("div",se,[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",{"bg-c-accent text-b-1 border-transparent":e(t)?.themeId===c}])},[e(t)?.themeId===c?(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"})):p("",!0)],2),n(" "+$(e(M)[c]),1)]),s("div",re,[s("span",{class:"border-c-3 -mr-3 inline-block h-5 w-5 rounded-full",style:A({backgroundColor:m(c).light})},null,4),s("span",{class:"border-c-3 -mr-3 inline-block h-5 w-5 rounded-full",style:A({backgroundColor:m(c).dark})},null,4),s("span",{class:"border-c-3 inline-block h-5 w-5 rounded-full",style:A({backgroundColor:m(c).accent})},null,4)])]),_:2},1032,["class","onClick"])),64))])])]),_:1}),f(S,null,{title:r(()=>[...a[9]||(a[9]=[n(" Framework Themes ",-1)])]),description:r(()=>[...a[10]||(a[10]=[n(" Are you a real fan? Show your support by using your favorite framework's theme! ",-1)])]),default:r(()=>[s("div",le,[(o(),y(B,null,L(l,c=>f(e(b),{key:c,class:d(e(g)(e(C)({active:e(t)?.themeId===c}))),onClick:V=>I(c)},{default:r(()=>[s("div",ce,[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",{"bg-c-accent text-b-1 border-transparent":e(t)?.themeId===c}])},[e(t)?.themeId===c?(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"})):p("",!0)],2),n(" "+$(e(M)[c]),1)]),s("div",oe,[s("div",ne,[f(H,{integration:c},null,8,["integration"])])])]),_:2},1032,["class","onClick"])),64))])]),_:1}),f(S,null,{title:r(()=>[...a[11]||(a[11]=[n(" Appearance ",-1)])]),description:r(()=>[...a[12]||(a[12]=[n(" Choose between light, dark, or system-based appearance for your workspace. ",-1)])]),default:r(()=>[f(X)]),_:1})])])]))}}),be=j({__name:"Settings",setup(w){const t={general:{component:ie,title:"general"}},i=G("general");return(k,x)=>(o(),u(W,null,{default:r(()=>[f(D,{class:"flex-1"},{default:r(()=>[t[i.value]?(o(),u(P(t[i.value].component),{key:0})):p("",!0)]),_:1})]),_:1}))}});export{be as default};
1
+ import{u as W}from"./DnGW0m4Y.js";import{x as D}from"./Dni4zvfP.js";import{r as h,bu as F,aW as g,aX as T,T as b,d as N,g as O,bv as M}from"./D1Q9L7QE.js";import{d as j,m as q,j as u,b as o,h as e,c as y,f,w as r,e as s,g as n,s as d,k as p,al as z,t as $,F as B,q as L,p as A,r as G,am as P}from"./CRsWdsU-.js";import"./92s3wAHG.js";import"./OpmtRlfX.js";import"./cFgYOPT2.js";import"./BE3foYyN.js";const H=j({__name:"IntegrationLogo",props:{integration:{}},setup(w){const t=w,i=["adonisjs","astro","dotnet","elysiajs","express","fastapi","fastify","go","hono","laravel","litestar","nestjs","nextjs","nitro","nuxt","platformatic","react","rust","svelte"],k=q(()=>{const x="Openapi",l=t.integration?.toLocaleLowerCase();if(!l)return x;const m=l.charAt(0).toUpperCase()+l.slice(1);return i.includes(l)?m:x});return(x,l)=>(o(),u(e(h),{class:"h-full w-full rounded-lg",logo:k.value},null,8,["logo"]))}}),R={class:"flex flex-col gap-2"},X=j({__name:"SettingsAppearance",setup(w){const{colorMode:t,setColorMode:i}=F(),k=T({base:"w-full shadow-none text-c-1 justify-start pl-2 gap-2 border",variants:{active:{true:"bg-primary text-c-1 hover:bg-inherit",false:"bg-b-1 hover:bg-b-2"}}});return(x,l)=>(o(),y("div",R,[f(e(b),{class:d(e(g)(e(k)({active:e(t)==="system"}))),onClick:l[0]||(l[0]=m=>e(i)("system"))},{default:r(()=>[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",{"bg-c-accent text-b-1 border-transparent":e(t)==="system"}])},[e(t)==="system"?(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"})):p("",!0)],2),l[3]||(l[3]=n(" System Preference (default) ",-1))]),_:1},8,["class"]),f(e(b),{class:d(e(g)(e(k)({active:e(t)==="light"}))),onClick:l[1]||(l[1]=m=>e(i)("light"))},{default:r(()=>[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",{"bg-c-accent text-b-1 border-transparent":e(t)==="light"}])},[e(t)==="light"?(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"})):p("",!0)],2),l[4]||(l[4]=n(" Light Mode Always ",-1))]),_:1},8,["class"]),f(e(b),{class:d(e(g)(e(k)({active:e(t)==="dark"}))),onClick:l[2]||(l[2]=m=>e(i)("dark"))},{default:r(()=>[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",{"bg-c-accent text-b-1 border-transparent":e(t)==="dark"}])},[e(t)==="dark"?(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"})):p("",!0)],2),l[5]||(l[5]=n(" Dark Mode Always ",-1))]),_:1},8,["class"])]))}}),E={class:"flex flex-col gap-2"},J={key:0,class:"font-bold"},K={key:1,class:"text-c-2 mb-4 leading-[21px]"},S=j({__name:"SettingsSection",setup(w){return(t,i)=>(o(),y("div",E,[t.$slots.title?(o(),y("h3",J,[z(t.$slots,"title")])):p("",!0),t.$slots.description?(o(),y("p",K,[z(t.$slots,"description")])):p("",!0),z(t.$slots,"default")]))}}),Q={class:"bg-b-1 h-full w-full overflow-auto"},Y={class:"mr-auto ml-auto w-full max-w-[720px] px-5 py-5"},Z={class:"flex flex-col gap-8"},ee={class:"flex flex-col gap-2"},te={class:"flex flex-col gap-2"},ae={class:"grid grid-cols-2 gap-2"},se={class:"flex items-center gap-2"},re={class:"flex items-center gap-1"},le={class:"grid grid-cols-2 gap-2"},ce={class:"flex items-center gap-2"},oe={class:"flex items-center gap-1"},ne={class:"size-7 rounded-xl"},_="https://proxy.scalar.com",ie=j({__name:"SettingsGeneral",setup(w){const{activeWorkspace:t}=N(),{proxyUrl:i,workspaceMutators:k}=O(),x=["default","alternate","purple","solarized","saturn","kepler"],l=["elysiajs","fastify"],m=v=>({default:{light:"#fff",dark:"#0f0f0f",accent:"#0099ff"},alternate:{light:"#f9f9f9",dark:"#131313",accent:"#e7e7e7"},moon:{light:"#ccc9b3",dark:"#313332",accent:"#645b0f"},purple:{light:"#f5f6f8",dark:"#22252b",accent:"#5469d4"},solarized:{light:"#fdf6e3",dark:"#00212b",accent:"#007acc"},bluePlanet:{light:"#f0f2f5",dark:"#000e23",accent:"#e0e2e6"},saturn:{light:"#e4e4df",dark:"#2c2c30",accent:"#1763a6"},kepler:{light:"#f6f6f6",dark:"#0d0f1e",accent:"#7070ff"},mars:{light:"#f2efe8",dark:"#321116",accent:"#c75549"},deepSpace:{light:"#f4f4f5",dark:"#09090b",accent:"#8ab4f8"},laserwave:{light:"#f4f2f7",dark:"#27212e",accent:"#ed78c2"},none:{light:"#ffffff",dark:"#000000",accent:"#3b82f6"}})[v]||{light:"#ffffff",dark:"#000000",accent:"#3b82f6"},I=v=>k.edit(t.value?.uid,"themeId",v),C=T({base:"w-full shadow-none text-c-1 justify-start pl-2 gap-2 border",variants:{active:{true:"bg-primary text-c-1 hover:bg-inherit",false:"bg-b-1 hover:bg-b-2"}}}),U=v=>k.edit(t.value?.uid,"proxyUrl",v);return(v,a)=>(o(),y("div",Q,[s("div",Y,[s("div",Z,[a[13]||(a[13]=s("div",null,[s("h2",{class:"mt-10 text-xl font-bold"},"Settings")],-1)),f(S,null,{title:r(()=>[...a[3]||(a[3]=[n(" CORS Proxy ",-1)])]),description:r(()=>[...a[4]||(a[4]=[n(" Browsers block cross-origin requests for security. We provide a public proxy to ",-1),s("a",{class:"hover:text-c-1 underline-offset-2",href:"https://en.wikipedia.org/wiki/Cross-origin_resource_sharing",target:"_blank"}," bypass CORS issues ",-1),n(" . Check the ",-1),s("a",{class:"hover:text-c-1 underline-offset-2",href:"https://github.com/scalar/scalar/tree/main/examples/proxy-server",target:"_blank"}," source code on GitHub ",-1),n(" . ",-1)])]),default:r(()=>[s("div",ee,[f(e(b),{class:d(e(g)(e(C)({active:e(t)?.proxyUrl===_}))),onClick:a[0]||(a[0]=c=>U(_))},{default:r(()=>[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",{"bg-c-accent text-b-1 border-transparent":e(t)?.proxyUrl===_}])},[e(t)?.proxyUrl===_?(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"})):p("",!0)],2),a[5]||(a[5]=n(" Use proxy.scalar.com (default) ",-1))]),_:1},8,["class"]),e(i)&&e(i)!==_?(o(),u(e(b),{key:0,class:d(e(g)(e(C)({active:e(t)?.proxyUrl===e(i)}))),onClick:a[1]||(a[1]=c=>U(e(i)))},{default:r(()=>[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",{"bg-c-accent text-b-1 border-transparent":e(t)?.proxyUrl===e(i)}])},[e(t)?.proxyUrl===e(i)?(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"})):p("",!0)],2),n(" Use custom proxy ("+$(e(i))+") ",1)]),_:1},8,["class"])):p("",!0),f(e(b),{class:d(e(g)(e(C)({active:!e(t)?.proxyUrl}))),onClick:a[2]||(a[2]=c=>U(void 0))},{default:r(()=>[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",!e(t)?.proxyUrl&&"bg-c-accent text-b-1 border-transparent"])},[e(t)?.proxyUrl?p("",!0):(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"}))],2),a[6]||(a[6]=n(" Skip the proxy ",-1))]),_:1},8,["class"])])]),_:1}),f(S,null,{title:r(()=>[...a[7]||(a[7]=[n(" Themes ",-1)])]),description:r(()=>[...a[8]||(a[8]=[n(" We've got a whole rainbow of themes for you to play with: ",-1)])]),default:r(()=>[s("div",te,[s("div",ae,[(o(),y(B,null,L(x,c=>f(e(b),{key:c,class:d(e(g)(e(C)({active:e(t)?.themeId===c}))),onClick:V=>I(c)},{default:r(()=>[s("div",se,[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",{"bg-c-accent text-b-1 border-transparent":e(t)?.themeId===c}])},[e(t)?.themeId===c?(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"})):p("",!0)],2),n(" "+$(e(M)[c]),1)]),s("div",re,[s("span",{class:"border-c-3 -mr-3 inline-block h-5 w-5 rounded-full",style:A({backgroundColor:m(c).light})},null,4),s("span",{class:"border-c-3 -mr-3 inline-block h-5 w-5 rounded-full",style:A({backgroundColor:m(c).dark})},null,4),s("span",{class:"border-c-3 inline-block h-5 w-5 rounded-full",style:A({backgroundColor:m(c).accent})},null,4)])]),_:2},1032,["class","onClick"])),64))])])]),_:1}),f(S,null,{title:r(()=>[...a[9]||(a[9]=[n(" Framework Themes ",-1)])]),description:r(()=>[...a[10]||(a[10]=[n(" Are you a real fan? Show your support by using your favorite framework's theme! ",-1)])]),default:r(()=>[s("div",le,[(o(),y(B,null,L(l,c=>f(e(b),{key:c,class:d(e(g)(e(C)({active:e(t)?.themeId===c}))),onClick:V=>I(c)},{default:r(()=>[s("div",ce,[s("div",{class:d(["flex h-5 w-5 items-center justify-center rounded-full border-[1.5px] p-1",{"bg-c-accent text-b-1 border-transparent":e(t)?.themeId===c}])},[e(t)?.themeId===c?(o(),u(e(h),{key:0,icon:"Checkmark",size:"xs",thickness:"3.5"})):p("",!0)],2),n(" "+$(e(M)[c]),1)]),s("div",oe,[s("div",ne,[f(H,{integration:c},null,8,["integration"])])])]),_:2},1032,["class","onClick"])),64))])]),_:1}),f(S,null,{title:r(()=>[...a[11]||(a[11]=[n(" Appearance ",-1)])]),description:r(()=>[...a[12]||(a[12]=[n(" Choose between light, dark, or system-based appearance for your workspace. ",-1)])]),default:r(()=>[f(X)]),_:1})])])]))}}),be=j({__name:"Settings",setup(w){const t={general:{component:ie,title:"general"}},i=G("general");return(k,x)=>(o(),u(W,null,{default:r(()=>[f(D,{class:"flex-1"},{default:r(()=>[t[i.value]?(o(),u(P(t[i.value].component),{key:0})):p("",!0)]),_:1})]),_:1}))}});export{be as default};