chatlab-cli 0.29.0 → 0.30.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chat-command-JKG3FY5B.mjs → chat-command-VBDMWOKL.mjs} +8 -8
- package/dist/{chunk-6FPEP2ZX.mjs → chunk-326OCJOT.mjs} +2 -2
- package/dist/{chunk-QQK7MLCR.mjs → chunk-36JGKW6K.mjs} +710 -282
- package/dist/chunk-36JGKW6K.mjs.map +1 -0
- package/dist/{chunk-SKUG5XVD.mjs → chunk-5EE2EFPE.mjs} +5 -4
- package/dist/{chunk-KL2NGIMQ.mjs → chunk-D3DPCDII.mjs} +444 -274
- package/dist/chunk-D3DPCDII.mjs.map +1 -0
- package/dist/{chunk-I35WHWA6.mjs → chunk-KBSAVUFV.mjs} +7 -4
- package/dist/chunk-KBSAVUFV.mjs.map +1 -0
- package/dist/{chunk-WPI6YSAR.mjs → chunk-LVEJHB3X.mjs} +4570 -4412
- package/dist/chunk-LVEJHB3X.mjs.map +1 -0
- package/dist/chunk-M2PXDX4G.mjs +2325 -0
- package/dist/chunk-M2PXDX4G.mjs.map +1 -0
- package/dist/{chunk-CIB23U32.mjs → chunk-TCZHG3G7.mjs} +101 -41
- package/dist/chunk-TCZHG3G7.mjs.map +1 -0
- package/dist/{chunk-D4WTE7LV.mjs → chunk-TEX44HNL.mjs} +16 -12
- package/dist/chunk-TEX44HNL.mjs.map +1 -0
- package/dist/{chunk-7RW4CQAO.mjs → chunk-ULNRUS55.mjs} +5 -3
- package/dist/chunk-ULNRUS55.mjs.map +1 -0
- package/dist/{chunk-2MZ6G4AC.mjs → chunk-WV5GSRQM.mjs} +2 -2
- package/dist/cli.mjs +7 -7
- package/dist/contacts-worker.mjs +2 -2
- package/dist/{http-5E7ARYFW.mjs → http-L4AMELPZ.mjs} +11 -11
- package/dist/{import-3KG6VK6O.mjs → import-WWCSXGVS.mjs} +7 -7
- package/dist/index.mjs +11 -11
- package/dist/{mcp-JBI4CUQT.mjs → mcp-A4M3LT5O.mjs} +8 -8
- package/dist/people-relationships-worker.mjs +2 -2
- package/dist/semantic-index-worker.mjs +1 -1
- package/dist/{src-UTBQAOJ3.mjs → src-MPNBTFOE.mjs} +14 -6
- package/dist/{stream-import-7HZ4IRYJ.mjs → stream-import-HIE7PNL4.mjs} +7 -7
- package/dist/{worker-runtime-ALS4MR2A.mjs → worker-runtime-BJXO24XX.mjs} +5 -5
- package/dist-web/assets/{BufferResource-MsqP5sq3.js → BufferResource-DPkMC1wo.js} +1 -1
- package/dist-web/assets/CanvasRenderer-DokMtSX9.js +1 -0
- package/dist-web/assets/DebugToolsPanel.vue_vue_type_script_setup_true_lang-Ceg-0WOD.js +110 -0
- package/dist-web/assets/{Filter-wRJtdXx9.js → Filter-Bo_p3BVX.js} +1 -1
- package/dist-web/assets/LoadingState.vue_vue_type_script_setup_true_lang-D_dJuLWJ.js +1 -0
- package/dist-web/assets/{MessageExportModal-BCrMf5Kw.js → MessageExportModal-Ch0tqQix.js} +1 -1
- package/dist-web/assets/{PageHeader-C_yw54le.js → PageHeader-CRlmZoKw.js} +1 -1
- package/dist-web/assets/{RelationshipGalaxyCanvas-DTzJq7q7.js → RelationshipGalaxyCanvas-W_6XfPOG.js} +3 -3
- package/dist-web/assets/{RelationshipGalaxyThreeCanvas-DIE-0_iM.js → RelationshipGalaxyThreeCanvas-bB1nCwQ_.js} +1 -1
- package/dist-web/assets/{RenderTargetSystem-BSAQFamI.js → RenderTargetSystem-obRi6fMT.js} +1 -1
- package/dist-web/assets/{WebGLRenderer-lfzmCZNT.js → WebGLRenderer-xcDlnrCZ.js} +1 -1
- package/dist-web/assets/{WebGPURenderer-BnEdfdr_.js → WebGPURenderer-DbAOiiYr.js} +1 -1
- package/dist-web/assets/{browserAll-gRNfDyPu.js → browserAll-DVRJimO8.js} +1 -1
- package/dist-web/assets/electron-BSGRuxX9.js +1 -0
- package/dist-web/assets/{fetch-BW3aO7PS.js → fetch-7UN4YW3A.js} +1 -1
- package/dist-web/assets/{fetch-CQt-gb-f.js → fetch-B2alAySK.js} +1 -1
- package/dist-web/assets/fetch-B2rVTMYY.js +17 -0
- package/dist-web/assets/{fetch-C1fI_KOX.js → fetch-BSShKcMt.js} +1 -1
- package/dist-web/assets/{fetch-mFlEBZyB.js → fetch-BmxMf3I6.js} +1 -1
- package/dist-web/assets/{fetch-BwF5hNuF.js → fetch-CR5UDFW7.js} +1 -1
- package/dist-web/assets/{fetch-CFRoSIAn.js → fetch-ChAsglT5.js} +1 -1
- package/dist-web/assets/{fetch-CN91TIwV.js → fetch-DWEjTdcP.js} +1 -1
- package/dist-web/assets/{fetch-DPCJ-1l-.js → fetch-DfoxedXR.js} +1 -1
- package/dist-web/assets/{fetch-gMB4wuBd.js → fetch-t0WsRKHW.js} +1 -1
- package/dist-web/assets/index-B4l3rHie.css +1 -0
- package/dist-web/assets/{index-ZdCB7xcf.js → index-BVUTV9_w.js} +4 -4
- package/dist-web/assets/index-BmXNdMV5.js +2 -0
- package/dist-web/assets/index-BsXljrlg.js +22 -0
- package/dist-web/assets/{index-MBRD3wPd.css → index-C1p9CbmN.css} +1 -1
- package/dist-web/assets/index-COpza1A4.css +1 -0
- package/dist-web/assets/index-CQ5lRCHt.js +173 -0
- package/dist-web/assets/index-CZv0ZOID.js +2 -0
- package/dist-web/assets/{index-DveHdPfK.js → index-CfgDqd_z.js} +1 -1
- package/dist-web/assets/{index-Bg4GGPXv.js → index-CtVR_KuP.js} +1 -1
- package/dist-web/assets/index-DT0Bu8mH.js +64 -0
- package/dist-web/assets/index-DjcWJv4b.js +1 -0
- package/dist-web/assets/{vendor-nuxt-ui-Dr2T8_OZ.js → vendor-nuxt-ui-DaLxYaC4.js} +1 -1
- package/dist-web/assets/{web-BakeV58u.js → web-knHSvvNj.js} +1 -1
- package/dist-web/assets/{webworkerAll-D_6PgURS.js → webworkerAll-CMKoykfD.js} +1 -1
- package/dist-web/index.html +3 -3
- package/package.json +1 -1
- package/dist/chunk-7RW4CQAO.mjs.map +0 -1
- package/dist/chunk-ARZM6HBX.mjs +0 -542
- package/dist/chunk-ARZM6HBX.mjs.map +0 -1
- package/dist/chunk-CIB23U32.mjs.map +0 -1
- package/dist/chunk-D4WTE7LV.mjs.map +0 -1
- package/dist/chunk-I35WHWA6.mjs.map +0 -1
- package/dist/chunk-KL2NGIMQ.mjs.map +0 -1
- package/dist/chunk-QQK7MLCR.mjs.map +0 -1
- package/dist/chunk-WPI6YSAR.mjs.map +0 -1
- package/dist-web/assets/CanvasRenderer-BKCvcc2p.js +0 -1
- package/dist-web/assets/DebugToolsPanel.vue_vue_type_script_setup_true_lang-HGJb0Et1.js +0 -110
- package/dist-web/assets/electron-BHaEaaZP.js +0 -1
- package/dist-web/assets/fetch-CBZbgZqk.js +0 -17
- package/dist-web/assets/index--6C0sK6a.css +0 -1
- package/dist-web/assets/index-B6wEGata.js +0 -173
- package/dist-web/assets/index-BgVbj5qX.js +0 -12
- package/dist-web/assets/index-BkoXaBV_.js +0 -64
- package/dist-web/assets/index-C56IuV5U.css +0 -1
- package/dist-web/assets/index-CLRaKwpT.js +0 -2
- package/dist-web/assets/index-Dj1BSD7O.js +0 -1
- package/dist-web/assets/index-RoDgJcHU.js +0 -2
- package/dist-web/assets/index-aljYO5ms.js +0 -1
- /package/dist/{chat-command-JKG3FY5B.mjs.map → chat-command-VBDMWOKL.mjs.map} +0 -0
- /package/dist/{chunk-6FPEP2ZX.mjs.map → chunk-326OCJOT.mjs.map} +0 -0
- /package/dist/{chunk-SKUG5XVD.mjs.map → chunk-5EE2EFPE.mjs.map} +0 -0
- /package/dist/{chunk-2MZ6G4AC.mjs.map → chunk-WV5GSRQM.mjs.map} +0 -0
- /package/dist/{http-5E7ARYFW.mjs.map → http-L4AMELPZ.mjs.map} +0 -0
- /package/dist/{import-3KG6VK6O.mjs.map → import-WWCSXGVS.mjs.map} +0 -0
- /package/dist/{mcp-JBI4CUQT.mjs.map → mcp-A4M3LT5O.mjs.map} +0 -0
- /package/dist/{src-UTBQAOJ3.mjs.map → src-MPNBTFOE.mjs.map} +0 -0
- /package/dist/{stream-import-7HZ4IRYJ.mjs.map → stream-import-HIE7PNL4.mjs.map} +0 -0
- /package/dist/{worker-runtime-ALS4MR2A.mjs.map → worker-runtime-BJXO24XX.mjs.map} +0 -0
|
@@ -12,4 +12,4 @@ import{e as ps,i as Ut,r as Pt,u as o,g as Mi,o as vs,t as he,a as Di,c as ms,b
|
|
|
12
12
|
${Object.keys(i).map(s=>Li(s,400)).join(`
|
|
13
13
|
`)}
|
|
14
14
|
}
|
|
15
|
-
}`}),a={style:[{innerHTML:()=>t.value,tagPriority:-2,id:"nuxt-ui-colors"}]};{const n=document.createElement("style");n.innerHTML=t.value,n.setAttribute("data-nuxt-ui-colors",""),document.head.appendChild(n),a.script=[{innerHTML:"document.head.removeChild(document.querySelector('[data-nuxt-ui-colors]'))"}]}ec(a)}),bp={install(){bo()}},Dg={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"}},Vg=["id"],jg=["id"],Fg=["id"],Hg=["id"],yp={__name:"FormField",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:null,required:!1}},setup(e){const t=e,a=Be(),n=we(),i=T(()=>X({extend:X(Dg),...n.ui?.formField||{}})({size:t.size,required:t.required,orientation:t.orientation})),r=Le(zf,null),s=T(()=>t.error||r?.value?.find(p=>p.name===t.name||t.errorPattern&&p.name?.match(t.errorPattern))?.message),l=ie(Ta()),c=l.value,d=Le(kf,void 0);return Ge(l,()=>{d&&t.name&&(d.value[t.name]={id:l.value,pattern:t.errorPattern})},{immediate:!0}),nt(as,l),nt(hn,T(()=>({error:s.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:c}))),(p,f)=>(m(),z(o(Xe),{as:e.as,"data-orientation":e.orientation,"data-slot":"root",class:w(i.value.root({class:[t.ui?.root,t.class]}))},{default:q(()=>[$e("div",{"data-slot":"wrapper",class:w(i.value.wrapper({class:t.ui?.wrapper}))},[e.label||a.label?(m(),j("div",{key:0,"data-slot":"labelWrapper",class:w(i.value.labelWrapper({class:t.ui?.labelWrapper}))},[F(o(ya),{for:l.value,"data-slot":"label",class:w(i.value.label({class:t.ui?.label}))},{default:q(()=>[A(p.$slots,"label",{label:e.label},()=>[ce(ee(e.label),1)])]),_:3},8,["for","class"]),e.hint||a.hint?(m(),j("span",{key:0,id:`${o(c)}-hint`,"data-slot":"hint",class:w(i.value.hint({class:t.ui?.hint}))},[A(p.$slots,"hint",{hint:e.hint},()=>[ce(ee(e.hint),1)])],10,Vg)):P("",!0)],2)):P("",!0),e.description||a.description?(m(),j("p",{key:1,id:`${o(c)}-description`,"data-slot":"description",class:w(i.value.description({class:t.ui?.description}))},[A(p.$slots,"description",{description:e.description},()=>[ce(ee(e.description),1)])],10,jg)):P("",!0)],2),$e("div",{class:w([(e.label||!!a.label||e.description||!!a.description)&&i.value.container({class:t.ui?.container})])},[A(p.$slots,"default",{error:s.value}),t.error!==!1&&(typeof s.value=="string"&&s.value||a.error)?(m(),j("div",{key:0,id:`${o(c)}-error`,"data-slot":"error",class:w(i.value.error({class:t.ui?.error}))},[A(p.$slots,"error",{error:s.value},()=>[ce(ee(s.value),1)])],10,Fg)):e.help||a.help?(m(),j("div",{key:1,id:`${o(c)}-help`,"data-slot":"help",class:w(i.value.help({class:t.ui?.help}))},[A(p.$slots,"help",{help:e.help},()=>[ce(ee(e.help),1)])],10,Hg)):P("",!0)],2)]),_:3},8,["as","data-orientation","class"]))}},Gg={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 start-0 flex items-start",leadingIcon:"shrink-0 text-dimmed",leadingAvatar:"shrink-0",leadingAvatarSize:"",trailing:"absolute end-0 flex items-start",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-xs gap-1",leading:"ps-2 inset-y-1",trailing:"pe-2 inset-y-1",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4"},sm:{base:"px-2.5 py-1.5 text-xs gap-1.5",leading:"ps-2.5 inset-y-1.5",trailing:"pe-2.5 inset-y-1.5",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4"},md:{base:"px-2.5 py-1.5 text-sm gap-1.5",leading:"ps-2.5 inset-y-1.5",trailing:"pe-2.5 inset-y-1.5",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5"},lg:{base:"px-3 py-2 text-sm gap-2",leading:"ps-3 inset-y-2",trailing:"pe-3 inset-y-2",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5"},xl:{base:"px-3 py-2 text-base gap-2",leading:"ps-3 inset-y-2",trailing:"pe-3 inset-y-2",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:""},type:{file:"file:me-1.5 file:font-medium file:text-muted file:outline-none"},autoresize:{true:{base:"resize-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"}}],defaultVariants:{size:"md",color:"primary",variant:"outline"}},Kg=["id","value","name","rows","placeholder","disabled","required"],xp=Object.assign({inheritAttrs:!1},{__name:"Textarea",props:{as:{type:null,required:!1},id:{type:String,required:!1},name:{type:String,required:!1},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},autofocus:{type:Boolean,required:!1},autofocusDelay:{type:Number,required:!1,default:0},autoresize:{type:Boolean,required:!1},autoresizeDelay:{type:Number,required:!1,default:0},disabled:{type:Boolean,required:!1},rows:{type:Number,required:!1,default:3},maxrows:{type:Number,required:!1,default:0},highlight:{type:Boolean,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},modelModifiers:{type:Object,required:!1},class:{type:null,required:!1},ui:{type:null,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(e,{expose:t,emit:a}){const n=e,i=a,r=Be(),s=Sn(n,"modelValue",i,{defaultValue:n.defaultValue}),l=we(),{emitFormFocus:c,emitFormBlur:d,emitFormInput:p,emitFormChange:f,size:u,color:g,id:h,name:v,highlight:b,disabled:x,ariaAttrs:y}=gt(n,{deferInputValidation:!0}),{isLeading:k,isTrailing:S,leadingIconName:O,trailingIconName:R}=qt(n),N=T(()=>X({extend:X(Gg),...l.ui?.textarea||{}})({color:g.value,variant:n.variant,size:u?.value,loading:n.loading,highlight:b.value,autoresize:n.autoresize,leading:k.value||!!n.avatar||!!r.leading,trailing:S.value||!!r.trailing})),D=ft("textareaRef");function Z(L){n.modelModifiers?.trim&&(L=L?.trim()??null),n.modelModifiers?.number&&(L=Oa(L)),n.modelModifiers?.nullable&&(L||=null),n.modelModifiers?.optional&&(L||=void 0),s.value=L,p()}function U(L){M(),n.modelModifiers?.lazy||Z(L.target.value)}function le(L){const $=L.target.value;n.modelModifiers?.lazy&&Z($),n.modelModifiers?.trim&&(L.target.value=$.trim()),f(),i("change",L)}function ne(L){d(),i("blur",L)}function Y(){n.autofocus&&D.value?.focus()}function M(){if(n.autoresize&&D.value){D.value.rows=n.rows;const L=D.value.style.overflow;D.value.style.overflow="hidden";const $=window.getComputedStyle(D.value),W=Number.parseInt($.paddingTop),E=Number.parseInt($.paddingBottom),pe=W+E,be=Number.parseInt($.lineHeight),{scrollHeight:ue}=D.value,xe=(ue-pe)/be;xe>n.rows&&(D.value.rows=n.maxrows?Math.min(xe,n.maxrows):xe),D.value.style.overflow=L}}return Ge(s,()=>{rt(M)}),Je(()=>{setTimeout(()=>{Y()},n.autofocusDelay),setTimeout(()=>{M()},n.autoresizeDelay)}),t({textareaRef:D}),(L,$)=>(m(),z(o(Xe),{as:e.as,"data-slot":"root",class:w(N.value.root({class:[n.ui?.root,n.class]}))},{default:q(()=>[$e("textarea",H({id:o(h),ref_key:"textareaRef",ref:D,value:o(s),name:o(v),rows:e.rows,placeholder:e.placeholder,"data-slot":"base",class:N.value.base({class:n.ui?.base}),disabled:o(x),required:e.required},{...L.$attrs,...o(y)},{onInput:U,onBlur:ne,onChange:le,onFocus:$[0]||($[0]=(...W)=>o(c)&&o(c)(...W))}),null,16,Kg),A(L.$slots,"default",{ui:N.value}),o(k)||e.avatar||r.leading?(m(),j("span",{key:0,"data-slot":"leading",class:w(N.value.leading({class:n.ui?.leading}))},[A(L.$slots,"leading",{ui:N.value},()=>[o(k)&&o(O)?(m(),z(ye,{key:0,name:o(O),"data-slot":"leadingIcon",class:w(N.value.leadingIcon({class:n.ui?.leadingIcon}))},null,8,["name","class"])):e.avatar?(m(),z(Qe,H({key:1,size:n.ui?.leadingAvatarSize||N.value.leadingAvatarSize()},e.avatar,{"data-slot":"leadingAvatar",class:N.value.leadingAvatar({class:n.ui?.leadingAvatar})}),null,16,["size","class"])):P("",!0)])],2)):P("",!0),o(S)||r.trailing?(m(),j("span",{key:1,"data-slot":"trailing",class:w(N.value.trailing({class:n.ui?.trailing}))},[A(L.$slots,"trailing",{ui:N.value},()=>[o(R)?(m(),z(ye,{key:0,name:o(R),"data-slot":"trailingIcon",class:w(N.value.trailingIcon({class:n.ui?.trailingIcon}))},null,8,["name","class"])):P("",!0)])],2)):P("",!0)]),_:3},8,["as","class"]))}});function Wg(e,t){if(typeof e!="object"||e===null)return!1;const a=ke(e,t);return a!=null&&a!==""}function Ni(e,t){return t?{xs:44,sm:48,md:52,lg:56,xl:60}[e]:{xs:24,sm:28,md:32,lg:36,xl:40}[e]}function Ug(e,t,a,n){const i=Ni(t,!0),r=Ni(t,!1);return n?()=>i:a?s=>Wg(e[s],a)?i:r:()=>r}const Yg={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","origin-(--reka-combobox-content-transform-origin) w-(--reka-combobox-trigger-width)"],viewport:"relative 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",input:"border-b border-default",focusScope:"flex flex-col min-h-0",trailingClear:"p-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]"},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",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:""},type:{file:"file:me-1.5 file:font-medium file:text-muted file:outline-none"},virtualize:{true:{viewport:"p-1 isolate"},false:{viewport:"divide-y divide-default"}}},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"}}],defaultVariants:{size:"md",color:"primary",variant:"outline"}},kp=Object.assign({inheritAttrs:!1},{__name:"SelectMenu",props:dt({id:{type:String,required:!1},placeholder:{type:String,required:!1},searchInput:{type:[Boolean,Object],required:!1,default:!0},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},required:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1},selectedIcon:{type:null,required:!1},clear:{type:[Boolean,Object],required:!1},clearIcon:{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},virtualize:{type:[Boolean,Object],required:!1,default:!1},valueKey:{type:null,required:!1},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:Object,required:!1},multiple:{type:Boolean,required:!1},highlight:{type:Boolean,required:!1},createItem:{type:[Boolean,String,Object],required:!1},filterFields:{type:Array,required:!1},ignoreFilter:{type:Boolean,required:!1},autofocus:{type:Boolean,required:!1},autofocusDelay:{type:Number,required:!1,default:0},class:{type:null,required:!1},ui:{type:null,required:!1},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},resetSearchTermOnBlur:{type:Boolean,required:!1,default:!0},resetSearchTermOnSelect:{type:Boolean,required:!1,default:!0},resetModelValueOnClear:{type:Boolean,required:!1,default:!0},highlightOnHover:{type:Boolean,required:!1},by:{type:[String,Function],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}},{searchTerm:{type:String,default:""},searchTermModifiers:{}}),emits:dt(["update:open","change","blur","focus","create","clear","highlight","update:modelValue"],["update:searchTerm"]),setup(e,{expose:t,emit:a}){const n=e,i=a,r=Be(),s=Xt(e,"searchTerm",{type:String,default:""}),{t:l}=bt(),c=we(),{contains:d}=Rl({sensitivity:"base"}),p=Ke(je(n,"modelValue","defaultValue","open","defaultOpen","required","multiple","resetSearchTermOnBlur","resetSearchTermOnSelect","resetModelValueOnClear","highlightOnHover","by"),i),f=yt(he(()=>n.portal)),u=he(()=>Ze(n.content,{side:"bottom",sideOffset:8,collisionPadding:8,position:"popper"})),g=he(()=>n.arrow),h=T(()=>typeof n.clear=="object"?n.clear:{}),v=he(()=>n.virtualize?Ze(typeof n.virtualize=="boolean"?{}:n.virtualize,{estimateSize:Ug(K.value,E.value||"md",n.descriptionKey,!!r["item-description"])}):!1),b=he(()=>Ze(n.searchInput,{placeholder:l("selectMenu.search"),variant:"none"})),{emitFormBlur:x,emitFormFocus:y,emitFormInput:k,emitFormChange:S,size:O,color:R,id:N,name:D,highlight:Z,disabled:U,ariaAttrs:le}=gt(n),{orientation:ne,size:Y}=It(n),{isLeading:M,isTrailing:L,leadingIconName:$,trailingIconName:W}=qt(he(()=>Ze(n,{trailingIcon:c.ui.icons.chevronDown}))),E=T(()=>Y.value||O.value),[pe,be]=xa(),[ue,xe]=xa({props:{item:{type:[Object,String,Number,Boolean],required:!0},index:{type:Number,required:!1}}}),B=T(()=>X({extend:X(Yg),...c.ui?.selectMenu||{}})({color:R.value,variant:n.variant,size:E?.value,loading:n.loading,highlight:Z.value,leading:M.value||!!n.avatar||!!r.leading,trailing:L.value||!!r.trailing,fieldGroup:ne.value,virtualize:!!n.virtualize}));function de(G){if(n.multiple&&Array.isArray(G)){const oe=G.map(V=>ka(Te.value,V,{labelKey:n.labelKey,valueKey:n.valueKey,by:n.by})).filter(V=>V!=null&&V!=="");return oe.length>0?oe.join(", "):void 0}return ka(Te.value,G,{labelKey:n.labelKey,valueKey:n.valueKey,by:n.by})}const ve=T(()=>n.items?.length?qn(n.items)?n.items:[n.items]:[]),Te=T(()=>ve.value.flatMap(G=>G)),I=T(()=>{if(n.ignoreFilter||!s.value)return ve.value;const G=Array.isArray(n.filterFields)?n.filterFields:[n.labelKey];return ve.value.map(oe=>oe.filter(V=>V==null?!1:typeof V!="object"?d(String(V),s.value):V.type&&["label","separator"].includes(V.type)?!0:G.some(Ce=>{const qe=ke(V,Ce);return qe!=null&&d(String(qe),s.value)}))).filter(oe=>oe.filter(V=>!me(V)||!V.type||!["label","separator"].includes(V.type)).length>0)}),K=T(()=>I.value.flatMap(G=>G)),C=T(()=>{if(!n.createItem||!s.value)return!1;const G=n.valueKey?{[n.valueKey]:s.value}:s.value;return typeof n.createItem=="object"&&n.createItem.when==="always"||n.createItem==="always"?!K.value.find(oe=>rr(oe,G,n.by??n.valueKey)):!K.value.length}),_=T(()=>typeof n.createItem=="object"?n.createItem.position:"bottom"),ae=ft("triggerRef");function ze(){n.autofocus&&ae.value?.$el?.focus({focusVisible:!0})}Je(()=>{setTimeout(()=>{ze()},n.autofocusDelay)});function re(G){if(Qi(n.modelValue)===G)return;n.modelModifiers?.trim&&(G=G?.trim()??null),n.modelModifiers?.number&&(G=Oa(G)),n.modelModifiers?.nullable&&(G??=null),n.modelModifiers?.optional&&(G??=void 0);const oe=new Event("change",{target:{value:G}});i("change",oe),S(),k(),n.resetSearchTermOnSelect&&(s.value="")}function se(G){let oe;if(G){const V=new FocusEvent("focus");i("focus",V),y(),clearTimeout(oe)}else{const V=new FocusEvent("blur");i("blur",V),x(),n.resetSearchTermOnBlur&&(oe=setTimeout(()=>{s.value=""},100))}}function Ae(G){G.preventDefault(),G.stopPropagation(),i("create",s.value)}function st(G,oe){if(me(oe)){if(oe.disabled){G.preventDefault();return}oe.onSelect?.(G)}}function me(G){return typeof G=="object"&&G!==null}function te(G){return n.multiple&&Array.isArray(G)?G.length===0:G==null||G===""}function Oe(){i("clear")}const Re=ft("viewportRef");return t({triggerRef:he(()=>ae.value?.$el),viewportRef:he(()=>Re.value)}),(G,oe)=>(m(),j(ge,null,[F(o(pe),null,{default:q(()=>[F(o(Mn),{"data-slot":"item",class:w(B.value.item({class:n.ui?.item})),value:s.value,onSelect:Ae},{default:q(()=>[$e("span",{"data-slot":"itemLabel",class:w(B.value.itemLabel({class:n.ui?.itemLabel}))},[A(G.$slots,"create-item-label",{item:s.value},()=>[ce(ee(o(l)("selectMenu.create",{label:s.value})),1)])],2)]),_:3},8,["class","value"])]),_:3}),F(o(ue),null,{default:q(({item:V,index:Ce})=>[me(V)&&V.type==="label"?(m(),z(o(yl),{key:0,"data-slot":"label",class:w(B.value.label({class:[n.ui?.label,V.ui?.label,V.class]}))},{default:q(()=>[ce(ee(o(ke)(V,n.labelKey)),1)]),_:2},1032,["class"])):me(V)&&V.type==="separator"?(m(),z(o(xl),{key:1,"data-slot":"separator",class:w(B.value.separator({class:[n.ui?.separator,V.ui?.separator,V.class]}))},null,8,["class"])):(m(),z(o(Mn),{key:2,"data-slot":"item",class:w(B.value.item({class:[n.ui?.item,me(V)&&V.ui?.item,me(V)&&V.class]})),disabled:me(V)&&V.disabled,value:n.valueKey&&me(V)?o(ke)(V,n.valueKey):V,onSelect:qe=>st(qe,V)},{default:q(()=>[A(G.$slots,"item",{item:V,index:Ce,ui:B.value},()=>[A(G.$slots,"item-leading",{item:V,index:Ce,ui:B.value},()=>[me(V)&&V.icon?(m(),z(ye,{key:0,name:V.icon,"data-slot":"itemLeadingIcon",class:w(B.value.itemLeadingIcon({class:[n.ui?.itemLeadingIcon,V.ui?.itemLeadingIcon]}))},null,8,["name","class"])):me(V)&&V.avatar?(m(),z(Qe,H({key:1,size:V.ui?.itemLeadingAvatarSize||n.ui?.itemLeadingAvatarSize||B.value.itemLeadingAvatarSize()},V.avatar,{"data-slot":"itemLeadingAvatar",class:B.value.itemLeadingAvatar({class:[n.ui?.itemLeadingAvatar,V.ui?.itemLeadingAvatar]})}),null,16,["size","class"])):me(V)&&V.chip?(m(),z($n,H({key:2,size:n.ui?.itemLeadingChipSize||B.value.itemLeadingChipSize(),inset:"",standalone:""},V.chip,{"data-slot":"itemLeadingChip",class:B.value.itemLeadingChip({class:[n.ui?.itemLeadingChip,V.ui?.itemLeadingChip]})}),null,16,["size","class"])):P("",!0)]),$e("span",{"data-slot":"itemWrapper",class:w(B.value.itemWrapper({class:[n.ui?.itemWrapper,me(V)&&V.ui?.itemWrapper]}))},[$e("span",{"data-slot":"itemLabel",class:w(B.value.itemLabel({class:[n.ui?.itemLabel,me(V)&&V.ui?.itemLabel]}))},[A(G.$slots,"item-label",{item:V,index:Ce},()=>[ce(ee(me(V)?o(ke)(V,n.labelKey):V),1)])],2),me(V)&&(o(ke)(V,n.descriptionKey)||r["item-description"])?(m(),j("span",{key:0,"data-slot":"itemDescription",class:w(B.value.itemDescription({class:[n.ui?.itemDescription,me(V)&&V.ui?.itemDescription]}))},[A(G.$slots,"item-description",{item:V,index:Ce},()=>[ce(ee(o(ke)(V,n.descriptionKey)),1)])],2)):P("",!0)],2),$e("span",{"data-slot":"itemTrailing",class:w(B.value.itemTrailing({class:[n.ui?.itemTrailing,me(V)&&V.ui?.itemTrailing]}))},[A(G.$slots,"item-trailing",{item:V,index:Ce,ui:B.value}),F(o(kl),{"as-child":""},{default:q(()=>[F(ye,{name:e.selectedIcon||o(c).ui.icons.check,"data-slot":"itemTrailingIcon",class:w(B.value.itemTrailingIcon({class:[n.ui?.itemTrailingIcon,me(V)&&V.ui?.itemTrailingIcon]}))},null,8,["name","class"])]),_:2},1024)],2)])]),_:2},1032,["class","disabled","value","onSelect"]))]),_:3}),F(o($l),H({id:o(N)},{...o(p),...G.$attrs,...o(le)},{"ignore-filter":"","as-child":"",name:o(D),disabled:o(U),"onUpdate:modelValue":re,"onUpdate:open":se}),{default:q(({modelValue:V,open:Ce})=>[F(o(wl),{"as-child":""},{default:q(()=>[F(o(zl),{ref_key:"triggerRef",ref:ae,"data-slot":"base",class:w(B.value.base({class:[n.ui?.base,n.class]})),tabindex:"0"},{default:q(()=>[o(M)||e.avatar||r.leading?(m(),j("span",{key:0,"data-slot":"leading",class:w(B.value.leading({class:n.ui?.leading}))},[A(G.$slots,"leading",{modelValue:V,open:Ce,ui:B.value},()=>[o(M)&&o($)?(m(),z(ye,{key:0,name:o($),"data-slot":"leadingIcon",class:w(B.value.leadingIcon({class:n.ui?.leadingIcon}))},null,8,["name","class"])):e.avatar?(m(),z(Qe,H({key:1,size:n.ui?.itemLeadingAvatarSize||B.value.itemLeadingAvatarSize()},e.avatar,{"data-slot":"itemLeadingAvatar",class:B.value.itemLeadingAvatar({class:n.ui?.itemLeadingAvatar})}),null,16,["size","class"])):P("",!0)])],2)):P("",!0),A(G.$slots,"default",{modelValue:V,open:Ce,ui:B.value},()=>[(m(!0),j(ge,null,Ie([de(V)],qe=>(m(),j(ge,{key:qe},[qe!=null?(m(),j("span",{key:0,"data-slot":"value",class:w(B.value.value({class:n.ui?.value}))},ee(qe),3)):(m(),j("span",{key:1,"data-slot":"placeholder",class:w(B.value.placeholder({class:n.ui?.placeholder}))},ee(e.placeholder??" "),3))],64))),128))]),o(L)||r.trailing||e.clear?(m(),j("span",{key:1,"data-slot":"trailing",class:w(B.value.trailing({class:n.ui?.trailing}))},[A(G.$slots,"trailing",{modelValue:V,open:Ce,ui:B.value},()=>[e.clear&&!te(V)?(m(),z(o(Sl),{key:0,"as-child":""},{default:q(()=>[F(Ye,H({as:"span",icon:e.clearIcon||o(c).ui.icons.close,variant:"link",color:"neutral",tabindex:"-1"},h.value,{"data-slot":"trailingClear",class:B.value.trailingClear({class:n.ui?.trailingClear}),onClick:Ot(Oe,["stop"])}),null,16,["icon","class"])]),_:1})):o(W)?(m(),z(ye,{key:1,name:o(W),"data-slot":"trailingIcon",class:w(B.value.trailingIcon({class:n.ui?.trailingIcon}))},null,8,["name","class"])):P("",!0)])],2)):P("",!0)]),_:2},1032,["class"])]),_:2},1024),F(o(ql),Ne(He(o(f))),{default:q(()=>[F(o(Il),H({"data-slot":"content",class:B.value.content({class:n.ui?.content})},u.value),{default:q(()=>[F(o(Cl),{trapped:"","data-slot":"focusScope",class:w(B.value.focusScope({class:n.ui?.focusScope}))},{default:q(()=>[A(G.$slots,"content-top"),e.searchInput?(m(),z(o(Tl),{key:0,modelValue:s.value,"onUpdate:modelValue":oe[1]||(oe[1]=qe=>s.value=qe),"display-value":()=>s.value,"as-child":""},{default:q(()=>[F(Yf,H({autofocus:"",autocomplete:"off",size:e.size},b.value,{"data-slot":"input",class:B.value.input({class:n.ui?.input}),onChange:oe[0]||(oe[0]=Ot(()=>{},["stop"]))}),null,16,["size","class"])]),_:1},8,["modelValue","display-value"])):P("",!0),F(o(Al),{"data-slot":"empty",class:w(B.value.empty({class:n.ui?.empty}))},{default:q(()=>[A(G.$slots,"empty",{searchTerm:s.value},()=>[ce(ee(s.value?o(l)("selectMenu.noMatch",{searchTerm:s.value}):o(l)("selectMenu.noData")),1)])]),_:3},8,["class"]),$e("div",{ref_key:"viewportRef",ref:Re,role:"presentation","data-slot":"viewport",class:w(B.value.viewport({class:n.ui?.viewport}))},[e.virtualize?(m(),j(ge,{key:0},[C.value&&_.value==="top"?(m(),z(o(be),{key:0})):P("",!0),F(o(Ol),H({options:K.value,"text-content":qe=>me(qe)?o(ke)(qe,n.labelKey):String(qe)},v.value),{default:q(({option:qe,virtualItem:lt})=>[F(o(xe),{item:qe,index:lt.index},null,8,["item","index"])]),_:1},16,["options","text-content"]),C.value&&_.value==="bottom"?(m(),z(o(be),{key:1})):P("",!0)],64)):(m(),j(ge,{key:1},[C.value&&_.value==="top"?(m(),z(o(La),{key:0,"data-slot":"group",class:w(B.value.group({class:n.ui?.group}))},{default:q(()=>[F(o(be))]),_:1},8,["class"])):P("",!0),(m(!0),j(ge,null,Ie(I.value,(qe,lt)=>(m(),z(o(La),{key:`group-${lt}`,"data-slot":"group",class:w(B.value.group({class:n.ui?.group}))},{default:q(()=>[(m(!0),j(ge,null,Ie(qe,(Ct,Dt)=>(m(),z(o(xe),{key:`group-${lt}-${Dt}`,item:Ct,index:Dt},null,8,["item","index"]))),128))]),_:2},1032,["class"]))),128)),C.value&&_.value==="bottom"?(m(),z(o(La),{key:1,"data-slot":"group",class:w(B.value.group({class:n.ui?.group}))},{default:q(()=>[F(o(be))]),_:1},8,["class"])):P("",!0)],64))],2),A(G.$slots,"content-bottom")]),_:3},8,["class"]),e.arrow?(m(),z(o(Pl),H({key:0},g.value,{"data-slot":"arrow",class:B.value.arrow({class:n.ui?.arrow})}),null,16,["class"])):P("",!0)]),_:3},16,["class"])]),_:3},16)]),_:3},16,["id","name","disabled"])],64))}}),_g={slots:{root:["relative inline-flex items-center","flex-wrap"],base:["rounded-md","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",item:'px-1.5 py-0.5 rounded-sm font-medium inline-flex items-center gap-0.5 ring ring-inset ring-accented bg-elevated text-default data-disabled:cursor-not-allowed data-disabled:opacity-75 wrap-anywhere data-[state="active"]:bg-accented',itemText:"",itemDelete:["inline-flex items-center rounded-xs text-dimmed hover:text-default hover:bg-accented/75 disabled:pointer-events-none","transition-colors"],itemDeleteIcon:"shrink-0",input:"flex-1 border-0 bg-transparent placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"},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-xs gap-1",leading:"ps-2",trailing:"pe-2",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4",item:"text-[10px]/3",itemDeleteIcon:"size-3"},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",item:"text-[10px]/3",itemDeleteIcon:"size-3"},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",item:"text-xs",itemDeleteIcon:"size-3.5"},lg:{base:"px-3 py-2 text-sm gap-2",leading:"ps-3",trailing:"pe-3",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5",item:"text-xs",itemDeleteIcon:"size-3.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",item:"text-sm",itemDeleteIcon:"size-4"}},variant:{outline:"text-highlighted bg-default ring ring-inset ring-accented",soft:"text-highlighted bg-elevated/50 hover:bg-elevated has-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 has-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:""},type:{file:"file:me-1.5 file:font-medium file:text-muted file:outline-none"}},compoundVariants:[{color:"primary",variant:["outline","subtle"],class:"has-focus-visible:ring-2 has-focus-visible:ring-inset has-focus-visible:ring-primary"},{color:"secondary",variant:["outline","subtle"],class:"has-focus-visible:ring-2 has-focus-visible:ring-inset has-focus-visible:ring-secondary"},{color:"success",variant:["outline","subtle"],class:"has-focus-visible:ring-2 has-focus-visible:ring-inset has-focus-visible:ring-success"},{color:"info",variant:["outline","subtle"],class:"has-focus-visible:ring-2 has-focus-visible:ring-inset has-focus-visible:ring-info"},{color:"warning",variant:["outline","subtle"],class:"has-focus-visible:ring-2 has-focus-visible:ring-inset has-focus-visible:ring-warning"},{color:"error",variant:["outline","subtle"],class:"has-focus-visible:ring-2 has-focus-visible:ring-inset has-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:"has-focus-visible:ring-2 has-focus-visible:ring-inset has-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"}}],defaultVariants:{size:"md",color:"primary",variant:"outline"}},wp=Object.assign({inheritAttrs:!1},{__name:"InputTags",props:{as:{type:null,required:!1},placeholder:{type:String,required:!1},maxLength:{type:Number,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},autofocus:{type:Boolean,required:!1},autofocusDelay:{type:Number,required:!1,default:0},deleteIcon:{type:null,required:!1},highlight:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},modelValue:{type:[Array,null],required:!1},defaultValue:{type:Array,required:!1},addOnPaste:{type:Boolean,required:!1},addOnTab:{type:Boolean,required:!1},addOnBlur:{type:Boolean,required:!1},duplicate:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},delimiter:{type:null,required:!1},max:{type:Number,required:!1},id:{type:String,required:!1},convertValue:{type:Function,required:!1},displayValue:{type:Function,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},trailingIcon:{type:null,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1}},emits:["change","blur","focus","update:modelValue","invalid","addTag","removeTag"],setup(e,{expose:t,emit:a}){const n=e,i=a,r=Be(),s=we(),l=Ke(je(n,"as","addOnPaste","addOnTab","addOnBlur","duplicate","delimiter","max","convertValue","displayValue","required"),i),{emitFormBlur:c,emitFormFocus:d,emitFormChange:p,emitFormInput:f,size:u,color:g,id:h,name:v,highlight:b,disabled:x,ariaAttrs:y}=gt(n),{orientation:k,size:S}=It(n),{isLeading:O,isTrailing:R,leadingIconName:N,trailingIconName:D}=qt(n),Z=T(()=>S.value||u.value),U=T(()=>X({extend:X(_g),...s.ui?.inputTags||{}})({color:g.value,variant:n.variant,size:Z?.value,loading:n.loading,highlight:b.value,leading:O.value||!!n.avatar||!!r.leading,trailing:R.value||!!r.trailing,fieldGroup:k.value})),le=ft("inputRef");function ne(){n.autofocus&&le.value?.$el?.focus()}Je(()=>{setTimeout(()=>{ne()},n.autofocusDelay)});function Y($){if(Qi(n.modelValue)===$)return;const W=new Event("change",{target:{value:$}});i("change",W),p(),f()}function M($){i("blur",$),c()}function L($){i("focus",$),d()}return t({inputRef:he(()=>le.value?.$el)}),($,W)=>(m(),z(o(Ml),H({id:o(h),"model-value":e.modelValue,"default-value":e.defaultValue,"data-slot":"root",class:U.value.root({class:[U.value.base({class:n.ui?.base}),n.ui?.root,n.class]})},o(l),{name:o(v),disabled:o(x),"onUpdate:modelValue":Y}),{default:q(({modelValue:E})=>[(m(!0),j(ge,null,Ie(E,(pe,be)=>(m(),z(o(El),{key:be,value:pe,"data-slot":"item",class:w(U.value.item({class:[n.ui?.item]}))},{default:q(()=>[F(o(Bl),{"data-slot":"itemText",class:w(U.value.itemText({class:[n.ui?.itemText]}))},{default:q(()=>[r["item-text"]?A($.$slots,"item-text",{key:0,item:pe,index:be,ui:U.value}):P("",!0)]),_:2},1032,["class"]),F(o(Ll),{"data-slot":"itemDelete",class:w(U.value.itemDelete({class:[n.ui?.itemDelete]})),disabled:o(x)},{default:q(()=>[A($.$slots,"item-delete",{item:pe,index:be,ui:U.value},()=>[F(ye,{name:e.deleteIcon||o(s).ui.icons.close,"data-slot":"itemDeleteIcon",class:w(U.value.itemDeleteIcon({class:[n.ui?.itemDeleteIcon]}))},null,8,["name","class"])])]),_:2},1032,["class","disabled"])]),_:2},1032,["value","class"]))),128)),F(o(Nl),H({ref_key:"inputRef",ref:le},{...$.$attrs,...o(y)},{placeholder:e.placeholder,"max-length":e.maxLength,"data-slot":"input",class:U.value.input({class:n.ui?.input}),onBlur:M,onFocus:L}),null,16,["placeholder","max-length","class"]),A($.$slots,"default",{ui:U.value}),o(O)||e.avatar||r.leading?(m(),j("span",{key:0,"data-slot":"leading",class:w(U.value.leading({class:n.ui?.leading}))},[A($.$slots,"leading",{ui:U.value},()=>[o(O)&&o(N)?(m(),z(ye,{key:0,name:o(N),"data-slot":"leadingIcon",class:w(U.value.leadingIcon({class:n.ui?.leadingIcon}))},null,8,["name","class"])):e.avatar?(m(),z(Qe,H({key:1,size:n.ui?.leadingAvatarSize||U.value.leadingAvatarSize()},e.avatar,{"data-slot":"leadingAvatar",class:U.value.leadingAvatar({class:n.ui?.leadingAvatar})}),null,16,["size","class"])):P("",!0)])],2)):P("",!0),o(R)||r.trailing?(m(),j("span",{key:1,"data-slot":"trailing",class:w(U.value.trailing({class:n.ui?.trailing}))},[A($.$slots,"trailing",{ui:U.value},()=>[o(D)?(m(),z(ye,{key:0,name:o(D),"data-slot":"trailingIcon",class:w(U.value.trailingIcon({class:n.ui?.trailingIcon}))},null,8,["name","class"])):P("",!0)])],2)):P("",!0)]),_:3},16,["id","model-value","default-value","class","name","disabled"]))}});export{tp as A,Zg as B,Xg as C,vp as D,mp as E,hp as F,bp as G,Cr as R,yp as _,up as a,Ye as b,Yf as c,fu as d,ye as e,ap as f,du as g,rp as h,Qf as i,lp as j,wp as k,sp as l,Rf as m,ip as n,cp as o,Zf as p,xp as q,np as r,kp as s,op as t,ep as u,gu as v,dp as w,gp as x,pp as y,fp as z};
|
|
15
|
+
}`}),a={style:[{innerHTML:()=>t.value,tagPriority:-2,id:"nuxt-ui-colors"}]};{const n=document.createElement("style");n.innerHTML=t.value,n.setAttribute("data-nuxt-ui-colors",""),document.head.appendChild(n),a.script=[{innerHTML:"document.head.removeChild(document.querySelector('[data-nuxt-ui-colors]'))"}]}ec(a)}),bp={install(){bo()}},Dg={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"}},Vg=["id"],jg=["id"],Fg=["id"],Hg=["id"],yp={__name:"FormField",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:null,required:!1}},setup(e){const t=e,a=Be(),n=we(),i=T(()=>X({extend:X(Dg),...n.ui?.formField||{}})({size:t.size,required:t.required,orientation:t.orientation})),r=Le(zf,null),s=T(()=>t.error||r?.value?.find(p=>p.name===t.name||t.errorPattern&&p.name?.match(t.errorPattern))?.message),l=ie(Ta()),c=l.value,d=Le(kf,void 0);return Ge(l,()=>{d&&t.name&&(d.value[t.name]={id:l.value,pattern:t.errorPattern})},{immediate:!0}),nt(as,l),nt(hn,T(()=>({error:s.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:c}))),(p,f)=>(m(),z(o(Xe),{as:e.as,"data-orientation":e.orientation,"data-slot":"root",class:w(i.value.root({class:[t.ui?.root,t.class]}))},{default:q(()=>[$e("div",{"data-slot":"wrapper",class:w(i.value.wrapper({class:t.ui?.wrapper}))},[e.label||a.label?(m(),j("div",{key:0,"data-slot":"labelWrapper",class:w(i.value.labelWrapper({class:t.ui?.labelWrapper}))},[F(o(ya),{for:l.value,"data-slot":"label",class:w(i.value.label({class:t.ui?.label}))},{default:q(()=>[A(p.$slots,"label",{label:e.label},()=>[ce(ee(e.label),1)])]),_:3},8,["for","class"]),e.hint||a.hint?(m(),j("span",{key:0,id:`${o(c)}-hint`,"data-slot":"hint",class:w(i.value.hint({class:t.ui?.hint}))},[A(p.$slots,"hint",{hint:e.hint},()=>[ce(ee(e.hint),1)])],10,Vg)):P("",!0)],2)):P("",!0),e.description||a.description?(m(),j("p",{key:1,id:`${o(c)}-description`,"data-slot":"description",class:w(i.value.description({class:t.ui?.description}))},[A(p.$slots,"description",{description:e.description},()=>[ce(ee(e.description),1)])],10,jg)):P("",!0)],2),$e("div",{class:w([(e.label||!!a.label||e.description||!!a.description)&&i.value.container({class:t.ui?.container})])},[A(p.$slots,"default",{error:s.value}),t.error!==!1&&(typeof s.value=="string"&&s.value||a.error)?(m(),j("div",{key:0,id:`${o(c)}-error`,"data-slot":"error",class:w(i.value.error({class:t.ui?.error}))},[A(p.$slots,"error",{error:s.value},()=>[ce(ee(s.value),1)])],10,Fg)):e.help||a.help?(m(),j("div",{key:1,id:`${o(c)}-help`,"data-slot":"help",class:w(i.value.help({class:t.ui?.help}))},[A(p.$slots,"help",{help:e.help},()=>[ce(ee(e.help),1)])],10,Hg)):P("",!0)],2)]),_:3},8,["as","data-orientation","class"]))}},Gg={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 start-0 flex items-start",leadingIcon:"shrink-0 text-dimmed",leadingAvatar:"shrink-0",leadingAvatarSize:"",trailing:"absolute end-0 flex items-start",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-xs gap-1",leading:"ps-2 inset-y-1",trailing:"pe-2 inset-y-1",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4"},sm:{base:"px-2.5 py-1.5 text-xs gap-1.5",leading:"ps-2.5 inset-y-1.5",trailing:"pe-2.5 inset-y-1.5",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4"},md:{base:"px-2.5 py-1.5 text-sm gap-1.5",leading:"ps-2.5 inset-y-1.5",trailing:"pe-2.5 inset-y-1.5",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5"},lg:{base:"px-3 py-2 text-sm gap-2",leading:"ps-3 inset-y-2",trailing:"pe-3 inset-y-2",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5"},xl:{base:"px-3 py-2 text-base gap-2",leading:"ps-3 inset-y-2",trailing:"pe-3 inset-y-2",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:""},type:{file:"file:me-1.5 file:font-medium file:text-muted file:outline-none"},autoresize:{true:{base:"resize-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"}}],defaultVariants:{size:"md",color:"primary",variant:"outline"}},Kg=["id","value","name","rows","placeholder","disabled","required"],xp=Object.assign({inheritAttrs:!1},{__name:"Textarea",props:{as:{type:null,required:!1},id:{type:String,required:!1},name:{type:String,required:!1},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},autofocus:{type:Boolean,required:!1},autofocusDelay:{type:Number,required:!1,default:0},autoresize:{type:Boolean,required:!1},autoresizeDelay:{type:Number,required:!1,default:0},disabled:{type:Boolean,required:!1},rows:{type:Number,required:!1,default:3},maxrows:{type:Number,required:!1,default:0},highlight:{type:Boolean,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},modelModifiers:{type:Object,required:!1},class:{type:null,required:!1},ui:{type:null,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(e,{expose:t,emit:a}){const n=e,i=a,r=Be(),s=Sn(n,"modelValue",i,{defaultValue:n.defaultValue}),l=we(),{emitFormFocus:c,emitFormBlur:d,emitFormInput:p,emitFormChange:f,size:u,color:g,id:h,name:v,highlight:b,disabled:x,ariaAttrs:y}=gt(n,{deferInputValidation:!0}),{isLeading:k,isTrailing:S,leadingIconName:O,trailingIconName:R}=qt(n),N=T(()=>X({extend:X(Gg),...l.ui?.textarea||{}})({color:g.value,variant:n.variant,size:u?.value,loading:n.loading,highlight:b.value,autoresize:n.autoresize,leading:k.value||!!n.avatar||!!r.leading,trailing:S.value||!!r.trailing})),D=ft("textareaRef");function Z(L){n.modelModifiers?.trim&&(L=L?.trim()??null),n.modelModifiers?.number&&(L=Oa(L)),n.modelModifiers?.nullable&&(L||=null),n.modelModifiers?.optional&&(L||=void 0),s.value=L,p()}function U(L){M(),n.modelModifiers?.lazy||Z(L.target.value)}function le(L){const $=L.target.value;n.modelModifiers?.lazy&&Z($),n.modelModifiers?.trim&&(L.target.value=$.trim()),f(),i("change",L)}function ne(L){d(),i("blur",L)}function Y(){n.autofocus&&D.value?.focus()}function M(){if(n.autoresize&&D.value){D.value.rows=n.rows;const L=D.value.style.overflow;D.value.style.overflow="hidden";const $=window.getComputedStyle(D.value),W=Number.parseInt($.paddingTop),E=Number.parseInt($.paddingBottom),pe=W+E,be=Number.parseInt($.lineHeight),{scrollHeight:ue}=D.value,xe=(ue-pe)/be;xe>n.rows&&(D.value.rows=n.maxrows?Math.min(xe,n.maxrows):xe),D.value.style.overflow=L}}return Ge(s,()=>{rt(M)}),Je(()=>{setTimeout(()=>{Y()},n.autofocusDelay),setTimeout(()=>{M()},n.autoresizeDelay)}),t({textareaRef:D}),(L,$)=>(m(),z(o(Xe),{as:e.as,"data-slot":"root",class:w(N.value.root({class:[n.ui?.root,n.class]}))},{default:q(()=>[$e("textarea",H({id:o(h),ref_key:"textareaRef",ref:D,value:o(s),name:o(v),rows:e.rows,placeholder:e.placeholder,"data-slot":"base",class:N.value.base({class:n.ui?.base}),disabled:o(x),required:e.required},{...L.$attrs,...o(y)},{onInput:U,onBlur:ne,onChange:le,onFocus:$[0]||($[0]=(...W)=>o(c)&&o(c)(...W))}),null,16,Kg),A(L.$slots,"default",{ui:N.value}),o(k)||e.avatar||r.leading?(m(),j("span",{key:0,"data-slot":"leading",class:w(N.value.leading({class:n.ui?.leading}))},[A(L.$slots,"leading",{ui:N.value},()=>[o(k)&&o(O)?(m(),z(ye,{key:0,name:o(O),"data-slot":"leadingIcon",class:w(N.value.leadingIcon({class:n.ui?.leadingIcon}))},null,8,["name","class"])):e.avatar?(m(),z(Qe,H({key:1,size:n.ui?.leadingAvatarSize||N.value.leadingAvatarSize()},e.avatar,{"data-slot":"leadingAvatar",class:N.value.leadingAvatar({class:n.ui?.leadingAvatar})}),null,16,["size","class"])):P("",!0)])],2)):P("",!0),o(S)||r.trailing?(m(),j("span",{key:1,"data-slot":"trailing",class:w(N.value.trailing({class:n.ui?.trailing}))},[A(L.$slots,"trailing",{ui:N.value},()=>[o(R)?(m(),z(ye,{key:0,name:o(R),"data-slot":"trailingIcon",class:w(N.value.trailingIcon({class:n.ui?.trailingIcon}))},null,8,["name","class"])):P("",!0)])],2)):P("",!0)]),_:3},8,["as","class"]))}});function Wg(e,t){if(typeof e!="object"||e===null)return!1;const a=ke(e,t);return a!=null&&a!==""}function Ni(e,t){return t?{xs:44,sm:48,md:52,lg:56,xl:60}[e]:{xs:24,sm:28,md:32,lg:36,xl:40}[e]}function Ug(e,t,a,n){const i=Ni(t,!0),r=Ni(t,!1);return n?()=>i:a?s=>Wg(e[s],a)?i:r:()=>r}const Yg={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","origin-(--reka-combobox-content-transform-origin) w-(--reka-combobox-trigger-width)"],viewport:"relative 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",input:"border-b border-default",focusScope:"flex flex-col min-h-0",trailingClear:"p-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]"},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",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:""},type:{file:"file:me-1.5 file:font-medium file:text-muted file:outline-none"},virtualize:{true:{viewport:"p-1 isolate"},false:{viewport:"divide-y divide-default"}}},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"}}],defaultVariants:{size:"md",color:"primary",variant:"outline"}},kp=Object.assign({inheritAttrs:!1},{__name:"SelectMenu",props:dt({id:{type:String,required:!1},placeholder:{type:String,required:!1},searchInput:{type:[Boolean,Object],required:!1,default:!0},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},required:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1},selectedIcon:{type:null,required:!1},clear:{type:[Boolean,Object],required:!1},clearIcon:{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},virtualize:{type:[Boolean,Object],required:!1,default:!1},valueKey:{type:null,required:!1},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:Object,required:!1},multiple:{type:Boolean,required:!1},highlight:{type:Boolean,required:!1},createItem:{type:[Boolean,String,Object],required:!1},filterFields:{type:Array,required:!1},ignoreFilter:{type:Boolean,required:!1},autofocus:{type:Boolean,required:!1},autofocusDelay:{type:Number,required:!1,default:0},class:{type:null,required:!1},ui:{type:null,required:!1},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},resetSearchTermOnBlur:{type:Boolean,required:!1,default:!0},resetSearchTermOnSelect:{type:Boolean,required:!1,default:!0},resetModelValueOnClear:{type:Boolean,required:!1,default:!0},highlightOnHover:{type:Boolean,required:!1},by:{type:[String,Function],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}},{searchTerm:{type:String,default:""},searchTermModifiers:{}}),emits:dt(["update:open","change","blur","focus","create","clear","highlight","update:modelValue"],["update:searchTerm"]),setup(e,{expose:t,emit:a}){const n=e,i=a,r=Be(),s=Xt(e,"searchTerm",{type:String,default:""}),{t:l}=bt(),c=we(),{contains:d}=Rl({sensitivity:"base"}),p=Ke(je(n,"modelValue","defaultValue","open","defaultOpen","required","multiple","resetSearchTermOnBlur","resetSearchTermOnSelect","resetModelValueOnClear","highlightOnHover","by"),i),f=yt(he(()=>n.portal)),u=he(()=>Ze(n.content,{side:"bottom",sideOffset:8,collisionPadding:8,position:"popper"})),g=he(()=>n.arrow),h=T(()=>typeof n.clear=="object"?n.clear:{}),v=he(()=>n.virtualize?Ze(typeof n.virtualize=="boolean"?{}:n.virtualize,{estimateSize:Ug(K.value,E.value||"md",n.descriptionKey,!!r["item-description"])}):!1),b=he(()=>Ze(n.searchInput,{placeholder:l("selectMenu.search"),variant:"none"})),{emitFormBlur:x,emitFormFocus:y,emitFormInput:k,emitFormChange:S,size:O,color:R,id:N,name:D,highlight:Z,disabled:U,ariaAttrs:le}=gt(n),{orientation:ne,size:Y}=It(n),{isLeading:M,isTrailing:L,leadingIconName:$,trailingIconName:W}=qt(he(()=>Ze(n,{trailingIcon:c.ui.icons.chevronDown}))),E=T(()=>Y.value||O.value),[pe,be]=xa(),[ue,xe]=xa({props:{item:{type:[Object,String,Number,Boolean],required:!0},index:{type:Number,required:!1}}}),B=T(()=>X({extend:X(Yg),...c.ui?.selectMenu||{}})({color:R.value,variant:n.variant,size:E?.value,loading:n.loading,highlight:Z.value,leading:M.value||!!n.avatar||!!r.leading,trailing:L.value||!!r.trailing,fieldGroup:ne.value,virtualize:!!n.virtualize}));function de(G){if(n.multiple&&Array.isArray(G)){const oe=G.map(V=>ka(Te.value,V,{labelKey:n.labelKey,valueKey:n.valueKey,by:n.by})).filter(V=>V!=null&&V!=="");return oe.length>0?oe.join(", "):void 0}return ka(Te.value,G,{labelKey:n.labelKey,valueKey:n.valueKey,by:n.by})}const ve=T(()=>n.items?.length?qn(n.items)?n.items:[n.items]:[]),Te=T(()=>ve.value.flatMap(G=>G)),I=T(()=>{if(n.ignoreFilter||!s.value)return ve.value;const G=Array.isArray(n.filterFields)?n.filterFields:[n.labelKey];return ve.value.map(oe=>oe.filter(V=>V==null?!1:typeof V!="object"?d(String(V),s.value):V.type&&["label","separator"].includes(V.type)?!0:G.some(Ce=>{const qe=ke(V,Ce);return qe!=null&&d(String(qe),s.value)}))).filter(oe=>oe.filter(V=>!me(V)||!V.type||!["label","separator"].includes(V.type)).length>0)}),K=T(()=>I.value.flatMap(G=>G)),C=T(()=>{if(!n.createItem||!s.value)return!1;const G=n.valueKey?{[n.valueKey]:s.value}:s.value;return typeof n.createItem=="object"&&n.createItem.when==="always"||n.createItem==="always"?!K.value.find(oe=>rr(oe,G,n.by??n.valueKey)):!K.value.length}),_=T(()=>typeof n.createItem=="object"?n.createItem.position:"bottom"),ae=ft("triggerRef");function ze(){n.autofocus&&ae.value?.$el?.focus({focusVisible:!0})}Je(()=>{setTimeout(()=>{ze()},n.autofocusDelay)});function re(G){if(Qi(n.modelValue)===G)return;n.modelModifiers?.trim&&(G=G?.trim()??null),n.modelModifiers?.number&&(G=Oa(G)),n.modelModifiers?.nullable&&(G??=null),n.modelModifiers?.optional&&(G??=void 0);const oe=new Event("change",{target:{value:G}});i("change",oe),S(),k(),n.resetSearchTermOnSelect&&(s.value="")}function se(G){let oe;if(G){const V=new FocusEvent("focus");i("focus",V),y(),clearTimeout(oe)}else{const V=new FocusEvent("blur");i("blur",V),x(),n.resetSearchTermOnBlur&&(oe=setTimeout(()=>{s.value=""},100))}}function Ae(G){G.preventDefault(),G.stopPropagation(),i("create",s.value)}function st(G,oe){if(me(oe)){if(oe.disabled){G.preventDefault();return}oe.onSelect?.(G)}}function me(G){return typeof G=="object"&&G!==null}function te(G){return n.multiple&&Array.isArray(G)?G.length===0:G==null||G===""}function Oe(){i("clear")}const Re=ft("viewportRef");return t({triggerRef:he(()=>ae.value?.$el),viewportRef:he(()=>Re.value)}),(G,oe)=>(m(),j(ge,null,[F(o(pe),null,{default:q(()=>[F(o(Mn),{"data-slot":"item",class:w(B.value.item({class:n.ui?.item})),value:s.value,onSelect:Ae},{default:q(()=>[$e("span",{"data-slot":"itemLabel",class:w(B.value.itemLabel({class:n.ui?.itemLabel}))},[A(G.$slots,"create-item-label",{item:s.value},()=>[ce(ee(o(l)("selectMenu.create",{label:s.value})),1)])],2)]),_:3},8,["class","value"])]),_:3}),F(o(ue),null,{default:q(({item:V,index:Ce})=>[me(V)&&V.type==="label"?(m(),z(o(yl),{key:0,"data-slot":"label",class:w(B.value.label({class:[n.ui?.label,V.ui?.label,V.class]}))},{default:q(()=>[ce(ee(o(ke)(V,n.labelKey)),1)]),_:2},1032,["class"])):me(V)&&V.type==="separator"?(m(),z(o(xl),{key:1,"data-slot":"separator",class:w(B.value.separator({class:[n.ui?.separator,V.ui?.separator,V.class]}))},null,8,["class"])):(m(),z(o(Mn),{key:2,"data-slot":"item",class:w(B.value.item({class:[n.ui?.item,me(V)&&V.ui?.item,me(V)&&V.class]})),disabled:me(V)&&V.disabled,value:n.valueKey&&me(V)?o(ke)(V,n.valueKey):V,onSelect:qe=>st(qe,V)},{default:q(()=>[A(G.$slots,"item",{item:V,index:Ce,ui:B.value},()=>[A(G.$slots,"item-leading",{item:V,index:Ce,ui:B.value},()=>[me(V)&&V.icon?(m(),z(ye,{key:0,name:V.icon,"data-slot":"itemLeadingIcon",class:w(B.value.itemLeadingIcon({class:[n.ui?.itemLeadingIcon,V.ui?.itemLeadingIcon]}))},null,8,["name","class"])):me(V)&&V.avatar?(m(),z(Qe,H({key:1,size:V.ui?.itemLeadingAvatarSize||n.ui?.itemLeadingAvatarSize||B.value.itemLeadingAvatarSize()},V.avatar,{"data-slot":"itemLeadingAvatar",class:B.value.itemLeadingAvatar({class:[n.ui?.itemLeadingAvatar,V.ui?.itemLeadingAvatar]})}),null,16,["size","class"])):me(V)&&V.chip?(m(),z($n,H({key:2,size:n.ui?.itemLeadingChipSize||B.value.itemLeadingChipSize(),inset:"",standalone:""},V.chip,{"data-slot":"itemLeadingChip",class:B.value.itemLeadingChip({class:[n.ui?.itemLeadingChip,V.ui?.itemLeadingChip]})}),null,16,["size","class"])):P("",!0)]),$e("span",{"data-slot":"itemWrapper",class:w(B.value.itemWrapper({class:[n.ui?.itemWrapper,me(V)&&V.ui?.itemWrapper]}))},[$e("span",{"data-slot":"itemLabel",class:w(B.value.itemLabel({class:[n.ui?.itemLabel,me(V)&&V.ui?.itemLabel]}))},[A(G.$slots,"item-label",{item:V,index:Ce},()=>[ce(ee(me(V)?o(ke)(V,n.labelKey):V),1)])],2),me(V)&&(o(ke)(V,n.descriptionKey)||r["item-description"])?(m(),j("span",{key:0,"data-slot":"itemDescription",class:w(B.value.itemDescription({class:[n.ui?.itemDescription,me(V)&&V.ui?.itemDescription]}))},[A(G.$slots,"item-description",{item:V,index:Ce},()=>[ce(ee(o(ke)(V,n.descriptionKey)),1)])],2)):P("",!0)],2),$e("span",{"data-slot":"itemTrailing",class:w(B.value.itemTrailing({class:[n.ui?.itemTrailing,me(V)&&V.ui?.itemTrailing]}))},[A(G.$slots,"item-trailing",{item:V,index:Ce,ui:B.value}),F(o(kl),{"as-child":""},{default:q(()=>[F(ye,{name:e.selectedIcon||o(c).ui.icons.check,"data-slot":"itemTrailingIcon",class:w(B.value.itemTrailingIcon({class:[n.ui?.itemTrailingIcon,me(V)&&V.ui?.itemTrailingIcon]}))},null,8,["name","class"])]),_:2},1024)],2)])]),_:2},1032,["class","disabled","value","onSelect"]))]),_:3}),F(o($l),H({id:o(N)},{...o(p),...G.$attrs,...o(le)},{"ignore-filter":"","as-child":"",name:o(D),disabled:o(U),"onUpdate:modelValue":re,"onUpdate:open":se}),{default:q(({modelValue:V,open:Ce})=>[F(o(wl),{"as-child":""},{default:q(()=>[F(o(zl),{ref_key:"triggerRef",ref:ae,"data-slot":"base",class:w(B.value.base({class:[n.ui?.base,n.class]})),tabindex:"0"},{default:q(()=>[o(M)||e.avatar||r.leading?(m(),j("span",{key:0,"data-slot":"leading",class:w(B.value.leading({class:n.ui?.leading}))},[A(G.$slots,"leading",{modelValue:V,open:Ce,ui:B.value},()=>[o(M)&&o($)?(m(),z(ye,{key:0,name:o($),"data-slot":"leadingIcon",class:w(B.value.leadingIcon({class:n.ui?.leadingIcon}))},null,8,["name","class"])):e.avatar?(m(),z(Qe,H({key:1,size:n.ui?.itemLeadingAvatarSize||B.value.itemLeadingAvatarSize()},e.avatar,{"data-slot":"itemLeadingAvatar",class:B.value.itemLeadingAvatar({class:n.ui?.itemLeadingAvatar})}),null,16,["size","class"])):P("",!0)])],2)):P("",!0),A(G.$slots,"default",{modelValue:V,open:Ce,ui:B.value},()=>[(m(!0),j(ge,null,Ie([de(V)],qe=>(m(),j(ge,{key:qe},[qe!=null?(m(),j("span",{key:0,"data-slot":"value",class:w(B.value.value({class:n.ui?.value}))},ee(qe),3)):(m(),j("span",{key:1,"data-slot":"placeholder",class:w(B.value.placeholder({class:n.ui?.placeholder}))},ee(e.placeholder??" "),3))],64))),128))]),o(L)||r.trailing||e.clear?(m(),j("span",{key:1,"data-slot":"trailing",class:w(B.value.trailing({class:n.ui?.trailing}))},[A(G.$slots,"trailing",{modelValue:V,open:Ce,ui:B.value},()=>[e.clear&&!te(V)?(m(),z(o(Sl),{key:0,"as-child":""},{default:q(()=>[F(Ye,H({as:"span",icon:e.clearIcon||o(c).ui.icons.close,variant:"link",color:"neutral",tabindex:"-1"},h.value,{"data-slot":"trailingClear",class:B.value.trailingClear({class:n.ui?.trailingClear}),onClick:Ot(Oe,["stop"])}),null,16,["icon","class"])]),_:1})):o(W)?(m(),z(ye,{key:1,name:o(W),"data-slot":"trailingIcon",class:w(B.value.trailingIcon({class:n.ui?.trailingIcon}))},null,8,["name","class"])):P("",!0)])],2)):P("",!0)]),_:2},1032,["class"])]),_:2},1024),F(o(ql),Ne(He(o(f))),{default:q(()=>[F(o(Il),H({"data-slot":"content",class:B.value.content({class:n.ui?.content})},u.value),{default:q(()=>[F(o(Cl),{trapped:"","data-slot":"focusScope",class:w(B.value.focusScope({class:n.ui?.focusScope}))},{default:q(()=>[A(G.$slots,"content-top"),e.searchInput?(m(),z(o(Tl),{key:0,modelValue:s.value,"onUpdate:modelValue":oe[1]||(oe[1]=qe=>s.value=qe),"display-value":()=>s.value,"as-child":""},{default:q(()=>[F(Yf,H({autofocus:"",autocomplete:"off",size:e.size},b.value,{"data-slot":"input",class:B.value.input({class:n.ui?.input}),onChange:oe[0]||(oe[0]=Ot(()=>{},["stop"]))}),null,16,["size","class"])]),_:1},8,["modelValue","display-value"])):P("",!0),F(o(Al),{"data-slot":"empty",class:w(B.value.empty({class:n.ui?.empty}))},{default:q(()=>[A(G.$slots,"empty",{searchTerm:s.value},()=>[ce(ee(s.value?o(l)("selectMenu.noMatch",{searchTerm:s.value}):o(l)("selectMenu.noData")),1)])]),_:3},8,["class"]),$e("div",{ref_key:"viewportRef",ref:Re,role:"presentation","data-slot":"viewport",class:w(B.value.viewport({class:n.ui?.viewport}))},[e.virtualize?(m(),j(ge,{key:0},[C.value&&_.value==="top"?(m(),z(o(be),{key:0})):P("",!0),F(o(Ol),H({options:K.value,"text-content":qe=>me(qe)?o(ke)(qe,n.labelKey):String(qe)},v.value),{default:q(({option:qe,virtualItem:lt})=>[F(o(xe),{item:qe,index:lt.index},null,8,["item","index"])]),_:1},16,["options","text-content"]),C.value&&_.value==="bottom"?(m(),z(o(be),{key:1})):P("",!0)],64)):(m(),j(ge,{key:1},[C.value&&_.value==="top"?(m(),z(o(La),{key:0,"data-slot":"group",class:w(B.value.group({class:n.ui?.group}))},{default:q(()=>[F(o(be))]),_:1},8,["class"])):P("",!0),(m(!0),j(ge,null,Ie(I.value,(qe,lt)=>(m(),z(o(La),{key:`group-${lt}`,"data-slot":"group",class:w(B.value.group({class:n.ui?.group}))},{default:q(()=>[(m(!0),j(ge,null,Ie(qe,(Ct,Dt)=>(m(),z(o(xe),{key:`group-${lt}-${Dt}`,item:Ct,index:Dt},null,8,["item","index"]))),128))]),_:2},1032,["class"]))),128)),C.value&&_.value==="bottom"?(m(),z(o(La),{key:1,"data-slot":"group",class:w(B.value.group({class:n.ui?.group}))},{default:q(()=>[F(o(be))]),_:1},8,["class"])):P("",!0)],64))],2),A(G.$slots,"content-bottom")]),_:3},8,["class"]),e.arrow?(m(),z(o(Pl),H({key:0},g.value,{"data-slot":"arrow",class:B.value.arrow({class:n.ui?.arrow})}),null,16,["class"])):P("",!0)]),_:3},16,["class"])]),_:3},16)]),_:3},16,["id","name","disabled"])],64))}}),_g={slots:{root:["relative inline-flex items-center","flex-wrap"],base:["rounded-md","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",item:'px-1.5 py-0.5 rounded-sm font-medium inline-flex items-center gap-0.5 ring ring-inset ring-accented bg-elevated text-default data-disabled:cursor-not-allowed data-disabled:opacity-75 wrap-anywhere data-[state="active"]:bg-accented',itemText:"",itemDelete:["inline-flex items-center rounded-xs text-dimmed hover:text-default hover:bg-accented/75 disabled:pointer-events-none","transition-colors"],itemDeleteIcon:"shrink-0",input:"flex-1 border-0 bg-transparent placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75"},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-xs gap-1",leading:"ps-2",trailing:"pe-2",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4",item:"text-[10px]/3",itemDeleteIcon:"size-3"},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",item:"text-[10px]/3",itemDeleteIcon:"size-3"},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",item:"text-xs",itemDeleteIcon:"size-3.5"},lg:{base:"px-3 py-2 text-sm gap-2",leading:"ps-3",trailing:"pe-3",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5",item:"text-xs",itemDeleteIcon:"size-3.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",item:"text-sm",itemDeleteIcon:"size-4"}},variant:{outline:"text-highlighted bg-default ring ring-inset ring-accented",soft:"text-highlighted bg-elevated/50 hover:bg-elevated has-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 has-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:""},type:{file:"file:me-1.5 file:font-medium file:text-muted file:outline-none"}},compoundVariants:[{color:"primary",variant:["outline","subtle"],class:"has-focus-visible:ring-2 has-focus-visible:ring-inset has-focus-visible:ring-primary"},{color:"secondary",variant:["outline","subtle"],class:"has-focus-visible:ring-2 has-focus-visible:ring-inset has-focus-visible:ring-secondary"},{color:"success",variant:["outline","subtle"],class:"has-focus-visible:ring-2 has-focus-visible:ring-inset has-focus-visible:ring-success"},{color:"info",variant:["outline","subtle"],class:"has-focus-visible:ring-2 has-focus-visible:ring-inset has-focus-visible:ring-info"},{color:"warning",variant:["outline","subtle"],class:"has-focus-visible:ring-2 has-focus-visible:ring-inset has-focus-visible:ring-warning"},{color:"error",variant:["outline","subtle"],class:"has-focus-visible:ring-2 has-focus-visible:ring-inset has-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:"has-focus-visible:ring-2 has-focus-visible:ring-inset has-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"}}],defaultVariants:{size:"md",color:"primary",variant:"outline"}},wp=Object.assign({inheritAttrs:!1},{__name:"InputTags",props:{as:{type:null,required:!1},placeholder:{type:String,required:!1},maxLength:{type:Number,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},autofocus:{type:Boolean,required:!1},autofocusDelay:{type:Number,required:!1,default:0},deleteIcon:{type:null,required:!1},highlight:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},modelValue:{type:[Array,null],required:!1},defaultValue:{type:Array,required:!1},addOnPaste:{type:Boolean,required:!1},addOnTab:{type:Boolean,required:!1},addOnBlur:{type:Boolean,required:!1},duplicate:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},delimiter:{type:null,required:!1},max:{type:Number,required:!1},id:{type:String,required:!1},convertValue:{type:Function,required:!1},displayValue:{type:Function,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},trailingIcon:{type:null,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1}},emits:["change","blur","focus","update:modelValue","invalid","addTag","removeTag"],setup(e,{expose:t,emit:a}){const n=e,i=a,r=Be(),s=we(),l=Ke(je(n,"as","addOnPaste","addOnTab","addOnBlur","duplicate","delimiter","max","convertValue","displayValue","required"),i),{emitFormBlur:c,emitFormFocus:d,emitFormChange:p,emitFormInput:f,size:u,color:g,id:h,name:v,highlight:b,disabled:x,ariaAttrs:y}=gt(n),{orientation:k,size:S}=It(n),{isLeading:O,isTrailing:R,leadingIconName:N,trailingIconName:D}=qt(n),Z=T(()=>S.value||u.value),U=T(()=>X({extend:X(_g),...s.ui?.inputTags||{}})({color:g.value,variant:n.variant,size:Z?.value,loading:n.loading,highlight:b.value,leading:O.value||!!n.avatar||!!r.leading,trailing:R.value||!!r.trailing,fieldGroup:k.value})),le=ft("inputRef");function ne(){n.autofocus&&le.value?.$el?.focus()}Je(()=>{setTimeout(()=>{ne()},n.autofocusDelay)});function Y($){if(Qi(n.modelValue)===$)return;const W=new Event("change",{target:{value:$}});i("change",W),p(),f()}function M($){i("blur",$),c()}function L($){i("focus",$),d()}return t({inputRef:he(()=>le.value?.$el)}),($,W)=>(m(),z(o(Ml),H({id:o(h),"model-value":e.modelValue,"default-value":e.defaultValue,"data-slot":"root",class:U.value.root({class:[U.value.base({class:n.ui?.base}),n.ui?.root,n.class]})},o(l),{name:o(v),disabled:o(x),"onUpdate:modelValue":Y}),{default:q(({modelValue:E})=>[(m(!0),j(ge,null,Ie(E,(pe,be)=>(m(),z(o(El),{key:be,value:pe,"data-slot":"item",class:w(U.value.item({class:[n.ui?.item]}))},{default:q(()=>[F(o(Bl),{"data-slot":"itemText",class:w(U.value.itemText({class:[n.ui?.itemText]}))},{default:q(()=>[r["item-text"]?A($.$slots,"item-text",{key:0,item:pe,index:be,ui:U.value}):P("",!0)]),_:2},1032,["class"]),F(o(Ll),{"data-slot":"itemDelete",class:w(U.value.itemDelete({class:[n.ui?.itemDelete]})),disabled:o(x)},{default:q(()=>[A($.$slots,"item-delete",{item:pe,index:be,ui:U.value},()=>[F(ye,{name:e.deleteIcon||o(s).ui.icons.close,"data-slot":"itemDeleteIcon",class:w(U.value.itemDeleteIcon({class:[n.ui?.itemDeleteIcon]}))},null,8,["name","class"])])]),_:2},1032,["class","disabled"])]),_:2},1032,["value","class"]))),128)),F(o(Nl),H({ref_key:"inputRef",ref:le},{...$.$attrs,...o(y)},{placeholder:e.placeholder,"max-length":e.maxLength,"data-slot":"input",class:U.value.input({class:n.ui?.input}),onBlur:M,onFocus:L}),null,16,["placeholder","max-length","class"]),A($.$slots,"default",{ui:U.value}),o(O)||e.avatar||r.leading?(m(),j("span",{key:0,"data-slot":"leading",class:w(U.value.leading({class:n.ui?.leading}))},[A($.$slots,"leading",{ui:U.value},()=>[o(O)&&o(N)?(m(),z(ye,{key:0,name:o(N),"data-slot":"leadingIcon",class:w(U.value.leadingIcon({class:n.ui?.leadingIcon}))},null,8,["name","class"])):e.avatar?(m(),z(Qe,H({key:1,size:n.ui?.leadingAvatarSize||U.value.leadingAvatarSize()},e.avatar,{"data-slot":"leadingAvatar",class:U.value.leadingAvatar({class:n.ui?.leadingAvatar})}),null,16,["size","class"])):P("",!0)])],2)):P("",!0),o(R)||r.trailing?(m(),j("span",{key:1,"data-slot":"trailing",class:w(U.value.trailing({class:n.ui?.trailing}))},[A($.$slots,"trailing",{ui:U.value},()=>[o(D)?(m(),z(ye,{key:0,name:o(D),"data-slot":"trailingIcon",class:w(U.value.trailingIcon({class:n.ui?.trailingIcon}))},null,8,["name","class"])):P("",!0)])],2)):P("",!0)]),_:3},16,["id","model-value","default-value","class","name","disabled"]))}});export{tp as A,Zg as B,Xg as C,vp as D,mp as E,hp as F,bp as G,Cr as R,ye as _,yp as a,up as b,Ye as c,Yf as d,fu as e,ap as f,du as g,rp as h,Qf as i,lp as j,wp as k,sp as l,Rf as m,ip as n,cp as o,Zf as p,xp as q,np as r,kp as s,op as t,ep as u,gu as v,dp as w,gp as x,pp as y,fp as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as a}from"./index-
|
|
1
|
+
import{f as a}from"./index-BsXljrlg.js";import"./vendor-reka-ui-CzM4kDQ7.js";import"./vendor-nuxt-ui-DaLxYaC4.js";import"./vendor-snapdom-XnBoh1gd.js";class l{async getVersion(){return"0.30.0"}async fetchRemoteConfig(e){try{const t=await fetch(e);return t.ok?{success:!0,data:await t.json()}:{success:!1,error:`HTTP ${t.status}`}}catch(t){return{success:!1,error:String(t)}}}setThemeSource(e){}async getOpenAtLogin(){return!1}async setOpenAtLogin(e){return{success:!1,error:"Not available in web mode"}}async getAnalyticsEnabled(){try{return(await(await a("/_web/telemetry/enabled")).json()).enabled===!0}catch{return!1}}async setAnalyticsEnabled(e){try{return await(await a("/_web/telemetry/enabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:e})})).json()}catch{return{success:!1}}}async trackDailyActive(e){await a("/_web/telemetry/track",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({eventName:"app_active",properties:{platform:"cli-web",locale:e}})}).catch(()=>{})}async showOpenDialog(e){return{canceled:!0,filePaths:[]}}async copyImageToClipboard(e){return{success:!1,error:"Not available in web mode"}}async checkUpdate(){try{return await(await a("/_web/system/check-update")).json()}catch(e){return{hasUpdate:!1,currentVersion:"unknown",error:e instanceof Error?e.message:String(e)}}}async performUpdate(){return{success:!1,error:"Web update is unavailable. Run clb update in your terminal."}}async relaunch(){window.location.reload()}}export{l as WebPlatformAdapter};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{M as w,f as B,O,ar as A,a0 as k,j as _,G as M,b as U,N as E,I as z,a1 as T,T as b,ak as V,R as Y,w as X,r as P}from"./RelationshipGalaxyCanvas-
|
|
1
|
+
import{M as w,f as B,O,ar as A,a0 as k,j as _,G as M,b as U,N as E,I as z,a1 as T,T as b,ak as V,R as Y,w as X,r as P}from"./RelationshipGalaxyCanvas-W_6XfPOG.js";import{F as q}from"./Filter-Bo_p3BVX.js";import"./vendor-snapdom-XnBoh1gd.js";import"./index-BsXljrlg.js";import"./vendor-reka-ui-CzM4kDQ7.js";import"./vendor-nuxt-ui-DaLxYaC4.js";import"./index-CZv0ZOID.js";import"./LoadingState.vue_vue_type_script_setup_true_lang-D_dJuLWJ.js";import"./people-page-header-Mupn-U_b.js";import"./relationship-galaxy-viewport-Cwfa51ER.js";const v=new w;function G(g,e){e.clear();const t=e.matrix;for(let r=0;r<g.length;r++){const i=g[r];if(i.globalDisplayStatus<7)continue;const s=i.renderGroup??i.parentRenderGroup;s?.isCachedAsTexture?e.matrix=v.copyFrom(s.textureOffsetInverseTransform).append(i.worldTransform):s?._parentCacheAsTextureRenderGroup?e.matrix=v.copyFrom(s._parentCacheAsTextureRenderGroup.inverseWorldTransform).append(i.groupTransform):e.matrix=i.worldTransform,e.addBounds(i.bounds)}return e.matrix=t,e}function y(g){return typeof g.getCanvasFilterString=="function"}class L{constructor(){this.skip=!1,this.useClip=!1,this.filters=null,this.container=null,this.bounds=new k,this.cssFilterString=""}}class R{constructor(e){this._filterStack=[],this._filterStackIndex=0,this._savedStates=[],this._alphaMultiplier=1,this._warnedFilterTypes=new Set,this.renderer=e}push(e){const t=this._pushFilterFrame(),r=e.filterEffect.filters;if(t.skip=!1,t.useClip=!1,t.filters=r,t.container=e.container,t.cssFilterString="",r.every(o=>!o.enabled)){t.skip=!0;return}const i=[],s=1;for(const o of r){if(!o.enabled)continue;if(!y(o)){this._warnUnsupportedFilter(o);continue}const l=o.getCanvasFilterString();if(l===null){this._warnUnsupportedFilter(o);continue}l&&i.push(l)}if(i.length===0&&s===1){t.skip=!0;return}t.cssFilterString=i.join(" "),this._calculateFilterArea(e,t.bounds),t.useClip=!!e.filterEffect.filterArea;const n=this.renderer.canvasContext.activeContext,a=n.filter||"none";if(this._savedStates.push({filter:a,alphaMultiplier:this._alphaMultiplier}),t.useClip&&Number.isFinite(t.bounds.width)&&Number.isFinite(t.bounds.height)&&t.bounds.width>0&&t.bounds.height>0){const o=this.renderer.canvasContext.activeResolution||1;n.save(),n.setTransform(1,0,0,1,0,0),n.beginPath(),n.rect(t.bounds.x*o,t.bounds.y*o,t.bounds.width*o,t.bounds.height*o),n.clip()}else t.useClip=!1;t.cssFilterString&&(n.filter=a!=="none"?`${a} ${t.cssFilterString}`:t.cssFilterString)}pop(){const e=this._popFilterFrame();if(e.skip)return;const t=this._savedStates.pop();if(!t)return;const r=this.renderer.canvasContext.activeContext;e.useClip?r.restore():r.filter=t.filter,this._alphaMultiplier=t.alphaMultiplier}generateFilteredTexture({texture:e,filters:t}){if(!t?.length||t.every(d=>!d.enabled))return e;const r=[],i=1;for(const d of t){if(!d.enabled)continue;if(!y(d)){this._warnUnsupportedFilter(d);continue}const h=d.getCanvasFilterString();if(h===null){this._warnUnsupportedFilter(d);continue}h&&r.push(h)}if(r.length===0&&i===1)return e;const s=B.getCanvasSource(e);if(!s)return e;const n=e.frame,a=e.source._resolution??e.source.resolution??1,o=n.width,l=n.height,f=O.getOptimalCanvasAndContext(o,l,a),{canvas:c,context:u}=f;u.setTransform(1,0,0,1,0,0),u.clearRect(0,0,c.width,c.height),r.length&&(u.filter=r.join(" "));const p=n.x*a,m=n.y*a,x=o*a,F=l*a;return u.drawImage(s,p,m,x,F,0,0,x,F),u.filter="none",u.globalAlpha=1,A(c,o,l,a)}_calculateFilterArea(e,t){if(e.renderables?G(e.renderables,t):e.filterEffect.filterArea?(t.clear(),t.addRect(e.filterEffect.filterArea),t.applyMatrix(e.container.worldTransform)):e.container.getFastGlobalBounds(!0,t),e.container){const i=(e.container.renderGroup||e.container.parentRenderGroup)?.cacheToLocalTransform;i&&t.applyMatrix(i)}}_warnUnsupportedFilter(e){const t=e?.constructor?.name||"Filter";this._warnedFilterTypes.has(t)||(this._warnedFilterTypes.add(t),console.warn(`CanvasRenderer: filter "${t}" is not supported in Canvas2D and will be skipped.`))}get alphaMultiplier(){return this._alphaMultiplier}_pushFilterFrame(){let e=this._filterStack[this._filterStackIndex];return e||(e=this._filterStack[this._filterStackIndex]=new L),this._filterStackIndex++,e}_popFilterFrame(){return this._filterStackIndex<=0?this._filterStack[0]:(this._filterStackIndex--,this._filterStack[this._filterStackIndex])}destroy(){this._filterStack=null,this._savedStates=null,this._warnedFilterTypes=null,this._alphaMultiplier=1}}R.extension={type:[_.CanvasSystem],name:"filter"};var W=`in vec2 aPosition;
|
|
2
2
|
out vec2 vTextureCoord;
|
|
3
3
|
|
|
4
4
|
uniform vec4 uInputSize;
|
package/dist-web/index.html
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
<title>ChatLab</title>
|
|
6
6
|
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
|
|
7
7
|
<link rel="icon" href="/favicon.ico" />
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-BsXljrlg.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/assets/vendor-reka-ui-CzM4kDQ7.js">
|
|
10
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-nuxt-ui-
|
|
10
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-nuxt-ui-DaLxYaC4.js">
|
|
11
11
|
<link rel="modulepreload" crossorigin href="/assets/vendor-snapdom-XnBoh1gd.js">
|
|
12
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
12
|
+
<link rel="stylesheet" crossorigin href="/assets/index-B4l3rHie.css">
|
|
13
13
|
</head>
|
|
14
14
|
|
|
15
15
|
<body>
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../packages/node-runtime/src/node-path-provider.ts","../../../packages/node-runtime/src/data-dir-switch.ts","../../../packages/node-runtime/src/jieba-nlp-provider.ts","../../../packages/node-runtime/src/preferences.ts","../../../packages/node-runtime/src/merger/index.ts","../../../packages/node-runtime/src/services/analytics.ts","../../../packages/node-runtime/src/semantic-index/index.ts","../../../packages/node-runtime/src/semantic-index/worker-client.ts","../../../packages/node-runtime/src/semantic-index/worker-thread-transport.ts","../../../packages/node-runtime/src/semantic-index/embedding/index.ts"],"sourcesContent":["/**\n * PathProvider 的 Node.js 独立实现\n *\n * 为 CLI / npm 服务版提供路径管理,不依赖 Electron。\n *\n * 目录分为两类:\n * - 系统数据:固定在 ~/.chatlab/,存放配置、日志、缓存、AI 数据等\n * - 用户数据:可配置位置,存放聊天记录数据库等核心资产\n *\n * 用户数据目录(userDataDir)解析优先级:\n * 1. 构造函数传入的 userDataDir 参数\n * 2. CHATLAB_DATA_DIR 环境变量\n * 3. ~/.chatlab/config.toml → [data] user_data_dir\n * 4. 平台默认路径\n */\n\nimport * as fs from 'fs'\nimport * as os from 'os'\nimport * as path from 'path'\nimport type { PathProvider } from '@openchatlab/core'\nimport { writeConfigField, loadConfig } from '@openchatlab/config'\nimport { migrateFromElectronIfNeeded } from './migrations/electron-data-migration'\nimport { applyPendingNodeDataDirMigration } from './data-dir-switch'\n\nconst SYSTEM_DIR = path.join(os.homedir(), '.chatlab')\n\n/**\n * Set after resolveUserDataDir() detects Electron installation but cannot find databases.\n * CLI should check this and block execution with instructions.\n */\nlet _pendingElectronDataWarning = false\n\nexport function hasPendingElectronDataWarning(): boolean {\n return _pendingElectronDataWarning\n}\n\nexport function applyPendingNodeDataDirMigrationIfNeeded(): { success: boolean; skipped?: boolean; error?: string } {\n if (process.env.CHATLAB_DATA_DIR) return { success: true, skipped: true }\n return applyPendingNodeDataDirMigration(SYSTEM_DIR)\n}\n\nexport class NodePathProvider implements PathProvider {\n private systemDir: string\n private userDataDir: string\n\n constructor(userDataDir?: string) {\n this.systemDir = SYSTEM_DIR\n this.userDataDir = userDataDir || resolveUserDataDir()\n }\n\n getSystemDir(): string {\n return this.systemDir\n }\n\n getUserDataDir(): string {\n return this.userDataDir\n }\n\n getDatabaseDir(): string {\n return path.join(this.userDataDir, 'databases')\n }\n\n getVectorDir(): string {\n return path.join(this.userDataDir, 'vector')\n }\n\n getAiDataDir(): string {\n return path.join(this.systemDir, 'ai')\n }\n\n getSettingsDir(): string {\n return path.join(this.systemDir, 'settings')\n }\n\n getCacheDir(): string {\n return path.join(this.systemDir, 'cache')\n }\n\n getTempDir(): string {\n return path.join(this.systemDir, 'temp')\n }\n\n getLogsDir(): string {\n return path.join(this.systemDir, 'logs')\n }\n\n getDownloadsDir(): string {\n return path.join(os.homedir(), 'Downloads')\n }\n\n /**\n * 确保系统目录和用户数据目录都存在\n */\n ensureAllDirs(): void {\n const dirs = [\n this.systemDir,\n this.userDataDir,\n this.getDatabaseDir(),\n this.getVectorDir(),\n this.getAiDataDir(),\n this.getSettingsDir(),\n this.getCacheDir(),\n this.getTempDir(),\n this.getLogsDir(),\n ]\n for (const dir of dirs) {\n if (!fs.existsSync(dir)) {\n fs.mkdirSync(dir, { recursive: true })\n }\n }\n\n const markerPath = path.join(this.userDataDir, '.chatlab')\n if (!fs.existsSync(markerPath)) {\n fs.writeFileSync(markerPath, 'ChatLab Data Directory', 'utf-8')\n }\n }\n}\n\nfunction resolveUserDataDir(): string {\n const envDir = process.env.CHATLAB_DATA_DIR\n if (envDir) {\n return expandHome(envDir)\n }\n\n const config = loadConfig()\n if (config.data.user_data_dir) {\n return expandHome(config.data.user_data_dir)\n }\n\n // First run: check for existing Electron desktop data before using default\n const result = migrateFromElectronIfNeeded(SYSTEM_DIR)\n if (result.migrated && result.userDataDir) {\n return result.userDataDir\n }\n\n const defaultDir = getDefaultNodeUserDataDir()\n\n if (result.electronDetected) {\n // Electron was used but we couldn't find databases — likely a custom data directory.\n // Don't persist default to config.toml so migration retries on next startup.\n _pendingElectronDataWarning = true\n return defaultDir\n }\n\n writeConfigField('data', 'user_data_dir', defaultDir)\n return defaultDir\n}\n\nexport function getDefaultNodeUserDataDir(): string {\n return path.join(os.homedir(), '.chatlab', 'data')\n}\n\nexport function getSystemLogsDir(): string {\n return path.join(SYSTEM_DIR, 'logs')\n}\n\nfunction expandHome(filePath: string): string {\n if (filePath.startsWith('~/') || filePath === '~') {\n return path.join(os.homedir(), filePath.slice(1))\n }\n return filePath\n}\n","import * as fs from 'fs'\nimport * as path from 'path'\nimport { writeConfigField } from '@openchatlab/config'\n\nconst CHATLAB_MARKER_FILE = '.chatlab'\nconst USER_DATA_REQUIRED_DIRS = ['databases']\nconst PENDING_MIGRATION_FILE = 'data-dir-migration.json'\n\nconst DANGEROUS_PATHS = [\n 'C:\\\\Windows',\n 'C:\\\\Program Files',\n 'C:\\\\Program Files (x86)',\n 'C:\\\\ProgramData',\n '/usr',\n '/etc',\n '/bin',\n '/sbin',\n '/lib',\n '/var',\n '/boot',\n '/root',\n '/System',\n '/Library',\n]\n\nexport interface CopyStats {\n copied: number\n skipped: number\n errors: string[]\n}\n\nexport interface PendingDataDirMigration {\n from: string\n to: string\n migrate: boolean\n deleteSourceOnSuccess: boolean\n createdAt: string\n}\n\nexport interface RunPendingDataDirMigrationDeps {\n copyDirMerge?: typeof copyDirMerge\n ensureDir?: (dirPath: string) => void\n writeUserDataDir: (dir: string) => void\n clearPendingMigration: () => void\n markPendingDeleteDir?: (dir: string) => void\n log?: (message: string) => void\n}\n\nexport interface RunPendingDataDirMigrationResult {\n success: boolean\n from: string\n to: string\n copied: number\n skipped: number\n errors: string[]\n}\n\nexport interface DataDirSwitchResult {\n success: boolean\n error?: string\n from?: string\n to?: string\n requiresRelaunch?: boolean\n}\n\nexport interface ApplyPendingNodeDataDirMigrationDeps {\n writeConfigField?: typeof writeConfigField\n removeDir?: (dir: string) => void\n}\n\nfunction normalizePathForCompare(input: string): string {\n const resolved = path.resolve(input)\n const normalized = path.normalize(resolved)\n return process.platform === 'win32' ? normalized.toLowerCase() : normalized\n}\n\nfunction isSubPath(parent: string, child: string): boolean {\n const parentPath = normalizePathForCompare(parent)\n const childPath = normalizePathForCompare(child)\n\n if (parentPath === childPath) return false\n return childPath.startsWith(`${parentPath}${path.sep}`)\n}\n\nfunction isPathSafe(targetPath: string): boolean {\n const normalizedTarget = targetPath.toLowerCase().replace(/\\//g, '\\\\')\n\n for (const dangerous of DANGEROUS_PATHS) {\n const normalizedDangerous = dangerous.toLowerCase().replace(/\\//g, '\\\\')\n if (normalizedTarget.startsWith(normalizedDangerous)) {\n return false\n }\n }\n\n return true\n}\n\nfunction ensureDir(dirPath: string): void {\n if (!fs.existsSync(dirPath)) {\n fs.mkdirSync(dirPath, { recursive: true })\n }\n}\n\nfunction hasChatLabUserDataStructure(entries: string[]): boolean {\n return entries.includes(CHATLAB_MARKER_FILE) && USER_DATA_REQUIRED_DIRS.every((dir) => entries.includes(dir))\n}\n\nfunction hasChatLabDatabaseFiles(dirPath: string, entries?: string[]): boolean {\n const dirEntries = entries ?? fs.readdirSync(dirPath)\n if (!dirEntries.includes('databases')) return false\n\n const dbDir = path.join(dirPath, 'databases')\n try {\n return fs.existsSync(dbDir) && fs.readdirSync(dbDir).some((file) => file.endsWith('.db'))\n } catch {\n return false\n }\n}\n\nexport function isExistingUserDataDir(dirPath: string): boolean {\n if (!fs.existsSync(dirPath)) return false\n\n try {\n const entries = fs.readdirSync(dirPath)\n return hasChatLabUserDataStructure(entries) || hasChatLabDatabaseFiles(dirPath, entries)\n } catch {\n return false\n }\n}\n\nexport function isUserDataDirSafeToUse(dirPath: string): boolean {\n if (!fs.existsSync(dirPath)) return true\n\n try {\n const entries = fs.readdirSync(dirPath)\n if (entries.length === 0) return true\n return hasChatLabUserDataStructure(entries) || hasChatLabDatabaseFiles(dirPath, entries)\n } catch {\n return false\n }\n}\n\nexport function isDirectoryEmptyOrMissing(dirPath: string): boolean {\n if (!fs.existsSync(dirPath)) return true\n\n try {\n return fs.readdirSync(dirPath).length === 0\n } catch {\n return false\n }\n}\n\nexport function copyDirMerge(\n src: string,\n dest: string,\n mkdir: (dirPath: string) => void = ensureDir,\n stats: CopyStats = { copied: 0, skipped: 0, errors: [] }\n): CopyStats {\n if (!fs.existsSync(src)) return stats\n\n try {\n mkdir(dest)\n const entries = fs.readdirSync(src, { withFileTypes: true })\n\n for (const entry of entries) {\n const srcPath = path.join(src, entry.name)\n const destPath = path.join(dest, entry.name)\n\n try {\n if (entry.isDirectory()) {\n copyDirMerge(srcPath, destPath, mkdir, stats)\n } else if (!fs.existsSync(destPath)) {\n fs.copyFileSync(srcPath, destPath)\n stats.copied++\n } else {\n stats.skipped++\n }\n } catch (error) {\n stats.errors.push(`复制失败: ${srcPath} -> ${error instanceof Error ? error.message : String(error)}`)\n }\n }\n } catch (error) {\n stats.errors.push(`读取目录失败: ${src} -> ${error instanceof Error ? error.message : String(error)}`)\n }\n\n return stats\n}\n\nexport function createPendingDataDirMigration(input: {\n from: string\n to: string\n migrate: boolean\n targetWasEmpty: boolean\n}): PendingDataDirMigration {\n return {\n from: input.from,\n to: input.to,\n migrate: input.migrate,\n deleteSourceOnSuccess: input.migrate && input.targetWasEmpty,\n createdAt: new Date().toISOString(),\n }\n}\n\nexport function runPendingDataDirMigration(\n pending: PendingDataDirMigration,\n deps: RunPendingDataDirMigrationDeps\n): RunPendingDataDirMigrationResult {\n const copy = deps.copyDirMerge ?? copyDirMerge\n const mkdir = deps.ensureDir ?? ensureDir\n\n let stats: CopyStats = { copied: 0, skipped: 0, errors: [] }\n if (pending.migrate && path.resolve(pending.from) !== path.resolve(pending.to)) {\n if (!fs.existsSync(pending.from)) {\n return {\n success: false,\n from: pending.from,\n to: pending.to,\n copied: 0,\n skipped: 0,\n errors: [`源数据目录不存在: ${pending.from}`],\n }\n }\n\n stats = copy(pending.from, pending.to, mkdir)\n deps.log?.(\n `数据目录迁移完成: 从 ${pending.from} 到 ${pending.to},复制 ${stats.copied} 项,跳过 ${stats.skipped} 项,错误 ${stats.errors.length} 项`\n )\n if (stats.errors.length > 0) {\n return {\n success: false,\n from: pending.from,\n to: pending.to,\n copied: stats.copied,\n skipped: stats.skipped,\n errors: stats.errors,\n }\n }\n } else {\n mkdir(pending.to)\n }\n\n deps.writeUserDataDir(pending.to)\n deps.clearPendingMigration()\n\n if (pending.deleteSourceOnSuccess && path.resolve(pending.from) !== path.resolve(pending.to)) {\n deps.markPendingDeleteDir?.(pending.from)\n }\n\n return {\n success: true,\n from: pending.from,\n to: pending.to,\n copied: stats.copied,\n skipped: stats.skipped,\n errors: [],\n }\n}\n\nfunction getPendingMigrationPath(systemDir: string): string {\n return path.join(systemDir, 'settings', PENDING_MIGRATION_FILE)\n}\n\nexport function getPendingNodeDataDirMigration(systemDir: string): PendingDataDirMigration | null {\n const filePath = getPendingMigrationPath(systemDir)\n if (!fs.existsSync(filePath)) return null\n\n try {\n const parsed = JSON.parse(fs.readFileSync(filePath, 'utf-8')) as PendingDataDirMigration\n if (!parsed.from || !parsed.to || typeof parsed.migrate !== 'boolean') return null\n return parsed\n } catch {\n return null\n }\n}\n\nexport function clearPendingNodeDataDirMigration(systemDir: string): void {\n const filePath = getPendingMigrationPath(systemDir)\n if (fs.existsSync(filePath)) {\n fs.unlinkSync(filePath)\n }\n}\n\n// 只删除确认仍是 ChatLab 用户数据目录的旧路径,避免误删用户选择的普通目录。\nexport function deleteOldUserDataDirIfSafe(\n dirPath: string,\n currentDir: string,\n removeDir?: (dir: string) => void\n): boolean {\n if (path.resolve(dirPath) === path.resolve(currentDir)) return false\n if (!isPathSafe(dirPath)) return false\n if (!fs.existsSync(dirPath)) return false\n if (!isExistingUserDataDir(dirPath)) return false\n\n const remove = removeDir ?? ((dir: string) => fs.rmSync(dir, { recursive: true, force: true }))\n remove(dirPath)\n return true\n}\n\nfunction writePendingNodeDataDirMigration(systemDir: string, pending: PendingDataDirMigration): void {\n const filePath = getPendingMigrationPath(systemDir)\n ensureDir(path.dirname(filePath))\n fs.writeFileSync(filePath, JSON.stringify(pending, null, 2), 'utf-8')\n}\n\nexport function createNodeDataDirSwitch(input: {\n systemDir: string\n currentDir: string\n targetDir: string | null\n defaultDir?: string\n migrate?: boolean\n envDataDir?: string\n}): DataDirSwitchResult {\n if (input.envDataDir) {\n return { success: false, error: 'CHATLAB_DATA_DIR is set, data directory cannot be changed from Web UI' }\n }\n\n const newDir = (input.targetDir?.trim() || input.defaultDir || '').trim()\n if (!newDir) return { success: false, error: 'Data directory is required' }\n if (!path.isAbsolute(newDir)) return { success: false, error: 'Data directory must be an absolute path' }\n if (!isPathSafe(newDir)) return { success: false, error: 'System directories cannot be used as data directory' }\n\n const migrate = input.migrate !== false\n if (migrate && path.resolve(input.currentDir) !== path.resolve(newDir) && isSubPath(input.currentDir, newDir)) {\n return { success: false, error: 'Target directory cannot be inside current data directory' }\n }\n\n if (!isUserDataDirSafeToUse(newDir)) {\n return { success: false, error: 'Target directory is not empty and is not a ChatLab data directory' }\n }\n\n if (path.resolve(input.currentDir) === path.resolve(newDir)) {\n clearPendingNodeDataDirMigration(input.systemDir)\n return { success: true, from: input.currentDir, to: newDir, requiresRelaunch: false }\n }\n\n const pending = createPendingDataDirMigration({\n from: input.currentDir,\n to: newDir,\n migrate,\n targetWasEmpty: isDirectoryEmptyOrMissing(newDir),\n })\n writePendingNodeDataDirMigration(input.systemDir, pending)\n\n return { success: true, from: input.currentDir, to: newDir, requiresRelaunch: true }\n}\n\nexport function applyPendingNodeDataDirMigration(\n systemDir: string,\n deps: ApplyPendingNodeDataDirMigrationDeps = {}\n): {\n success: boolean\n skipped?: boolean\n error?: string\n} {\n const pending = getPendingNodeDataDirMigration(systemDir)\n if (!pending) return { success: true, skipped: true }\n const writeConfig = deps.writeConfigField ?? writeConfigField\n\n const result = runPendingDataDirMigration(pending, {\n writeUserDataDir(dir) {\n writeConfig('data', 'user_data_dir', dir)\n writeConfig('data', 'electron_migration_done', true)\n },\n clearPendingMigration() {\n clearPendingNodeDataDirMigration(systemDir)\n },\n markPendingDeleteDir(dir) {\n deleteOldUserDataDirIfSafe(dir, pending.to, deps.removeDir)\n },\n })\n\n if (!result.success) {\n return { success: false, error: result.errors.join('; ') || 'Data directory migration failed' }\n }\n\n return { success: true }\n}\n","/**\n * JiebaNlpProvider — NlpProvider 实现(基于 @node-rs/jieba)\n *\n * 提供给 @openchatlab/core 的 getLanguagePreferenceAnalysis 使用。\n * 仅在 Node.js 环境中可用(Electron worker / CLI server)。\n *\n * 使用 nlp/segmenter 的共享 getJieba() 实例,自动加载磁盘词库。\n */\n\nimport type { NlpProvider, PosTagResult } from '@openchatlab/core'\nimport { MEANINGFUL_POS_TAGS, isStopword } from '@openchatlab/core'\nimport { getJieba } from './nlp/segmenter'\nimport type { DictType } from '@openchatlab/core'\n\nexport function createJiebaNlpProvider(dictType: DictType = 'default'): NlpProvider {\n return {\n tag(text: string): PosTagResult[] {\n return getJieba(dictType).tag(text)\n },\n isStopword,\n meaningfulPosTags: MEANINGFUL_POS_TAGS,\n }\n}\n","/**\n * PreferencesManager — manages ~/.chatlab/preferences.json\n *\n * Stores complex user preferences that cannot fit into config.toml\n * (arrays, nested objects) and need cross-client consistency.\n */\n\nimport * as fs from 'fs'\nimport * as path from 'path'\nimport { DESENSITIZE_RULES_SCHEMA_VERSION } from './ai/preprocessor'\nimport type {\n Preferences,\n AIGlobalSettings,\n AIPreprocessConfig,\n WordFilterScheme,\n KeywordTemplate,\n ContextCompressionSettings,\n DesensitizeRule,\n FilterHistoryItem,\n} from '@openchatlab/shared-types'\n\nexport type {\n Preferences,\n AIGlobalSettings,\n AIPreprocessConfig,\n WordFilterScheme,\n KeywordTemplate,\n ContextCompressionSettings,\n DesensitizeRule,\n FilterHistoryItem,\n}\n\nconst DEFAULTS: Preferences = {\n pinnedSessionIds: [],\n aiPreprocessConfig: {\n dataCleaning: true,\n mergeConsecutive: true,\n mergeWindowSeconds: 180,\n blacklistKeywords: [],\n denoise: true,\n desensitize: true,\n desensitizeRulesSchemaVersion: DESENSITIZE_RULES_SCHEMA_VERSION,\n desensitizeBuiltinRuleOverrides: {},\n desensitizeRules: [],\n anonymizeNames: false,\n },\n aiGlobalSettings: {\n maxMessagesPerRequest: 1000,\n exportFormat: 'markdown',\n sqlExportFormat: 'csv',\n enableAutoSkill: true,\n chartAutoMode: 'suggest',\n searchContextBefore: 2,\n searchContextAfter: 2,\n contextCompression: {\n enabled: true,\n tokenThresholdPercent: 75,\n bufferSizePercent: 20,\n maxToolResultPercent: 50,\n },\n },\n customKeywordTemplates: [],\n deletedPresetTemplateIds: [],\n wordFilter: {\n schemes: [],\n defaultSchemeId: null,\n sessionSchemeOverrides: {},\n },\n filterHistory: [],\n thinkingLevels: {},\n ownerProfilesByPlatform: {},\n ownerPromptDismissedSessionIds: [],\n}\n\nexport class PreferencesManager {\n private filePath: string\n private cache: Preferences | null = null\n\n constructor(systemDir: string) {\n this.filePath = path.join(systemDir, 'preferences.json')\n }\n\n load(): Preferences {\n if (this.cache) return this.cache\n\n try {\n if (fs.existsSync(this.filePath)) {\n const raw = fs.readFileSync(this.filePath, 'utf-8')\n const parsed = JSON.parse(raw) as Partial<Preferences>\n const migrated = this.migrateLegacyDesensitizeRules(parsed, raw)\n this.cache = this.mergeDefaults(migrated.preferences)\n if (migrated.changed) {\n this.writePreferences(this.cache)\n }\n return this.cache\n }\n } catch (err) {\n console.warn('[Preferences] Failed to load preferences.json:', err)\n }\n\n this.cache = { ...DEFAULTS }\n return this.cache\n }\n\n save(partial: Partial<Preferences>): { success: boolean; error?: string } {\n try {\n const current = this.load()\n const merged = this.deepMerge(\n current as unknown as Record<string, unknown>,\n partial as unknown as Record<string, unknown>\n )\n if (Object.prototype.hasOwnProperty.call(partial.aiPreprocessConfig ?? {}, 'desensitizeBuiltinRuleOverrides')) {\n const mergedAiPreprocessConfig = merged.aiPreprocessConfig as Record<string, unknown>\n mergedAiPreprocessConfig.desensitizeBuiltinRuleOverrides =\n partial.aiPreprocessConfig?.desensitizeBuiltinRuleOverrides\n }\n this.cache = this.mergeDefaults(merged as unknown as Partial<Preferences>)\n\n this.writePreferences(this.cache)\n return { success: true }\n } catch (err) {\n const msg = err instanceof Error ? err.message : String(err)\n console.error('[Preferences] Failed to save:', msg)\n return { success: false, error: msg }\n }\n }\n\n getFilePath(): string {\n return this.filePath\n }\n\n invalidateCache(): void {\n this.cache = null\n }\n\n private mergeDefaults(partial: Partial<Preferences>): Preferences {\n return {\n pinnedSessionIds: partial.pinnedSessionIds ?? DEFAULTS.pinnedSessionIds,\n aiPreprocessConfig: partial.aiPreprocessConfig\n ? this.normalizeAiPreprocessConfig(partial.aiPreprocessConfig)\n : { ...DEFAULTS.aiPreprocessConfig },\n aiGlobalSettings: partial.aiGlobalSettings\n ? {\n ...DEFAULTS.aiGlobalSettings,\n ...partial.aiGlobalSettings,\n contextCompression: {\n ...DEFAULTS.aiGlobalSettings.contextCompression,\n ...(partial.aiGlobalSettings.contextCompression ?? {}),\n },\n }\n : { ...DEFAULTS.aiGlobalSettings },\n customKeywordTemplates: partial.customKeywordTemplates ?? DEFAULTS.customKeywordTemplates,\n deletedPresetTemplateIds: partial.deletedPresetTemplateIds ?? DEFAULTS.deletedPresetTemplateIds,\n wordFilter: partial.wordFilter ? { ...DEFAULTS.wordFilter, ...partial.wordFilter } : { ...DEFAULTS.wordFilter },\n filterHistory: partial.filterHistory ?? DEFAULTS.filterHistory,\n thinkingLevels: partial.thinkingLevels ?? DEFAULTS.thinkingLevels,\n ownerProfilesByPlatform: partial.ownerProfilesByPlatform ?? DEFAULTS.ownerProfilesByPlatform,\n ownerPromptDismissedSessionIds: partial.ownerPromptDismissedSessionIds ?? DEFAULTS.ownerPromptDismissedSessionIds,\n }\n }\n\n private normalizeAiPreprocessConfig(partial: Partial<AIPreprocessConfig> | undefined): AIPreprocessConfig {\n const defaults = DEFAULTS.aiPreprocessConfig\n const rules = Array.isArray(partial?.desensitizeRules) ? partial.desensitizeRules : []\n const customRules = rules.filter((rule) => !rule.builtin)\n return {\n dataCleaning: partial?.dataCleaning ?? defaults.dataCleaning,\n mergeConsecutive: partial?.mergeConsecutive ?? defaults.mergeConsecutive,\n mergeWindowSeconds: partial?.mergeWindowSeconds ?? defaults.mergeWindowSeconds,\n blacklistKeywords: partial?.blacklistKeywords ?? defaults.blacklistKeywords,\n denoise: partial?.denoise ?? defaults.denoise,\n desensitize: partial?.desensitize ?? defaults.desensitize,\n desensitizeRulesSchemaVersion: DESENSITIZE_RULES_SCHEMA_VERSION,\n desensitizeBuiltinRuleOverrides: this.normalizeBooleanMap(partial?.desensitizeBuiltinRuleOverrides),\n desensitizeRules: customRules,\n anonymizeNames: partial?.anonymizeNames ?? defaults.anonymizeNames,\n }\n }\n\n private normalizeBooleanMap(value: unknown): Record<string, boolean> {\n if (!value || typeof value !== 'object' || Array.isArray(value)) return {}\n const result: Record<string, boolean> = {}\n for (const [key, flag] of Object.entries(value as Record<string, unknown>)) {\n if (typeof flag === 'boolean') result[key] = flag\n }\n return result\n }\n\n private migrateLegacyDesensitizeRules(\n partial: Partial<Preferences>,\n rawContent: string\n ): { preferences: Partial<Preferences>; changed: boolean } {\n const rules = partial.aiPreprocessConfig?.desensitizeRules\n if (!Array.isArray(rules) || !rules.some((rule) => rule.builtin)) {\n return { preferences: partial, changed: false }\n }\n\n this.backupLegacyPreferences(rawContent)\n\n const legacyBuiltinRuleOverrides = rules\n .filter((rule) => rule.builtin && typeof rule.enabled === 'boolean')\n .reduce<Record<string, boolean>>((overrides, rule) => {\n overrides[rule.id] = rule.enabled\n return overrides\n }, {})\n const existingOverrides = this.normalizeBooleanMap(partial.aiPreprocessConfig?.desensitizeBuiltinRuleOverrides)\n\n return {\n preferences: {\n ...partial,\n aiPreprocessConfig: {\n ...partial.aiPreprocessConfig,\n desensitizeRulesSchemaVersion: DESENSITIZE_RULES_SCHEMA_VERSION,\n desensitizeBuiltinRuleOverrides: {\n ...legacyBuiltinRuleOverrides,\n ...existingOverrides,\n },\n desensitizeRules: rules.filter((rule) => !rule.builtin),\n },\n } as Partial<Preferences>,\n changed: true,\n }\n }\n\n private backupLegacyPreferences(rawContent: string): void {\n const backupDir = path.join(path.dirname(this.filePath), 'backups')\n if (!fs.existsSync(backupDir)) {\n fs.mkdirSync(backupDir, { recursive: true })\n }\n const timestamp = new Date().toISOString().replace(/[:.]/g, '-')\n const backupPath = path.join(backupDir, `preferences-pre-desensitize-groups-${timestamp}.json`)\n fs.writeFileSync(backupPath, rawContent, 'utf-8')\n console.info(`[Preferences] Backed up legacy desensitize rules to ${backupPath}`)\n }\n\n private writePreferences(preferences: Preferences): void {\n const dir = path.dirname(this.filePath)\n if (!fs.existsSync(dir)) {\n fs.mkdirSync(dir, { recursive: true })\n }\n fs.writeFileSync(this.filePath, JSON.stringify(preferences, null, 2), 'utf-8')\n }\n\n /**\n * Deep merge: arrays are replaced (not concatenated), objects are merged.\n */\n private deepMerge(base: Record<string, unknown>, override: Record<string, unknown>): Record<string, unknown> {\n const result = { ...base }\n for (const [key, value] of Object.entries(override)) {\n if (value === undefined) continue\n if (\n value !== null &&\n typeof value === 'object' &&\n !Array.isArray(value) &&\n typeof base[key] === 'object' &&\n base[key] !== null &&\n !Array.isArray(base[key])\n ) {\n result[key] = this.deepMerge(base[key] as Record<string, unknown>, value as Record<string, unknown>)\n } else {\n result[key] = value\n }\n }\n return result\n }\n}\n","/**\n * Merger orchestration — abstract data-source reading, conflict checking,\n * merge assembly, and ChatLab output formatting.\n *\n * Decoupled from Electron-specific TempDbReader via MergerDataSource interface.\n */\n\nimport {\n getCollidingPlatformIds,\n normalizePlatformId,\n detectConflictsInMessages,\n mergeMergerMembers,\n generateMessageKey,\n type MergerMember,\n type MergerMessage,\n type ConflictCheckResult,\n type MergedMember,\n type MergedMessage,\n} from '@openchatlab/core'\n\n// ==================== Data source abstraction ====================\n\nexport interface MergerSourceMeta {\n name: string\n platform: string\n type: string\n groupId?: string\n groupAvatar?: string\n}\n\n/**\n * Abstract data source for merger input.\n * In Electron, this wraps TempDbReader. Other platforms can implement\n * their own (e.g. reading from IndexedDB, REST API, etc.).\n */\nexport interface MergerDataSource {\n getMeta(): MergerSourceMeta | null\n getMembers(): MergerMember[]\n getMessageCount(): number\n streamMessages(batchSize: number, callback: (messages: MergerMessage[]) => void): void\n}\n\n// ==================== Output types ====================\n\nexport interface MergeSourceInfo {\n filename: string\n platform: string\n messageCount: number\n}\n\nexport interface ChatLabHeader {\n version: string\n exportedAt: number\n generator: string\n description: string\n}\n\nexport interface ChatLabMeta {\n name: string\n platform: string\n type: string\n sources: MergeSourceInfo[]\n groupId?: string\n groupAvatar?: string\n}\n\nexport interface ChatLabOutput {\n chatlab: ChatLabHeader\n meta: ChatLabMeta\n members: MergedMember[]\n messages: MergedMessage[]\n}\n\n// ==================== Conflict checking ====================\n\nexport function checkConflictsFromSources(\n dataSources: Array<{ source: MergerDataSource; filename: string }>\n): ConflictCheckResult {\n const allMessages: Array<{ msg: MergerMessage; source: string; platform: string }> = []\n\n for (const { source, filename } of dataSources) {\n const meta = source.getMeta()\n const platform = meta?.platform || 'unknown'\n source.streamMessages(10000, (messages) => {\n for (const msg of messages) {\n allMessages.push({ msg, source: filename, platform })\n }\n })\n }\n\n return detectConflictsInMessages(allMessages)\n}\n\n// ==================== Merge orchestration ====================\n\nexport interface MergeOrchestrationResult {\n success: true\n chatLabData: ChatLabOutput\n}\n\n/**\n * Build a merged ChatLabOutput from multiple data sources.\n * Pure orchestration: reads data sources, calls core algorithms,\n * assembles the output. Does NOT write to disk or import to DB.\n */\nexport function buildMergedOutput(\n dataSources: Array<{ source: MergerDataSource; filename: string }>,\n outputName: string\n): MergeOrchestrationResult {\n const metas = dataSources.map(({ source, filename }) => ({\n meta: source.getMeta(),\n members: source.getMembers(),\n filename,\n source,\n }))\n\n const collidingIds = getCollidingPlatformIds(\n metas.map(({ meta, members }) => ({\n platform: meta?.platform || 'unknown',\n members: members.map((m) => ({ platformId: m.platformId })),\n }))\n )\n\n const memberMap = mergeMergerMembers(\n metas.map(({ meta, members }) => ({\n platform: meta?.platform || 'unknown',\n members,\n })),\n collidingIds\n )\n\n // Streaming dedup: process batches to avoid loading all into memory\n const seenKeys = new Set<string>()\n const mergedMessages: MergedMessage[] = []\n\n for (const { source, meta } of metas) {\n const platform = meta?.platform || 'unknown'\n source.streamMessages(10000, (messages) => {\n for (const msg of messages) {\n const nid = normalizePlatformId(msg.senderPlatformId, platform, collidingIds)\n const key = generateMessageKey(msg.timestamp, nid, msg.content ?? null)\n if (seenKeys.has(key)) continue\n seenKeys.add(key)\n mergedMessages.push({\n sender: nid,\n accountName: msg.senderAccountName,\n groupNickname: msg.senderGroupNickname,\n timestamp: msg.timestamp,\n type: msg.type,\n content: msg.content,\n })\n }\n })\n }\n\n mergedMessages.sort((a, b) => a.timestamp - b.timestamp)\n\n const sources: MergeSourceInfo[] = dataSources.map(({ source, filename }) => ({\n filename,\n platform: source.getMeta()?.platform || 'unknown',\n messageCount: source.getMessageCount(),\n }))\n\n const uniquePlatforms = [...new Set(metas.map(({ meta }) => meta?.platform || 'unknown'))]\n const platform = uniquePlatforms.length === 1 ? uniquePlatforms[0] : 'mixed'\n\n const groupIds = new Set(metas.map(({ meta }) => meta?.groupId).filter(Boolean))\n const groupId = groupIds.size === 1 ? metas.find(({ meta }) => meta?.groupId)?.meta?.groupId : undefined\n const groupAvatar = groupId\n ? metas.filter(({ meta }) => meta?.groupId === groupId).pop()?.meta?.groupAvatar\n : undefined\n\n const chatLabData: ChatLabOutput = {\n chatlab: {\n version: '0.0.1',\n exportedAt: Math.floor(Date.now() / 1000),\n generator: 'ChatLab Merge Tool',\n description: `Merged from ${dataSources.length} files`,\n },\n meta: {\n name: outputName,\n platform,\n type: metas[0]?.meta?.type || 'group',\n sources,\n groupId,\n groupAvatar,\n },\n members: Array.from(memberMap.values()),\n messages: mergedMessages,\n }\n\n return { success: true, chatLabData }\n}\n\n// ==================== JSONL serialization ====================\n\n/**\n * Serialize ChatLabOutput to JSONL lines (generator for streaming writes).\n */\nexport function* serializeChatLabToJsonl(data: ChatLabOutput): Generator<string> {\n yield JSON.stringify({\n _type: 'header',\n chatlab: data.chatlab,\n meta: data.meta,\n })\n\n for (const member of data.members) {\n yield JSON.stringify({ _type: 'member', ...member })\n }\n\n for (const msg of data.messages) {\n yield JSON.stringify({ _type: 'message', ...msg })\n }\n}\n","import * as fs from 'fs'\nimport * as path from 'path'\n\nconst REGIONS: Record<string, string> = {\n US: 'https://us.aptabase.com',\n EU: 'https://eu.aptabase.com',\n}\n\ninterface AnalyticsData {\n lastReportDate: string | null\n firstReportDate: string | null\n enabled: boolean\n}\n\nconst DEFAULT_DATA: AnalyticsData = { lastReportDate: null, firstReportDate: null, enabled: true }\n\nexport class AnalyticsService {\n private readonly dataPath: string\n private readonly endpoint: string | null\n private readonly appKey: string\n private readonly appVersion: string\n private readonly sessionId: string\n\n constructor(systemDir: string, appKey: string, appVersion: string) {\n this.dataPath = path.join(systemDir, 'analytics.json')\n this.appKey = appKey\n this.appVersion = appVersion\n this.sessionId = `${Math.floor(Date.now() / 1000)}${Math.floor(Math.random() * 1e8)\n .toString()\n .padStart(8, '0')}`\n const parts = appKey.split('-')\n const base = parts.length === 3 ? REGIONS[parts[1]] : undefined\n this.endpoint = base ? `${base}/api/v0/event` : null\n }\n\n private load(): AnalyticsData {\n try {\n if (fs.existsSync(this.dataPath)) {\n return { ...DEFAULT_DATA, ...JSON.parse(fs.readFileSync(this.dataPath, 'utf-8')) }\n }\n } catch (_e) {\n // Corrupted or unreadable file — fall back to defaults\n }\n return { ...DEFAULT_DATA }\n }\n\n private save(data: AnalyticsData): void {\n try {\n fs.writeFileSync(this.dataPath, JSON.stringify(data, null, 2), 'utf-8')\n } catch (e) {\n console.error('[Analytics] Failed to save:', e)\n }\n }\n\n getEnabled(): boolean {\n return this.load().enabled\n }\n\n setEnabled(enabled: boolean): void {\n const data = this.load()\n data.enabled = enabled\n this.save(data)\n }\n\n async track(eventName: string, props?: Record<string, string | number>): Promise<boolean> {\n if (!this.endpoint) return false\n if (!this.getEnabled()) return false\n try {\n const resp = await fetch(this.endpoint, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json', 'App-Key': this.appKey },\n body: JSON.stringify({\n timestamp: new Date().toISOString(),\n sessionId: this.sessionId,\n eventName,\n systemProps: {\n isDebug: false,\n locale: '',\n osName: process.platform,\n osVersion: '',\n engineName: 'Node.js',\n engineVersion: process.versions.node,\n appVersion: this.appVersion,\n sdkVersion: 'chatlab@1',\n },\n props,\n }),\n })\n return resp.ok\n } catch (e) {\n console.error(`[Analytics] Failed to track ${eventName}:`, e)\n return false\n }\n }\n\n async trackDailyActive(props?: Record<string, string | number>): Promise<void> {\n if (!this.endpoint) return\n const data = this.load()\n if (!data.enabled) return\n const today = new Date().toISOString().slice(0, 10)\n const isNew = data.firstReportDate === null\n if (isNew) data.firstReportDate = today\n if (data.lastReportDate === today) {\n if (isNew) this.save(data)\n return\n }\n const tracked = await this.track(isNew ? 'app_active_new' : 'app_active', props)\n if (!tracked) return\n data.lastReportDate = today\n this.save(data)\n }\n}\n","/**\n * 语义索引模块(Phase 1)\n *\n * 独立于 dormant 的旧 `ai/rag` 模块,按 chunking-decision-final.md 重新实现:\n * 向量存储、parent/child chunker、embedding provider、混合召回与后台预热。\n */\n\nexport { EmbeddingIndexStore } from './store'\nexport type { LoadSqliteVec } from './store'\nexport {\n EMBEDDING_INDEX_SCHEMA,\n CHUNK_VECTOR_INDEX_TABLE,\n CHUNK_VECTOR_INDEX_INDEXES,\n SEMANTIC_INDEX_SESSION_TABLE,\n vecTableName,\n vecTableSchema,\n} from './schema'\nexport { SemanticIndexStateStore } from './session-state-store'\nexport type {\n SemanticIndexSessionState,\n SemanticIndexStatus,\n SemanticIndexCleanupStatus,\n EnableParams,\n ProgressPatch,\n} from './session-state-store'\nexport type {\n ChunkRecord,\n ChunkInsert,\n ChunkStatus,\n DenseQueryParams,\n DenseQueryResult,\n MessageToChunkParams,\n} from './types'\nexport {\n CHUNKER_VERSION,\n STRATEGY_ID,\n DEFAULT_CHUNKER_CONFIG,\n computeChunkerConfigHash,\n computeDbPathHash,\n composeChunkId,\n deriveParentId,\n parseParentBounds,\n} from './chunker-config'\nexport type { ChunkerConfig } from './chunker-config'\nexport { estimateTokens } from './tokens'\nexport {\n SemanticIndexConfigStore,\n defaultSemanticIndexConfig,\n isSemanticIndexConfigured,\n resolveModelId,\n clampSearchMaxResults,\n SEMANTIC_INDEX_CONFIG_VERSION,\n SEARCH_MAX_RESULTS_DEFAULT,\n SEARCH_MAX_RESULTS_MIN,\n SEARCH_MAX_RESULTS_MAX,\n} from './config'\nexport type {\n SemanticIndexConfig,\n SemanticIndexConfigInput,\n SemanticIndexMode,\n SemanticIndexLocalConfig,\n SemanticIndexApiConfig,\n} from './config'\nexport { createEmbedder } from './embedder-factory'\nexport type { EmbedderFactoryDeps } from './embedder-factory'\nexport {\n SemanticIndexService,\n createSemanticIndexService,\n persistSemanticIndexConfig,\n resolveSemanticIndexApiKeySet,\n SEMANTIC_INDEX_AUTH_PROFILE,\n SEMANTIC_INDEX_DB_FILE,\n SEMANTIC_INDEX_CONFIG_FILE,\n} from './service'\nexport type { SemanticIndexRuntime, MaybePromise } from './runtime'\nexport {\n SemanticIndexWorkerClient,\n createSemanticIndexWorkerClient,\n createSemanticIndexWorkerRuntimeClient,\n} from './worker-client'\nexport type {\n SemanticIndexWorkerClientOptions,\n SemanticIndexWorkerRuntimeClientOptions,\n SemanticIndexWorkerTransport,\n SemanticIndexWorkerTransportFactory,\n} from './worker-client'\nexport { createSemanticIndexWorkerThreadTransport } from './worker-thread-transport'\nexport type { SemanticIndexWorkerThreadTransportOptions, SemanticIndexWorkerLike } from './worker-thread-transport'\nexport { StaticPathProvider, snapshotPathProvider } from './static-path-provider'\nexport type { StaticPathProviderSnapshot } from './static-path-provider'\nexport type {\n SemanticIndexServiceOptions,\n SemanticIndexSessionStatus,\n SemanticSearchResult,\n SemanticSearchReason,\n SemanticSearchToolResult,\n SemanticSearchToolSource,\n SemanticSearchToolOptions,\n} from './service'\nexport { runWarmup } from './warmup/runner'\nexport type {\n SemanticMessageSource,\n StopSignal,\n WarmupRunnerOptions,\n WarmupResult,\n WarmupStatus,\n} from './warmup/runner'\nexport { SemanticIndexJobQueue } from './warmup/job-queue'\nexport type { SemanticIndexJob, SemanticIndexJobType, JobContext, JobExecutor } from './warmup/job-queue'\nexport { reciprocalRankFusion } from './retrieval/rrf'\nexport type { RrfResult } from './retrieval/rrf'\nexport { hybridSearch } from './retrieval/hybrid-search'\nexport type { FtsSearcher, HybridSearchDeps, HybridSearchParams, HybridSearchResult } from './retrieval/hybrid-search'\nexport { createChatDbMessageSource } from './chat-db/message-source'\nexport { createChatDbMessageRangeReader } from './chat-db/message-range-reader'\nexport { createChatDbFtsSearcher, extractFtsKeywords } from './chat-db/fts-searcher'\nexport { assembleEvidence, formatEvidenceMessages } from './retrieval/evidence'\nexport type {\n EvidenceMessage,\n MessageRangeReader,\n EvidenceHit,\n EvidenceBudget,\n EvidenceBlock,\n EvidenceResult,\n} from './retrieval/evidence'\nexport { chunkMessages, isSemanticVoid } from './chunker'\nexport type { ChunkMessageInput, ChunkSource, ChunkMessagesInput, ChildChunk, ChunkResult } from './chunker'\nexport * as embedding from './embedding'\n","import path from 'node:path'\nimport type { PathProvider } from '@openchatlab/core'\nimport type { AuthProfile } from '@openchatlab/config'\nimport { resolveApiKey as defaultResolveApiKey } from '@openchatlab/config'\nimport type { SemanticIndexConfig, SemanticIndexConfigInput } from './config'\nimport { isKeylessSemanticIndexApiBaseUrl, SemanticIndexConfigStore } from './config'\nimport {\n SEMANTIC_INDEX_CONFIG_FILE,\n persistSemanticIndexConfig,\n resolveSemanticIndexApiKeySet,\n type SemanticIndexSessionStatus,\n type SemanticSearchResult,\n type SemanticSearchToolOptions,\n type SemanticSearchToolResult,\n} from './service'\nimport type { SemanticIndexRuntime } from './runtime'\nimport type { RuntimeIdentity } from '../data-dir-compat'\nimport { snapshotPathProvider } from './static-path-provider'\nimport { createSemanticIndexWorkerThreadTransport } from './worker-thread-transport'\n\nexport interface SemanticIndexWorkerTransport {\n request<T>(method: string, args: unknown[]): Promise<T>\n close(): void | Promise<void>\n}\n\ntype MaybePromise<T> = T | Promise<T>\n\nexport type SemanticIndexWorkerTransportFactory = (modelDownloadProxyUrl?: string) => SemanticIndexWorkerTransport\n\ninterface WorkerClientTimers {\n setTimeout(callback: () => void, ms: number): unknown\n clearTimeout(timer: unknown): void\n}\n\nexport interface SemanticIndexWorkerClientOptions {\n configStore: SemanticIndexConfigStore\n transportFactory: SemanticIndexWorkerTransportFactory\n idleTimeoutMs?: number\n timers?: WorkerClientTimers\n getModelDownloadProxyUrl?: () => MaybePromise<string | undefined>\n resolveApiKey?: (provider: string, authProfile?: string) => string\n writeAuthProfile?: (name: string, profile: AuthProfile) => void\n}\n\nexport interface SemanticIndexWorkerRuntimeClientOptions {\n pathProvider: PathProvider\n runtime: RuntimeIdentity\n nativeBinding?: string\n sqliteVecLoadablePath?: string\n workerEntryUrl?: string | URL\n idleTimeoutMs?: number\n getModelDownloadProxyUrl?: () => MaybePromise<string | undefined>\n resolveApiKey?: (provider: string, authProfile?: string) => string\n writeAuthProfile?: (name: string, profile: AuthProfile) => void\n}\n\nconst DEFAULT_IDLE_TIMEOUT_MS = 10 * 60 * 1000\n\nconst defaultTimers: WorkerClientTimers = {\n setTimeout: (callback, ms) => setTimeout(callback, ms),\n clearTimeout: (timer) => clearTimeout(timer as ReturnType<typeof setTimeout>),\n}\n\nexport class SemanticIndexWorkerClient implements SemanticIndexRuntime {\n private transport: SemanticIndexWorkerTransport | null = null\n private pendingRequests = 0\n private idleTimer: unknown = null\n private activeBuildSessionIds = new Set<string>()\n private hasUnknownActiveBuild = false\n private activeModelDownloadProxyUrl: string | undefined\n private readonly configStore: SemanticIndexConfigStore\n private readonly transportFactory: SemanticIndexWorkerTransportFactory\n private readonly idleTimeoutMs: number\n private readonly timers: WorkerClientTimers\n private readonly getModelDownloadProxyUrl: () => MaybePromise<string | undefined>\n private readonly resolveApiKey: (provider: string, authProfile?: string) => string\n private readonly writeAuthProfile?: (name: string, profile: AuthProfile) => void\n\n constructor(options: SemanticIndexWorkerClientOptions) {\n this.configStore = options.configStore\n this.transportFactory = options.transportFactory\n this.idleTimeoutMs = options.idleTimeoutMs ?? DEFAULT_IDLE_TIMEOUT_MS\n this.timers = options.timers ?? defaultTimers\n this.getModelDownloadProxyUrl = options.getModelDownloadProxyUrl ?? (() => undefined)\n this.resolveApiKey = options.resolveApiKey ?? defaultResolveApiKey\n this.writeAuthProfile = options.writeAuthProfile\n }\n\n getConfig(): SemanticIndexConfig {\n return this.configStore.get()\n }\n\n async setConfig(config: SemanticIndexConfigInput, options?: { apiKey?: string }): Promise<SemanticIndexConfig> {\n const saved = persistSemanticIndexConfig(this.configStore, config, {\n apiKey: options?.apiKey,\n writeAuthProfile: this.writeAuthProfile,\n })\n if (!saved.enabled) this.clearActiveBuildTracking()\n // 本地模式且功能开启时,即使 worker 未运行也需启动它以触发 preload;\n // 其余情况(disabled / api 模式)无需唤醒 worker,直接返回本地保存结果。\n const needsWorker = saved.enabled && saved.mode === 'local' && this.configStore.isConfigured()\n if (!this.transport && !needsWorker) return saved\n if (needsWorker) await this.closeTransportForLocalModelProxyChangeIfNeeded()\n return await this.call<SemanticIndexConfig>('setConfig', [saved])\n }\n\n isConfigured(): boolean {\n return this.configStore.isConfigured()\n }\n\n hasApiKey(): boolean {\n return resolveSemanticIndexApiKeySet(this.configStore.get(), this.resolveApiKey)\n }\n\n async getModelStatus(): Promise<'idle' | 'downloading' | 'ready' | 'error'> {\n if (!this.transport) return 'idle'\n return this.call<'idle' | 'downloading' | 'ready' | 'error'>('getModelStatus', [])\n }\n\n enable(sessionId: string): Promise<void> {\n return this.call('enable', [sessionId])\n }\n\n remove(sessionId: string): Promise<void> {\n return this.call('remove', [sessionId])\n }\n\n async build(sessionId: string): Promise<void> {\n await this.closeTransportForLocalModelProxyChangeIfNeeded()\n this.activeBuildSessionIds.add(sessionId)\n try {\n await this.call('build', [sessionId])\n } catch (error) {\n this.activeBuildSessionIds.delete(sessionId)\n throw error\n }\n }\n\n pause(sessionId: string): Promise<void> {\n return this.call('pause', [sessionId])\n }\n\n cancel(sessionId: string): Promise<void> {\n return this.call('cancel', [sessionId])\n }\n\n async rebuild(sessionId: string): Promise<void> {\n await this.closeTransportForLocalModelProxyChangeIfNeeded()\n this.activeBuildSessionIds.add(sessionId)\n try {\n await this.call('rebuild', [sessionId])\n } catch (error) {\n this.activeBuildSessionIds.delete(sessionId)\n throw error\n }\n }\n\n async buildAllPending(): Promise<void> {\n await this.closeTransportForLocalModelProxyChangeIfNeeded()\n this.hasUnknownActiveBuild = true\n try {\n await this.call('buildAllPending', [])\n } catch (error) {\n this.hasUnknownActiveBuild = false\n throw error\n }\n }\n\n async listEnabledStatuses(): Promise<SemanticIndexSessionStatus[]> {\n const statuses = await this.callProbe<SemanticIndexSessionStatus[]>('listEnabledStatuses', [], [], {\n scheduleIdle: false,\n })\n this.updateActiveBuildFromCompleteSnapshot(statuses)\n this.scheduleIdleCloseIfNeeded()\n return statuses\n }\n\n async status(sessionId: string): Promise<SemanticIndexSessionStatus | null> {\n const status = await this.callProbe<SemanticIndexSessionStatus | null>('status', [sessionId], null, {\n scheduleIdle: false,\n })\n this.updateActiveBuildFromPartialSnapshot([sessionId], status ? [status] : [])\n this.scheduleIdleCloseIfNeeded()\n return status\n }\n\n async statusForSessions(sessionIds: string[]): Promise<SemanticIndexSessionStatus[]> {\n const statuses = await this.callProbe<SemanticIndexSessionStatus[]>('statusForSessions', [sessionIds], [], {\n scheduleIdle: false,\n })\n this.updateActiveBuildFromPartialSnapshot(sessionIds, statuses)\n this.scheduleIdleCloseIfNeeded()\n return statuses\n }\n\n async canSearch(sessionId: string): Promise<boolean> {\n if (!this.canRunFromLocalConfig()) return false\n return await this.callProbe<boolean>('canSearch', [sessionId], false)\n }\n\n async search(\n sessionId: string,\n query: string,\n options?: { finalTopK?: number; timeRangeMs?: { startTs?: number; endTs?: number } }\n ): Promise<SemanticSearchResult> {\n await this.closeTransportForLocalModelProxyChangeIfNeeded()\n return await this.call('search', [sessionId, query, options])\n }\n\n async searchForTool(\n sessionId: string,\n query: string,\n options?: SemanticSearchToolOptions\n ): Promise<SemanticSearchToolResult> {\n await this.closeTransportForLocalModelProxyChangeIfNeeded()\n return await this.call('searchForTool', [sessionId, query, options])\n }\n\n cleanupUnused(): Promise<{ cleaned: number }> {\n return this.call('cleanupUnused', [])\n }\n\n recover(): Promise<void> {\n return this.call('recover', [])\n }\n\n async close(): Promise<void> {\n this.clearIdleTimer()\n await this.closeTransport()\n }\n\n private async call<T>(method: string, args: unknown[], options?: { scheduleIdle?: boolean }): Promise<T> {\n const transport = await this.ensureTransport()\n this.pendingRequests++\n this.clearIdleTimer()\n try {\n return await transport.request<T>(method, args)\n } finally {\n this.pendingRequests--\n if (options?.scheduleIdle !== false) this.scheduleIdleCloseIfNeeded()\n }\n }\n\n private async callProbe<T>(\n method: string,\n args: unknown[],\n fallback: T,\n options?: { scheduleIdle?: boolean }\n ): Promise<T> {\n try {\n return await this.call<T>(method, args, options)\n } catch {\n await this.closeFailedProbeTransport()\n return fallback\n }\n }\n\n private async ensureTransport(): Promise<SemanticIndexWorkerTransport> {\n if (!this.transport) {\n const proxyUrl = await this.currentModelDownloadProxyUrl()\n if (!this.transport) {\n this.activeModelDownloadProxyUrl = proxyUrl\n this.transport = this.transportFactory(proxyUrl)\n }\n }\n return this.transport\n }\n\n private async currentModelDownloadProxyUrl(): Promise<string | undefined> {\n const proxyUrl = (await this.getModelDownloadProxyUrl())?.trim()\n return proxyUrl || undefined\n }\n\n private async closeTransportForLocalModelProxyChangeIfNeeded(): Promise<void> {\n if (!this.transport) return\n const config = this.configStore.get()\n if (!this.configStore.canRun() || config.mode !== 'local') return\n if (this.hasUnknownActiveBuild || this.activeBuildSessionIds.size > 0) return\n if ((await this.currentModelDownloadProxyUrl()) === this.activeModelDownloadProxyUrl) return\n await this.closeTransport()\n }\n\n private canRunFromLocalConfig(): boolean {\n const config = this.configStore.get()\n if (!this.configStore.canRun()) return false\n if (config.mode !== 'api') return true\n if (isKeylessSemanticIndexApiBaseUrl(config.api?.baseUrl)) return true\n return resolveSemanticIndexApiKeySet(config, this.resolveApiKey)\n }\n\n private updateActiveBuildFromCompleteSnapshot(statuses: SemanticIndexSessionStatus[]): void {\n this.hasUnknownActiveBuild = false\n this.activeBuildSessionIds = new Set(\n statuses.filter((status) => this.isActiveBuildStatus(status)).map((status) => status.sessionId)\n )\n }\n\n private updateActiveBuildFromPartialSnapshot(\n requestedSessionIds: string[],\n statuses: SemanticIndexSessionStatus[]\n ): void {\n const bySessionId = new Map(statuses.map((status) => [status.sessionId, status]))\n for (const sessionId of requestedSessionIds) {\n const status = bySessionId.get(sessionId)\n if (status && this.isActiveBuildStatus(status)) this.activeBuildSessionIds.add(sessionId)\n else this.activeBuildSessionIds.delete(sessionId)\n }\n }\n\n private isActiveBuildStatus(status: SemanticIndexSessionStatus): boolean {\n return status.running || status.queued || status.indexStatus === 'running'\n }\n\n private clearActiveBuildTracking(): void {\n this.hasUnknownActiveBuild = false\n this.activeBuildSessionIds.clear()\n }\n\n private scheduleIdleCloseIfNeeded(): void {\n if (\n !this.transport ||\n this.pendingRequests > 0 ||\n this.hasUnknownActiveBuild ||\n this.activeBuildSessionIds.size > 0\n )\n return\n this.clearIdleTimer()\n this.idleTimer = this.timers.setTimeout(() => {\n void this.closeTransport().catch((err) => {\n console.warn('[semantic-index] idle worker close failed:', err instanceof Error ? err.message : String(err))\n })\n }, this.idleTimeoutMs)\n }\n\n private clearIdleTimer(): void {\n if (this.idleTimer) {\n this.timers.clearTimeout(this.idleTimer)\n this.idleTimer = null\n }\n }\n\n private async closeTransport(): Promise<void> {\n const transport = this.transport\n this.transport = null\n this.activeModelDownloadProxyUrl = undefined\n this.clearActiveBuildTracking()\n if (transport) await transport.close()\n }\n\n private async closeFailedProbeTransport(): Promise<void> {\n this.clearIdleTimer()\n try {\n await this.closeTransport()\n } catch {\n // 语义索引探针失败只降级为不可用,不能打断普通 AI 对话流程。\n }\n }\n}\n\nexport function createSemanticIndexWorkerClient(options: SemanticIndexWorkerClientOptions): SemanticIndexWorkerClient {\n return new SemanticIndexWorkerClient(options)\n}\n\nexport function createSemanticIndexWorkerRuntimeClient(\n options: SemanticIndexWorkerRuntimeClientOptions\n): SemanticIndexWorkerClient {\n const configStore = new SemanticIndexConfigStore(\n path.join(options.pathProvider.getAiDataDir(), SEMANTIC_INDEX_CONFIG_FILE)\n )\n return createSemanticIndexWorkerClient({\n configStore,\n idleTimeoutMs: options.idleTimeoutMs,\n resolveApiKey: options.resolveApiKey,\n writeAuthProfile: options.writeAuthProfile,\n getModelDownloadProxyUrl: options.getModelDownloadProxyUrl,\n transportFactory: (modelDownloadProxyUrl) =>\n createSemanticIndexWorkerThreadTransport({\n workerEntryUrl: options.workerEntryUrl,\n startup: {\n paths: snapshotPathProvider(options.pathProvider),\n runtime: options.runtime,\n nativeBinding: options.nativeBinding,\n sqliteVecLoadablePath: options.sqliteVecLoadablePath,\n modelDownloadProxyUrl,\n },\n }),\n })\n}\n","import { Worker } from 'node:worker_threads'\nimport type { WorkerOptions } from 'node:worker_threads'\nimport type { SemanticIndexWorkerTransport } from './worker-client'\nimport type { SemanticIndexWorkerStartupOptions } from './worker-runtime'\n\nexport interface SemanticIndexWorkerLike {\n postMessage(message: unknown): void\n terminate(): Promise<number>\n on(event: 'message', listener: (message: unknown) => void): this\n on(event: 'error', listener: (error: Error) => void): this\n on(event: 'exit', listener: (code: number) => void): this\n}\n\nexport interface SemanticIndexWorkerThreadTransportOptions {\n startup: SemanticIndexWorkerStartupOptions\n workerFactory?: () => SemanticIndexWorkerLike\n workerEntryUrl?: string | URL\n closeTimeoutMs?: number\n}\n\ninterface PendingRequest {\n resolve: (value: unknown) => void\n reject: (error: Error) => void\n}\n\nconst DEFAULT_CLOSE_TIMEOUT_MS = 3_000\n\ntype ModuleWorkerOptions = WorkerOptions & { type: 'module' }\n\nfunction defaultWorkerEntryUrl(): URL {\n return import.meta.url.endsWith('.ts')\n ? new URL('./worker-thread-entry.ts', import.meta.url)\n : new URL('./worker-thread-entry.js', import.meta.url)\n}\n\nfunction normalizeWorkerEntryUrl(entryUrl?: string | URL): URL {\n if (!entryUrl) return defaultWorkerEntryUrl()\n return typeof entryUrl === 'string' ? new URL(entryUrl) : entryUrl\n}\n\nfunction createDefaultWorker(\n startup: SemanticIndexWorkerStartupOptions,\n entryUrlInput?: string | URL\n): SemanticIndexWorkerLike {\n const entryUrl = normalizeWorkerEntryUrl(entryUrlInput)\n if (!entryUrl.href.endsWith('.ts')) {\n return new Worker(entryUrl, { workerData: startup }) as SemanticIndexWorkerLike\n }\n\n const bootstrap = `\n import { register } from 'tsx/esm/api';\n register();\n await import(${JSON.stringify(entryUrl.href)});\n `\n const options: ModuleWorkerOptions = {\n eval: true,\n type: 'module',\n workerData: startup,\n execArgv: [],\n }\n return new Worker(bootstrap, options) as SemanticIndexWorkerLike\n}\n\nexport class SemanticIndexWorkerThreadTransport implements SemanticIndexWorkerTransport {\n private worker: SemanticIndexWorkerLike\n private pending = new Map<string, PendingRequest>()\n private requestId = 0\n private readonly closeTimeoutMs: number\n\n constructor(options: SemanticIndexWorkerThreadTransportOptions) {\n this.closeTimeoutMs = options.closeTimeoutMs ?? DEFAULT_CLOSE_TIMEOUT_MS\n this.worker = options.workerFactory?.() ?? createDefaultWorker(options.startup, options.workerEntryUrl)\n\n this.worker.on('message', (message) => this.handleMessage(message))\n this.worker.on('error', (error) => this.rejectAll(error))\n this.worker.on('exit', (code) => {\n if (code !== 0) this.rejectAll(new Error(`Semantic index worker exited with code ${code}`))\n })\n }\n\n request<T>(method: string, args: unknown[]): Promise<T> {\n const id = `si_${++this.requestId}`\n return new Promise<T>((resolve, reject) => {\n this.pending.set(id, { resolve: resolve as (value: unknown) => void, reject })\n this.worker.postMessage({ id, method, args })\n })\n }\n\n async close(): Promise<void> {\n await this.requestRuntimeClose()\n await this.worker.terminate()\n this.rejectAll(new Error('Semantic index worker closed'))\n }\n\n private async requestRuntimeClose(): Promise<void> {\n let timeout: ReturnType<typeof setTimeout> | null = null\n const timeoutPromise = new Promise<void>((resolve) => {\n timeout = setTimeout(resolve, this.closeTimeoutMs)\n })\n\n try {\n // 先让 worker 内的 service 正常 close,避免 SQLite/vector 资源被直接中断;超时后仍会 terminate。\n await Promise.race([this.request('__close', []).then(() => undefined), timeoutPromise])\n } catch {\n // Worker may already be gone; terminate below still clears local state.\n } finally {\n if (timeout) clearTimeout(timeout)\n }\n }\n\n private handleMessage(message: unknown): void {\n const payload = message as { id?: string; success?: boolean; result?: unknown; error?: string }\n if (!payload.id) return\n const pending = this.pending.get(payload.id)\n if (!pending) return\n this.pending.delete(payload.id)\n if (payload.success) pending.resolve(payload.result)\n else pending.reject(new Error(payload.error ?? 'Semantic index worker request failed'))\n }\n\n private rejectAll(error: Error): void {\n for (const [id, pending] of this.pending.entries()) {\n this.pending.delete(id)\n pending.reject(error)\n }\n }\n}\n\nexport function createSemanticIndexWorkerThreadTransport(\n options: SemanticIndexWorkerThreadTransportOptions\n): SemanticIndexWorkerThreadTransport {\n return new SemanticIndexWorkerThreadTransport(options)\n}\n","/**\n * Embedding provider 模块\n */\n\nexport type { EmbeddingProvider, EmbeddingPooling } from './types'\nexport {\n QWEN3_PROFILE,\n BGE_BASE_PROFILE,\n getLocalProfilesForLocale,\n getLocalProfileByModelId,\n type LocalEmbeddingProfile,\n} from './profiles'\nexport { applyQueryInstruction, clampTextChars } from './text'\nexport { LocalEmbeddingProvider } from './local'\nexport type { LocalPipelineFactory, FeatureExtractFn, LocalEmbeddingProviderOptions } from './local'\nexport { OpenAICompatibleEmbeddingProvider } from './api'\nexport type { OpenAICompatibleConfig, FetchFn } from './api'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,YAAYA,SAAQ;AACpB,YAAY,QAAQ;AACpB,YAAYC,WAAU;;;AClBtB,YAAY,QAAQ;AACpB,YAAY,UAAU;AAGtB,IAAM,sBAAsB;AAC5B,IAAM,0BAA0B,CAAC,WAAW;AAC5C,IAAM,yBAAyB;AAE/B,IAAM,kBAAkB;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AA+CA,SAAS,wBAAwB,OAAuB;AACtD,QAAM,WAAgB,aAAQ,KAAK;AACnC,QAAM,aAAkB,eAAU,QAAQ;AAC1C,SAAO,QAAQ,aAAa,UAAU,WAAW,YAAY,I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