@commandable/mcp 0.2.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{S2P9sd4n.js → CBR-0oRi.js} +1 -1
  3. package/.output/public/_nuxt/CYsCQznM.js +59 -0
  4. package/.output/public/_nuxt/{B04gGCnx.js → Ctwv5nxD.js} +3 -3
  5. package/.output/public/_nuxt/{BvFUCPqA.js → DKO0MviJ.js} +1 -1
  6. package/.output/public/_nuxt/{d2XTSFt9.js → DOIzs5t4.js} +1 -1
  7. package/.output/public/_nuxt/KqToXREt.js +1 -0
  8. package/.output/public/_nuxt/{Dm_hd4at.js → Sdkz9rYy.js} +1 -1
  9. package/.output/public/_nuxt/_id_.DhlLK-mY.css +1 -0
  10. package/.output/public/_nuxt/builds/latest.json +1 -1
  11. package/.output/public/_nuxt/builds/meta/dd3dc5d0-c600-485d-b098-2f5b9facdf63.json +1 -0
  12. package/.output/server/chunks/build/IntegrationCredentials-styles.COcCfJmp.mjs +8 -0
  13. package/.output/server/chunks/build/IntegrationCredentials-styles.COcCfJmp.mjs.map +1 -0
  14. package/.output/server/chunks/build/{_id_-Bnxenh08.mjs → _id_-Co8jGxsD.mjs} +160 -38
  15. package/.output/server/chunks/build/{_id_-Bnxenh08.mjs.map → _id_-Co8jGxsD.mjs.map} +1 -1
  16. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  17. package/.output/server/chunks/build/{error-404-D2QibUBT.mjs → error-404-D1k2kWid.mjs} +13 -8
  18. package/.output/server/chunks/build/error-404-D1k2kWid.mjs.map +1 -0
  19. package/.output/server/chunks/build/{error-500-DYvawybF.mjs → error-500-D2K2rAfl.mjs} +13 -8
  20. package/.output/server/chunks/build/error-500-D2K2rAfl.mjs.map +1 -0
  21. package/.output/server/chunks/build/{fetch-BmYZnj75.mjs → fetch-aDh21opM.mjs} +114 -13
  22. package/.output/server/chunks/build/fetch-aDh21opM.mjs.map +1 -0
  23. package/.output/server/chunks/build/{index-CL-Gkd-Y.mjs → index-BxsJPthj.mjs} +24 -15
  24. package/.output/server/chunks/build/index-BxsJPthj.mjs.map +1 -0
  25. package/.output/server/chunks/build/{index-5H-nmhph.mjs → index-ycGPozML.mjs} +13 -8
  26. package/.output/server/chunks/build/index-ycGPozML.mjs.map +1 -0
  27. package/.output/server/chunks/build/server.mjs +17 -12
  28. package/.output/server/chunks/build/styles.mjs +2 -2
  29. package/.output/server/chunks/nitro/nitro.mjs +13082 -766
  30. package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
  31. package/.output/server/chunks/routes/api/_commandable/status.get.mjs +15 -8
  32. package/.output/server/chunks/routes/api/_commandable/status.get.mjs.map +1 -1
  33. package/.output/server/chunks/routes/api/catalog/_type/tools.get.mjs +13 -8
  34. package/.output/server/chunks/routes/api/catalog/_type/tools.get.mjs.map +1 -1
  35. package/.output/server/chunks/routes/api/catalog/_type/toolsets.get.mjs +13 -8
  36. package/.output/server/chunks/routes/api/catalog/_type/toolsets.get.mjs.map +1 -1
  37. package/.output/server/chunks/routes/api/catalog.get.mjs +12 -7
  38. package/.output/server/chunks/routes/api/catalog.get.mjs.map +1 -1
  39. package/.output/server/chunks/routes/api/index.get.mjs +13 -8
  40. package/.output/server/chunks/routes/api/index.get.mjs.map +1 -1
  41. package/.output/server/chunks/routes/api/index.post.mjs +12 -7
  42. package/.output/server/chunks/routes/api/index.post.mjs.map +1 -1
  43. package/.output/server/chunks/routes/api/integrations/_id/credentials-config.get.mjs +15 -12
  44. package/.output/server/chunks/routes/api/integrations/_id/credentials-config.get.mjs.map +1 -1
  45. package/.output/server/chunks/routes/api/integrations/_id/credentials-status.get.mjs +15 -12
  46. package/.output/server/chunks/routes/api/integrations/_id/credentials-status.get.mjs.map +1 -1
  47. package/.output/server/chunks/routes/api/integrations/_id/credentials.delete.mjs +18 -15
  48. package/.output/server/chunks/routes/api/integrations/_id/credentials.delete.mjs.map +1 -1
  49. package/.output/server/chunks/routes/api/integrations/_id/credentials.post.mjs +28 -24
  50. package/.output/server/chunks/routes/api/integrations/_id/credentials.post.mjs.map +1 -1
  51. package/.output/server/chunks/routes/api/integrations/_id/permissions.post.mjs +13 -8
  52. package/.output/server/chunks/routes/api/integrations/_id/permissions.post.mjs.map +1 -1
  53. package/.output/server/chunks/routes/api/integrations/_id/tools.delete.mjs +13 -8
  54. package/.output/server/chunks/routes/api/integrations/_id/tools.delete.mjs.map +1 -1
  55. package/.output/server/chunks/routes/api/integrations/_id/tools.get.mjs +27 -10
  56. package/.output/server/chunks/routes/api/integrations/_id/tools.get.mjs.map +1 -1
  57. package/.output/server/chunks/routes/api/integrations/_id/toolsets.get.mjs +13 -8
  58. package/.output/server/chunks/routes/api/integrations/_id/toolsets.get.mjs.map +1 -1
  59. package/.output/server/chunks/routes/api/integrations/_id/toolsets.post.mjs +13 -8
  60. package/.output/server/chunks/routes/api/integrations/_id/toolsets.post.mjs.map +1 -1
  61. package/.output/server/chunks/routes/api/integrations/_id_.delete.mjs +13 -8
  62. package/.output/server/chunks/routes/api/integrations/_id_.delete.mjs.map +1 -1
  63. package/.output/server/chunks/routes/health.get.mjs +12 -7
  64. package/.output/server/chunks/routes/health.get.mjs.map +1 -1
  65. package/.output/server/chunks/routes/mcp/create.mjs +13 -8
  66. package/.output/server/chunks/routes/mcp/create.mjs.map +1 -1
  67. package/.output/server/chunks/routes/mcp/static.mjs +61 -0
  68. package/.output/server/chunks/routes/mcp/static.mjs.map +1 -0
  69. package/.output/server/chunks/routes/mcp.mjs +14 -9
  70. package/.output/server/chunks/routes/mcp.mjs.map +1 -1
  71. package/.output/server/index.mjs +12 -7
  72. package/.output/server/index.mjs.map +1 -1
  73. package/.output/server/package.json +1 -1
  74. package/README.md +17 -1
  75. package/bin/cli.mjs +34 -17
  76. package/package.json +15 -14
  77. package/.output/public/_nuxt/B2dAlp_u.js +0 -59
  78. package/.output/public/_nuxt/Ba0BY0O0.js +0 -1
  79. package/.output/public/_nuxt/_id_.BKAjWkoP.css +0 -1
  80. package/.output/public/_nuxt/builds/meta/87720575-dfd4-475f-92c1-554fcd8b22f1.json +0 -1
  81. package/.output/server/chunks/build/IntegrationCredentials-styles.CULcCK6_.mjs +0 -8
  82. package/.output/server/chunks/build/IntegrationCredentials-styles.CULcCK6_.mjs.map +0 -1
  83. package/.output/server/chunks/build/error-404-D2QibUBT.mjs.map +0 -1
  84. package/.output/server/chunks/build/error-500-DYvawybF.mjs.map +0 -1
  85. package/.output/server/chunks/build/fetch-BmYZnj75.mjs.map +0 -1
  86. package/.output/server/chunks/build/index-5H-nmhph.mjs.map +0 -1
  87. package/.output/server/chunks/build/index-CL-Gkd-Y.mjs.map +0 -1
@@ -1,59 +0,0 @@
1
- import{g as et,h as tt,i as nt,j as st,k as rt,l as lt,m as it,p as at,q as ot,o as _,r as X,w as T,a as y,s as Ce,v as p,x as fe,c as C,y as H,z as oe,A as ct,B as K,P as ut,C as U,D as pt,E as qe,f as De,F as ke,b as z,d as A,G as Oe,H as me,I as xe,J as dt,K as ht,L as q,M as gt,_ as ft,N as kt,O as mt,Q as xt,e as bt,t as ie,n as wt}from"./B04gGCnx.js";import{_ as yt,a as vt,u as $t,b as St,c as _t,d as zt}from"./Ba0BY0O0.js";const Rt={slots:{root:"relative inline-flex items-center",base:["w-full rounded-md border-0 appearance-none placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75","transition-colors"],leading:"absolute inset-y-0 start-0 flex items-center",leadingIcon:"shrink-0 text-dimmed",leadingAvatar:"shrink-0",leadingAvatarSize:"",trailing:"absolute inset-y-0 end-0 flex items-center",trailingIcon:"shrink-0 text-dimmed"},variants:{fieldGroup:{horizontal:{root:"group has-focus-visible:z-[1]",base:"group-not-only:group-first:rounded-e-none group-not-only:group-last:rounded-s-none group-not-last:group-not-first:rounded-none"},vertical:{root:"group has-focus-visible:z-[1]",base:"group-not-only:group-first:rounded-b-none group-not-only:group-last:rounded-t-none group-not-last:group-not-first:rounded-none"}},size:{xs:{base:"px-2 py-1 text-sm/4 gap-1",leading:"ps-2",trailing:"pe-2",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4"},sm:{base:"px-2.5 py-1.5 text-sm/4 gap-1.5",leading:"ps-2.5",trailing:"pe-2.5",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4"},md:{base:"px-2.5 py-1.5 text-base/5 gap-1.5",leading:"ps-2.5",trailing:"pe-2.5",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5"},lg:{base:"px-3 py-2 text-base/5 gap-2",leading:"ps-3",trailing:"pe-3",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5"},xl:{base:"px-3 py-2 text-base gap-2",leading:"ps-3",trailing:"pe-3",leadingIcon:"size-6",leadingAvatarSize:"xs",trailingIcon:"size-6"}},variant:{outline:"text-highlighted bg-default ring ring-inset ring-accented",soft:"text-highlighted bg-elevated/50 hover:bg-elevated focus:bg-elevated disabled:bg-elevated/50",subtle:"text-highlighted bg-elevated ring ring-inset ring-accented",ghost:"text-highlighted bg-transparent hover:bg-elevated focus:bg-elevated disabled:bg-transparent dark:disabled:bg-transparent",none:"text-highlighted bg-transparent"},color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},leading:{true:""},trailing:{true:""},loading:{true:""},highlight:{true:""},fixed:{false:""},type:{file:"file:me-1.5 file:font-medium file:text-muted file:outline-none"}},compoundVariants:[{color:"primary",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary"},{color:"secondary",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary"},{color:"success",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-success"},{color:"info",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-info"},{color:"warning",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-warning"},{color:"error",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-error"},{color:"primary",highlight:!0,class:"ring ring-inset ring-primary"},{color:"secondary",highlight:!0,class:"ring ring-inset ring-secondary"},{color:"success",highlight:!0,class:"ring ring-inset ring-success"},{color:"info",highlight:!0,class:"ring ring-inset ring-info"},{color:"warning",highlight:!0,class:"ring ring-inset ring-warning"},{color:"error",highlight:!0,class:"ring ring-inset ring-error"},{color:"neutral",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-inverted"},{color:"neutral",highlight:!0,class:"ring ring-inset ring-inverted"},{leading:!0,size:"xs",class:"ps-7"},{leading:!0,size:"sm",class:"ps-8"},{leading:!0,size:"md",class:"ps-9"},{leading:!0,size:"lg",class:"ps-10"},{leading:!0,size:"xl",class:"ps-11"},{trailing:!0,size:"xs",class:"pe-7"},{trailing:!0,size:"sm",class:"pe-8"},{trailing:!0,size:"md",class:"pe-9"},{trailing:!0,size:"lg",class:"pe-10"},{trailing:!0,size:"xl",class:"pe-11"},{loading:!0,leading:!0,class:{leadingIcon:"animate-spin"}},{loading:!0,leading:!1,trailing:!0,class:{trailingIcon:"animate-spin"}},{fixed:!1,size:"xs",class:"md:text-xs"},{fixed:!1,size:"sm",class:"md:text-xs"},{fixed:!1,size:"md",class:"md:text-sm"},{fixed:!1,size:"lg",class:"md:text-sm"}],defaultVariants:{size:"md",color:"primary",variant:"outline"}},Tt=["id","type","value","name","placeholder","disabled","required","autocomplete"],It=Object.assign({inheritAttrs:!1},{__name:"UInput",props:{as:{type:null,required:!1},id:{type:String,required:!1},name:{type:String,required:!1},type:{type:null,required:!1,default:"text"},placeholder:{type:String,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},required:{type:Boolean,required:!1},autocomplete:{type:[String,Object],required:!1,default:"off"},autofocus:{type:Boolean,required:!1},autofocusDelay:{type:Number,required:!1,default:0},disabled:{type:Boolean,required:!1},highlight:{type:Boolean,required:!1},fixed:{type:Boolean,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},modelModifiers:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1}},emits:["update:modelValue","blur","change"],setup(s,{expose:e,emit:n}){const r=s,t=n,i=et(),l=tt(r,"modelValue",t,{defaultValue:r.defaultValue}),u=nt(),a=st("input",r),{emitFormBlur:o,emitFormInput:c,emitFormChange:d,size:h,color:x,id:b,name:I,highlight:D,disabled:j,emitFormFocus:Z,ariaAttrs:N}=rt(r,{deferInputValidation:!0}),{orientation:R,size:f}=lt(r),{isLeading:S,isTrailing:F,leadingIconName:k,trailingIconName:g}=it(r),L=U(()=>f.value||h.value),$=U(()=>qe({extend:qe(Rt),...u.ui?.input||{}})({type:r.type,color:x.value,variant:r.variant,size:L?.value,loading:r.loading,highlight:D.value,fixed:r.fixed,leading:S.value||!!r.avatar||!!i.leading,trailing:F.value||!!i.trailing,fieldGroup:R.value})),Q=at("inputRef");function G(v){r.modelModifiers?.trim&&(typeof v=="string"||v===null||v===void 0)&&(v=v?.trim()??null),(r.modelModifiers?.number||r.type==="number")&&(v=pt(v)),r.modelModifiers?.nullable&&(v||=null),r.modelModifiers?.optional&&!r.modelModifiers?.nullable&&v!==null&&(v||=void 0),l.value=v,c()}function E(v){r.modelModifiers?.lazy||G(v.target.value)}function ge(v){const ee=v.target.value;r.modelModifiers?.lazy&&G(ee),r.modelModifiers?.trim&&(v.target.value=ee.trim()),d(),t("change",v)}function B(v){o(),t("blur",v)}function le(){r.autofocus&&Q.value?.focus()}return ot(()=>{setTimeout(()=>{le()},r.autofocusDelay)}),e({inputRef:Q}),(v,ee)=>(_(),X(p(ut),{as:s.as,"data-slot":"root",class:H($.value.root({class:[p(a)?.root,r.class]}))},{default:T(()=>[y("input",Ce({id:p(b),ref_key:"inputRef",ref:Q,type:s.type,value:p(l),name:p(I),placeholder:s.placeholder,"data-slot":"base",class:$.value.base({class:p(a)?.base}),disabled:p(j),required:s.required,autocomplete:s.autocomplete},{...v.$attrs,...p(N)},{onInput:E,onBlur:B,onChange:ge,onFocus:ee[0]||(ee[0]=(...Ye)=>p(Z)&&p(Z)(...Ye))}),null,16,Tt),fe(v.$slots,"default",{ui:$.value}),p(S)||s.avatar||i.leading?(_(),C("span",{key:0,"data-slot":"leading",class:H($.value.leading({class:p(a)?.leading}))},[fe(v.$slots,"leading",{ui:$.value},()=>[p(S)&&p(k)?(_(),X(oe,{key:0,name:p(k),"data-slot":"leadingIcon",class:H($.value.leadingIcon({class:p(a)?.leadingIcon}))},null,8,["name","class"])):s.avatar?(_(),X(ct,Ce({key:1,size:p(a)?.leadingAvatarSize||$.value.leadingAvatarSize()},s.avatar,{"data-slot":"leadingAvatar",class:$.value.leadingAvatar({class:p(a)?.leadingAvatar})}),null,16,["size","class"])):K("",!0)])],2)):K("",!0),p(F)||i.trailing?(_(),C("span",{key:1,"data-slot":"trailing",class:H($.value.trailing({class:p(a)?.trailing}))},[fe(v.$slots,"trailing",{ui:$.value},()=>[p(g)?(_(),X(oe,{key:0,name:p(g),"data-slot":"trailingIcon",class:H($.value.trailingIcon({class:p(a)?.trailingIcon}))},null,8,["name","class"])):K("",!0)])],2)):K("",!0)]),_:3},8,["as","class"]))}});function ve(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Y=ve();function je(s){Y=s}var W={exec:()=>null};function m(s,e=""){let n=typeof s=="string"?s:s.source,r={replace:(t,i)=>{let l=typeof i=="string"?i:i.source;return l=l.replace(P.caret,"$1"),n=n.replace(t,l),r},getRegex:()=>new RegExp(n,e)};return r}var At=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),P={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:s=>new RegExp(`^( {0,3}${s})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}#`),htmlBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:s=>new RegExp(`^ {0,${Math.min(3,s-1)}}>`)},Ct=/^(?:[ \t]*(?:\n|$))+/,qt=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Pt=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,re=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Bt=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,$e=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Ze=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Fe=m(Ze).replace(/bull/g,$e).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Lt=m(Ze).replace(/bull/g,$e).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Se=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Et=/^[^\n]+/,_e=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Mt=m(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",_e).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Vt=m(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,$e).getRegex(),de="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ze=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Dt=m("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ze).replace("tag",de).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ne=m(Se).replace("hr",re).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",de).getRegex(),Ot=m(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ne).getRegex(),Re={blockquote:Ot,code:qt,def:Mt,fences:Pt,heading:Bt,hr:re,html:Dt,lheading:Fe,list:Vt,newline:Ct,paragraph:Ne,table:W,text:Et},Pe=m("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",re).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",de).getRegex(),jt={...Re,lheading:Lt,table:Pe,paragraph:m(Se).replace("hr",re).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Pe).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",de).getRegex()},Zt={...Re,html:m(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ze).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:W,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:m(Se).replace("hr",re).replace("heading",` *#{1,6} *[^
2
- ]`).replace("lheading",Fe).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ft=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Nt=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ue=/^( {2,}|\\)\n(?!\s*$)/,Ut=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,he=/[\p{P}\p{S}]/u,Te=/[\s\p{P}\p{S}]/u,Qe=/[^\s\p{P}\p{S}]/u,Qt=m(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Te).getRegex(),Ge=/(?!~)[\p{P}\p{S}]/u,Gt=/(?!~)[\s\p{P}\p{S}]/u,Ht=/(?:[^\s\p{P}\p{S}]|~)/u,He=/(?![*_])[\p{P}\p{S}]/u,Wt=/(?![*_])[\s\p{P}\p{S}]/u,Xt=/(?:[^\s\p{P}\p{S}]|[*_])/u,Kt=m(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",At?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),We=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Jt=m(We,"u").replace(/punct/g,he).getRegex(),Yt=m(We,"u").replace(/punct/g,Ge).getRegex(),Xe="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",en=m(Xe,"gu").replace(/notPunctSpace/g,Qe).replace(/punctSpace/g,Te).replace(/punct/g,he).getRegex(),tn=m(Xe,"gu").replace(/notPunctSpace/g,Ht).replace(/punctSpace/g,Gt).replace(/punct/g,Ge).getRegex(),nn=m("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Qe).replace(/punctSpace/g,Te).replace(/punct/g,he).getRegex(),sn=m(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,He).getRegex(),rn="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",ln=m(rn,"gu").replace(/notPunctSpace/g,Xt).replace(/punctSpace/g,Wt).replace(/punct/g,He).getRegex(),an=m(/\\(punct)/,"gu").replace(/punct/g,he).getRegex(),on=m(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),cn=m(ze).replace("(?:-->|$)","-->").getRegex(),un=m("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",cn).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ce=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,pn=m(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ce).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Ke=m(/^!?\[(label)\]\[(ref)\]/).replace("label",ce).replace("ref",_e).getRegex(),Je=m(/^!?\[(ref)\](?:\[\])?/).replace("ref",_e).getRegex(),dn=m("reflink|nolink(?!\\()","g").replace("reflink",Ke).replace("nolink",Je).getRegex(),Be=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ie={_backpedal:W,anyPunctuation:an,autolink:on,blockSkip:Kt,br:Ue,code:Nt,del:W,delLDelim:W,delRDelim:W,emStrongLDelim:Jt,emStrongRDelimAst:en,emStrongRDelimUnd:nn,escape:Ft,link:pn,nolink:Je,punctuation:Qt,reflink:Ke,reflinkSearch:dn,tag:un,text:Ut,url:W},hn={...Ie,link:m(/^!?\[(label)\]\((.*?)\)/).replace("label",ce).getRegex(),reflink:m(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ce).getRegex()},be={...Ie,emStrongRDelimAst:tn,emStrongLDelim:Yt,delLDelim:sn,delRDelim:ln,url:m(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Be).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:m(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Be).getRegex()},gn={...be,br:m(Ue).replace("{2,}","*").getRegex(),text:m(be.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ae={normal:Re,gfm:jt,pedantic:Zt},te={normal:Ie,gfm:be,breaks:gn,pedantic:hn},fn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Le=s=>fn[s];function O(s,e){if(e){if(P.escapeTest.test(s))return s.replace(P.escapeReplace,Le)}else if(P.escapeTestNoEncode.test(s))return s.replace(P.escapeReplaceNoEncode,Le);return s}function Ee(s){try{s=encodeURI(s).replace(P.percentDecode,"%")}catch{return null}return s}function Me(s,e){let n=s.replace(P.findPipe,(i,l,u)=>{let a=!1,o=l;for(;--o>=0&&u[o]==="\\";)a=!a;return a?"|":" |"}),r=n.split(P.splitPipe),t=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;t<r.length;t++)r[t]=r[t].trim().replace(P.slashPipe,"|");return r}function ne(s,e,n){let r=s.length;if(r===0)return"";let t=0;for(;t<r&&s.charAt(r-t-1)===e;)t++;return s.slice(0,r-t)}function kn(s,e){if(s.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<s.length;r++)if(s[r]==="\\")r++;else if(s[r]===e[0])n++;else if(s[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}function mn(s,e=0){let n=e,r="";for(let t of s)if(t===" "){let i=4-n%4;r+=" ".repeat(i),n+=i}else r+=t,n++;return r}function Ve(s,e,n,r,t){let i=e.href,l=e.title||null,u=s[1].replace(t.other.outputLinkReplace,"$1");r.state.inLink=!0;let a={type:s[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:l,text:u,tokens:r.inlineTokens(u)};return r.state.inLink=!1,a}function xn(s,e,n){let r=s.match(n.other.indentCodeCompensation);if(r===null)return e;let t=r[1];return e.split(`
3
- `).map(i=>{let l=i.match(n.other.beginningSpace);if(l===null)return i;let[u]=l;return u.length>=t.length?i.slice(t.length):i}).join(`
4
- `)}var ue=class{options;rules;lexer;constructor(s){this.options=s||Y}space(s){let e=this.rules.block.newline.exec(s);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(s){let e=this.rules.block.code.exec(s);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:ne(n,`
5
- `)}}}fences(s){let e=this.rules.block.fences.exec(s);if(e){let n=e[0],r=xn(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(s){let e=this.rules.block.heading.exec(s);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let r=ne(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(s){let e=this.rules.block.hr.exec(s);if(e)return{type:"hr",raw:ne(e[0],`
6
- `)}}blockquote(s){let e=this.rules.block.blockquote.exec(s);if(e){let n=ne(e[0],`
7
- `).split(`
8
- `),r="",t="",i=[];for(;n.length>0;){let l=!1,u=[],a;for(a=0;a<n.length;a++)if(this.rules.other.blockquoteStart.test(n[a]))u.push(n[a]),l=!0;else if(!l)u.push(n[a]);else break;n=n.slice(a);let o=u.join(`
9
- `),c=o.replace(this.rules.other.blockquoteSetextReplace,`
10
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
11
- ${o}`:o,t=t?`${t}
12
- ${c}`:c;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=d,n.length===0)break;let h=i.at(-1);if(h?.type==="code")break;if(h?.type==="blockquote"){let x=h,b=x.raw+`
13
- `+n.join(`
14
- `),I=this.blockquote(b);i[i.length-1]=I,r=r.substring(0,r.length-x.raw.length)+I.raw,t=t.substring(0,t.length-x.text.length)+I.text;break}else if(h?.type==="list"){let x=h,b=x.raw+`
15
- `+n.join(`
16
- `),I=this.list(b);i[i.length-1]=I,r=r.substring(0,r.length-h.raw.length)+I.raw,t=t.substring(0,t.length-x.raw.length)+I.raw,n=b.substring(i.at(-1).raw.length).split(`
17
- `);continue}}return{type:"blockquote",raw:r,tokens:i,text:t}}}list(s){let e=this.rules.block.list.exec(s);if(e){let n=e[1].trim(),r=n.length>1,t={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let i=this.rules.other.listItemRegex(n),l=!1;for(;s;){let a=!1,o="",c="";if(!(e=i.exec(s))||this.rules.block.hr.test(s))break;o=e[0],s=s.substring(o.length);let d=mn(e[2].split(`
18
- `,1)[0],e[1].length),h=s.split(`
19
- `,1)[0],x=!d.trim(),b=0;if(this.options.pedantic?(b=2,c=d.trimStart()):x?b=e[1].length+1:(b=d.search(this.rules.other.nonSpaceChar),b=b>4?1:b,c=d.slice(b),b+=e[1].length),x&&this.rules.other.blankLine.test(h)&&(o+=h+`
20
- `,s=s.substring(h.length+1),a=!0),!a){let I=this.rules.other.nextBulletRegex(b),D=this.rules.other.hrRegex(b),j=this.rules.other.fencesBeginRegex(b),Z=this.rules.other.headingBeginRegex(b),N=this.rules.other.htmlBeginRegex(b),R=this.rules.other.blockquoteBeginRegex(b);for(;s;){let f=s.split(`
21
- `,1)[0],S;if(h=f,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),S=h):S=h.replace(this.rules.other.tabCharGlobal," "),j.test(h)||Z.test(h)||N.test(h)||R.test(h)||I.test(h)||D.test(h))break;if(S.search(this.rules.other.nonSpaceChar)>=b||!h.trim())c+=`
22
- `+S.slice(b);else{if(x||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||j.test(d)||Z.test(d)||D.test(d))break;c+=`
23
- `+h}x=!h.trim(),o+=f+`
24
- `,s=s.substring(f.length+1),d=S.slice(b)}}t.loose||(l?t.loose=!0:this.rules.other.doubleBlankLine.test(o)&&(l=!0)),t.items.push({type:"list_item",raw:o,task:!!this.options.gfm&&this.rules.other.listIsTask.test(c),loose:!1,text:c,tokens:[]}),t.raw+=o}let u=t.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;t.raw=t.raw.trimEnd();for(let a of t.items){if(this.lexer.state.top=!1,a.tokens=this.lexer.blockTokens(a.text,[]),a.task){if(a.text=a.text.replace(this.rules.other.listReplaceTask,""),a.tokens[0]?.type==="text"||a.tokens[0]?.type==="paragraph"){a.tokens[0].raw=a.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),a.tokens[0].text=a.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let c=this.lexer.inlineQueue.length-1;c>=0;c--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[c].src)){this.lexer.inlineQueue[c].src=this.lexer.inlineQueue[c].src.replace(this.rules.other.listReplaceTask,"");break}}let o=this.rules.other.listTaskCheckbox.exec(a.raw);if(o){let c={type:"checkbox",raw:o[0]+" ",checked:o[0]!=="[ ]"};a.checked=c.checked,t.loose?a.tokens[0]&&["paragraph","text"].includes(a.tokens[0].type)&&"tokens"in a.tokens[0]&&a.tokens[0].tokens?(a.tokens[0].raw=c.raw+a.tokens[0].raw,a.tokens[0].text=c.raw+a.tokens[0].text,a.tokens[0].tokens.unshift(c)):a.tokens.unshift({type:"paragraph",raw:c.raw,text:c.raw,tokens:[c]}):a.tokens.unshift(c)}}if(!t.loose){let o=a.tokens.filter(d=>d.type==="space"),c=o.length>0&&o.some(d=>this.rules.other.anyLine.test(d.raw));t.loose=c}}if(t.loose)for(let a of t.items){a.loose=!0;for(let o of a.tokens)o.type==="text"&&(o.type="paragraph")}return t}}html(s){let e=this.rules.block.html.exec(s);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(s){let e=this.rules.block.def.exec(s);if(e){let n=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",t=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:e[0],href:r,title:t}}}table(s){let e=this.rules.block.table.exec(s);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=Me(e[1]),r=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),t=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
25
- `):[],i={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let l of r)this.rules.other.tableAlignRight.test(l)?i.align.push("right"):this.rules.other.tableAlignCenter.test(l)?i.align.push("center"):this.rules.other.tableAlignLeft.test(l)?i.align.push("left"):i.align.push(null);for(let l=0;l<n.length;l++)i.header.push({text:n[l],tokens:this.lexer.inline(n[l]),header:!0,align:i.align[l]});for(let l of t)i.rows.push(Me(l,i.header.length).map((u,a)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:i.align[a]})));return i}}lheading(s){let e=this.rules.block.lheading.exec(s);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(s){let e=this.rules.block.paragraph.exec(s);if(e){let n=e[1].charAt(e[1].length-1)===`
26
- `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(s){let e=this.rules.block.text.exec(s);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(s){let e=this.rules.inline.escape.exec(s);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(s){let e=this.rules.inline.tag.exec(s);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(s){let e=this.rules.inline.link.exec(s);if(e){let n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let i=ne(n.slice(0,-1),"\\");if((n.length-i.length)%2===0)return}else{let i=kn(e[2],"()");if(i===-2)return;if(i>-1){let l=(e[0].indexOf("!")===0?5:4)+e[1].length+i;e[2]=e[2].substring(0,i),e[0]=e[0].substring(0,l).trim(),e[3]=""}}let r=e[2],t="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(r);i&&(r=i[1],t=i[3])}else t=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),Ve(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:t&&t.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(s,e){let n;if((n=this.rules.inline.reflink.exec(s))||(n=this.rules.inline.nolink.exec(s))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),t=e[r.toLowerCase()];if(!t){let i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return Ve(n,t,n[0],this.lexer,this.rules)}}emStrong(s,e,n=""){let r=this.rules.inline.emStrongLDelim.exec(s);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let t=[...r[0]].length-1,i,l,u=t,a=0,o=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(o.lastIndex=0,e=e.slice(-1*s.length+t);(r=o.exec(e))!=null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(l=[...i].length,r[3]||r[4]){u+=l;continue}else if((r[5]||r[6])&&t%3&&!((t+l)%3)){a+=l;continue}if(u-=l,u>0)continue;l=Math.min(l,l+u+a);let c=[...r[0]][0].length,d=s.slice(0,t+r.index+c+l);if(Math.min(t,l)%2){let x=d.slice(1,-1);return{type:"em",raw:d,text:x,tokens:this.lexer.inlineTokens(x)}}let h=d.slice(2,-2);return{type:"strong",raw:d,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(s){let e=this.rules.inline.code.exec(s);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),t=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&t&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(s){let e=this.rules.inline.br.exec(s);if(e)return{type:"br",raw:e[0]}}del(s,e,n=""){let r=this.rules.inline.delLDelim.exec(s);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let t=[...r[0]].length-1,i,l,u=t,a=this.rules.inline.delRDelim;for(a.lastIndex=0,e=e.slice(-1*s.length+t);(r=a.exec(e))!=null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(l=[...i].length,l!==t))continue;if(r[3]||r[4]){u+=l;continue}if(u-=l,u>0)continue;l=Math.min(l,l+u);let o=[...r[0]][0].length,c=s.slice(0,t+r.index+o+l),d=c.slice(t,-t);return{type:"del",raw:c,text:d,tokens:this.lexer.inlineTokens(d)}}}}autolink(s){let e=this.rules.inline.autolink.exec(s);if(e){let n,r;return e[2]==="@"?(n=e[1],r="mailto:"+n):(n=e[1],r=n),{type:"link",raw:e[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(s){let e;if(e=this.rules.inline.url.exec(s)){let n,r;if(e[2]==="@")n=e[0],r="mailto:"+n;else{let t;do t=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(t!==e[0]);n=e[0],e[1]==="www."?r="http://"+e[0]:r=e[0]}return{type:"link",raw:e[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(s){let e=this.rules.inline.text.exec(s);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:n}}}},M=class we{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Y,this.options.tokenizer=this.options.tokenizer||new ue,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:P,block:ae.normal,inline:te.normal};this.options.pedantic?(n.block=ae.pedantic,n.inline=te.pedantic):this.options.gfm&&(n.block=ae.gfm,this.options.breaks?n.inline=te.breaks:n.inline=te.gfm),this.tokenizer.rules=n}static get rules(){return{block:ae,inline:te}}static lex(e,n){return new we(n).lex(e)}static lexInline(e,n){return new we(n).inlineTokens(e)}lex(e){e=e.replace(P.carriageReturn,`
27
- `),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],r=!1){for(this.options.pedantic&&(e=e.replace(P.tabCharGlobal," ").replace(P.spaceLine,""));e;){let t;if(this.options.extensions?.block?.some(l=>(t=l.call({lexer:this},e,n))?(e=e.substring(t.raw.length),n.push(t),!0):!1))continue;if(t=this.tokenizer.space(e)){e=e.substring(t.raw.length);let l=n.at(-1);t.raw.length===1&&l!==void 0?l.raw+=`
28
- `:n.push(t);continue}if(t=this.tokenizer.code(e)){e=e.substring(t.raw.length);let l=n.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
29
- `)?"":`
30
- `)+t.raw,l.text+=`
31
- `+t.text,this.inlineQueue.at(-1).src=l.text):n.push(t);continue}if(t=this.tokenizer.fences(e)){e=e.substring(t.raw.length),n.push(t);continue}if(t=this.tokenizer.heading(e)){e=e.substring(t.raw.length),n.push(t);continue}if(t=this.tokenizer.hr(e)){e=e.substring(t.raw.length),n.push(t);continue}if(t=this.tokenizer.blockquote(e)){e=e.substring(t.raw.length),n.push(t);continue}if(t=this.tokenizer.list(e)){e=e.substring(t.raw.length),n.push(t);continue}if(t=this.tokenizer.html(e)){e=e.substring(t.raw.length),n.push(t);continue}if(t=this.tokenizer.def(e)){e=e.substring(t.raw.length);let l=n.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
32
- `)?"":`
33
- `)+t.raw,l.text+=`
34
- `+t.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title},n.push(t));continue}if(t=this.tokenizer.table(e)){e=e.substring(t.raw.length),n.push(t);continue}if(t=this.tokenizer.lheading(e)){e=e.substring(t.raw.length),n.push(t);continue}let i=e;if(this.options.extensions?.startBlock){let l=1/0,u=e.slice(1),a;this.options.extensions.startBlock.forEach(o=>{a=o.call({lexer:this},u),typeof a=="number"&&a>=0&&(l=Math.min(l,a))}),l<1/0&&l>=0&&(i=e.substring(0,l+1))}if(this.state.top&&(t=this.tokenizer.paragraph(i))){let l=n.at(-1);r&&l?.type==="paragraph"?(l.raw+=(l.raw.endsWith(`
35
- `)?"":`
36
- `)+t.raw,l.text+=`
37
- `+t.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(t),r=i.length!==e.length,e=e.substring(t.raw.length);continue}if(t=this.tokenizer.text(e)){e=e.substring(t.raw.length);let l=n.at(-1);l?.type==="text"?(l.raw+=(l.raw.endsWith(`
38
- `)?"":`
39
- `)+t.raw,l.text+=`
40
- `+t.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(t);continue}if(e){let l="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){let r=e,t=null;if(this.tokens.links){let a=Object.keys(this.tokens.links);if(a.length>0)for(;(t=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)a.includes(t[0].slice(t[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,t.index)+"["+"a".repeat(t[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(t=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,t.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(t=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)i=t[2]?t[2].length:0,r=r.slice(0,t.index+i)+"["+"a".repeat(t[0].length-i-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let l=!1,u="";for(;e;){l||(u=""),l=!1;let a;if(this.options.extensions?.inline?.some(c=>(a=c.call({lexer:this},e,n))?(e=e.substring(a.raw.length),n.push(a),!0):!1))continue;if(a=this.tokenizer.escape(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.tag(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.link(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(a.raw.length);let c=n.at(-1);a.type==="text"&&c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):n.push(a);continue}if(a=this.tokenizer.emStrong(e,r,u)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.codespan(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.br(e)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.del(e,r,u)){e=e.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.autolink(e)){e=e.substring(a.raw.length),n.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(e))){e=e.substring(a.raw.length),n.push(a);continue}let o=e;if(this.options.extensions?.startInline){let c=1/0,d=e.slice(1),h;this.options.extensions.startInline.forEach(x=>{h=x.call({lexer:this},d),typeof h=="number"&&h>=0&&(c=Math.min(c,h))}),c<1/0&&c>=0&&(o=e.substring(0,c+1))}if(a=this.tokenizer.inlineText(o)){e=e.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(u=a.raw.slice(-1)),l=!0;let c=n.at(-1);c?.type==="text"?(c.raw+=a.raw,c.text+=a.text):n.push(a);continue}if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}},pe=class{options;parser;constructor(s){this.options=s||Y}space(s){return""}code({text:s,lang:e,escaped:n}){let r=(e||"").match(P.notSpaceStart)?.[0],t=s.replace(P.endingNewline,"")+`
41
- `;return r?'<pre><code class="language-'+O(r)+'">'+(n?t:O(t,!0))+`</code></pre>
42
- `:"<pre><code>"+(n?t:O(t,!0))+`</code></pre>
43
- `}blockquote({tokens:s}){return`<blockquote>
44
- ${this.parser.parse(s)}</blockquote>
45
- `}html({text:s}){return s}def(s){return""}heading({tokens:s,depth:e}){return`<h${e}>${this.parser.parseInline(s)}</h${e}>
46
- `}hr(s){return`<hr>
47
- `}list(s){let e=s.ordered,n=s.start,r="";for(let l=0;l<s.items.length;l++){let u=s.items[l];r+=this.listitem(u)}let t=e?"ol":"ul",i=e&&n!==1?' start="'+n+'"':"";return"<"+t+i+`>
48
- `+r+"</"+t+`>
49
- `}listitem(s){return`<li>${this.parser.parse(s.tokens)}</li>
50
- `}checkbox({checked:s}){return"<input "+(s?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:s}){return`<p>${this.parser.parseInline(s)}</p>
51
- `}table(s){let e="",n="";for(let t=0;t<s.header.length;t++)n+=this.tablecell(s.header[t]);e+=this.tablerow({text:n});let r="";for(let t=0;t<s.rows.length;t++){let i=s.rows[t];n="";for(let l=0;l<i.length;l++)n+=this.tablecell(i[l]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
52
- <thead>
53
- `+e+`</thead>
54
- `+r+`</table>
55
- `}tablerow({text:s}){return`<tr>
56
- ${s}</tr>
57
- `}tablecell(s){let e=this.parser.parseInline(s.tokens),n=s.header?"th":"td";return(s.align?`<${n} align="${s.align}">`:`<${n}>`)+e+`</${n}>
58
- `}strong({tokens:s}){return`<strong>${this.parser.parseInline(s)}</strong>`}em({tokens:s}){return`<em>${this.parser.parseInline(s)}</em>`}codespan({text:s}){return`<code>${O(s,!0)}</code>`}br(s){return"<br>"}del({tokens:s}){return`<del>${this.parser.parseInline(s)}</del>`}link({href:s,title:e,tokens:n}){let r=this.parser.parseInline(n),t=Ee(s);if(t===null)return r;s=t;let i='<a href="'+s+'"';return e&&(i+=' title="'+O(e)+'"'),i+=">"+r+"</a>",i}image({href:s,title:e,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let t=Ee(s);if(t===null)return O(n);s=t;let i=`<img src="${s}" alt="${O(n)}"`;return e&&(i+=` title="${O(e)}"`),i+=">",i}text(s){return"tokens"in s&&s.tokens?this.parser.parseInline(s.tokens):"escaped"in s&&s.escaped?s.text:O(s.text)}},Ae=class{strong({text:s}){return s}em({text:s}){return s}codespan({text:s}){return s}del({text:s}){return s}html({text:s}){return s}text({text:s}){return s}link({text:s}){return""+s}image({text:s}){return""+s}br(){return""}checkbox({raw:s}){return s}},V=class ye{options;renderer;textRenderer;constructor(e){this.options=e||Y,this.options.renderer=this.options.renderer||new pe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ae}static parse(e,n){return new ye(n).parse(e)}static parseInline(e,n){return new ye(n).parseInline(e)}parse(e){let n="";for(let r=0;r<e.length;r++){let t=e[r];if(this.options.extensions?.renderers?.[t.type]){let l=t,u=this.options.extensions.renderers[l.type].call({parser:this},l);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(l.type)){n+=u||"";continue}}let i=t;switch(i.type){case"space":{n+=this.renderer.space(i);break}case"hr":{n+=this.renderer.hr(i);break}case"heading":{n+=this.renderer.heading(i);break}case"code":{n+=this.renderer.code(i);break}case"table":{n+=this.renderer.table(i);break}case"blockquote":{n+=this.renderer.blockquote(i);break}case"list":{n+=this.renderer.list(i);break}case"checkbox":{n+=this.renderer.checkbox(i);break}case"html":{n+=this.renderer.html(i);break}case"def":{n+=this.renderer.def(i);break}case"paragraph":{n+=this.renderer.paragraph(i);break}case"text":{n+=this.renderer.text(i);break}default:{let l='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}parseInline(e,n=this.renderer){let r="";for(let t=0;t<e.length;t++){let i=e[t];if(this.options.extensions?.renderers?.[i.type]){let u=this.options.extensions.renderers[i.type].call({parser:this},i);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){r+=u||"";continue}}let l=i;switch(l.type){case"escape":{r+=n.text(l);break}case"html":{r+=n.html(l);break}case"link":{r+=n.link(l);break}case"image":{r+=n.image(l);break}case"checkbox":{r+=n.checkbox(l);break}case"strong":{r+=n.strong(l);break}case"em":{r+=n.em(l);break}case"codespan":{r+=n.codespan(l);break}case"br":{r+=n.br(l);break}case"del":{r+=n.del(l);break}case"text":{r+=n.text(l);break}default:{let u='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return r}},se=class{options;block;constructor(s){this.options=s||Y}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(s){return s}postprocess(s){return s}processAllTokens(s){return s}emStrongMask(s){return s}provideLexer(){return this.block?M.lex:M.lexInline}provideParser(){return this.block?V.parse:V.parseInline}},bn=class{defaults=ve();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=V;Renderer=pe;TextRenderer=Ae;Lexer=M;Tokenizer=ue;Hooks=se;constructor(...s){this.use(...s)}walkTokens(s,e){let n=[];for(let r of s)switch(n=n.concat(e.call(this,r)),r.type){case"table":{let t=r;for(let i of t.header)n=n.concat(this.walkTokens(i.tokens,e));for(let i of t.rows)for(let l of i)n=n.concat(this.walkTokens(l.tokens,e));break}case"list":{let t=r;n=n.concat(this.walkTokens(t.items,e));break}default:{let t=r;this.defaults.extensions?.childTokens?.[t.type]?this.defaults.extensions.childTokens[t.type].forEach(i=>{let l=t[i].flat(1/0);n=n.concat(this.walkTokens(l,e))}):t.tokens&&(n=n.concat(this.walkTokens(t.tokens,e)))}}return n}use(...s){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return s.forEach(n=>{let r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){let i=e.renderers[t.name];i?e.renderers[t.name]=function(...l){let u=t.renderer.apply(this,l);return u===!1&&(u=i.apply(this,l)),u}:e.renderers[t.name]=t.renderer}if("tokenizer"in t){if(!t.level||t.level!=="block"&&t.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=e[t.level];i?i.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&(t.level==="block"?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:t.level==="inline"&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)}),r.extensions=e),n.renderer){let t=this.defaults.renderer||new pe(this.defaults);for(let i in n.renderer){if(!(i in t))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let l=i,u=n.renderer[l],a=t[l];t[l]=(...o)=>{let c=u.apply(t,o);return c===!1&&(c=a.apply(t,o)),c||""}}r.renderer=t}if(n.tokenizer){let t=this.defaults.tokenizer||new ue(this.defaults);for(let i in n.tokenizer){if(!(i in t))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let l=i,u=n.tokenizer[l],a=t[l];t[l]=(...o)=>{let c=u.apply(t,o);return c===!1&&(c=a.apply(t,o)),c}}r.tokenizer=t}if(n.hooks){let t=this.defaults.hooks||new se;for(let i in n.hooks){if(!(i in t))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let l=i,u=n.hooks[l],a=t[l];se.passThroughHooks.has(i)?t[l]=o=>{if(this.defaults.async&&se.passThroughHooksRespectAsync.has(i))return(async()=>{let d=await u.call(t,o);return a.call(t,d)})();let c=u.call(t,o);return a.call(t,c)}:t[l]=(...o)=>{if(this.defaults.async)return(async()=>{let d=await u.apply(t,o);return d===!1&&(d=await a.apply(t,o)),d})();let c=u.apply(t,o);return c===!1&&(c=a.apply(t,o)),c}}r.hooks=t}if(n.walkTokens){let t=this.defaults.walkTokens,i=n.walkTokens;r.walkTokens=function(l){let u=[];return u.push(i.call(this,l)),t&&(u=u.concat(t.call(this,l))),u}}this.defaults={...this.defaults,...r}}),this}setOptions(s){return this.defaults={...this.defaults,...s},this}lexer(s,e){return M.lex(s,e??this.defaults)}parser(s,e){return V.parse(s,e??this.defaults)}parseMarkdown(s){return(e,n)=>{let r={...n},t={...this.defaults,...r},i=this.onError(!!t.silent,!!t.async);if(this.defaults.async===!0&&r.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(t.hooks&&(t.hooks.options=t,t.hooks.block=s),t.async)return(async()=>{let l=t.hooks?await t.hooks.preprocess(e):e,u=await(t.hooks?await t.hooks.provideLexer():s?M.lex:M.lexInline)(l,t),a=t.hooks?await t.hooks.processAllTokens(u):u;t.walkTokens&&await Promise.all(this.walkTokens(a,t.walkTokens));let o=await(t.hooks?await t.hooks.provideParser():s?V.parse:V.parseInline)(a,t);return t.hooks?await t.hooks.postprocess(o):o})().catch(i);try{t.hooks&&(e=t.hooks.preprocess(e));let l=(t.hooks?t.hooks.provideLexer():s?M.lex:M.lexInline)(e,t);t.hooks&&(l=t.hooks.processAllTokens(l)),t.walkTokens&&this.walkTokens(l,t.walkTokens);let u=(t.hooks?t.hooks.provideParser():s?V.parse:V.parseInline)(l,t);return t.hooks&&(u=t.hooks.postprocess(u)),u}catch(l){return i(l)}}}onError(s,e){return n=>{if(n.message+=`
59
- Please report this to https://github.com/markedjs/marked.`,s){let r="<p>An error occurred:</p><pre>"+O(n.message+"",!0)+"</pre>";return e?Promise.resolve(r):r}if(e)return Promise.reject(n);throw n}}},J=new bn;function w(s,e){return J.parse(s,e)}w.options=w.setOptions=function(s){return J.setOptions(s),w.defaults=J.defaults,je(w.defaults),w};w.getDefaults=ve;w.defaults=Y;w.use=function(...s){return J.use(...s),w.defaults=J.defaults,je(w.defaults),w};w.walkTokens=function(s,e){return J.walkTokens(s,e)};w.parseInline=J.parseInline;w.Parser=V;w.parser=V.parse;w.Renderer=pe;w.TextRenderer=Ae;w.Lexer=M;w.lexer=M.lex;w.Tokenizer=ue;w.Hooks=se;w.parse=w;w.options;w.setOptions;w.use;w.walkTokens;w.parseInline;V.parse;M.lex;const wn={key:0,class:"flex items-center gap-2 text-sm text-muted"},yn={key:1,class:"flex items-center gap-2 text-sm text-muted"},vn={key:2,class:"flex items-center gap-3 flex-wrap"},$n={key:3,class:"flex items-center gap-3 flex-wrap"},Sn={key:4,class:"flex items-center gap-3 flex-wrap"},_n={class:"space-y-4"},zn={key:0,class:"text-sm text-red-600"},Rn=["innerHTML"],Tn={class:"space-y-3"},In={class:"flex items-center justify-end gap-2 w-full"},An=De({__name:"IntegrationCredentials",props:{integrationId:{},integrationType:{},currentVariant:{}},emits:["saved","disconnected"],setup(s,{emit:e}){const n=s,r=e,t=q(null),i=q(!0),l=q(!1),u=q(!1),a=q(null),o=q(void 0),c=gt({}),d=q(!1),h=q(!1),x=q(!1),b=U(()=>(t.value?.variants?.length??0)>1),I=U(()=>(t.value?.variants||[]).map(k=>({label:k.label,value:k.key}))),D=U(()=>t.value?.variants?.find(k=>k.key===o.value)??null),j=U(()=>{const k=D.value?.schema?.properties||{};return Object.entries(k)}),Z=U(()=>{const k=D.value?.hintMarkdown;return k?w.parse(k):""});function N(k){const g=k.toLowerCase();return g.includes("token")||g.includes("key")||g.includes("secret")||g.includes("password")||g.includes("json")}function R(){for(const k of Object.keys(c))delete c[k];x.value=!0}ke(o,()=>{for(const k of Object.keys(c))delete c[k]});async function f(){i.value=!0,l.value=!1;try{const[k,g]=await Promise.all([$fetch(`/api/integrations/${n.integrationId}/credentials-config`),$fetch(`/api/integrations/${n.integrationId}/credentials-status`)]);t.value=k,u.value=!!g?.hasCredentials,a.value=g?.health_status??null,o.value=n.currentVariant||k?.defaultVariant||k?.variants?.[0]?.key||void 0}catch{l.value=!0}finally{i.value=!1}}async function S(){d.value=!0;try{const k={};for(const[L]of j.value){const $=(c[L]||"").trim();$&&(k[L]=$)}o.value&&(k.credentialVariant=o.value);const g=await $fetch(`/api/integrations/${n.integrationId}/credentials`,{method:"POST",body:k});u.value=!0,a.value=g.health_status??"connected",x.value=!1;for(const L of Object.keys(c))delete c[L];r("saved")}finally{d.value=!1}}async function F(){h.value=!0;try{await $fetch(`/api/integrations/${n.integrationId}/credentials`,{method:"DELETE"}),u.value=!1,a.value="disconnected",r("disconnected")}finally{h.value=!1}}return f(),(k,g)=>{const L=oe,$=Oe,Q=vt,G=yt,E=It,ge=ht;return _(),C("div",null,[p(i)?(_(),C("div",wn,[z(L,{name:"i-lucide-loader-2",class:"animate-spin"}),g[3]||(g[3]=A(" Checking connection… ",-1))])):p(t)?.supportsCredentials===!1?(_(),C("div",yn,[z(L,{name:"i-lucide-info"}),g[4]||(g[4]=A(" No credentials required for this integration. ",-1))])):p(a)==="connected"?(_(),C("div",vn,[g[7]||(g[7]=y("div",{class:"flex items-center gap-2 text-sm font-medium text-green-600 dark:text-green-400"},[y("span",{class:"inline-block w-2 h-2 rounded-full bg-green-500"}),A(" Connected ")],-1)),z($,{size:"xs",variant:"soft",color:"neutral",icon:"i-lucide-refresh-cw",onClick:R},{default:T(()=>[...g[5]||(g[5]=[A(" Reconfigure ",-1)])]),_:1}),z($,{size:"xs",variant:"soft",color:"error",icon:"i-lucide-unplug",loading:p(h),onClick:F},{default:T(()=>[...g[6]||(g[6]=[A(" Disconnect ",-1)])]),_:1},8,["loading"])])):p(a)==="invalid_credentials"?(_(),C("div",$n,[g[10]||(g[10]=y("div",{class:"flex items-center gap-2 text-sm font-medium text-red-600 dark:text-red-400"},[y("span",{class:"inline-block w-2 h-2 rounded-full bg-red-500"}),A(" Invalid credentials ")],-1)),z($,{size:"sm",icon:"i-lucide-refresh-cw",color:"primary",onClick:R},{default:T(()=>[...g[8]||(g[8]=[A(" Reconfigure ",-1)])]),_:1}),z($,{size:"xs",variant:"soft",color:"error",icon:"i-lucide-unplug",loading:p(h),onClick:F},{default:T(()=>[...g[9]||(g[9]=[A(" Disconnect ",-1)])]),_:1},8,["loading"])])):(_(),C("div",Sn,[g[12]||(g[12]=y("div",{class:"flex items-center gap-2 text-sm font-medium text-red-600 dark:text-red-400"},[y("span",{class:"inline-block w-2 h-2 rounded-full bg-red-500"}),A(" Not connected ")],-1)),z($,{size:"sm",icon:"i-lucide-plug",color:"primary",onClick:R},{default:T(()=>[...g[11]||(g[11]=[A(" Connect ",-1)])]),_:1})])),z(ge,{open:p(x),"onUpdate:open":g[2]||(g[2]=B=>xe(x)?x.value=B:null),title:p(u)?"Reconfigure Credentials":"Connect Integration",description:"Enter your credentials to connect this integration."},{body:T(()=>[y("div",_n,[p(l)?(_(),C("div",zn," Failed to load credential schema. Please try again. ")):(_(),C(me,{key:1},[p(b)?(_(),X(G,{key:0,label:"Credential type"},{default:T(()=>[z(Q,{modelValue:p(o),"onUpdate:modelValue":g[0]||(g[0]=B=>xe(o)?o.value=B:null),items:p(I),class:"w-full"},null,8,["modelValue","items"])]),_:1})):K("",!0),p(D)?.hintMarkdown?(_(),C("div",{key:1,class:"hint-markdown text-sm bg-[var(--ui-bg-elevated)] rounded-md px-3 py-2",innerHTML:p(Z)},null,8,Rn)):K("",!0),y("div",Tn,[(_(!0),C(me,null,dt(p(j),([B,le])=>(_(),X(G,{key:B,label:le.title||B,description:le.description},{default:T(()=>[z(E,{modelValue:p(c)[B],"onUpdate:modelValue":v=>p(c)[B]=v,type:N(B)?"password":"text",class:"w-full"},null,8,["modelValue","onUpdate:modelValue","type"])]),_:2},1032,["label","description"]))),128))])],64))])]),footer:T(()=>[y("div",In,[z($,{variant:"ghost",color:"neutral",disabled:p(d),onClick:g[1]||(g[1]=B=>x.value=!1)},{default:T(()=>[...g[13]||(g[13]=[A(" Cancel ",-1)])]),_:1},8,["disabled"]),z($,{loading:p(d),icon:"i-lucide-check",onClick:S},{default:T(()=>[...g[14]||(g[14]=[A(" Save Credentials ",-1)])]),_:1},8,["loading"])])]),_:1},8,["open","title"])])}}}),Cn=Object.assign(ft(An,[["__scopeId","data-v-f235dc98"]]),{__name:"IntegrationCredentials"}),qn={key:0,class:"text-sm text-muted py-8 text-center"},Pn={key:1,class:"py-8 text-center space-y-4"},Bn={class:"flex items-center justify-between gap-4"},Ln={class:"flex items-center gap-3"},En={class:"text-2xl font-semibold"},Mn={class:"text-sm text-muted mt-1"},Vn={class:"border border-[var(--ui-border)] rounded-lg px-4 py-3"},Dn={class:"space-y-3"},On={class:"flex gap-2"},jn={key:0,class:"text-xs text-amber-600 dark:text-amber-400"},Zn={class:"space-y-3"},Fn={class:"sticky bottom-0 py-4 bg-[var(--ui-bg)] border-t border-[var(--ui-border)] -mx-4 px-4 flex items-center justify-between gap-4"},Qn=De({__name:"[id]",async setup(s){let e,n;const t=kt().params.id,{data:i,pending:l,error:u,refresh:a}=([e,n]=mt(()=>$t("/api/integrations","$Dgyl0ZYFMT")),e=await e,n(),e),o=U(()=>i.value?.find(R=>R.id===t)??null),c=q(!0),d=q(null),h=q([]),x=q([]),b=q(null),I=q(!1);function D(){if(!o.value)return;c.value=o.value.enabled!==!1,d.value=o.value.maxScope==="read"?"read":null,x.value=o.value.disabledTools?[...o.value.disabledTools]:[];const R=b.value?.toolsets,f=Array.isArray(R)?R.map(S=>S.key).filter(S=>S!=="__all__"&&S!=="custom"):[];h.value=o.value.enabledToolsets?.length?[...o.value.enabledToolsets]:f}ke(o,()=>D(),{immediate:!0}),ke(()=>b.value?.toolsets,R=>{!o.value||!R?.length||o.value.enabledToolsets?.length||(h.value=R.map(f=>f.key).filter(f=>f!=="__all__"))},{deep:!0});async function j(){if(o.value){I.value=!0;try{const R=o.value.id;await $fetch("/api/integrations",{method:"POST",body:{...o.value,enabled:c.value}});const f=b.value?.toolsets,S=Array.isArray(f)?f.map(k=>k.key).filter(k=>k!=="__all__"&&k!=="custom"):[],F=S.length&&h.value.length<S.length?h.value:[];await $fetch(`/api/integrations/${R}/toolsets`,{method:"POST",body:{enabledToolsets:F}}),await $fetch(`/api/integrations/${R}/permissions`,{method:"POST",body:{maxScope:d.value,disabledTools:x.value.length?x.value:null}}),await a()}finally{I.value=!1}}}async function Z(){o.value&&window.confirm(`Remove "${o.value.label}"? This cannot be undone.`)&&(await $fetch(`/api/integrations/${o.value.id}`,{method:"DELETE"}),wt("/integrations"))}function N(){a()}return(R,f)=>{const S=Oe,F=oe,k=bt,g=St,L=_t,$=Cn,Q=zt,G=xt;return _(),X(G,{class:"py-10 space-y-8 max-w-3xl"},{default:T(()=>[p(l)?(_(),C("div",qn," Loading… ")):p(u)||!p(o)?(_(),C("div",Pn,[f[6]||(f[6]=y("div",{class:"text-sm text-red-600"}," Integration not found. ",-1)),z(S,{to:"/integrations",variant:"soft",color:"neutral",icon:"i-lucide-arrow-left"},{default:T(()=>[...f[5]||(f[5]=[A(" Back to Integrations ",-1)])]),_:1})])):(_(),C(me,{key:2},[y("div",null,[z(k,{to:"/integrations",class:"inline-flex items-center gap-1 text-sm text-muted hover:text-[var(--ui-text)] transition-colors mb-4"},{default:T(()=>[z(F,{name:"i-lucide-arrow-left",class:"w-4 h-4"}),f[7]||(f[7]=A(" Back to Integrations ",-1))]),_:1}),y("div",Bn,[y("div",Ln,[y("h1",En,ie(p(o).label),1),z(g,{size:"sm",color:"neutral",variant:"subtle"},{default:T(()=>[A(ie(p(o).type),1)]),_:1})]),z(L,{modelValue:p(c),"onUpdate:modelValue":f[0]||(f[0]=E=>xe(c)?c.value=E:null),size:"lg"},null,8,["modelValue"])]),y("p",Mn,ie(p(o).type)+" · "+ie(p(o).referenceId),1)]),y("section",null,[f[8]||(f[8]=y("div",{class:"flex items-center justify-between gap-4 mb-1"},[y("h2",{class:"text-lg font-medium"}," Connection ")],-1)),y("div",Vn,[z($,{"integration-id":p(o).id,"integration-type":p(o).type,"current-variant":p(o).credentialVariant,onSaved:N,onDisconnected:N},null,8,["integration-id","integration-type","current-variant"])])]),y("section",Dn,[f[9]||(f[9]=y("h2",{class:"text-lg font-medium"}," Access Level ",-1)),y("div",On,[y("button",{type:"button",class:H(["px-4 py-2 text-sm rounded-lg border transition-colors",p(d)!=="read"?"border-green-500 bg-green-50 text-green-700 font-medium dark:bg-green-950 dark:text-green-300":"border-[var(--ui-border)] text-muted hover:bg-[var(--ui-bg-elevated)]"]),onClick:f[1]||(f[1]=E=>d.value=null)}," Read + Write ",2),y("button",{type:"button",class:H(["px-4 py-2 text-sm rounded-lg border transition-colors",p(d)==="read"?"border-green-500 bg-green-50 text-green-700 font-medium dark:bg-green-950 dark:text-green-300":"border-[var(--ui-border)] text-muted hover:bg-[var(--ui-bg-elevated)]"]),onClick:f[2]||(f[2]=E=>d.value="read")}," Read-only ",2)]),p(d)==="read"?(_(),C("p",jn," Only read tools will be available. Write and admin tools will be greyed out below. ")):K("",!0)]),y("section",Zn,[f[10]||(f[10]=y("h2",{class:"text-lg font-medium"}," Tools ",-1)),z(Q,{ref_key:"toolsTreeRef",ref:b,"integration-id":p(o).id,"max-scope":p(d),"enabled-toolsets":p(h),"disabled-tools":p(x),"onUpdate:enabledToolsets":f[3]||(f[3]=E=>h.value=E),"onUpdate:disabledTools":f[4]||(f[4]=E=>x.value=E)},null,8,["integration-id","max-scope","enabled-toolsets","disabled-tools"])]),y("div",Fn,[z(S,{loading:p(I),size:"lg",onClick:j},{default:T(()=>[...f[11]||(f[11]=[A(" Save Changes ",-1)])]),_:1},8,["loading"]),z(S,{variant:"soft",color:"error",icon:"i-lucide-trash-2",onClick:Z},{default:T(()=>[...f[12]||(f[12]=[A(" Remove Integration ",-1)])]),_:1})])],64))]),_:1})}}});export{Qn as default};
@@ -1 +0,0 @@
1
- import{T as Na,U as Wa,L,C as D,R as At,V as ja,W as me,X as kt,q as Te,Y as Ha,Z as ua,f as W,F as ye,o as w,r as O,s as N,$ as ca,a0 as Ua,c as R,B as F,H as oe,J as De,x as E,a1 as Pe,a2 as ce,a3 as da,w as z,v as l,P as Z,a4 as fa,a5 as pa,a6 as $e,a7 as ht,a8 as Ka,b as G,a9 as Pt,aa as Ga,ab as Ya,ac as It,h as vt,ad as Ge,ae as Mt,a as Y,af as Bt,ag as Xa,ah as Za,ai as Ja,S as Fe,aj as Qa,ak as en,al as Ft,am as Ve,an as tn,ao as nt,ap as ga,aq as Dt,ar as an,as as nn,at as Ot,au as rn,av as ma,aw as on,ax as sn,ay as ln,az as un,aA as cn,aB as yt,aC as dn,aD as fn,aE as Be,aF as Nt,g as rt,i as it,j as ot,l as ha,m as va,z as he,y as $,A as bt,t as K,E as Ce,aG as pn,aH as ya,k as ba,aI as wa,aJ as gn,d as se,aK as Wt,aL as mn,p as jt,aM as Ue,aN as hn,aO as Ht,aP as Ut,D as vn,aQ as yn,aR as bn,aS as wn,aT as Kt,aU as xn,aV as _n,G as Sn,M as xa,aW as qn,aX as Cn}from"./B04gGCnx.js";const An=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],kn=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],Pn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",Ie=[];class In{_data=new Me;_hash=new Me([...An]);_nDataBytes=0;_minBufferSize=0;finalize(t){t&&this._append(t);const a=this._nDataBytes*8,n=this._data.sigBytes*8;return this._data.words[n>>>5]|=128<<24-n%32,this._data.words[(n+64>>>9<<4)+14]=Math.floor(a/4294967296),this._data.words[(n+64>>>9<<4)+15]=a,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(t,a){const n=this._hash.words;let r=n[0],s=n[1],i=n[2],o=n[3],c=n[4],f=n[5],d=n[6],u=n[7];for(let p=0;p<64;p++){if(p<16)Ie[p]=t[a+p]|0;else{const q=Ie[p-15],m=(q<<25|q>>>7)^(q<<14|q>>>18)^q>>>3,b=Ie[p-2],_=(b<<15|b>>>17)^(b<<13|b>>>19)^b>>>10;Ie[p]=m+Ie[p-7]+_+Ie[p-16]}const h=c&f^~c&d,g=r&s^r&i^s&i,y=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),S=(c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25),C=u+S+h+kn[p]+Ie[p],A=y+g;u=d,d=f,f=c,c=o+C|0,o=i,i=s,s=r,r=C+A|0}n[0]=n[0]+r|0,n[1]=n[1]+s|0,n[2]=n[2]+i|0,n[3]=n[3]+o|0,n[4]=n[4]+c|0,n[5]=n[5]+f|0,n[6]=n[6]+d|0,n[7]=n[7]+u|0}_append(t){typeof t=="string"&&(t=Me.fromUtf8(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes}_process(t){let a,n=this._data.sigBytes/64;t?n=Math.ceil(n):n=Math.max((n|0)-this._minBufferSize,0);const r=n*16,s=Math.min(r*4,this._data.sigBytes);if(r){for(let i=0;i<r;i+=16)this._doProcessBlock(this._data.words,i);a=this._data.words.splice(0,r),this._data.sigBytes-=s}return new Me(a,s)}}class Me{words;sigBytes;constructor(t,a){t=this.words=t||[],this.sigBytes=a===void 0?t.length*4:a}static fromUtf8(t){const a=unescape(encodeURIComponent(t)),n=a.length,r=[];for(let s=0;s<n;s++)r[s>>>2]|=(a.charCodeAt(s)&255)<<24-s%4*8;return new Me(r,n)}toBase64(){const t=[];for(let a=0;a<this.sigBytes;a+=3){const n=this.words[a>>>2]>>>24-a%4*8&255,r=this.words[a+1>>>2]>>>24-(a+1)%4*8&255,s=this.words[a+2>>>2]>>>24-(a+2)%4*8&255,i=n<<16|r<<8|s;for(let o=0;o<4&&a*8+o*6<this.sigBytes*8;o++)t.push(Pn.charAt(i>>>6*(3-o)&63))}return t.join("")}concat(t){if(this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this.sigBytes%4)for(let a=0;a<t.sigBytes;a++){const n=t.words[a>>>2]>>>24-a%4*8&255;this.words[this.sigBytes+a>>>2]|=n<<24-(this.sigBytes+a)%4*8}else for(let a=0;a<t.sigBytes;a+=4)this.words[this.sigBytes+a>>>2]=t.words[a>>>2];this.sigBytes+=t.sigBytes}}function Bn(e){return new In().finalize(e).toBase64()}function Re(e){return Bn(Na(e))}function Gt(e,t=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY){return Math.min(a,Math.max(t,e))}function Dn(e){const t=Wa({dir:L("ltr")});return D(()=>e?.value||t.dir?.value||"ltr")}let gt=0;function On(){At(e=>{if(!ja)return;const t=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",t[0]??Yt()),document.body.insertAdjacentElement("beforeend",t[1]??Yt()),gt++,e(()=>{gt===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(a=>a.remove()),gt--})})}function Yt(){const e=document.createElement("span");return e.setAttribute("data-reka-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}function _a(e){return D(()=>me(e)?!!kt(e)?.closest("form"):!0)}function Tn(e){const t=L(),a=D(()=>t.value?.width??0),n=D(()=>t.value?.height??0);return Te(()=>{const r=kt(e);if(r){t.value={width:r.offsetWidth,height:r.offsetHeight};const s=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let c,f;if("borderBoxSize"in o){const d=o.borderBoxSize,u=Array.isArray(d)?d[0]:d;c=u.inlineSize,f=u.blockSize}else c=r.offsetWidth,f=r.offsetHeight;t.value={width:c,height:f}});return s.observe(r,{box:"border-box"}),()=>s.unobserve(r)}else t.value=void 0}),{width:a,height:n}}function Sa(e){const t=Ha("",1e3);return{search:t,handleTypeaheadSearch:(r,s)=>{t.value=t.value+r;{const i=ua(),o=s.map(p=>({...p,textValue:p.value?.textValue??p.ref.textContent?.trim()??""})),c=o.find(p=>p.ref===i),f=o.map(p=>p.textValue),d=En(f,t.value,c?.textValue),u=o.find(p=>p.textValue===d);return u&&u.ref.focus(),u?.ref}},resetTypeahead:()=>{t.value=""}}}function zn(e,t){return e.map((a,n)=>e[(t+n)%e.length])}function En(e,t,a){const r=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,s=a?e.indexOf(a):-1;let i=zn(e,Math.max(s,0));r.length===1&&(i=i.filter(f=>f!==a));const c=i.find(f=>f.toLowerCase().startsWith(r.toLowerCase()));return c!==a?c:void 0}var $n=W({inheritAttrs:!1,__name:"VisuallyHiddenInputBubble",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(e){const t=e,{primitiveElement:a,currentElement:n}=Ua(),r=D(()=>t.checked??t.value);return ye(r,(s,i)=>{if(!n.value)return;const o=n.value,c=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(d&&s!==i){const u=new Event("input",{bubbles:!0}),p=new Event("change",{bubbles:!0});d.call(o,s),o.dispatchEvent(u),o.dispatchEvent(p)}}),(s,i)=>(w(),O(ca,N({ref_key:"primitiveElement",ref:a},{...t,...s.$attrs},{as:"input"}),null,16))}}),Xt=$n,Rn=W({inheritAttrs:!1,__name:"VisuallyHiddenInput",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(e){const t=e,a=D(()=>typeof t.value=="object"&&Array.isArray(t.value)&&t.value.length===0&&t.required),n=D(()=>typeof t.value=="string"||typeof t.value=="number"||typeof t.value=="boolean"||t.value===null||t.value===void 0?[{name:t.name,value:t.value}]:typeof t.value=="object"&&Array.isArray(t.value)?t.value.flatMap((r,s)=>typeof r=="object"?Object.entries(r).map(([i,o])=>({name:`${t.name}[${s}][${i}]`,value:o})):{name:`${t.name}[${s}]`,value:r}):t.value!==null&&typeof t.value=="object"&&!Array.isArray(t.value)?Object.entries(t.value).map(([r,s])=>({name:`${t.name}[${r}]`,value:s})):[]);return(r,s)=>(w(),R(oe,null,[F(" We render single input if it's required "),a.value?(w(),O(Xt,N({key:r.name},{...t,...r.$attrs},{name:r.name,value:r.value}),null,16,["name","value"])):(w(!0),R(oe,{key:1},De(n.value,i=>(w(),O(Xt,N({key:i.name},{ref_for:!0},{...t,...r.$attrs},{name:i.name,value:i.value}),null,16,["name","value"]))),128))],2112))}}),Ln=Rn;const[qa,Vn]=Pe("PopperRoot");var Mn=W({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=L();return Vn({anchor:t,onAnchorChange:a=>t.value=a}),(a,n)=>E(a.$slots,"default")}}),Fn=Mn,Nn=W({__name:"PopperAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:a,currentElement:n}=ce(),r=qa();return da(()=>{r.onAnchorChange(t.reference??n.value)}),(s,i)=>(w(),O(l(Z),{ref:l(a),as:s.as,"as-child":s.asChild},{default:z(()=>[E(s.$slots,"default")]),_:3},8,["as","as-child"]))}}),Wn=Nn;const jn={key:0,d:"M0 0L6 6L12 0"},Hn={key:1,d:"M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0"};var Un=W({__name:"Arrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(e){const t=e;return ce(),(a,n)=>(w(),O(l(Z),N(t,{width:a.width,height:a.height,viewBox:a.asChild?void 0:"0 0 12 6",preserveAspectRatio:a.asChild?void 0:"none"}),{default:z(()=>[E(a.$slots,"default",{},()=>[a.rounded?(w(),R("path",Hn)):(w(),R("path",jn))])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}}),Kn=Un;function Gn(e){return e!==null}function Yn(e){return{name:"transformOrigin",options:e,fn(t){const{placement:a,rects:n,middlewareData:r}=t,i=r.arrow?.centerOffset!==0,o=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[f,d]=wt(a),u={start:"0%",center:"50%",end:"100%"}[d],p=(r.arrow?.x??0)+o/2,h=(r.arrow?.y??0)+c/2;let g="",y="";return f==="bottom"?(g=i?u:`${p}px`,y=`${-c}px`):f==="top"?(g=i?u:`${p}px`,y=`${n.floating.height+c}px`):f==="right"?(g=`${-c}px`,y=i?u:`${h}px`):f==="left"&&(g=`${n.floating.width+c}px`,y=i?u:`${h}px`),{data:{x:g,y}}}}}function wt(e){const[t,a="center"]=e.split("-");return[t,a]}const Xn=["top","right","bottom","left"],Ae=Math.min,ae=Math.max,Qe=Math.round,Ze=Math.floor,be=e=>({x:e,y:e}),Zn={left:"right",right:"left",bottom:"top",top:"bottom"},Jn={start:"end",end:"start"};function xt(e,t,a){return ae(e,Ae(t,a))}function _e(e,t){return typeof e=="function"?e(t):e}function Se(e){return e.split("-")[0]}function je(e){return e.split("-")[1]}function Tt(e){return e==="x"?"y":"x"}function zt(e){return e==="y"?"height":"width"}const Qn=new Set(["top","bottom"]);function ve(e){return Qn.has(Se(e))?"y":"x"}function Et(e){return Tt(ve(e))}function er(e,t,a){a===void 0&&(a=!1);const n=je(e),r=Et(e),s=zt(r);let i=r==="x"?n===(a?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=et(i)),[i,et(i)]}function tr(e){const t=et(e);return[_t(e),t,_t(t)]}function _t(e){return e.replace(/start|end/g,t=>Jn[t])}const Zt=["left","right"],Jt=["right","left"],ar=["top","bottom"],nr=["bottom","top"];function rr(e,t,a){switch(e){case"top":case"bottom":return a?t?Jt:Zt:t?Zt:Jt;case"left":case"right":return t?ar:nr;default:return[]}}function ir(e,t,a,n){const r=je(e);let s=rr(Se(e),a==="start",n);return r&&(s=s.map(i=>i+"-"+r),t&&(s=s.concat(s.map(_t)))),s}function et(e){return e.replace(/left|right|bottom|top/g,t=>Zn[t])}function or(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ca(e){return typeof e!="number"?or(e):{top:e,right:e,bottom:e,left:e}}function tt(e){const{x:t,y:a,width:n,height:r}=e;return{width:n,height:r,top:a,left:t,right:t+n,bottom:a+r,x:t,y:a}}function Qt(e,t,a){let{reference:n,floating:r}=e;const s=ve(t),i=Et(t),o=zt(i),c=Se(t),f=s==="y",d=n.x+n.width/2-r.width/2,u=n.y+n.height/2-r.height/2,p=n[o]/2-r[o]/2;let h;switch(c){case"top":h={x:d,y:n.y-r.height};break;case"bottom":h={x:d,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:u};break;case"left":h={x:n.x-r.width,y:u};break;default:h={x:n.x,y:n.y}}switch(je(t)){case"start":h[i]-=p*(a&&f?-1:1);break;case"end":h[i]+=p*(a&&f?-1:1);break}return h}async function sr(e,t){var a;t===void 0&&(t={});const{x:n,y:r,platform:s,rects:i,elements:o,strategy:c}=e,{boundary:f="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:p=!1,padding:h=0}=_e(t,e),g=Ca(h),S=o[p?u==="floating"?"reference":"floating":u],C=tt(await s.getClippingRect({element:(a=await(s.isElement==null?void 0:s.isElement(S)))==null||a?S:S.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(o.floating)),boundary:f,rootBoundary:d,strategy:c})),A=u==="floating"?{x:n,y:r,width:i.floating.width,height:i.floating.height}:i.reference,q=await(s.getOffsetParent==null?void 0:s.getOffsetParent(o.floating)),m=await(s.isElement==null?void 0:s.isElement(q))?await(s.getScale==null?void 0:s.getScale(q))||{x:1,y:1}:{x:1,y:1},b=tt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:A,offsetParent:q,strategy:c}):A);return{top:(C.top-b.top+g.top)/m.y,bottom:(b.bottom-C.bottom+g.bottom)/m.y,left:(C.left-b.left+g.left)/m.x,right:(b.right-C.right+g.right)/m.x}}const lr=async(e,t,a)=>{const{placement:n="bottom",strategy:r="absolute",middleware:s=[],platform:i}=a,o=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let f=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:u}=Qt(f,n,c),p=n,h={},g=0;for(let S=0;S<o.length;S++){var y;const{name:C,fn:A}=o[S],{x:q,y:m,data:b,reset:_}=await A({x:d,y:u,initialPlacement:n,placement:p,strategy:r,middlewareData:h,rects:f,platform:{...i,detectOverflow:(y=i.detectOverflow)!=null?y:sr},elements:{reference:e,floating:t}});d=q??d,u=m??u,h={...h,[C]:{...h[C],...b}},_&&g<=50&&(g++,typeof _=="object"&&(_.placement&&(p=_.placement),_.rects&&(f=_.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:r}):_.rects),{x:d,y:u}=Qt(f,p,c)),S=-1)}return{x:d,y:u,placement:p,strategy:r,middlewareData:h}},ur=e=>({name:"arrow",options:e,async fn(t){const{x:a,y:n,placement:r,rects:s,platform:i,elements:o,middlewareData:c}=t,{element:f,padding:d=0}=_e(e,t)||{};if(f==null)return{};const u=Ca(d),p={x:a,y:n},h=Et(r),g=zt(h),y=await i.getDimensions(f),S=h==="y",C=S?"top":"left",A=S?"bottom":"right",q=S?"clientHeight":"clientWidth",m=s.reference[g]+s.reference[h]-p[h]-s.floating[g],b=p[h]-s.reference[h],_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(f));let v=_?_[q]:0;(!v||!await(i.isElement==null?void 0:i.isElement(_)))&&(v=o.floating[q]||s.floating[g]);const x=m/2-b/2,k=v/2-y[g]/2-1,B=Ae(u[C],k),j=Ae(u[A],k),T=B,M=v-y[g]-j,I=v/2-y[g]/2+x,Q=xt(T,I,M),J=!c.arrow&&je(r)!=null&&I!==Q&&s.reference[g]/2-(I<T?B:j)-y[g]/2<0,X=J?I<T?I-T:I-M:0;return{[h]:p[h]+X,data:{[h]:Q,centerOffset:I-Q-X,...J&&{alignmentOffset:X}},reset:J}}}),cr=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var a,n;const{placement:r,middlewareData:s,rects:i,initialPlacement:o,platform:c,elements:f}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,...S}=_e(e,t);if((a=s.arrow)!=null&&a.alignmentOffset)return{};const C=Se(r),A=ve(o),q=Se(o)===o,m=await(c.isRTL==null?void 0:c.isRTL(f.floating)),b=p||(q||!y?[et(o)]:tr(o)),_=g!=="none";!p&&_&&b.push(...ir(o,y,g,m));const v=[o,...b],x=await c.detectOverflow(t,S),k=[];let B=((n=s.flip)==null?void 0:n.overflows)||[];if(d&&k.push(x[C]),u){const I=er(r,i,m);k.push(x[I[0]],x[I[1]])}if(B=[...B,{placement:r,overflows:k}],!k.every(I=>I<=0)){var j,T;const I=(((j=s.flip)==null?void 0:j.index)||0)+1,Q=v[I];if(Q&&(!(u==="alignment"?A!==ve(Q):!1)||B.every(H=>ve(H.placement)===A?H.overflows[0]>0:!0)))return{data:{index:I,overflows:B},reset:{placement:Q}};let J=(T=B.filter(X=>X.overflows[0]<=0).sort((X,H)=>X.overflows[1]-H.overflows[1])[0])==null?void 0:T.placement;if(!J)switch(h){case"bestFit":{var M;const X=(M=B.filter(H=>{if(_){const re=ve(H.placement);return re===A||re==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(re=>re>0).reduce((re,qe)=>re+qe,0)]).sort((H,re)=>H[1]-re[1])[0])==null?void 0:M[0];X&&(J=X);break}case"initialPlacement":J=o;break}if(r!==J)return{reset:{placement:J}}}return{}}}};function ea(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ta(e){return Xn.some(t=>e[t]>=0)}const dr=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:a,platform:n}=t,{strategy:r="referenceHidden",...s}=_e(e,t);switch(r){case"referenceHidden":{const i=await n.detectOverflow(t,{...s,elementContext:"reference"}),o=ea(i,a.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:ta(o)}}}case"escaped":{const i=await n.detectOverflow(t,{...s,altBoundary:!0}),o=ea(i,a.floating);return{data:{escapedOffsets:o,escaped:ta(o)}}}default:return{}}}}},Aa=new Set(["left","top"]);async function fr(e,t){const{placement:a,platform:n,elements:r}=e,s=await(n.isRTL==null?void 0:n.isRTL(r.floating)),i=Se(a),o=je(a),c=ve(a)==="y",f=Aa.has(i)?-1:1,d=s&&c?-1:1,u=_e(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return o&&typeof g=="number"&&(h=o==="end"?g*-1:g),c?{x:h*d,y:p*f}:{x:p*f,y:h*d}}const pr=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var a,n;const{x:r,y:s,placement:i,middlewareData:o}=t,c=await fr(t,e);return i===((a=o.offset)==null?void 0:a.placement)&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+c.x,y:s+c.y,data:{...c,placement:i}}}}},gr=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:a,y:n,placement:r,platform:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:c={fn:C=>{let{x:A,y:q}=C;return{x:A,y:q}}},...f}=_e(e,t),d={x:a,y:n},u=await s.detectOverflow(t,f),p=ve(Se(r)),h=Tt(p);let g=d[h],y=d[p];if(i){const C=h==="y"?"top":"left",A=h==="y"?"bottom":"right",q=g+u[C],m=g-u[A];g=xt(q,g,m)}if(o){const C=p==="y"?"top":"left",A=p==="y"?"bottom":"right",q=y+u[C],m=y-u[A];y=xt(q,y,m)}const S=c.fn({...t,[h]:g,[p]:y});return{...S,data:{x:S.x-a,y:S.y-n,enabled:{[h]:i,[p]:o}}}}}},mr=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:a,y:n,placement:r,rects:s,middlewareData:i}=t,{offset:o=0,mainAxis:c=!0,crossAxis:f=!0}=_e(e,t),d={x:a,y:n},u=ve(r),p=Tt(u);let h=d[p],g=d[u];const y=_e(o,t),S=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const q=p==="y"?"height":"width",m=s.reference[p]-s.floating[q]+S.mainAxis,b=s.reference[p]+s.reference[q]-S.mainAxis;h<m?h=m:h>b&&(h=b)}if(f){var C,A;const q=p==="y"?"width":"height",m=Aa.has(Se(r)),b=s.reference[u]-s.floating[q]+(m&&((C=i.offset)==null?void 0:C[u])||0)+(m?0:S.crossAxis),_=s.reference[u]+s.reference[q]+(m?0:((A=i.offset)==null?void 0:A[u])||0)-(m?S.crossAxis:0);g<b?g=b:g>_&&(g=_)}return{[p]:h,[u]:g}}}},hr=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var a,n;const{placement:r,rects:s,platform:i,elements:o}=t,{apply:c=()=>{},...f}=_e(e,t),d=await i.detectOverflow(t,f),u=Se(r),p=je(r),h=ve(r)==="y",{width:g,height:y}=s.floating;let S,C;u==="top"||u==="bottom"?(S=u,C=p===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(C=u,S=p==="end"?"top":"bottom");const A=y-d.top-d.bottom,q=g-d.left-d.right,m=Ae(y-d[S],A),b=Ae(g-d[C],q),_=!t.middlewareData.shift;let v=m,x=b;if((a=t.middlewareData.shift)!=null&&a.enabled.x&&(x=q),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(v=A),_&&!p){const B=ae(d.left,0),j=ae(d.right,0),T=ae(d.top,0),M=ae(d.bottom,0);h?x=g-2*(B!==0||j!==0?B+j:ae(d.left,d.right)):v=y-2*(T!==0||M!==0?T+M:ae(d.top,d.bottom))}await c({...t,availableWidth:x,availableHeight:v});const k=await i.getDimensions(o.floating);return g!==k.width||y!==k.height?{reset:{rects:!0}}:{}}}};function st(){return typeof window<"u"}function ze(e){return $t(e)?(e.nodeName||"").toLowerCase():"#document"}function ne(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function xe(e){var t;return(t=($t(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $t(e){return st()?e instanceof Node||e instanceof ne(e).Node:!1}function le(e){return st()?e instanceof Element||e instanceof ne(e).Element:!1}function we(e){return st()?e instanceof HTMLElement||e instanceof ne(e).HTMLElement:!1}function aa(e){return!st()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ne(e).ShadowRoot}const vr=new Set(["inline","contents"]);function Ye(e){const{overflow:t,overflowX:a,overflowY:n,display:r}=ue(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+a)&&!vr.has(r)}const yr=new Set(["table","td","th"]);function br(e){return yr.has(ze(e))}const wr=[":popover-open",":modal"];function lt(e){return wr.some(t=>{try{return e.matches(t)}catch{return!1}})}const xr=["transform","translate","scale","rotate","perspective"],_r=["transform","translate","scale","rotate","perspective","filter"],Sr=["paint","layout","strict","content"];function Rt(e){const t=Lt(),a=le(e)?ue(e):e;return xr.some(n=>a[n]?a[n]!=="none":!1)||(a.containerType?a.containerType!=="normal":!1)||!t&&(a.backdropFilter?a.backdropFilter!=="none":!1)||!t&&(a.filter?a.filter!=="none":!1)||_r.some(n=>(a.willChange||"").includes(n))||Sr.some(n=>(a.contain||"").includes(n))}function qr(e){let t=ke(e);for(;we(t)&&!We(t);){if(Rt(t))return t;if(lt(t))return null;t=ke(t)}return null}function Lt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Cr=new Set(["html","body","#document"]);function We(e){return Cr.has(ze(e))}function ue(e){return ne(e).getComputedStyle(e)}function ut(e){return le(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ke(e){if(ze(e)==="html")return e;const t=e.assignedSlot||e.parentNode||aa(e)&&e.host||xe(e);return aa(t)?t.host:t}function ka(e){const t=ke(e);return We(t)?e.ownerDocument?e.ownerDocument.body:e.body:we(t)&&Ye(t)?t:ka(t)}function Ke(e,t,a){var n;t===void 0&&(t=[]),a===void 0&&(a=!0);const r=ka(e),s=r===((n=e.ownerDocument)==null?void 0:n.body),i=ne(r);if(s){const o=St(i);return t.concat(i,i.visualViewport||[],Ye(r)?r:[],o&&a?Ke(o):[])}return t.concat(r,Ke(r,[],a))}function St(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Pa(e){const t=ue(e);let a=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const r=we(e),s=r?e.offsetWidth:a,i=r?e.offsetHeight:n,o=Qe(a)!==s||Qe(n)!==i;return o&&(a=s,n=i),{width:a,height:n,$:o}}function Vt(e){return le(e)?e:e.contextElement}function Ne(e){const t=Vt(e);if(!we(t))return be(1);const a=t.getBoundingClientRect(),{width:n,height:r,$:s}=Pa(t);let i=(s?Qe(a.width):a.width)/n,o=(s?Qe(a.height):a.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!o||!Number.isFinite(o))&&(o=1),{x:i,y:o}}const Ar=be(0);function Ia(e){const t=ne(e);return!Lt()||!t.visualViewport?Ar:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function kr(e,t,a){return t===void 0&&(t=!1),!a||t&&a!==ne(e)?!1:t}function Oe(e,t,a,n){t===void 0&&(t=!1),a===void 0&&(a=!1);const r=e.getBoundingClientRect(),s=Vt(e);let i=be(1);t&&(n?le(n)&&(i=Ne(n)):i=Ne(e));const o=kr(s,a,n)?Ia(s):be(0);let c=(r.left+o.x)/i.x,f=(r.top+o.y)/i.y,d=r.width/i.x,u=r.height/i.y;if(s){const p=ne(s),h=n&&le(n)?ne(n):n;let g=p,y=St(g);for(;y&&n&&h!==g;){const S=Ne(y),C=y.getBoundingClientRect(),A=ue(y),q=C.left+(y.clientLeft+parseFloat(A.paddingLeft))*S.x,m=C.top+(y.clientTop+parseFloat(A.paddingTop))*S.y;c*=S.x,f*=S.y,d*=S.x,u*=S.y,c+=q,f+=m,g=ne(y),y=St(g)}}return tt({width:d,height:u,x:c,y:f})}function ct(e,t){const a=ut(e).scrollLeft;return t?t.left+a:Oe(xe(e)).left+a}function Ba(e,t){const a=e.getBoundingClientRect(),n=a.left+t.scrollLeft-ct(e,a),r=a.top+t.scrollTop;return{x:n,y:r}}function Pr(e){let{elements:t,rect:a,offsetParent:n,strategy:r}=e;const s=r==="fixed",i=xe(n),o=t?lt(t.floating):!1;if(n===i||o&&s)return a;let c={scrollLeft:0,scrollTop:0},f=be(1);const d=be(0),u=we(n);if((u||!u&&!s)&&((ze(n)!=="body"||Ye(i))&&(c=ut(n)),we(n))){const h=Oe(n);f=Ne(n),d.x=h.x+n.clientLeft,d.y=h.y+n.clientTop}const p=i&&!u&&!s?Ba(i,c):be(0);return{width:a.width*f.x,height:a.height*f.y,x:a.x*f.x-c.scrollLeft*f.x+d.x+p.x,y:a.y*f.y-c.scrollTop*f.y+d.y+p.y}}function Ir(e){return Array.from(e.getClientRects())}function Br(e){const t=xe(e),a=ut(e),n=e.ownerDocument.body,r=ae(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=ae(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-a.scrollLeft+ct(e);const o=-a.scrollTop;return ue(n).direction==="rtl"&&(i+=ae(t.clientWidth,n.clientWidth)-r),{width:r,height:s,x:i,y:o}}const na=25;function Dr(e,t){const a=ne(e),n=xe(e),r=a.visualViewport;let s=n.clientWidth,i=n.clientHeight,o=0,c=0;if(r){s=r.width,i=r.height;const d=Lt();(!d||d&&t==="fixed")&&(o=r.offsetLeft,c=r.offsetTop)}const f=ct(n);if(f<=0){const d=n.ownerDocument,u=d.body,p=getComputedStyle(u),h=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(n.clientWidth-u.clientWidth-h);g<=na&&(s-=g)}else f<=na&&(s+=f);return{width:s,height:i,x:o,y:c}}const Or=new Set(["absolute","fixed"]);function Tr(e,t){const a=Oe(e,!0,t==="fixed"),n=a.top+e.clientTop,r=a.left+e.clientLeft,s=we(e)?Ne(e):be(1),i=e.clientWidth*s.x,o=e.clientHeight*s.y,c=r*s.x,f=n*s.y;return{width:i,height:o,x:c,y:f}}function ra(e,t,a){let n;if(t==="viewport")n=Dr(e,a);else if(t==="document")n=Br(xe(e));else if(le(t))n=Tr(t,a);else{const r=Ia(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return tt(n)}function Da(e,t){const a=ke(e);return a===t||!le(a)||We(a)?!1:ue(a).position==="fixed"||Da(a,t)}function zr(e,t){const a=t.get(e);if(a)return a;let n=Ke(e,[],!1).filter(o=>le(o)&&ze(o)!=="body"),r=null;const s=ue(e).position==="fixed";let i=s?ke(e):e;for(;le(i)&&!We(i);){const o=ue(i),c=Rt(i);!c&&o.position==="fixed"&&(r=null),(s?!c&&!r:!c&&o.position==="static"&&!!r&&Or.has(r.position)||Ye(i)&&!c&&Da(e,i))?n=n.filter(d=>d!==i):r=o,i=ke(i)}return t.set(e,n),n}function Er(e){let{element:t,boundary:a,rootBoundary:n,strategy:r}=e;const i=[...a==="clippingAncestors"?lt(t)?[]:zr(t,this._c):[].concat(a),n],o=i[0],c=i.reduce((f,d)=>{const u=ra(t,d,r);return f.top=ae(u.top,f.top),f.right=Ae(u.right,f.right),f.bottom=Ae(u.bottom,f.bottom),f.left=ae(u.left,f.left),f},ra(t,o,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function $r(e){const{width:t,height:a}=Pa(e);return{width:t,height:a}}function Rr(e,t,a){const n=we(t),r=xe(t),s=a==="fixed",i=Oe(e,!0,s,t);let o={scrollLeft:0,scrollTop:0};const c=be(0);function f(){c.x=ct(r)}if(n||!n&&!s)if((ze(t)!=="body"||Ye(r))&&(o=ut(t)),n){const h=Oe(t,!0,s,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else r&&f();s&&!n&&r&&f();const d=r&&!n&&!s?Ba(r,o):be(0),u=i.left+o.scrollLeft-c.x-d.x,p=i.top+o.scrollTop-c.y-d.y;return{x:u,y:p,width:i.width,height:i.height}}function mt(e){return ue(e).position==="static"}function ia(e,t){if(!we(e)||ue(e).position==="fixed")return null;if(t)return t(e);let a=e.offsetParent;return xe(e)===a&&(a=a.ownerDocument.body),a}function Oa(e,t){const a=ne(e);if(lt(e))return a;if(!we(e)){let r=ke(e);for(;r&&!We(r);){if(le(r)&&!mt(r))return r;r=ke(r)}return a}let n=ia(e,t);for(;n&&br(n)&&mt(n);)n=ia(n,t);return n&&We(n)&&mt(n)&&!Rt(n)?a:n||qr(e)||a}const Lr=async function(e){const t=this.getOffsetParent||Oa,a=this.getDimensions,n=await a(e.floating);return{reference:Rr(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Vr(e){return ue(e).direction==="rtl"}const Mr={convertOffsetParentRelativeRectToViewportRelativeRect:Pr,getDocumentElement:xe,getClippingRect:Er,getOffsetParent:Oa,getElementRects:Lr,getClientRects:Ir,getDimensions:$r,getScale:Ne,isElement:le,isRTL:Vr};function Ta(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Fr(e,t){let a=null,n;const r=xe(e);function s(){var o;clearTimeout(n),(o=a)==null||o.disconnect(),a=null}function i(o,c){o===void 0&&(o=!1),c===void 0&&(c=1),s();const f=e.getBoundingClientRect(),{left:d,top:u,width:p,height:h}=f;if(o||t(),!p||!h)return;const g=Ze(u),y=Ze(r.clientWidth-(d+p)),S=Ze(r.clientHeight-(u+h)),C=Ze(d),q={rootMargin:-g+"px "+-y+"px "+-S+"px "+-C+"px",threshold:ae(0,Ae(1,c))||1};let m=!0;function b(_){const v=_[0].intersectionRatio;if(v!==c){if(!m)return i();v?i(!1,v):n=setTimeout(()=>{i(!1,1e-7)},1e3)}v===1&&!Ta(f,e.getBoundingClientRect())&&i(),m=!1}try{a=new IntersectionObserver(b,{...q,root:r.ownerDocument})}catch{a=new IntersectionObserver(b,q)}a.observe(e)}return i(!0),s}function Nr(e,t,a,n){n===void 0&&(n={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,f=Vt(e),d=r||s?[...f?Ke(f):[],...Ke(t)]:[];d.forEach(C=>{r&&C.addEventListener("scroll",a,{passive:!0}),s&&C.addEventListener("resize",a)});const u=f&&o?Fr(f,a):null;let p=-1,h=null;i&&(h=new ResizeObserver(C=>{let[A]=C;A&&A.target===f&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var q;(q=h)==null||q.observe(t)})),a()}),f&&!c&&h.observe(f),h.observe(t));let g,y=c?Oe(e):null;c&&S();function S(){const C=Oe(e);y&&!Ta(y,C)&&a(),y=C,g=requestAnimationFrame(S)}return a(),()=>{var C;d.forEach(A=>{r&&A.removeEventListener("scroll",a),s&&A.removeEventListener("resize",a)}),u?.(),(C=h)==null||C.disconnect(),h=null,c&&cancelAnimationFrame(g)}}const Wr=pr,jr=gr,oa=cr,Hr=hr,Ur=dr,Kr=ur,Gr=mr,Yr=(e,t,a)=>{const n=new Map,r={platform:Mr,...a},s={...r.platform,_c:n};return lr(e,t,{...r,platform:s})};function Xr(e){return e!=null&&typeof e=="object"&&"$el"in e}function qt(e){if(Xr(e)){const t=e.$el;return $t(t)&&ze(t)==="#comment"?null:t}return e}function Le(e){return typeof e=="function"?e():l(e)}function Zr(e){return{name:"arrow",options:e,fn(t){const a=qt(Le(e.element));return a==null?{}:Kr({element:a,padding:e.padding}).fn(t)}}}function za(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function sa(e,t){const a=za(e);return Math.round(t*a)/a}function Jr(e,t,a){a===void 0&&(a={});const n=a.whileElementsMounted,r=D(()=>{var v;return(v=Le(a.open))!=null?v:!0}),s=D(()=>Le(a.middleware)),i=D(()=>{var v;return(v=Le(a.placement))!=null?v:"bottom"}),o=D(()=>{var v;return(v=Le(a.strategy))!=null?v:"absolute"}),c=D(()=>{var v;return(v=Le(a.transform))!=null?v:!0}),f=D(()=>qt(e.value)),d=D(()=>qt(t.value)),u=L(0),p=L(0),h=L(o.value),g=L(i.value),y=ht({}),S=L(!1),C=D(()=>{const v={position:h.value,left:"0",top:"0"};if(!d.value)return v;const x=sa(d.value,u.value),k=sa(d.value,p.value);return c.value?{...v,transform:"translate("+x+"px, "+k+"px)",...za(d.value)>=1.5&&{willChange:"transform"}}:{position:h.value,left:x+"px",top:k+"px"}});let A;function q(){if(f.value==null||d.value==null)return;const v=r.value;Yr(f.value,d.value,{middleware:s.value,placement:i.value,strategy:o.value}).then(x=>{u.value=x.x,p.value=x.y,h.value=x.strategy,g.value=x.placement,y.value=x.middlewareData,S.value=v!==!1})}function m(){typeof A=="function"&&(A(),A=void 0)}function b(){if(m(),n===void 0){q();return}if(f.value!=null&&d.value!=null){A=n(f.value,d.value,q);return}}function _(){r.value||(S.value=!1)}return ye([s,i,o,r],q,{flush:"sync"}),ye([f,d],b,{flush:"sync"}),ye(r,_,{flush:"sync"}),fa()&&pa(m),{x:$e(u),y:$e(p),strategy:$e(h),placement:$e(g),middlewareData:$e(y),isPositioned:$e(S),floatingStyles:C,update:q}}const Qr={side:"bottom",sideOffset:0,sideFlip:!0,align:"center",alignOffset:0,alignFlip:!0,arrowPadding:0,hideShiftedArrow:!0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[ei,ti]=Pe("PopperContent");var ai=W({inheritAttrs:!1,__name:"PopperContent",props:Ga({side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...Qr}),emits:["placed"],setup(e,{emit:t}){const a=e,n=t,r=qa(),{forwardRef:s,currentElement:i}=ce(),o=L(),c=L(),{width:f,height:d}=Tn(c),u=D(()=>a.side+(a.align!=="center"?`-${a.align}`:"")),p=D(()=>typeof a.collisionPadding=="number"?a.collisionPadding:{top:0,right:0,bottom:0,left:0,...a.collisionPadding}),h=D(()=>Array.isArray(a.collisionBoundary)?a.collisionBoundary:[a.collisionBoundary]),g=D(()=>({padding:p.value,boundary:h.value.filter(Gn),altBoundary:h.value.length>0})),y=D(()=>({mainAxis:a.sideFlip,crossAxis:a.alignFlip})),S=Ka(()=>[Wr({mainAxis:a.sideOffset+d.value,alignmentAxis:a.alignOffset}),a.prioritizePosition&&a.avoidCollisions&&oa({...g.value,...y.value}),a.avoidCollisions&&jr({mainAxis:!0,crossAxis:!!a.prioritizePosition,limiter:a.sticky==="partial"?Gr():void 0,...g.value}),!a.prioritizePosition&&a.avoidCollisions&&oa({...g.value,...y.value}),Hr({...g.value,apply:({elements:T,rects:M,availableWidth:I,availableHeight:Q})=>{const{width:J,height:X}=M.reference,H=T.floating.style;H.setProperty("--reka-popper-available-width",`${I}px`),H.setProperty("--reka-popper-available-height",`${Q}px`),H.setProperty("--reka-popper-anchor-width",`${J}px`),H.setProperty("--reka-popper-anchor-height",`${X}px`)}}),c.value&&Zr({element:c.value,padding:a.arrowPadding}),Yn({arrowWidth:f.value,arrowHeight:d.value}),a.hideWhenDetached&&Ur({strategy:"referenceHidden",...g.value})]),C=D(()=>a.reference??r.anchor.value),{floatingStyles:A,placement:q,isPositioned:m,middlewareData:b}=Jr(C,o,{strategy:a.positionStrategy,placement:u,whileElementsMounted:(...T)=>Nr(...T,{layoutShift:!a.disableUpdateOnLayoutShift,animationFrame:a.updatePositionStrategy==="always"}),middleware:S}),_=D(()=>wt(q.value)[0]),v=D(()=>wt(q.value)[1]);da(()=>{m.value&&n("placed")});const x=D(()=>{const T=b.value.arrow?.centerOffset!==0;return a.hideShiftedArrow&&T}),k=L("");At(()=>{i.value&&(k.value=window.getComputedStyle(i.value).zIndex)});const B=D(()=>b.value.arrow?.x??0),j=D(()=>b.value.arrow?.y??0);return ti({placedSide:_,onArrowChange:T=>c.value=T,arrowX:B,arrowY:j,shouldHideArrow:x}),(T,M)=>(w(),R("div",{ref_key:"floatingRef",ref:o,"data-reka-popper-content-wrapper":"",style:Pt({...l(A),transform:l(m)?l(A).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:k.value,"--reka-popper-transform-origin":[l(b).transformOrigin?.x,l(b).transformOrigin?.y].join(" "),...l(b).hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}})},[G(l(Z),N({ref:l(s)},T.$attrs,{"as-child":a.asChild,as:T.as,"data-side":_.value,"data-align":v.value,style:{animation:l(m)?void 0:"none"}}),{default:z(()=>[E(T.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4))}}),ni=ai;const ri={top:"bottom",right:"left",bottom:"top",left:"right"};var ii=W({inheritAttrs:!1,__name:"PopperArrow",props:{width:{type:Number,required:!1},height:{type:Number,required:!1},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(e){const{forwardRef:t}=ce(),a=ei(),n=D(()=>ri[a.placedSide.value]);return(r,s)=>(w(),R("span",{ref:i=>{l(a).onArrowChange(i)},style:Pt({position:"absolute",left:l(a).arrowX?.value?`${l(a).arrowX?.value}px`:void 0,top:l(a).arrowY?.value?`${l(a).arrowY?.value}px`:void 0,[n.value]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l(a).placedSide.value],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l(a).placedSide.value],visibility:l(a).shouldHideArrow.value?"hidden":void 0})},[G(Kn,N(r.$attrs,{ref:l(t),style:{display:"block"},as:r.as,"as-child":r.asChild,rounded:r.rounded,width:r.width,height:r.height}),{default:z(()=>[E(r.$slots,"default")]),_:3},16,["as","as-child","rounded","width","height"])],4))}}),oi=ii,si=W({__name:"Label",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"label"}},setup(e){const t=e;return ce(),(a,n)=>(w(),O(l(Z),N(t,{onMousedown:n[0]||(n[0]=r=>{!r.defaultPrevented&&r.detail>1&&r.preventDefault()})}),{default:z(()=>[E(a.$slots,"default")]),_:3},16))}}),Ea=si;const li=[" ","Enter","ArrowUp","ArrowDown"],ui=[" ","Enter"],ge=10;function at(e,t,a){return e===void 0?!1:Array.isArray(e)?e.some(n=>Ct(n,t,a)):Ct(e,t,a)}function Ct(e,t,a){return e===void 0||t===void 0?!1:typeof e=="string"?e===t:typeof a=="function"?a(e,t):typeof a=="string"?e?.[a]===t?.[a]:Ya(e,t)}function ci(e){return e==null||e===""||Array.isArray(e)&&e.length===0}const di={key:0,value:""},[Ee,$a]=Pe("SelectRoot");var fi=W({inheritAttrs:!1,__name:"SelectRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},by:{type:[String,Function],required:!1},dir:{type:String,required:!1},multiple:{type:Boolean,required:!1},autocomplete:{type:String,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","update:open"],setup(e,{emit:t}){const a=e,n=t,{required:r,disabled:s,multiple:i,dir:o}=It(a),c=vt(a,"modelValue",n,{defaultValue:a.defaultValue??(i.value?[]:void 0),passive:a.modelValue===void 0,deep:!0}),f=vt(a,"open",n,{defaultValue:a.defaultOpen,passive:a.open===void 0}),d=L(),u=L(),p=L({x:0,y:0}),h=D(()=>i.value&&Array.isArray(c.value)?c.value?.length===0:Mt(c.value));Ge({isProvider:!0});const g=Dn(o),y=_a(d),S=L(new Set),C=D(()=>Array.from(S.value).map(m=>m.value).join(";"));function A(m){if(i.value){const b=Array.isArray(c.value)?[...c.value]:[],_=b.findIndex(v=>Ct(v,m,a.by));_===-1?b.push(m):b.splice(_,1),c.value=[...b]}else c.value=m}function q(m){return Array.from(S.value).find(b=>at(m,b.value,a.by))}return $a({triggerElement:d,onTriggerChange:m=>{d.value=m},valueElement:u,onValueElementChange:m=>{u.value=m},contentId:"",modelValue:c,onValueChange:A,by:a.by,open:f,multiple:i,required:r,onOpenChange:m=>{f.value=m},dir:g,triggerPointerDownPosRef:p,disabled:s,isEmptyModelValue:h,optionsSet:S,onOptionAdd:m=>{const b=q(m.value);b&&S.value.delete(b),S.value.add(m)},onOptionRemove:m=>{const b=q(m.value);b&&S.value.delete(b)}}),(m,b)=>(w(),O(l(Fn),null,{default:z(()=>[E(m.$slots,"default",{modelValue:l(c),open:l(f)}),l(y)?(w(),O(mi,{key:C.value,"aria-hidden":"true",tabindex:"-1",multiple:l(i),required:l(r),name:m.name,autocomplete:m.autocomplete,disabled:l(s),value:l(c)},{default:z(()=>[l(Mt)(l(c))?(w(),R("option",di)):F("v-if",!0),(w(!0),R(oe,null,De(Array.from(S.value),_=>(w(),R("option",N({key:_.value??""},{ref_for:!0},_),null,16))),128))]),_:1},8,["multiple","required","name","autocomplete","disabled","value"])):F("v-if",!0)]),_:3}))}}),pi=fi,gi=W({__name:"BubbleSelect",props:{autocomplete:{type:String,required:!1},autofocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},form:{type:String,required:!1},multiple:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},size:{type:Number,required:!1},value:{type:null,required:!1}},setup(e){const t=e,a=L(),n=Ee();ye(()=>t.value,(s,i)=>{const o=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(o,"value").set;if(s!==i&&f&&a.value){const d=new Event("change",{bubbles:!0});f.call(a.value,s),a.value.dispatchEvent(d)}});function r(s){n.onValueChange(s.target.value)}return(s,i)=>(w(),O(l(ca),{"as-child":""},{default:z(()=>[Y("select",N({ref_key:"selectElement",ref:a},t,{onInput:r}),[E(s.$slots,"default")],16)]),_:3}))}}),mi=gi,hi=W({__name:"SelectPopperPosition",props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1,default:ge},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const a=Bt(e);return(n,r)=>(w(),O(l(ni),N(l(a),{style:{boxSizing:"border-box","--reka-select-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-select-content-available-width":"var(--reka-popper-available-width)","--reka-select-content-available-height":"var(--reka-popper-available-height)","--reka-select-trigger-width":"var(--reka-popper-anchor-width)","--reka-select-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:z(()=>[E(n.$slots,"default")]),_:3},16))}}),vi=hi;const Ra={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[dt,La]=Pe("SelectContent");var yi=W({__name:"SelectContentImpl",props:{position:{type:String,required:!1,default:"item-aligned"},bodyLock:{type:Boolean,required:!1,default:!0},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:"start"},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:!0}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const a=e,n=t,r=Ee();On(),Xa(a.bodyLock);const{CollectionSlot:s,getItems:i}=Ge(),o=L();Za(o);const{search:c,handleTypeaheadSearch:f}=Sa(),d=L(),u=L(),p=L(),h=L(!1),g=L(!1),y=L(!1);function S(){u.value&&o.value&&Ft([u.value,o.value])}ye(h,()=>{S()});const{onOpenChange:C,triggerPointerDownPosRef:A}=r;At(_=>{if(!o.value)return;let v={x:0,y:0};const x=B=>{v={x:Math.abs(Math.round(B.pageX)-(A.value?.x??0)),y:Math.abs(Math.round(B.pageY)-(A.value?.y??0))}},k=B=>{B.pointerType!=="touch"&&(v.x<=10&&v.y<=10?B.preventDefault():o.value?.contains(B.target)||C(!1),document.removeEventListener("pointermove",x),A.value=null)};A.value!==null&&(document.addEventListener("pointermove",x),document.addEventListener("pointerup",k,{capture:!0,once:!0})),_(()=>{document.removeEventListener("pointermove",x),document.removeEventListener("pointerup",k,{capture:!0})})});function q(_){const v=_.ctrlKey||_.altKey||_.metaKey;if(_.key==="Tab"&&_.preventDefault(),!v&&_.key.length===1&&f(_.key,i()),["ArrowUp","ArrowDown","Home","End"].includes(_.key)){let k=[...i().map(B=>B.ref)];if(["ArrowUp","End"].includes(_.key)&&(k=k.slice().reverse()),["ArrowUp","ArrowDown"].includes(_.key)){const B=_.target,j=k.indexOf(B);k=k.slice(j+1)}setTimeout(()=>Ft(k)),_.preventDefault()}}const m=D(()=>a.position==="popper"?a:{}),b=Bt(m.value);return La({content:o,viewport:d,onViewportChange:_=>{d.value=_},itemRefCallback:(_,v,x)=>{const k=!g.value&&!x,B=at(r.modelValue.value,v,r.by);if(r.multiple.value){if(y.value)return;(B||k)&&(u.value=_,B&&(y.value=!0))}else(B||k)&&(u.value=_);k&&(g.value=!0)},selectedItem:u,selectedItemText:p,onItemLeave:()=>{o.value?.focus()},itemTextRefCallback:(_,v,x)=>{const k=!g.value&&!x;(at(r.modelValue.value,v,r.by)||k)&&(p.value=_)},focusSelectedItem:S,position:a.position,isPositioned:h,searchRef:c}),(_,v)=>(w(),O(l(s),null,{default:z(()=>[G(l(Ja),{"as-child":"",onMountAutoFocus:v[6]||(v[6]=Fe(()=>{},["prevent"])),onUnmountAutoFocus:v[7]||(v[7]=x=>{n("closeAutoFocus",x),!x.defaultPrevented&&(l(r).triggerElement.value?.focus({preventScroll:!0}),x.preventDefault())})},{default:z(()=>[G(l(Qa),{"as-child":"","disable-outside-pointer-events":_.disableOutsidePointerEvents,onFocusOutside:v[2]||(v[2]=Fe(()=>{},["prevent"])),onDismiss:v[3]||(v[3]=x=>l(r).onOpenChange(!1)),onEscapeKeyDown:v[4]||(v[4]=x=>n("escapeKeyDown",x)),onPointerDownOutside:v[5]||(v[5]=x=>n("pointerDownOutside",x))},{default:z(()=>[(w(),O(en(_.position==="popper"?vi:_i),N({..._.$attrs,...l(b)},{id:l(r).contentId,ref:x=>{const k=l(kt)(x);k?.hasAttribute("data-reka-popper-content-wrapper")?o.value=k.firstElementChild:o.value=k},role:"listbox","data-state":l(r).open.value?"open":"closed",dir:l(r).dir.value,style:{display:"flex",flexDirection:"column",outline:"none"},onContextmenu:v[0]||(v[0]=Fe(()=>{},["prevent"])),onPlaced:v[1]||(v[1]=x=>h.value=!0),onKeydown:q}),{default:z(()=>[E(_.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3},8,["disable-outside-pointer-events"])]),_:3})]),_:3}))}}),bi=yi;const[Mo,wi]=Pe("SelectItemAlignedPosition");var xi=W({inheritAttrs:!1,__name:"SelectItemAlignedPosition",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["placed"],setup(e,{emit:t}){const a=e,n=t,{getItems:r}=Ge(),s=Ee(),i=dt(),o=L(!1),c=L(!0),f=L(),{forwardRef:d,currentElement:u}=ce(),{viewport:p,selectedItem:h,selectedItemText:g,focusSelectedItem:y}=i;function S(){if(s.triggerElement.value&&s.valueElement.value&&f.value&&u.value&&p?.value&&h?.value&&g?.value){const q=s.triggerElement.value.getBoundingClientRect(),m=u.value.getBoundingClientRect(),b=s.valueElement.value.getBoundingClientRect(),_=g.value.getBoundingClientRect();if(s.dir.value!=="rtl"){const te=_.left-m.left,ee=b.left-te,fe=q.left-ee,P=q.width+fe,pe=Math.max(P,m.width),He=window.innerWidth-ge,pt=Gt(ee,ge,Math.max(ge,He-pe));f.value.style.minWidth=`${P}px`,f.value.style.left=`${pt}px`}else{const te=m.right-_.right,ee=window.innerWidth-b.right-te,fe=window.innerWidth-q.right-ee,P=q.width+fe,pe=Math.max(P,m.width),He=window.innerWidth-ge,pt=Gt(ee,ge,Math.max(ge,He-pe));f.value.style.minWidth=`${P}px`,f.value.style.right=`${pt}px`}const v=r().map(te=>te.ref),x=window.innerHeight-ge*2,k=p.value.scrollHeight,B=window.getComputedStyle(u.value),j=Number.parseInt(B.borderTopWidth,10),T=Number.parseInt(B.paddingTop,10),M=Number.parseInt(B.borderBottomWidth,10),I=Number.parseInt(B.paddingBottom,10),Q=j+T+k+I+M,J=Math.min(h.value.offsetHeight*5,Q),X=window.getComputedStyle(p.value),H=Number.parseInt(X.paddingTop,10),re=Number.parseInt(X.paddingBottom,10),qe=q.top+q.height/2-ge,ft=x-qe,U=h.value.offsetHeight/2,Xe=h.value.offsetTop+U,V=j+T+Xe,ie=Q-V;if(V<=qe){const te=h.value===v[v.length-1];f.value.style.bottom="0px";const ee=u.value.clientHeight-p.value.offsetTop-p.value.offsetHeight,fe=Math.max(ft,U+(te?re:0)+ee+M),P=V+fe;f.value.style.height=`${P}px`}else{const te=h.value===v[0];f.value.style.top="0px";const fe=Math.max(qe,j+p.value.offsetTop+(te?H:0)+U)+ie;f.value.style.height=`${fe}px`,p.value.scrollTop=V-qe+p.value.offsetTop}f.value.style.margin=`${ge}px 0`,f.value.style.minHeight=`${J}px`,f.value.style.maxHeight=`${x}px`,n("placed"),requestAnimationFrame(()=>o.value=!0)}}const C=L("");Te(async()=>{await Ve(),S(),u.value&&(C.value=window.getComputedStyle(u.value).zIndex)});function A(q){q&&c.value===!0&&(S(),y?.(),c.value=!1)}return tn(s.triggerElement,()=>{S()}),wi({contentWrapper:f,shouldExpandOnScrollRef:o,onScrollButtonChange:A}),(q,m)=>(w(),R("div",{ref_key:"contentWrapperElement",ref:f,style:Pt({display:"flex",flexDirection:"column",position:"fixed",zIndex:C.value})},[G(l(Z),N({ref:l(d),style:{boxSizing:"border-box",maxHeight:"100%"}},{...q.$attrs,...a}),{default:z(()=>[E(q.$slots,"default")]),_:3},16)],4))}}),_i=xi,Si=W({__name:"SelectArrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(e){const t=e,a=dt(Ra);return(n,r)=>l(a).position==="popper"?(w(),O(l(oi),nt(N({key:0},t)),{default:z(()=>[E(n.$slots,"default")]),_:3},16)):F("v-if",!0)}}),qi=Si,Ci=W({inheritAttrs:!1,__name:"SelectProvider",props:{context:{type:Object,required:!0}},setup(e){return $a(e.context),La(Ra),(a,n)=>E(a.$slots,"default")}}),Ai=Ci;const ki={key:1};var Pi=W({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean,required:!1},position:{type:String,required:!1},bodyLock:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const a=e,r=ga(a,t),s=Ee(),i=L();Te(()=>{i.value=new DocumentFragment});const o=L(),c=D(()=>a.forceMount||s.open.value),f=L(c.value);return ye(c,()=>{setTimeout(()=>f.value=c.value)}),(d,u)=>c.value||f.value||o.value?.present?(w(),O(l(an),{key:0,ref_key:"presenceRef",ref:o,present:c.value},{default:z(()=>[G(bi,nt(Dt({...l(r),...d.$attrs})),{default:z(()=>[E(d.$slots,"default")]),_:3},16)]),_:3},8,["present"])):i.value?(w(),R("div",ki,[(w(),O(nn,{to:i.value},[G(Ai,{context:l(s)},{default:z(()=>[E(d.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):F("v-if",!0)}}),Ii=Pi;const[Bi,Di]=Pe("SelectGroup");var Oi=W({__name:"SelectGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,a=Ot(void 0,"reka-select-group");return Di({id:a}),(n,r)=>(w(),O(l(Z),N({role:"group"},t,{"aria-labelledby":l(a)}),{default:z(()=>[E(n.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),Ti=Oi;const[Va,zi]=Pe("SelectItem");var Ei=W({__name:"SelectItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(e,{emit:t}){const a=e,n=t,{disabled:r}=It(a),s=Ee(),i=dt(),{forwardRef:o,currentElement:c}=ce(),{CollectionItem:f}=Ge(),d=D(()=>at(s.modelValue?.value,a.value,s.by)),u=L(!1),p=L(a.textValue??""),h=Ot(void 0,"reka-select-item-text"),g="select.select";async function y(m){if(m.defaultPrevented)return;const b={originalEvent:m,value:a.value};rn(g,S,b)}async function S(m){await Ve(),n("select",m),!m.defaultPrevented&&(r.value||(s.onValueChange(a.value),s.multiple.value||s.onOpenChange(!1)))}async function C(m){await Ve(),!m.defaultPrevented&&(r.value?i.onItemLeave?.():m.currentTarget?.focus({preventScroll:!0}))}async function A(m){await Ve(),!m.defaultPrevented&&m.currentTarget===ua()&&i.onItemLeave?.()}async function q(m){await Ve(),!(m.defaultPrevented||i.searchRef?.value!==""&&m.key===" ")&&(ui.includes(m.key)&&y(m),m.key===" "&&m.preventDefault())}if(a.value==="")throw new Error("A <SelectItem /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return Te(()=>{c.value&&i.itemRefCallback(c.value,a.value,a.disabled)}),zi({value:a.value,disabled:r,textId:h,isSelected:d,onItemTextChange:m=>{p.value=((p.value||m?.textContent)??"").trim()}}),(m,b)=>(w(),O(l(f),{value:{textValue:p.value}},{default:z(()=>[G(l(Z),{ref:l(o),role:"option","aria-labelledby":l(h),"data-highlighted":u.value?"":void 0,"aria-selected":d.value,"data-state":d.value?"checked":"unchecked","aria-disabled":l(r)||void 0,"data-disabled":l(r)?"":void 0,tabindex:l(r)?void 0:-1,as:m.as,"as-child":m.asChild,onFocus:b[0]||(b[0]=_=>u.value=!0),onBlur:b[1]||(b[1]=_=>u.value=!1),onPointerup:y,onPointerdown:b[2]||(b[2]=_=>{_.currentTarget.focus({preventScroll:!0})}),onTouchend:b[3]||(b[3]=Fe(()=>{},["prevent","stop"])),onPointermove:C,onPointerleave:A,onKeydown:q},{default:z(()=>[E(m.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"])]),_:3},8,["value"]))}}),$i=Ei,Ri=W({__name:"SelectItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,a=Va();return(n,r)=>l(a).isSelected.value?(w(),O(l(Z),N({key:0,"aria-hidden":"true"},t),{default:z(()=>[E(n.$slots,"default")]),_:3},16)):F("v-if",!0)}}),Li=Ri,Vi=W({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,a=Ee(),n=dt(),r=Va(),{forwardRef:s,currentElement:i}=ce(),o=D(()=>({value:r.value,disabled:r.disabled.value,textContent:i.value?.textContent??r.value?.toString()??""}));return Te(()=>{i.value&&(r.onItemTextChange(i.value),n.itemTextRefCallback(i.value,r.value,r.disabled.value),a.onOptionAdd(o.value))}),ma(()=>{a.onOptionRemove(o.value)}),(c,f)=>(w(),O(l(Z),N({id:l(r).textId,ref:l(s)},{...t,...c.$attrs}),{default:z(()=>[E(c.$slots,"default")]),_:3},16,["id"]))}}),Mi=Vi,Fi=W({__name:"SelectLabel",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(e){const t=e,a=Bi({id:""});return(n,r)=>(w(),O(l(Z),N(t,{id:l(a).id}),{default:z(()=>[E(n.$slots,"default")]),_:3},16,["id"]))}}),Ni=Fi,Wi=W({__name:"SelectPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(a,n)=>(w(),O(l(on),nt(Dt(t)),{default:z(()=>[E(a.$slots,"default")]),_:3},16))}}),ji=Wi,Hi=W({__name:"SelectSeparator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(a,n)=>(w(),O(l(Z),N({"aria-hidden":"true"},t),{default:z(()=>[E(a.$slots,"default")]),_:3},16))}}),Ui=Hi,Ki=W({__name:"SelectTrigger",props:{disabled:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,a=Ee(),{forwardRef:n,currentElement:r}=ce(),s=D(()=>a.disabled?.value||t.disabled);a.contentId||=Ot(void 0,"reka-select-content"),Te(()=>{a.onTriggerChange(r.value)});const{getItems:i}=Ge(),{search:o,handleTypeaheadSearch:c,resetTypeahead:f}=Sa();function d(){s.value||(a.onOpenChange(!0),f())}function u(p){d(),a.triggerPointerDownPosRef.value={x:Math.round(p.pageX),y:Math.round(p.pageY)}}return(p,h)=>(w(),O(l(Wn),{"as-child":"",reference:p.reference},{default:z(()=>[G(l(Z),{ref:l(n),role:"combobox",type:p.as==="button"?"button":void 0,"aria-controls":l(a).contentId,"aria-expanded":l(a).open.value||!1,"aria-required":l(a).required?.value,"aria-autocomplete":"none",disabled:s.value,dir:l(a)?.dir.value,"data-state":l(a)?.open.value?"open":"closed","data-disabled":s.value?"":void 0,"data-placeholder":l(ci)(l(a).modelValue?.value)?"":void 0,"as-child":p.asChild,as:p.as,onClick:h[0]||(h[0]=g=>{g?.currentTarget?.focus()}),onPointerdown:h[1]||(h[1]=g=>{if(g.pointerType==="touch")return g.preventDefault();const y=g.target;y.hasPointerCapture(g.pointerId)&&y.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&(u(g),g.preventDefault())}),onPointerup:h[2]||(h[2]=Fe(g=>{g.pointerType==="touch"&&u(g)},["prevent"])),onKeydown:h[3]||(h[3]=g=>{const y=l(o)!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&y&&g.key===" "||(l(c)(g.key,l(i)()),l(li).includes(g.key)&&(d(),g.preventDefault()))})},{default:z(()=>[E(p.$slots,"default")]),_:3},8,["type","aria-controls","aria-expanded","aria-required","disabled","dir","data-state","data-disabled","data-placeholder","as-child","as"])]),_:3},8,["reference"]))}}),Gi=Ki;const[Yi,Xi]=Pe("SwitchRoot");var Zi=W({__name:"SwitchRoot",props:{defaultValue:{type:Boolean,required:!1},modelValue:{type:[Boolean,null],required:!1,default:void 0},disabled:{type:Boolean,required:!1},id:{type:String,required:!1},value:{type:String,required:!1,default:"on"},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const a=e,n=t,{disabled:r}=It(a),s=vt(a,"modelValue",n,{defaultValue:a.defaultValue,passive:a.modelValue===void 0});function i(){r.value||(s.value=!s.value)}const{forwardRef:o,currentElement:c}=ce(),f=_a(c),d=D(()=>a.id&&c.value?document.querySelector(`[for="${a.id}"]`)?.innerText:void 0);return Xi({modelValue:s,toggleCheck:i,disabled:r}),(u,p)=>(w(),O(l(Z),N(u.$attrs,{id:u.id,ref:l(o),role:"switch",type:u.as==="button"?"button":void 0,value:u.value,"aria-label":u.$attrs["aria-label"]||d.value,"aria-checked":l(s),"aria-required":u.required,"data-state":l(s)?"checked":"unchecked","data-disabled":l(r)?"":void 0,"as-child":u.asChild,as:u.as,disabled:l(r),onClick:i,onKeydown:sn(Fe(i,["prevent"]),["enter"])}),{default:z(()=>[E(u.$slots,"default",{modelValue:l(s)}),l(f)&&u.name?(w(),O(l(Ln),{key:0,type:"checkbox",name:u.name,disabled:l(r),required:u.required,value:u.value,checked:!!l(s)},null,8,["name","disabled","required","value","checked"])):F("v-if",!0)]),_:3},16,["id","type","value","aria-label","aria-checked","aria-required","data-state","data-disabled","as-child","as","disabled","onKeydown"]))}}),Ji=Zi,Qi=W({__name:"SwitchThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=Yi();return ce(),(a,n)=>(w(),O(l(Z),{"data-state":l(t).modelValue?.value?"checked":"unchecked","data-disabled":l(t).disabled.value?"":void 0,"as-child":a.asChild,as:a.as},{default:z(()=>[E(a.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"]))}}),eo=Qi;const to={trailing:!0};function ao(e,t=25,a={}){if(a={...to,...a},!Number.isFinite(t))throw new TypeError("Expected `wait` to be a finite number");let n,r,s=[],i,o;const c=(u,p)=>(i=no(e,u,p),i.finally(()=>{if(i=null,a.trailing&&o&&!r){const h=c(u,o);return o=null,h}}),i),f=function(...u){return a.trailing&&(o=u),i||new Promise(p=>{const h=!r&&a.leading;clearTimeout(r),r=setTimeout(()=>{r=null;const g=a.leading?n:c(this,u);o=null;for(const y of s)y(g);s=[]},t),h?(n=c(this,u),p(n)):s.push(p)})},d=u=>{u&&(clearTimeout(u),r=null)};return f.isPending=()=>!!r,f.cancel=()=>{d(r),s=[],o=null},f.flush=()=>{if(d(r),!o||i)return;const u=o;return o=null,c(this,u)},f}async function no(e,t,a){return await e.apply(t,a)}const ro=Symbol.for("nuxt:client-only");function io(...e){const t=typeof e[e.length-1]=="string"?e.pop():void 0;oo(e[0],e[1])&&e.unshift(t);let[a,n,r={}]=e,s=!1;const i=D(()=>me(a));if(typeof i.value!="string")throw new TypeError("[nuxt] [useAsyncData] key must be a string.");if(typeof n!="function")throw new TypeError("[nuxt] [useAsyncData] handler must be a function.");const o=ln();r.server??=!0,r.default??=lo,r.getCachedData??=Fa,r.lazy??=!1,r.immediate??=!0,r.deep??=un.deep,r.dedupe??="cancel",r._functionName,o._asyncData[i.value];function c(){const g={cause:"initial",dedupe:r.dedupe};return o._asyncData[i.value]?._init||(g.cachedData=r.getCachedData(i.value,o,{cause:"initial"}),o._asyncData[i.value]=la(o,i.value,n,r,g.cachedData)),()=>o._asyncData[i.value].execute(g)}const f=c(),d=o._asyncData[i.value];d._deps++;const u=r.server!==!1&&o.payload.serverRendered;{let g=function(m){const b=o._asyncData[m];b?._deps&&(b._deps--,b._deps===0&&b?._off())};const y=dn();if(y&&u&&r.immediate&&!y.sp&&(y.sp=[]),y&&!y._nuxtOnBeforeMountCbs){y._nuxtOnBeforeMountCbs=[];const m=y._nuxtOnBeforeMountCbs;cn(()=>{m.forEach(b=>{b()}),m.splice(0,m.length)}),ma(()=>m.splice(0,m.length))}const S=y&&(y._nuxtClientOnly||yt(ro,!1));u&&o.isHydrating&&(d.error.value||d.data.value!==void 0)?d.status.value=d.error.value?"error":"success":y&&(!S&&o.payload.serverRendered&&o.isHydrating||r.lazy)&&r.immediate?y._nuxtOnBeforeMountCbs.push(f):r.immediate&&d.status.value!=="success"&&f();const C=fa(),A=ye(i,(m,b)=>{if((m||b)&&m!==b){s=!0;const _=o._asyncData[b]?.data.value!==void 0,v=o._asyncDataPromises[b]!==void 0,x={cause:"initial",dedupe:r.dedupe};if(!o._asyncData[m]?._init){let k;b&&_?k=o._asyncData[b].data.value:(k=r.getCachedData(m,o,{cause:"initial"}),x.cachedData=k),o._asyncData[m]=la(o,m,n,r,k)}o._asyncData[m]._deps++,b&&g(b),(r.immediate||_||v)&&o._asyncData[m].execute(x),Nt(()=>{s=!1})}},{flush:"sync"}),q=r.watch?ye(r.watch,()=>{s||(o._asyncData[i.value]?._execute.isPending()&&Nt(()=>{o._asyncData[i.value]?._execute.flush()}),o._asyncData[i.value]?._execute({cause:"watch",dedupe:r.dedupe}))}):()=>{};C&&pa(()=>{A(),q(),g(i.value)})}const p={data:Je(()=>o._asyncData[i.value]?.data),pending:Je(()=>o._asyncData[i.value]?.pending),status:Je(()=>o._asyncData[i.value]?.status),error:Je(()=>o._asyncData[i.value]?.error),refresh:(...g)=>o._asyncData[i.value]?._init?o._asyncData[i.value].execute(...g):c()(),execute:(...g)=>p.refresh(...g),clear:()=>{const g=o._asyncData[i.value];if(g?._abortController)try{g._abortController.abort(new DOMException("AsyncData aborted by user.","AbortError"))}finally{g._abortController=void 0}Ma(o,i.value)}},h=Promise.resolve(o._asyncDataPromises[i.value]).then(()=>p);return Object.assign(h,p),h}function Je(e){return D({get(){return e()?.value},set(t){const a=e();a&&(a.value=t)}})}function oo(e,t){return!(typeof e=="string"||typeof e=="object"&&e!==null||typeof e=="function"&&typeof t=="function")}function Ma(e,t){t in e.payload.data&&(e.payload.data[t]=void 0),t in e.payload._errors&&(e.payload._errors[t]=void 0),e._asyncData[t]&&(e._asyncData[t].data.value=l(e._asyncData[t]._default()),e._asyncData[t].error.value=void 0,e._asyncData[t].status.value="idle"),t in e._asyncDataPromises&&(e._asyncDataPromises[t]=void 0)}function so(e,t){const a={};for(const n of t)a[n]=e[n];return a}function la(e,t,a,n,r){e.payload._errors[t]??=void 0;const s=n.getCachedData!==Fa,i=a,o=n.deep?L:ht,c=r!==void 0,f=e.hook("app:data:refresh",async u=>{(!u||u.includes(t))&&await d.execute({cause:"refresh:hook"})}),d={data:o(c?r:n.default()),pending:D(()=>d.status.value==="pending"),error:Be(e.payload._errors,t),status:ht("idle"),execute:(...u)=>{const[p,h=void 0]=u,g=p&&h===void 0&&typeof p=="object"?p:{};if(e._asyncDataPromises[t]&&(g.dedupe??n.dedupe)==="defer")return e._asyncDataPromises[t];{const C="cachedData"in g?g.cachedData:n.getCachedData(t,e,{cause:g.cause??"refresh:manual"});if(C!==void 0)return e.payload.data[t]=d.data.value=C,d.error.value=void 0,d.status.value="success",Promise.resolve(C)}d._abortController&&d._abortController.abort(new DOMException("AsyncData request cancelled by deduplication","AbortError")),d._abortController=new AbortController,d.status.value="pending";const y=new AbortController,S=new Promise((C,A)=>{try{const q=g.timeout??n.timeout,m=uo([d._abortController?.signal,g?.signal],y.signal,q);if(m.aborted){const b=m.reason;A(b instanceof Error?b:new DOMException(String(b??"Aborted"),"AbortError"));return}return m.addEventListener("abort",()=>{const b=m.reason;A(b instanceof Error?b:new DOMException(String(b??"Aborted"),"AbortError"))},{once:!0,signal:y.signal}),Promise.resolve(i(e,{signal:m})).then(C,A)}catch(q){A(q)}}).then(async C=>{let A=C;n.transform&&(A=await n.transform(C)),n.pick&&(A=so(A,n.pick)),e.payload.data[t]=A,d.data.value=A,d.error.value=void 0,d.status.value="success"}).catch(C=>{if(e._asyncDataPromises[t]&&e._asyncDataPromises[t]!==S||d._abortController?.signal.aborted)return e._asyncDataPromises[t];if(typeof DOMException<"u"&&C instanceof DOMException&&C.name==="AbortError")return d.status.value="idle",e._asyncDataPromises[t];d.error.value=fn(C),d.data.value=l(n.default()),d.status.value="error"}).finally(()=>{y.abort(),delete e._asyncDataPromises[t]});return e._asyncDataPromises[t]=S,e._asyncDataPromises[t]},_execute:ao((...u)=>d.execute(...u),0,{leading:!0}),_default:n.default,_deps:0,_init:!0,_hash:void 0,_off:()=>{f(),e._asyncData[t]?._init&&(e._asyncData[t]._init=!1),s||Ve(()=>{e._asyncData[t]?._init||(Ma(e,t),d.execute=()=>Promise.resolve())})}};return d}const lo=()=>{},Fa=(e,t,a)=>{if(t.isHydrating)return t.payload.data[e];if(a.cause!=="refresh:manual"&&a.cause!=="refresh:hook")return t.static.data[e]};function uo(e,t,a){const n=e.filter(i=>!!i);if(typeof a=="number"&&a>=0){const i=AbortSignal.timeout?.(a);i&&n.push(i)}if(AbortSignal.any)return AbortSignal.any(n);const r=new AbortController;for(const i of n)if(i.aborted){const o=i.reason??new DOMException("Aborted","AbortError");try{r.abort(o)}catch{r.abort()}return r.signal}const s=()=>{const o=n.find(c=>c.aborted)?.reason??new DOMException("Aborted","AbortError");try{r.abort(o)}catch{r.abort()}};for(const i of n)i.addEventListener?.("abort",s,{once:!0,signal:t});return r.signal}const co={slots:{base:"font-medium inline-flex items-center",label:"truncate",leadingIcon:"shrink-0",leadingAvatar:"shrink-0",leadingAvatarSize:"",trailingIcon:"shrink-0"},variants:{fieldGroup:{horizontal:"not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none focus-visible:z-[1]",vertical:"not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none focus-visible:z-[1]"},color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},variant:{solid:"",outline:"",soft:"",subtle:""},size:{xs:{base:"text-[8px]/3 px-1 py-0.5 gap-1 rounded-sm",leadingIcon:"size-3",leadingAvatarSize:"3xs",trailingIcon:"size-3"},sm:{base:"text-[10px]/3 px-1.5 py-1 gap-1 rounded-sm",leadingIcon:"size-3",leadingAvatarSize:"3xs",trailingIcon:"size-3"},md:{base:"text-xs px-2 py-1 gap-1 rounded-md",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4"},lg:{base:"text-sm px-2 py-1 gap-1.5 rounded-md",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5"},xl:{base:"text-base px-2.5 py-1 gap-1.5 rounded-md",leadingIcon:"size-6",leadingAvatarSize:"2xs",trailingIcon:"size-6"}},square:{true:""}},compoundVariants:[{color:"primary",variant:"solid",class:"bg-primary text-inverted"},{color:"secondary",variant:"solid",class:"bg-secondary text-inverted"},{color:"success",variant:"solid",class:"bg-success text-inverted"},{color:"info",variant:"solid",class:"bg-info text-inverted"},{color:"warning",variant:"solid",class:"bg-warning text-inverted"},{color:"error",variant:"solid",class:"bg-error text-inverted"},{color:"primary",variant:"outline",class:"text-primary ring ring-inset ring-primary/50"},{color:"secondary",variant:"outline",class:"text-secondary ring ring-inset ring-secondary/50"},{color:"success",variant:"outline",class:"text-success ring ring-inset ring-success/50"},{color:"info",variant:"outline",class:"text-info ring ring-inset ring-info/50"},{color:"warning",variant:"outline",class:"text-warning ring ring-inset ring-warning/50"},{color:"error",variant:"outline",class:"text-error ring ring-inset ring-error/50"},{color:"primary",variant:"soft",class:"bg-primary/10 text-primary"},{color:"secondary",variant:"soft",class:"bg-secondary/10 text-secondary"},{color:"success",variant:"soft",class:"bg-success/10 text-success"},{color:"info",variant:"soft",class:"bg-info/10 text-info"},{color:"warning",variant:"soft",class:"bg-warning/10 text-warning"},{color:"error",variant:"soft",class:"bg-error/10 text-error"},{color:"primary",variant:"subtle",class:"bg-primary/10 text-primary ring ring-inset ring-primary/25"},{color:"secondary",variant:"subtle",class:"bg-secondary/10 text-secondary ring ring-inset ring-secondary/25"},{color:"success",variant:"subtle",class:"bg-success/10 text-success ring ring-inset ring-success/25"},{color:"info",variant:"subtle",class:"bg-info/10 text-info ring ring-inset ring-info/25"},{color:"warning",variant:"subtle",class:"bg-warning/10 text-warning ring ring-inset ring-warning/25"},{color:"error",variant:"subtle",class:"bg-error/10 text-error ring ring-inset ring-error/25"},{color:"neutral",variant:"solid",class:"text-inverted bg-inverted"},{color:"neutral",variant:"outline",class:"ring ring-inset ring-accented text-default bg-default"},{color:"neutral",variant:"soft",class:"text-default bg-elevated"},{color:"neutral",variant:"subtle",class:"ring ring-inset ring-accented text-default bg-elevated"},{size:"xs",square:!0,class:"p-0.5"},{size:"sm",square:!0,class:"p-1"},{size:"md",square:!0,class:"p-1"},{size:"lg",square:!0,class:"p-1"},{size:"xl",square:!0,class:"p-1"}],defaultVariants:{color:"primary",variant:"solid",size:"md"}},Fo={__name:"UBadge",props:{as:{type:null,required:!1,default:"span"},label:{type:[String,Number],required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},square:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1}},setup(e){const t=e,a=rt(),n=it(),r=ot("badge",t),{orientation:s,size:i}=ha(t),{isLeading:o,isTrailing:c,leadingIconName:f,trailingIconName:d}=va(t),u=D(()=>Ce({extend:Ce(co),...n.ui?.badge||{}})({color:t.color,variant:t.variant,size:i.value||t.size,square:t.square||!a.default&&!t.label,fieldGroup:s.value}));return(p,h)=>(w(),O(l(Z),{as:e.as,"data-slot":"base",class:$(u.value.base({class:[l(r)?.base,t.class]}))},{default:z(()=>[E(p.$slots,"leading",{ui:u.value},()=>[l(o)&&l(f)?(w(),O(he,{key:0,name:l(f),"data-slot":"leadingIcon",class:$(u.value.leadingIcon({class:l(r)?.leadingIcon}))},null,8,["name","class"])):e.avatar?(w(),O(bt,N({key:1,size:l(r)?.leadingAvatarSize||u.value.leadingAvatarSize()},e.avatar,{"data-slot":"leadingAvatar",class:u.value.leadingAvatar({class:l(r)?.leadingAvatar})}),null,16,["size","class"])):F("",!0)]),E(p.$slots,"default",{ui:u.value},()=>[e.label!==void 0&&e.label!==null?(w(),R("span",{key:0,"data-slot":"label",class:$(u.value.label({class:l(r)?.label}))},K(e.label),3)):F("",!0)]),E(p.$slots,"trailing",{ui:u.value},()=>[l(c)&&l(d)?(w(),O(he,{key:0,name:l(d),"data-slot":"trailingIcon",class:$(u.value.trailingIcon({class:l(r)?.trailingIcon}))},null,8,["name","class"])):F("",!0)])]),_:3},8,["as","class"]))}},fo={slots:{root:"relative flex items-start",base:["inline-flex items-center shrink-0 rounded-full border-2 border-transparent focus-visible:outline-2 focus-visible:outline-offset-2 data-[state=unchecked]:bg-accented","transition-[background] duration-200"],container:"flex items-center",thumb:"group pointer-events-none rounded-full bg-default shadow-lg ring-0 transition-transform duration-200 data-[state=unchecked]:translate-x-0 data-[state=unchecked]:rtl:-translate-x-0 flex items-center justify-center",icon:["absolute shrink-0 group-data-[state=unchecked]:text-dimmed opacity-0 size-10/12","transition-[color,opacity] duration-200"],wrapper:"ms-2",label:"block font-medium text-default",description:"text-muted"},variants:{color:{primary:{base:"data-[state=checked]:bg-primary focus-visible:outline-primary",icon:"group-data-[state=checked]:text-primary"},secondary:{base:"data-[state=checked]:bg-secondary focus-visible:outline-secondary",icon:"group-data-[state=checked]:text-secondary"},success:{base:"data-[state=checked]:bg-success focus-visible:outline-success",icon:"group-data-[state=checked]:text-success"},info:{base:"data-[state=checked]:bg-info focus-visible:outline-info",icon:"group-data-[state=checked]:text-info"},warning:{base:"data-[state=checked]:bg-warning focus-visible:outline-warning",icon:"group-data-[state=checked]:text-warning"},error:{base:"data-[state=checked]:bg-error focus-visible:outline-error",icon:"group-data-[state=checked]:text-error"},neutral:{base:"data-[state=checked]:bg-inverted focus-visible:outline-inverted",icon:"group-data-[state=checked]:text-highlighted"}},size:{xs:{base:"w-7",container:"h-4",thumb:"size-3 data-[state=checked]:translate-x-3 data-[state=checked]:rtl:-translate-x-3",wrapper:"text-xs"},sm:{base:"w-8",container:"h-4",thumb:"size-3.5 data-[state=checked]:translate-x-3.5 data-[state=checked]:rtl:-translate-x-3.5",wrapper:"text-xs"},md:{base:"w-9",container:"h-5",thumb:"size-4 data-[state=checked]:translate-x-4 data-[state=checked]:rtl:-translate-x-4",wrapper:"text-sm"},lg:{base:"w-10",container:"h-5",thumb:"size-4.5 data-[state=checked]:translate-x-4.5 data-[state=checked]:rtl:-translate-x-4.5",wrapper:"text-sm"},xl:{base:"w-11",container:"h-6",thumb:"size-5 data-[state=checked]:translate-x-5 data-[state=checked]:rtl:-translate-x-5",wrapper:"text-base"}},checked:{true:{icon:"group-data-[state=checked]:opacity-100"}},unchecked:{true:{icon:"group-data-[state=unchecked]:opacity-100"}},loading:{true:{icon:"animate-spin"}},required:{true:{label:"after:content-['*'] after:ms-0.5 after:text-error"}},disabled:{true:{root:"opacity-75",base:"cursor-not-allowed",label:"cursor-not-allowed",description:"cursor-not-allowed"}}},defaultVariants:{color:"primary",size:"md"}},po=Object.assign({inheritAttrs:!1},{__name:"USwitch",props:Wt({as:{type:null,required:!1},color:{type:null,required:!1},size:{type:null,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1},checkedIcon:{type:null,required:!1},uncheckedIcon:{type:null,required:!1},label:{type:String,required:!1},description:{type:String,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},disabled:{type:Boolean,required:!1},id:{type:String,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},value:{type:String,required:!1},defaultValue:{type:Boolean,required:!1}},{modelValue:{type:Boolean,default:void 0},modelModifiers:{}}),emits:Wt(["change"],["update:modelValue"]),setup(e,{emit:t}){const a=e,n=rt(),r=t,s=pn(e,"modelValue",{type:Boolean,default:void 0}),i=it(),o=ot("switch",a),c=Bt(ya(a,"required","value","defaultValue")),{id:f,emitFormChange:d,emitFormInput:u,size:p,color:h,name:g,disabled:y,ariaAttrs:S}=ba(a),C=f.value??wa(),A=gn(),q=D(()=>{const{"data-state":_,...v}=A;return v}),m=D(()=>Ce({extend:Ce(fo),...i.ui?.switch||{}})({size:p.value,color:h.value,required:a.required,loading:a.loading,disabled:y.value||a.loading}));function b(_){const v=new Event("change",{target:{value:_}});r("change",v),d(),u()}return(_,v)=>(w(),O(l(Z),{as:e.as,"data-slot":"root",class:$(m.value.root({class:[l(o)?.root,a.class]}))},{default:z(()=>[Y("div",{"data-slot":"container",class:$(m.value.container({class:l(o)?.container}))},[G(l(Ji),N({id:l(C)},{...l(c),...q.value,...l(S)},{modelValue:s.value,"onUpdate:modelValue":[v[0]||(v[0]=x=>s.value=x),b],name:l(g),disabled:l(y)||e.loading,"data-slot":"base",class:m.value.base({class:l(o)?.base})}),{default:z(()=>[G(l(eo),{"data-slot":"thumb",class:$(m.value.thumb({class:l(o)?.thumb}))},{default:z(()=>[e.loading?(w(),O(he,{key:0,name:e.loadingIcon||l(i).ui.icons.loading,"data-slot":"icon",class:$(m.value.icon({class:l(o)?.icon,checked:!0,unchecked:!0}))},null,8,["name","class"])):(w(),R(oe,{key:1},[e.checkedIcon?(w(),O(he,{key:0,name:e.checkedIcon,"data-slot":"icon",class:$(m.value.icon({class:l(o)?.icon,checked:!0}))},null,8,["name","class"])):F("",!0),e.uncheckedIcon?(w(),O(he,{key:1,name:e.uncheckedIcon,"data-slot":"icon",class:$(m.value.icon({class:l(o)?.icon,unchecked:!0}))},null,8,["name","class"])):F("",!0)],64))]),_:1},8,["class"])]),_:1},16,["id","modelValue","name","disabled","class"])],2),e.label||n.label||e.description||n.description?(w(),R("div",{key:0,"data-slot":"wrapper",class:$(m.value.wrapper({class:l(o)?.wrapper}))},[e.label||n.label?(w(),O(l(Ea),{key:0,for:l(C),"data-slot":"label",class:$(m.value.label({class:l(o)?.label}))},{default:z(()=>[E(_.$slots,"label",{label:e.label},()=>[se(K(e.label),1)])]),_:3},8,["for","class"])):F("",!0),e.description||n.description?(w(),R("p",{key:1,"data-slot":"description",class:$(m.value.description({class:l(o)?.description}))},[E(_.$slots,"description",{description:e.description},()=>[se(K(e.description),1)])],2)):F("",!0)],2)):F("",!0)]),_:3},8,["as","class"]))}}),go={slots:{base:["relative group rounded-md inline-flex items-center focus:outline-none disabled:cursor-not-allowed disabled:opacity-75","transition-colors"],leading:"absolute inset-y-0 start-0 flex items-center",leadingIcon:"shrink-0 text-dimmed",leadingAvatar:"shrink-0",leadingAvatarSize:"",trailing:"absolute inset-y-0 end-0 flex items-center",trailingIcon:"shrink-0 text-dimmed",value:"truncate pointer-events-none",placeholder:"truncate text-dimmed",arrow:"fill-default",content:"max-h-60 w-(--reka-select-trigger-width) bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-select-content-transform-origin) pointer-events-auto flex flex-col",viewport:"relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1",group:"p-1 isolate",empty:"text-center text-muted",label:"font-semibold text-highlighted",separator:"-mx-1 my-1 h-px bg-border",item:["group relative w-full flex items-start select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75 text-default data-highlighted:not-data-disabled:text-highlighted data-highlighted:not-data-disabled:before:bg-elevated/50","transition-colors before:transition-colors"],itemLeadingIcon:["shrink-0 text-dimmed group-data-highlighted:not-group-data-disabled:text-default","transition-colors"],itemLeadingAvatar:"shrink-0",itemLeadingAvatarSize:"",itemLeadingChip:"shrink-0",itemLeadingChipSize:"",itemTrailing:"ms-auto inline-flex gap-1.5 items-center",itemTrailingIcon:"shrink-0",itemWrapper:"flex-1 flex flex-col min-w-0",itemLabel:"truncate",itemDescription:"truncate text-muted"},variants:{fieldGroup:{horizontal:"not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none focus-visible:z-[1]",vertical:"not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none focus-visible:z-[1]"},size:{xs:{base:"px-2 py-1 text-xs gap-1",leading:"ps-2",trailing:"pe-2",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4",label:"p-1 text-[10px]/3 gap-1",item:"p-1 text-xs gap-1",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemLeadingChip:"size-4",itemLeadingChipSize:"sm",itemTrailingIcon:"size-4",empty:"p-1 text-xs"},sm:{base:"px-2.5 py-1.5 text-xs gap-1.5",leading:"ps-2.5",trailing:"pe-2.5",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4",label:"p-1.5 text-[10px]/3 gap-1.5",item:"p-1.5 text-xs gap-1.5",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemLeadingChip:"size-4",itemLeadingChipSize:"sm",itemTrailingIcon:"size-4",empty:"p-1.5 text-xs"},md:{base:"px-2.5 py-1.5 text-sm gap-1.5",leading:"ps-2.5",trailing:"pe-2.5",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5",label:"p-1.5 text-xs gap-1.5",item:"p-1.5 text-sm gap-1.5",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemLeadingChip:"size-5",itemLeadingChipSize:"md",itemTrailingIcon:"size-5",empty:"p-1.5 text-sm"},lg:{base:"px-3 py-2 text-sm gap-2",leading:"ps-3",trailing:"pe-3",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5",label:"p-2 text-xs gap-2",item:"p-2 text-sm gap-2",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemLeadingChip:"size-5",itemLeadingChipSize:"md",itemTrailingIcon:"size-5",empty:"p-2 text-sm"},xl:{base:"px-3 py-2 text-base gap-2",leading:"ps-3",trailing:"pe-3",leadingIcon:"size-6",leadingAvatarSize:"xs",trailingIcon:"size-6",label:"p-2 text-sm gap-2",item:"p-2 text-base gap-2",itemLeadingIcon:"size-6",itemLeadingAvatarSize:"xs",itemLeadingChip:"size-6",itemLeadingChipSize:"lg",itemTrailingIcon:"size-6",empty:"p-2 text-base"}},variant:{outline:"text-highlighted bg-default ring ring-inset ring-accented hover:bg-elevated disabled:bg-default",soft:"text-highlighted bg-elevated/50 hover:bg-elevated focus:bg-elevated disabled:bg-elevated/50",subtle:"text-highlighted bg-elevated ring ring-inset ring-accented hover:bg-accented/75 disabled:bg-elevated",ghost:"text-highlighted bg-transparent hover:bg-elevated focus:bg-elevated disabled:bg-transparent dark:disabled:bg-transparent",none:"text-highlighted bg-transparent"},color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},leading:{true:""},trailing:{true:""},loading:{true:""},highlight:{true:""},fixed:{false:""},type:{file:"file:me-1.5 file:font-medium file:text-muted file:outline-none"}},compoundVariants:[{color:"primary",variant:["outline","subtle"],class:"focus:ring-2 focus:ring-inset focus:ring-primary"},{color:"secondary",variant:["outline","subtle"],class:"focus:ring-2 focus:ring-inset focus:ring-secondary"},{color:"success",variant:["outline","subtle"],class:"focus:ring-2 focus:ring-inset focus:ring-success"},{color:"info",variant:["outline","subtle"],class:"focus:ring-2 focus:ring-inset focus:ring-info"},{color:"warning",variant:["outline","subtle"],class:"focus:ring-2 focus:ring-inset focus:ring-warning"},{color:"error",variant:["outline","subtle"],class:"focus:ring-2 focus:ring-inset focus:ring-error"},{color:"primary",highlight:!0,class:"ring ring-inset ring-primary"},{color:"secondary",highlight:!0,class:"ring ring-inset ring-secondary"},{color:"success",highlight:!0,class:"ring ring-inset ring-success"},{color:"info",highlight:!0,class:"ring ring-inset ring-info"},{color:"warning",highlight:!0,class:"ring ring-inset ring-warning"},{color:"error",highlight:!0,class:"ring ring-inset ring-error"},{color:"neutral",variant:["outline","subtle"],class:"focus:ring-2 focus:ring-inset focus:ring-inverted"},{color:"neutral",highlight:!0,class:"ring ring-inset ring-inverted"},{leading:!0,size:"xs",class:"ps-7"},{leading:!0,size:"sm",class:"ps-8"},{leading:!0,size:"md",class:"ps-9"},{leading:!0,size:"lg",class:"ps-10"},{leading:!0,size:"xl",class:"ps-11"},{trailing:!0,size:"xs",class:"pe-7"},{trailing:!0,size:"sm",class:"pe-8"},{trailing:!0,size:"md",class:"pe-9"},{trailing:!0,size:"lg",class:"pe-10"},{trailing:!0,size:"xl",class:"pe-11"},{loading:!0,leading:!0,class:{leadingIcon:"animate-spin"}},{loading:!0,leading:!1,trailing:!0,class:{trailingIcon:"animate-spin"}},{fixed:!1,size:"xs",class:"md:text-xs"},{fixed:!1,size:"sm",class:"md:text-xs"},{fixed:!1,size:"md",class:"md:text-sm"},{fixed:!1,size:"lg",class:"md:text-sm"}],defaultVariants:{size:"md",color:"primary",variant:"outline"}},No=Object.assign({inheritAttrs:!1},{__name:"USelect",props:{id:{type:String,required:!1},placeholder:{type:String,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},trailingIcon:{type:null,required:!1},selectedIcon:{type:null,required:!1},content:{type:Object,required:!1},arrow:{type:[Boolean,Object],required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},valueKey:{type:null,required:!1,default:"value"},labelKey:{type:null,required:!1,default:"label"},descriptionKey:{type:null,required:!1,default:"description"},items:{type:null,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1},modelModifiers:{type:null,required:!1},multiple:{type:Boolean,required:!1},highlight:{type:Boolean,required:!1},autofocus:{type:Boolean,required:!1},autofocusDelay:{type:Number,required:!1,default:0},class:{type:null,required:!1},ui:{type:Object,required:!1},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},autocomplete:{type:String,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1}},emits:["change","blur","focus","update:modelValue","update:open"],setup(e,{expose:t,emit:a}){const n=e,r=a,s=rt(),i=it(),o=ot("select",n),c=ga(ya(n,"open","defaultOpen","disabled","autocomplete","required","multiple"),r),f=mn(Be(()=>n.portal)),d=Be(()=>Ut(n.content,{side:"bottom",sideOffset:8,collisionPadding:8,position:"popper"})),u=Be(()=>n.arrow),{emitFormChange:p,emitFormInput:h,emitFormBlur:g,emitFormFocus:y,size:S,color:C,id:A,name:q,highlight:m,disabled:b,ariaAttrs:_}=ba(n),{orientation:v,size:x}=ha(n),{isLeading:k,isTrailing:B,leadingIconName:j,trailingIconName:T}=va(Be(()=>Ut(n,{trailingIcon:i.ui.icons.chevronDown}))),M=D(()=>x.value||S.value),I=D(()=>Ce({extend:Ce(go),...i.ui?.select||{}})({color:C.value,variant:n.variant,size:M?.value,loading:n.loading,highlight:m.value,leading:k.value||!!n.avatar||!!s.leading,trailing:B.value||!!s.trailing,fieldGroup:v.value})),Q=D(()=>n.items?.length?yn(n.items)?n.items:[n.items]:[]),J=D(()=>Q.value.flatMap(V=>V));function X(V){if(n.multiple&&Array.isArray(V)){const ie=V.map(de=>Ht(J.value,de,{labelKey:n.labelKey,valueKey:n.valueKey})).filter(de=>de!=null&&de!=="");return ie.length>0?ie.join(", "):void 0}return Ht(J.value,V,{labelKey:n.labelKey,valueKey:n.valueKey})}const H=jt("triggerRef");function re(){n.autofocus&&H.value?.$el?.focus({focusVisible:!0})}Te(()=>{setTimeout(()=>{re()},n.autofocusDelay)});function qe(V){n.modelModifiers?.trim&&(typeof V=="string"||V===null||V===void 0)&&(V=V?.trim()??null),n.modelModifiers?.number&&(V=vn(V)),n.modelModifiers?.nullable&&(V??=null),n.modelModifiers?.optional&&!n.modelModifiers?.nullable&&V!==null&&(V??=void 0);const ie=new Event("change",{target:{value:V}});r("change",ie),p(),h()}function ft(V){if(V){const ie=new FocusEvent("focus");r("focus",ie),y()}else{const ie=new FocusEvent("blur");r("blur",ie),g()}}function U(V){return typeof V=="object"&&V!==null}const Xe=jt("viewportRef");return t({triggerRef:Be(()=>H.value?.$el),viewportRef:Be(()=>Xe.value)}),(V,ie)=>(w(),O(l(pi),N({name:l(q)},l(c),{autocomplete:e.autocomplete,disabled:l(b),"default-value":e.defaultValue,"model-value":e.modelValue,"onUpdate:modelValue":qe,"onUpdate:open":ft}),{default:z(({modelValue:de,open:te})=>[G(l(Gi),N({id:l(A),ref_key:"triggerRef",ref:H,"data-slot":"base",class:I.value.base({class:[l(o)?.base,n.class]})},{...V.$attrs,...l(_)}),{default:z(()=>[l(k)||e.avatar||s.leading?(w(),R("span",{key:0,"data-slot":"leading",class:$(I.value.leading({class:l(o)?.leading}))},[E(V.$slots,"leading",{modelValue:de,open:te,ui:I.value},()=>[l(k)&&l(j)?(w(),O(he,{key:0,name:l(j),"data-slot":"leadingIcon",class:$(I.value.leadingIcon({class:l(o)?.leadingIcon}))},null,8,["name","class"])):e.avatar?(w(),O(bt,N({key:1,size:l(o)?.itemLeadingAvatarSize||I.value.itemLeadingAvatarSize()},e.avatar,{"data-slot":"itemLeadingAvatar",class:I.value.itemLeadingAvatar({class:l(o)?.itemLeadingAvatar})}),null,16,["size","class"])):F("",!0)])],2)):F("",!0),E(V.$slots,"default",{modelValue:de,open:te,ui:I.value},()=>[(w(!0),R(oe,null,De([X(de)],ee=>(w(),R(oe,{key:ee},[ee!=null?(w(),R("span",{key:0,"data-slot":"value",class:$(I.value.value({class:l(o)?.value}))},K(ee),3)):(w(),R("span",{key:1,"data-slot":"placeholder",class:$(I.value.placeholder({class:l(o)?.placeholder}))},K(e.placeholder??" "),3))],64))),128))]),l(B)||s.trailing?(w(),R("span",{key:1,"data-slot":"trailing",class:$(I.value.trailing({class:l(o)?.trailing}))},[E(V.$slots,"trailing",{modelValue:de,open:te,ui:I.value},()=>[l(T)?(w(),O(he,{key:0,name:l(T),"data-slot":"trailingIcon",class:$(I.value.trailingIcon({class:l(o)?.trailingIcon}))},null,8,["name","class"])):F("",!0)])],2)):F("",!0)]),_:2},1040,["id","class"]),G(l(ji),nt(Dt(l(f))),{default:z(()=>[G(l(Ii),N({"data-slot":"content",class:I.value.content({class:l(o)?.content})},d.value),{default:z(()=>[E(V.$slots,"content-top"),Y("div",{ref_key:"viewportRef",ref:Xe,role:"presentation","data-slot":"viewport",class:$(I.value.viewport({class:l(o)?.viewport}))},[(w(!0),R(oe,null,De(Q.value,(ee,fe)=>(w(),O(l(Ti),{key:`group-${fe}`,"data-slot":"group",class:$(I.value.group({class:l(o)?.group}))},{default:z(()=>[(w(!0),R(oe,null,De(ee,(P,pe)=>(w(),R(oe,{key:`group-${fe}-${pe}`},[U(P)&&P.type==="label"?(w(),O(l(Ni),{key:0,"data-slot":"label",class:$(I.value.label({class:[l(o)?.label,P.ui?.label,P.class]}))},{default:z(()=>[se(K(l(Ue)(P,n.labelKey)),1)]),_:2},1032,["class"])):U(P)&&P.type==="separator"?(w(),O(l(Ui),{key:1,"data-slot":"separator",class:$(I.value.separator({class:[l(o)?.separator,P.ui?.separator,P.class]}))},null,8,["class"])):(w(),O(l($i),{key:2,"data-slot":"item",class:$(I.value.item({class:[l(o)?.item,U(P)&&P.ui?.item,U(P)&&P.class]})),disabled:U(P)&&P.disabled,value:U(P)?l(Ue)(P,n.valueKey):P,onSelect:He=>U(P)&&P.onSelect?.(He)},{default:z(()=>[E(V.$slots,"item",{item:P,index:pe,ui:I.value},()=>[E(V.$slots,"item-leading",{item:P,index:pe,ui:I.value},()=>[U(P)&&P.icon?(w(),O(he,{key:0,name:P.icon,"data-slot":"itemLeadingIcon",class:$(I.value.itemLeadingIcon({class:[l(o)?.itemLeadingIcon,P.ui?.itemLeadingIcon]}))},null,8,["name","class"])):U(P)&&P.avatar?(w(),O(bt,N({key:1,size:P.ui?.itemLeadingAvatarSize||l(o)?.itemLeadingAvatarSize||I.value.itemLeadingAvatarSize()},{ref_for:!0},P.avatar,{"data-slot":"itemLeadingAvatar",class:I.value.itemLeadingAvatar({class:[l(o)?.itemLeadingAvatar,P.ui?.itemLeadingAvatar]})}),null,16,["size","class"])):U(P)&&P.chip?(w(),O(hn,N({key:2,size:P.ui?.itemLeadingChipSize||l(o)?.itemLeadingChipSize||I.value.itemLeadingChipSize(),inset:"",standalone:""},{ref_for:!0},P.chip,{"data-slot":"itemLeadingChip",class:I.value.itemLeadingChip({class:[l(o)?.itemLeadingChip,P.ui?.itemLeadingChip]})}),null,16,["size","class"])):F("",!0)]),Y("span",{"data-slot":"itemWrapper",class:$(I.value.itemWrapper({class:[l(o)?.itemWrapper,U(P)&&P.ui?.itemWrapper]}))},[G(l(Mi),{"data-slot":"itemLabel",class:$(I.value.itemLabel({class:[l(o)?.itemLabel,U(P)&&P.ui?.itemLabel]}))},{default:z(()=>[E(V.$slots,"item-label",{item:P,index:pe},()=>[se(K(U(P)?l(Ue)(P,n.labelKey):P),1)])]),_:2},1032,["class"]),U(P)&&(l(Ue)(P,n.descriptionKey)||s["item-description"])?(w(),R("span",{key:0,"data-slot":"itemDescription",class:$(I.value.itemDescription({class:[l(o)?.itemDescription,U(P)&&P.ui?.itemDescription]}))},[E(V.$slots,"item-description",{item:P,index:pe},()=>[se(K(l(Ue)(P,n.descriptionKey)),1)])],2)):F("",!0)],2),Y("span",{"data-slot":"itemTrailing",class:$(I.value.itemTrailing({class:[l(o)?.itemTrailing,U(P)&&P.ui?.itemTrailing]}))},[E(V.$slots,"item-trailing",{item:P,index:pe,ui:I.value}),G(l(Li),{"as-child":""},{default:z(()=>[G(he,{name:e.selectedIcon||l(i).ui.icons.check,"data-slot":"itemTrailingIcon",class:$(I.value.itemTrailingIcon({class:[l(o)?.itemTrailingIcon,U(P)&&P.ui?.itemTrailingIcon]}))},null,8,["name","class"])]),_:2},1024)],2)])]),_:2},1032,["class","disabled","value","onSelect"]))],64))),128))]),_:2},1032,["class"]))),128))],2),E(V.$slots,"content-bottom"),e.arrow?(w(),O(l(qi),N({key:0},u.value,{"data-slot":"arrow",class:I.value.arrow({class:l(o)?.arrow})}),null,16,["class"])):F("",!0)]),_:3},16,["class"])]),_:3},16)]),_:3},16,["name","autocomplete","disabled","default-value","model-value"]))}}),mo={slots:{root:"",wrapper:"",labelWrapper:"flex content-center items-center justify-between gap-1",label:"block font-medium text-default",container:"relative",description:"text-muted",error:"mt-2 text-error",hint:"text-muted",help:"mt-2 text-muted"},variants:{size:{xs:{root:"text-xs"},sm:{root:"text-xs"},md:{root:"text-sm"},lg:{root:"text-sm"},xl:{root:"text-base"}},required:{true:{label:"after:content-['*'] after:ms-0.5 after:text-error"}},orientation:{vertical:{container:"mt-1"},horizontal:{root:"flex justify-between place-items-baseline gap-2"}}},defaultVariants:{size:"md",orientation:"vertical"}},ho=["id"],vo=["id"],yo=["id"],bo=["id"],Wo={__name:"UFormField",props:{as:{type:null,required:!1},name:{type:String,required:!1},errorPattern:{type:null,required:!1},label:{type:String,required:!1},description:{type:String,required:!1},help:{type:String,required:!1},error:{type:[Boolean,String],required:!1,default:void 0},hint:{type:String,required:!1},size:{type:null,required:!1},required:{type:Boolean,required:!1},eagerValidation:{type:Boolean,required:!1},validateOnInputDelay:{type:Number,required:!1},orientation:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},setup(e){const t=e,a=rt(),n=it(),r=ot("formField",t),s=D(()=>Ce({extend:Ce(mo),...n.ui?.formField||{}})({size:t.size,required:t.required,orientation:t.orientation})),i=yt(bn,null),o=D(()=>t.error||i?.value?.find(u=>u.name===t.name||t.errorPattern&&u.name?.match(t.errorPattern))?.message),c=L(wa()),f=c.value,d=yt(wn,void 0);return ye(c,()=>{d&&t.name&&(d.value[t.name]={id:c.value,pattern:t.errorPattern})},{immediate:!0}),Kt(xn,c),Kt(_n,D(()=>({error:o.value,name:t.name,size:t.size,eagerValidation:t.eagerValidation,validateOnInputDelay:t.validateOnInputDelay,errorPattern:t.errorPattern,hint:t.hint,description:t.description,help:t.help,ariaId:f}))),(u,p)=>(w(),O(l(Z),{as:e.as,"data-orientation":e.orientation,"data-slot":"root",class:$(s.value.root({class:[l(r)?.root,t.class]}))},{default:z(()=>[Y("div",{"data-slot":"wrapper",class:$(s.value.wrapper({class:l(r)?.wrapper}))},[e.label||a.label?(w(),R("div",{key:0,"data-slot":"labelWrapper",class:$(s.value.labelWrapper({class:l(r)?.labelWrapper}))},[G(l(Ea),{for:c.value,"data-slot":"label",class:$(s.value.label({class:l(r)?.label}))},{default:z(()=>[E(u.$slots,"label",{label:e.label},()=>[se(K(e.label),1)])]),_:3},8,["for","class"]),e.hint||a.hint?(w(),R("span",{key:0,id:`${l(f)}-hint`,"data-slot":"hint",class:$(s.value.hint({class:l(r)?.hint}))},[E(u.$slots,"hint",{hint:e.hint},()=>[se(K(e.hint),1)])],10,ho)):F("",!0)],2)):F("",!0),e.description||a.description?(w(),R("p",{key:1,id:`${l(f)}-description`,"data-slot":"description",class:$(s.value.description({class:l(r)?.description}))},[E(u.$slots,"description",{description:e.description},()=>[se(K(e.description),1)])],10,vo)):F("",!0)],2),Y("div",{class:$([(e.label||!!a.label||e.description||!!a.description)&&s.value.container({class:l(r)?.container})])},[E(u.$slots,"default",{error:o.value}),t.error!==!1&&(typeof o.value=="string"&&o.value||a.error)?(w(),R("div",{key:0,id:`${l(f)}-error`,"data-slot":"error",class:$(s.value.error({class:l(r)?.error}))},[E(u.$slots,"error",{error:o.value},()=>[se(K(o.value),1)])],10,yo)):e.help||a.help?(w(),R("div",{key:1,id:`${l(f)}-help`,"data-slot":"help",class:$(s.value.help({class:l(r)?.help}))},[E(u.$slots,"help",{help:e.help},()=>[se(K(e.help),1)])],10,bo)):F("",!0)],2)]),_:3},8,["as","data-orientation","class"]))}},wo={class:"space-y-2"},xo={key:0,class:"text-sm text-muted py-2"},_o={key:1,class:"text-sm text-red-600 py-2"},So={key:2,class:"text-sm text-muted py-2"},qo=["onClick"],Co={class:"min-w-0"},Ao={class:"text-sm font-semibold"},ko={class:"text-xs text-muted ml-2 font-normal"},Po={key:0,class:"block text-xs text-muted mt-0.5"},Io={key:0,class:"border-t border-[var(--ui-border)]"},Bo={class:"ml-4 border-l-2 border-[var(--ui-border)]"},Do={class:"min-w-0 flex-1"},Oo={class:"flex items-center gap-2 flex-wrap"},To={class:"text-sm font-medium"},zo={key:0,class:"text-[10px] text-muted italic"},Eo={class:"text-xs text-muted mt-0.5 leading-snug"},$o={class:"text-[10px] font-mono text-muted/60 mt-0.5"},Ro=W({__name:"IntegrationToolsTree",props:{integrationType:{},integrationId:{},maxScope:{},enabledToolsets:{},disabledTools:{}},emits:["update:enabledToolsets","update:disabledTools"],setup(e,{expose:t,emit:a}){const n=e,r=a,s=L([]),i=L([]),o=L(!0),c=L(!1),f=L(""),d=L(new Set),u=D(()=>{if(s.value.length)return s.value;const v=Array.from(new Set(i.value.map(x=>x.toolset).filter(x=>!!x))).sort((x,k)=>x.localeCompare(k));return!v.length&&i.value.length?[{key:"__all__",label:"All tools",description:""}]:v.map(x=>({key:x,label:x,description:""}))});function p(v){return v==="read"?"bg-blue-50 text-blue-600 dark:bg-blue-950 dark:text-blue-400":v==="write"?"bg-amber-50 text-amber-600 dark:bg-amber-950 dark:text-amber-400":"bg-red-50 text-red-600 dark:bg-red-950 dark:text-red-400"}function h(v){return v==="__all__"?S("__all__").some(x=>!n.disabledTools.includes(x.name)):n.enabledToolsets.includes(v)}function g(v){return!n.disabledTools.includes(v)}function y(v){return n.maxScope==="read"&&v.scope!=="read"}function S(v){return v==="__all__"?i.value:i.value.filter(x=>x.toolset===v)}function C(v){return S(v).filter(x=>!(y(x)||n.disabledTools.includes(x.name))).length}function A(v,x){if(v==="__all__"){const B=S("__all__").map(T=>T.name),j=n.disabledTools.filter(T=>!B.includes(T));r("update:disabledTools",x?j:[...j,...B]);return}const k=[...n.enabledToolsets];if(x)k.includes(v)||k.push(v);else if(k.length>1){const B=k.indexOf(v);B>=0&&k.splice(B,1)}r("update:enabledToolsets",k)}function q(v,x){const k=[...n.disabledTools];if(x){const B=k.indexOf(v);B>=0&&k.splice(B,1)}else k.includes(v)||k.push(v);r("update:disabledTools",k)}function m(v){const x=new Set(d.value);x.has(v)?x.delete(v):x.add(v),d.value=x}async function b(){o.value=!0,c.value=!1;try{if(!n.integrationId&&!n.integrationType){s.value=[],i.value=[];return}const[v,x]=await(n.integrationId?Promise.all([$fetch(`/api/integrations/${n.integrationId}/toolsets`),$fetch(`/api/integrations/${n.integrationId}/tools`)]):Promise.all([$fetch(`/api/catalog/${n.integrationType}/toolsets`),$fetch(`/api/catalog/${n.integrationType}/tools`)]));s.value=Object.entries(v||{}).map(([k,B])=>({key:k,label:B.label,description:B.description})).sort((k,B)=>k.key.localeCompare(B.key)),i.value=x||[],u.value.length&&(d.value=new Set([u.value[0].key]))}catch{c.value=!0}finally{o.value=!1}}async function _(v){if(!(!n.integrationId||!v||f.value)&&window.confirm(`Delete custom tool "${v}"? This cannot be undone.`)){f.value=v;try{await $fetch(`/api/integrations/${n.integrationId}/tools`,{method:"DELETE",body:{name:v}}),r("update:disabledTools",n.disabledTools.filter(x=>x!==v)),await b()}finally{f.value=""}}}return t({toolsets:u}),b(),(v,x)=>{const k=po,B=he,j=Sn;return w(),R("div",wo,[l(o)?(w(),R("div",xo," Loading tools… ")):l(c)?(w(),R("div",_o," Failed to load tools. ")):l(u).length?(w(!0),R(oe,{key:3},De(l(u),T=>(w(),R("div",{key:T.key,class:$(["rounded-lg overflow-hidden border border-[var(--ui-border)]",h(T.key)?"":"opacity-50"])},[Y("div",{class:$(["flex items-center gap-3 px-3 py-2.5 bg-[var(--ui-bg-elevated)] border-l-4",h(T.key)?"border-l-primary":"border-l-transparent"])},[G(k,{"model-value":h(T.key),size:"sm","onUpdate:modelValue":M=>A(T.key,M)},null,8,["model-value","onUpdate:modelValue"]),Y("button",{type:"button",class:"flex-1 flex items-center justify-between min-w-0 text-left",onClick:M=>m(T.key)},[Y("div",Co,[Y("span",Ao,K(T.label),1),Y("span",ko,K(C(T.key))+"/"+K(S(T.key).length)+" active ",1),T.description?(w(),R("span",Po,K(T.description),1)):F("",!0)]),G(B,{name:l(d).has(T.key)?"i-lucide-chevron-up":"i-lucide-chevron-down",class:"text-muted shrink-0 ml-2"},null,8,["name"])],8,qo)],2),l(d).has(T.key)?(w(),R("div",Io,[Y("div",Bo,[(w(!0),R(oe,null,De(S(T.key),M=>(w(),R("div",{key:M.name,class:$(["flex items-start gap-3 px-4 py-2.5 border-b border-[var(--ui-border)] last:border-b-0",y(M)?"opacity-40":""])},[G(k,{"model-value":g(M.name),disabled:y(M)||!h(T.key),size:"xs",class:"mt-0.5 shrink-0","onUpdate:modelValue":I=>q(M.name,I)},null,8,["model-value","disabled","onUpdate:modelValue"]),Y("div",Do,[Y("div",Oo,[Y("span",To,K(M.displayName),1),Y("span",{class:$(["text-[10px] px-1.5 py-0.5 rounded font-medium leading-tight",p(M.scope)])},K(M.scope),3),y(M)?(w(),R("span",zo," hidden by read-only ")):F("",!0)]),Y("p",Eo,K(M.description),1),Y("p",$o,K(M.name),1)]),M.custom&&n.integrationId?(w(),O(j,{key:0,size:"xs",variant:"soft",color:"error",icon:"i-lucide-trash-2",loading:l(f)===M.name,onClick:I=>_(M.name)},{default:z(()=>[...x[0]||(x[0]=[se(" Delete ",-1)])]),_:1},8,["loading","onClick"])):F("",!0)],2))),128))])])):F("",!0)],2))),128)):(w(),R("div",So," No tools available for this integration. "))])}}}),jo=Object.assign(Ro,{__name:"IntegrationToolsTree"});function Ho(e,t,a){const[n={},r]=typeof t=="string"?[{},t]:[t,a],s=D(()=>me(e)),i=D(()=>me(n.key)||"$f"+Re([r,typeof s.value=="string"?s.value:"",...Lo(n)]));if(!n.baseURL&&typeof s.value=="string"&&s.value[0]==="/"&&s.value[1]==="/")throw new Error('[nuxt] [useFetch] the request URL must not start with "//".');const{server:o,lazy:c,default:f,transform:d,pick:u,watch:p,immediate:h,getCachedData:g,deep:y,dedupe:S,timeout:C,...A}=n,q=xa({...qn,...A,cache:typeof n.cache=="boolean"?void 0:n.cache}),m={server:o,lazy:c,default:f,transform:d,pick:u,immediate:h,getCachedData:g,deep:y,dedupe:S,timeout:C,watch:p===!1?[]:[...p||[],q]};return io(p===!1?i.value:i,(_,{signal:v})=>(n.$fetch||globalThis.$fetch)(s.value,{signal:v,...q}),m)}function Lo(e){const t=[me(e.method)?.toUpperCase()||"GET",me(e.baseURL)];for(const a of[e.query||e.params]){const n=me(a);if(!n)continue;const r={};for(const[s,i]of Object.entries(n))r[me(s)]=me(i);t.push(r)}if(e.body){const a=me(e.body);if(!a)t.push(Re(a));else if(a instanceof ArrayBuffer)t.push(Re(Object.fromEntries([...new Uint8Array(a).entries()].map(([n,r])=>[n,r.toString()]))));else if(a instanceof FormData){const n={};for(const r of a.entries()){const[s,i]=r;n[s]=i instanceof File?i.name:i}t.push(Re(n))}else if(Cn(a))t.push(Re(xa(a)));else try{t.push(Re(a))}catch{console.warn("[useFetch] Failed to hash body",a)}}return t}export{Wo as _,No as a,Fo as b,po as c,jo as d,Ho as u};
@@ -1 +0,0 @@
1
- .hint-markdown[data-v-f235dc98] p{margin-bottom:.5rem}.hint-markdown[data-v-f235dc98] p:last-child{margin-bottom:0}.hint-markdown[data-v-f235dc98] ol,.hint-markdown[data-v-f235dc98] ul{margin-bottom:.5rem;padding-left:1.25rem}.hint-markdown[data-v-f235dc98] ul{list-style-type:disc}.hint-markdown[data-v-f235dc98] ol{list-style-type:decimal}.hint-markdown[data-v-f235dc98] li{margin-bottom:.2rem}.hint-markdown[data-v-f235dc98] code{background-color:#00000014;border-radius:3px;font-family:ui-monospace,monospace;font-size:.8em;padding:.1em .3em}.dark .hint-markdown[data-v-f235dc98] code{background-color:#ffffff1a}.hint-markdown[data-v-f235dc98] strong{font-weight:600}.hint-markdown[data-v-f235dc98] a{color:var(--ui-primary);text-decoration:underline}
@@ -1 +0,0 @@
1
- {"id":"87720575-dfd4-475f-92c1-554fcd8b22f1","timestamp":1772989134905,"prerendered":[]}
@@ -1,8 +0,0 @@
1
- const IntegrationCredentials_vue_vue_type_style_index_0_scoped_f235dc98_lang = ".hint-markdown[data-v-f235dc98] p{margin-bottom:.5rem}.hint-markdown[data-v-f235dc98] p:last-child{margin-bottom:0}.hint-markdown[data-v-f235dc98] ol,.hint-markdown[data-v-f235dc98] ul{margin-bottom:.5rem;padding-left:1.25rem}.hint-markdown[data-v-f235dc98] ul{list-style-type:disc}.hint-markdown[data-v-f235dc98] ol{list-style-type:decimal}.hint-markdown[data-v-f235dc98] li{margin-bottom:.2rem}.hint-markdown[data-v-f235dc98] code{background-color:#00000014;border-radius:3px;font-family:ui-monospace,monospace;font-size:.8em;padding:.1em .3em}.dark .hint-markdown[data-v-f235dc98] code{background-color:#ffffff1a}.hint-markdown[data-v-f235dc98] strong{font-weight:600}.hint-markdown[data-v-f235dc98] a{color:var(--ui-primary);text-decoration:underline}";
2
-
3
- const IntegrationCredentialsStyles_CULcCK6_ = [
4
- IntegrationCredentials_vue_vue_type_style_index_0_scoped_f235dc98_lang
5
- ];
6
-
7
- export { IntegrationCredentialsStyles_CULcCK6_ as default };
8
- //# sourceMappingURL=IntegrationCredentials-styles.CULcCK6_.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IntegrationCredentials-styles.CULcCK6_.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/IntegrationCredentials-styles-1.mjs-qAFC97gU.js","../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/IntegrationCredentials-styles.CULcCK6_.mjs"],"names":["style_0"],"mappings":"","x_google_ignoreList":[0,1]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"error-404-D2QibUBT.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/error-404-D2QibUBT.js"],"names":["__nuxt_component_0"],"mappings":"","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"error-500-DYvawybF.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/error-500-DYvawybF.js"],"names":[],"mappings":"","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"fetch-BmYZnj75.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/fetch-BmYZnj75.js"],"names":["_sfc_main$5","_sfc_main$6","_sfc_main$7","_sfc_main$8"],"mappings":"","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-5H-nmhph.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/index-5H-nmhph.js"],"names":[],"mappings":"","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-CL-Gkd-Y.mjs","sources":["../../../../node_modules/.cache/nuxt/.nuxt/dist/server/_nuxt/index-CL-Gkd-Y.js"],"names":["_sfc_main$2","_sfc_main$4","_sfc_main$5","_sfc_main$3","_sfc_main$6","__nuxt_component_0","_sfc_main$7","_sfc_main$8","_sfc_main$9"],"mappings":"","x_google_ignoreList":[0]}