diff --git a/assets/CardDetailDialog-FgNNmEDA.js b/assets/CardDetailDialog-FgNNmEDA.js deleted file mode 100644 index e89a3445740dba9d677d16ff22a4db1dcd64a46f..0000000000000000000000000000000000000000 --- a/assets/CardDetailDialog-FgNNmEDA.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o}from"./CardDetailDialog.vue_vue_type_script_setup_true_lang-DT-C_SEQ.js";import"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-G_NEmoXi.js";import"./index-7-fr_lhT.js";import"./index-ZfK3fTHt.js";import"./live2d-zip-loader-dDw0Wbbr.js";import"./airi-card-DAWA4eQ5.js";import"./consciousness-C4xyvmr3.js";import"./providers-B7zWTIWF.js";import"./index-Be1NqeGb.js";import"./speech-DK9my_xu.js";export{o as default}; diff --git a/assets/CardDetailDialog-iV9p9LC3.js b/assets/CardDetailDialog-iV9p9LC3.js new file mode 100644 index 0000000000000000000000000000000000000000..491e802f992e8e5927399bb85181826fcf99bbd1 --- /dev/null +++ b/assets/CardDetailDialog-iV9p9LC3.js @@ -0,0 +1 @@ +import{_ as o}from"./CardDetailDialog.vue_vue_type_script_setup_true_lang-XVLQKu9_.js";import"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-44xxChqC.js";import"./index-hDb1Lsb8.js";import"./index-CborASRd.js";import"./live2d-zip-loader--bTGFeQd.js";import"./airi-card-CbqBsbSf.js";import"./consciousness-BRdkM-c-.js";import"./providers-adQ6cb75.js";import"./index-Be1NqeGb.js";import"./speech-D3H5B80W.js";export{o as default}; diff --git a/assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-DT-C_SEQ.js b/assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-XVLQKu9_.js similarity index 96% rename from assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-DT-C_SEQ.js rename to assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-XVLQKu9_.js index 675b83d65bb4bd6b95b8c92af03bd359aa3016bf..1de62bdfe38a2b8404b23047456e0ffe14eab375 100644 --- a/assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-DT-C_SEQ.js +++ b/assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-XVLQKu9_.js @@ -1 +1 @@ -import{a as O,_ as q}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-G_NEmoXi.js";import"./live2d-zip-loader-dDw0Wbbr.js";import{d as E,q as U,s as F,h as x,g as L,c as n,o,bx as f,b as m,e as l,y as k,a as e,C as v,bI as u,D as i,z as $,by as j}from"./index-7-fr_lhT.js";import{u as R}from"./airi-card-DAWA4eQ5.js";import{n as G,I as J,$ as K,P as Q,B as W}from"./index-ZfK3fTHt.js";const X={key:0,class:"w-full flex flex-col gap-5"},Y={flex:"~ col","gap-3":""},Z={flex:"~ row","items-center":"","justify-between":""},ee={flex:"~ row","items-center":"","gap-2":""},te={key:0,class:"bg-primary-100 text-primary-600 dark:bg-primary-900/40 dark:text-primary-400 flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium"},ae={"mt-1":"","text-sm":"","text-neutral-500":"","dark:text-neutral-400":""},re={"font-medium":""},se={flex:"~ row","gap-2":""},le={class:"mt-4"},ne={class:"border-b border-neutral-200 dark:border-neutral-700"},oe={class:"flex justify-center -mb-px sm:justify-start space-x-1"},ie=["onClick"],de={class:"flex items-center gap-1"},ue={key:0},ce=["innerHTML"],me={key:1},ve=["innerHTML"],pe={key:2},ge={flex:"~ col","max-h-60":"","gap-4":"","overflow-auto":"","pr-1":"","sm:max-h-80":""},xe={key:0,flex:"~ col","gap-2":""},be={"text-lg":"","text-neutral-500":"","font-medium":"","dark:text-neutral-400":""},fe=["innerHTML"],he={key:3},_e={grid:"~ cols-1 sm:cols-3","gap-4":""},ke={flex:"~ col",bg:"white/60 dark:black/30","gap-1":"","rounded-lg":"","p-3":"",border:"~ neutral-200/50 dark:neutral-700/30",transition:"all duration-200",hover:"bg-white/80 dark:bg-black/40"},we={flex:"~ row","items-center":"","gap-2":"","text-sm":"","text-neutral-500":"","dark:text-neutral-400":""},ye={truncate:"","font-medium":""},Ce={flex:"~ col",bg:"white/60 dark:black/30","gap-2":"","rounded-lg":"","p-3":"",border:"~ neutral-200/50 dark:neutral-700/30",transition:"all duration-200",hover:"bg-white/80 dark:bg-black/40"},Ie={flex:"~ row","items-center":"","gap-2":"","text-sm":"","text-neutral-500":"","dark:text-neutral-400":""},Te={truncate:"","font-medium":""},Ve={flex:"~ col",bg:"white/60 dark:black/30","gap-2":"","rounded-lg":"","p-3":"",border:"~ neutral-200/50 dark:neutral-700/30",transition:"all duration-200",hover:"bg-white/80 dark:bg-black/40"},He={flex:"~ row","items-center":"","gap-2":"","text-sm":"","text-neutral-500":"","dark:text-neutral-400":""},Le={truncate:"","font-medium":""},$e={key:1,bg:"neutral-50/50 dark:neutral-900/50","rounded-xl":"","p-8":"","text-center":"",border:"~ neutral-200/50 dark:neutral-700/30",shadow:"sm"},ze=E({__name:"CardDetailDialog",props:{modelValue:{type:Boolean},cardId:null},emits:["update:modelValue"],setup(B,{emit:z}){const b=B,D=z,{t:d}=U(),w=R(),{removeCard:A}=w,{activeCardId:M}=F(w),a=x(()=>{if(b.cardId)return w.getCard(b.cardId)}),y=x(()=>{var t,c,r,g,S;if(!a.value||!((c=(t=a.value.extensions)==null?void 0:t.airi)!=null&&c.modules))return{consciousness:"",speech:"",voice:""};const s=a.value.extensions.airi.modules;return{consciousness:((r=s.consciousness)==null?void 0:r.model)||"",speech:((g=s.speech)==null?void 0:g.model)||"",voice:((S=s.speech)==null?void 0:S.voice_id)||""}}),C=x(()=>a.value?{personality:a.value.personality,scenario:a.value.scenario,systemPrompt:a.value.systemPrompt,postHistoryInstructions:a.value.postHistoryInstructions}:{}),h=x(()=>b.cardId===M.value),I=L(!1);function N(){I.value=!0,setTimeout(()=>{M.value=b.cardId,I.value=!1},300)}function T(s){return s==null?void 0:s.replace(/\{\{(.*?)\}\}/g,'{{ $1 }}').trim()}const _=L(!1);function P(){a.value&&(A(b.cardId),D("update:modelValue",!1)),_.value=!1}const V=L(""),H=x(()=>{var t,c;const s=[];return(t=a.value)!=null&&t.description&&s.push({id:"description",label:d("settings.pages.card.description_label"),icon:"i-solar:document-text-linear"}),(c=a.value)!=null&&c.notes&&s.push({id:"notes",label:d("settings.pages.card.creator_notes"),icon:"i-solar:notes-linear"}),Object.values(C.value).some(r=>!!r)&&s.push({id:"character",label:d("settings.pages.card.character"),icon:"i-solar:user-rounded-linear"}),s.push({id:"modules",label:d("settings.pages.card.modules"),icon:"i-solar:tuning-square-linear"}),s}),p=x({get:()=>{var s;return H.value.find(t=>t.id===V.value)?V.value:((s=H.value[0])==null?void 0:s.id)||""},set:s=>{V.value=s}});return(s,t)=>{var c;return o(),n(f,null,[m(l(G),{open:B.modelValue,"onUpdate:open":t[0]||(t[0]=r=>D("update:modelValue",r))},{default:k(()=>[m(l(J),null,{default:k(()=>[m(l(K),{class:"data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-50 bg-black/50 backdrop-blur-sm"}),m(l(Q),{class:"data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide fixed left-1/2 top-1/2 z-50 m-0 max-h-[90vh] max-w-6xl w-[92vw] flex flex-col overflow-auto border border-neutral-200 rounded-xl bg-white p-5 shadow-xl 2xl:w-[60vw] lg:w-[80vw] md:w-[85vw] xl:w-[70vw] -translate-x-1/2 -translate-y-1/2 dark:border-neutral-700 dark:bg-neutral-800 sm:p-6"},{default:k(()=>[a.value?(o(),n("div",X,[e("div",Y,[e("div",Z,[e("div",null,[e("div",ee,[m(l(W),{"text-2xl":"","font-bold":"",class:"from-primary-500 to-primary-400 bg-gradient-to-r bg-clip-text text-transparent"},{default:k(()=>[u(i(a.value.name),1)]),_:1}),h.value?(o(),n("div",te,[t[3]||(t[3]=e("div",{"i-solar:check-circle-bold-duotone":"","text-xs":""},null,-1)),u(" "+i(l(d)("settings.pages.card.active_badge")),1)])):v("",!0)]),e("div",ae,[u(" v"+i(a.value.version)+" ",1),a.value.creator?(o(),n(f,{key:0},[u(" · "+i(l(d)("settings.pages.card.created_by"))+" ",1),e("span",re,i(a.value.creator),1)],64)):v("",!0)])]),e("div",se,[m(l(O),{variant:"primary",icon:h.value?"i-solar:check-circle-bold-duotone":"i-solar:play-circle-broken",label:h.value?l(d)("settings.pages.card.active"):l(d)("settings.pages.card.activate"),disabled:h.value,class:$({"animate-pulse":I.value}),onClick:N},null,8,["icon","label","disabled","class"])])]),e("div",le,[e("div",ne,[e("div",oe,[(o(!0),n(f,null,j(H.value,r=>(o(),n("button",{key:r.id,class:$(["px-4 py-2 text-sm font-medium",[p.value===r.id?"text-primary-600 dark:text-primary-400 border-b-2 border-primary-500 dark:border-primary-400":"text-neutral-500 dark:text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-300"]]),onClick:g=>p.value=r.id},[e("div",de,[e("div",{class:$(r.icon)},null,2),u(" "+i(r.label),1)])],10,ie))),128))])])]),p.value==="notes"&&a.value.notes?(o(),n("div",ue,[e("div",{bg:"white/60 dark:black/30",border:"~ neutral-200/50 dark:neutral-700/30","max-h-60":"","overflow-auto":"","whitespace-pre-line":"","rounded-lg":"","p-4":"","text-neutral-700":"","sm:max-h-80":"","dark:text-neutral-300":"",transition:"all duration-200",hover:"bg-white/80 dark:bg-black/40",innerHTML:T(a.value.notes)},null,8,ce)])):v("",!0),p.value==="description"&&a.value.description?(o(),n("div",me,[e("div",{bg:"white/60 dark:black/30","max-h-60":"","overflow-auto":"","whitespace-pre-line":"","rounded-lg":"","p-4":"","sm:max-h-80":"",text:"neutral-600 dark:neutral-300",border:"~ neutral-200/50 dark:neutral-700/30",innerHTML:T(a.value.description)},null,8,ve)])):v("",!0),p.value==="character"&&Object.values(C.value).some(r=>!!r)?(o(),n("div",pe,[e("div",ge,[(o(!0),n(f,null,j(C.value,(r,g)=>(o(),n(f,{key:g},[r?(o(),n("div",xe,[e("h2",be,i(l(d)(`settings.pages.card.${g.toLowerCase()}`)),1),e("div",{bg:"white/60 dark:black/30",border:"~ neutral-200/50 dark:neutral-700/30",transition:"all duration-200",hover:"bg-white/80 dark:bg-black/40","max-h-none":"","overflow-auto":"","whitespace-pre-line":"","rounded-lg":"","p-3":"","text-neutral-700":"","dark:text-neutral-300":"",innerHTML:T(r)},null,8,fe)])):v("",!0)],64))),128))])])):v("",!0),p.value==="modules"?(o(),n("div",he,[e("div",_e,[e("div",ke,[e("span",we,[t[4]||(t[4]=e("div",{"i-lucide:ghost":""},null,-1)),u(" "+i(l(d)("settings.pages.card.consciousness.model")),1)]),e("div",ye,i(y.value.consciousness??"default"),1)]),e("div",Ce,[e("span",Ie,[t[5]||(t[5]=e("div",{"i-lucide:mic":""},null,-1)),u(" "+i(l(d)("settings.pages.card.speech.model")),1)]),e("div",Te,i(y.value.speech??"default"),1)]),e("div",Ve,[e("span",He,[t[6]||(t[6]=e("div",{"i-lucide:music":""},null,-1)),u(" "+i(l(d)("settings.pages.card.speech.voice")),1)]),e("div",Le,i(y.value.voice??"default"),1)])])])):v("",!0)])])):(o(),n("div",$e,[t[7]||(t[7]=e("div",{"i-solar:card-search-broken":"","mx-auto":"","mb-3":"","text-6xl":"","text-neutral-400":""},null,-1)),u(" "+i(l(d)("settings.pages.card.card_not_found")),1)]))]),_:1})]),_:1})]),_:1},8,["open"]),m(q,{modelValue:_.value,"onUpdate:modelValue":t[1]||(t[1]=r=>_.value=r),"card-name":(c=a.value)==null?void 0:c.name,onConfirm:P,onCancel:t[2]||(t[2]=r=>_.value=!1)},null,8,["modelValue","card-name"])],64)}}});export{ze as _}; +import{a as O,_ as q}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-44xxChqC.js";import"./live2d-zip-loader--bTGFeQd.js";import{d as E,q as U,s as F,h as x,g as L,c as n,o,bx as f,b as m,e as l,y as k,a as e,C as v,bI as u,D as i,z as $,by as j}from"./index-hDb1Lsb8.js";import{u as R}from"./airi-card-CbqBsbSf.js";import{n as G,I as J,$ as K,P as Q,B as W}from"./index-CborASRd.js";const X={key:0,class:"w-full flex flex-col gap-5"},Y={flex:"~ col","gap-3":""},Z={flex:"~ row","items-center":"","justify-between":""},ee={flex:"~ row","items-center":"","gap-2":""},te={key:0,class:"bg-primary-100 text-primary-600 dark:bg-primary-900/40 dark:text-primary-400 flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium"},ae={"mt-1":"","text-sm":"","text-neutral-500":"","dark:text-neutral-400":""},re={"font-medium":""},se={flex:"~ row","gap-2":""},le={class:"mt-4"},ne={class:"border-b border-neutral-200 dark:border-neutral-700"},oe={class:"flex justify-center -mb-px sm:justify-start space-x-1"},ie=["onClick"],de={class:"flex items-center gap-1"},ue={key:0},ce=["innerHTML"],me={key:1},ve=["innerHTML"],pe={key:2},ge={flex:"~ col","max-h-60":"","gap-4":"","overflow-auto":"","pr-1":"","sm:max-h-80":""},xe={key:0,flex:"~ col","gap-2":""},be={"text-lg":"","text-neutral-500":"","font-medium":"","dark:text-neutral-400":""},fe=["innerHTML"],he={key:3},_e={grid:"~ cols-1 sm:cols-3","gap-4":""},ke={flex:"~ col",bg:"white/60 dark:black/30","gap-1":"","rounded-lg":"","p-3":"",border:"~ neutral-200/50 dark:neutral-700/30",transition:"all duration-200",hover:"bg-white/80 dark:bg-black/40"},we={flex:"~ row","items-center":"","gap-2":"","text-sm":"","text-neutral-500":"","dark:text-neutral-400":""},ye={truncate:"","font-medium":""},Ce={flex:"~ col",bg:"white/60 dark:black/30","gap-2":"","rounded-lg":"","p-3":"",border:"~ neutral-200/50 dark:neutral-700/30",transition:"all duration-200",hover:"bg-white/80 dark:bg-black/40"},Ie={flex:"~ row","items-center":"","gap-2":"","text-sm":"","text-neutral-500":"","dark:text-neutral-400":""},Te={truncate:"","font-medium":""},Ve={flex:"~ col",bg:"white/60 dark:black/30","gap-2":"","rounded-lg":"","p-3":"",border:"~ neutral-200/50 dark:neutral-700/30",transition:"all duration-200",hover:"bg-white/80 dark:bg-black/40"},He={flex:"~ row","items-center":"","gap-2":"","text-sm":"","text-neutral-500":"","dark:text-neutral-400":""},Le={truncate:"","font-medium":""},$e={key:1,bg:"neutral-50/50 dark:neutral-900/50","rounded-xl":"","p-8":"","text-center":"",border:"~ neutral-200/50 dark:neutral-700/30",shadow:"sm"},ze=E({__name:"CardDetailDialog",props:{modelValue:{type:Boolean},cardId:null},emits:["update:modelValue"],setup(B,{emit:z}){const b=B,D=z,{t:d}=U(),w=R(),{removeCard:A}=w,{activeCardId:M}=F(w),a=x(()=>{if(b.cardId)return w.getCard(b.cardId)}),y=x(()=>{var t,c,r,g,S;if(!a.value||!((c=(t=a.value.extensions)==null?void 0:t.airi)!=null&&c.modules))return{consciousness:"",speech:"",voice:""};const s=a.value.extensions.airi.modules;return{consciousness:((r=s.consciousness)==null?void 0:r.model)||"",speech:((g=s.speech)==null?void 0:g.model)||"",voice:((S=s.speech)==null?void 0:S.voice_id)||""}}),C=x(()=>a.value?{personality:a.value.personality,scenario:a.value.scenario,systemPrompt:a.value.systemPrompt,postHistoryInstructions:a.value.postHistoryInstructions}:{}),h=x(()=>b.cardId===M.value),I=L(!1);function N(){I.value=!0,setTimeout(()=>{M.value=b.cardId,I.value=!1},300)}function T(s){return s==null?void 0:s.replace(/\{\{(.*?)\}\}/g,'{{ $1 }}').trim()}const _=L(!1);function P(){a.value&&(A(b.cardId),D("update:modelValue",!1)),_.value=!1}const V=L(""),H=x(()=>{var t,c;const s=[];return(t=a.value)!=null&&t.description&&s.push({id:"description",label:d("settings.pages.card.description_label"),icon:"i-solar:document-text-linear"}),(c=a.value)!=null&&c.notes&&s.push({id:"notes",label:d("settings.pages.card.creator_notes"),icon:"i-solar:notes-linear"}),Object.values(C.value).some(r=>!!r)&&s.push({id:"character",label:d("settings.pages.card.character"),icon:"i-solar:user-rounded-linear"}),s.push({id:"modules",label:d("settings.pages.card.modules"),icon:"i-solar:tuning-square-linear"}),s}),p=x({get:()=>{var s;return H.value.find(t=>t.id===V.value)?V.value:((s=H.value[0])==null?void 0:s.id)||""},set:s=>{V.value=s}});return(s,t)=>{var c;return o(),n(f,null,[m(l(G),{open:B.modelValue,"onUpdate:open":t[0]||(t[0]=r=>D("update:modelValue",r))},{default:k(()=>[m(l(J),null,{default:k(()=>[m(l(K),{class:"data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-50 bg-black/50 backdrop-blur-sm"}),m(l(Q),{class:"data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide fixed left-1/2 top-1/2 z-50 m-0 max-h-[90vh] max-w-6xl w-[92vw] flex flex-col overflow-auto border border-neutral-200 rounded-xl bg-white p-5 shadow-xl 2xl:w-[60vw] lg:w-[80vw] md:w-[85vw] xl:w-[70vw] -translate-x-1/2 -translate-y-1/2 dark:border-neutral-700 dark:bg-neutral-800 sm:p-6"},{default:k(()=>[a.value?(o(),n("div",X,[e("div",Y,[e("div",Z,[e("div",null,[e("div",ee,[m(l(W),{"text-2xl":"","font-bold":"",class:"from-primary-500 to-primary-400 bg-gradient-to-r bg-clip-text text-transparent"},{default:k(()=>[u(i(a.value.name),1)]),_:1}),h.value?(o(),n("div",te,[t[3]||(t[3]=e("div",{"i-solar:check-circle-bold-duotone":"","text-xs":""},null,-1)),u(" "+i(l(d)("settings.pages.card.active_badge")),1)])):v("",!0)]),e("div",ae,[u(" v"+i(a.value.version)+" ",1),a.value.creator?(o(),n(f,{key:0},[u(" · "+i(l(d)("settings.pages.card.created_by"))+" ",1),e("span",re,i(a.value.creator),1)],64)):v("",!0)])]),e("div",se,[m(l(O),{variant:"primary",icon:h.value?"i-solar:check-circle-bold-duotone":"i-solar:play-circle-broken",label:h.value?l(d)("settings.pages.card.active"):l(d)("settings.pages.card.activate"),disabled:h.value,class:$({"animate-pulse":I.value}),onClick:N},null,8,["icon","label","disabled","class"])])]),e("div",le,[e("div",ne,[e("div",oe,[(o(!0),n(f,null,j(H.value,r=>(o(),n("button",{key:r.id,class:$(["px-4 py-2 text-sm font-medium",[p.value===r.id?"text-primary-600 dark:text-primary-400 border-b-2 border-primary-500 dark:border-primary-400":"text-neutral-500 dark:text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-300"]]),onClick:g=>p.value=r.id},[e("div",de,[e("div",{class:$(r.icon)},null,2),u(" "+i(r.label),1)])],10,ie))),128))])])]),p.value==="notes"&&a.value.notes?(o(),n("div",ue,[e("div",{bg:"white/60 dark:black/30",border:"~ neutral-200/50 dark:neutral-700/30","max-h-60":"","overflow-auto":"","whitespace-pre-line":"","rounded-lg":"","p-4":"","text-neutral-700":"","sm:max-h-80":"","dark:text-neutral-300":"",transition:"all duration-200",hover:"bg-white/80 dark:bg-black/40",innerHTML:T(a.value.notes)},null,8,ce)])):v("",!0),p.value==="description"&&a.value.description?(o(),n("div",me,[e("div",{bg:"white/60 dark:black/30","max-h-60":"","overflow-auto":"","whitespace-pre-line":"","rounded-lg":"","p-4":"","sm:max-h-80":"",text:"neutral-600 dark:neutral-300",border:"~ neutral-200/50 dark:neutral-700/30",innerHTML:T(a.value.description)},null,8,ve)])):v("",!0),p.value==="character"&&Object.values(C.value).some(r=>!!r)?(o(),n("div",pe,[e("div",ge,[(o(!0),n(f,null,j(C.value,(r,g)=>(o(),n(f,{key:g},[r?(o(),n("div",xe,[e("h2",be,i(l(d)(`settings.pages.card.${g.toLowerCase()}`)),1),e("div",{bg:"white/60 dark:black/30",border:"~ neutral-200/50 dark:neutral-700/30",transition:"all duration-200",hover:"bg-white/80 dark:bg-black/40","max-h-none":"","overflow-auto":"","whitespace-pre-line":"","rounded-lg":"","p-3":"","text-neutral-700":"","dark:text-neutral-300":"",innerHTML:T(r)},null,8,fe)])):v("",!0)],64))),128))])])):v("",!0),p.value==="modules"?(o(),n("div",he,[e("div",_e,[e("div",ke,[e("span",we,[t[4]||(t[4]=e("div",{"i-lucide:ghost":""},null,-1)),u(" "+i(l(d)("settings.pages.card.consciousness.model")),1)]),e("div",ye,i(y.value.consciousness??"default"),1)]),e("div",Ce,[e("span",Ie,[t[5]||(t[5]=e("div",{"i-lucide:mic":""},null,-1)),u(" "+i(l(d)("settings.pages.card.speech.model")),1)]),e("div",Te,i(y.value.speech??"default"),1)]),e("div",Ve,[e("span",He,[t[6]||(t[6]=e("div",{"i-lucide:music":""},null,-1)),u(" "+i(l(d)("settings.pages.card.speech.voice")),1)]),e("div",Le,i(y.value.voice??"default"),1)])])])):v("",!0)])])):(o(),n("div",$e,[t[7]||(t[7]=e("div",{"i-solar:card-search-broken":"","mx-auto":"","mb-3":"","text-6xl":"","text-neutral-400":""},null,-1)),u(" "+i(l(d)("settings.pages.card.card_not_found")),1)]))]),_:1})]),_:1})]),_:1},8,["open"]),m(q,{modelValue:_.value,"onUpdate:modelValue":t[1]||(t[1]=r=>_.value=r),"card-name":(c=a.value)==null?void 0:c.name,onConfirm:P,onCancel:t[2]||(t[2]=r=>_.value=!1)},null,8,["modelValue","card-name"])],64)}}});export{ze as _}; diff --git a/assets/CardListItem-D1SxHi9v.js b/assets/CardListItem-D2hO_cEF.js similarity index 51% rename from assets/CardListItem-D1SxHi9v.js rename to assets/CardListItem-D2hO_cEF.js index 2e3d6ec52b70fe24f6c0b3233222efb9e781becc..0fcd9524525e6de9e4648f4fe73c75fa70f01e02 100644 --- a/assets/CardListItem-D1SxHi9v.js +++ b/assets/CardListItem-D2hO_cEF.js @@ -1 +1 @@ -import{_ as m}from"./CardListItem.vue_vue_type_script_setup_true_lang-DLIJmqLz.js";import"./index-7-fr_lhT.js";export{m as default}; +import{_ as m}from"./CardListItem.vue_vue_type_script_setup_true_lang-B6mmFgyk.js";import"./index-hDb1Lsb8.js";export{m as default}; diff --git a/assets/CardListItem.vue_vue_type_script_setup_true_lang-DLIJmqLz.js b/assets/CardListItem.vue_vue_type_script_setup_true_lang-B6mmFgyk.js similarity index 98% rename from assets/CardListItem.vue_vue_type_script_setup_true_lang-DLIJmqLz.js rename to assets/CardListItem.vue_vue_type_script_setup_true_lang-B6mmFgyk.js index 91e8b8de5ccb87bc2f68b9c0bc09c7243c0c0cc5..89ba197931a82d88abdab5559219cff4e799f339 100644 --- a/assets/CardListItem.vue_vue_type_script_setup_true_lang-DLIJmqLz.js +++ b/assets/CardListItem.vue_vue_type_script_setup_true_lang-B6mmFgyk.js @@ -1 +1 @@ -import{d as p,c as n,o as a,a as e,C as l,D as i,bJ as s,z as u}from"./index-7-fr_lhT.js";const c={relative:"",flex:"~ col 1","justify-between":"","gap-3":"","overflow-hidden":"","rounded-lg":"",bg:"white dark:neutral-900","p-5":"",transition:"all ease-in-out duration-400",after:"content-empty absolute inset-0 z--2 w-full h-full bg-dotted-[neutral-200/80] bg-size-10px mask-image-[linear-gradient(165deg,white_30%,transparent_50%)] transition-all duration-400 ease-in-out",hover:"after:bg-dotted-[primary-300/50] dark:after:bg-dotted-[primary-200/20]"},b={"z-1":"",flex:"","items-start":"","justify-between":"","gap-2":""},v={"flex-1":"",truncate:"","text-lg":"","font-bold":"",hover:"text-primary-600 dark:text-primary-300"},x={key:0,"shrink-0":"","rounded-md":"","p-1":"",bg:"primary-100 dark:primary-900/40",text:"primary-600 dark:primary-400"},f={key:0,"line-clamp-3":"","min-h-40px":"","flex-1":"","text-sm":"",text:"neutral-500 dark:neutral-400",hover:"text-primary-600/80 dark:text-primary-300/80"},y={"z-1":"",flex:"","items-center":"","justify-between":"","text-xs":"",text:"neutral-500 dark:neutral-400"},k={flex:"","items-center":"","gap-1.5":""},g={flex:"","items-center":"","gap-0.5":""},h={flex:"","items-center":"","gap-0.5":""},w={flex:"","items-center":"","justify-end":"","px-2":"","py-1.5":""},C=["disabled"],M=p({__name:"CardListItem",props:{id:null,name:null,description:null,isActive:{type:Boolean},isSelected:{type:Boolean},version:null,consciousnessModel:null,voiceModel:null},emits:["select","activate","delete"],setup(r,{emit:m}){const o=m;return(z,t)=>(a(),n("div",{relative:"","min-h-120px":"",flex:"~ col","cursor-pointer":"","overflow-hidden":"","rounded-xl":"",class:u([r.isSelected?"border-2 border-primary-400 dark:border-primary-600":"border-2 border-neutral-100 dark:border-neutral-800/25"]),bg:"neutral-200/50 dark:neutral-800/50","drop-shadow":"none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none",transition:"all ease-in-out duration-400",before:"content-empty absolute inset-0 z-0 w-25% h-full transition-all duration-400 ease-in-out bg-gradient-to-r from-primary-500/0 to-primary-500/0 dark:from-primary-400/0 dark:to-primary-400/0 mask-image-[linear-gradient(120deg,white_100%)] opacity-0",hover:"before:w-50% before:opacity-100 before:bg-gradient-to-r before:from-primary-500/20 before:via-primary-500/10 before:to-transparent before:dark:from-primary-400/20 before:dark:via-primary-400/10 before:dark:to-transparent",onClick:t[2]||(t[2]=d=>o("select"))},[e("div",c,[e("div",b,[e("h3",v,i(r.name),1),r.isActive?(a(),n("div",x,t[3]||(t[3]=[e("div",{"i-solar:check-circle-bold-duotone":"","text-sm":""},null,-1)]))):l("",!0)]),r.description?(a(),n("p",f,i(r.description),1)):l("",!0),e("div",y,[e("div",null,"v"+i(r.version),1),e("div",k,[e("div",g,[t[4]||(t[4]=e("div",{"i-lucide:ghost":"","text-xs":""},null,-1)),e("span",null,i(r.consciousnessModel),1)]),e("div",h,[t[5]||(t[5]=e("div",{"i-lucide:mic":"","text-xs":""},null,-1)),e("span",null,i(r.voiceModel),1)])])])]),e("div",w,[e("button",{"rounded-lg":"","p-1.5":"","transition-colors":"",hover:"bg-neutral-200 dark:bg-neutral-700/50",disabled:r.isActive,onClick:t[0]||(t[0]=s(d=>o("activate"),["stop"]))},[e("div",{class:u([r.isActive?"i-solar:check-circle-bold-duotone text-primary-500 dark:text-primary-400":"i-solar:play-circle-broken text-neutral-500 dark:text-neutral-400"])},null,2)],8,C),r.id!=="default"?(a(),n("button",{key:0,"rounded-lg":"","p-1.5":"","transition-colors":"",hover:"bg-neutral-200 dark:bg-neutral-700/50",onClick:t[1]||(t[1]=s(d=>o("delete"),["stop"]))},t[6]||(t[6]=[e("div",{"i-solar:trash-bin-trash-linear":"",text:"neutral-500 dark:neutral-400"},null,-1)]))):l("",!0)])],2))}});export{M as _}; +import{d as p,c as n,o as a,a as e,C as l,D as i,bJ as s,z as u}from"./index-hDb1Lsb8.js";const c={relative:"",flex:"~ col 1","justify-between":"","gap-3":"","overflow-hidden":"","rounded-lg":"",bg:"white dark:neutral-900","p-5":"",transition:"all ease-in-out duration-400",after:"content-empty absolute inset-0 z--2 w-full h-full bg-dotted-[neutral-200/80] bg-size-10px mask-image-[linear-gradient(165deg,white_30%,transparent_50%)] transition-all duration-400 ease-in-out",hover:"after:bg-dotted-[primary-300/50] dark:after:bg-dotted-[primary-200/20]"},b={"z-1":"",flex:"","items-start":"","justify-between":"","gap-2":""},v={"flex-1":"",truncate:"","text-lg":"","font-bold":"",hover:"text-primary-600 dark:text-primary-300"},x={key:0,"shrink-0":"","rounded-md":"","p-1":"",bg:"primary-100 dark:primary-900/40",text:"primary-600 dark:primary-400"},f={key:0,"line-clamp-3":"","min-h-40px":"","flex-1":"","text-sm":"",text:"neutral-500 dark:neutral-400",hover:"text-primary-600/80 dark:text-primary-300/80"},y={"z-1":"",flex:"","items-center":"","justify-between":"","text-xs":"",text:"neutral-500 dark:neutral-400"},k={flex:"","items-center":"","gap-1.5":""},g={flex:"","items-center":"","gap-0.5":""},h={flex:"","items-center":"","gap-0.5":""},w={flex:"","items-center":"","justify-end":"","px-2":"","py-1.5":""},C=["disabled"],M=p({__name:"CardListItem",props:{id:null,name:null,description:null,isActive:{type:Boolean},isSelected:{type:Boolean},version:null,consciousnessModel:null,voiceModel:null},emits:["select","activate","delete"],setup(r,{emit:m}){const o=m;return(z,t)=>(a(),n("div",{relative:"","min-h-120px":"",flex:"~ col","cursor-pointer":"","overflow-hidden":"","rounded-xl":"",class:u([r.isSelected?"border-2 border-primary-400 dark:border-primary-600":"border-2 border-neutral-100 dark:border-neutral-800/25"]),bg:"neutral-200/50 dark:neutral-800/50","drop-shadow":"none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none",transition:"all ease-in-out duration-400",before:"content-empty absolute inset-0 z-0 w-25% h-full transition-all duration-400 ease-in-out bg-gradient-to-r from-primary-500/0 to-primary-500/0 dark:from-primary-400/0 dark:to-primary-400/0 mask-image-[linear-gradient(120deg,white_100%)] opacity-0",hover:"before:w-50% before:opacity-100 before:bg-gradient-to-r before:from-primary-500/20 before:via-primary-500/10 before:to-transparent before:dark:from-primary-400/20 before:dark:via-primary-400/10 before:dark:to-transparent",onClick:t[2]||(t[2]=d=>o("select"))},[e("div",c,[e("div",b,[e("h3",v,i(r.name),1),r.isActive?(a(),n("div",x,t[3]||(t[3]=[e("div",{"i-solar:check-circle-bold-duotone":"","text-sm":""},null,-1)]))):l("",!0)]),r.description?(a(),n("p",f,i(r.description),1)):l("",!0),e("div",y,[e("div",null,"v"+i(r.version),1),e("div",k,[e("div",g,[t[4]||(t[4]=e("div",{"i-lucide:ghost":"","text-xs":""},null,-1)),e("span",null,i(r.consciousnessModel),1)]),e("div",h,[t[5]||(t[5]=e("div",{"i-lucide:mic":"","text-xs":""},null,-1)),e("span",null,i(r.voiceModel),1)])])])]),e("div",w,[e("button",{"rounded-lg":"","p-1.5":"","transition-colors":"",hover:"bg-neutral-200 dark:bg-neutral-700/50",disabled:r.isActive,onClick:t[0]||(t[0]=s(d=>o("activate"),["stop"]))},[e("div",{class:u([r.isActive?"i-solar:check-circle-bold-duotone text-primary-500 dark:text-primary-400":"i-solar:play-circle-broken text-neutral-500 dark:text-neutral-400"])},null,2)],8,C),r.id!=="default"?(a(),n("button",{key:0,"rounded-lg":"","p-1.5":"","transition-colors":"",hover:"bg-neutral-200 dark:bg-neutral-700/50",onClick:t[1]||(t[1]=s(d=>o("delete"),["stop"]))},t[6]||(t[6]=[e("div",{"i-solar:trash-bin-trash-linear":"",text:"neutral-500 dark:neutral-400"},null,-1)]))):l("",!0)])],2))}});export{M as _}; diff --git a/assets/Collapsable.vue_vue_type_script_setup_true_lang-D5rspuJc.js b/assets/Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js similarity index 87% rename from assets/Collapsable.vue_vue_type_script_setup_true_lang-D5rspuJc.js rename to assets/Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js index 824de424506e7dcdf4e856026780396f58b035d2..896a461784ffa02a6c67a351a23c96abbb35e063 100644 --- a/assets/Collapsable.vue_vue_type_script_setup_true_lang-D5rspuJc.js +++ b/assets/Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js @@ -1 +1 @@ -import{_ as d}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-BNzPx9yx.js";import{d as p,bK as m,bL as f,af as b,c,o as v,m as r,b as V,bT as u,bU as y,y as C,C as g,bV as k,a as s,bI as x,D as i}from"./index-7-fr_lhT.js";const B={op50:""},w=p({__name:"Collapsable",props:m({default:{type:Boolean},label:null},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const t=o,e=f(o,"modelValue");b(()=>{t.default!=null&&(e.value=!!t.default)});function n(l){return e.value=l,l}return(l,a)=>(v(),c("div",null,[r(l.$slots,"trigger",u(y({visible:e.value,setVisible:n})),()=>[s("button",{sticky:"","top-0":"","z-10":"",flex:"","items-center":"","justify-between":"",px2:"",py1:"","text-sm":"","backdrop-blur-xl":"",onClick:a[0]||(a[0]=_=>e.value=!e.value)},[s("span",null,i(t.label??"Collapsable"),1),a[1]||(a[1]=x()),s("span",B,i(e.value?"▲":"▼"),1)])]),V(d,null,{default:C(()=>[e.value?r(l.$slots,"default",u(k({key:0},{visible:e.value,setVisible:n}))):g("",!0)]),_:3})]))}});export{w as _}; +import{_ as d}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import{d as p,bK as m,bL as f,af as b,c,o as v,m as r,b as V,bT as u,bU as y,y as C,C as g,bV as k,a as s,bI as x,D as i}from"./index-hDb1Lsb8.js";const B={op50:""},w=p({__name:"Collapsable",props:m({default:{type:Boolean},label:null},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const t=o,e=f(o,"modelValue");b(()=>{t.default!=null&&(e.value=!!t.default)});function n(l){return e.value=l,l}return(l,a)=>(v(),c("div",null,[r(l.$slots,"trigger",u(y({visible:e.value,setVisible:n})),()=>[s("button",{sticky:"","top-0":"","z-10":"",flex:"","items-center":"","justify-between":"",px2:"",py1:"","text-sm":"","backdrop-blur-xl":"",onClick:a[0]||(a[0]=_=>e.value=!e.value)},[s("span",null,i(t.label??"Collapsable"),1),a[1]||(a[1]=x()),s("span",B,i(e.value?"▲":"▼"),1)])]),V(d,null,{default:C(()=>[e.value?r(l.$slots,"default",u(k({key:0},{visible:e.value,setVisible:n}))):g("",!0)]),_:3})]))}});export{w as _}; diff --git a/assets/ColorPalette.vue_vue_type_script_setup_true_lang-DpflICIJ.js b/assets/ColorPalette.vue_vue_type_script_setup_true_lang-XM3XfZvN.js similarity index 87% rename from assets/ColorPalette.vue_vue_type_script_setup_true_lang-DpflICIJ.js rename to assets/ColorPalette.vue_vue_type_script_setup_true_lang-XM3XfZvN.js index cf3a25c829fb9a790bd6bbfeb7d7fb16640648e3..f63caa532daf88060ff844f5fb04cb3ad10f0552 100644 --- a/assets/ColorPalette.vue_vue_type_script_setup_true_lang-DpflICIJ.js +++ b/assets/ColorPalette.vue_vue_type_script_setup_true_lang-XM3XfZvN.js @@ -1 +1 @@ -import{_ as b}from"./Collapsable.vue_vue_type_script_setup_true_lang-D5rspuJc.js";import{d,x as m,o as i,y as l,a as n,z as c,m as y,bI as f,D as g,v as C,c as u,C as k,bx as v,by as x,b as s,e,n as h,bR as z}from"./index-7-fr_lhT.js";import"./live2d-zip-loader-dDw0Wbbr.js";import{W as w,j as S,q as $,U as B,G as E,H as V}from"./index-ZfK3fTHt.js";const F=["onClick"],H={flex:"","gap-1.5":""},q=d({__name:"Section",props:{title:null,icon:null,innerClass:null,expand:{type:Boolean,default:!0}},setup(t){return(o,_)=>(i(),m(b,{default:t.expand},{trigger:l(r=>[n("button",{class:"w-full flex items-center justify-between rounded-lg px-4 py-3 outline-none transition-all duration-250 ease-in-out",bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",onClick:a=>r.setVisible(!r.visible)},[n("div",H,[n("div",{class:c(t.icon),"size-6":""},null,2),f(" "+g(t.title),1)]),n("div",{"i-solar:alt-arrow-down-bold-duotone":"",transition:"transform duration-250",class:c({"rotate-180":r.visible})},null,2)],8,F)]),default:l(()=>[n("div",{grid:"","gap-4":"","p-4":"",class:c(t.innerClass)},[y(o.$slots,"default")],2)]),_:3},8,["default"]))}}),N={key:0,flex:"","gap-2":""},G=d({__name:"ColorPalette",props:{colors:null},setup(t){const o=C();return(_,r)=>t.colors.length?(i(),u("div",N,[(i(!0),u(v,null,x(t.colors,({hex:a,name:p})=>(i(),m(e(V),{key:a||"default"},{default:l(()=>[s(e(w),null,{default:l(()=>[s(e(S),{transition:"all ease-in-out duration-250","bg-primary-500":"","size-6":"","cursor-pointer":"","rounded-full":"",style:h(a?{background:a}:{"--theme-colors-hue":e(z)}),class:c(e(o).isColorSelectedForPrimary(a)?"scale-150 mx-1":"hover:scale-110"),onClick:U=>e(o).applyPrimaryColorFrom(a)},null,8,["style","class","onClick"]),s(e($),null,{default:l(()=>[s(e(B),{bg:"white dark:neutral-800","rounded-lg":"","px-3":"","py-1.5":"","text-sm":"","shadow-md":""},{default:l(()=>[f(g(p)+" ",1),s(e(E),{"fill-white":"","dark:fill-neutral-800":""})]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))])):k("",!0)}});export{q as _,G as a}; +import{_ as b}from"./Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js";import{d,x as m,o as i,y as l,a as n,z as c,m as y,bI as f,D as g,v as C,c as u,C as k,bx as v,by as x,b as s,e,n as h,bR as z}from"./index-hDb1Lsb8.js";import"./live2d-zip-loader--bTGFeQd.js";import{W as w,j as S,q as $,U as B,G as E,H as V}from"./index-CborASRd.js";const F=["onClick"],H={flex:"","gap-1.5":""},q=d({__name:"Section",props:{title:null,icon:null,innerClass:null,expand:{type:Boolean,default:!0}},setup(t){return(o,_)=>(i(),m(b,{default:t.expand},{trigger:l(r=>[n("button",{class:"w-full flex items-center justify-between rounded-lg px-4 py-3 outline-none transition-all duration-250 ease-in-out",bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",onClick:a=>r.setVisible(!r.visible)},[n("div",H,[n("div",{class:c(t.icon),"size-6":""},null,2),f(" "+g(t.title),1)]),n("div",{"i-solar:alt-arrow-down-bold-duotone":"",transition:"transform duration-250",class:c({"rotate-180":r.visible})},null,2)],8,F)]),default:l(()=>[n("div",{grid:"","gap-4":"","p-4":"",class:c(t.innerClass)},[y(o.$slots,"default")],2)]),_:3},8,["default"]))}}),N={key:0,flex:"","gap-2":""},G=d({__name:"ColorPalette",props:{colors:null},setup(t){const o=C();return(_,r)=>t.colors.length?(i(),u("div",N,[(i(!0),u(v,null,x(t.colors,({hex:a,name:p})=>(i(),m(e(V),{key:a||"default"},{default:l(()=>[s(e(w),null,{default:l(()=>[s(e(S),{transition:"all ease-in-out duration-250","bg-primary-500":"","size-6":"","cursor-pointer":"","rounded-full":"",style:h(a?{background:a}:{"--theme-colors-hue":e(z)}),class:c(e(o).isColorSelectedForPrimary(a)?"scale-150 mx-1":"hover:scale-110"),onClick:U=>e(o).applyPrimaryColorFrom(a)},null,8,["style","class","onClick"]),s(e($),null,{default:l(()=>[s(e(B),{bg:"white dark:neutral-800","rounded-lg":"","px-3":"","py-1.5":"","text-sm":"","shadow-md":""},{default:l(()=>[f(g(p)+" ",1),s(e(E),{"fill-white":"","dark:fill-neutral-800":""})]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))])):k("",!0)}});export{q as _,G as a}; diff --git a/assets/DeleteCardDialog-Cm2fzcjo.js b/assets/DeleteCardDialog-Cm2fzcjo.js new file mode 100644 index 0000000000000000000000000000000000000000..d930a4a8e4eef8dfbf0e0e42f515856e62489d4e --- /dev/null +++ b/assets/DeleteCardDialog-Cm2fzcjo.js @@ -0,0 +1 @@ +import{_ as o}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-44xxChqC.js";import"./index-hDb1Lsb8.js";import"./index-CborASRd.js";export{o as default}; diff --git a/assets/DeleteCardDialog-NTC8VI23.js b/assets/DeleteCardDialog-NTC8VI23.js deleted file mode 100644 index af1bf819707ea2623db73d1f5b127a87201e46e0..0000000000000000000000000000000000000000 --- a/assets/DeleteCardDialog-NTC8VI23.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-G_NEmoXi.js";import"./index-7-fr_lhT.js";import"./index-ZfK3fTHt.js";export{o as default}; diff --git a/assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-G_NEmoXi.js b/assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-44xxChqC.js similarity index 93% rename from assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-G_NEmoXi.js rename to assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-44xxChqC.js index 3f6da3585763bf309e6b28705020434fb86d8a81..95afa03ee0a6308a06055ed1317aad58ab40e86c 100644 --- a/assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-G_NEmoXi.js +++ b/assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-44xxChqC.js @@ -1 +1 @@ -import{d as v,h as p,c as r,o as d,z as g,a as m,C as h,m as _,D as i,q as w,x as C,y as n,b as t,e,bI as x}from"./index-7-fr_lhT.js";import{A as V,k as B,O as N,V as z,F as D,M as I,N as O,T as S}from"./index-ZfK3fTHt.js";const T=["disabled"],$={class:"flex flex-row items-center justify-center gap-2"},j={key:0,class:"i-lucide:loader-circle animate-spin"},A={key:2},y=v({__name:"Button",props:{icon:null,label:null,disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},variant:{default:"primary"},size:{default:"md"},block:{type:Boolean,default:!1}},setup(a){const s=a,l=p(()=>s.disabled||s.loading),o={primary:"bg-primary-500 hover:bg-primary-600 dark:bg-primary-400 dark:hover:bg-primary-500 text-white",secondary:"bg-neutral-100 hover:bg-neutral-200 dark:bg-neutral-600 dark:hover:bg-neutral-500 text-neutral-900 dark:text-neutral-100",danger:"bg-red-500 hover:bg-red-600 dark:bg-red-400 dark:hover:bg-red-500 text-white"},c={sm:"px-3 py-1.5 text-xs",md:"px-4 py-2 text-sm",lg:"px-6 py-3 text-base"},u=p(()=>["rounded-lg font-medium outline-none transition-all duration-200 ease-in-out","disabled:cursor-not-allowed disabled:opacity-50",s.block?"w-full":"",c[s.size],o[s.variant],{"opacity-50 cursor-not-allowed":l.value},"focus:ring-2 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-neutral-900","focus:ring-primary-500/50 dark:focus:ring-primary-400/50"]);return(b,f)=>(d(),r("button",{disabled:l.value,class:g(u.value)},[m("div",$,[a.loading?(d(),r("div",j)):a.icon?(d(),r("div",{key:1,class:g(a.icon)},null,2)):h("",!0),a.label?(d(),r("span",A,i(a.label),1)):_(b.$slots,"default",{key:3})])],10,T))}}),F={class:"flex flex-row justify-end gap-3"},E=v({__name:"DeleteCardDialog",props:{modelValue:{type:Boolean},cardName:null},emits:["update:modelValue","confirm","cancel"],setup(a,{emit:s}){const l=s,{t:o}=w();function c(){l("update:modelValue",!1),l("cancel")}function u(){l("update:modelValue",!1),l("confirm")}return(b,f)=>(d(),C(e(S),{open:a.modelValue,"onUpdate:open":f[0]||(f[0]=k=>l("update:modelValue",k))},{default:n(()=>[t(e(V),null,{default:n(()=>[t(e(B),{class:"data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-50 bg-black/50"}),t(e(N),{class:"data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide fixed left-1/2 top-1/2 z-50 max-w-md w-full border border-neutral-200 rounded-xl bg-white p-6 shadow-xl -translate-x-1/2 -translate-y-1/2 dark:border-neutral-700 dark:bg-neutral-800"},{default:n(()=>[t(e(z),{class:"mb-4 text-xl font-bold"},{default:n(()=>[x(i(e(o)("settings.pages.card.delete_card")),1)]),_:1}),t(e(D),{class:"mb-6"},{default:n(()=>[x(i(e(o)("settings.pages.card.delete_confirmation"))+" ",1),m("b",null,'"'+i(a.cardName||"")+'"',1)]),_:1}),m("div",F,[t(e(I),{"as-child":""},{default:n(()=>[t(e(y),{variant:"secondary",label:e(o)("settings.pages.card.cancel"),onClick:c},null,8,["label"])]),_:1}),t(e(O),{"as-child":""},{default:n(()=>[t(e(y),{variant:"danger",label:e(o)("settings.pages.card.delete"),onClick:u},null,8,["label"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["open"]))}});export{E as _,y as a}; +import{d as v,h as p,c as r,o as d,z as g,a as m,C as h,m as _,D as i,q as w,x as C,y as n,b as t,e,bI as x}from"./index-hDb1Lsb8.js";import{A as V,k as B,O as N,V as z,F as D,M as I,N as O,T as S}from"./index-CborASRd.js";const T=["disabled"],$={class:"flex flex-row items-center justify-center gap-2"},j={key:0,class:"i-lucide:loader-circle animate-spin"},A={key:2},y=v({__name:"Button",props:{icon:null,label:null,disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},variant:{default:"primary"},size:{default:"md"},block:{type:Boolean,default:!1}},setup(a){const s=a,l=p(()=>s.disabled||s.loading),o={primary:"bg-primary-500 hover:bg-primary-600 dark:bg-primary-400 dark:hover:bg-primary-500 text-white",secondary:"bg-neutral-100 hover:bg-neutral-200 dark:bg-neutral-600 dark:hover:bg-neutral-500 text-neutral-900 dark:text-neutral-100",danger:"bg-red-500 hover:bg-red-600 dark:bg-red-400 dark:hover:bg-red-500 text-white"},c={sm:"px-3 py-1.5 text-xs",md:"px-4 py-2 text-sm",lg:"px-6 py-3 text-base"},u=p(()=>["rounded-lg font-medium outline-none transition-all duration-200 ease-in-out","disabled:cursor-not-allowed disabled:opacity-50",s.block?"w-full":"",c[s.size],o[s.variant],{"opacity-50 cursor-not-allowed":l.value},"focus:ring-2 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-neutral-900","focus:ring-primary-500/50 dark:focus:ring-primary-400/50"]);return(b,f)=>(d(),r("button",{disabled:l.value,class:g(u.value)},[m("div",$,[a.loading?(d(),r("div",j)):a.icon?(d(),r("div",{key:1,class:g(a.icon)},null,2)):h("",!0),a.label?(d(),r("span",A,i(a.label),1)):_(b.$slots,"default",{key:3})])],10,T))}}),F={class:"flex flex-row justify-end gap-3"},E=v({__name:"DeleteCardDialog",props:{modelValue:{type:Boolean},cardName:null},emits:["update:modelValue","confirm","cancel"],setup(a,{emit:s}){const l=s,{t:o}=w();function c(){l("update:modelValue",!1),l("cancel")}function u(){l("update:modelValue",!1),l("confirm")}return(b,f)=>(d(),C(e(S),{open:a.modelValue,"onUpdate:open":f[0]||(f[0]=k=>l("update:modelValue",k))},{default:n(()=>[t(e(V),null,{default:n(()=>[t(e(B),{class:"data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-50 bg-black/50"}),t(e(N),{class:"data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide fixed left-1/2 top-1/2 z-50 max-w-md w-full border border-neutral-200 rounded-xl bg-white p-6 shadow-xl -translate-x-1/2 -translate-y-1/2 dark:border-neutral-700 dark:bg-neutral-800"},{default:n(()=>[t(e(z),{class:"mb-4 text-xl font-bold"},{default:n(()=>[x(i(e(o)("settings.pages.card.delete_card")),1)]),_:1}),t(e(D),{class:"mb-6"},{default:n(()=>[x(i(e(o)("settings.pages.card.delete_confirmation"))+" ",1),m("b",null,'"'+i(a.cardName||"")+'"',1)]),_:1}),m("div",F,[t(e(I),{"as-child":""},{default:n(()=>[t(e(y),{variant:"secondary",label:e(o)("settings.pages.card.cancel"),onClick:c},null,8,["label"])]),_:1}),t(e(O),{"as-child":""},{default:n(()=>[t(e(y),{variant:"danger",label:e(o)("settings.pages.card.delete"),onClick:u},null,8,["label"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["open"]))}});export{E as _,y as a}; diff --git a/assets/FieldInput.vue_vue_type_script_setup_true_lang-BhtqkEkU.js b/assets/FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js similarity index 81% rename from assets/FieldInput.vue_vue_type_script_setup_true_lang-BhtqkEkU.js rename to assets/FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js index f906883c622c03fc8b2b486d974b68b3d7895e81..9095c19ecebeeceff1afeb4933f553baa7464fa3 100644 --- a/assets/FieldInput.vue_vue_type_script_setup_true_lang-BhtqkEkU.js +++ b/assets/FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js @@ -1 +1 @@ -import{_ as m}from"./Input.vue_vue_type_script_setup_true_lang-58p3G1RX.js";import{d as p,h as x,c as o,o as n,a as l,b as V,bI as f,C as h,D as d,z as v}from"./index-7-fr_lhT.js";const y={"max-w-full":""},C={flex:"~ col gap-4"},_={class:"flex items-center gap-1 text-sm font-medium"},b={key:0,class:"text-red-500"},g={class:"text-xs text-neutral-500 dark:text-neutral-400","text-nowrap":""},N=p({__name:"FieldInput",props:{modelValue:null,label:null,description:null,placeholder:null,required:{type:Boolean},type:null,inputClass:null},emits:["update:modelValue"],setup(e,{emit:u}){const c=e,i=u,t=x({get:()=>c.modelValue,set:a=>i("update:modelValue",a)});return(a,s)=>(n(),o("div",y,[l("label",C,[l("div",null,[l("div",_,[f(d(e.label)+" ",1),e.required!==!1?(n(),o("span",b,"*")):h("",!0)]),l("div",g,d(e.description),1)]),V(m,{modelValue:t.value,"onUpdate:modelValue":s[0]||(s[0]=r=>t.value=r),type:e.type,placeholder:e.placeholder,class:v(e.inputClass)},null,8,["modelValue","type","placeholder","class"])])]))}});export{N as _}; +import{_ as m}from"./Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js";import{d as p,h as x,c as o,o as n,a as l,b as V,bI as f,C as h,D as d,z as v}from"./index-hDb1Lsb8.js";const y={"max-w-full":""},C={flex:"~ col gap-4"},_={class:"flex items-center gap-1 text-sm font-medium"},b={key:0,class:"text-red-500"},g={class:"text-xs text-neutral-500 dark:text-neutral-400","text-nowrap":""},N=p({__name:"FieldInput",props:{modelValue:null,label:null,description:null,placeholder:null,required:{type:Boolean},type:null,inputClass:null},emits:["update:modelValue"],setup(e,{emit:u}){const c=e,i=u,t=x({get:()=>c.modelValue,set:a=>i("update:modelValue",a)});return(a,s)=>(n(),o("div",y,[l("label",C,[l("div",null,[l("div",_,[f(d(e.label)+" ",1),e.required!==!1?(n(),o("span",b,"*")):h("",!0)]),l("div",g,d(e.description),1)]),V(m,{modelValue:t.value,"onUpdate:modelValue":s[0]||(s[0]=r=>t.value=r),type:e.type,placeholder:e.placeholder,class:v(e.inputClass)},null,8,["modelValue","type","placeholder","class"])])]))}});export{N as _}; diff --git a/assets/HeaderLink-C7jWLVVD.js b/assets/HeaderLink-DavtcSnn.js similarity index 90% rename from assets/HeaderLink-C7jWLVVD.js rename to assets/HeaderLink-DavtcSnn.js index fc86b547228aa9b3456d4f048a142618d26f7a2c..265895628d7b051d11485b98d95ad808b292ea4b 100644 --- a/assets/HeaderLink-C7jWLVVD.js +++ b/assets/HeaderLink-DavtcSnn.js @@ -1 +1 @@ -import{d as r,bC as c,x as l,e,bo as d,o as s,y as _,c as t,a,bn as i}from"./index-7-fr_lhT.js";const k="/assets/logo-dark-CO0kwKsz.svg",p="/assets/logo-D6zeZTFl.svg",u=["src"],m=["src"],x=r({__name:"HeaderLink",setup(g){const n=c();return(f,o)=>(s(),l(e(d),{to:"/",flex:"~","items-center":"","gap-2":"","px-2":"","text-nowrap":"","text-2xl":"","outline-none":""},{default:_(()=>[e(n)?(s(),t("img",{key:0,src:e(k),"h-8":"","w-8":"",class:"theme-colored"},null,8,u)):(s(),t("img",{key:1,src:e(p),"h-8":"","w-8":"",class:"theme-colored"},null,8,m)),o[0]||(o[0]=a("div",{"font-cute":""},[a("span",null,"アイリ")],-1))]),_:1}))}}),w=i(x,[["__scopeId","data-v-496b6cde"]]);export{w as H}; +import{d as r,bC as c,x as l,e,bo as d,o as s,y as _,c as t,a,bn as i}from"./index-hDb1Lsb8.js";const k="/assets/logo-dark-CO0kwKsz.svg",p="/assets/logo-D6zeZTFl.svg",u=["src"],m=["src"],x=r({__name:"HeaderLink",setup(g){const n=c();return(f,o)=>(s(),l(e(d),{to:"/",flex:"~","items-center":"","gap-2":"","px-2":"","text-nowrap":"","text-2xl":"","outline-none":""},{default:_(()=>[e(n)?(s(),t("img",{key:0,src:e(k),"h-8":"","w-8":"",class:"theme-colored"},null,8,u)):(s(),t("img",{key:1,src:e(p),"h-8":"","w-8":"",class:"theme-colored"},null,8,m)),o[0]||(o[0]=a("div",{"font-cute":""},[a("span",null,"アイリ")],-1))]),_:1}))}}),w=i(x,[["__scopeId","data-v-496b6cde"]]);export{w as H}; diff --git a/assets/IconAnimation.vue_vue_type_script_setup_true_lang-Djn5fd3P.js b/assets/IconAnimation.vue_vue_type_script_setup_true_lang-B0Tznm9Y.js similarity index 95% rename from assets/IconAnimation.vue_vue_type_script_setup_true_lang-Djn5fd3P.js rename to assets/IconAnimation.vue_vue_type_script_setup_true_lang-B0Tznm9Y.js index 00e4b42bc802c0733a977765cd2ed48357a7287f..f5e31b77e212310e352a840dd0393e4db6b226f4 100644 --- a/assets/IconAnimation.vue_vue_type_script_setup_true_lang-Djn5fd3P.js +++ b/assets/IconAnimation.vue_vue_type_script_setup_true_lang-B0Tznm9Y.js @@ -1 +1 @@ -import{d as m,g as s,w as p,h,c as f,o as x,n as l,a as u,z as y}from"./index-7-fr_lhT.js";const C=m({__name:"IconAnimation",props:{icon:null,iconSize:null,position:null,duration:null,started:{type:Boolean},textColor:null,isReverse:{type:Boolean},zIndex:null},emits:["animationEnded"],setup(a,{emit:d}){const e=a,c=d,n=s(!1);p(()=>e.started,o=>{o&&requestAnimationFrame(()=>{n.value=!0})});const t=h(()=>({opacity:n.value!==e.isReverse?1:0,size:n.value!==e.isReverse?25:e.iconSize,position:n.value!==e.isReverse?"calc(50dvw - 12.5rem), calc(50dvh - 12.5rem)":e.position,textColor:n.value!==e.isReverse?"text-white":e.textColor})),i=s([]),r=s(!1);function v(o){i.value.push(o.propertyName),i.value.includes("color")&&i.value.includes("width")&&i.value.includes("height")&&i.value.includes("transform")&&(r.value=!0,c("animationEnded"))}return(o,z)=>(x(),f("div",{"pointer-events-none":"",fixed:"",w:"100dvw",h:"100dvh",style:l({zIndex:r.value?a.zIndex:void 0})},[u("div",{"bg-primary-500":"",fixed:"","inset-0":"","transition-opacity":"","ease-linear":"",style:l({opacity:t.value.opacity,transitionDuration:`${a.duration}ms`})},null,4),u("div",{fixed:"","inset-0":"","ease-in-out":"",style:l({width:`${t.value.size}rem`,height:`${t.value.size}rem`,transform:`translate(${t.value.position})`,transitionDuration:`${a.duration}ms`}),class:y([t.value.textColor,e.icon,{"transition-all":n.value}]),onTransitionend:v},null,38)],4))}});export{C as _}; +import{d as m,g as s,w as p,h,c as f,o as x,n as l,a as u,z as y}from"./index-hDb1Lsb8.js";const C=m({__name:"IconAnimation",props:{icon:null,iconSize:null,position:null,duration:null,started:{type:Boolean},textColor:null,isReverse:{type:Boolean},zIndex:null},emits:["animationEnded"],setup(a,{emit:d}){const e=a,c=d,n=s(!1);p(()=>e.started,o=>{o&&requestAnimationFrame(()=>{n.value=!0})});const t=h(()=>({opacity:n.value!==e.isReverse?1:0,size:n.value!==e.isReverse?25:e.iconSize,position:n.value!==e.isReverse?"calc(50dvw - 12.5rem), calc(50dvh - 12.5rem)":e.position,textColor:n.value!==e.isReverse?"text-white":e.textColor})),i=s([]),r=s(!1);function v(o){i.value.push(o.propertyName),i.value.includes("color")&&i.value.includes("width")&&i.value.includes("height")&&i.value.includes("transform")&&(r.value=!0,c("animationEnded"))}return(o,z)=>(x(),f("div",{"pointer-events-none":"",fixed:"",w:"100dvw",h:"100dvh",style:l({zIndex:r.value?a.zIndex:void 0})},[u("div",{"bg-primary-500":"",fixed:"","inset-0":"","transition-opacity":"","ease-linear":"",style:l({opacity:t.value.opacity,transitionDuration:`${a.duration}ms`})},null,4),u("div",{fixed:"","inset-0":"","ease-in-out":"",style:l({width:`${t.value.size}rem`,height:`${t.value.size}rem`,transform:`translate(${t.value.position})`,transitionDuration:`${a.duration}ms`}),class:y([t.value.textColor,e.icon,{"transition-all":n.value}]),onTransitionend:v},null,38)],4))}});export{C as _}; diff --git a/assets/IconStatusItem-CtYOABTk.js b/assets/IconStatusItem-B-kn6UCa.js similarity index 97% rename from assets/IconStatusItem-CtYOABTk.js rename to assets/IconStatusItem-B-kn6UCa.js index 87937da708df33864086167af0d3e9075ac43dad..5cfb93ea07c0d85089c781620c1f3718c5fb817f 100644 --- a/assets/IconStatusItem-CtYOABTk.js +++ b/assets/IconStatusItem-B-kn6UCa.js @@ -1 +1 @@ -import{d as u,r as c,c as e,o as n,b as d,a as o,y as m,C as a,D as i,z as s,bn as _}from"./index-7-fr_lhT.js";const p={flex:"~ col",bg:"neutral-200/50 dark:neutral-800/50",border:"neutral-100 dark:neutral-800/25 hover:primary-500/30 dark:hover:primary-400/30 solid 2","drop-shadow":"none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none",class:"menu-icon-status-item",transition:"all ease-in-out duration-400","w-full":"","cursor-pointer":"","of-hidden":"","rounded-xl":""},g={"z-1":"","flex-1":""},h={"text-lg":"","font-bold":"",class:"menu-icon-status-item-title",transition:"all ease-in-out duration-400"},k={text:"sm neutral-500 dark:neutral-400",class:"menu-icon-status-item-description",transition:"all ease-in-out duration-400"},f=["src"],x={"p-2":""},v={key:0,"size-3":"",bg:"green-500 dark:green-600","rounded-full":""},y={key:1,"size-3":"",bg:"neutral-400 dark:neutral-500","rounded-full":""},b=u({__name:"IconStatusItem",props:{title:null,description:null,icon:null,iconColor:null,iconImage:null,to:null,configured:{type:Boolean}},setup(r){const t=r;return(C,I)=>{const l=c("RouterLink");return n(),e("div",p,[d(l,{flex:"~ row",class:"menu-icon-status-item-link",bg:"white dark:neutral-900",transition:"all ease-in-out duration-400",relative:"","h-full":"","w-full":"","items-center":"","overflow-hidden":"","rounded-lg":"","p-5":"","text-left":"",to:t.to},{default:m(()=>[o("div",g,[o("div",h,i(t.title),1),o("div",k,[o("span",null,i(t.description),1)])]),t.icon?(n(),e("div",{key:0,class:s(["menu-icon-status-item-icon",[t.icon]]),transition:"all ease-in-out duration-400",absolute:"","right-0":"","size-16":"","translate-y-2":"",text:"neutral-400/50 dark:neutral-600/50","grayscale-100":""},null,2)):a("",!0),t.iconColor?(n(),e("div",{key:1,class:s(["menu-icon-status-item-icon-color",[t.iconColor]]),transition:"all ease-in-out duration-400",absolute:"","right-0":"","size-16":"","translate-y-2":"",text:"neutral-400/50 dark:neutral-600/50","grayscale-100":""},null,2)):a("",!0),t.iconImage?(n(),e("img",{key:2,src:t.iconImage,class:"menu-icon-status-item-icon-image",transition:"all ease-in-out duration-400",absolute:"","right-0":"","size-16":"","translate-y-2":"","grayscale-100":""},null,8,f)):a("",!0)]),_:1},8,["to"]),o("div",x,[t.configured?(n(),e("div",v)):(n(),e("div",y))])])}}}),w=_(b,[["__scopeId","data-v-7ea16194"]]);export{w as I}; +import{d as u,r as c,c as e,o as n,b as d,a as o,y as m,C as a,D as i,z as s,bn as _}from"./index-hDb1Lsb8.js";const p={flex:"~ col",bg:"neutral-200/50 dark:neutral-800/50",border:"neutral-100 dark:neutral-800/25 hover:primary-500/30 dark:hover:primary-400/30 solid 2","drop-shadow":"none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none",class:"menu-icon-status-item",transition:"all ease-in-out duration-400","w-full":"","cursor-pointer":"","of-hidden":"","rounded-xl":""},g={"z-1":"","flex-1":""},h={"text-lg":"","font-bold":"",class:"menu-icon-status-item-title",transition:"all ease-in-out duration-400"},k={text:"sm neutral-500 dark:neutral-400",class:"menu-icon-status-item-description",transition:"all ease-in-out duration-400"},f=["src"],x={"p-2":""},v={key:0,"size-3":"",bg:"green-500 dark:green-600","rounded-full":""},y={key:1,"size-3":"",bg:"neutral-400 dark:neutral-500","rounded-full":""},b=u({__name:"IconStatusItem",props:{title:null,description:null,icon:null,iconColor:null,iconImage:null,to:null,configured:{type:Boolean}},setup(r){const t=r;return(C,I)=>{const l=c("RouterLink");return n(),e("div",p,[d(l,{flex:"~ row",class:"menu-icon-status-item-link",bg:"white dark:neutral-900",transition:"all ease-in-out duration-400",relative:"","h-full":"","w-full":"","items-center":"","overflow-hidden":"","rounded-lg":"","p-5":"","text-left":"",to:t.to},{default:m(()=>[o("div",g,[o("div",h,i(t.title),1),o("div",k,[o("span",null,i(t.description),1)])]),t.icon?(n(),e("div",{key:0,class:s(["menu-icon-status-item-icon",[t.icon]]),transition:"all ease-in-out duration-400",absolute:"","right-0":"","size-16":"","translate-y-2":"",text:"neutral-400/50 dark:neutral-600/50","grayscale-100":""},null,2)):a("",!0),t.iconColor?(n(),e("div",{key:1,class:s(["menu-icon-status-item-icon-color",[t.iconColor]]),transition:"all ease-in-out duration-400",absolute:"","right-0":"","size-16":"","translate-y-2":"",text:"neutral-400/50 dark:neutral-600/50","grayscale-100":""},null,2)):a("",!0),t.iconImage?(n(),e("img",{key:2,src:t.iconImage,class:"menu-icon-status-item-icon-image",transition:"all ease-in-out duration-400",absolute:"","right-0":"","size-16":"","translate-y-2":"","grayscale-100":""},null,8,f)):a("",!0)]),_:1},8,["to"]),o("div",x,[t.configured?(n(),e("div",v)):(n(),e("div",y))])])}}}),w=_(b,[["__scopeId","data-v-7ea16194"]]);export{w as I}; diff --git a/assets/Input.vue_vue_type_script_setup_true_lang-58p3G1RX.js b/assets/Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js similarity index 91% rename from assets/Input.vue_vue_type_script_setup_true_lang-58p3G1RX.js rename to assets/Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js index 0a45a6a88acf8d886e434980cf9d3cdea264bb30..e4511bbfc8a4c89de19e17a54295bc16e7cd9bb8 100644 --- a/assets/Input.vue_vue_type_script_setup_true_lang-58p3G1RX.js +++ b/assets/Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js @@ -1 +1 @@ -import{d as r,bK as n,bL as u,A as s,cr as d,o as i,c as p}from"./index-7-fr_lhT.js";const m=["type"],y=r({__name:"Input",props:n({type:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const l=e,t=u(e,"modelValue");return(c,a)=>s((i(),p("input",{"onUpdate:modelValue":a[0]||(a[0]=o=>t.value=o),type:l.type||"text",border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",text:"disabled:neutral-400 dark:disabled:neutral-600",cursor:"disabled:not-allowed","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",shadow:"sm",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900"},null,8,m)),[[d,t.value]])}});export{y as _}; +import{d as r,bK as n,bL as u,A as s,cr as d,o as i,c as p}from"./index-hDb1Lsb8.js";const m=["type"],y=r({__name:"Input",props:n({type:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const l=e,t=u(e,"modelValue");return(c,a)=>s((i(),p("input",{"onUpdate:modelValue":a[0]||(a[0]=o=>t.value=o),type:l.type||"text",border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",text:"disabled:neutral-400 dark:disabled:neutral-600",cursor:"disabled:not-allowed","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",shadow:"sm",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900"},null,8,m)),[[d,t.value]])}});export{y as _}; diff --git a/assets/Model.vue_vue_type_script_setup_true_lang-B7ZOwTMx.js b/assets/Model.vue_vue_type_script_setup_true_lang-Wfrg8fps.js similarity index 97% rename from assets/Model.vue_vue_type_script_setup_true_lang-B7ZOwTMx.js rename to assets/Model.vue_vue_type_script_setup_true_lang-Wfrg8fps.js index 192457ef7f3e6f2e9a62b73772edaa9fd5587dbf..fe6ca44a40eb08be071660e8f68b358e652180ad 100644 --- a/assets/Model.vue_vue_type_script_setup_true_lang-B7ZOwTMx.js +++ b/assets/Model.vue_vue_type_script_setup_true_lang-Wfrg8fps.js @@ -1 +1 @@ -import{n as C,T as Y,A as re,L as F,o as $,r as ue,D as se,I as de,m as O,M as ce,p as R}from"./live2d-zip-loader-dDw0Wbbr.js";import{bO as ve,d as G,g as h,w as p,l as N,H as X,c as j,o as q,m as Q,br as T,h as z,bC as pe,i as he,G as fe,s as me,v as ge,bP as Me,bQ as we,bx as ye,a as be,p as Se}from"./index-7-fr_lhT.js";const xe=o=>Math.max(0,Math.min(1,o||0)),B=o=>Math.round(xe(o)*255),Pe=ve("rgb"),Be=o=>{if(o===void 0)return;let l=B(o.r),t=B(o.g),d=B(o.b);return"#"+(1<<24|l<<16|t<<8|d).toString(16).slice(1)},Ce=o=>Be(Pe(o)),ke=G({__name:"Canvas",props:{width:null,height:null},setup(o,{expose:l}){const t=o,d=h(),e=h(),i=h();async function c(n){F.registerTicker($),C.add(Y),e.value=new re({width:t.width,height:t.height,backgroundAlpha:0,preserveDrawingBuffer:!0}),i.value=e.value.view,i.value.style.objectFit="contain",n.appendChild(e.value.view)}function y(){var n;e.value&&e.value.renderer.resize(t.width,t.height),(n=e.value)!=null&&n.view&&(e.value.view.width=t.width,e.value.view.height=t.height)}p([()=>t.width,()=>t.height],()=>y()),N(async()=>d.value&&await c(d.value)),X(()=>{var n;return(n=e.value)==null?void 0:n.destroy()});async function P(){return new Promise(g=>{if(!i.value||!e.value)return g(null);e.value.render(),i.value.toBlob(g)})}return l({captureFrame:P}),(n,g)=>(q(),j("div",{ref_key:"containerRef",ref:d,"h-full":"","w-full":""},[Q(n.$slots,"default",{app:e.value})],512))}});function V(o,l,t){return(1-t)*o+t*l}function H(o,l){return o+Math.random()*(l-o)}function Fe(){let o=-1,l,t=-1;function d(e,i){(i>=o||il.app),d=T(()=>l.paused),e=h(),i=h(0),c=h(0),y=z(()=>Math.max(0,Math.min(100,l.mouthOpenSize))),P=pe(),n=he(Se),g=z(()=>n.between("sm","md").value||n.smaller("sm").value),U=Fe(),I=fe(new se({alpha:.2,blur:0,distance:20,rotation:45}));function W(){return e.value.internalModel.coreModel}function D(a){if(!a.value)return;let r=2.2;g.value&&(r=2.2);const f=l.height*.95/c.value*r,s=l.width*.95/i.value*r,m=Math.min(f,s);a.value.scale.set(m,m)}const{live2dModelFile:b,loadingLive2dModel:M,live2dCurrentMotion:J,availableLive2dMotions:K,live2dLoadSource:S,live2dModelUrl:k,themeColorsHue:Z,themeColorsHueDynamic:_}=me(ge()),ee=h({group:"Idle",index:0});async function ae(){var L;if(!t.value)return;e.value&&(t.value.stage.removeChild(e.value),e.value.destroy(),e.value=void 0);const a=new F;S.value==="file"?await R.setupLive2DModel(a,[b.value]):S.value==="url"&&await R.setupLive2DModel(a,k.value),e.value=a,t.value.stage.addChild(e.value),i.value=e.value.width,c.value=e.value.height,e.value.x=l.width/2,e.value.y=l.height,e.value.rotation=Math.PI,e.value.skew.x=Math.PI,e.value.anchor.set(.5,.5),D(e),e.value.on("hit",v=>{e.value&&v.includes("body")&&e.value.motion("tap_body")});const r=e.value.internalModel,f=r.coreModel,s=r.motionManager;f.setParameterValueById("ParamMouthOpenY",y.value),K.value=Object.entries(s.definitions).flatMap(([v,u])=>u?u.map((ie,ne)=>({motionName:v,motionIndex:ne,fileName:ie.File})):[]).filter(Boolean),s.groups.idle&&((L=s.motionGroups[s.groups.idle])==null||L.forEach(v=>{v._motionData.curves.forEach(u=>{(u.id==="ParamEyeBallX"||u.id==="ParamEyeBallY")&&(u.id=`_${u.id}`)})}));const m=s.update;s.update=function(v,u){return m==null||m.call(this,v,u),s.state.currentGroup===s.groups.idle&&U.update(r,u),!0},s.on("motionStart",(v,u)=>{ee.value={group:v,index:u}}),b.value&&await O.setItem("live2dModel",b.value),M.value=!1}async function te(){if(!t.value)return;F.registerTicker($),C.add(Y),C.add(de);const a=await O.getItem("live2dModel");if(a){b.value=a,S.value="file",M.value=!0;return}if(k.value){S.value="url",M.value=!0;return}M.value=!1}async function le(a,r){await e.value.motion(a,r,ce.FORCE)}const oe=Me(()=>{e.value&&(e.value.x=l.width/2,e.value.y=l.height,D(e))},100),A=h(),w=h(0);function x(){if(e.value){const a=getComputedStyle(A.value).backgroundColor;I.value.color=Number(Ce(a).replace("#","0x")),e.value.filters=[I.value]}}p([()=>l.width,()=>l.height],()=>oe()),p(P,x,{immediate:!0}),p([e,Z],x);function E(){x(),w.value=requestAnimationFrame(E)}return p(_,()=>{_.value?w.value=requestAnimationFrame(E):(cancelAnimationFrame(w.value),w.value=0)},{immediate:!0}),p(y,a=>W().setParameterValueById("ParamMouthOpenY",a)),p(t,te),p(J,a=>le(a.group,a.index)),p(d,a=>{var r,f;a?(r=t.value)==null||r.stop():(f=t.value)==null||f.start()}),we(M,a=>{a&&ae()},{debounce:1e3}),N(x),X(()=>{var a;cancelAnimationFrame(w.value),e.value&&((a=t.value)==null||a.stage.removeChild(e.value))}),(a,r)=>(q(),j(ye,null,[be("div",{ref_key:"dropShadowColorComputer",ref:A,hidden:"",bg:"primary-400 dark:primary-500"},null,512),Q(a.$slots,"default")],64))}});export{_e as _,ke as a,H as r}; +import{n as C,T as Y,A as re,L as F,o as $,r as ue,D as se,I as de,m as O,M as ce,p as R}from"./live2d-zip-loader--bTGFeQd.js";import{bO as ve,d as G,g as h,w as p,l as N,H as X,c as j,o as q,m as Q,br as T,h as z,bC as pe,i as he,G as fe,s as me,v as ge,bP as Me,bQ as we,bx as ye,a as be,p as Se}from"./index-hDb1Lsb8.js";const xe=o=>Math.max(0,Math.min(1,o||0)),B=o=>Math.round(xe(o)*255),Pe=ve("rgb"),Be=o=>{if(o===void 0)return;let l=B(o.r),t=B(o.g),d=B(o.b);return"#"+(1<<24|l<<16|t<<8|d).toString(16).slice(1)},Ce=o=>Be(Pe(o)),ke=G({__name:"Canvas",props:{width:null,height:null},setup(o,{expose:l}){const t=o,d=h(),e=h(),i=h();async function c(n){F.registerTicker($),C.add(Y),e.value=new re({width:t.width,height:t.height,backgroundAlpha:0,preserveDrawingBuffer:!0}),i.value=e.value.view,i.value.style.objectFit="contain",n.appendChild(e.value.view)}function y(){var n;e.value&&e.value.renderer.resize(t.width,t.height),(n=e.value)!=null&&n.view&&(e.value.view.width=t.width,e.value.view.height=t.height)}p([()=>t.width,()=>t.height],()=>y()),N(async()=>d.value&&await c(d.value)),X(()=>{var n;return(n=e.value)==null?void 0:n.destroy()});async function P(){return new Promise(g=>{if(!i.value||!e.value)return g(null);e.value.render(),i.value.toBlob(g)})}return l({captureFrame:P}),(n,g)=>(q(),j("div",{ref_key:"containerRef",ref:d,"h-full":"","w-full":""},[Q(n.$slots,"default",{app:e.value})],512))}});function V(o,l,t){return(1-t)*o+t*l}function H(o,l){return o+Math.random()*(l-o)}function Fe(){let o=-1,l,t=-1;function d(e,i){(i>=o||il.app),d=T(()=>l.paused),e=h(),i=h(0),c=h(0),y=z(()=>Math.max(0,Math.min(100,l.mouthOpenSize))),P=pe(),n=he(Se),g=z(()=>n.between("sm","md").value||n.smaller("sm").value),U=Fe(),I=fe(new se({alpha:.2,blur:0,distance:20,rotation:45}));function W(){return e.value.internalModel.coreModel}function D(a){if(!a.value)return;let r=2.2;g.value&&(r=2.2);const f=l.height*.95/c.value*r,s=l.width*.95/i.value*r,m=Math.min(f,s);a.value.scale.set(m,m)}const{live2dModelFile:b,loadingLive2dModel:M,live2dCurrentMotion:J,availableLive2dMotions:K,live2dLoadSource:S,live2dModelUrl:k,themeColorsHue:Z,themeColorsHueDynamic:_}=me(ge()),ee=h({group:"Idle",index:0});async function ae(){var L;if(!t.value)return;e.value&&(t.value.stage.removeChild(e.value),e.value.destroy(),e.value=void 0);const a=new F;S.value==="file"?await R.setupLive2DModel(a,[b.value]):S.value==="url"&&await R.setupLive2DModel(a,k.value),e.value=a,t.value.stage.addChild(e.value),i.value=e.value.width,c.value=e.value.height,e.value.x=l.width/2,e.value.y=l.height,e.value.rotation=Math.PI,e.value.skew.x=Math.PI,e.value.anchor.set(.5,.5),D(e),e.value.on("hit",v=>{e.value&&v.includes("body")&&e.value.motion("tap_body")});const r=e.value.internalModel,f=r.coreModel,s=r.motionManager;f.setParameterValueById("ParamMouthOpenY",y.value),K.value=Object.entries(s.definitions).flatMap(([v,u])=>u?u.map((ie,ne)=>({motionName:v,motionIndex:ne,fileName:ie.File})):[]).filter(Boolean),s.groups.idle&&((L=s.motionGroups[s.groups.idle])==null||L.forEach(v=>{v._motionData.curves.forEach(u=>{(u.id==="ParamEyeBallX"||u.id==="ParamEyeBallY")&&(u.id=`_${u.id}`)})}));const m=s.update;s.update=function(v,u){return m==null||m.call(this,v,u),s.state.currentGroup===s.groups.idle&&U.update(r,u),!0},s.on("motionStart",(v,u)=>{ee.value={group:v,index:u}}),b.value&&await O.setItem("live2dModel",b.value),M.value=!1}async function te(){if(!t.value)return;F.registerTicker($),C.add(Y),C.add(de);const a=await O.getItem("live2dModel");if(a){b.value=a,S.value="file",M.value=!0;return}if(k.value){S.value="url",M.value=!0;return}M.value=!1}async function le(a,r){await e.value.motion(a,r,ce.FORCE)}const oe=Me(()=>{e.value&&(e.value.x=l.width/2,e.value.y=l.height,D(e))},100),A=h(),w=h(0);function x(){if(e.value){const a=getComputedStyle(A.value).backgroundColor;I.value.color=Number(Ce(a).replace("#","0x")),e.value.filters=[I.value]}}p([()=>l.width,()=>l.height],()=>oe()),p(P,x,{immediate:!0}),p([e,Z],x);function E(){x(),w.value=requestAnimationFrame(E)}return p(_,()=>{_.value?w.value=requestAnimationFrame(E):(cancelAnimationFrame(w.value),w.value=0)},{immediate:!0}),p(y,a=>W().setParameterValueById("ParamMouthOpenY",a)),p(t,te),p(J,a=>le(a.group,a.index)),p(d,a=>{var r,f;a?(r=t.value)==null||r.stop():(f=t.value)==null||f.start()}),we(M,a=>{a&&ae()},{debounce:1e3}),N(x),X(()=>{var a;cancelAnimationFrame(w.value),e.value&&((a=t.value)==null||a.stage.removeChild(e.value))}),(a,r)=>(q(),j(ye,null,[be("div",{ref_key:"dropShadowColorComputer",ref:A,hidden:"",bg:"primary-400 dark:primary-500"},null,512),Q(a.$slots,"default")],64))}});export{_e as _,ke as a,H as r}; diff --git a/assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C3sxqbyi.js b/assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-CHpN3yiY.js similarity index 84% rename from assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C3sxqbyi.js rename to assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-CHpN3yiY.js index 50a6d70c750f78311c21294063fa29c348ce48f2..c31442c9a5467b8d8c48f835c2ce53f646e0ff77 100644 --- a/assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C3sxqbyi.js +++ b/assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-CHpN3yiY.js @@ -1 +1 @@ -import{_ as i}from"./FieldInput.vue_vue_type_script_setup_true_lang-BhtqkEkU.js";import{d as n,bK as t,q as u,bL as p,h as m,x as c,o as f,e as b}from"./index-7-fr_lhT.js";const y=n({__name:"ProviderApiKeyInput",props:t({providerName:null,placeholder:null,required:{type:Boolean},label:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const l=e,{t:a}=u(),o=p(e,"modelValue"),d=m(()=>l.description||`API Key for ${l.providerName}`);return(v,r)=>(f(),c(i,{modelValue:o.value,"onUpdate:modelValue":r[0]||(r[0]=s=>o.value=s),label:e.label||b(a)("settings.pages.providers.common.fields.field.api-key.label"),description:d.value,placeholder:e.placeholder,required:e.required,type:"password"},null,8,["modelValue","label","description","placeholder","required"]))}});export{y as _}; +import{_ as i}from"./FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js";import{d as n,bK as t,q as u,bL as p,h as m,x as c,o as f,e as b}from"./index-hDb1Lsb8.js";const y=n({__name:"ProviderApiKeyInput",props:t({providerName:null,placeholder:null,required:{type:Boolean},label:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const l=e,{t:a}=u(),o=p(e,"modelValue"),d=m(()=>l.description||`API Key for ${l.providerName}`);return(v,r)=>(f(),c(i,{modelValue:o.value,"onUpdate:modelValue":r[0]||(r[0]=s=>o.value=s),label:e.label||b(a)("settings.pages.providers.common.fields.field.api-key.label"),description:d.value,placeholder:e.placeholder,required:e.required,type:"password"},null,8,["modelValue","label","description","placeholder","required"]))}});export{y as _}; diff --git a/assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CUVIcbSL.js b/assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-UCuivhvU.js similarity index 88% rename from assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CUVIcbSL.js rename to assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-UCuivhvU.js index 58ff7c7b26f58ea6fdce9081f405d89a02699941..07c0123158cdde9d93ac67e38f0937c2f092c73b 100644 --- a/assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CUVIcbSL.js +++ b/assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-UCuivhvU.js @@ -1 +1 @@ -import{_ as p}from"./Collapsable.vue_vue_type_script_setup_true_lang-D5rspuJc.js";import{d,g as m,x as u,o as c,y as n,a as e,m as f,D as _,z as v,bK as b,bL as g}from"./index-7-fr_lhT.js";import{_ as V}from"./FieldInput.vue_vue_type_script_setup_true_lang-BhtqkEkU.js";const x=["onClick"],h={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},y={"mt-4":""},q=d({__name:"ProviderAdvancedSettings",props:{title:null,initialVisible:{type:Boolean}},setup(l){const a=m(l.initialVisible||!1);function r(){a.value=!a.value}return(o,i)=>(c(),u(p,{"w-full":""},{trigger:n(s=>[e("button",{transition:"all ease-in-out duration-250","w-full":"",flex:"","items-center":"","gap-1.5":"","outline-none":"",class:"[&_.provider-icon]:grayscale-100 [&_.provider-icon]:hover:grayscale-0",onClick:()=>s.setVisible(!s.visible)&&r()},[e("h2",h,[e("span",null,_(l.title||"Advanced"),1)]),e("div",{transform:"",transition:"transform duration-250",class:v({"rotate-180":s.visible})},i[0]||(i[0]=[e("div",{"i-solar:alt-arrow-down-bold-duotone":""},null,-1)]),2)],8,x)]),default:n(()=>[e("div",y,[f(o.$slots,"default")])]),_:3}))}}),w=d({__name:"ProviderBaseUrlInput",props:b({placeholder:null,required:{type:Boolean},label:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=g(l,"modelValue");return(r,o)=>(c(),u(V,{modelValue:a.value,"onUpdate:modelValue":o[0]||(o[0]=i=>a.value=i),label:t.label||"Base URL",description:t.description||"Custom base URL (optional)",placeholder:t.placeholder,required:t.required,type:"text"},null,8,["modelValue","label","description","placeholder","required"]))}});export{q as _,w as a}; +import{_ as p}from"./Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js";import{d,g as m,x as u,o as c,y as n,a as e,m as f,D as _,z as v,bK as b,bL as g}from"./index-hDb1Lsb8.js";import{_ as V}from"./FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js";const x=["onClick"],h={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},y={"mt-4":""},q=d({__name:"ProviderAdvancedSettings",props:{title:null,initialVisible:{type:Boolean}},setup(l){const a=m(l.initialVisible||!1);function r(){a.value=!a.value}return(o,i)=>(c(),u(p,{"w-full":""},{trigger:n(s=>[e("button",{transition:"all ease-in-out duration-250","w-full":"",flex:"","items-center":"","gap-1.5":"","outline-none":"",class:"[&_.provider-icon]:grayscale-100 [&_.provider-icon]:hover:grayscale-0",onClick:()=>s.setVisible(!s.visible)&&r()},[e("h2",h,[e("span",null,_(l.title||"Advanced"),1)]),e("div",{transform:"",transition:"transform duration-250",class:v({"rotate-180":s.visible})},i[0]||(i[0]=[e("div",{"i-solar:alt-arrow-down-bold-duotone":""},null,-1)]),2)],8,x)]),default:n(()=>[e("div",y,[f(o.$slots,"default")])]),_:3}))}}),w=d({__name:"ProviderBaseUrlInput",props:b({placeholder:null,required:{type:Boolean},label:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=g(l,"modelValue");return(r,o)=>(c(),u(V,{modelValue:a.value,"onUpdate:modelValue":o[0]||(o[0]=i=>a.value=i),label:t.label||"Base URL",description:t.description||"Custom base URL (optional)",placeholder:t.placeholder,required:t.required,type:"text"},null,8,["modelValue","label","description","placeholder","required"]))}});export{q as _,w as a}; diff --git a/assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BCwQg86s.js b/assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CYv3qJbi.js similarity index 94% rename from assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BCwQg86s.js rename to assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CYv3qJbi.js index db3d7758e5893bd4b3f6805f73ddb62295c9de37..8f36aceec65fcd66329dd623f724d1b3195428ba 100644 --- a/assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BCwQg86s.js +++ b/assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CYv3qJbi.js @@ -1 +1 @@ -import{d as o,c as s,o as a,a as e,m as i,C as u,D as l}from"./index-7-fr_lhT.js";const c={flex:"~ col gap-6"},x={flex:"~ row","items-center":"","justify-between":""},f={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},m={text:"neutral-400 dark:neutral-500"},g=o({__name:"ProviderBasicSettings",props:{title:null,description:null,onReset:{type:Function}},setup(t){return(r,n)=>(a(),s("div",c,[e("div",x,[e("div",null,[e("h2",f,l(t.title||"Basic"),1),e("div",m,[e("span",null,l(t.description||"Essential settings"),1)])]),t.onReset?(a(),s("button",{key:0,title:"Reset settings",flex:"","items-center":"","justify-center":"","rounded-full":"","p-2":"",transition:"all duration-250 ease-in-out",text:"neutral-500 dark:neutral-400",bg:"transparent dark:transparent hover:neutral-200 dark:hover:neutral-800 active:neutral-300 dark:active:neutral-700",onClick:n[0]||(n[0]=(...d)=>t.onReset&&t.onReset(...d))},n[1]||(n[1]=[e("div",{"i-solar:refresh-bold-duotone":"","text-xl":""},null,-1)]))):u("",!0)]),i(r.$slots,"default")]))}}),p={bg:"neutral-50 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-6"},k=o({__name:"ProviderSettingsContainer",setup(t){return(r,n)=>(a(),s("div",p,[i(r.$slots,"default")]))}});export{k as _,g as a}; +import{d as o,c as s,o as a,a as e,m as i,C as u,D as l}from"./index-hDb1Lsb8.js";const c={flex:"~ col gap-6"},x={flex:"~ row","items-center":"","justify-between":""},f={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},m={text:"neutral-400 dark:neutral-500"},g=o({__name:"ProviderBasicSettings",props:{title:null,description:null,onReset:{type:Function}},setup(t){return(r,n)=>(a(),s("div",c,[e("div",x,[e("div",null,[e("h2",f,l(t.title||"Basic"),1),e("div",m,[e("span",null,l(t.description||"Essential settings"),1)])]),t.onReset?(a(),s("button",{key:0,title:"Reset settings",flex:"","items-center":"","justify-center":"","rounded-full":"","p-2":"",transition:"all duration-250 ease-in-out",text:"neutral-500 dark:neutral-400",bg:"transparent dark:transparent hover:neutral-200 dark:hover:neutral-800 active:neutral-300 dark:active:neutral-700",onClick:n[0]||(n[0]=(...d)=>t.onReset&&t.onReset(...d))},n[1]||(n[1]=[e("div",{"i-solar:refresh-bold-duotone":"","text-xl":""},null,-1)]))):u("",!0)]),i(r.$slots,"default")]))}}),p={bg:"neutral-50 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-6"},k=o({__name:"ProviderSettingsContainer",setup(t){return(r,n)=>(a(),s("div",p,[i(r.$slots,"default")]))}});export{k as _,g as a}; diff --git a/assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BxRDV7Dm.js b/assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTOfxlwP.js similarity index 94% rename from assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BxRDV7Dm.js rename to assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTOfxlwP.js index 5245db2759bd152d90feb0da04317dce367dd0fb..0c6a81f01a7295b8cd815269214f8f1765161bbc 100644 --- a/assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BxRDV7Dm.js +++ b/assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTOfxlwP.js @@ -1 +1 @@ -import{d as s,bw as d,c as n,o as r,A as v,m as u,a as t,D as c,z as x,bx as m}from"./index-7-fr_lhT.js";const p={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},f={relative:""},k={"text-nowrap":"","text-3xl":"","font-semibold":""},y={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},w=s({__name:"ProviderSettingsLayout",props:{providerName:null,providerIcon:null,providerIconColor:null,onBack:{type:Function}},setup(o){return(a,e)=>{const i=d("motion");return r(),n(m,null,[v((r(),n("div",p,[t("button",{onClick:e[0]||(e[0]=(...l)=>o.onBack&&o.onBack(...l))},e[1]||(e[1]=[t("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),t("h1",f,[e[2]||(e[2]=t("div",{absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},[t("span",{text:"neutral-300 dark:neutral-500","text-nowrap":""},"Provider")],-1)),t("div",k,c(o.providerName),1)])])),[[i]]),u(a.$slots,"default"),t("div",y,[t("div",{text:"40",class:x(o.providerIcon||o.providerIconColor)},null,2)])],64)}}});export{w as _}; +import{d as s,bw as d,c as n,o as r,A as v,m as u,a as t,D as c,z as x,bx as m}from"./index-hDb1Lsb8.js";const p={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},f={relative:""},k={"text-nowrap":"","text-3xl":"","font-semibold":""},y={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},w=s({__name:"ProviderSettingsLayout",props:{providerName:null,providerIcon:null,providerIconColor:null,onBack:{type:Function}},setup(o){return(a,e)=>{const i=d("motion");return r(),n(m,null,[v((r(),n("div",p,[t("button",{onClick:e[0]||(e[0]=(...l)=>o.onBack&&o.onBack(...l))},e[1]||(e[1]=[t("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),t("h1",f,[e[2]||(e[2]=t("div",{absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},[t("span",{text:"neutral-300 dark:neutral-500","text-nowrap":""},"Provider")],-1)),t("div",k,c(o.providerName),1)])])),[[i]]),u(a.$slots,"default"),t("div",y,[t("div",{text:"40",class:x(o.providerIcon||o.providerIconColor)},null,2)])],64)}}});export{w as _}; diff --git a/assets/RadioCardDetailManySelect-Bn9sPp4x.js b/assets/RadioCardDetailManySelect-D3zSF9Ox.js similarity index 98% rename from assets/RadioCardDetailManySelect-Bn9sPp4x.js rename to assets/RadioCardDetailManySelect-D3zSF9Ox.js index 8d5379a1076bf1a37da79453f453cd30c0c88ae6..f7662093d69d45701ccdb4718ef1abd7532bc2e6 100644 --- a/assets/RadioCardDetailManySelect-Bn9sPp4x.js +++ b/assets/RadioCardDetailManySelect-D3zSF9Ox.js @@ -1 +1 @@ -import{d as g,bK as f,bL as w,g as b,c as n,o as d,z as o,A as V,a as t,bA as B,C as v,D as c,b as $,y as M,bJ as k,bn as C,h as S,bE as T,bx as z,by as D,x as E}from"./index-7-fr_lhT.js";import{_ as N}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-BNzPx9yx.js";import{_ as L}from"./Input.vue_vue_type_script_setup_true_lang-58p3G1RX.js";const P=["checked","name","value"],U={class:"relative mr-3 mt-0.5 flex-shrink-0"},q={class:"w-full flex flex-col gap-2"},j={class:"flex items-center"},A={key:0,class:"relative"},F=["title"],J={key:1,class:"mt-2"},K=g({__name:"RadioCardDetail",props:f({id:null,name:null,value:null,title:null,description:null,deprecated:{type:Boolean,default:!1},showExpandCollapse:{type:Boolean,default:!0},expandCollapseThreshold:{default:100},customInputValue:{default:""},customInputPlaceholder:{default:""},showCustomInput:{type:Boolean,default:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=w(e,"modelValue"),m=b(!1);function s(){m.value=!m.value}return(x,r)=>(d(),n("label",{key:e.id,class:o(["form_radio-card-detail relative flex cursor-pointer items-start rounded-xl p-3 pr-[20px]",[a.value===e.value?"bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30":"bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30",a.value===e.value?"form_radio-card-detail-active":"",e.deprecated?"opacity-60":""]]),transition:"all duration-200 ease-in-out",border:"2 solid"},[V(t("input",{"onUpdate:modelValue":r[0]||(r[0]=i=>a.value=i),checked:a.value===e.value,type:"radio",name:e.name,value:e.value,class:"absolute opacity-0"},null,8,P),[[B,a.value]]),t("div",U,[t("div",{class:o(["size-5 border-2 rounded-full transition-colors duration-200",[a.value===e.value?"border-primary-500 dark:border-primary-400":"border-neutral-300 dark:border-neutral-600"]])},[t("div",{class:o(["absolute left-1/2 top-1/2 size-3 rounded-full transition-opacity duration-200 -translate-x-1/2 -translate-y-1/2",[a.value===e.value?"opacity-100 bg-primary-500 dark:bg-primary-400":"opacity-0"]])},null,2)],2)]),t("div",q,[t("div",j,[t("span",{class:o(["line-clamp-1 font-medium",[a.value===e.value?"text-neutral-700 dark:text-neutral-300":"text-neutral-700 dark:text-neutral-400"]])},c(e.title),3)]),e.description?(d(),n("div",A,[$(N,null,{default:M(()=>[!m.value||!e.showExpandCollapse?(d(),n("div",{key:0,class:o(["line-clamp-2 cursor-pointer text-xs",[a.value===e.value?"text-neutral-600 dark:text-neutral-400":"text-neutral-500 dark:text-neutral-500"]]),title:e.description,onClick:k(s,["prevent"])},c(e.description),11,F)):(d(),n("div",{key:1,class:o(["cursor-pointer text-xs",[a.value===e.value?"text-neutral-600 dark:text-neutral-400":"text-neutral-500 dark:text-neutral-500"]]),onClick:k(s,["prevent"])},c(e.description),3))]),_:1}),e.showExpandCollapse&&e.description.length>e.expandCollapseThreshold?(d(),n("button",{key:0,class:"text-primary-500 dark:text-primary-600 mt-0.5 inline-flex items-center text-xs",onClick:k(s,["prevent"])},[t("span",null,c(m.value?"Show less":"Show more"),1),t("div",{class:o([{"rotate-180":m.value},"transition-transform duration-200"])},r[2]||(r[2]=[t("div",{"i-solar:alt-arrow-down-bold-duotone":"","ml-0.5":"","text-xs":""},null,-1)]),2)])):v("",!0)])):v("",!0),e.showCustomInput&&a.value===e.value?(d(),n("div",J,[$(L,{modelValue:a.value,"onUpdate:modelValue":r[1]||(r[1]=i=>a.value=i),type:"text",class:"w-full border border-neutral-300 rounded bg-white px-2 py-1 text-sm dark:border-neutral-700 dark:bg-neutral-900",placeholder:e.customInputPlaceholder},null,8,["modelValue","placeholder"])])):v("",!0)])],2))}}),Q=C(K,[["__scopeId","data-v-c9195151"]]),G=["checked","name","value"],H={flex:"~ col","min-h-16":"","w-full":"","items-start":"","justify-center":"","pb-2":"","pl-5":"","pr-4":"","pt-2":""},O=g({__name:"RadioCardSimple",props:f({id:null,name:null,value:null,title:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=w(e,"modelValue");return(m,s)=>(d(),n("label",{key:e.id,border:"2px solid",class:o(["form_radio-card-simple relative",[a.value===e.value?"bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30":"bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30",a.value===e.value?"form_radio-card-simple-active":""]]),transition:"all duration-200 ease-in-out",flex:"~ col",block:"","min-w-50":"","w-fit":"","cursor-pointer":"","items-start":"","rounded-xl":"","p-4":"","text-left":""},[V(t("input",{"onUpdate:modelValue":s[0]||(s[0]=x=>a.value=x),checked:a.value===e.value,type:"radio",name:e.name,value:e.value,class:"[&:checked+div]:border-primary-500 dark:[&:checked+div]:border-primary-400 absolute opacity-0 [&:checked+div_.radio-dot]:opacity-100"},null,8,G),[[B,a.value]]),s[1]||(s[1]=t("div",{class:"radio-circle absolute left-2 top-2 size-5 rounded-full",border:"2 solid neutral-300 dark:neutral-600",transition:"all duration-200 ease-in-out"},[t("div",{class:"radio-dot absolute left-1/2 top-1/2 size-3 rounded-full opacity-0 -translate-x-1/2 -translate-y-1/2",transition:"all duration-200 ease-in-out",bg:"primary-500 dark:primary-400"})],-1)),t("div",H,[t("span",{class:o(["radio-item-name font-bold",[a.value===e.value?"text-neutral-700 dark:text-neutral-300":"text-neutral-500 dark:text-neutral-500"]]),text:"md",transition:"all duration-200 ease-in-out"},c(e.title),3),e.description?(d(),n("span",{key:0,class:o(["radio-item-description",[a.value===e.value?"text-neutral-600 dark:text-neutral-400":"text-neutral-400 dark:text-neutral-600"]]),transition:"all duration-200 ease-in-out"},c(e.description),3)):v("",!0)]),s[2]||(s[2]=t("div",{class:"bg-dotted-neutral-200/80 dark:bg-dotted-neutral-700/50 [input:checked~&]:bg-dotted-primary-300/50 dark:[input:checked~&]:bg-dotted-primary-200/20",absolute:"","inset-0":"","z--1":"",style:{"background-size":"10px 10px","mask-image":"linear-gradient(165deg, white 30%, transparent 50%)"}},null,-1))],2))}}),ie=C(O,[["__scopeId","data-v-dd41bc0b"]]),W={class:"radio-card-detail-many-select"},X={key:0,class:"relative","inline-flex":"~","w-full":"","items-center":""},Y=["placeholder"],Z={class:"mt-4 space-y-2"},_={key:0,class:"text-sm text-neutral-500 dark:text-neutral-400"},ee={key:1,class:"flex items-center gap-3 border border-2 border-amber-200 rounded-xl bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20"},te={class:"flex flex-col"},ae={class:"font-medium"},le={class:"text-sm text-amber-600 dark:text-amber-400"},re={class:"relative"},oe=g({__name:"RadioCardDetailManySelect",props:f({items:null,searchable:{type:Boolean,default:!0},searchPlaceholder:{default:"Search..."},searchNoResultsTitle:{default:"No results found"},searchNoResultsDescription:{default:"Try a different search term"},searchResultsText:{default:"{count} of {total} results"},customInputPlaceholder:{default:"Enter custom value"},expandButtonText:{default:"Show more"},collapseButtonText:{default:"Show less"},showMore:{type:Boolean,default:!0}},{modelValue:{required:!0},modelModifiers:{}}),emits:f(["update:customValue"],["update:modelValue"]),setup(e,{emit:a}){const m=e,s=a,x=w(e,"modelValue"),r=b(""),i=b(!1),R=b(""),h=S(()=>{if(!r.value)return m.items;const p=r.value.toLowerCase();return m.items.filter(l=>l.name.toLowerCase().includes(p)||l.description&&l.description.toLowerCase().includes(p))});function I(p){R.value=p,s("update:customValue",p)}return(p,l)=>(d(),n("div",W,[e.searchable?(d(),n("div",X,[l[4]||(l[4]=t("div",{class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},[t("div",{"i-solar:magnifer-line-duotone":"",class:"text-neutral-500 dark:text-neutral-400"})],-1)),V(t("input",{"onUpdate:modelValue":l[0]||(l[0]=u=>r.value=u),type:"search",class:"w-full rounded-xl p-2.5 pl-10 text-sm outline-none",border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",bg:"white dark:neutral-900",placeholder:e.searchPlaceholder},null,8,Y),[[T,r.value]])])):v("",!0),t("div",Z,[r.value?(d(),n("div",_,c(e.searchResultsText.replace("{count}",h.value.length.toString()).replace("{total}",e.items.length.toString())),1)):v("",!0),r.value&&h.value.length===0?(d(),n("div",ee,[l[5]||(l[5]=t("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),t("div",te,[t("span",ae,c(e.searchNoResultsTitle),1),t("span",le,c(e.searchNoResultsDescription.replace("{query}",r.value)),1)])])):v("",!0),t("div",re,[t("div",{class:o(["scrollbar-hide grid auto-cols-[350px] grid-flow-col max-h-[calc(100dvh-7lh)] gap-4 overflow-x-auto pb-4",[i.value?"grid-cols-1 md:grid-cols-2 grid-flow-row auto-cols-auto":""]]),transition:"all duration-200 ease-in-out",style:{"scroll-snap-type":"x mandatory"}},[(d(!0),n(z,null,D(h.value,u=>(d(),E(Q,{id:u.id,key:u.id,modelValue:x.value,"onUpdate:modelValue":l[1]||(l[1]=y=>x.value=y),value:u.id,title:u.name,description:u.description,deprecated:u.deprecated,"show-expand-collapse":e.showMore,"expand-collapse-threshold":100,"show-custom-input":u.customizable,"custom-input-value":R.value,"custom-input-placeholder":e.customInputPlaceholder,name:"radio-card-detail-many-select",class:"scroll-snap-align-start","onUpdate:customInputValue":l[2]||(l[2]=y=>I(y))},null,8,["id","modelValue","value","title","description","deprecated","show-expand-collapse","show-custom-input","custom-input-value","custom-input-placeholder"]))),128))],2),t("div",{bg:"neutral-100 dark:[rgba(0,0,0,0.3)]","rounded-xl":"",class:o([i.value?"w-full":"mt-4 w-full rounded-lg"])},[t("button",{"w-full":"",flex:"","items-center":"","justify-center":"","gap-2":"","rounded-lg":"","py-2":"",transition:"all duration-200 ease-in-out",class:o([i.value?"bg-primary-500 hover:bg-primary-600 text-white":"bg-white dark:bg-neutral-900 hover:bg-neutral-100 dark:hover:bg-neutral-800"]),onClick:l[3]||(l[3]=u=>i.value=!i.value)},[t("span",null,c(i.value?e.collapseButtonText:e.expandButtonText),1),t("div",{class:o([i.value?"rotate-180":"","text-lg"]),"i-solar:alt-arrow-down-bold-duotone":"",transition:"transform duration-200 ease-in-out"},null,2)],2)],2)])])]))}}),ue=C(oe,[["__scopeId","data-v-0c2329bf"]]);export{ue as R,ie as a}; +import{d as g,bK as f,bL as w,g as b,c as n,o as d,z as o,A as V,a as t,bA as B,C as v,D as c,b as $,y as M,bJ as k,bn as C,h as S,bE as T,bx as z,by as D,x as E}from"./index-hDb1Lsb8.js";import{_ as N}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import{_ as L}from"./Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js";const P=["checked","name","value"],U={class:"relative mr-3 mt-0.5 flex-shrink-0"},q={class:"w-full flex flex-col gap-2"},j={class:"flex items-center"},A={key:0,class:"relative"},F=["title"],J={key:1,class:"mt-2"},K=g({__name:"RadioCardDetail",props:f({id:null,name:null,value:null,title:null,description:null,deprecated:{type:Boolean,default:!1},showExpandCollapse:{type:Boolean,default:!0},expandCollapseThreshold:{default:100},customInputValue:{default:""},customInputPlaceholder:{default:""},showCustomInput:{type:Boolean,default:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=w(e,"modelValue"),m=b(!1);function s(){m.value=!m.value}return(x,r)=>(d(),n("label",{key:e.id,class:o(["form_radio-card-detail relative flex cursor-pointer items-start rounded-xl p-3 pr-[20px]",[a.value===e.value?"bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30":"bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30",a.value===e.value?"form_radio-card-detail-active":"",e.deprecated?"opacity-60":""]]),transition:"all duration-200 ease-in-out",border:"2 solid"},[V(t("input",{"onUpdate:modelValue":r[0]||(r[0]=i=>a.value=i),checked:a.value===e.value,type:"radio",name:e.name,value:e.value,class:"absolute opacity-0"},null,8,P),[[B,a.value]]),t("div",U,[t("div",{class:o(["size-5 border-2 rounded-full transition-colors duration-200",[a.value===e.value?"border-primary-500 dark:border-primary-400":"border-neutral-300 dark:border-neutral-600"]])},[t("div",{class:o(["absolute left-1/2 top-1/2 size-3 rounded-full transition-opacity duration-200 -translate-x-1/2 -translate-y-1/2",[a.value===e.value?"opacity-100 bg-primary-500 dark:bg-primary-400":"opacity-0"]])},null,2)],2)]),t("div",q,[t("div",j,[t("span",{class:o(["line-clamp-1 font-medium",[a.value===e.value?"text-neutral-700 dark:text-neutral-300":"text-neutral-700 dark:text-neutral-400"]])},c(e.title),3)]),e.description?(d(),n("div",A,[$(N,null,{default:M(()=>[!m.value||!e.showExpandCollapse?(d(),n("div",{key:0,class:o(["line-clamp-2 cursor-pointer text-xs",[a.value===e.value?"text-neutral-600 dark:text-neutral-400":"text-neutral-500 dark:text-neutral-500"]]),title:e.description,onClick:k(s,["prevent"])},c(e.description),11,F)):(d(),n("div",{key:1,class:o(["cursor-pointer text-xs",[a.value===e.value?"text-neutral-600 dark:text-neutral-400":"text-neutral-500 dark:text-neutral-500"]]),onClick:k(s,["prevent"])},c(e.description),3))]),_:1}),e.showExpandCollapse&&e.description.length>e.expandCollapseThreshold?(d(),n("button",{key:0,class:"text-primary-500 dark:text-primary-600 mt-0.5 inline-flex items-center text-xs",onClick:k(s,["prevent"])},[t("span",null,c(m.value?"Show less":"Show more"),1),t("div",{class:o([{"rotate-180":m.value},"transition-transform duration-200"])},r[2]||(r[2]=[t("div",{"i-solar:alt-arrow-down-bold-duotone":"","ml-0.5":"","text-xs":""},null,-1)]),2)])):v("",!0)])):v("",!0),e.showCustomInput&&a.value===e.value?(d(),n("div",J,[$(L,{modelValue:a.value,"onUpdate:modelValue":r[1]||(r[1]=i=>a.value=i),type:"text",class:"w-full border border-neutral-300 rounded bg-white px-2 py-1 text-sm dark:border-neutral-700 dark:bg-neutral-900",placeholder:e.customInputPlaceholder},null,8,["modelValue","placeholder"])])):v("",!0)])],2))}}),Q=C(K,[["__scopeId","data-v-c9195151"]]),G=["checked","name","value"],H={flex:"~ col","min-h-16":"","w-full":"","items-start":"","justify-center":"","pb-2":"","pl-5":"","pr-4":"","pt-2":""},O=g({__name:"RadioCardSimple",props:f({id:null,name:null,value:null,title:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=w(e,"modelValue");return(m,s)=>(d(),n("label",{key:e.id,border:"2px solid",class:o(["form_radio-card-simple relative",[a.value===e.value?"bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30":"bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30",a.value===e.value?"form_radio-card-simple-active":""]]),transition:"all duration-200 ease-in-out",flex:"~ col",block:"","min-w-50":"","w-fit":"","cursor-pointer":"","items-start":"","rounded-xl":"","p-4":"","text-left":""},[V(t("input",{"onUpdate:modelValue":s[0]||(s[0]=x=>a.value=x),checked:a.value===e.value,type:"radio",name:e.name,value:e.value,class:"[&:checked+div]:border-primary-500 dark:[&:checked+div]:border-primary-400 absolute opacity-0 [&:checked+div_.radio-dot]:opacity-100"},null,8,G),[[B,a.value]]),s[1]||(s[1]=t("div",{class:"radio-circle absolute left-2 top-2 size-5 rounded-full",border:"2 solid neutral-300 dark:neutral-600",transition:"all duration-200 ease-in-out"},[t("div",{class:"radio-dot absolute left-1/2 top-1/2 size-3 rounded-full opacity-0 -translate-x-1/2 -translate-y-1/2",transition:"all duration-200 ease-in-out",bg:"primary-500 dark:primary-400"})],-1)),t("div",H,[t("span",{class:o(["radio-item-name font-bold",[a.value===e.value?"text-neutral-700 dark:text-neutral-300":"text-neutral-500 dark:text-neutral-500"]]),text:"md",transition:"all duration-200 ease-in-out"},c(e.title),3),e.description?(d(),n("span",{key:0,class:o(["radio-item-description",[a.value===e.value?"text-neutral-600 dark:text-neutral-400":"text-neutral-400 dark:text-neutral-600"]]),transition:"all duration-200 ease-in-out"},c(e.description),3)):v("",!0)]),s[2]||(s[2]=t("div",{class:"bg-dotted-neutral-200/80 dark:bg-dotted-neutral-700/50 [input:checked~&]:bg-dotted-primary-300/50 dark:[input:checked~&]:bg-dotted-primary-200/20",absolute:"","inset-0":"","z--1":"",style:{"background-size":"10px 10px","mask-image":"linear-gradient(165deg, white 30%, transparent 50%)"}},null,-1))],2))}}),ie=C(O,[["__scopeId","data-v-dd41bc0b"]]),W={class:"radio-card-detail-many-select"},X={key:0,class:"relative","inline-flex":"~","w-full":"","items-center":""},Y=["placeholder"],Z={class:"mt-4 space-y-2"},_={key:0,class:"text-sm text-neutral-500 dark:text-neutral-400"},ee={key:1,class:"flex items-center gap-3 border border-2 border-amber-200 rounded-xl bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20"},te={class:"flex flex-col"},ae={class:"font-medium"},le={class:"text-sm text-amber-600 dark:text-amber-400"},re={class:"relative"},oe=g({__name:"RadioCardDetailManySelect",props:f({items:null,searchable:{type:Boolean,default:!0},searchPlaceholder:{default:"Search..."},searchNoResultsTitle:{default:"No results found"},searchNoResultsDescription:{default:"Try a different search term"},searchResultsText:{default:"{count} of {total} results"},customInputPlaceholder:{default:"Enter custom value"},expandButtonText:{default:"Show more"},collapseButtonText:{default:"Show less"},showMore:{type:Boolean,default:!0}},{modelValue:{required:!0},modelModifiers:{}}),emits:f(["update:customValue"],["update:modelValue"]),setup(e,{emit:a}){const m=e,s=a,x=w(e,"modelValue"),r=b(""),i=b(!1),R=b(""),h=S(()=>{if(!r.value)return m.items;const p=r.value.toLowerCase();return m.items.filter(l=>l.name.toLowerCase().includes(p)||l.description&&l.description.toLowerCase().includes(p))});function I(p){R.value=p,s("update:customValue",p)}return(p,l)=>(d(),n("div",W,[e.searchable?(d(),n("div",X,[l[4]||(l[4]=t("div",{class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},[t("div",{"i-solar:magnifer-line-duotone":"",class:"text-neutral-500 dark:text-neutral-400"})],-1)),V(t("input",{"onUpdate:modelValue":l[0]||(l[0]=u=>r.value=u),type:"search",class:"w-full rounded-xl p-2.5 pl-10 text-sm outline-none",border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",bg:"white dark:neutral-900",placeholder:e.searchPlaceholder},null,8,Y),[[T,r.value]])])):v("",!0),t("div",Z,[r.value?(d(),n("div",_,c(e.searchResultsText.replace("{count}",h.value.length.toString()).replace("{total}",e.items.length.toString())),1)):v("",!0),r.value&&h.value.length===0?(d(),n("div",ee,[l[5]||(l[5]=t("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),t("div",te,[t("span",ae,c(e.searchNoResultsTitle),1),t("span",le,c(e.searchNoResultsDescription.replace("{query}",r.value)),1)])])):v("",!0),t("div",re,[t("div",{class:o(["scrollbar-hide grid auto-cols-[350px] grid-flow-col max-h-[calc(100dvh-7lh)] gap-4 overflow-x-auto pb-4",[i.value?"grid-cols-1 md:grid-cols-2 grid-flow-row auto-cols-auto":""]]),transition:"all duration-200 ease-in-out",style:{"scroll-snap-type":"x mandatory"}},[(d(!0),n(z,null,D(h.value,u=>(d(),E(Q,{id:u.id,key:u.id,modelValue:x.value,"onUpdate:modelValue":l[1]||(l[1]=y=>x.value=y),value:u.id,title:u.name,description:u.description,deprecated:u.deprecated,"show-expand-collapse":e.showMore,"expand-collapse-threshold":100,"show-custom-input":u.customizable,"custom-input-value":R.value,"custom-input-placeholder":e.customInputPlaceholder,name:"radio-card-detail-many-select",class:"scroll-snap-align-start","onUpdate:customInputValue":l[2]||(l[2]=y=>I(y))},null,8,["id","modelValue","value","title","description","deprecated","show-expand-collapse","show-custom-input","custom-input-value","custom-input-placeholder"]))),128))],2),t("div",{bg:"neutral-100 dark:[rgba(0,0,0,0.3)]","rounded-xl":"",class:o([i.value?"w-full":"mt-4 w-full rounded-lg"])},[t("button",{"w-full":"",flex:"","items-center":"","justify-center":"","gap-2":"","rounded-lg":"","py-2":"",transition:"all duration-200 ease-in-out",class:o([i.value?"bg-primary-500 hover:bg-primary-600 text-white":"bg-white dark:bg-neutral-900 hover:bg-neutral-100 dark:hover:bg-neutral-800"]),onClick:l[3]||(l[3]=u=>i.value=!i.value)},[t("span",null,c(i.value?e.collapseButtonText:e.expandButtonText),1),t("div",{class:o([i.value?"rotate-180":"","text-lg"]),"i-solar:alt-arrow-down-bold-duotone":"",transition:"transform duration-200 ease-in-out"},null,2)],2)],2)])])]))}}),ue=C(oe,[["__scopeId","data-v-0c2329bf"]]);export{ue as R,ie as a}; diff --git a/assets/SpeechVoiceSettings.vue_vue_type_script_setup_true_lang-DW1qhqmX.js b/assets/SpeechVoiceSettings.vue_vue_type_script_setup_true_lang-D0Yiu-Ma.js similarity index 96% rename from assets/SpeechVoiceSettings.vue_vue_type_script_setup_true_lang-DW1qhqmX.js rename to assets/SpeechVoiceSettings.vue_vue_type_script_setup_true_lang-D0Yiu-Ma.js index 2cd247f7913a5ec4a82e87702e76060eb733275d..057b2ab84331fddfc2817c92e4fa70097ac2bd30 100644 --- a/assets/SpeechVoiceSettings.vue_vue_type_script_setup_true_lang-DW1qhqmX.js +++ b/assets/SpeechVoiceSettings.vue_vue_type_script_setup_true_lang-D0Yiu-Ma.js @@ -1 +1 @@ -import{d as N,q as E,h as R,bw as ie,c as h,o as d,m as U,a as t,z as Y,A as q,C as V,D as k,g as x,w as D,H as Z,b as M,e,bE as G,bH as H,bx as J,by as Q,bG as re,s as ne,l as de,x as I,y as z,bT as W,bU as X,bP as ue,bK as ve,bL as T}from"./index-7-fr_lhT.js";import{b as pe,a as ee,_ as C}from"./TestDummyMarker.vue_vue_type_script_setup_true_lang-OSsy22LU.js";import"./live2d-zip-loader-dDw0Wbbr.js";import{u as ce,g as me}from"./speech-DK9my_xu.js";import{u as fe}from"./providers-B7zWTIWF.js";import{_ as ge,a as be}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CUVIcbSL.js";import{_ as ye}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C3sxqbyi.js";import{_ as xe,a as he}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BCwQg86s.js";const ke={flex:"~ row",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250,"mb-6":"","items-center":"","gap-3":""},Se={relative:""},Ve={key:0,absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},we={text:"neutral-300 dark:neutral-500","text-nowrap":""},Ue={"text-nowrap":"","text-3xl":"","font-semibold":""},$e={key:0,"text-sm":"",text:"neutral-500 dark:neutral-400"},_e={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},Be=N({__name:"ProviderSettingsLayout2",props:{providerName:null,providerIcon:null,providerIconColor:null,onBack:{type:Function},title:null,subtitle:null,categoryLabel:null},emits:["back"],setup(a,{emit:i}){const b=a,c=i,{t:y}=E(),w=R(()=>b.title||b.providerName||""),s=R(()=>b.categoryLabel||y("settings.pages.providers.title"));function f(){b.onBack&&b.onBack(),c("back")}return(l,v)=>{const r=ie("motion");return d(),h("div",null,[U(l.$slots,"header",{},()=>[q((d(),h("div",ke,[U(l.$slots,"backButton",{},()=>[t("button",{onClick:f},v[0]||(v[0]=[t("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)]))]),t("div",null,[U(l.$slots,"title",{},()=>[t("h1",Se,[s.value?(d(),h("div",Ve,[t("span",we,k(s.value),1)])):V("",!0),t("div",Ue,k(w.value),1)])]),U(l.$slots,"subtitle",{},()=>[a.subtitle?(d(),h("div",$e,k(a.subtitle),1)):V("",!0)])]),U(l.$slots,"headerExtra")])),[[r]])]),U(l.$slots,"default"),t("div",_e,[t("div",{text:"40",class:Y(a.providerIcon||a.providerIconColor)},null,2)])])}}}),Ie={"w-full":"","rounded-xl":""},Le={class:"mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400","w-full":""},Te={class:"inline-flex items-center gap-4"},Me={flex:"~ col gap-4"},Pe=["placeholder"],Ce=["placeholder"],Re={flex:"~ col gap-6"},Oe={grid:"~ cols-2 gap-4"},qe={class:"flex items-center gap-1 text-sm font-medium"},Ke={class:"text-xs text-neutral-500 dark:text-neutral-400"},ze=["value"],Ne={grid:"~ cols-2 gap-4"},Ee={class:"flex items-center gap-1 text-sm font-medium"},je={class:"text-xs text-neutral-500 dark:text-neutral-400"},De=["value"],Fe={flex:"~ row","gap-4":""},Ae=["disabled"],Ge={flex:"~ row","items-center":"","gap-2":""},He={flex:"~ row","items-center":"","gap-2":""},Je={key:2,class:"mt-2 text-sm text-red-500"},Qe={key:3,class:"mt-2 text-sm text-red-500"},We={key:4,class:"mt-2 text-sm text-red-500"},Xe=["src"],ct=N({__name:"SpeechPlayground",props:{defaultText:null,availableVoices:null,availableLanguages:null,generateSpeech:{type:Function},apiKeyConfigured:{type:Boolean}},setup(a,{expose:i}){const b=a,{t:c}=E(),y=x(b.defaultText||"Hello! This is a test of the voice synthesis."),w=x(!1),s=x(""),f=x(""),l=x(null),v=x(!1),r=x(""),n=x(b.availableLanguages[0]||"en-US"),g=x("");D(()=>b.availableVoices,S=>{var p;S.length>0&&!g.value&&(g.value=((p=S[0])==null?void 0:p.id)||"")},{immediate:!0});async function P(){if(!(!y.value.trim()&&!v.value||v.value&&!r.value.trim()||!g.value)){w.value=!0,f.value="";try{s.value&&$();const S=v.value?r.value:y.value,p=await b.generateSpeech(S,g.value,v.value);s.value=URL.createObjectURL(new Blob([p])),setTimeout(()=>{l.value&&l.value.play()},100)}catch(S){console.error("Error generating speech:",S),f.value=S instanceof Error?S.message:"An unknown error occurred"}finally{w.value=!1}}}function $(){l.value&&(l.value.pause(),l.value.currentTime=0),s.value&&(URL.revokeObjectURL(s.value),s.value="")}return Z(()=>{s.value&&URL.revokeObjectURL(s.value)}),i({testText:y,ssmlText:r,useSSML:v,selectedLanguage:n,selectedVoice:g,isGenerating:w,audioUrl:s,errorMessage:f,audioPlayer:l,generateTestSpeech:P,stopTestAudio:$}),(S,p)=>(d(),h("div",Ie,[t("h2",Le,[t("div",Te,[M(e(pe)),t("div",null,k(e(c)("settings.pages.providers.provider.elevenlabs.playground.title")),1)])]),t("div",Me,[M(e(ee),{modelValue:v.value,"onUpdate:modelValue":p[0]||(p[0]=m=>v.value=m),label:e(c)("settings.pages.modules.speech.sections.section.voice-settings.use-ssml.label"),description:e(c)("settings.pages.modules.speech.sections.section.voice-settings.use-ssml.description")},null,8,["modelValue","label","description"]),v.value?q((d(),h("textarea",{key:1,"onUpdate:modelValue":p[2]||(p[2]=m=>r.value=m),placeholder:e(c)("settings.pages.modules.speech.sections.section.voice-settings.input-ssml.placeholder"),border:"neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700",transition:"all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900","h-48":"","w-full":"","rounded-lg":"","px-3":"","py-2":"","text-sm":"","font-mono":"","outline-none":""},null,8,Ce)),[[G,r.value]]):q((d(),h("textarea",{key:0,"onUpdate:modelValue":p[1]||(p[1]=m=>y.value=m),placeholder:e(c)("settings.pages.providers.provider.elevenlabs.playground.fields.field.input.placeholder"),border:"neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700",transition:"all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900","h-24":"","w-full":"","rounded-lg":"","px-3":"","py-2":"","text-sm":"","outline-none":""},null,8,Pe)),[[G,y.value]]),t("div",Re,[t("label",Oe,[t("div",null,[t("div",qe,k(e(c)("settings.pages.providers.provider.elevenlabs.playground.fields.field.language.label")),1),t("div",Ke,k(e(c)("settings.pages.providers.provider.elevenlabs.playground.fields.field.language.description")),1)]),q(t("select",{"onUpdate:modelValue":p[3]||(p[3]=m=>n.value=m),border:"neutral-300 dark:neutral-800 solid 2 focus:neutral-400 dark:focus:neutral-600",transition:"border duration-250 ease-in-out","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":""},[(d(!0),h(J,null,Q(a.availableLanguages,m=>(d(),h("option",{key:m,value:m},k(m),9,ze))),128))],512),[[H,n.value]])]),t("label",Ne,[t("div",null,[t("div",Ee,k(e(c)("settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.label")),1),t("div",je,k(e(c)("settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.description")),1)]),q(t("select",{"onUpdate:modelValue":p[4]||(p[4]=m=>g.value=m),border:"neutral-300 dark:neutral-800 solid 2 focus:neutral-400 dark:focus:neutral-600",transition:"border duration-250 ease-in-out","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":""},[(d(!0),h(J,null,Q(a.availableVoices,m=>(d(),h("option",{key:m.id,value:m.id},k(m.name),9,De))),128))],512),[[H,g.value]])])]),t("div",Fe,[t("button",{border:"neutral-800 dark:neutral-200 solid 2",transition:"border duration-250 ease-in-out","rounded-lg":"","px-4":"",text:"neutral-100 dark:neutral-900","py-2":"","text-sm":"",disabled:w.value||!y.value.trim()&&!v.value||v.value&&!r.value.trim()||!g.value||!a.apiKeyConfigured,class:Y({"opacity-50 cursor-not-allowed":w.value||!y.value.trim()&&!v.value||v.value&&!r.value.trim()||!g.value||!a.apiKeyConfigured}),bg:"neutral-700 dark:neutral-300",onClick:P},[t("div",Ge,[p[5]||(p[5]=t("div",{"i-solar:play-circle-bold-duotone":""},null,-1)),t("span",null,k(w.value?e(c)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating"):e(c)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.label")),1)])],10,Ae),s.value?(d(),h("button",{key:0,border:"primary-300 dark:primary-800 solid 2",transition:"border duration-250 ease-in-out","rounded-lg":"","px-4":"","py-2":"","text-sm":"",onClick:$},[t("div",He,[p[6]||(p[6]=t("div",{"i-solar:stop-circle-bold-duotone":""},null,-1)),t("span",null,k(e(c)("settings.pages.modules.speech.sections.section.playground.buttons.stop.label")),1)])])):V("",!0)]),a.apiKeyConfigured?V("",!0):(d(),h("div",Je,k(e(c)("settings.pages.providers.provider.elevenlabs.playground.validation.error-missing-api-key")),1)),g.value?V("",!0):(d(),h("div",Qe,k(e(c)("settings.pages.modules.speech.sections.section.playground.select-voice.required")),1)),f.value?(d(),h("div",We,k(f.value),1)):V("",!0),s.value?(d(),h("audio",{key:5,ref_key:"audioPlayer",ref:l,src:s.value,controls:"",class:"mt-2 w-full"},null,8,Xe)):V("",!0)]),U(S.$slots,"default")]))}}),Ye={flex:"~ col md:row gap-6"},Ze={flex:"~ col gap-6"},et={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},tt={flex:"~ col gap-4"},lt={flex:"~ col gap-6",class:"w-full md:w-[60%]"},st={"w-full":"","rounded-xl":""},mt=N({__name:"SpeechProviderSettings",props:{providerId:null,defaultModel:null,additionalSettings:null},setup(a){const i=a,{t:b}=E(),c=re(),y=fe(),w=ce(),{providers:s}=ne(y),f=R(()=>y.getProviderMetadata(i.providerId)),l=R({get:()=>{var o;return((o=s.value[i.providerId])==null?void 0:o.apiKey)||""},set:o=>{s.value[i.providerId]||(s.value[i.providerId]={}),s.value[i.providerId].apiKey=o}}),v=R({get:()=>{var o,u,_;return((o=s.value[i.providerId])==null?void 0:o.baseUrl)||((_=(u=f.value)==null?void 0:u.defaultOptions)==null?void 0:_.baseUrl)||""},set:o=>{s.value[i.providerId]||(s.value[i.providerId]={}),s.value[i.providerId].baseUrl=o}}),r=x("Hello! This is a test of voice synthesis."),n=x(!1),g=x(""),P=x(""),$=x(null),S=x(!1),p=x(""),m=x(""),B=x({});function te(){var o;(o=s.value[i.providerId])!=null&&o.voiceSettings?B.value={...s.value[i.providerId].voiceSettings}:B.value={pitch:0,speed:1,volume:0,...i.additionalSettings}}de(()=>{var o,u,_,L;y.initializeProvider(i.providerId),l.value=((o=s.value[i.providerId])==null?void 0:o.apiKey)||"",v.value=((u=s.value[i.providerId])==null?void 0:u.baseUrl)||((L=(_=f.value)==null?void 0:_.defaultOptions)==null?void 0:L.baseUrl)||"",te(),y.configuredProviders[i.providerId]&&w.loadVoicesForProvider(i.providerId)});const j=ue(()=>{var o,u;s.value[i.providerId]={...s.value[i.providerId],apiKey:l.value,baseUrl:v.value||((u=(o=f.value)==null?void 0:o.defaultOptions)==null?void 0:u.baseUrl)||"",voiceSettings:{...B.value}}},1e3);D([l,v],j),D(B,j,{deep:!0});async function le(){if(!r.value.trim()&&!S.value||S.value&&!p.value.trim())return;const o=y.getProviderInstance(i.providerId);if(!o){console.error("Failed to initialize speech provider");return}if(!m.value){console.error("No active speech voice selected");return}n.value=!0,P.value="";try{g.value&&F();const u=i.defaultModel||"default",_=S.value?p.value:r.value,L=await me({...o.speech(u,{voiceSettings:B.value}),input:_,voice:m.value});g.value=URL.createObjectURL(new Blob([L])),setTimeout(()=>{$.value&&$.value.play()},100)}catch(u){console.error("Error generating speech:",u),P.value=u instanceof Error?u.message:"An unknown error occurred"}finally{n.value=!1}}function F(){$.value&&($.value.pause(),$.value.currentTime=0),g.value&&(URL.revokeObjectURL(g.value),g.value="")}Z(()=>{g.value&&URL.revokeObjectURL(g.value)});function se(){var o,u;B.value={...((u=(o=f.value)==null?void 0:o.defaultOptions)==null?void 0:u.voiceSettings)||{}},j()}function oe(o,u){B.value[o]=u}const A=R(()=>({voiceSettings:B.value,updateVoiceSettings:oe,isGenerating:n.value,testText:r.value,useSSML:S.value,ssmlText:p.value,generateTestSpeech:le,stopTestAudio:F,audioUrl:g.value,audioPlayer:$.value,errorMessage:P.value}));return(o,u)=>{var _,L;return d(),I(Be,{"provider-name":(_=f.value)==null?void 0:_.localizedName,"provider-icon":(L=f.value)==null?void 0:L.icon,"on-back":()=>e(c).back()},{default:z(()=>[t("div",Ye,[M(e(xe),{class:"w-full md:w-[40%]"},{default:z(()=>[M(e(he),{title:e(b)("settings.pages.providers.common.section.basic.title"),description:e(b)("settings.pages.providers.common.section.basic.description"),"on-reset":se},{default:z(()=>{var O;return[M(e(ye),{modelValue:l.value,"onUpdate:modelValue":u[0]||(u[0]=K=>l.value=K),"provider-name":(O=f.value)==null?void 0:O.localizedName,placeholder:"sk-"},null,8,["modelValue","provider-name"]),U(o.$slots,"basic-settings")]}),_:3},8,["title","description"]),t("div",Ze,[t("h2",et,k(e(b)("settings.pages.providers.common.section.voice.title")),1),t("div",tt,[U(o.$slots,"voice-settings",W(X(A.value)))])]),M(e(ge),{title:e(b)("settings.pages.providers.common.section.advanced.title")},{default:z(()=>{var O,K;return[M(e(be),{modelValue:v.value,"onUpdate:modelValue":u[1]||(u[1]=ae=>v.value=ae),placeholder:((K=(O=f.value)==null?void 0:O.defaultOptions)==null?void 0:K.baseUrl)||"",required:""},null,8,["modelValue","placeholder"]),U(o.$slots,"advanced-settings")]}),_:3},8,["title"])]),_:3}),t("div",lt,[t("div",st,[U(o.$slots,"playground",W(X(A.value)))])])])]),_:3},8,["provider-name","provider-icon","on-back"])}}}),ot={flex:"~ col gap-4"},ft=N({__name:"SpeechVoiceSettings",props:ve({settings:null,showPitch:{type:Boolean},showSpeed:{type:Boolean},showStyle:{type:Boolean},showStability:{type:Boolean},showSimilarityBoost:{type:Boolean},showVolume:{type:Boolean},showSpeakerBoost:{type:Boolean}},{pitch:{required:!1,default:0},pitchModifiers:{},speed:{required:!1,default:1},speedModifiers:{},volume:{required:!1,default:0},volumeModifiers:{},style:{required:!1,default:0},styleModifiers:{},stability:{required:!1,default:.5},stabilityModifiers:{},similarityBoost:{required:!1,default:.75},similarityBoostModifiers:{},useSpeakerBoost:{type:Boolean,required:!1,default:!1},useSpeakerBoostModifiers:{}}),emits:["update:pitch","update:speed","update:volume","update:style","update:stability","update:similarityBoost","update:useSpeakerBoost"],setup(a){const i=T(a,"pitch"),b=T(a,"speed"),c=T(a,"volume"),y=T(a,"style"),w=T(a,"stability"),s=T(a,"similarityBoost"),f=T(a,"useSpeakerBoost"),{t:l}=E();return(v,r)=>(d(),h("div",ot,[a.showPitch?(d(),I(e(C),{key:0,modelValue:i.value,"onUpdate:modelValue":r[0]||(r[0]=n=>i.value=n),label:e(l)("settings.pages.providers.provider.common.fields.field.pitch.label"),description:e(l)("settings.pages.providers.provider.common.fields.field.pitch.description"),min:-100,max:100,step:1,"format-value":n=>`${n}%`},null,8,["modelValue","label","description","format-value"])):V("",!0),a.showSpeed?(d(),I(e(C),{key:1,modelValue:b.value,"onUpdate:modelValue":r[1]||(r[1]=n=>b.value=n),label:e(l)("settings.pages.providers.provider.common.fields.field.speed.label"),description:e(l)("settings.pages.providers.provider.common.fields.field.speed.description"),min:.5,max:2,step:.01},null,8,["modelValue","label","description"])):V("",!0),a.showVolume?(d(),I(e(C),{key:2,modelValue:c.value,"onUpdate:modelValue":r[2]||(r[2]=n=>c.value=n),label:e(l)("settings.pages.providers.provider.common.fields.field.volume.label"),description:e(l)("settings.pages.providers.provider.common.fields.field.volume.description"),min:-100,max:100,step:1,"format-value":n=>`${n}%`},null,8,["modelValue","label","description","format-value"])):V("",!0),a.showStyle?(d(),I(e(C),{key:3,modelValue:y.value,"onUpdate:modelValue":r[3]||(r[3]=n=>y.value=n),label:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.style.label"),description:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.style.description"),min:0,max:1,step:.01},null,8,["modelValue","label","description"])):V("",!0),a.showStability?(d(),I(e(C),{key:4,modelValue:w.value,"onUpdate:modelValue":r[4]||(r[4]=n=>w.value=n),label:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.stability.label"),description:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.stability.description"),min:0,max:1,step:.01},null,8,["modelValue","label","description"])):V("",!0),a.showSimilarityBoost?(d(),I(e(C),{key:5,modelValue:s.value,"onUpdate:modelValue":r[5]||(r[5]=n=>s.value=n),label:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.label"),description:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.description"),min:0,max:1,step:.01},null,8,["modelValue","label","description"])):V("",!0),a.showSpeakerBoost?(d(),I(e(ee),{key:6,modelValue:f.value,"onUpdate:modelValue":r[6]||(r[6]=n=>f.value=n),label:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.label"),description:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.description")},null,8,["modelValue","label","description"])):V("",!0),U(v.$slots,"default")]))}});export{ct as _,ft as a,mt as b}; +import{d as N,q as E,h as R,bw as ie,c as h,o as d,m as U,a as t,z as Y,A as q,C as V,D as k,g as x,w as D,H as Z,b as M,e,bE as G,bH as H,bx as J,by as Q,bG as re,s as ne,l as de,x as I,y as z,bT as W,bU as X,bP as ue,bK as ve,bL as T}from"./index-hDb1Lsb8.js";import{b as pe,a as ee,_ as C}from"./TestDummyMarker.vue_vue_type_script_setup_true_lang-DvXVr5Qy.js";import"./live2d-zip-loader--bTGFeQd.js";import{u as ce,g as me}from"./speech-D3H5B80W.js";import{u as fe}from"./providers-adQ6cb75.js";import{_ as ge,a as be}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-UCuivhvU.js";import{_ as ye}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-CHpN3yiY.js";import{_ as xe,a as he}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CYv3qJbi.js";const ke={flex:"~ row",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250,"mb-6":"","items-center":"","gap-3":""},Se={relative:""},Ve={key:0,absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},we={text:"neutral-300 dark:neutral-500","text-nowrap":""},Ue={"text-nowrap":"","text-3xl":"","font-semibold":""},$e={key:0,"text-sm":"",text:"neutral-500 dark:neutral-400"},_e={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},Be=N({__name:"ProviderSettingsLayout2",props:{providerName:null,providerIcon:null,providerIconColor:null,onBack:{type:Function},title:null,subtitle:null,categoryLabel:null},emits:["back"],setup(a,{emit:i}){const b=a,c=i,{t:y}=E(),w=R(()=>b.title||b.providerName||""),s=R(()=>b.categoryLabel||y("settings.pages.providers.title"));function f(){b.onBack&&b.onBack(),c("back")}return(l,v)=>{const r=ie("motion");return d(),h("div",null,[U(l.$slots,"header",{},()=>[q((d(),h("div",ke,[U(l.$slots,"backButton",{},()=>[t("button",{onClick:f},v[0]||(v[0]=[t("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)]))]),t("div",null,[U(l.$slots,"title",{},()=>[t("h1",Se,[s.value?(d(),h("div",Ve,[t("span",we,k(s.value),1)])):V("",!0),t("div",Ue,k(w.value),1)])]),U(l.$slots,"subtitle",{},()=>[a.subtitle?(d(),h("div",$e,k(a.subtitle),1)):V("",!0)])]),U(l.$slots,"headerExtra")])),[[r]])]),U(l.$slots,"default"),t("div",_e,[t("div",{text:"40",class:Y(a.providerIcon||a.providerIconColor)},null,2)])])}}}),Ie={"w-full":"","rounded-xl":""},Le={class:"mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400","w-full":""},Te={class:"inline-flex items-center gap-4"},Me={flex:"~ col gap-4"},Pe=["placeholder"],Ce=["placeholder"],Re={flex:"~ col gap-6"},Oe={grid:"~ cols-2 gap-4"},qe={class:"flex items-center gap-1 text-sm font-medium"},Ke={class:"text-xs text-neutral-500 dark:text-neutral-400"},ze=["value"],Ne={grid:"~ cols-2 gap-4"},Ee={class:"flex items-center gap-1 text-sm font-medium"},je={class:"text-xs text-neutral-500 dark:text-neutral-400"},De=["value"],Fe={flex:"~ row","gap-4":""},Ae=["disabled"],Ge={flex:"~ row","items-center":"","gap-2":""},He={flex:"~ row","items-center":"","gap-2":""},Je={key:2,class:"mt-2 text-sm text-red-500"},Qe={key:3,class:"mt-2 text-sm text-red-500"},We={key:4,class:"mt-2 text-sm text-red-500"},Xe=["src"],ct=N({__name:"SpeechPlayground",props:{defaultText:null,availableVoices:null,availableLanguages:null,generateSpeech:{type:Function},apiKeyConfigured:{type:Boolean}},setup(a,{expose:i}){const b=a,{t:c}=E(),y=x(b.defaultText||"Hello! This is a test of the voice synthesis."),w=x(!1),s=x(""),f=x(""),l=x(null),v=x(!1),r=x(""),n=x(b.availableLanguages[0]||"en-US"),g=x("");D(()=>b.availableVoices,S=>{var p;S.length>0&&!g.value&&(g.value=((p=S[0])==null?void 0:p.id)||"")},{immediate:!0});async function P(){if(!(!y.value.trim()&&!v.value||v.value&&!r.value.trim()||!g.value)){w.value=!0,f.value="";try{s.value&&$();const S=v.value?r.value:y.value,p=await b.generateSpeech(S,g.value,v.value);s.value=URL.createObjectURL(new Blob([p])),setTimeout(()=>{l.value&&l.value.play()},100)}catch(S){console.error("Error generating speech:",S),f.value=S instanceof Error?S.message:"An unknown error occurred"}finally{w.value=!1}}}function $(){l.value&&(l.value.pause(),l.value.currentTime=0),s.value&&(URL.revokeObjectURL(s.value),s.value="")}return Z(()=>{s.value&&URL.revokeObjectURL(s.value)}),i({testText:y,ssmlText:r,useSSML:v,selectedLanguage:n,selectedVoice:g,isGenerating:w,audioUrl:s,errorMessage:f,audioPlayer:l,generateTestSpeech:P,stopTestAudio:$}),(S,p)=>(d(),h("div",Ie,[t("h2",Le,[t("div",Te,[M(e(pe)),t("div",null,k(e(c)("settings.pages.providers.provider.elevenlabs.playground.title")),1)])]),t("div",Me,[M(e(ee),{modelValue:v.value,"onUpdate:modelValue":p[0]||(p[0]=m=>v.value=m),label:e(c)("settings.pages.modules.speech.sections.section.voice-settings.use-ssml.label"),description:e(c)("settings.pages.modules.speech.sections.section.voice-settings.use-ssml.description")},null,8,["modelValue","label","description"]),v.value?q((d(),h("textarea",{key:1,"onUpdate:modelValue":p[2]||(p[2]=m=>r.value=m),placeholder:e(c)("settings.pages.modules.speech.sections.section.voice-settings.input-ssml.placeholder"),border:"neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700",transition:"all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900","h-48":"","w-full":"","rounded-lg":"","px-3":"","py-2":"","text-sm":"","font-mono":"","outline-none":""},null,8,Ce)),[[G,r.value]]):q((d(),h("textarea",{key:0,"onUpdate:modelValue":p[1]||(p[1]=m=>y.value=m),placeholder:e(c)("settings.pages.providers.provider.elevenlabs.playground.fields.field.input.placeholder"),border:"neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700",transition:"all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900","h-24":"","w-full":"","rounded-lg":"","px-3":"","py-2":"","text-sm":"","outline-none":""},null,8,Pe)),[[G,y.value]]),t("div",Re,[t("label",Oe,[t("div",null,[t("div",qe,k(e(c)("settings.pages.providers.provider.elevenlabs.playground.fields.field.language.label")),1),t("div",Ke,k(e(c)("settings.pages.providers.provider.elevenlabs.playground.fields.field.language.description")),1)]),q(t("select",{"onUpdate:modelValue":p[3]||(p[3]=m=>n.value=m),border:"neutral-300 dark:neutral-800 solid 2 focus:neutral-400 dark:focus:neutral-600",transition:"border duration-250 ease-in-out","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":""},[(d(!0),h(J,null,Q(a.availableLanguages,m=>(d(),h("option",{key:m,value:m},k(m),9,ze))),128))],512),[[H,n.value]])]),t("label",Ne,[t("div",null,[t("div",Ee,k(e(c)("settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.label")),1),t("div",je,k(e(c)("settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.description")),1)]),q(t("select",{"onUpdate:modelValue":p[4]||(p[4]=m=>g.value=m),border:"neutral-300 dark:neutral-800 solid 2 focus:neutral-400 dark:focus:neutral-600",transition:"border duration-250 ease-in-out","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":""},[(d(!0),h(J,null,Q(a.availableVoices,m=>(d(),h("option",{key:m.id,value:m.id},k(m.name),9,De))),128))],512),[[H,g.value]])])]),t("div",Fe,[t("button",{border:"neutral-800 dark:neutral-200 solid 2",transition:"border duration-250 ease-in-out","rounded-lg":"","px-4":"",text:"neutral-100 dark:neutral-900","py-2":"","text-sm":"",disabled:w.value||!y.value.trim()&&!v.value||v.value&&!r.value.trim()||!g.value||!a.apiKeyConfigured,class:Y({"opacity-50 cursor-not-allowed":w.value||!y.value.trim()&&!v.value||v.value&&!r.value.trim()||!g.value||!a.apiKeyConfigured}),bg:"neutral-700 dark:neutral-300",onClick:P},[t("div",Ge,[p[5]||(p[5]=t("div",{"i-solar:play-circle-bold-duotone":""},null,-1)),t("span",null,k(w.value?e(c)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating"):e(c)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.label")),1)])],10,Ae),s.value?(d(),h("button",{key:0,border:"primary-300 dark:primary-800 solid 2",transition:"border duration-250 ease-in-out","rounded-lg":"","px-4":"","py-2":"","text-sm":"",onClick:$},[t("div",He,[p[6]||(p[6]=t("div",{"i-solar:stop-circle-bold-duotone":""},null,-1)),t("span",null,k(e(c)("settings.pages.modules.speech.sections.section.playground.buttons.stop.label")),1)])])):V("",!0)]),a.apiKeyConfigured?V("",!0):(d(),h("div",Je,k(e(c)("settings.pages.providers.provider.elevenlabs.playground.validation.error-missing-api-key")),1)),g.value?V("",!0):(d(),h("div",Qe,k(e(c)("settings.pages.modules.speech.sections.section.playground.select-voice.required")),1)),f.value?(d(),h("div",We,k(f.value),1)):V("",!0),s.value?(d(),h("audio",{key:5,ref_key:"audioPlayer",ref:l,src:s.value,controls:"",class:"mt-2 w-full"},null,8,Xe)):V("",!0)]),U(S.$slots,"default")]))}}),Ye={flex:"~ col md:row gap-6"},Ze={flex:"~ col gap-6"},et={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},tt={flex:"~ col gap-4"},lt={flex:"~ col gap-6",class:"w-full md:w-[60%]"},st={"w-full":"","rounded-xl":""},mt=N({__name:"SpeechProviderSettings",props:{providerId:null,defaultModel:null,additionalSettings:null},setup(a){const i=a,{t:b}=E(),c=re(),y=fe(),w=ce(),{providers:s}=ne(y),f=R(()=>y.getProviderMetadata(i.providerId)),l=R({get:()=>{var o;return((o=s.value[i.providerId])==null?void 0:o.apiKey)||""},set:o=>{s.value[i.providerId]||(s.value[i.providerId]={}),s.value[i.providerId].apiKey=o}}),v=R({get:()=>{var o,u,_;return((o=s.value[i.providerId])==null?void 0:o.baseUrl)||((_=(u=f.value)==null?void 0:u.defaultOptions)==null?void 0:_.baseUrl)||""},set:o=>{s.value[i.providerId]||(s.value[i.providerId]={}),s.value[i.providerId].baseUrl=o}}),r=x("Hello! This is a test of voice synthesis."),n=x(!1),g=x(""),P=x(""),$=x(null),S=x(!1),p=x(""),m=x(""),B=x({});function te(){var o;(o=s.value[i.providerId])!=null&&o.voiceSettings?B.value={...s.value[i.providerId].voiceSettings}:B.value={pitch:0,speed:1,volume:0,...i.additionalSettings}}de(()=>{var o,u,_,L;y.initializeProvider(i.providerId),l.value=((o=s.value[i.providerId])==null?void 0:o.apiKey)||"",v.value=((u=s.value[i.providerId])==null?void 0:u.baseUrl)||((L=(_=f.value)==null?void 0:_.defaultOptions)==null?void 0:L.baseUrl)||"",te(),y.configuredProviders[i.providerId]&&w.loadVoicesForProvider(i.providerId)});const j=ue(()=>{var o,u;s.value[i.providerId]={...s.value[i.providerId],apiKey:l.value,baseUrl:v.value||((u=(o=f.value)==null?void 0:o.defaultOptions)==null?void 0:u.baseUrl)||"",voiceSettings:{...B.value}}},1e3);D([l,v],j),D(B,j,{deep:!0});async function le(){if(!r.value.trim()&&!S.value||S.value&&!p.value.trim())return;const o=y.getProviderInstance(i.providerId);if(!o){console.error("Failed to initialize speech provider");return}if(!m.value){console.error("No active speech voice selected");return}n.value=!0,P.value="";try{g.value&&F();const u=i.defaultModel||"default",_=S.value?p.value:r.value,L=await me({...o.speech(u,{voiceSettings:B.value}),input:_,voice:m.value});g.value=URL.createObjectURL(new Blob([L])),setTimeout(()=>{$.value&&$.value.play()},100)}catch(u){console.error("Error generating speech:",u),P.value=u instanceof Error?u.message:"An unknown error occurred"}finally{n.value=!1}}function F(){$.value&&($.value.pause(),$.value.currentTime=0),g.value&&(URL.revokeObjectURL(g.value),g.value="")}Z(()=>{g.value&&URL.revokeObjectURL(g.value)});function se(){var o,u;B.value={...((u=(o=f.value)==null?void 0:o.defaultOptions)==null?void 0:u.voiceSettings)||{}},j()}function oe(o,u){B.value[o]=u}const A=R(()=>({voiceSettings:B.value,updateVoiceSettings:oe,isGenerating:n.value,testText:r.value,useSSML:S.value,ssmlText:p.value,generateTestSpeech:le,stopTestAudio:F,audioUrl:g.value,audioPlayer:$.value,errorMessage:P.value}));return(o,u)=>{var _,L;return d(),I(Be,{"provider-name":(_=f.value)==null?void 0:_.localizedName,"provider-icon":(L=f.value)==null?void 0:L.icon,"on-back":()=>e(c).back()},{default:z(()=>[t("div",Ye,[M(e(xe),{class:"w-full md:w-[40%]"},{default:z(()=>[M(e(he),{title:e(b)("settings.pages.providers.common.section.basic.title"),description:e(b)("settings.pages.providers.common.section.basic.description"),"on-reset":se},{default:z(()=>{var O;return[M(e(ye),{modelValue:l.value,"onUpdate:modelValue":u[0]||(u[0]=K=>l.value=K),"provider-name":(O=f.value)==null?void 0:O.localizedName,placeholder:"sk-"},null,8,["modelValue","provider-name"]),U(o.$slots,"basic-settings")]}),_:3},8,["title","description"]),t("div",Ze,[t("h2",et,k(e(b)("settings.pages.providers.common.section.voice.title")),1),t("div",tt,[U(o.$slots,"voice-settings",W(X(A.value)))])]),M(e(ge),{title:e(b)("settings.pages.providers.common.section.advanced.title")},{default:z(()=>{var O,K;return[M(e(be),{modelValue:v.value,"onUpdate:modelValue":u[1]||(u[1]=ae=>v.value=ae),placeholder:((K=(O=f.value)==null?void 0:O.defaultOptions)==null?void 0:K.baseUrl)||"",required:""},null,8,["modelValue","placeholder"]),U(o.$slots,"advanced-settings")]}),_:3},8,["title"])]),_:3}),t("div",lt,[t("div",st,[U(o.$slots,"playground",W(X(A.value)))])])])]),_:3},8,["provider-name","provider-icon","on-back"])}}}),ot={flex:"~ col gap-4"},ft=N({__name:"SpeechVoiceSettings",props:ve({settings:null,showPitch:{type:Boolean},showSpeed:{type:Boolean},showStyle:{type:Boolean},showStability:{type:Boolean},showSimilarityBoost:{type:Boolean},showVolume:{type:Boolean},showSpeakerBoost:{type:Boolean}},{pitch:{required:!1,default:0},pitchModifiers:{},speed:{required:!1,default:1},speedModifiers:{},volume:{required:!1,default:0},volumeModifiers:{},style:{required:!1,default:0},styleModifiers:{},stability:{required:!1,default:.5},stabilityModifiers:{},similarityBoost:{required:!1,default:.75},similarityBoostModifiers:{},useSpeakerBoost:{type:Boolean,required:!1,default:!1},useSpeakerBoostModifiers:{}}),emits:["update:pitch","update:speed","update:volume","update:style","update:stability","update:similarityBoost","update:useSpeakerBoost"],setup(a){const i=T(a,"pitch"),b=T(a,"speed"),c=T(a,"volume"),y=T(a,"style"),w=T(a,"stability"),s=T(a,"similarityBoost"),f=T(a,"useSpeakerBoost"),{t:l}=E();return(v,r)=>(d(),h("div",ot,[a.showPitch?(d(),I(e(C),{key:0,modelValue:i.value,"onUpdate:modelValue":r[0]||(r[0]=n=>i.value=n),label:e(l)("settings.pages.providers.provider.common.fields.field.pitch.label"),description:e(l)("settings.pages.providers.provider.common.fields.field.pitch.description"),min:-100,max:100,step:1,"format-value":n=>`${n}%`},null,8,["modelValue","label","description","format-value"])):V("",!0),a.showSpeed?(d(),I(e(C),{key:1,modelValue:b.value,"onUpdate:modelValue":r[1]||(r[1]=n=>b.value=n),label:e(l)("settings.pages.providers.provider.common.fields.field.speed.label"),description:e(l)("settings.pages.providers.provider.common.fields.field.speed.description"),min:.5,max:2,step:.01},null,8,["modelValue","label","description"])):V("",!0),a.showVolume?(d(),I(e(C),{key:2,modelValue:c.value,"onUpdate:modelValue":r[2]||(r[2]=n=>c.value=n),label:e(l)("settings.pages.providers.provider.common.fields.field.volume.label"),description:e(l)("settings.pages.providers.provider.common.fields.field.volume.description"),min:-100,max:100,step:1,"format-value":n=>`${n}%`},null,8,["modelValue","label","description","format-value"])):V("",!0),a.showStyle?(d(),I(e(C),{key:3,modelValue:y.value,"onUpdate:modelValue":r[3]||(r[3]=n=>y.value=n),label:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.style.label"),description:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.style.description"),min:0,max:1,step:.01},null,8,["modelValue","label","description"])):V("",!0),a.showStability?(d(),I(e(C),{key:4,modelValue:w.value,"onUpdate:modelValue":r[4]||(r[4]=n=>w.value=n),label:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.stability.label"),description:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.stability.description"),min:0,max:1,step:.01},null,8,["modelValue","label","description"])):V("",!0),a.showSimilarityBoost?(d(),I(e(C),{key:5,modelValue:s.value,"onUpdate:modelValue":r[5]||(r[5]=n=>s.value=n),label:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.label"),description:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.description"),min:0,max:1,step:.01},null,8,["modelValue","label","description"])):V("",!0),a.showSpeakerBoost?(d(),I(e(ee),{key:6,modelValue:f.value,"onUpdate:modelValue":r[6]||(r[6]=n=>f.value=n),label:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.label"),description:e(l)("settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.description")},null,8,["modelValue","label","description"])):V("",!0),U(v.$slots,"default")]))}});export{ct as _,ft as a,mt as b}; diff --git a/assets/TestDummyMarker.vue_vue_type_script_setup_true_lang-OSsy22LU.js b/assets/TestDummyMarker.vue_vue_type_script_setup_true_lang-DvXVr5Qy.js similarity index 99% rename from assets/TestDummyMarker.vue_vue_type_script_setup_true_lang-OSsy22LU.js rename to assets/TestDummyMarker.vue_vue_type_script_setup_true_lang-DvXVr5Qy.js index 376e2d7a89533e972b7d228f2e7cd714617571ec..2b70c4e0f67528652e58f5803cf50c6584941f7b 100644 --- a/assets/TestDummyMarker.vue_vue_type_script_setup_true_lang-OSsy22LU.js +++ b/assets/TestDummyMarker.vue_vue_type_script_setup_true_lang-DvXVr5Qy.js @@ -1 +1 @@ -import{bx as P,d as m,c2 as I,bV as V,c3 as D,b$ as E,x as y,o as c,y as _,m as k,e as d,b_ as N,cc as L,g as $,h,cd as M,bX as z,ce as U,w as H,c as g,by as K,E as X,cf as G,C as W,cg as Y,bJ as J,bL as C,b as w,bK as B,a as v,D as x,l as R,A as Q,bE as Z,bn as j,n as A,br as S,H as ee}from"./index-7-fr_lhT.js";function O(t){return t?t.flatMap(e=>e.type===P?O(e.children):[e]):[]}const te=m({name:"PrimitiveSlot",inheritAttrs:!1,setup(t,{attrs:e,slots:n}){return()=>{var p,f;if(!n.default)return null;const o=O(n.default()),l=o.findIndex(i=>i.type!==I);if(l===-1)return o;const r=o[l];(p=r.props)==null||delete p.ref;const a=r.props?V(e,r.props):e;e.class&&((f=r.props)!=null&&f.class)&&delete r.props.class;const u=D(r,a);for(const i in a)i.startsWith("on")&&(u.props||(u.props={}),u.props[i]=a[i]);return o.length===1?u:(o[l]=u,o)}}}),ae=["area","img","input"],q=m({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(t,{attrs:e,slots:n}){const o=t.asChild?"template":t.as;return typeof o=="string"&&ae.includes(o)?()=>E(o,e):o!=="template"?()=>E(t.as,e,{default:n.default}):()=>E(te,e,{default:n.default})}}),ne=m({__name:"VisuallyHidden",props:{feature:{default:"focusable"},asChild:{type:Boolean},as:{default:"span"}},setup(t){return(e,n)=>(c(),y(d(q),{as:e.as,"as-child":e.asChild,"aria-hidden":e.feature==="focusable"?"true":void 0,"data-hidden":e.feature==="fully-hidden"?"":void 0,tabindex:e.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal"}},{default:_(()=>[k(e.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}});function le(t,e){const n=`${t}Context`,o=Symbol(n);return[a=>{const u=N(o,a);if(u||u===null)return u;throw new Error(`Injection \`${o.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`)},a=>(L(o,a),a)]}function T(){const t=z(),e=$(),n=h(()=>{var a,u;return["#text","#comment"].includes((a=e.value)==null?void 0:a.$el.nodeName)?(u=e.value)==null?void 0:u.$el.nextElementSibling:M(e)}),o=Object.assign({},t.exposed),l={};for(const a in t.props)Object.defineProperty(l,a,{enumerable:!0,configurable:!0,get:()=>t.props[a]});if(Object.keys(o).length>0)for(const a in o)Object.defineProperty(l,a,{enumerable:!0,configurable:!0,get:()=>o[a]});Object.defineProperty(l,"$el",{enumerable:!0,configurable:!0,get:()=>t.vnode.el}),t.exposed=l;function r(a){e.value=a,a&&(Object.defineProperty(l,"$el",{enumerable:!0,configurable:!0,get:()=>a instanceof Element?a:a.$el}),t.exposed=l)}return{forwardRef:r,currentRef:e,currentElement:n}}function oe(){const t=$(),e=h(()=>{var n,o;return["#text","#comment"].includes((n=t.value)==null?void 0:n.$el.nodeName)?(o=t.value)==null?void 0:o.$el.nextElementSibling:M(t)});return{primitiveElement:t,currentElement:e}}function re(t){return h(()=>{var e;return U(t)?!!((e=M(t))!=null&&e.closest("form")):!0})}const F=m({inheritAttrs:!1,__name:"VisuallyHiddenInputBubble",props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:"fully-hidden"}},setup(t){const e=t,{primitiveElement:n,currentElement:o}=oe(),l=h(()=>e.checked??e.value);return H(l,(r,a)=>{if(!o.value)return;const u=o.value,p=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(p,"value").set;if(i&&r!==a){const s=new Event("input",{bubbles:!0}),b=new Event("change",{bubbles:!0});i.call(u,r),u.dispatchEvent(s),u.dispatchEvent(b)}}),(r,a)=>(c(),y(ne,V({ref_key:"primitiveElement",ref:n},{...e,...r.$attrs},{as:"input"}),null,16))}}),se=m({inheritAttrs:!1,__name:"VisuallyHiddenInput",props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:"fully-hidden"}},setup(t){const e=t,n=h(()=>typeof e.value=="object"&&Array.isArray(e.value)&&e.value.length===0&&e.required),o=h(()=>typeof e.value=="string"||typeof e.value=="number"||typeof e.value=="boolean"?[{name:e.name,value:e.value}]:typeof e.value=="object"&&Array.isArray(e.value)?e.value.flatMap((l,r)=>typeof l=="object"?Object.entries(l).map(([a,u])=>({name:`[${e.name}][${r}][${a}]`,value:u})):{name:`[${e.name}][${r}]`,value:l}):e.value!==null&&typeof e.value=="object"&&!Array.isArray(e.value)?Object.entries(e.value).map(([l,r])=>({name:`[${e.name}][${l}]`,value:r})):[]);return(l,r)=>n.value?(c(),y(F,V({key:l.name},{...e,...l.$attrs},{name:l.name,value:l.value}),null,16,["name","value"])):(c(!0),g(P,{key:1},K(o.value,a=>(c(),y(F,V({key:a.name,ref_for:!0},{...e,...l.$attrs},{name:a.name,value:a.value}),null,16,["name","value"]))),128))}}),[ue,ie]=le("SwitchRoot"),de=m({__name:"SwitchRoot",props:{defaultValue:{type:Boolean},modelValue:{type:[Boolean,null],default:void 0},disabled:{type:Boolean},id:{},value:{default:"on"},asChild:{type:Boolean},as:{default:"button"},name:{},required:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,{disabled:l}=X(n),r=G(n,"modelValue",o,{defaultValue:n.defaultValue,passive:n.modelValue===void 0});function a(){l.value||(r.value=!r.value)}const{forwardRef:u,currentElement:p}=T(),f=re(p),i=h(()=>{var s;return n.id&&p.value?(s=document.querySelector(`[for="${n.id}"]`))==null?void 0:s.innerText:void 0});return ie({modelValue:r,toggleCheck:a,disabled:l}),(s,b)=>(c(),y(d(q),V(s.$attrs,{id:s.id,ref:d(u),role:"switch",type:s.as==="button"?"button":void 0,value:s.value,"aria-label":s.$attrs["aria-label"]||i.value,"aria-checked":d(r),"aria-required":s.required,"data-state":d(r)?"checked":"unchecked","data-disabled":d(l)?"":void 0,"as-child":s.asChild,as:s.as,disabled:d(l),onClick:a,onKeydown:Y(J(a,["prevent"]),["enter"])}),{default:_(()=>[k(s.$slots,"default",{modelValue:d(r)}),d(f)&&s.name?(c(),y(d(se),{key:0,type:"checkbox",name:s.name,disabled:d(l),required:s.required,value:s.value,checked:!!d(r)},null,8,["name","disabled","required","value","checked"])):W("",!0)]),_:3},16,["id","type","value","aria-label","aria-checked","aria-required","data-state","data-disabled","as-child","as","disabled","onKeydown"]))}}),ce=m({__name:"SwitchThumb",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=ue();return T(),(n,o)=>{var l;return c(),y(d(q),{"data-state":(l=d(e).modelValue)!=null&&l.value?"checked":"unchecked","data-disabled":d(e).disabled.value?"":void 0,"as-child":n.asChild,as:n.as},{default:_(()=>[k(n.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"])}}}),me=m({__name:"Checkbox",props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(t){const e=C(t,"modelValue");return(n,o)=>(c(),y(d(de),{modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=l=>e.value=l),transition:"background duration-250 ease-in-out",outline:"focus-within:none",flex:"~",border:"neutral-300 dark:neutral-700 data-[state=checked]:primary-200 data-[state=unchecked]:neutral-300 focus-within:neutral-800",bg:"data-[state=checked]:primary-400 data-[state=unchecked]:neutral-300 data-[state=checked]:dark:primary-400/80 dark:data-[state=unchecked]:neutral-800",relative:"","h-7":"",w:"12.5","rounded-full":"",shadow:"sm focus-within:shadow-neutral-800 focus-within:[0_0_0_1px] "},{default:_(()=>[w(d(ce),{"my-auto":"","size-6":"",flex:"","items-center":"","justify-center":"","translate-x":"0.5 data-[state=checked]:full","rounded-full":"","bg-white":"","text-xs":"","shadow-xl":"",transition:"transform duration-250 ease-in-out","will-change-transform":""})]),_:1},8,["modelValue"]))}}),pe={flex:"~ col gap-4"},fe={flex:"~ row","items-center":"","gap-2":""},ve={flex:"1"},he={class:"flex items-center gap-1 text-sm font-medium"},ye={class:"text-xs text-neutral-500 dark:text-neutral-400"},Fe=m({__name:"FieldCheckbox",props:B({label:null,description:null},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=C(t,"modelValue");return(o,l)=>(c(),g("label",pe,[v("div",fe,[v("div",ve,[v("div",he,x(e.label),1),v("div",ye,x(e.description),1)]),w(me,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=r=>n.value=r)},null,8,["modelValue"])])]))}}),be=["min","max","step"],_e=m({__name:"Range",props:B({min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1},thumbColor:{default:"#9090906e"},trackColor:{default:"gray"},trackValueColor:{default:"red"}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=C(t,"modelValue"),o=h(()=>e.min*1e4),l=h(()=>e.max*1e4),r=h(()=>e.step*1e4),a=$(),u=h({get:()=>n.value*1e4,set:f=>{n.value=f/1e4,p()}});R(()=>{p()});function p(){a.value&&(a.value.style.setProperty("--value",a.value.value),a.value.style.setProperty("--min",a.value.min?a.value.min:e.min.toString()),a.value.style.setProperty("--max",a.value.max?a.value.max:e.max.toString()))}return(f,i)=>Q((c(),g("input",{ref_key:"sliderRef",ref:a,"onUpdate:modelValue":i[0]||(i[0]=s=>u.value=s),type:"range",min:o.value,max:l.value,step:r.value,class:"slider-progress form_input-range",onInput:i[1]||(i[1]=s=>{s.target.style.setProperty("--value",s.target.value)})},null,40,be)),[[Z,u.value,void 0,{number:!0}]])}}),ge=j(_e,[["__scopeId","data-v-6ca6d31c"]]),xe={flex:"~ col gap-4"},Ve={flex:"~ row","items-center":"","gap-2":""},$e={flex:"1"},we={class:"flex items-center gap-1 text-sm font-medium"},ke={class:"text-xs text-neutral-500 dark:text-neutral-400"},Ce={"font-mono":""},Ee={flex:"~ row","items-center":"","gap-2":""},Pe=m({__name:"FieldRange",props:B({min:null,max:null,step:null,label:null,description:null,formatValue:{type:Function}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=C(t,"modelValue");return(o,l)=>{var r;return c(),g("label",xe,[v("div",Ve,[v("div",$e,[v("div",we,x(t.label),1),v("div",ke,x(t.description),1)]),v("span",Ce,x(((r=e.formatValue)==null?void 0:r.call(e,n.value))||n.value),1)]),v("div",Ee,[w(ge,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=a=>n.value=a),min:t.min||0,max:t.max||1,step:t.step||.01,"w-full":""},null,8,["modelValue","min","max","step"])])])}}}),Se=m({__name:"Volumed",props:{perspective:null,transform:null},setup(t){return(e,n)=>(c(),g("div",{class:"volumed",style:A({perspective:`${t.perspective}px`,transform:t.transform})},[k(e.$slots,"default",{},void 0,!0)],4))}}),Me=j(Se,[["__scopeId","data-v-568551bc"]]),Be=m({__name:"CursorMomentum",props:{baseSpeed:{default:.1},friction:{default:.95},momentumFactor:{default:.005}},setup(t,{expose:e}){const n=t,o=$(1),l=$(0);let r=0;const a=S(()=>n.friction),u=S(()=>n.baseSpeed),p=S(()=>n.momentumFactor);function f(s){r||(r=s);const b=s-r;r=s,o.value=u.value+(o.value-u.value)*a.value,l.value+=o.value*b,requestAnimationFrame(f)}function i(s){const b=Math.sqrt(s.movementX**2+s.movementY**2);o.value+=b*p.value}return R(()=>{window.addEventListener("mousemove",i),requestAnimationFrame(f)}),ee(()=>{window.removeEventListener("mousemove",i)}),e({momentum:o,currentValue:l}),(s,b)=>k(s.$slots,"default",{momentum:o.value,currentValue:l.value})}}),je=m({__name:"TestDummyMarkerFlat",props:{size:null},setup(t){return(e,n)=>(c(),g("div",{class:"test-dummy-flat",style:A({width:`${t.size}px`,height:`${t.size}px`})},n[0]||(n[0]=[v("div",{class:"marker"},null,-1)]),4))}}),Ae=j(je,[["__scopeId","data-v-b4ef37ac"]]),Re=m({__name:"TestDummyMarker",setup(t){return(e,n)=>(c(),y(Be,{"base-speed":.1,friction:.95,"momentum-factor":5e-4},{default:_(({currentValue:o})=>[w(Me,{perspective:800,transform:"rotateX(45deg) translateY(3px)"},{default:_(()=>[w(Ae,{size:24,style:A({transform:`rotate(${o}deg)`})},null,8,["style"])]),_:2},1024)]),_:1}))}});export{Pe as _,Fe as a,Re as b}; +import{bx as P,d as m,c2 as I,bV as V,c3 as D,b$ as E,x as y,o as c,y as _,m as k,e as d,b_ as N,cc as L,g as $,h,cd as M,bX as z,ce as U,w as H,c as g,by as K,E as X,cf as G,C as W,cg as Y,bJ as J,bL as C,b as w,bK as B,a as v,D as x,l as R,A as Q,bE as Z,bn as j,n as A,br as S,H as ee}from"./index-hDb1Lsb8.js";function O(t){return t?t.flatMap(e=>e.type===P?O(e.children):[e]):[]}const te=m({name:"PrimitiveSlot",inheritAttrs:!1,setup(t,{attrs:e,slots:n}){return()=>{var p,f;if(!n.default)return null;const o=O(n.default()),l=o.findIndex(i=>i.type!==I);if(l===-1)return o;const r=o[l];(p=r.props)==null||delete p.ref;const a=r.props?V(e,r.props):e;e.class&&((f=r.props)!=null&&f.class)&&delete r.props.class;const u=D(r,a);for(const i in a)i.startsWith("on")&&(u.props||(u.props={}),u.props[i]=a[i]);return o.length===1?u:(o[l]=u,o)}}}),ae=["area","img","input"],q=m({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(t,{attrs:e,slots:n}){const o=t.asChild?"template":t.as;return typeof o=="string"&&ae.includes(o)?()=>E(o,e):o!=="template"?()=>E(t.as,e,{default:n.default}):()=>E(te,e,{default:n.default})}}),ne=m({__name:"VisuallyHidden",props:{feature:{default:"focusable"},asChild:{type:Boolean},as:{default:"span"}},setup(t){return(e,n)=>(c(),y(d(q),{as:e.as,"as-child":e.asChild,"aria-hidden":e.feature==="focusable"?"true":void 0,"data-hidden":e.feature==="fully-hidden"?"":void 0,tabindex:e.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal"}},{default:_(()=>[k(e.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}});function le(t,e){const n=`${t}Context`,o=Symbol(n);return[a=>{const u=N(o,a);if(u||u===null)return u;throw new Error(`Injection \`${o.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`)},a=>(L(o,a),a)]}function T(){const t=z(),e=$(),n=h(()=>{var a,u;return["#text","#comment"].includes((a=e.value)==null?void 0:a.$el.nodeName)?(u=e.value)==null?void 0:u.$el.nextElementSibling:M(e)}),o=Object.assign({},t.exposed),l={};for(const a in t.props)Object.defineProperty(l,a,{enumerable:!0,configurable:!0,get:()=>t.props[a]});if(Object.keys(o).length>0)for(const a in o)Object.defineProperty(l,a,{enumerable:!0,configurable:!0,get:()=>o[a]});Object.defineProperty(l,"$el",{enumerable:!0,configurable:!0,get:()=>t.vnode.el}),t.exposed=l;function r(a){e.value=a,a&&(Object.defineProperty(l,"$el",{enumerable:!0,configurable:!0,get:()=>a instanceof Element?a:a.$el}),t.exposed=l)}return{forwardRef:r,currentRef:e,currentElement:n}}function oe(){const t=$(),e=h(()=>{var n,o;return["#text","#comment"].includes((n=t.value)==null?void 0:n.$el.nodeName)?(o=t.value)==null?void 0:o.$el.nextElementSibling:M(t)});return{primitiveElement:t,currentElement:e}}function re(t){return h(()=>{var e;return U(t)?!!((e=M(t))!=null&&e.closest("form")):!0})}const F=m({inheritAttrs:!1,__name:"VisuallyHiddenInputBubble",props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:"fully-hidden"}},setup(t){const e=t,{primitiveElement:n,currentElement:o}=oe(),l=h(()=>e.checked??e.value);return H(l,(r,a)=>{if(!o.value)return;const u=o.value,p=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(p,"value").set;if(i&&r!==a){const s=new Event("input",{bubbles:!0}),b=new Event("change",{bubbles:!0});i.call(u,r),u.dispatchEvent(s),u.dispatchEvent(b)}}),(r,a)=>(c(),y(ne,V({ref_key:"primitiveElement",ref:n},{...e,...r.$attrs},{as:"input"}),null,16))}}),se=m({inheritAttrs:!1,__name:"VisuallyHiddenInput",props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:"fully-hidden"}},setup(t){const e=t,n=h(()=>typeof e.value=="object"&&Array.isArray(e.value)&&e.value.length===0&&e.required),o=h(()=>typeof e.value=="string"||typeof e.value=="number"||typeof e.value=="boolean"?[{name:e.name,value:e.value}]:typeof e.value=="object"&&Array.isArray(e.value)?e.value.flatMap((l,r)=>typeof l=="object"?Object.entries(l).map(([a,u])=>({name:`[${e.name}][${r}][${a}]`,value:u})):{name:`[${e.name}][${r}]`,value:l}):e.value!==null&&typeof e.value=="object"&&!Array.isArray(e.value)?Object.entries(e.value).map(([l,r])=>({name:`[${e.name}][${l}]`,value:r})):[]);return(l,r)=>n.value?(c(),y(F,V({key:l.name},{...e,...l.$attrs},{name:l.name,value:l.value}),null,16,["name","value"])):(c(!0),g(P,{key:1},K(o.value,a=>(c(),y(F,V({key:a.name,ref_for:!0},{...e,...l.$attrs},{name:a.name,value:a.value}),null,16,["name","value"]))),128))}}),[ue,ie]=le("SwitchRoot"),de=m({__name:"SwitchRoot",props:{defaultValue:{type:Boolean},modelValue:{type:[Boolean,null],default:void 0},disabled:{type:Boolean},id:{},value:{default:"on"},asChild:{type:Boolean},as:{default:"button"},name:{},required:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,{disabled:l}=X(n),r=G(n,"modelValue",o,{defaultValue:n.defaultValue,passive:n.modelValue===void 0});function a(){l.value||(r.value=!r.value)}const{forwardRef:u,currentElement:p}=T(),f=re(p),i=h(()=>{var s;return n.id&&p.value?(s=document.querySelector(`[for="${n.id}"]`))==null?void 0:s.innerText:void 0});return ie({modelValue:r,toggleCheck:a,disabled:l}),(s,b)=>(c(),y(d(q),V(s.$attrs,{id:s.id,ref:d(u),role:"switch",type:s.as==="button"?"button":void 0,value:s.value,"aria-label":s.$attrs["aria-label"]||i.value,"aria-checked":d(r),"aria-required":s.required,"data-state":d(r)?"checked":"unchecked","data-disabled":d(l)?"":void 0,"as-child":s.asChild,as:s.as,disabled:d(l),onClick:a,onKeydown:Y(J(a,["prevent"]),["enter"])}),{default:_(()=>[k(s.$slots,"default",{modelValue:d(r)}),d(f)&&s.name?(c(),y(d(se),{key:0,type:"checkbox",name:s.name,disabled:d(l),required:s.required,value:s.value,checked:!!d(r)},null,8,["name","disabled","required","value","checked"])):W("",!0)]),_:3},16,["id","type","value","aria-label","aria-checked","aria-required","data-state","data-disabled","as-child","as","disabled","onKeydown"]))}}),ce=m({__name:"SwitchThumb",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=ue();return T(),(n,o)=>{var l;return c(),y(d(q),{"data-state":(l=d(e).modelValue)!=null&&l.value?"checked":"unchecked","data-disabled":d(e).disabled.value?"":void 0,"as-child":n.asChild,as:n.as},{default:_(()=>[k(n.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"])}}}),me=m({__name:"Checkbox",props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(t){const e=C(t,"modelValue");return(n,o)=>(c(),y(d(de),{modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=l=>e.value=l),transition:"background duration-250 ease-in-out",outline:"focus-within:none",flex:"~",border:"neutral-300 dark:neutral-700 data-[state=checked]:primary-200 data-[state=unchecked]:neutral-300 focus-within:neutral-800",bg:"data-[state=checked]:primary-400 data-[state=unchecked]:neutral-300 data-[state=checked]:dark:primary-400/80 dark:data-[state=unchecked]:neutral-800",relative:"","h-7":"",w:"12.5","rounded-full":"",shadow:"sm focus-within:shadow-neutral-800 focus-within:[0_0_0_1px] "},{default:_(()=>[w(d(ce),{"my-auto":"","size-6":"",flex:"","items-center":"","justify-center":"","translate-x":"0.5 data-[state=checked]:full","rounded-full":"","bg-white":"","text-xs":"","shadow-xl":"",transition:"transform duration-250 ease-in-out","will-change-transform":""})]),_:1},8,["modelValue"]))}}),pe={flex:"~ col gap-4"},fe={flex:"~ row","items-center":"","gap-2":""},ve={flex:"1"},he={class:"flex items-center gap-1 text-sm font-medium"},ye={class:"text-xs text-neutral-500 dark:text-neutral-400"},Fe=m({__name:"FieldCheckbox",props:B({label:null,description:null},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=C(t,"modelValue");return(o,l)=>(c(),g("label",pe,[v("div",fe,[v("div",ve,[v("div",he,x(e.label),1),v("div",ye,x(e.description),1)]),w(me,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=r=>n.value=r)},null,8,["modelValue"])])]))}}),be=["min","max","step"],_e=m({__name:"Range",props:B({min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1},thumbColor:{default:"#9090906e"},trackColor:{default:"gray"},trackValueColor:{default:"red"}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=C(t,"modelValue"),o=h(()=>e.min*1e4),l=h(()=>e.max*1e4),r=h(()=>e.step*1e4),a=$(),u=h({get:()=>n.value*1e4,set:f=>{n.value=f/1e4,p()}});R(()=>{p()});function p(){a.value&&(a.value.style.setProperty("--value",a.value.value),a.value.style.setProperty("--min",a.value.min?a.value.min:e.min.toString()),a.value.style.setProperty("--max",a.value.max?a.value.max:e.max.toString()))}return(f,i)=>Q((c(),g("input",{ref_key:"sliderRef",ref:a,"onUpdate:modelValue":i[0]||(i[0]=s=>u.value=s),type:"range",min:o.value,max:l.value,step:r.value,class:"slider-progress form_input-range",onInput:i[1]||(i[1]=s=>{s.target.style.setProperty("--value",s.target.value)})},null,40,be)),[[Z,u.value,void 0,{number:!0}]])}}),ge=j(_e,[["__scopeId","data-v-6ca6d31c"]]),xe={flex:"~ col gap-4"},Ve={flex:"~ row","items-center":"","gap-2":""},$e={flex:"1"},we={class:"flex items-center gap-1 text-sm font-medium"},ke={class:"text-xs text-neutral-500 dark:text-neutral-400"},Ce={"font-mono":""},Ee={flex:"~ row","items-center":"","gap-2":""},Pe=m({__name:"FieldRange",props:B({min:null,max:null,step:null,label:null,description:null,formatValue:{type:Function}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=C(t,"modelValue");return(o,l)=>{var r;return c(),g("label",xe,[v("div",Ve,[v("div",$e,[v("div",we,x(t.label),1),v("div",ke,x(t.description),1)]),v("span",Ce,x(((r=e.formatValue)==null?void 0:r.call(e,n.value))||n.value),1)]),v("div",Ee,[w(ge,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=a=>n.value=a),min:t.min||0,max:t.max||1,step:t.step||.01,"w-full":""},null,8,["modelValue","min","max","step"])])])}}}),Se=m({__name:"Volumed",props:{perspective:null,transform:null},setup(t){return(e,n)=>(c(),g("div",{class:"volumed",style:A({perspective:`${t.perspective}px`,transform:t.transform})},[k(e.$slots,"default",{},void 0,!0)],4))}}),Me=j(Se,[["__scopeId","data-v-568551bc"]]),Be=m({__name:"CursorMomentum",props:{baseSpeed:{default:.1},friction:{default:.95},momentumFactor:{default:.005}},setup(t,{expose:e}){const n=t,o=$(1),l=$(0);let r=0;const a=S(()=>n.friction),u=S(()=>n.baseSpeed),p=S(()=>n.momentumFactor);function f(s){r||(r=s);const b=s-r;r=s,o.value=u.value+(o.value-u.value)*a.value,l.value+=o.value*b,requestAnimationFrame(f)}function i(s){const b=Math.sqrt(s.movementX**2+s.movementY**2);o.value+=b*p.value}return R(()=>{window.addEventListener("mousemove",i),requestAnimationFrame(f)}),ee(()=>{window.removeEventListener("mousemove",i)}),e({momentum:o,currentValue:l}),(s,b)=>k(s.$slots,"default",{momentum:o.value,currentValue:l.value})}}),je=m({__name:"TestDummyMarkerFlat",props:{size:null},setup(t){return(e,n)=>(c(),g("div",{class:"test-dummy-flat",style:A({width:`${t.size}px`,height:`${t.size}px`})},n[0]||(n[0]=[v("div",{class:"marker"},null,-1)]),4))}}),Ae=j(je,[["__scopeId","data-v-b4ef37ac"]]),Re=m({__name:"TestDummyMarker",setup(t){return(e,n)=>(c(),y(Be,{"base-speed":.1,friction:.95,"momentum-factor":5e-4},{default:_(({currentValue:o})=>[w(Me,{perspective:800,transform:"rotateX(45deg) translateY(3px)"},{default:_(()=>[w(Ae,{size:24,style:A({transform:`rotate(${o}deg)`})},null,8,["style"])]),_:2},1024)]),_:1}))}});export{Pe as _,Fe as a,Re as b}; diff --git a/assets/TransitionVertical.vue_vue_type_script_setup_true_lang-BNzPx9yx.js b/assets/TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js similarity index 93% rename from assets/TransitionVertical.vue_vue_type_script_setup_true_lang-BNzPx9yx.js rename to assets/TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js index 0a17f3962ae3ead0b30fe885c3d152596d483bcc..46529ab6349ff0c579b4d7b7b4429cf912348139 100644 --- a/assets/TransitionVertical.vue_vue_type_script_setup_true_lang-BNzPx9yx.js +++ b/assets/TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js @@ -1 +1 @@ -import{d as m,x as T,o as l,bB as B,y as b,m as v}from"./index-7-fr_lhT.js";const n="0px",W=m({__name:"TransitionVertical",props:{duration:{default:250},easingEnter:{default:"ease-in-out"},easingLeave:{default:"ease-in-out"},opacityClosed:{default:0},opacityOpened:{default:1}},setup(c){const r=c;function p(o){return{height:o.style.height,width:o.style.width,position:o.style.position,visibility:o.style.visibility,overflow:o.style.overflow,paddingTop:o.style.paddingTop,paddingBottom:o.style.paddingBottom,borderTopWidth:o.style.borderTopWidth,borderBottomWidth:o.style.borderBottomWidth,marginTop:o.style.marginTop,marginBottom:o.style.marginBottom}}function y(o,t){const{width:i}=getComputedStyle(o);o.style.width=i,o.style.position="absolute",o.style.visibility="hidden",o.style.height="";const{height:s}=getComputedStyle(o);return o.style.width=t.width,o.style.position=t.position,o.style.visibility=t.visibility,o.style.height=n,o.style.overflow="hidden",t.height&&t.height!==n?t.height:s}function h(o,t,i,s,d){const e=o.animate(s,d);o.style.height=t.height,e.onfinish=()=>{o.style.overflow=t.overflow,i()}}function g(o,t){return[{height:n,opacity:r.opacityClosed,paddingTop:n,paddingBottom:n,borderTopWidth:n,borderBottomWidth:n,marginTop:n,marginBottom:n},{height:o,opacity:r.opacityOpened,paddingTop:t.paddingTop,paddingBottom:t.paddingBottom,borderTopWidth:t.borderTopWidth,borderBottomWidth:t.borderBottomWidth,marginTop:t.marginTop,marginBottom:t.marginBottom}]}function u(o,t){const i=o,s=p(i),d=y(i,s),e=g(d,s),a={duration:r.duration,easing:r.easingEnter};h(i,s,t,e,a)}function f(o,t){const i=o,s=p(i),{height:d}=getComputedStyle(i);i.style.height=d,i.style.overflow="hidden";const e=g(d,s).reverse(),a={duration:r.duration,easing:r.easingLeave};h(i,s,t,e,a)}return(o,t)=>(l(),T(B,{css:!1,onEnter:u,onLeave:f},{default:b(()=>[v(o.$slots,"default")]),_:3}))}});export{W as _}; +import{d as m,x as T,o as l,bB as B,y as b,m as v}from"./index-hDb1Lsb8.js";const n="0px",W=m({__name:"TransitionVertical",props:{duration:{default:250},easingEnter:{default:"ease-in-out"},easingLeave:{default:"ease-in-out"},opacityClosed:{default:0},opacityOpened:{default:1}},setup(c){const r=c;function p(o){return{height:o.style.height,width:o.style.width,position:o.style.position,visibility:o.style.visibility,overflow:o.style.overflow,paddingTop:o.style.paddingTop,paddingBottom:o.style.paddingBottom,borderTopWidth:o.style.borderTopWidth,borderBottomWidth:o.style.borderBottomWidth,marginTop:o.style.marginTop,marginBottom:o.style.marginBottom}}function y(o,t){const{width:i}=getComputedStyle(o);o.style.width=i,o.style.position="absolute",o.style.visibility="hidden",o.style.height="";const{height:s}=getComputedStyle(o);return o.style.width=t.width,o.style.position=t.position,o.style.visibility=t.visibility,o.style.height=n,o.style.overflow="hidden",t.height&&t.height!==n?t.height:s}function h(o,t,i,s,d){const e=o.animate(s,d);o.style.height=t.height,e.onfinish=()=>{o.style.overflow=t.overflow,i()}}function g(o,t){return[{height:n,opacity:r.opacityClosed,paddingTop:n,paddingBottom:n,borderTopWidth:n,borderBottomWidth:n,marginTop:n,marginBottom:n},{height:o,opacity:r.opacityOpened,paddingTop:t.paddingTop,paddingBottom:t.paddingBottom,borderTopWidth:t.borderTopWidth,borderBottomWidth:t.borderBottomWidth,marginTop:t.marginTop,marginBottom:t.marginBottom}]}function u(o,t){const i=o,s=p(i),d=y(i,s),e=g(d,s),a={duration:r.duration,easing:r.easingEnter};h(i,s,t,e,a)}function f(o,t){const i=o,s=p(i),{height:d}=getComputedStyle(i);i.style.height=d,i.style.overflow="hidden";const e=g(d,s).reverse(),a={duration:r.duration,easing:r.easingLeave};h(i,s,t,e,a)}return(o,t)=>(l(),T(B,{css:!1,onEnter:u,onLeave:f},{default:b(()=>[v(o.$slots,"default")]),_:3}))}});export{W as _}; diff --git a/assets/_...all_-CIkXnkHu.js b/assets/_...all_-CxEbMPjh.js similarity index 64% rename from assets/_...all_-CIkXnkHu.js rename to assets/_...all_-CxEbMPjh.js index b3204f80cb1ef1661cebccd15927ebc1345e42ab..1f02be1320aff9c97cbc2e2559d7a55215e47842 100644 --- a/assets/_...all_-CIkXnkHu.js +++ b/assets/_...all_-CxEbMPjh.js @@ -1 +1 @@ -import{bn as e,c as n,o as c}from"./index-7-fr_lhT.js";const o={};function _(t,r){return c(),n("div",null," 404 - Page not found ")}const s=e(o,[["render",_]]);export{s as default}; +import{bn as e,c as n,o as c}from"./index-hDb1Lsb8.js";const o={};function _(t,r){return c(),n("div",null," 404 - Page not found ")}const s=e(o,[["render",_]]);export{s as default}; diff --git a/assets/airi-card-DAWA4eQ5.js b/assets/airi-card-CbqBsbSf.js similarity index 94% rename from assets/airi-card-DAWA4eQ5.js rename to assets/airi-card-CbqBsbSf.js index e32cc40f94b87a5173eefe740552dd436cacc5f0..8df492beeecb83043a43853312ff08957e36364b 100644 --- a/assets/airi-card-DAWA4eQ5.js +++ b/assets/airi-card-CbqBsbSf.js @@ -1,4 +1,4 @@ -import{f as W,bD as L,h as g,s as O,l as $,q as b,w as q}from"./index-7-fr_lhT.js";import{j as G}from"./live2d-zip-loader-dDw0Wbbr.js";import{u as H}from"./consciousness-C4xyvmr3.js";import{u as N}from"./speech-DK9my_xu.js";function k(a,u){return{role:"system",content:[a,G.map(n=>`- ${n}`).join(` +import{f as W,bD as L,h as g,s as O,l as $,q as b,w as q}from"./index-hDb1Lsb8.js";import{j as G}from"./live2d-zip-loader--bTGFeQd.js";import{u as H}from"./consciousness-BRdkM-c-.js";import{u as N}from"./speech-D3H5B80W.js";function k(a,u){return{role:"system",content:[a,G.map(n=>`- ${n}`).join(` `),u].join(` `)}}const Q=W("airi-card",()=>{const a=L("airi-cards",new Map),u=L("airi-card-active-id","default"),n=g(()=>a.value.get(u.value)),P=H(),R=N(),{activeModel:l}=O(P),{activeSpeechVoiceId:m,activeSpeechModel:p}=O(R),B=s=>{const e=crypto.randomUUID();return a.value.set(e,h(s)),e},D=s=>{a.value.delete(s)},V=s=>a.value.get(s);function v(s){var t,r,i,c,d,f,_,y,S,x,C,M,I,w,E,A,j,T,U;const e="data"in s?(r=(t=s.data)==null?void 0:t.extensions)==null?void 0:r.airi:(i=s.extensions)==null?void 0:i.airi,o={consciousness:{model:l.value},speech:{model:p.value,voice_id:m.value}};return e?{modules:{consciousness:{model:((d=(c=e.modules)==null?void 0:c.consciousness)==null?void 0:d.model)??o.consciousness.model},speech:{model:((_=(f=e.modules)==null?void 0:f.speech)==null?void 0:_.model)??o.speech.model,voice_id:((S=(y=e.modules)==null?void 0:y.speech)==null?void 0:S.voice_id)??o.speech.voice_id,pitch:(C=(x=e.modules)==null?void 0:x.speech)==null?void 0:C.pitch,rate:(I=(M=e.modules)==null?void 0:M.speech)==null?void 0:I.rate,ssml:(E=(w=e.modules)==null?void 0:w.speech)==null?void 0:E.ssml,language:(j=(A=e.modules)==null?void 0:A.speech)==null?void 0:j.language},vrm:(T=e.modules)==null?void 0:T.vrm,live2d:(U=e.modules)==null?void 0:U.live2d},agents:e.agents??{}}:{modules:o,agents:{}}}function h(s){if("data"in s){const e=s;return{name:e.data.name,version:e.data.character_version??"1.0.0",description:e.data.description??"",creator:e.data.creator??"",notes:e.data.creator_notes??"",notesMultilingual:e.data.creator_notes_multilingual,personality:e.data.personality??"",scenario:e.data.scenario??"",greetings:[e.data.first_mes,...e.data.alternate_greetings??[]],greetingsGroupOnly:e.data.group_only_greetings??[],systemPrompt:e.data.system_prompt??"",postHistoryInstructions:e.data.post_history_instructions??"",messageExample:e.data.mes_example?e.data.mes_example.split(` diff --git a/assets/anthropic-DZM8jqDl.js b/assets/anthropic-D4yWnjWW.js similarity index 79% rename from assets/anthropic-DZM8jqDl.js rename to assets/anthropic-D4yWnjWW.js index 6b12d9b1c06ee41653203b5ab4d454692a1e1374..8d04deedf27c27ea79d28a138f6aabf618ad0969 100644 --- a/assets/anthropic-DZM8jqDl.js +++ b/assets/anthropic-D4yWnjWW.js @@ -1 +1 @@ -import"./live2d-zip-loader-dDw0Wbbr.js";import{d as k,q as x,bG as S,s as U,h as v,l as w,w as V,x as C,o as K,y as u,a as i,b as l,bI as p,e as t}from"./index-7-fr_lhT.js";import{u as R}from"./providers-B7zWTIWF.js";import{_ as I,a as O}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CUVIcbSL.js";import{_ as $}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C3sxqbyi.js";import{_ as A,a as N}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BCwQg86s.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BxRDV7Dm.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-D5rspuJc.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BNzPx9yx.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BhtqkEkU.js";import"./Input.vue_vue_type_script_setup_true_lang-58p3G1RX.js";const e="anthropic",L=k({__name:"anthropic",setup(T){const{t:c}=x(),_=S(),h=R(),{providers:a}=U(h),m=v(()=>h.getProviderMetadata(e)),s=v({get:()=>{var o;return((o=a.value[e])==null?void 0:o.apiKey)||""},set:o=>{a.value[e]||(a.value[e]={}),a.value[e].apiKey=o}}),n=v({get:()=>{var o;return((o=a.value[e])==null?void 0:o.baseUrl)||"https://api.anthropic.com/v1/"},set:o=>{a.value[e]||(a.value[e]={}),a.value[e].baseUrl=o}});w(()=>{var o,r;a.value[e]||(a.value[e]={baseUrl:"https://api.anthropic.com/v1/"}),s.value=((o=a.value[e])==null?void 0:o.apiKey)||"",n.value=((r=a.value[e])==null?void 0:r.baseUrl)||"https://api.anthropic.com/v1/"}),V([s,n],()=>{a.value[e]={...a.value[e],apiKey:s.value,baseUrl:n.value||"https://api.anthropic.com/v1/"}});function g(){a.value[e]={baseUrl:"https://api.anthropic.com/v1/"}}return(o,r)=>{var f,b;return K(),C(t(B),{"provider-name":((f=m.value)==null?void 0:f.localizedName)||"Anthropic | Claude","provider-icon":(b=m.value)==null?void 0:b.icon,"on-back":()=>t(_).back()},{default:u(()=>[r[2]||(r[2]=i("div",{bg:"orange-50 dark:orange-900/20","rounded-xl":"","p-4":"",flex:"~ col gap-3"},[i("h2",{"text-xl":"","font-bold":"",text:"orange-700 dark:orange-500"}," Before you start "),i("p",null,[p(" While Anthropic recently did announce that they are having a beta support for OpenAI SDK compatibility "),i("a",{underline:"",href:"https://docs.anthropic.com/en/api/openai-sdk"},"(you can read more here)"),p(", but due to the implementation details comes with "),i("a",{underline:"",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS"},"CORS"),p(" restrictions which not aligned with the OpenAI SDK, it's currently not possible to use this provider in the browser. ")]),i("p",null,[p(" If you do need to use this provider, you will need a dedicated proxy backend like a Serverless Function running on "),i("a",{underline:"",href:"https://workers.cloudflare.com/"},"Cloudflare Workers"),p(" or some CORS bypassing services to bypass the CORS restrictions. ")])],-1)),l(t(A),null,{default:u(()=>[l(t(N),{title:t(c)("settings.pages.providers.common.section.basic.title"),description:t(c)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:u(()=>{var d;return[l(t($),{modelValue:s.value,"onUpdate:modelValue":r[0]||(r[0]=y=>s.value=y),"provider-name":((d=m.value)==null?void 0:d.localizedName)||"Anthropic",placeholder:"sk-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(I),{title:t(c)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t(O),{modelValue:n.value,"onUpdate:modelValue":r[1]||(r[1]=d=>n.value=d),placeholder:"https://api.anthropic.com/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});export{L as default}; +import"./live2d-zip-loader--bTGFeQd.js";import{d as k,q as x,bG as S,s as U,h as v,l as w,w as V,x as C,o as K,y as u,a as i,b as l,bI as p,e as t}from"./index-hDb1Lsb8.js";import{u as R}from"./providers-adQ6cb75.js";import{_ as I,a as O}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-UCuivhvU.js";import{_ as $}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-CHpN3yiY.js";import{_ as A,a as N}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CYv3qJbi.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTOfxlwP.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js";import"./Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js";const e="anthropic",L=k({__name:"anthropic",setup(T){const{t:c}=x(),_=S(),h=R(),{providers:a}=U(h),m=v(()=>h.getProviderMetadata(e)),s=v({get:()=>{var o;return((o=a.value[e])==null?void 0:o.apiKey)||""},set:o=>{a.value[e]||(a.value[e]={}),a.value[e].apiKey=o}}),n=v({get:()=>{var o;return((o=a.value[e])==null?void 0:o.baseUrl)||"https://api.anthropic.com/v1/"},set:o=>{a.value[e]||(a.value[e]={}),a.value[e].baseUrl=o}});w(()=>{var o,r;a.value[e]||(a.value[e]={baseUrl:"https://api.anthropic.com/v1/"}),s.value=((o=a.value[e])==null?void 0:o.apiKey)||"",n.value=((r=a.value[e])==null?void 0:r.baseUrl)||"https://api.anthropic.com/v1/"}),V([s,n],()=>{a.value[e]={...a.value[e],apiKey:s.value,baseUrl:n.value||"https://api.anthropic.com/v1/"}});function g(){a.value[e]={baseUrl:"https://api.anthropic.com/v1/"}}return(o,r)=>{var f,b;return K(),C(t(B),{"provider-name":((f=m.value)==null?void 0:f.localizedName)||"Anthropic | Claude","provider-icon":(b=m.value)==null?void 0:b.icon,"on-back":()=>t(_).back()},{default:u(()=>[r[2]||(r[2]=i("div",{bg:"orange-50 dark:orange-900/20","rounded-xl":"","p-4":"",flex:"~ col gap-3"},[i("h2",{"text-xl":"","font-bold":"",text:"orange-700 dark:orange-500"}," Before you start "),i("p",null,[p(" While Anthropic recently did announce that they are having a beta support for OpenAI SDK compatibility "),i("a",{underline:"",href:"https://docs.anthropic.com/en/api/openai-sdk"},"(you can read more here)"),p(", but due to the implementation details comes with "),i("a",{underline:"",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS"},"CORS"),p(" restrictions which not aligned with the OpenAI SDK, it's currently not possible to use this provider in the browser. ")]),i("p",null,[p(" If you do need to use this provider, you will need a dedicated proxy backend like a Serverless Function running on "),i("a",{underline:"",href:"https://workers.cloudflare.com/"},"Cloudflare Workers"),p(" or some CORS bypassing services to bypass the CORS restrictions. ")])],-1)),l(t(A),null,{default:u(()=>[l(t(N),{title:t(c)("settings.pages.providers.common.section.basic.title"),description:t(c)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:u(()=>{var d;return[l(t($),{modelValue:s.value,"onUpdate:modelValue":r[0]||(r[0]=y=>s.value=y),"provider-name":((d=m.value)==null?void 0:d.localizedName)||"Anthropic",placeholder:"sk-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(I),{title:t(c)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t(O),{modelValue:n.value,"onUpdate:modelValue":r[1]||(r[1]=d=>n.value=d),placeholder:"https://api.anthropic.com/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});export{L as default}; diff --git a/assets/audio-Dg7C6ruQ.js b/assets/audio-g9DiyU3J.js similarity index 88% rename from assets/audio-Dg7C6ruQ.js rename to assets/audio-g9DiyU3J.js index 8c8f71e9a645755e531cab80ed6286a0c3b28ff3..097266643c2c329a9a786cb31d657395f8775ab2 100644 --- a/assets/audio-Dg7C6ruQ.js +++ b/assets/audio-g9DiyU3J.js @@ -1 +1 @@ -import{d as s,g as f,c as d,o as p,a as t}from"./index-7-fr_lhT.js";const R=s({__name:"audio",setup(_){const a=f(),l=f();function u(o){var r,c,i;if(!o)return;const n=(c=(r=l.value)==null?void 0:r.files)==null?void 0:c[0];if(!n)return;const e=document.createElement("audio");(i=a.value)==null||i.appendChild(e),e.src=URL.createObjectURL(n),e.controls=!0,e.load(),e.play()}return(o,n)=>(p(),d("div",null,[t("div",null,[t("div",{ref_key:"containerRef",ref:a},null,512),t("input",{ref_key:"fileInputRef",ref:l,type:"file",onChange:u},null,544)])]))}});export{R as default}; +import{d as s,g as f,c as d,o as p,a as t}from"./index-hDb1Lsb8.js";const R=s({__name:"audio",setup(_){const a=f(),l=f();function u(o){var r,c,i;if(!o)return;const n=(c=(r=l.value)==null?void 0:r.files)==null?void 0:c[0];if(!n)return;const e=document.createElement("audio");(i=a.value)==null||i.appendChild(e),e.src=URL.createObjectURL(n),e.controls=!0,e.load(),e.play()}return(o,n)=>(p(),d("div",null,[t("div",null,[t("div",{ref_key:"containerRef",ref:a},null,512),t("input",{ref_key:"fileInputRef",ref:l,type:"file",onChange:u},null,544)])]))}});export{R as default}; diff --git a/assets/chat-Dn5NUeJ8.js b/assets/chat-BFU2g19v.js similarity index 99% rename from assets/chat-Dn5NUeJ8.js rename to assets/chat-BFU2g19v.js index d5936fbb85ff3791fc5e98d9bcdae19707926d13..566e71cc99b863b5832ac492f8f48acd27043447 100644 --- a/assets/chat-Dn5NUeJ8.js +++ b/assets/chat-BFU2g19v.js @@ -1 +1 @@ -import{d as N,bD as W,g as S,c as h,o as y,a as i,A as C,bE as E,e as M,ad as A,bx as P,by as q,t as z,C as U,D as $}from"./index-7-fr_lhT.js";import{s as K}from"./index-D975M2PQ.js";import"./index-Be1NqeGb.js";var O=()=>{let e=null;return{getStore:()=>(e===null&&console.warn("Woops! Looks like you are calling `getContext` after `await fn()`. Please move `getContext` to top level of handler."),e),run(r,o){e=r;try{return o()}finally{e=null}}}},H=new WeakMap,I=new WeakMap,T=0,F=0,_=e=>{const r=`${T++}`,o={include:t=>n.has(t),with:t=>{const d=`${F++}`,l={[Symbol.toStringTag]:`WorkflowEvent(${r}.${d})`,toString:()=>`WorkflowEvent(${r}.${d})`,toJSON:()=>({event:r,data:t}),get data(){return t}};return n.add(l),Object.freeze(l),I.set(l,o),l}},n=new WeakSet;return H.set(o,n),Object.defineProperty(o,Symbol.toStringTag,{get:()=>`WorkflowEvent<${r}>`}),Object.defineProperty(o,"displayName",{value:`WorkflowEvent<${r}>`}),o.toString=()=>`WorkflowEvent<${r}>`,Object.freeze(o),o},j=e=>e!=null&&typeof e=="object"&&"data"in e,J=e=>e!=null&&typeof e.then=="function";function R(e,r){const o=new Array(e.length);for(const n of r)for(let t=0;t{const r=[],o=(a,f,p)=>{let c;const g={get abortController(){return c||(c=new AbortController),c},handler:a,inputs:f,outputs:[],prev:p,next:new Set};g.prev.next.add(g);const v=d(g);G.run(g,()=>{const s=[...new Set([...x.__internal__call_context,...v.__internal__call_context])];B.run(v,()=>{let u=0;const b=()=>{if(u===s.length){let k;try{k=a(...f)}catch(m){if(c??l)(c??l).abort(m);else throw console.error("unhandled error in handler",m),m}J(k)?k.then(m=>{j(m)&&v.sendEvent(m)}):j(k)&&v.sendEvent(k)}const L=s[u];L&&(u++,L(v,f,b))};b()})})},n=a=>{const f=[...r];[...e].filter(([p])=>R(p,f).length===p.length).map(([p,c])=>{const g=R(p,f);g.forEach(v=>{r.splice(r.indexOf(v),1)});for(const v of c)o(v.handler,g,a)})},t=[],d=a=>({get stream(){let f;return new ReadableStream({start:async p=>{f=c=>{let g=D.get(c);for(;g;){if(g===a){p.enqueue(c);break}g=g.prev}},t.push(f)}})},get signal(){return a.abortController.signal},sendEvent:(...f)=>{f.forEach(p=>{D.set(p,a),a.outputs.push(p),r.push(p),t.forEach(c=>c(p)),n(a)})},__internal__call_context:new Set});let l=new AbortController;const x=d({get abortController(){return l||(l=new AbortController),l},inputs:[],outputs:[],handler:null,prev:null,next:new Set});return x};function X(){const e={steps:new Map};return{handle:(r,o)=>{if(e.steps.has(r)){const n=e.steps.get(r),t={get handler(){return o},unsubscribe:()=>{n.delete(t),n.size===0&&e.steps.delete(r)}};return n.add(t),t}else{const n=new Set,t={get handler(){return o},unsubscribe:()=>{n.delete(t),n.size===0&&e.steps.delete(r)}};return n.add(t),e.steps.set(r,n),t}},createContext(){return Q({listeners:e.steps})}}}async function Y(e,r,o){const{stream:n,sendEvent:t}=e.createContext();t(r);for await(const d of n)if(o.include(d))return d;throw new Error("Workflow did not return a stop event")}function Z(e,r){const o=(...n)=>{const t=r.filter(([w])=>w.every((x,a)=>x.include(n[a]))).map(([w,x])=>x),l=V().sendEvent;return(...w)=>{let x=!1;for(let a=0;ap.include(w[c]))){x=!0;break}}return x&&console.warn("Invalid input detected [%s]",w.map(a=>a.data).join(", ")),l(...w)}};return{...e,handle:(n,t)=>{const d=(...l)=>{const w=V();return t(w.safeSendEvent,...l)};return e.handle(n,d)},createContext(){const n=e.createContext();return n.__internal__call_context.add((t,d,l)=>{t.safeSendEvent=o(...d),l()}),n}}}const ee={flex:"","flex-col":"","gap-2":""},te={flex:"~ col","gap-2":""},ne={flex:"","flex-col":"","gap-2":""},re={grid:"","grid-cols-2":"","gap-2":""},oe={flex:"","items-center":"","gap-2":""},ae={flex:"","items-center":"","gap-2":""},le={flex:"","items-center":"","gap-2":""},se={key:0},ue={key:1},fe=N({__name:"chat",setup(e){const r=W("settings/llm/baseUrl","https://openrouter.ai/api/v1/"),o=W("settings/llm/apiKey",""),n=W("settings/llm/model","openai/gpt-4o-mini"),t=S(""),d=S([]),l=S({role:"assistant",content:""}),w=S(!1),x=_(),a=_(),f=_(),p=_(),c=_();async function g(){w.value=!0;try{const v=Z(X(),[[[x],[a,c]],[[a],[f]],[[f],[p]]]);v.handle([x],async s=>{l.value={role:"assistant",content:""},d.value.push({role:"user",content:t.value}),d.value.push(l.value);const u=await K({baseURL:r.value,apiKey:o.value,model:n.value,messages:d.value.slice(0,d.value.length-1).map(b=>z(b))});for await(const b of u.chunkStream)s(a.with(b.choices[0].delta.content||""));return c.with()}),v.handle([a],async(s,u)=>{l.value.content?l.value.content+=u.data:l.value.content=u.data}),await Y(v,x.with(),c)}catch(v){console.error(v)}finally{w.value=!1}}return(v,s)=>(y(),h("div",ee,[i("div",te,[i("div",ne,[s[7]||(s[7]=i("div",null,[i("span",{"text-neutral-500":"","dark:text-neutral-400":""},"LLM")],-1)),i("div",re,[i("label",oe,[s[4]||(s[4]=i("span",{"text-nowrap":""}," Base URL ",-1)),C(i("input",{"onUpdate:modelValue":s[0]||(s[0]=u=>A(r)?r.value=u:null),border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",text:"disabled:neutral-400 dark:disabled:neutral-600",cursor:"disabled:not-allowed","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",shadow:"sm",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900"},null,512),[[E,M(r)]])]),i("label",ae,[s[5]||(s[5]=i("span",{"text-nowrap":""}," API Key ",-1)),C(i("input",{"onUpdate:modelValue":s[1]||(s[1]=u=>A(o)?o.value=u:null),type:"password",border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",text:"disabled:neutral-400 dark:disabled:neutral-600",cursor:"disabled:not-allowed","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",shadow:"sm",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900"},null,512),[[E,M(o)]])]),i("label",le,[s[6]||(s[6]=i("span",{"text-nowrap":""}," Model ",-1)),C(i("input",{"onUpdate:modelValue":s[2]||(s[2]=u=>A(n)?n.value=u:null),border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",text:"disabled:neutral-400 dark:disabled:neutral-600",cursor:"disabled:not-allowed","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",shadow:"sm",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900"},null,512),[[E,M(n)]])])])]),i("div",null,[C(i("textarea",{"onUpdate:modelValue":s[3]||(s[3]=u=>t.value=u),border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",text:"disabled:neutral-400 dark:disabled:neutral-600",cursor:"disabled:not-allowed","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",shadow:"sm",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900"},null,512),[[E,t.value]])]),i("button",{"rounded-lg":"",bg:"blue-100 dark:blue-900","px-4":"","py-2":"",onClick:g}," Send "),i("div",null,[(y(!0),h(P,null,q(d.value,(u,b)=>(y(),h("div",{key:b},[u.role==="user"?(y(),h("div",se,[i("span",null,$(u.content),1)])):U("",!0),u.role==="assistant"?(y(),h("div",ue,[i("span",null,$(u.content),1)])):U("",!0)]))),128))])])]))}});export{fe as default}; +import{d as N,bD as W,g as S,c as h,o as y,a as i,A as C,bE as E,e as M,ad as A,bx as P,by as q,t as z,C as U,D as $}from"./index-hDb1Lsb8.js";import{s as K}from"./index-D975M2PQ.js";import"./index-Be1NqeGb.js";var O=()=>{let e=null;return{getStore:()=>(e===null&&console.warn("Woops! Looks like you are calling `getContext` after `await fn()`. Please move `getContext` to top level of handler."),e),run(r,o){e=r;try{return o()}finally{e=null}}}},H=new WeakMap,I=new WeakMap,T=0,F=0,_=e=>{const r=`${T++}`,o={include:t=>n.has(t),with:t=>{const d=`${F++}`,l={[Symbol.toStringTag]:`WorkflowEvent(${r}.${d})`,toString:()=>`WorkflowEvent(${r}.${d})`,toJSON:()=>({event:r,data:t}),get data(){return t}};return n.add(l),Object.freeze(l),I.set(l,o),l}},n=new WeakSet;return H.set(o,n),Object.defineProperty(o,Symbol.toStringTag,{get:()=>`WorkflowEvent<${r}>`}),Object.defineProperty(o,"displayName",{value:`WorkflowEvent<${r}>`}),o.toString=()=>`WorkflowEvent<${r}>`,Object.freeze(o),o},j=e=>e!=null&&typeof e=="object"&&"data"in e,J=e=>e!=null&&typeof e.then=="function";function R(e,r){const o=new Array(e.length);for(const n of r)for(let t=0;t{const r=[],o=(a,f,p)=>{let c;const g={get abortController(){return c||(c=new AbortController),c},handler:a,inputs:f,outputs:[],prev:p,next:new Set};g.prev.next.add(g);const v=d(g);G.run(g,()=>{const s=[...new Set([...x.__internal__call_context,...v.__internal__call_context])];B.run(v,()=>{let u=0;const b=()=>{if(u===s.length){let k;try{k=a(...f)}catch(m){if(c??l)(c??l).abort(m);else throw console.error("unhandled error in handler",m),m}J(k)?k.then(m=>{j(m)&&v.sendEvent(m)}):j(k)&&v.sendEvent(k)}const L=s[u];L&&(u++,L(v,f,b))};b()})})},n=a=>{const f=[...r];[...e].filter(([p])=>R(p,f).length===p.length).map(([p,c])=>{const g=R(p,f);g.forEach(v=>{r.splice(r.indexOf(v),1)});for(const v of c)o(v.handler,g,a)})},t=[],d=a=>({get stream(){let f;return new ReadableStream({start:async p=>{f=c=>{let g=D.get(c);for(;g;){if(g===a){p.enqueue(c);break}g=g.prev}},t.push(f)}})},get signal(){return a.abortController.signal},sendEvent:(...f)=>{f.forEach(p=>{D.set(p,a),a.outputs.push(p),r.push(p),t.forEach(c=>c(p)),n(a)})},__internal__call_context:new Set});let l=new AbortController;const x=d({get abortController(){return l||(l=new AbortController),l},inputs:[],outputs:[],handler:null,prev:null,next:new Set});return x};function X(){const e={steps:new Map};return{handle:(r,o)=>{if(e.steps.has(r)){const n=e.steps.get(r),t={get handler(){return o},unsubscribe:()=>{n.delete(t),n.size===0&&e.steps.delete(r)}};return n.add(t),t}else{const n=new Set,t={get handler(){return o},unsubscribe:()=>{n.delete(t),n.size===0&&e.steps.delete(r)}};return n.add(t),e.steps.set(r,n),t}},createContext(){return Q({listeners:e.steps})}}}async function Y(e,r,o){const{stream:n,sendEvent:t}=e.createContext();t(r);for await(const d of n)if(o.include(d))return d;throw new Error("Workflow did not return a stop event")}function Z(e,r){const o=(...n)=>{const t=r.filter(([w])=>w.every((x,a)=>x.include(n[a]))).map(([w,x])=>x),l=V().sendEvent;return(...w)=>{let x=!1;for(let a=0;ap.include(w[c]))){x=!0;break}}return x&&console.warn("Invalid input detected [%s]",w.map(a=>a.data).join(", ")),l(...w)}};return{...e,handle:(n,t)=>{const d=(...l)=>{const w=V();return t(w.safeSendEvent,...l)};return e.handle(n,d)},createContext(){const n=e.createContext();return n.__internal__call_context.add((t,d,l)=>{t.safeSendEvent=o(...d),l()}),n}}}const ee={flex:"","flex-col":"","gap-2":""},te={flex:"~ col","gap-2":""},ne={flex:"","flex-col":"","gap-2":""},re={grid:"","grid-cols-2":"","gap-2":""},oe={flex:"","items-center":"","gap-2":""},ae={flex:"","items-center":"","gap-2":""},le={flex:"","items-center":"","gap-2":""},se={key:0},ue={key:1},fe=N({__name:"chat",setup(e){const r=W("settings/llm/baseUrl","https://openrouter.ai/api/v1/"),o=W("settings/llm/apiKey",""),n=W("settings/llm/model","openai/gpt-4o-mini"),t=S(""),d=S([]),l=S({role:"assistant",content:""}),w=S(!1),x=_(),a=_(),f=_(),p=_(),c=_();async function g(){w.value=!0;try{const v=Z(X(),[[[x],[a,c]],[[a],[f]],[[f],[p]]]);v.handle([x],async s=>{l.value={role:"assistant",content:""},d.value.push({role:"user",content:t.value}),d.value.push(l.value);const u=await K({baseURL:r.value,apiKey:o.value,model:n.value,messages:d.value.slice(0,d.value.length-1).map(b=>z(b))});for await(const b of u.chunkStream)s(a.with(b.choices[0].delta.content||""));return c.with()}),v.handle([a],async(s,u)=>{l.value.content?l.value.content+=u.data:l.value.content=u.data}),await Y(v,x.with(),c)}catch(v){console.error(v)}finally{w.value=!1}}return(v,s)=>(y(),h("div",ee,[i("div",te,[i("div",ne,[s[7]||(s[7]=i("div",null,[i("span",{"text-neutral-500":"","dark:text-neutral-400":""},"LLM")],-1)),i("div",re,[i("label",oe,[s[4]||(s[4]=i("span",{"text-nowrap":""}," Base URL ",-1)),C(i("input",{"onUpdate:modelValue":s[0]||(s[0]=u=>A(r)?r.value=u:null),border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",text:"disabled:neutral-400 dark:disabled:neutral-600",cursor:"disabled:not-allowed","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",shadow:"sm",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900"},null,512),[[E,M(r)]])]),i("label",ae,[s[5]||(s[5]=i("span",{"text-nowrap":""}," API Key ",-1)),C(i("input",{"onUpdate:modelValue":s[1]||(s[1]=u=>A(o)?o.value=u:null),type:"password",border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",text:"disabled:neutral-400 dark:disabled:neutral-600",cursor:"disabled:not-allowed","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",shadow:"sm",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900"},null,512),[[E,M(o)]])]),i("label",le,[s[6]||(s[6]=i("span",{"text-nowrap":""}," Model ",-1)),C(i("input",{"onUpdate:modelValue":s[2]||(s[2]=u=>A(n)?n.value=u:null),border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",text:"disabled:neutral-400 dark:disabled:neutral-600",cursor:"disabled:not-allowed","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",shadow:"sm",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900"},null,512),[[E,M(n)]])])])]),i("div",null,[C(i("textarea",{"onUpdate:modelValue":s[3]||(s[3]=u=>t.value=u),border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",text:"disabled:neutral-400 dark:disabled:neutral-600",cursor:"disabled:not-allowed","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",shadow:"sm",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900"},null,512),[[E,t.value]])]),i("button",{"rounded-lg":"",bg:"blue-100 dark:blue-900","px-4":"","py-2":"",onClick:g}," Send "),i("div",null,[(y(!0),h(P,null,q(d.value,(u,b)=>(y(),h("div",{key:b},[u.role==="user"?(y(),h("div",se,[i("span",null,$(u.content),1)])):U("",!0),u.role==="assistant"?(y(),h("div",ue,[i("span",null,$(u.content),1)])):U("",!0)]))),128))])])]))}});export{fe as default}; diff --git a/assets/cloudflare-workers-ai-BuVW7ZIH.js b/assets/cloudflare-workers-ai-C4lOUkFP.js similarity index 84% rename from assets/cloudflare-workers-ai-BuVW7ZIH.js rename to assets/cloudflare-workers-ai-C4lOUkFP.js index 7bf09927270b909662f0f579058daa0e4d09db02..1e0ed312a4e06aeb4c91a311749f4b6086e58321 100644 --- a/assets/cloudflare-workers-ai-BuVW7ZIH.js +++ b/assets/cloudflare-workers-ai-C4lOUkFP.js @@ -1 +1 @@ -import"./live2d-zip-loader-dDw0Wbbr.js";import{d as V,bK as w,bL as y,x as k,o as I,q,bG as x,s as K,h as v,l as M,w as $,y as f,b as c,e as l}from"./index-7-fr_lhT.js";import{u as P}from"./providers-B7zWTIWF.js";import{_ as z}from"./FieldInput.vue_vue_type_script_setup_true_lang-BhtqkEkU.js";import{_ as A}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C3sxqbyi.js";import{_ as B,a as C}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BCwQg86s.js";import{_ as N}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BxRDV7Dm.js";import"./index-Be1NqeGb.js";import"./Input.vue_vue_type_script_setup_true_lang-58p3G1RX.js";const R=V({__name:"ProviderAccountIdInput",props:w({placeholder:null,required:{type:Boolean},label:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(p){const r=p,u=y(p,"modelValue");return(n,e)=>(I(),k(z,{modelValue:u.value,"onUpdate:modelValue":e[0]||(e[0]=t=>u.value=t),label:r.label||"Account ID",description:r.description||"Account ID",placeholder:r.placeholder,required:r.required,type:"text"},null,8,["modelValue","label","description","placeholder","required"]))}}),a="cloudflare-workers-ai",F=V({__name:"cloudflare-workers-ai",setup(p){const{t:r}=q(),u=x(),n=P(),{providers:e}=K(n),t=v(()=>n.getProviderMetadata(a)),s=v({get:()=>{var o;return((o=e.value[a])==null?void 0:o.apiKey)||""},set:o=>{e.value[a]||(e.value[a]={}),e.value[a].apiKey=o}}),d=v({get:()=>{var o;return((o=e.value[a])==null?void 0:o.accountId)||""},set:o=>{e.value[a]||(e.value[a]={}),e.value[a].accountId=o}});M(()=>{var o,i;n.initializeProvider(a),s.value=((o=e.value[a])==null?void 0:o.apiKey)||"",d.value=((i=e.value[a])==null?void 0:i.accountId)||""}),$([s,d],()=>{e.value[a]={...e.value[a],apiKey:s.value,accountId:d.value}});function h(){var o;e.value[a]={...(o=t.value)==null?void 0:o.defaultOptions}}return(o,i)=>{var _,g;return I(),k(l(N),{"provider-name":(_=t.value)==null?void 0:_.localizedName,"provider-icon-color":(g=t.value)==null?void 0:g.iconColor,"on-back":()=>l(u).back()},{default:f(()=>[c(l(B),null,{default:f(()=>[c(l(C),{title:l(r)("settings.pages.providers.common.section.basic.title"),description:l(r)("settings.pages.providers.common.section.basic.description"),"on-reset":h},{default:f(()=>{var b;return[c(l(A),{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=m=>s.value=m),"provider-name":(b=t.value)==null?void 0:b.localizedName,placeholder:l(r)("settings.pages.providers.provider.cloudflare-workers-ai.fields.field.api-key.placeholder")},null,8,["modelValue","provider-name","placeholder"]),c(l(R),{modelValue:d.value,"onUpdate:modelValue":i[1]||(i[1]=m=>d.value=m),label:l(r)("settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.label"),description:l(r)("settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.description"),placeholder:l(r)("settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.placeholder")},null,8,["modelValue","label","description","placeholder"])]}),_:1},8,["title","description"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});export{F as default}; +import"./live2d-zip-loader--bTGFeQd.js";import{d as V,bK as w,bL as y,x as k,o as I,q,bG as x,s as K,h as v,l as M,w as $,y as f,b as c,e as l}from"./index-hDb1Lsb8.js";import{u as P}from"./providers-adQ6cb75.js";import{_ as z}from"./FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js";import{_ as A}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-CHpN3yiY.js";import{_ as B,a as C}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CYv3qJbi.js";import{_ as N}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTOfxlwP.js";import"./index-Be1NqeGb.js";import"./Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js";const R=V({__name:"ProviderAccountIdInput",props:w({placeholder:null,required:{type:Boolean},label:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(p){const r=p,u=y(p,"modelValue");return(n,e)=>(I(),k(z,{modelValue:u.value,"onUpdate:modelValue":e[0]||(e[0]=t=>u.value=t),label:r.label||"Account ID",description:r.description||"Account ID",placeholder:r.placeholder,required:r.required,type:"text"},null,8,["modelValue","label","description","placeholder","required"]))}}),a="cloudflare-workers-ai",F=V({__name:"cloudflare-workers-ai",setup(p){const{t:r}=q(),u=x(),n=P(),{providers:e}=K(n),t=v(()=>n.getProviderMetadata(a)),s=v({get:()=>{var o;return((o=e.value[a])==null?void 0:o.apiKey)||""},set:o=>{e.value[a]||(e.value[a]={}),e.value[a].apiKey=o}}),d=v({get:()=>{var o;return((o=e.value[a])==null?void 0:o.accountId)||""},set:o=>{e.value[a]||(e.value[a]={}),e.value[a].accountId=o}});M(()=>{var o,i;n.initializeProvider(a),s.value=((o=e.value[a])==null?void 0:o.apiKey)||"",d.value=((i=e.value[a])==null?void 0:i.accountId)||""}),$([s,d],()=>{e.value[a]={...e.value[a],apiKey:s.value,accountId:d.value}});function h(){var o;e.value[a]={...(o=t.value)==null?void 0:o.defaultOptions}}return(o,i)=>{var _,g;return I(),k(l(N),{"provider-name":(_=t.value)==null?void 0:_.localizedName,"provider-icon-color":(g=t.value)==null?void 0:g.iconColor,"on-back":()=>l(u).back()},{default:f(()=>[c(l(B),null,{default:f(()=>[c(l(C),{title:l(r)("settings.pages.providers.common.section.basic.title"),description:l(r)("settings.pages.providers.common.section.basic.description"),"on-reset":h},{default:f(()=>{var b;return[c(l(A),{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=m=>s.value=m),"provider-name":(b=t.value)==null?void 0:b.localizedName,placeholder:l(r)("settings.pages.providers.provider.cloudflare-workers-ai.fields.field.api-key.placeholder")},null,8,["modelValue","provider-name","placeholder"]),c(l(R),{modelValue:d.value,"onUpdate:modelValue":i[1]||(i[1]=m=>d.value=m),label:l(r)("settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.label"),description:l(r)("settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.description"),placeholder:l(r)("settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.placeholder")},null,8,["modelValue","label","description","placeholder"])]}),_:1},8,["title","description"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});export{F as default}; diff --git a/assets/consciousness-C4xyvmr3.js b/assets/consciousness-BRdkM-c-.js similarity index 90% rename from assets/consciousness-C4xyvmr3.js rename to assets/consciousness-BRdkM-c-.js index d19fd47f7a86de87a6ba76e5fe0caaa73ee1ff61..13fc5ff8dff1e314811749b53187fce7f3818d6a 100644 --- a/assets/consciousness-C4xyvmr3.js +++ b/assets/consciousness-BRdkM-c-.js @@ -1 +1 @@ -import{f as P,bD as n,g as M,h as r,w as L}from"./index-7-fr_lhT.js";import{u as w}from"./providers-B7zWTIWF.js";const h=P("consciousness",()=>{const o=w(),s=n("settings/consciousness/active-provider",""),c=n("settings/consciousness/active-model",""),d=n("settings/consciousness/active-custom-model",""),l=M({}),i=M(""),m=r(()=>{var e;return((e=o.getProviderMetadata(s.value))==null?void 0:e.capabilities.listModels)!==void 0}),a=r(()=>o.getModelsForProvider(s.value)),f=r(()=>o.isLoadingModels[s.value]||!1),g=r(()=>o.modelLoadError[s.value]||null),p=r(()=>{if(!i.value.trim())return a.value;const e=i.value.toLowerCase().trim();return a.value.filter(t=>t.name.toLowerCase().includes(e)||t.id.toLowerCase().includes(e)||t.description&&t.description.toLowerCase().includes(e))});function u(){c.value="",d.value="",l.value={},i.value=""}async function v(e){var t;e&&((t=o.getProviderMetadata(s.value))==null?void 0:t.capabilities.listModels)!==void 0&&o.getModelsForProvider(e).length===0&&await o.fetchModelsForProvider(e)}return L(s,async e=>{await v(e),u()}),{activeProvider:s,activeModel:c,customModelName:d,expandedDescriptions:l,modelSearchQuery:i,supportsModelListing:m,providerModels:a,isLoadingActiveProviderModels:f,activeProviderModelError:g,filteredModels:p,resetModelSelection:u,loadModelsForProvider:v}});export{h as u}; +import{f as P,bD as n,g as M,h as r,w as L}from"./index-hDb1Lsb8.js";import{u as w}from"./providers-adQ6cb75.js";const h=P("consciousness",()=>{const o=w(),s=n("settings/consciousness/active-provider",""),c=n("settings/consciousness/active-model",""),d=n("settings/consciousness/active-custom-model",""),l=M({}),i=M(""),m=r(()=>{var e;return((e=o.getProviderMetadata(s.value))==null?void 0:e.capabilities.listModels)!==void 0}),a=r(()=>o.getModelsForProvider(s.value)),f=r(()=>o.isLoadingModels[s.value]||!1),g=r(()=>o.modelLoadError[s.value]||null),p=r(()=>{if(!i.value.trim())return a.value;const e=i.value.toLowerCase().trim();return a.value.filter(t=>t.name.toLowerCase().includes(e)||t.id.toLowerCase().includes(e)||t.description&&t.description.toLowerCase().includes(e))});function u(){c.value="",d.value="",l.value={},i.value=""}async function v(e){var t;e&&((t=o.getProviderMetadata(s.value))==null?void 0:t.capabilities.listModels)!==void 0&&o.getModelsForProvider(e).length===0&&await o.fetchModelsForProvider(e)}return L(s,async e=>{await v(e),u()}),{activeProvider:s,activeModel:c,customModelName:d,expandedDescriptions:l,modelSearchQuery:i,supportsModelListing:m,providerModels:a,isLoadingActiveProviderModels:f,activeProviderModelError:g,filteredModels:p,resetModelSelection:u,loadModelsForProvider:v}});export{h as u}; diff --git a/assets/consciousness-x6W39XLe.js b/assets/consciousness-C-h5B1sq.js similarity index 95% rename from assets/consciousness-x6W39XLe.js rename to assets/consciousness-C-h5B1sq.js index 7f0bc6d22205fde263efd9618488d8a8c189c789..1c48beff34ef1592fc9eadd65c9290fe9233d18c 100644 --- a/assets/consciousness-x6W39XLe.js +++ b/assets/consciousness-C-h5B1sq.js @@ -1 +1 @@ -import{d as L,s as b,q as U,bG as q,l as B,bw as z,c as r,o as l,A as h,a as e,e as s,D as n,C as f,bx as k,by as E,b as T,y as A,bo as F,x as y,ad as u,bE as G}from"./index-7-fr_lhT.js";import{R as Q,a as j}from"./RadioCardDetailManySelect-Bn9sPp4x.js";import"./live2d-zip-loader-dDw0Wbbr.js";import{u as I}from"./consciousness-C4xyvmr3.js";import{u as $}from"./providers-B7zWTIWF.js";import{b as w}from"./route-block-B_A1xBdJ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BNzPx9yx.js";import"./Input.vue_vue_type_script_setup_true_lang-58p3G1RX.js";import"./index-Be1NqeGb.js";const H={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},J={relative:""},K={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},O={text:"neutral-300 dark:neutral-500","text-nowrap":""},W={"text-nowrap":"","text-3xl":"","font-semibold":""},X={bg:"neutral-50 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-4"},Y={flex:"~ col gap-4"},Z={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-500"},ee={text:"neutral-400 dark:neutral-400"},se={"max-w-full":""},te={key:0,flex:"~ row gap-4",style:{"scrollbar-width":"none"},"min-w-0":"","of-x-scroll":"","scroll-smooth":"",role:"radiogroup"},oe={key:1},ne={key:0},ie={flex:"~ col gap-4"},le={class:"text-lg md:text-2xl"},re={text:"neutral-400 dark:neutral-400"},de={key:0,class:"flex items-center justify-center py-4"},ae={key:1,class:"flex items-center gap-3 border border-red-200 rounded-lg bg-red-50 p-4 dark:border-red-800 dark:bg-red-900/20"},ce={class:"flex flex-col"},ue={class:"font-medium"},pe={class:"text-sm text-red-600 dark:text-red-400"},me={key:2,class:"flex items-center gap-3 border border-amber-200 rounded-lg bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20"},xe={class:"flex flex-col"},ve={class:"font-medium"},ge={class:"text-sm text-amber-600 dark:text-amber-400"},_e={key:1},be={flex:"~ col gap-4"},he={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},fe={text:"neutral-400 dark:neutral-500"},ke={class:"bg-primary-50 border-primary-200 dark:bg-primary-900/20 dark:border-primary-800 flex items-center gap-3 border rounded-lg p-4"},ye={class:"flex flex-col"},we={class:"font-medium"},Me={class:"dark:text-primary-400 text-primary-600 text-sm"},Ce={class:"mt-2"},Ve={class:"mb-1 block text-sm font-medium"},Pe=["placeholder"],Se=L({__name:"consciousness",setup(Ne){const M=$(),m=I(),{availableProviders:C,availableTextGenerationsProvidersMetadata:V}=b(M),{activeProvider:d,activeModel:a,customModelName:P,modelSearchQuery:c,supportsModelListing:x,providerModels:p,isLoadingActiveProviderModels:v,activeProviderModelError:g}=b(m),{t:o}=U(),S=q();B(async()=>{await m.loadModelsForProvider(d.value)});function N(_){P.value=_}return(_,t)=>{const R=z("motion");return l(),r(k,null,[h((l(),r("div",H,[e("button",{onClick:t[0]||(t[0]=i=>s(S).back())},t[5]||(t[5]=[e("div",{"i-solar:alt-arrow-left-line-duotone":"","text-xl":""},null,-1)])),e("h1",J,[e("div",K,[e("span",O,n(s(o)("settings.pages.modules.title")),1)]),e("div",W,n(s(o)("settings.pages.modules.consciousness.title")),1)])])),[[R]]),e("div",X,[e("div",null,[e("div",Y,[e("div",null,[e("h2",Z,n(s(o)("settings.pages.providers.title")),1),e("div",ee,[e("span",null,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.description")),1)])]),e("div",se,[s(C).length>0?(l(),r("fieldset",te,[(l(!0),r(k,null,E(s(V),i=>(l(),y(s(j),{id:i.id,key:i.id,modelValue:s(d),"onUpdate:modelValue":t[1]||(t[1]=D=>u(d)?d.value=D:null),name:"provider",value:i.id,title:i.localizedName,description:i.localizedDescription},null,8,["id","modelValue","value","title","description"]))),128))])):(l(),r("div",oe,[T(s(F),{class:"flex items-center gap-3 rounded-lg p-4",border:"2 dashed neutral-200 dark:neutral-800",bg:"neutral-50 dark:neutral-800",transition:"colors duration-200 ease-in-out",to:"/settings/providers"},{default:A(()=>t[6]||(t[6]=[e("div",{"i-solar:warning-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1),e("div",{class:"flex flex-col"},[e("span",{class:"font-medium"},"No Providers Configured"),e("span",{class:"text-sm text-neutral-400 dark:text-neutral-500"},"Click here to set up your LLM providers")],-1),e("div",{"i-solar:arrow-right-line-duotone":"",class:"ml-auto text-xl text-neutral-400 dark:text-neutral-500"},null,-1)])),_:1})]))])])]),s(d)&&s(x)?(l(),r("div",ne,[e("div",ie,[e("div",null,[e("h2",le,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),e("div",re,[e("span",null,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),s(v)?(l(),r("div",de,[t[7]||(t[7]=e("div",{class:"mr-2 animate-spin"},[e("div",{"i-solar:spinner-line-duotone":"","text-xl":""})],-1)),e("span",null,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.loading")),1)])):s(g)?(l(),r("div",ae,[t[8]||(t[8]=e("div",{"i-solar:close-circle-line-duotone":"",class:"text-2xl text-red-500 dark:text-red-400"},null,-1)),e("div",ce,[e("span",ue,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.error")),1),e("span",pe,n(s(g)),1)])])):s(p).length===0&&!s(v)?(l(),r("div",me,[t[9]||(t[9]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),e("div",xe,[e("span",ve,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models")),1),e("span",ge,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description")),1)])])):s(p).length>0?(l(),y(s(Q),{key:3,modelValue:s(a),"onUpdate:modelValue":t[2]||(t[2]=i=>u(a)?a.value=i:null),"search-query":s(c),"onUpdate:searchQuery":t[3]||(t[3]=i=>u(c)?c.value=i:null),items:s(p),searchable:!0,"search-placeholder":s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder"),"search-no-results-title":s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results"),"search-no-results-description":s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description",{query:s(c)}),"search-results-text":s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results",{count:"{count}",total:"{total}"}),"custom-input-placeholder":s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder"),"expand-button-text":s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.expand"),"collapse-button-text":s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse"),"onUpdate:customValue":N},null,8,["modelValue","search-query","items","search-placeholder","search-no-results-title","search-no-results-description","search-results-text","custom-input-placeholder","expand-button-text","collapse-button-text"])):f("",!0)])])):s(d)&&!s(x)?(l(),r("div",_e,[e("div",be,[e("div",null,[e("h2",he,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),e("div",fe,[e("span",null,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),e("div",ke,[t[10]||(t[10]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-primary-500 dark:text-primary-400 text-2xl"},null,-1)),e("div",ye,[e("span",we,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported")),1),e("span",Me,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported_description")),1)])]),e("div",Ce,[e("label",Ve,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_name")),1),h(e("input",{"onUpdate:modelValue":t[4]||(t[4]=i=>u(a)?a.value=i:null),type:"text",class:"w-full border border-neutral-300 rounded bg-white px-3 py-2 dark:border-neutral-700 dark:bg-neutral-900",placeholder:s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_placeholder")},null,8,Pe),[[G,s(a)]])])])])):f("",!0)]),t[11]||(t[11]=e("div",{text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},[e("div",{text:"40","i-lucide:ghost":""})],-1))],64)}}});typeof w=="function"&&w(Se);export{Se as default}; +import{d as L,s as b,q as U,bG as q,l as B,bw as z,c as r,o as l,A as h,a as e,e as s,D as n,C as f,bx as k,by as E,b as T,y as A,bo as F,x as y,ad as u,bE as G}from"./index-hDb1Lsb8.js";import{R as Q,a as j}from"./RadioCardDetailManySelect-D3zSF9Ox.js";import"./live2d-zip-loader--bTGFeQd.js";import{u as I}from"./consciousness-BRdkM-c-.js";import{u as $}from"./providers-adQ6cb75.js";import{b as w}from"./route-block-B_A1xBdJ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import"./Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js";import"./index-Be1NqeGb.js";const H={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},J={relative:""},K={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},O={text:"neutral-300 dark:neutral-500","text-nowrap":""},W={"text-nowrap":"","text-3xl":"","font-semibold":""},X={bg:"neutral-50 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-4"},Y={flex:"~ col gap-4"},Z={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-500"},ee={text:"neutral-400 dark:neutral-400"},se={"max-w-full":""},te={key:0,flex:"~ row gap-4",style:{"scrollbar-width":"none"},"min-w-0":"","of-x-scroll":"","scroll-smooth":"",role:"radiogroup"},oe={key:1},ne={key:0},ie={flex:"~ col gap-4"},le={class:"text-lg md:text-2xl"},re={text:"neutral-400 dark:neutral-400"},de={key:0,class:"flex items-center justify-center py-4"},ae={key:1,class:"flex items-center gap-3 border border-red-200 rounded-lg bg-red-50 p-4 dark:border-red-800 dark:bg-red-900/20"},ce={class:"flex flex-col"},ue={class:"font-medium"},pe={class:"text-sm text-red-600 dark:text-red-400"},me={key:2,class:"flex items-center gap-3 border border-amber-200 rounded-lg bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20"},xe={class:"flex flex-col"},ve={class:"font-medium"},ge={class:"text-sm text-amber-600 dark:text-amber-400"},_e={key:1},be={flex:"~ col gap-4"},he={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},fe={text:"neutral-400 dark:neutral-500"},ke={class:"bg-primary-50 border-primary-200 dark:bg-primary-900/20 dark:border-primary-800 flex items-center gap-3 border rounded-lg p-4"},ye={class:"flex flex-col"},we={class:"font-medium"},Me={class:"dark:text-primary-400 text-primary-600 text-sm"},Ce={class:"mt-2"},Ve={class:"mb-1 block text-sm font-medium"},Pe=["placeholder"],Se=L({__name:"consciousness",setup(Ne){const M=$(),m=I(),{availableProviders:C,availableTextGenerationsProvidersMetadata:V}=b(M),{activeProvider:d,activeModel:a,customModelName:P,modelSearchQuery:c,supportsModelListing:x,providerModels:p,isLoadingActiveProviderModels:v,activeProviderModelError:g}=b(m),{t:o}=U(),S=q();B(async()=>{await m.loadModelsForProvider(d.value)});function N(_){P.value=_}return(_,t)=>{const R=z("motion");return l(),r(k,null,[h((l(),r("div",H,[e("button",{onClick:t[0]||(t[0]=i=>s(S).back())},t[5]||(t[5]=[e("div",{"i-solar:alt-arrow-left-line-duotone":"","text-xl":""},null,-1)])),e("h1",J,[e("div",K,[e("span",O,n(s(o)("settings.pages.modules.title")),1)]),e("div",W,n(s(o)("settings.pages.modules.consciousness.title")),1)])])),[[R]]),e("div",X,[e("div",null,[e("div",Y,[e("div",null,[e("h2",Z,n(s(o)("settings.pages.providers.title")),1),e("div",ee,[e("span",null,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.description")),1)])]),e("div",se,[s(C).length>0?(l(),r("fieldset",te,[(l(!0),r(k,null,E(s(V),i=>(l(),y(s(j),{id:i.id,key:i.id,modelValue:s(d),"onUpdate:modelValue":t[1]||(t[1]=D=>u(d)?d.value=D:null),name:"provider",value:i.id,title:i.localizedName,description:i.localizedDescription},null,8,["id","modelValue","value","title","description"]))),128))])):(l(),r("div",oe,[T(s(F),{class:"flex items-center gap-3 rounded-lg p-4",border:"2 dashed neutral-200 dark:neutral-800",bg:"neutral-50 dark:neutral-800",transition:"colors duration-200 ease-in-out",to:"/settings/providers"},{default:A(()=>t[6]||(t[6]=[e("div",{"i-solar:warning-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1),e("div",{class:"flex flex-col"},[e("span",{class:"font-medium"},"No Providers Configured"),e("span",{class:"text-sm text-neutral-400 dark:text-neutral-500"},"Click here to set up your LLM providers")],-1),e("div",{"i-solar:arrow-right-line-duotone":"",class:"ml-auto text-xl text-neutral-400 dark:text-neutral-500"},null,-1)])),_:1})]))])])]),s(d)&&s(x)?(l(),r("div",ne,[e("div",ie,[e("div",null,[e("h2",le,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),e("div",re,[e("span",null,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),s(v)?(l(),r("div",de,[t[7]||(t[7]=e("div",{class:"mr-2 animate-spin"},[e("div",{"i-solar:spinner-line-duotone":"","text-xl":""})],-1)),e("span",null,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.loading")),1)])):s(g)?(l(),r("div",ae,[t[8]||(t[8]=e("div",{"i-solar:close-circle-line-duotone":"",class:"text-2xl text-red-500 dark:text-red-400"},null,-1)),e("div",ce,[e("span",ue,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.error")),1),e("span",pe,n(s(g)),1)])])):s(p).length===0&&!s(v)?(l(),r("div",me,[t[9]||(t[9]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),e("div",xe,[e("span",ve,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models")),1),e("span",ge,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description")),1)])])):s(p).length>0?(l(),y(s(Q),{key:3,modelValue:s(a),"onUpdate:modelValue":t[2]||(t[2]=i=>u(a)?a.value=i:null),"search-query":s(c),"onUpdate:searchQuery":t[3]||(t[3]=i=>u(c)?c.value=i:null),items:s(p),searchable:!0,"search-placeholder":s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder"),"search-no-results-title":s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results"),"search-no-results-description":s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description",{query:s(c)}),"search-results-text":s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results",{count:"{count}",total:"{total}"}),"custom-input-placeholder":s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder"),"expand-button-text":s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.expand"),"collapse-button-text":s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse"),"onUpdate:customValue":N},null,8,["modelValue","search-query","items","search-placeholder","search-no-results-title","search-no-results-description","search-results-text","custom-input-placeholder","expand-button-text","collapse-button-text"])):f("",!0)])])):s(d)&&!s(x)?(l(),r("div",_e,[e("div",be,[e("div",null,[e("h2",he,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),e("div",fe,[e("span",null,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),e("div",ke,[t[10]||(t[10]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-primary-500 dark:text-primary-400 text-2xl"},null,-1)),e("div",ye,[e("span",we,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported")),1),e("span",Me,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported_description")),1)])]),e("div",Ce,[e("label",Ve,n(s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_name")),1),h(e("input",{"onUpdate:modelValue":t[4]||(t[4]=i=>u(a)?a.value=i:null),type:"text",class:"w-full border border-neutral-300 rounded bg-white px-3 py-2 dark:border-neutral-700 dark:bg-neutral-900",placeholder:s(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_placeholder")},null,8,Pe),[[G,s(a)]])])])])):f("",!0)]),t[11]||(t[11]=e("div",{text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},[e("div",{text:"40","i-lucide:ghost":""})],-1))],64)}}});typeof w=="function"&&w(Se);export{Se as default}; diff --git a/assets/deepseek-CrysIhkq.js b/assets/deepseek-CB4tx-Ko.js similarity index 67% rename from assets/deepseek-CrysIhkq.js rename to assets/deepseek-CB4tx-Ko.js index 6c2d856d412cab03dda73984ff90e1bd56269805..2395cd06b63c27e202aa47976045dde9b8bb6043 100644 --- a/assets/deepseek-CrysIhkq.js +++ b/assets/deepseek-CB4tx-Ko.js @@ -1 +1 @@ -import"./live2d-zip-loader-dDw0Wbbr.js";import{d as k,q as U,bG as V,s as y,h as c,l as $,w as K,x as h,o as x,y as u,b as l,e as t}from"./index-7-fr_lhT.js";import{u as w}from"./providers-B7zWTIWF.js";import{_ as z,a as C}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CUVIcbSL.js";import{_ as M}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C3sxqbyi.js";import{_ as N,a as P}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BCwQg86s.js";import{_ as R}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BxRDV7Dm.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-D5rspuJc.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BNzPx9yx.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BhtqkEkU.js";import"./Input.vue_vue_type_script_setup_true_lang-58p3G1RX.js";const a="deepseek",J=k({__name:"deepseek",setup(S){const{t:d}=U(),_=V(),m=w(),{providers:o}=y(m),n=c(()=>m.getProviderMetadata(a)),r=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),i=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});$(()=>{var e,s;m.initializeProvider(a),r.value=((e=o.value[a])==null?void 0:e.apiKey)||"",i.value=((s=o.value[a])==null?void 0:s.baseUrl)||""}),K([r,i],()=>{o.value[a]={...o.value[a],apiKey:r.value,baseUrl:i.value||""}});function b(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,s)=>{var v,f;return x(),h(t(R),{"provider-name":(v=n.value)==null?void 0:v.localizedName,"provider-icon-color":(f=n.value)==null?void 0:f.iconColor,"on-back":()=>t(_).back()},{default:u(()=>[l(t(N),null,{default:u(()=>[l(t(P),{title:t(d)("settings.pages.providers.common.section.basic.title"),description:t(d)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:u(()=>{var p;return[l(t(M),{modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=g=>r.value=g),"provider-name":(p=n.value)==null?void 0:p.localizedName,placeholder:"sk-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(z),{title:t(d)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t(C),{modelValue:i.value,"onUpdate:modelValue":s[1]||(s[1]=p=>i.value=p),placeholder:"https://api.deepseek.com/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});export{J as default}; +import"./live2d-zip-loader--bTGFeQd.js";import{d as k,q as U,bG as V,s as y,h as c,l as $,w as K,x as h,o as x,y as u,b as l,e as t}from"./index-hDb1Lsb8.js";import{u as w}from"./providers-adQ6cb75.js";import{_ as z,a as C}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-UCuivhvU.js";import{_ as M}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-CHpN3yiY.js";import{_ as N,a as P}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CYv3qJbi.js";import{_ as R}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTOfxlwP.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js";import"./Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js";const a="deepseek",J=k({__name:"deepseek",setup(S){const{t:d}=U(),_=V(),m=w(),{providers:o}=y(m),n=c(()=>m.getProviderMetadata(a)),r=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),i=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});$(()=>{var e,s;m.initializeProvider(a),r.value=((e=o.value[a])==null?void 0:e.apiKey)||"",i.value=((s=o.value[a])==null?void 0:s.baseUrl)||""}),K([r,i],()=>{o.value[a]={...o.value[a],apiKey:r.value,baseUrl:i.value||""}});function b(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,s)=>{var v,f;return x(),h(t(R),{"provider-name":(v=n.value)==null?void 0:v.localizedName,"provider-icon-color":(f=n.value)==null?void 0:f.iconColor,"on-back":()=>t(_).back()},{default:u(()=>[l(t(N),null,{default:u(()=>[l(t(P),{title:t(d)("settings.pages.providers.common.section.basic.title"),description:t(d)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:u(()=>{var p;return[l(t(M),{modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=g=>r.value=g),"provider-name":(p=n.value)==null?void 0:p.localizedName,placeholder:"sk-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(z),{title:t(d)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t(C),{modelValue:i.value,"onUpdate:modelValue":s[1]||(s[1]=p=>i.value=p),placeholder:"https://api.deepseek.com/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});export{J as default}; diff --git a/assets/default-3kSj1ZoR.js b/assets/default-DolhCkLR.js similarity index 89% rename from assets/default-3kSj1ZoR.js rename to assets/default-DolhCkLR.js index 0187040a82cac0f574635b60d1f299dc4f019510..eec8d28ab8fab84794e83ac373b2ba8806ecb14d 100644 --- a/assets/default-3kSj1ZoR.js +++ b/assets/default-DolhCkLR.js @@ -1 +1 @@ -import{d as n,u as r,c,a,b as t,e,n as i,R as m,o as l}from"./index-7-fr_lhT.js";import{H as x}from"./HeaderLink-C7jWLVVD.js";const f={"mb-4":"","w-full":"","gap-2":"",class:"px-0 py-1 md:px-3 md:py-3"},_={class:"px-3 py-2 md:px-5 md:py-5",flex:"~ col gap-4","mx-auto":"","max-w-screen-xl":""},$=n({__name:"default",setup(u){const{top:o,right:p,bottom:s,left:d}=r();return(g,y)=>(l(),c("div",{"p-2":"",style:i({paddingTop:`${e(o)}px`,paddingRight:`${e(p)}px`,paddingBottom:`${e(s)}px`,paddingLeft:`${e(d)}px`})},[a("div",f,[t(x)]),a("div",_,[t(e(m))])],4))}});export{$ as default}; +import{d as n,u as r,c,a,b as t,e,n as i,R as m,o as l}from"./index-hDb1Lsb8.js";import{H as x}from"./HeaderLink-DavtcSnn.js";const f={"mb-4":"","w-full":"","gap-2":"",class:"px-0 py-1 md:px-3 md:py-3"},_={class:"px-3 py-2 md:px-5 md:py-5",flex:"~ col gap-4","mx-auto":"","max-w-screen-xl":""},$=n({__name:"default",setup(u){const{top:o,right:p,bottom:s,left:d}=r();return(g,y)=>(l(),c("div",{"p-2":"",style:i({paddingTop:`${e(o)}px`,paddingRight:`${e(p)}px`,paddingBottom:`${e(s)}px`,paddingLeft:`${e(d)}px`})},[a("div",f,[t(x)]),a("div",_,[t(e(m))])],4))}});export{$ as default}; diff --git a/assets/default-node-DzW5muPs.js b/assets/default-node-BGL82aP-.js similarity index 89% rename from assets/default-node-DzW5muPs.js rename to assets/default-node-BGL82aP-.js index 6337d3014e36916b03876fe85be35208777576d8..51b79327b7b5e87b4f54c27b3e1aacf692e7929d 100644 --- a/assets/default-node-DzW5muPs.js +++ b/assets/default-node-BGL82aP-.js @@ -1 +1 @@ -import{cp as t}from"./index-7-fr_lhT.js";async function s(){const{createRequire:a}=await t(async()=>{const{createRequire:o}=await import("./__vite-browser-external-FmFgRqLi.js");return{createRequire:o}},[]),{dirname:n,resolve:e}=await t(async()=>{const{dirname:o,resolve:c}=await import("./__vite-browser-external-FmFgRqLi.js");return{dirname:o,resolve:c}},[]),d=a(import.meta.url),r=n(d.resolve("@duckdb/duckdb-wasm"));return{mvp:{mainModule:e(r,"./duckdb-mvp.wasm"),mainWorker:e(r,"./duckdb-node-mvp.worker.cjs")},eh:{mainModule:e(r,"./duckdb-eh.wasm"),mainWorker:e(r,"./duckdb-node-eh.worker.cjs")}}}export{s as getBundles}; +import{cp as t}from"./index-hDb1Lsb8.js";async function s(){const{createRequire:a}=await t(async()=>{const{createRequire:o}=await import("./__vite-browser-external-FmFgRqLi.js");return{createRequire:o}},[]),{dirname:n,resolve:e}=await t(async()=>{const{dirname:o,resolve:c}=await import("./__vite-browser-external-FmFgRqLi.js");return{dirname:o,resolve:c}},[]),d=a(import.meta.url),r=n(d.resolve("@duckdb/duckdb-wasm"));return{mvp:{mainModule:e(r,"./duckdb-mvp.wasm"),mainWorker:e(r,"./duckdb-node-mvp.worker.cjs")},eh:{mainModule:e(r,"./duckdb-eh.wasm"),mainWorker:e(r,"./duckdb-node-eh.worker.cjs")}}}export{s as getBundles}; diff --git a/assets/delays-HBOKcZm5.js b/assets/delays-F63qeUW3.js similarity index 82% rename from assets/delays-HBOKcZm5.js rename to assets/delays-F63qeUW3.js index 8d64a58492aa36a6db58b4e178360623143cfed6..9f3a2ee5400b35c5591afc83878449c945ff8dcc 100644 --- a/assets/delays-HBOKcZm5.js +++ b/assets/delays-F63qeUW3.js @@ -1 +1 @@ -import{b as v,_,l as b}from"./queues-BATLkujj.js";import"./live2d-zip-loader-dDw0Wbbr.js";import{d as k,g as d,c as s,o as l,a as e,b as y,e as x,D as i,bx as f,by as p}from"./index-7-fr_lhT.js";import"./index-CJycCKU5.js";import"./queue-B4R0QEYc.js";const z={flex:"","flex-col":"","gap-2":"","p-2":""},w={flex:"","flex-row":"","gap-2":""},h={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},M={"w-full":"",flex:"","flex-row":"","gap-4":""},V={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},D={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},N=k({__name:"delays",setup(E){const t=d(""),m=d([]),c=d([]),r=d(!1),u=v();u.onHandlerEvent("delay",a=>{c.value.push(a)});function g(){r.value=!0;const a=t.value.split("");for(const n of a)u.add(n);u.add(b),t.value="",r.value=!1}return(a,n)=>(l(),s("div",z,[e("div",w,[y(x(_),{modelValue:t.value,"onUpdate:modelValue":n[0]||(n[0]=o=>t.value=o),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:g},null,8,["modelValue"]),e("button",h,i(r.value?"Processing...":"Send"),1)]),e("div",M,[e("div",V,[n[1]||(n[1]=e("h3",{"font-semibold":""}," Emotion Message ",-1)),(l(!0),s(f,null,p(m.value,o=>(l(),s("div",{key:o},[e("div",null,i(o),1)]))),128))]),e("div",D,[n[2]||(n[2]=e("h3",{"font-semibold":""}," Delays ",-1)),(l(!0),s(f,null,p(c.value,o=>(l(),s("div",{key:o},[e("div",null,i(o)+"s",1)]))),128))])])]))}});export{N as default}; +import{b as v,_,l as b}from"./queues-DEhcWTMJ.js";import"./live2d-zip-loader--bTGFeQd.js";import{d as k,g as d,c as s,o as l,a as e,b as y,e as x,D as i,bx as f,by as p}from"./index-hDb1Lsb8.js";import"./index-BNcJmkAi.js";import"./queue-c563jmhe.js";const z={flex:"","flex-col":"","gap-2":"","p-2":""},w={flex:"","flex-row":"","gap-2":""},h={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},M={"w-full":"",flex:"","flex-row":"","gap-4":""},V={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},D={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},N=k({__name:"delays",setup(E){const t=d(""),m=d([]),c=d([]),r=d(!1),u=v();u.onHandlerEvent("delay",a=>{c.value.push(a)});function g(){r.value=!0;const a=t.value.split("");for(const n of a)u.add(n);u.add(b),t.value="",r.value=!1}return(a,n)=>(l(),s("div",z,[e("div",w,[y(x(_),{modelValue:t.value,"onUpdate:modelValue":n[0]||(n[0]=o=>t.value=o),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:g},null,8,["modelValue"]),e("button",h,i(r.value?"Processing...":"Send"),1)]),e("div",M,[e("div",V,[n[1]||(n[1]=e("h3",{"font-semibold":""}," Emotion Message ",-1)),(l(!0),s(f,null,p(m.value,o=>(l(),s("div",{key:o},[e("div",null,i(o),1)]))),128))]),e("div",D,[n[2]||(n[2]=e("h3",{"font-semibold":""}," Delays ",-1)),(l(!0),s(f,null,p(c.value,o=>(l(),s("div",{key:o},[e("div",null,i(o)+"s",1)]))),128))])])]))}});export{N as default}; diff --git a/assets/elevenlabs-Dh3dKYgb.js b/assets/elevenlabs-L17nDlYs.js similarity index 57% rename from assets/elevenlabs-Dh3dKYgb.js rename to assets/elevenlabs-L17nDlYs.js index fb2aa7b706d8f1bd92024fbf0b771152d51409b3..f2756ff4991c90379f376114cd448076da9e562f 100644 --- a/assets/elevenlabs-Dh3dKYgb.js +++ b/assets/elevenlabs-L17nDlYs.js @@ -1 +1 @@ -import"./live2d-zip-loader-dDw0Wbbr.js";import{d as y,s as S,h as i,x as w,o as k,y as u,b as d,e as r}from"./index-7-fr_lhT.js";import{u as x}from"./providers-B7zWTIWF.js";import{u as C}from"./speech-DK9my_xu.js";import{_ as B,a as L,b as V}from"./SpeechVoiceSettings.vue_vue_type_script_setup_true_lang-DW1qhqmX.js";import"./index-Be1NqeGb.js";import"./TestDummyMarker.vue_vue_type_script_setup_true_lang-OSsy22LU.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CUVIcbSL.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-D5rspuJc.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BNzPx9yx.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BhtqkEkU.js";import"./Input.vue_vue_type_script_setup_true_lang-58p3G1RX.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C3sxqbyi.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BCwQg86s.js";const t="elevenlabs",m="eleven_multilingual_v2",q=y({__name:"elevenlabs",setup(P){const n={similarityBoost:.75,stability:.5,speed:1,style:0,useSpeakerBoost:!0},a=C(),s=x(),{providers:v}=S(s),f=i(()=>{var e;return!!((e=v.value[t])!=null&&e.apiKey)}),g=i(()=>a.availableVoices[t]||[]),h=i(()=>a.availableLanguages);async function _(e,l,p){const o=s.getProviderInstance(t);if(!o)throw new Error("Failed to initialize speech provider");const c=s.getProviderConfig(t),b=c.model||m;return await a.speech(o,b,e,l,{...c,...n})}return(e,l)=>(k(),w(r(V),{"provider-id":t,"default-model":m,"additional-settings":n},{"voice-settings":u(({voiceSettings:p,updateVoiceSettings:o})=>[d(r(L),{settings:p,"show-similarity-boost":!0,"show-stability":!0,"show-speed":!0,"show-style":!0,"show-speaker-boost":!0,onUpdate:o},null,8,["settings","onUpdate"])]),playground:u(()=>[d(r(B),{"available-voices":g.value,"available-languages":h.value,"generate-speech":_,"api-key-configured":f.value,"default-text":"Hello! This is a test of the ElevenLabs voice synthesis."},null,8,["available-voices","available-languages","api-key-configured"])]),_:1}))}});export{q as default}; +import"./live2d-zip-loader--bTGFeQd.js";import{d as y,s as S,h as i,x as w,o as k,y as u,b as d,e as r}from"./index-hDb1Lsb8.js";import{u as x}from"./providers-adQ6cb75.js";import{u as C}from"./speech-D3H5B80W.js";import{_ as B,a as L,b as V}from"./SpeechVoiceSettings.vue_vue_type_script_setup_true_lang-D0Yiu-Ma.js";import"./index-Be1NqeGb.js";import"./TestDummyMarker.vue_vue_type_script_setup_true_lang-DvXVr5Qy.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-UCuivhvU.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js";import"./Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-CHpN3yiY.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CYv3qJbi.js";const t="elevenlabs",m="eleven_multilingual_v2",q=y({__name:"elevenlabs",setup(P){const n={similarityBoost:.75,stability:.5,speed:1,style:0,useSpeakerBoost:!0},a=C(),s=x(),{providers:v}=S(s),f=i(()=>{var e;return!!((e=v.value[t])!=null&&e.apiKey)}),g=i(()=>a.availableVoices[t]||[]),h=i(()=>a.availableLanguages);async function _(e,l,p){const o=s.getProviderInstance(t);if(!o)throw new Error("Failed to initialize speech provider");const c=s.getProviderConfig(t),b=c.model||m;return await a.speech(o,b,e,l,{...c,...n})}return(e,l)=>(k(),w(r(V),{"provider-id":t,"default-model":m,"additional-settings":n},{"voice-settings":u(({voiceSettings:p,updateVoiceSettings:o})=>[d(r(L),{settings:p,"show-similarity-boost":!0,"show-stability":!0,"show-speed":!0,"show-style":!0,"show-speaker-boost":!0,onUpdate:o},null,8,["settings","onUpdate"])]),playground:u(()=>[d(r(B),{"available-voices":g.value,"available-languages":h.value,"generate-speech":_,"api-key-configured":f.value,"default-text":"Hello! This is a test of the ElevenLabs voice synthesis."},null,8,["available-voices","available-languages","api-key-configured"])]),_:1}))}});export{q as default}; diff --git a/assets/emotions-C1vttnju.js b/assets/emotions-CNzOYGQn.js similarity index 82% rename from assets/emotions-C1vttnju.js rename to assets/emotions-CNzOYGQn.js index 5c63cef805dc8e4ae979d1d1091bb9a46b70cb62..fdbbf3ab4967a6d756693f837de69798a2b99fdf 100644 --- a/assets/emotions-C1vttnju.js +++ b/assets/emotions-CNzOYGQn.js @@ -1 +1 @@ -import{a as _,_ as b,l as k}from"./queues-BATLkujj.js";import"./live2d-zip-loader-dDw0Wbbr.js";import{d as x,g as u,c as s,o as t,a as e,b as z,e as h,D as i,bx as f,by as m}from"./index-7-fr_lhT.js";import{u as w}from"./queue-B4R0QEYc.js";const y={flex:"","flex-col":"","gap-2":"","p-2":""},M={flex:"","flex-row":"","gap-2":""},V={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},E={"w-full":"",flex:"","flex-row":"","gap-4":""},Q={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},S={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},N=x({__name:"emotions",setup(B){const l=u(""),p=u([]),r=u([]),d=u(!1),g=w({handlers:[async a=>{r.value.push(a.data)}]}),c=_(g);function v(){d.value=!0;const a=l.value.split("");for(const o of a)c.add(o);c.add(k),l.value="",d.value=!1}return(a,o)=>(t(),s("div",y,[e("div",M,[z(h(b),{modelValue:l.value,"onUpdate:modelValue":o[0]||(o[0]=n=>l.value=n),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:v},null,8,["modelValue"]),e("button",V,i(d.value?"Processing...":"Send"),1)]),e("div",E,[e("div",Q,[o[1]||(o[1]=e("h3",{"font-semibold":""}," Messages ",-1)),(t(!0),s(f,null,m(p.value,n=>(t(),s("div",{key:n},[e("div",null,i(n),1)]))),128))]),e("div",S,[o[2]||(o[2]=e("h3",{"font-semibold":""}," Emotions ",-1)),(t(!0),s(f,null,m(r.value,n=>(t(),s("div",{key:n},[e("div",null,i(n),1)]))),128))])])]))}});export{N as default}; +import{a as _,_ as b,l as k}from"./queues-DEhcWTMJ.js";import"./live2d-zip-loader--bTGFeQd.js";import{d as x,g as u,c as s,o as t,a as e,b as z,e as h,D as i,bx as f,by as m}from"./index-hDb1Lsb8.js";import{u as w}from"./queue-c563jmhe.js";const y={flex:"","flex-col":"","gap-2":"","p-2":""},M={flex:"","flex-row":"","gap-2":""},V={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},E={"w-full":"",flex:"","flex-row":"","gap-4":""},Q={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},S={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},N=x({__name:"emotions",setup(B){const l=u(""),p=u([]),r=u([]),d=u(!1),g=w({handlers:[async a=>{r.value.push(a.data)}]}),c=_(g);function v(){d.value=!0;const a=l.value.split("");for(const o of a)c.add(o);c.add(k),l.value="",d.value=!1}return(a,o)=>(t(),s("div",y,[e("div",M,[z(h(b),{modelValue:l.value,"onUpdate:modelValue":o[0]||(o[0]=n=>l.value=n),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:v},null,8,["modelValue"]),e("button",V,i(d.value?"Processing...":"Send"),1)]),e("div",E,[e("div",Q,[o[1]||(o[1]=e("h3",{"font-semibold":""}," Messages ",-1)),(t(!0),s(f,null,m(p.value,n=>(t(),s("div",{key:n},[e("div",null,i(n),1)]))),128))]),e("div",S,[o[2]||(o[2]=e("h3",{"font-semibold":""}," Emotions ",-1)),(t(!0),s(f,null,m(r.value,n=>(t(),s("div",{key:n},[e("div",null,i(n),1)]))),128))])])]))}});export{N as default}; diff --git a/assets/featherless-ai-DYiNttaX.js b/assets/featherless-ai-BkPHXcRw.js similarity index 67% rename from assets/featherless-ai-DYiNttaX.js rename to assets/featherless-ai-BkPHXcRw.js index 13f24ee72612ef119d699821ba01bbcc00bf3688..11243af77718064bd47bcc336315718f85d1a991 100644 --- a/assets/featherless-ai-DYiNttaX.js +++ b/assets/featherless-ai-BkPHXcRw.js @@ -1 +1 @@ -import"./live2d-zip-loader-dDw0Wbbr.js";import{d as h,q as U,bG as V,s as y,h as v,l as $,w as k,x as K,o as w,y as p,b as l,e as t}from"./index-7-fr_lhT.js";import{u as x}from"./providers-B7zWTIWF.js";import{_ as z,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CUVIcbSL.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C3sxqbyi.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BCwQg86s.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BxRDV7Dm.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-D5rspuJc.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BNzPx9yx.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BhtqkEkU.js";import"./Input.vue_vue_type_script_setup_true_lang-58p3G1RX.js";const a="featherless-ai",J=h({__name:"featherless-ai",setup(B){const{t:d}=U(),_=V(),m=x(),{providers:o}=y(m),n=v(()=>m.getProviderMetadata(a)),i=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),r=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});$(()=>{var e,s;m.initializeProvider(a),i.value=((e=o.value[a])==null?void 0:e.apiKey)||"",r.value=((s=o.value[a])==null?void 0:s.baseUrl)||""}),k([i,r],()=>{o.value[a]={...o.value[a],apiKey:i.value,baseUrl:r.value||""}});function b(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,s)=>{var c,f;return w(),K(t(S),{"provider-name":(c=n.value)==null?void 0:c.localizedName,"provider-icon":(f=n.value)==null?void 0:f.icon,"on-back":()=>t(_).back()},{default:p(()=>[l(t(P),null,{default:p(()=>[l(t(R),{title:t(d)("settings.pages.providers.common.section.basic.title"),description:t(d)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:p(()=>{var u;return[l(t(N),{modelValue:i.value,"onUpdate:modelValue":s[0]||(s[0]=g=>i.value=g),"provider-name":(u=n.value)==null?void 0:u.localizedName,placeholder:"fw-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(z),{title:t(d)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[l(t(M),{modelValue:r.value,"onUpdate:modelValue":s[1]||(s[1]=u=>r.value=u),placeholder:"https://api.featherless.ai/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});export{J as default}; +import"./live2d-zip-loader--bTGFeQd.js";import{d as h,q as U,bG as V,s as y,h as v,l as $,w as k,x as K,o as w,y as p,b as l,e as t}from"./index-hDb1Lsb8.js";import{u as x}from"./providers-adQ6cb75.js";import{_ as z,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-UCuivhvU.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-CHpN3yiY.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CYv3qJbi.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTOfxlwP.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js";import"./Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js";const a="featherless-ai",J=h({__name:"featherless-ai",setup(B){const{t:d}=U(),_=V(),m=x(),{providers:o}=y(m),n=v(()=>m.getProviderMetadata(a)),i=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),r=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});$(()=>{var e,s;m.initializeProvider(a),i.value=((e=o.value[a])==null?void 0:e.apiKey)||"",r.value=((s=o.value[a])==null?void 0:s.baseUrl)||""}),k([i,r],()=>{o.value[a]={...o.value[a],apiKey:i.value,baseUrl:r.value||""}});function b(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,s)=>{var c,f;return w(),K(t(S),{"provider-name":(c=n.value)==null?void 0:c.localizedName,"provider-icon":(f=n.value)==null?void 0:f.icon,"on-back":()=>t(_).back()},{default:p(()=>[l(t(P),null,{default:p(()=>[l(t(R),{title:t(d)("settings.pages.providers.common.section.basic.title"),description:t(d)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:p(()=>{var u;return[l(t(N),{modelValue:i.value,"onUpdate:modelValue":s[0]||(s[0]=g=>i.value=g),"provider-name":(u=n.value)==null?void 0:u.localizedName,placeholder:"fw-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(z),{title:t(d)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[l(t(M),{modelValue:r.value,"onUpdate:modelValue":s[1]||(s[1]=u=>r.value=u),placeholder:"https://api.featherless.ai/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});export{J as default}; diff --git a/assets/filter-message-CRLogJIb.js b/assets/filter-message-Cd_Y2XAy.js similarity index 95% rename from assets/filter-message-CRLogJIb.js rename to assets/filter-message-Cd_Y2XAy.js index cbce8c81c15ba34e50c74936f30e460b0dada74b..ed8f6c07743ddf7795f0dc234c09ae70f386e5ad 100644 --- a/assets/filter-message-CRLogJIb.js +++ b/assets/filter-message-Cd_Y2XAy.js @@ -1 +1 @@ -import{d as g,g as u,r as m,c as v,o as _,a as s,b as x,D as d}from"./index-7-fr_lhT.js";const b={flex:"","flex-col":"","gap-2":"","p-2":""},S={flex:"","flex-row":"","gap-2":""},k={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},w={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},V=g({__name:"filter-message",setup(z){const o=u(""),c=u(!1),i=u({content:""});async function f(r){return new Promise(e=>setTimeout(e,r))}async function p(){c.value=!0;const r=o.value.split("");let e;(a=>{a.Literal="literal",a.Special="special"})(e||(e={}));let l="literal",t="";for(const a of r){await f(50);let n=l;a==="<"?n="special":a===">"&&(n="literal"),l==="literal"&&n==="special"&&(i.value.content+=t,t=""),l==="special"&&n==="literal"&&(t=""),l==="literal"&&n==="literal"&&(i.value.content+=a,t=""),l=n}t&&(i.value.content+=t),o.value="",c.value=!1}return(r,e)=>{const l=m("BasicTextarea");return _(),v("div",b,[s("div",S,[x(l,{modelValue:o.value,"onUpdate:modelValue":e[0]||(e[0]=t=>o.value=t),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:p},null,8,["modelValue"]),s("button",k,d(c.value?"Processing...":"Send"),1)]),s("div",w,[e[1]||(e[1]=s("h3",{"font-semibold":""}," Streaming Message ",-1)),s("div",null,d(i.value.content),1)])])}}});export{V as default}; +import{d as g,g as u,r as m,c as v,o as _,a as s,b as x,D as d}from"./index-hDb1Lsb8.js";const b={flex:"","flex-col":"","gap-2":"","p-2":""},S={flex:"","flex-row":"","gap-2":""},k={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},w={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},V=g({__name:"filter-message",setup(z){const o=u(""),c=u(!1),i=u({content:""});async function f(r){return new Promise(e=>setTimeout(e,r))}async function p(){c.value=!0;const r=o.value.split("");let e;(a=>{a.Literal="literal",a.Special="special"})(e||(e={}));let l="literal",t="";for(const a of r){await f(50);let n=l;a==="<"?n="special":a===">"&&(n="literal"),l==="literal"&&n==="special"&&(i.value.content+=t,t=""),l==="special"&&n==="literal"&&(t=""),l==="literal"&&n==="literal"&&(i.value.content+=a,t=""),l=n}t&&(i.value.content+=t),o.value="",c.value=!1}return(r,e)=>{const l=m("BasicTextarea");return _(),v("div",b,[s("div",S,[x(l,{modelValue:o.value,"onUpdate:modelValue":e[0]||(e[0]=t=>o.value=t),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:p},null,8,["modelValue"]),s("button",k,d(c.value?"Processing...":"Send"),1)]),s("div",w,[e[1]||(e[1]=s("h3",{"font-semibold":""}," Streaming Message ",-1)),s("div",null,d(i.value.content),1)])])}}});export{V as default}; diff --git a/assets/fireworks-ai-Brzqd047.js b/assets/fireworks-ai-DSa13ytv.js similarity index 67% rename from assets/fireworks-ai-Brzqd047.js rename to assets/fireworks-ai-DSa13ytv.js index a769877e7c15befc5e02ee901d2eefe3cde7aa78..d323e250a3e7e0cbc9be8cd2af55a2d78c0c1981 100644 --- a/assets/fireworks-ai-Brzqd047.js +++ b/assets/fireworks-ai-DSa13ytv.js @@ -1 +1 @@ -import"./live2d-zip-loader-dDw0Wbbr.js";import{d as k,q as w,bG as U,s as V,h as v,l as y,w as $,x as K,o as h,y as p,b as l,e as t}from"./index-7-fr_lhT.js";import{u as x}from"./providers-B7zWTIWF.js";import{_ as z,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CUVIcbSL.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C3sxqbyi.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BCwQg86s.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BxRDV7Dm.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-D5rspuJc.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BNzPx9yx.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BhtqkEkU.js";import"./Input.vue_vue_type_script_setup_true_lang-58p3G1RX.js";const a="fireworks-ai",J=k({__name:"fireworks-ai",setup(B){const{t:d}=w(),_=U(),m=x(),{providers:o}=V(m),n=v(()=>m.getProviderMetadata(a)),r=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),s=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});y(()=>{var e,i;m.initializeProvider(a),r.value=((e=o.value[a])==null?void 0:e.apiKey)||"",s.value=((i=o.value[a])==null?void 0:i.baseUrl)||""}),$([r,s],()=>{o.value[a]={...o.value[a],apiKey:r.value,baseUrl:s.value||""}});function b(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var c,f;return h(),K(t(S),{"provider-name":(c=n.value)==null?void 0:c.localizedName,"provider-icon":(f=n.value)==null?void 0:f.icon,"on-back":()=>t(_).back()},{default:p(()=>[l(t(P),null,{default:p(()=>[l(t(R),{title:t(d)("settings.pages.providers.common.section.basic.title"),description:t(d)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:p(()=>{var u;return[l(t(N),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=g=>r.value=g),"provider-name":(u=n.value)==null?void 0:u.localizedName,placeholder:"fw-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(z),{title:t(d)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[l(t(M),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=u=>s.value=u),placeholder:"https://api.fireworks.ai/inference/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});export{J as default}; +import"./live2d-zip-loader--bTGFeQd.js";import{d as k,q as w,bG as U,s as V,h as v,l as y,w as $,x as K,o as h,y as p,b as l,e as t}from"./index-hDb1Lsb8.js";import{u as x}from"./providers-adQ6cb75.js";import{_ as z,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-UCuivhvU.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-CHpN3yiY.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CYv3qJbi.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTOfxlwP.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js";import"./Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js";const a="fireworks-ai",J=k({__name:"fireworks-ai",setup(B){const{t:d}=w(),_=U(),m=x(),{providers:o}=V(m),n=v(()=>m.getProviderMetadata(a)),r=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),s=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});y(()=>{var e,i;m.initializeProvider(a),r.value=((e=o.value[a])==null?void 0:e.apiKey)||"",s.value=((i=o.value[a])==null?void 0:i.baseUrl)||""}),$([r,s],()=>{o.value[a]={...o.value[a],apiKey:r.value,baseUrl:s.value||""}});function b(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var c,f;return h(),K(t(S),{"provider-name":(c=n.value)==null?void 0:c.localizedName,"provider-icon":(f=n.value)==null?void 0:f.icon,"on-back":()=>t(_).back()},{default:p(()=>[l(t(P),null,{default:p(()=>[l(t(R),{title:t(d)("settings.pages.providers.common.section.basic.title"),description:t(d)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:p(()=>{var u;return[l(t(N),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=g=>r.value=g),"provider-name":(u=n.value)==null?void 0:u.localizedName,placeholder:"fw-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(z),{title:t(d)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[l(t(M),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=u=>s.value=u),placeholder:"https://api.fireworks.ai/inference/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});export{J as default}; diff --git a/assets/google-generative-ai-CG94KMvF.js b/assets/google-generative-ai-BrHwbhVt.js similarity index 71% rename from assets/google-generative-ai-CG94KMvF.js rename to assets/google-generative-ai-BrHwbhVt.js index 16d33d25e1c7a426d49d1aa14f3367eca3abddd3..c88192f51c8770f4532d2373ff367d518c97ec77 100644 --- a/assets/google-generative-ai-CG94KMvF.js +++ b/assets/google-generative-ai-BrHwbhVt.js @@ -1 +1 @@ -import"./live2d-zip-loader-dDw0Wbbr.js";import{d as h,q as U,bG as V,s as k,h as m,l as y,w as $,x as K,o as x,y as p,b as r,e as t}from"./index-7-fr_lhT.js";import{u as G}from"./providers-B7zWTIWF.js";import{_ as w,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CUVIcbSL.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C3sxqbyi.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BCwQg86s.js";import{_ as z}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BxRDV7Dm.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-D5rspuJc.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BNzPx9yx.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BhtqkEkU.js";import"./Input.vue_vue_type_script_setup_true_lang-58p3G1RX.js";const e="google-generative-ai",L=h({__name:"google-generative-ai",setup(B){const{t:u}=U(),f=V(),c=G(),{providers:a}=k(c),v=m(()=>c.getProviderMetadata(e)),s=m({get:()=>{var o;return((o=a.value[e])==null?void 0:o.apiKey)||""},set:o=>{a.value[e]||(a.value[e]={}),a.value[e].apiKey=o}}),l=m({get:()=>{var o;return((o=a.value[e])==null?void 0:o.baseUrl)||"https://generativelanguage.googleapis.com/v1beta/openai/"},set:o=>{a.value[e]||(a.value[e]={}),a.value[e].baseUrl=o}});y(()=>{var o,i;a.value[e]||(a.value[e]={baseUrl:"https://api.anthropic.com/v1/"}),s.value=((o=a.value[e])==null?void 0:o.apiKey)||"",l.value=((i=a.value[e])==null?void 0:i.baseUrl)||"https://generativelanguage.googleapis.com/v1beta/openai/"}),$([s,l],()=>{a.value[e]={...a.value[e],apiKey:s.value,baseUrl:l.value||"https://generativelanguage.googleapis.com/v1beta/openai/"}});function _(){a.value[e]={baseUrl:"https://generativelanguage.googleapis.com/v1beta/openai/"}}return(o,i)=>{var d,g;return x(),K(t(z),{"provider-name":((d=v.value)==null?void 0:d.localizedName)||"Google | Gemini","provider-icon":(g=v.value)==null?void 0:g.icon,"on-back":()=>t(f).back()},{default:p(()=>[r(t(R),null,{default:p(()=>[r(t(S),{title:t(u)("settings.pages.providers.common.section.basic.title"),description:t(u)("settings.pages.providers.common.section.basic.description"),"on-reset":_},{default:p(()=>{var n;return[r(t(N),{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=b=>s.value=b),"provider-name":((n=v.value)==null?void 0:n.localizedName)||"Google",placeholder:"sk-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),r(t(w),{title:t(u)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[r(t(M),{modelValue:l.value,"onUpdate:modelValue":i[1]||(i[1]=n=>l.value=n),placeholder:"https://generativelanguage.googleapis.com/v1beta/openai/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});export{L as default}; +import"./live2d-zip-loader--bTGFeQd.js";import{d as h,q as U,bG as V,s as k,h as m,l as y,w as $,x as K,o as x,y as p,b as r,e as t}from"./index-hDb1Lsb8.js";import{u as G}from"./providers-adQ6cb75.js";import{_ as w,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-UCuivhvU.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-CHpN3yiY.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CYv3qJbi.js";import{_ as z}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTOfxlwP.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js";import"./Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js";const e="google-generative-ai",L=h({__name:"google-generative-ai",setup(B){const{t:u}=U(),f=V(),c=G(),{providers:a}=k(c),v=m(()=>c.getProviderMetadata(e)),s=m({get:()=>{var o;return((o=a.value[e])==null?void 0:o.apiKey)||""},set:o=>{a.value[e]||(a.value[e]={}),a.value[e].apiKey=o}}),l=m({get:()=>{var o;return((o=a.value[e])==null?void 0:o.baseUrl)||"https://generativelanguage.googleapis.com/v1beta/openai/"},set:o=>{a.value[e]||(a.value[e]={}),a.value[e].baseUrl=o}});y(()=>{var o,i;a.value[e]||(a.value[e]={baseUrl:"https://api.anthropic.com/v1/"}),s.value=((o=a.value[e])==null?void 0:o.apiKey)||"",l.value=((i=a.value[e])==null?void 0:i.baseUrl)||"https://generativelanguage.googleapis.com/v1beta/openai/"}),$([s,l],()=>{a.value[e]={...a.value[e],apiKey:s.value,baseUrl:l.value||"https://generativelanguage.googleapis.com/v1beta/openai/"}});function _(){a.value[e]={baseUrl:"https://generativelanguage.googleapis.com/v1beta/openai/"}}return(o,i)=>{var d,g;return x(),K(t(z),{"provider-name":((d=v.value)==null?void 0:d.localizedName)||"Google | Gemini","provider-icon":(g=v.value)==null?void 0:g.icon,"on-back":()=>t(f).back()},{default:p(()=>[r(t(R),null,{default:p(()=>[r(t(S),{title:t(u)("settings.pages.providers.common.section.basic.title"),description:t(u)("settings.pages.providers.common.section.basic.description"),"on-reset":_},{default:p(()=>{var n;return[r(t(N),{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=b=>s.value=b),"provider-name":((n=v.value)==null?void 0:n.localizedName)||"Google",placeholder:"sk-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),r(t(w),{title:t(u)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[r(t(M),{modelValue:l.value,"onUpdate:modelValue":i[1]||(i[1]=n=>l.value=n),placeholder:"https://generativelanguage.googleapis.com/v1beta/openai/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});export{L as default}; diff --git a/assets/image-B_Hg7W96.js b/assets/image-jwIZU337.js similarity index 95% rename from assets/image-B_Hg7W96.js rename to assets/image-jwIZU337.js index cb7057781995480f34056fd7489a347079d4dab1..48dd303bed050e1055e2cc3b06381010c9f112ef 100644 --- a/assets/image-B_Hg7W96.js +++ b/assets/image-jwIZU337.js @@ -1,2 +1,2 @@ -import{d as _,g as c,bF as y,c as d,o as u,a,C as x,D as b,e as v,bn as w}from"./index-7-fr_lhT.js";const C={bg:"neutral-100",flex:"~ col","items-center":"","justify-center":"","rounded-lg":"","px-4":"","py-3":""},h={key:0},U=["src"],D={bg:"neutral-100",class:"text-wrap-any","max-h":"100","overflow-scroll":"","rounded-lg":"","text-wrap":"","text-black":"","font-mono":""},R=_({__name:"image",setup(k){const p=c(),n=c(""),{copy:g}=y({source:n});async function m(r){return new Promise((e,o)=>{const t=new FileReader;t.onload=s=>{var l,i;e(((i=(l=s.target)==null?void 0:l.result)==null?void 0:i.toString())||"")},t.onerror=s=>{o(s)},t.readAsDataURL(r)})}async function f(r){var t;const o=(t=r.target.files)==null?void 0:t[0];if(o){p.value=o;const s=await m(o);n.value=s}}return(r,e)=>(u(),d("div",null,[a("label",C,[a("input",{type:"file",accept:"image/*",hidden:"",onChange:f},null,32),e[1]||(e[1]=a("span",null,"Upload Image",-1))]),n.value?(u(),d("div",h,[a("img",{src:n.value,alt:"Uploaded Image","w-100":""},null,8,U),a("pre",D," "+b(n.value)+` +import{d as _,g as c,bF as y,c as d,o as u,a,C as x,D as b,e as v,bn as w}from"./index-hDb1Lsb8.js";const C={bg:"neutral-100",flex:"~ col","items-center":"","justify-center":"","rounded-lg":"","px-4":"","py-3":""},h={key:0},U=["src"],D={bg:"neutral-100",class:"text-wrap-any","max-h":"100","overflow-scroll":"","rounded-lg":"","text-wrap":"","text-black":"","font-mono":""},R=_({__name:"image",setup(k){const p=c(),n=c(""),{copy:g}=y({source:n});async function m(r){return new Promise((e,o)=>{const t=new FileReader;t.onload=s=>{var l,i;e(((i=(l=s.target)==null?void 0:l.result)==null?void 0:i.toString())||"")},t.onerror=s=>{o(s)},t.readAsDataURL(r)})}async function f(r){var t;const o=(t=r.target.files)==null?void 0:t[0];if(o){p.value=o;const s=await m(o);n.value=s}}return(r,e)=>(u(),d("div",null,[a("label",C,[a("input",{type:"file",accept:"image/*",hidden:"",onChange:f},null,32),e[1]||(e[1]=a("span",null,"Upload Image",-1))]),n.value?(u(),d("div",h,[a("img",{src:n.value,alt:"Uploaded Image","w-100":""},null,8,U),a("pre",D," "+b(n.value)+` `,1),a("button",{bg:"primary-500",text:"white","mt-4":"","rounded-lg":"","px-4":"","py-2":"",onClick:e[0]||(e[0]=()=>v(g)())}," Copy Data URL ")])):x("",!0)]))}}),B=w(R,[["__scopeId","data-v-7edd53e6"]]);export{B as default}; diff --git a/assets/index-CLIXS4H9.js b/assets/index-B1onYnuF.js similarity index 86% rename from assets/index-CLIXS4H9.js rename to assets/index-B1onYnuF.js index cf949271e1177cca9eaa55891b1aed8dc3b2a2bc..196700b81e1cba429afac96755c7ee0a64dce10c 100644 --- a/assets/index-CLIXS4H9.js +++ b/assets/index-B1onYnuF.js @@ -1 +1 @@ -import{_ as w}from"./IconAnimation.vue_vue_type_script_setup_true_lang-Djn5fd3P.js";import"./live2d-zip-loader-dDw0Wbbr.js";import{d as S,q as h,bG as z,s as A,v as C,bw as D,c as s,o as n,A as l,a as o,x as d,C as u,e,D as m,bx as p,by as B}from"./index-7-fr_lhT.js";import{u as N}from"./providers-B7zWTIWF.js";import{I as P}from"./IconStatusItem-CtYOABTk.js";import{u as $}from"./useIconAnimation-BqW7zFiT.js";import{b as f}from"./route-block-B_A1xBdJ.js";import"./index-Be1NqeGb.js";const R={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},T={relative:""},V={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},q={text:"neutral-300 dark:neutral-500","text-nowrap":""},E={"text-nowrap":"","text-3xl":"","font-semibold":""},F={grid:"~ cols-2 gap-4"},G={key:1,text:"neutral-200/50 dark:neutral-500/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},L=S({__name:"index",setup(M){const{t:a}=h(),x=z(),_=N(),{allProvidersMetadata:g}=A(_),v=C(),{iconAnimationStarted:y,showIconAnimation:b,animationIcon:k}=$("i-lucide:brain");return(j,i)=>{const I=w,r=D("motion");return n(),s(p,null,[l((n(),s("div",R,[o("button",{onClick:i[0]||(i[0]=t=>e(x).back())},i[1]||(i[1]=[o("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),o("h1",T,[o("div",V,[o("span",q,m(e(a)("settings.title")),1)]),o("div",E,m(e(a)("settings.pages.providers.title")),1)])])),[[r]]),o("div",F,[(n(!0),s(p,null,B(e(g),(t,c)=>l((n(),d(e(P),{key:t.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+c*10,delay:c*50,title:t.localizedName,description:t.localizedDescription,icon:t.icon,"icon-color":t.iconColor,"icon-image":t.iconImage,to:`/settings/providers/${t.id}`,configured:t.configured},null,8,["duration","delay","title","description","icon","icon-color","icon-image","to","configured"])),[[r]])),128))]),e(b)?(n(),d(I,{key:0,"z-index":-1,icon:e(k),"icon-size":12,duration:1e3,started:e(y),"is-reverse":!0,position:"calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)","text-color":"text-neutral-200/50 dark:text-neutral-600/20"},null,8,["icon","started"])):u("",!0),e(v).usePageSpecificTransitions?u("",!0):(n(),s("div",G,i[2]||(i[2]=[o("div",{text:"40","i-lucide:brain":""},null,-1)])))],64)}}});typeof f=="function"&&f(L);export{L as default}; +import{_ as w}from"./IconAnimation.vue_vue_type_script_setup_true_lang-B0Tznm9Y.js";import"./live2d-zip-loader--bTGFeQd.js";import{d as S,q as h,bG as z,s as A,v as C,bw as D,c as s,o as n,A as l,a as o,x as d,C as u,e,D as m,bx as p,by as B}from"./index-hDb1Lsb8.js";import{u as N}from"./providers-adQ6cb75.js";import{I as P}from"./IconStatusItem-B-kn6UCa.js";import{u as $}from"./useIconAnimation-DVKfiTTG.js";import{b as f}from"./route-block-B_A1xBdJ.js";import"./index-Be1NqeGb.js";const R={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},T={relative:""},V={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},q={text:"neutral-300 dark:neutral-500","text-nowrap":""},E={"text-nowrap":"","text-3xl":"","font-semibold":""},F={grid:"~ cols-2 gap-4"},G={key:1,text:"neutral-200/50 dark:neutral-500/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},L=S({__name:"index",setup(M){const{t:a}=h(),x=z(),_=N(),{allProvidersMetadata:g}=A(_),v=C(),{iconAnimationStarted:y,showIconAnimation:b,animationIcon:k}=$("i-lucide:brain");return(j,i)=>{const I=w,r=D("motion");return n(),s(p,null,[l((n(),s("div",R,[o("button",{onClick:i[0]||(i[0]=t=>e(x).back())},i[1]||(i[1]=[o("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),o("h1",T,[o("div",V,[o("span",q,m(e(a)("settings.title")),1)]),o("div",E,m(e(a)("settings.pages.providers.title")),1)])])),[[r]]),o("div",F,[(n(!0),s(p,null,B(e(g),(t,c)=>l((n(),d(e(P),{key:t.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+c*10,delay:c*50,title:t.localizedName,description:t.localizedDescription,icon:t.icon,"icon-color":t.iconColor,"icon-image":t.iconImage,to:`/settings/providers/${t.id}`,configured:t.configured},null,8,["duration","delay","title","description","icon","icon-color","icon-image","to","configured"])),[[r]])),128))]),e(b)?(n(),d(I,{key:0,"z-index":-1,icon:e(k),"icon-size":12,duration:1e3,started:e(y),"is-reverse":!0,position:"calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)","text-color":"text-neutral-200/50 dark:text-neutral-600/20"},null,8,["icon","started"])):u("",!0),e(v).usePageSpecificTransitions?u("",!0):(n(),s("div",G,i[2]||(i[2]=[o("div",{text:"40","i-lucide:brain":""},null,-1)])))],64)}}});typeof f=="function"&&f(L);export{L as default}; diff --git a/assets/index-bGU7kv-p.js b/assets/index-BKcXwYga.js similarity index 92% rename from assets/index-bGU7kv-p.js rename to assets/index-BKcXwYga.js index 4fa7bc912837fbce9f0f240249fe0fe1370a92a4..d7b020a42191bbcf802f3277af3dfee06d5f2c99 100644 --- a/assets/index-bGU7kv-p.js +++ b/assets/index-BKcXwYga.js @@ -1 +1 @@ -import{d as R,bG as G,q as H,s as Q,g as c,h,bw as K,c as v,o as m,A as C,a as t,b as N,e as s,D as l,bE as P,bH as W,z as X,C as y,bx as z,by as Y,x as Z}from"./index-7-fr_lhT.js";import{u as ee}from"./airi-card-DAWA4eQ5.js";import{_ as te}from"./CardDetailDialog.vue_vue_type_script_setup_true_lang-DT-C_SEQ.js";import{_ as re}from"./CardListItem.vue_vue_type_script_setup_true_lang-DLIJmqLz.js";import{_ as ae}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-G_NEmoXi.js";import{b as E}from"./route-block-B_A1xBdJ.js";import"./live2d-zip-loader-dDw0Wbbr.js";import"./consciousness-C4xyvmr3.js";import"./providers-B7zWTIWF.js";import"./index-Be1NqeGb.js";import"./speech-DK9my_xu.js";import"./index-ZfK3fTHt.js";const se={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},oe={relative:""},ne={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},le={text:"neutral-300 dark:neutral-500","text-nowrap":""},ie={"text-nowrap":"","text-3xl":"","font-semibold":""},de={"rounded-xl":"","p-4":"",flex:"~ col gap-4"},ue={flex:"~ row","flex-wrap":"","items-center":"","justify-between":"","gap-4":""},ce={class:"relative min-w-[200px] flex-1","inline-flex":"~","w-full":"","items-center":""},me=["placeholder"],pe={class:"flex items-center gap-2"},ve={"text-sm":"","text-neutral-500":"","dark:text-neutral-400":""},fe={value:"nameAsc"},xe={value:"nameDesc"},ge={value:"recent"},be={"font-medium":"",text:"center neutral-600 dark:neutral-300"},_e={text:"center neutral-500 dark:neutral-400","mt-2":"","text-sm":""},ye={key:0,class:"bg-primary-100/80 border-primary-400 dark:bg-primary-900/80 dark:border-primary-600 absolute inset-0 flex items-center justify-center border-2 rounded-xl"},ke={class:"text-center"},he={"font-medium":"",text:"primary-600 dark:primary-300"},Ce={key:1,class:"col-span-full rounded-xl p-8 text-center",border:"~ neutral-200/50 dark:neutral-700/30",bg:"neutral-50/50 dark:neutral-900/50"},we={key:2,class:"col-span-full flex items-center gap-3 border-2 border-amber-200 rounded-xl bg-amber-50/80 p-4 dark:border-amber-800 dark:bg-amber-900/30"},De={class:"flex flex-col"},Ve={class:"font-medium"},Se={class:"text-sm text-amber-600 dark:text-amber-400"},Ae=R({__name:"index",setup($e){const U=G(),{t:n}=H(),k=ee(),{addCard:j,removeCard:B}=k,{cards:p,activeCardId:w}=Q(k),b=c(""),f=c(!1),x=c(""),g=c("nameAsc"),I=c(!1),D=h(()=>Array.from(p.value.entries()).map(([a,e])=>({id:a,name:e.name,description:e.description}))),L=h(()=>{if(!x.value)return D.value;const a=x.value.toLowerCase();return D.value.filter(e=>e.name.toLowerCase().includes(a)||e.description&&e.description.toLowerCase().includes(a))}),V=h(()=>{const a=[...L.value];return g.value==="nameAsc"?a.sort((e,o)=>e.name.localeCompare(o.name)):g.value==="nameDesc"?a.sort((e,o)=>o.name.localeCompare(e.name)):g.value==="recent"?a.sort((e,o)=>o.id.localeCompare(e.id)):a}),_=c(!1),d=c(null);function O(){d.value&&(B(d.value),d.value=null,_.value=!1)}function q(a){d.value=a,_.value=!0}async function M(){const a=document.createElement("input");a.type="file",a.accept=".json",a.onchange=async e=>{var i;const o=(i=e.target.files)==null?void 0:i[0];if(o)try{const r=await o.text(),u=JSON.parse(r);b.value=j(u),f.value=!0}catch(r){console.error("Error processing card file:",r)}},a.click()}function T(a){b.value=a,f.value=!0}function F(a){w.value=a}function J(a){const e=p.value.get(a);return(e==null?void 0:e.version)||"1.0.0"}function S(a,e){var r,u,A,$;const o=p.value.get(a);if(!o||!((u=(r=o.extensions)==null?void 0:r.airi)!=null&&u.modules))return"default";const i=o.extensions.airi.modules;return e==="consciousness"?(A=i.consciousness)!=null&&A.model&&i.consciousness.model.split("-").pop()||"default":e==="voice"&&(($=i.speech)==null?void 0:$.voice_id)||"default"}return(a,e)=>{var i;const o=K("motion");return m(),v(z,null,[C((m(),v("div",se,[t("button",{onClick:e[0]||(e[0]=r=>s(U).back())},e[6]||(e[6]=[t("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),t("h1",oe,[t("div",ne,[t("span",le,l(s(n)("settings.title")),1)]),t("div",ie,l(s(n)("settings.pages.card.title")),1)])])),[[o]]),t("div",de,[t("div",ue,[t("div",ce,[e[7]||(e[7]=t("div",{class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},[t("div",{"i-solar:magnifer-line-duotone":"",class:"text-neutral-500 dark:text-neutral-400"})],-1)),C(t("input",{"onUpdate:modelValue":e[1]||(e[1]=r=>x.value=r),type:"search",class:"w-full rounded-xl p-2.5 pl-10 text-sm outline-none",border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",bg:"white dark:neutral-900",placeholder:s(n)("settings.pages.card.search")},null,8,me),[[P,x.value]])]),t("div",pe,[t("div",ve,l(s(n)("settings.pages.card.sort_by"))+": ",1),C(t("select",{"onUpdate:modelValue":e[2]||(e[2]=r=>g.value=r),class:"rounded-lg p-1.5 text-sm outline-none",border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",bg:"white dark:neutral-900"},[t("option",fe,l(s(n)("settings.pages.card.name_asc")),1),t("option",xe,l(s(n)("settings.pages.card.name_desc")),1),t("option",ge,l(s(n)("settings.pages.card.recent")),1)],512),[[W,g.value]])])]),t("div",{class:X(["mt-4",{"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4 grid-auto-rows-[minmax(min-content,max-content)] grid-auto-flow-dense sm:grid-cols-[repeat(auto-fill,minmax(240px,1fr))] sm:gap-5 md:grid-cols-[repeat(auto-fill,minmax(220px,1fr))] lg:grid-cols-[repeat(auto-fill,minmax(250px,1fr))]":s(p).size>0}])},[t("div",{class:"relative min-h-[120px] flex flex-col cursor-pointer items-center justify-center border-2 rounded-xl border-dashed p-6 transition-all duration-300",border:"neutral-200 dark:neutral-700 hover:primary-300 dark:hover:primary-700",bg:"white/60 dark:black/30 hover:white/80 dark:hover:black/40",style:{transform:"scale(0.98)",opacity:.95},hover:"scale-100 opacity-100 shadow-md dark:shadow-xl",onClick:M},[e[9]||(e[9]=t("div",{"i-solar:upload-square-line-duotone":"","mb-4":"","text-5xl":"",text:"neutral-400 dark:neutral-500"},null,-1)),t("p",be,l(s(n)("settings.pages.card.upload")),1),t("p",_e,l(s(n)("settings.pages.card.upload_desc")),1),I.value?(m(),v("div",ye,[t("div",ke,[e[8]||(e[8]=t("div",{"i-solar:upload-minimalistic-bold":"",class:"dark:text-primary-400 text-primary-500 mb-2 text-5xl"},null,-1)),t("p",he,l(s(n)("settings.pages.card.drop_here")),1)])])):y("",!0)]),s(p).size>0?(m(!0),v(z,{key:0},Y(V.value,r=>(m(),Z(re,{id:r.id,key:r.id,name:r.name,description:r.description,"is-active":r.id===s(w),"is-selected":r.id===b.value&&f.value,version:J(r.id),"consciousness-model":S(r.id,"consciousness"),"voice-model":S(r.id,"voice"),onSelect:u=>T(r.id),onActivate:u=>F(r.id),onDelete:u=>q(r.id)},null,8,["id","name","description","is-active","is-selected","version","consciousness-model","voice-model","onSelect","onActivate","onDelete"]))),128)):y("",!0),s(p).size===0?(m(),v("div",Ce,[e[10]||(e[10]=t("div",{"i-solar:card-search-broken":"","mx-auto":"","mb-3":"","text-6xl":"","text-neutral-400":""},null,-1)),t("p",null,l(s(n)("settings.pages.card.no_cards")),1)])):y("",!0),x.value&&V.value.length===0?(m(),v("div",we,[e[11]||(e[11]=t("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),t("div",De,[t("span",Ve,l(s(n)("settings.pages.card.no_results")),1),t("span",Se,l(s(n)("settings.pages.card.try_different_search")),1)])])):y("",!0)],2)]),N(ae,{modelValue:_.value,"onUpdate:modelValue":e[3]||(e[3]=r=>_.value=r),"card-name":d.value?(i=s(k).getCard(d.value))==null?void 0:i.name:"",onConfirm:O,onCancel:e[4]||(e[4]=r=>d.value=null)},null,8,["modelValue","card-name"]),N(te,{modelValue:f.value,"onUpdate:modelValue":e[5]||(e[5]=r=>f.value=r),"card-id":b.value},null,8,["modelValue","card-id"]),e[12]||(e[12]=t("div",{text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},[t("div",{text:"40","i-lucide:id-card":""})],-1))],64)}}});typeof E=="function"&&E(Ae);export{Ae as default}; +import{d as R,bG as G,q as H,s as Q,g as c,h,bw as K,c as v,o as m,A as C,a as t,b as N,e as s,D as l,bE as P,bH as W,z as X,C as y,bx as z,by as Y,x as Z}from"./index-hDb1Lsb8.js";import{u as ee}from"./airi-card-CbqBsbSf.js";import{_ as te}from"./CardDetailDialog.vue_vue_type_script_setup_true_lang-XVLQKu9_.js";import{_ as re}from"./CardListItem.vue_vue_type_script_setup_true_lang-B6mmFgyk.js";import{_ as ae}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-44xxChqC.js";import{b as E}from"./route-block-B_A1xBdJ.js";import"./live2d-zip-loader--bTGFeQd.js";import"./consciousness-BRdkM-c-.js";import"./providers-adQ6cb75.js";import"./index-Be1NqeGb.js";import"./speech-D3H5B80W.js";import"./index-CborASRd.js";const se={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},oe={relative:""},ne={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},le={text:"neutral-300 dark:neutral-500","text-nowrap":""},ie={"text-nowrap":"","text-3xl":"","font-semibold":""},de={"rounded-xl":"","p-4":"",flex:"~ col gap-4"},ue={flex:"~ row","flex-wrap":"","items-center":"","justify-between":"","gap-4":""},ce={class:"relative min-w-[200px] flex-1","inline-flex":"~","w-full":"","items-center":""},me=["placeholder"],pe={class:"flex items-center gap-2"},ve={"text-sm":"","text-neutral-500":"","dark:text-neutral-400":""},fe={value:"nameAsc"},xe={value:"nameDesc"},ge={value:"recent"},be={"font-medium":"",text:"center neutral-600 dark:neutral-300"},_e={text:"center neutral-500 dark:neutral-400","mt-2":"","text-sm":""},ye={key:0,class:"bg-primary-100/80 border-primary-400 dark:bg-primary-900/80 dark:border-primary-600 absolute inset-0 flex items-center justify-center border-2 rounded-xl"},ke={class:"text-center"},he={"font-medium":"",text:"primary-600 dark:primary-300"},Ce={key:1,class:"col-span-full rounded-xl p-8 text-center",border:"~ neutral-200/50 dark:neutral-700/30",bg:"neutral-50/50 dark:neutral-900/50"},we={key:2,class:"col-span-full flex items-center gap-3 border-2 border-amber-200 rounded-xl bg-amber-50/80 p-4 dark:border-amber-800 dark:bg-amber-900/30"},De={class:"flex flex-col"},Ve={class:"font-medium"},Se={class:"text-sm text-amber-600 dark:text-amber-400"},Ae=R({__name:"index",setup($e){const U=G(),{t:n}=H(),k=ee(),{addCard:j,removeCard:B}=k,{cards:p,activeCardId:w}=Q(k),b=c(""),f=c(!1),x=c(""),g=c("nameAsc"),I=c(!1),D=h(()=>Array.from(p.value.entries()).map(([a,e])=>({id:a,name:e.name,description:e.description}))),L=h(()=>{if(!x.value)return D.value;const a=x.value.toLowerCase();return D.value.filter(e=>e.name.toLowerCase().includes(a)||e.description&&e.description.toLowerCase().includes(a))}),V=h(()=>{const a=[...L.value];return g.value==="nameAsc"?a.sort((e,o)=>e.name.localeCompare(o.name)):g.value==="nameDesc"?a.sort((e,o)=>o.name.localeCompare(e.name)):g.value==="recent"?a.sort((e,o)=>o.id.localeCompare(e.id)):a}),_=c(!1),d=c(null);function O(){d.value&&(B(d.value),d.value=null,_.value=!1)}function q(a){d.value=a,_.value=!0}async function M(){const a=document.createElement("input");a.type="file",a.accept=".json",a.onchange=async e=>{var i;const o=(i=e.target.files)==null?void 0:i[0];if(o)try{const r=await o.text(),u=JSON.parse(r);b.value=j(u),f.value=!0}catch(r){console.error("Error processing card file:",r)}},a.click()}function T(a){b.value=a,f.value=!0}function F(a){w.value=a}function J(a){const e=p.value.get(a);return(e==null?void 0:e.version)||"1.0.0"}function S(a,e){var r,u,A,$;const o=p.value.get(a);if(!o||!((u=(r=o.extensions)==null?void 0:r.airi)!=null&&u.modules))return"default";const i=o.extensions.airi.modules;return e==="consciousness"?(A=i.consciousness)!=null&&A.model&&i.consciousness.model.split("-").pop()||"default":e==="voice"&&(($=i.speech)==null?void 0:$.voice_id)||"default"}return(a,e)=>{var i;const o=K("motion");return m(),v(z,null,[C((m(),v("div",se,[t("button",{onClick:e[0]||(e[0]=r=>s(U).back())},e[6]||(e[6]=[t("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),t("h1",oe,[t("div",ne,[t("span",le,l(s(n)("settings.title")),1)]),t("div",ie,l(s(n)("settings.pages.card.title")),1)])])),[[o]]),t("div",de,[t("div",ue,[t("div",ce,[e[7]||(e[7]=t("div",{class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},[t("div",{"i-solar:magnifer-line-duotone":"",class:"text-neutral-500 dark:text-neutral-400"})],-1)),C(t("input",{"onUpdate:modelValue":e[1]||(e[1]=r=>x.value=r),type:"search",class:"w-full rounded-xl p-2.5 pl-10 text-sm outline-none",border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",bg:"white dark:neutral-900",placeholder:s(n)("settings.pages.card.search")},null,8,me),[[P,x.value]])]),t("div",pe,[t("div",ve,l(s(n)("settings.pages.card.sort_by"))+": ",1),C(t("select",{"onUpdate:modelValue":e[2]||(e[2]=r=>g.value=r),class:"rounded-lg p-1.5 text-sm outline-none",border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",bg:"white dark:neutral-900"},[t("option",fe,l(s(n)("settings.pages.card.name_asc")),1),t("option",xe,l(s(n)("settings.pages.card.name_desc")),1),t("option",ge,l(s(n)("settings.pages.card.recent")),1)],512),[[W,g.value]])])]),t("div",{class:X(["mt-4",{"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4 grid-auto-rows-[minmax(min-content,max-content)] grid-auto-flow-dense sm:grid-cols-[repeat(auto-fill,minmax(240px,1fr))] sm:gap-5 md:grid-cols-[repeat(auto-fill,minmax(220px,1fr))] lg:grid-cols-[repeat(auto-fill,minmax(250px,1fr))]":s(p).size>0}])},[t("div",{class:"relative min-h-[120px] flex flex-col cursor-pointer items-center justify-center border-2 rounded-xl border-dashed p-6 transition-all duration-300",border:"neutral-200 dark:neutral-700 hover:primary-300 dark:hover:primary-700",bg:"white/60 dark:black/30 hover:white/80 dark:hover:black/40",style:{transform:"scale(0.98)",opacity:.95},hover:"scale-100 opacity-100 shadow-md dark:shadow-xl",onClick:M},[e[9]||(e[9]=t("div",{"i-solar:upload-square-line-duotone":"","mb-4":"","text-5xl":"",text:"neutral-400 dark:neutral-500"},null,-1)),t("p",be,l(s(n)("settings.pages.card.upload")),1),t("p",_e,l(s(n)("settings.pages.card.upload_desc")),1),I.value?(m(),v("div",ye,[t("div",ke,[e[8]||(e[8]=t("div",{"i-solar:upload-minimalistic-bold":"",class:"dark:text-primary-400 text-primary-500 mb-2 text-5xl"},null,-1)),t("p",he,l(s(n)("settings.pages.card.drop_here")),1)])])):y("",!0)]),s(p).size>0?(m(!0),v(z,{key:0},Y(V.value,r=>(m(),Z(re,{id:r.id,key:r.id,name:r.name,description:r.description,"is-active":r.id===s(w),"is-selected":r.id===b.value&&f.value,version:J(r.id),"consciousness-model":S(r.id,"consciousness"),"voice-model":S(r.id,"voice"),onSelect:u=>T(r.id),onActivate:u=>F(r.id),onDelete:u=>q(r.id)},null,8,["id","name","description","is-active","is-selected","version","consciousness-model","voice-model","onSelect","onActivate","onDelete"]))),128)):y("",!0),s(p).size===0?(m(),v("div",Ce,[e[10]||(e[10]=t("div",{"i-solar:card-search-broken":"","mx-auto":"","mb-3":"","text-6xl":"","text-neutral-400":""},null,-1)),t("p",null,l(s(n)("settings.pages.card.no_cards")),1)])):y("",!0),x.value&&V.value.length===0?(m(),v("div",we,[e[11]||(e[11]=t("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),t("div",De,[t("span",Ve,l(s(n)("settings.pages.card.no_results")),1),t("span",Se,l(s(n)("settings.pages.card.try_different_search")),1)])])):y("",!0)],2)]),N(ae,{modelValue:_.value,"onUpdate:modelValue":e[3]||(e[3]=r=>_.value=r),"card-name":d.value?(i=s(k).getCard(d.value))==null?void 0:i.name:"",onConfirm:O,onCancel:e[4]||(e[4]=r=>d.value=null)},null,8,["modelValue","card-name"]),N(te,{modelValue:f.value,"onUpdate:modelValue":e[5]||(e[5]=r=>f.value=r),"card-id":b.value},null,8,["modelValue","card-id"]),e[12]||(e[12]=t("div",{text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},[t("div",{text:"40","i-lucide:id-card":""})],-1))],64)}}});typeof E=="function"&&E(Ae);export{Ae as default}; diff --git a/assets/index-CJycCKU5.js b/assets/index-BNcJmkAi.js similarity index 99% rename from assets/index-CJycCKU5.js rename to assets/index-BNcJmkAi.js index d3c1a4c45151eec1912f64b76fea17e9f6d2fa2e..7aab72becf2bd52c9190234a39e927f80f0c2568 100644 --- a/assets/index-CJycCKU5.js +++ b/assets/index-BNcJmkAi.js @@ -1,4 +1,4 @@ -import{cq as getAugmentedNamespace}from"./index-7-fr_lhT.js";var dist={},ortWeb_min={exports:{}};const backends={},backendsSortedByPriority=[],registerBackend=(D,u,b)=>{if(u&&typeof u.init=="function"&&typeof u.createSessionHandler=="function"){const g=backends[D];if(g===void 0)backends[D]={backend:u,priority:b};else{if(g.priority>b)return;if(g.priority===b&&g.backend!==u)throw new Error(`cannot register backend "${D}" using priority ${b}`)}if(b>=0){const p=backendsSortedByPriority.indexOf(D);p!==-1&&backendsSortedByPriority.splice(p,1);for(let h=0;h{const u=D.length===0?backendsSortedByPriority:D,b=[];for(const g of u){const p=backends[g];if(p){if(p.initialized)return p.backend;if(p.aborted)continue;const h=!!p.initPromise;try{return h||(p.initPromise=p.backend.init()),await p.initPromise,p.initialized=!0,p.backend}catch(o){h||b.push({name:g,err:o}),p.aborted=!0}finally{delete p.initPromise}}}throw new Error(`no available backend found. ERR: ${b.map(g=>`[${g.name}] ${g.err}`).join(", ")}`)};class EnvImpl{constructor(){this.wasm={},this.webgl={},this.logLevelInternal="warning"}set logLevel(u){if(u!==void 0){if(typeof u!="string"||["verbose","info","warning","error","fatal"].indexOf(u)===-1)throw new Error(`Unsupported logging level: ${u}`);this.logLevelInternal=u}}get logLevel(){return this.logLevelInternal}}const env=new EnvImpl,isBigInt64ArrayAvailable=typeof BigInt64Array<"u"&&typeof BigInt64Array.from=="function",isBigUint64ArrayAvailable=typeof BigUint64Array<"u"&&typeof BigUint64Array.from=="function",NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP=new Map([["float32",Float32Array],["uint8",Uint8Array],["int8",Int8Array],["uint16",Uint16Array],["int16",Int16Array],["int32",Int32Array],["bool",Uint8Array],["float64",Float64Array],["uint32",Uint32Array]]),NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP=new Map([[Float32Array,"float32"],[Uint8Array,"uint8"],[Int8Array,"int8"],[Uint16Array,"uint16"],[Int16Array,"int16"],[Int32Array,"int32"],[Float64Array,"float64"],[Uint32Array,"uint32"]]);isBigInt64ArrayAvailable&&(NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP.set("int64",BigInt64Array),NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP.set(BigInt64Array,"int64"));isBigUint64ArrayAvailable&&(NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP.set("uint64",BigUint64Array),NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP.set(BigUint64Array,"uint64"));const calculateSize=D=>{let u=1;for(let b=0;b{const t=document.createElement("canvas"),e=t.getContext("2d");if(!u||!e)return i();const n=new Image;n.crossOrigin="Anonymous",n.src=u,n.onload=()=>{t.width=n.width,t.height=n.height,e.drawImage(n,0,0,t.width,t.height);const r=e.getImageData(0,0,t.width,t.height);if(b!==void 0){if(b.height!==void 0&&b.height!==t.height)throw new Error("Image input config height doesn't match ImageBitmap height");if(f.height=t.height,b.width!==void 0&&b.width!==t.width)throw new Error("Image input config width doesn't match ImageBitmap width");f.width=t.width}else f.height=t.height,f.width=t.width;s(at.bufferToTensor(r.data,f))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(c!==void 0)return at.bufferToTensor(c,f);throw new Error("Input data provided is not supported - aborted tensor creation")}toImageData(u){var b,g;const p=document.createElement("canvas").getContext("2d");let h;if(p!=null){const o=this.dims[3],c=this.dims[2],f=this.dims[1],s=u!==void 0&&u.format!==void 0?u.format:"RGB",i=u!==void 0&&((b=u.norm)===null||b===void 0?void 0:b.mean)!==void 0?u.norm.mean:255,t=u!==void 0&&((g=u.norm)===null||g===void 0?void 0:g.bias)!==void 0?u.norm.bias:0,e=c*o;if(u!==void 0){if(u.height!==void 0&&u.height!==c)throw new Error("Image output config height doesn't match tensor height");if(u.width!==void 0&&u.width!==o)throw new Error("Image output config width doesn't match tensor width");if(u.format!==void 0&&f===4&&u.format!=="RGBA"||f===3&&u.format!=="RGB"&&u.format!=="BGR")throw new Error("Tensor format doesn't match input tensor dims")}const n=4;let r=0,a=1,l=2,d=3,m=0,y=e,v=e*2,_=-1;s==="RGBA"?(m=0,y=e,v=e*2,_=e*3):s==="RGB"?(m=0,y=e,v=e*2):s==="RBG"&&(m=0,v=e,y=e*2),h=p.createImageData(o,c);for(let T=0;T"u")throw new Error(`input '${s}' is missing in 'feeds'.`);if(o)for(const s of this.outputNames)p[s]=null;const c=await this.handler.run(u,p,h),f={};for(const s in c)Object.hasOwnProperty.call(c,s)&&(f[s]=new Tensor(c[s].type,c[s].data,c[s].dims));return f}static async create(u,b,g,p){let h,o={};if(typeof u=="string"){if(h=u,typeof b=="object"&&b!==null)o=b;else if(typeof b<"u")throw new TypeError("'options' must be an object.")}else if(u instanceof Uint8Array){if(h=u,typeof b=="object"&&b!==null)o=b;else if(typeof b<"u")throw new TypeError("'options' must be an object.")}else if(u instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&u instanceof SharedArrayBuffer){const t=u;let e=0,n=u.byteLength;if(typeof b=="object"&&b!==null)o=b;else if(typeof b=="number"){if(e=b,!Number.isSafeInteger(e))throw new RangeError("'byteOffset' must be an integer.");if(e<0||e>=t.byteLength)throw new RangeError(`'byteOffset' is out of range [0, ${t.byteLength}).`);if(n=u.byteLength-e,typeof g=="number"){if(n=g,!Number.isSafeInteger(n))throw new RangeError("'byteLength' must be an integer.");if(n<=0||e+n>t.byteLength)throw new RangeError(`'byteLength' is out of range (0, ${t.byteLength-e}].`);if(typeof p=="object"&&p!==null)o=p;else if(typeof p<"u")throw new TypeError("'options' must be an object.")}else if(typeof g<"u")throw new TypeError("'byteLength' must be a number.")}else if(typeof b<"u")throw new TypeError("'options' must be an object.");h=new Uint8Array(t,e,n)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");const f=(o.executionProviders||[]).map(t=>typeof t=="string"?t:t.name),i=await(await resolveBackend(f)).createSessionHandler(h,o);return new cn(i)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}};const InferenceSession=InferenceSession$1,lib=Object.freeze(Object.defineProperty({__proto__:null,InferenceSession,Tensor,env,registerBackend},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(lib);/*! +import{cq as getAugmentedNamespace}from"./index-hDb1Lsb8.js";var dist={},ortWeb_min={exports:{}};const backends={},backendsSortedByPriority=[],registerBackend=(D,u,b)=>{if(u&&typeof u.init=="function"&&typeof u.createSessionHandler=="function"){const g=backends[D];if(g===void 0)backends[D]={backend:u,priority:b};else{if(g.priority>b)return;if(g.priority===b&&g.backend!==u)throw new Error(`cannot register backend "${D}" using priority ${b}`)}if(b>=0){const p=backendsSortedByPriority.indexOf(D);p!==-1&&backendsSortedByPriority.splice(p,1);for(let h=0;h{const u=D.length===0?backendsSortedByPriority:D,b=[];for(const g of u){const p=backends[g];if(p){if(p.initialized)return p.backend;if(p.aborted)continue;const h=!!p.initPromise;try{return h||(p.initPromise=p.backend.init()),await p.initPromise,p.initialized=!0,p.backend}catch(o){h||b.push({name:g,err:o}),p.aborted=!0}finally{delete p.initPromise}}}throw new Error(`no available backend found. ERR: ${b.map(g=>`[${g.name}] ${g.err}`).join(", ")}`)};class EnvImpl{constructor(){this.wasm={},this.webgl={},this.logLevelInternal="warning"}set logLevel(u){if(u!==void 0){if(typeof u!="string"||["verbose","info","warning","error","fatal"].indexOf(u)===-1)throw new Error(`Unsupported logging level: ${u}`);this.logLevelInternal=u}}get logLevel(){return this.logLevelInternal}}const env=new EnvImpl,isBigInt64ArrayAvailable=typeof BigInt64Array<"u"&&typeof BigInt64Array.from=="function",isBigUint64ArrayAvailable=typeof BigUint64Array<"u"&&typeof BigUint64Array.from=="function",NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP=new Map([["float32",Float32Array],["uint8",Uint8Array],["int8",Int8Array],["uint16",Uint16Array],["int16",Int16Array],["int32",Int32Array],["bool",Uint8Array],["float64",Float64Array],["uint32",Uint32Array]]),NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP=new Map([[Float32Array,"float32"],[Uint8Array,"uint8"],[Int8Array,"int8"],[Uint16Array,"uint16"],[Int16Array,"int16"],[Int32Array,"int32"],[Float64Array,"float64"],[Uint32Array,"uint32"]]);isBigInt64ArrayAvailable&&(NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP.set("int64",BigInt64Array),NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP.set(BigInt64Array,"int64"));isBigUint64ArrayAvailable&&(NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP.set("uint64",BigUint64Array),NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP.set(BigUint64Array,"uint64"));const calculateSize=D=>{let u=1;for(let b=0;b{const t=document.createElement("canvas"),e=t.getContext("2d");if(!u||!e)return i();const n=new Image;n.crossOrigin="Anonymous",n.src=u,n.onload=()=>{t.width=n.width,t.height=n.height,e.drawImage(n,0,0,t.width,t.height);const r=e.getImageData(0,0,t.width,t.height);if(b!==void 0){if(b.height!==void 0&&b.height!==t.height)throw new Error("Image input config height doesn't match ImageBitmap height");if(f.height=t.height,b.width!==void 0&&b.width!==t.width)throw new Error("Image input config width doesn't match ImageBitmap width");f.width=t.width}else f.height=t.height,f.width=t.width;s(at.bufferToTensor(r.data,f))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(c!==void 0)return at.bufferToTensor(c,f);throw new Error("Input data provided is not supported - aborted tensor creation")}toImageData(u){var b,g;const p=document.createElement("canvas").getContext("2d");let h;if(p!=null){const o=this.dims[3],c=this.dims[2],f=this.dims[1],s=u!==void 0&&u.format!==void 0?u.format:"RGB",i=u!==void 0&&((b=u.norm)===null||b===void 0?void 0:b.mean)!==void 0?u.norm.mean:255,t=u!==void 0&&((g=u.norm)===null||g===void 0?void 0:g.bias)!==void 0?u.norm.bias:0,e=c*o;if(u!==void 0){if(u.height!==void 0&&u.height!==c)throw new Error("Image output config height doesn't match tensor height");if(u.width!==void 0&&u.width!==o)throw new Error("Image output config width doesn't match tensor width");if(u.format!==void 0&&f===4&&u.format!=="RGBA"||f===3&&u.format!=="RGB"&&u.format!=="BGR")throw new Error("Tensor format doesn't match input tensor dims")}const n=4;let r=0,a=1,l=2,d=3,m=0,y=e,v=e*2,_=-1;s==="RGBA"?(m=0,y=e,v=e*2,_=e*3):s==="RGB"?(m=0,y=e,v=e*2):s==="RBG"&&(m=0,v=e,y=e*2),h=p.createImageData(o,c);for(let T=0;T"u")throw new Error(`input '${s}' is missing in 'feeds'.`);if(o)for(const s of this.outputNames)p[s]=null;const c=await this.handler.run(u,p,h),f={};for(const s in c)Object.hasOwnProperty.call(c,s)&&(f[s]=new Tensor(c[s].type,c[s].data,c[s].dims));return f}static async create(u,b,g,p){let h,o={};if(typeof u=="string"){if(h=u,typeof b=="object"&&b!==null)o=b;else if(typeof b<"u")throw new TypeError("'options' must be an object.")}else if(u instanceof Uint8Array){if(h=u,typeof b=="object"&&b!==null)o=b;else if(typeof b<"u")throw new TypeError("'options' must be an object.")}else if(u instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&u instanceof SharedArrayBuffer){const t=u;let e=0,n=u.byteLength;if(typeof b=="object"&&b!==null)o=b;else if(typeof b=="number"){if(e=b,!Number.isSafeInteger(e))throw new RangeError("'byteOffset' must be an integer.");if(e<0||e>=t.byteLength)throw new RangeError(`'byteOffset' is out of range [0, ${t.byteLength}).`);if(n=u.byteLength-e,typeof g=="number"){if(n=g,!Number.isSafeInteger(n))throw new RangeError("'byteLength' must be an integer.");if(n<=0||e+n>t.byteLength)throw new RangeError(`'byteLength' is out of range (0, ${t.byteLength-e}].`);if(typeof p=="object"&&p!==null)o=p;else if(typeof p<"u")throw new TypeError("'options' must be an object.")}else if(typeof g<"u")throw new TypeError("'byteLength' must be a number.")}else if(typeof b<"u")throw new TypeError("'options' must be an object.");h=new Uint8Array(t,e,n)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");const f=(o.executionProviders||[]).map(t=>typeof t=="string"?t:t.name),i=await(await resolveBackend(f)).createSessionHandler(h,o);return new cn(i)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}};const InferenceSession=InferenceSession$1,lib=Object.freeze(Object.defineProperty({__proto__:null,InferenceSession,Tensor,env,registerBackend},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(lib);/*! * ONNX Runtime Web v1.14.0 * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. diff --git a/assets/index-BR3VGYw9.js b/assets/index-BOwQ_WhZ.js similarity index 97% rename from assets/index-BR3VGYw9.js rename to assets/index-BOwQ_WhZ.js index f6e01dfaf8921e603586e4674adea8e807e86348..8ddde983d5b4f0dbaea37e2a000332cccd02e354 100644 --- a/assets/index-BR3VGYw9.js +++ b/assets/index-BOwQ_WhZ.js @@ -1 +1 @@ -import{_ as mt}from"./IconAnimation.vue_vue_type_script_setup_true_lang-Djn5fd3P.js";import{_ as dt,a as gt}from"./Model.vue_vue_type_script_setup_true_lang-B7ZOwTMx.js";import{d as Y,v as Z,c as O,o as z,e as p,m as ft,q as ut,bM as _t,s as bt,g as R,w as vt,bN as pt,b as S,x as ct,C as H,y as E,a as y,A as W,bE as wt,bI as F,D as U,bx as J,by as nt,bH as xt,bn as Ct,bG as Mt,k as kt,bw as Lt}from"./index-7-fr_lhT.js";import{k as rt,l as yt,m as Vt,J as Dt}from"./live2d-zip-loader-dDw0Wbbr.js";import{_ as ot,a as St}from"./ColorPalette.vue_vue_type_script_setup_true_lang-DpflICIJ.js";import{u as zt}from"./useIconAnimation-BqW7zFiT.js";import{b as st}from"./route-block-B_A1xBdJ.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-D5rspuJc.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BNzPx9yx.js";import"./index-ZfK3fTHt.js";class Nt{constructor(t,e){this.pixels=t,this.opts=e;const{sigBits:i}=e,r=(M,L,v)=>(M<<2*i)+(L<>o,u=u>>o,d=d>>o;const L=r(l,u,d);a[L]===void 0&&(a[L]=0),a[L]+=1,l>c&&(c=l),lm&&(m=u),u_&&(_=d),dL>0?M+1:M,0),this.hist=a,this.rmax=c,this.rmin=h,this.gmax=m,this.gmin=f,this.bmax=_,this.bmin=b}get colorCount(){return this._colorCount}}class It{scaleDown(t){const e=this.getWidth(),i=this.getHeight();let r=1;if(t.maxDimension>0){const o=Math.max(e,i);o>t.maxDimension&&(r=t.maxDimension/o)}else r=1/t.quality;r<1&&this.resize(e*r,i*r,r)}}function Et(n,t){var e;if(t.length>0){const i=n.data,r=i.length/4;let o,s,a,c,h;for(let m=0;m{const s=()=>{this._initCanvas(),r(this)};e.complete?s():(e.onload=s,e.onerror=a=>o(new Error(`Fail to load image: ${i}`)))})}clear(){this._getContext().clearRect(0,0,this._getWidth(),this._getHeight())}update(t){this._getContext().putImageData(t,0,0)}getWidth(){return this._getWidth()}getHeight(){return this._getHeight()}resize(t,e,i){if(!this.image)throw new Error("Image is not initialized");this._width=this._getCanvas().width=t,this._height=this._getCanvas().height=e,this._getContext().scale(i,i),this._getContext().drawImage(this.image,0,0)}getPixelCount(){return this._getWidth()*this._getHeight()}getImageData(){return this._getContext().getImageData(0,0,this._getWidth(),this._getHeight())}remove(){this._canvas&&this._canvas.parentNode&&this._canvas.parentNode.removeChild(this._canvas)}}function T(n,...t){return t.forEach(e=>{if(e){for(const i in e)if(e.hasOwnProperty(i)){const r=e[i];Array.isArray(r)?n[i]=r.slice(0):typeof r=="object"?(n[i]||(n[i]={}),T(n[i],r)):n[i]=r}}}),n}function $t(n,t){const{colorCount:e,quantizer:i,generators:r,filters:o}=n,s={colorCount:e},a=typeof i=="string"?{name:i,options:{}}:i;return a.options=T({},s,a.options),T({},{quantizer:a,generators:r,filters:o},t)}class jt{constructor(t,e={}){this._src=t,this._opts=T({},P.DefaultOpts,e)}maxColorCount(t){return this._opts.colorCount=t,this}maxDimension(t){return this._opts.maxDimension=t,this}addFilter(t){return this._opts.filters?this._opts.filters.push(t):this._opts.filters=[t],this}removeFilter(t){if(this._opts.filters){const e=this._opts.filters.indexOf(t);e>0&&this._opts.filters.splice(e)}return this}clearFilters(){return this._opts.filters=[],this}quality(t){return this._opts.quality=t,this}useImageClass(t){return this._opts.ImageClass=t,this}useGenerator(t,e){return this._opts.generators||(this._opts.generators=[]),this._opts.generators.push(e?{name:t,options:e}:t),this}useQuantizer(t,e){return this._opts.quantizer=e?{name:t,options:e}:t,this}build(){return new P(this._src,this._opts)}getPalette(){return this.build().getPalette()}}class B{constructor(t){this.pipeline=t,this._map={}}names(){return Object.keys(this._map)}has(t){return!!this._map[t]}get(t){return this._map[t]}register(t,e){return this._map[t]=e,this.pipeline}}class Ut{constructor(){this.filter=new B(this),this.quantizer=new B(this),this.generator=new B(this)}_buildProcessTasks({filters:t,quantizer:e,generators:i}){return i.length===1&&i[0]==="*"&&(i=this.generator.names()),{filters:t.map(o=>r(this.filter,o)),quantizer:r(this.quantizer,e),generators:i.map(o=>r(this.generator,o))};function r(o,s){let a,c;return typeof s=="string"?a=s:(a=s.name,c=s.options),{name:a,fn:o.get(a),options:c}}}async process(t,e){const{filters:i,quantizer:r,generators:o}=this._buildProcessTasks(e),s=await this._filterColors(i,t),a=await this._generateColors(r,s),c=await this._generatePalettes(o,a);return{colors:a,palettes:c}}_filterColors(t,e){return Promise.resolve(Et(e,t.map(({fn:i})=>i)))}_generateColors(t,e){return Promise.resolve(t.fn(e.data,t.options))}async _generatePalettes(t,e){const i=await Promise.all(t.map(({fn:r,options:o})=>Promise.resolve(r(e,o))));return Promise.resolve(i.reduce((r,o,s)=>(r[t[s].name]=o,r),{}))}}function Tt(n,t,e){return"#"+((1<<24)+(n<<16)+(t<<8)+e).toString(16).slice(1,7)}function Rt(n,t,e){n/=255,t/=255,e/=255;const i=Math.max(n,t,e),r=Math.min(n,t,e);let o=0,s=0;const a=(i+r)/2;if(i!==r){const c=i-r;switch(s=a>.5?c/(2-i-r):c/(i+r),i){case n:o=(t-e)/c+(t1&&(h-=1),h<1/6?a+(c-a)*6*h:h<1/2?c:h<2/3?a+(c-a)*(2/3-h)*6:a}if(t===0)i=r=o=e;else{const a=e<.5?e*(1+t):e+t-e*t,c=2*e-a;i=s(c,a,n+1/3),r=s(c,a,n),o=s(c,a,n-1/3)}return[i*255,r*255,o*255]}class V{static applyFilters(t,e){return e.length>0?t.filter(({r:i,g:r,b:o})=>{var s;for(let a=0;a>=q,i>>=q,r>>=q,e>=o&&e<=s&&i>=a&&i<=c&&r>=h&&r<=m}split(){const{hist:t,getColorIndex:e}=this.histogram,{r1:i,r2:r,g1:o,g2:s,b1:a,b2:c}=this.dimension,h=this.count();if(!h)return[];if(h===1)return[this.clone()];const m=r-i+1,f=s-o+1,_=c-a+1,b=Math.max(m,f,_);let l=null,u,d;u=d=0;let g=null;if(b===m){g="r",l=new Uint32Array(r+1);for(let v=i;v<=r;v++){u=0;for(let x=o;x<=s;x++)for(let C=a;C<=c;C++){const D=e(v,x,C);t[D]&&(u+=t[D])}d+=u,l[v]=d}}else if(b===f){g="g",l=new Uint32Array(s+1);for(let v=o;v<=s;v++){u=0;for(let x=i;x<=r;x++)for(let C=a;C<=c;C++){const D=e(x,v,C);t[D]&&(u+=t[D])}d+=u,l[v]=d}}else{g="b",l=new Uint32Array(c+1);for(let v=a;v<=c;v++){u=0;for(let x=i;x<=r;x++)for(let C=o;C<=s;C++){const D=e(x,C,v);t[D]&&(u+=t[D])}d+=u,l[v]=d}}let w=-1;const N=new Uint32Array(l.length);for(let v=0;vd/2&&(w=v),N[v]=d-x)}const M=this;function L(v){const x=v+"1",C=v+"2",D=M.dimension[x];let k=M.dimension[C];const X=M.clone(),K=M.clone(),tt=w-D,et=k-w;for(tt<=et?(k=Math.min(k-1,~~(w+et/2)),k=Math.max(0,k)):(k=Math.max(D,~~(w-1-tt/2)),k=Math.min(M.dimension[C],k));!l[k];)k++;let it=N[k];for(;!it&&l[k-1];)it=N[--k];return X.dimension[C]=k,K.dimension[x]=k+1,[X,K]}return L(g)}}class at{_sort(){this._sorted||(this.contents.sort(this._comparator),this._sorted=!0)}constructor(t){this._comparator=t,this.contents=[],this._sorted=!1}push(t){this.contents.push(t),this._sorted=!1}peek(t){return this._sort(),t=typeof t=="number"?t:this.contents.length-1,this.contents[t]}pop(){return this._sort(),this.contents.pop()}size(){return this.contents.length}map(t){return this._sort(),this.contents.map(t)}}const At=.75;function lt(n,t){let e=n.size();for(;n.size()0){const[r,o]=i.split();if(!r||(n.push(r),o&&o.count()>0&&n.push(o),n.size()===e))break;e=n.size()}else break}}const Bt=(n,t)=>{if(n.length===0||t.colorCount<2||t.colorCount>256)throw new Error("Wrong MMCQ parameters");const e=A.build(n);e.histogram.colorCount;const i=new at((o,s)=>o.count()-s.count());i.push(e),lt(i,At*t.colorCount);const r=new at((o,s)=>o.count()*o.volume()-s.count()*s.volume());return r.contents=i.contents,lt(r,t.colorCount-r.size()),qt(r)};function qt(n){const t=[];for(;n.size();){const e=n.pop(),i=e.avg();t.push(new V(i,e.count()))}return t}const Ht={targetDarkLuma:.26,maxDarkLuma:.45,minLightLuma:.55,targetLightLuma:.74,minNormalLuma:.3,targetNormalLuma:.5,maxNormalLuma:.7,targetMutesSaturation:.3,maxMutesSaturation:.4,targetVibrantSaturation:1,minVibrantSaturation:.35,weightSaturation:3,weightLuma:6.5,weightPopulation:.5};function Wt(n){let t=0;return n.forEach(e=>{t=Math.max(t,e.population)}),t}function Jt(n,t){return n.Vibrant===t||n.DarkVibrant===t||n.LightVibrant===t||n.Muted===t||n.DarkMuted===t||n.LightMuted===t}function Gt(n,t,e,i,r,o,s){function a(...h){let m=0,f=0;for(let _=0;_{const[,b,l]=_.hsl;if(b>=a&&b<=c&&l>=r&&l<=o&&!Jt(n,_)){const u=Gt(b,s,l,i,_.population,e,h);(m===null||u>f)&&(m=_,f=u)}}),m}function Qt(n,t,e){const i={Vibrant:null,DarkVibrant:null,LightVibrant:null,Muted:null,DarkMuted:null,LightMuted:null};return i.Vibrant=$(i,n,t,e.targetNormalLuma,e.minNormalLuma,e.maxNormalLuma,e.targetVibrantSaturation,e.minVibrantSaturation,1,e),i.LightVibrant=$(i,n,t,e.targetLightLuma,e.minLightLuma,1,e.targetVibrantSaturation,e.minVibrantSaturation,1,e),i.DarkVibrant=$(i,n,t,e.targetDarkLuma,0,e.maxDarkLuma,e.targetVibrantSaturation,e.minVibrantSaturation,1,e),i.Muted=$(i,n,t,e.targetNormalLuma,e.minNormalLuma,e.maxNormalLuma,e.targetMutesSaturation,0,e.maxMutesSaturation,e),i.LightMuted=$(i,n,t,e.targetLightLuma,e.minLightLuma,1,e.targetMutesSaturation,0,e.maxMutesSaturation,e),i.DarkMuted=$(i,n,t,e.targetDarkLuma,0,e.maxDarkLuma,e.targetMutesSaturation,0,e.maxMutesSaturation,e),i}function Yt(n,t,e){if(!n.Vibrant&&!n.DarkVibrant&&!n.LightVibrant){if(!n.DarkVibrant&&n.DarkMuted){let[i,r,o]=n.DarkMuted.hsl;o=e.targetDarkLuma,n.DarkVibrant=new V(I(i,r,o),0)}if(!n.LightVibrant&&n.LightMuted){let[i,r,o]=n.LightMuted.hsl;o=e.targetDarkLuma,n.DarkVibrant=new V(I(i,r,o),0)}}if(!n.Vibrant&&n.DarkVibrant){let[i,r,o]=n.DarkVibrant.hsl;o=e.targetNormalLuma,n.Vibrant=new V(I(i,r,o),0)}else if(!n.Vibrant&&n.LightVibrant){let[i,r,o]=n.LightVibrant.hsl;o=e.targetNormalLuma,n.Vibrant=new V(I(i,r,o),0)}if(!n.DarkVibrant&&n.Vibrant){let[i,r,o]=n.Vibrant.hsl;o=e.targetDarkLuma,n.DarkVibrant=new V(I(i,r,o),0)}if(!n.LightVibrant&&n.Vibrant){let[i,r,o]=n.Vibrant.hsl;o=e.targetLightLuma,n.LightVibrant=new V(I(i,r,o),0)}if(!n.Muted&&n.Vibrant){let[i,r,o]=n.Vibrant.hsl;o=e.targetMutesSaturation,n.Muted=new V(I(i,r,o),0)}if(!n.DarkMuted&&n.DarkVibrant){let[i,r,o]=n.DarkVibrant.hsl;o=e.targetMutesSaturation,n.DarkMuted=new V(I(i,r,o),0)}if(!n.LightMuted&&n.LightVibrant){let[i,r,o]=n.LightVibrant.hsl;o=e.targetMutesSaturation,n.LightMuted=new V(I(i,r,o),0)}}const Zt=(n,t)=>{t=Object.assign({},Ht,t);const e=Wt(n),i=Qt(n,e,t);return Yt(i,e,t),i},Xt=new Ut().filter.register("default",(n,t,e,i)=>i>=125&&!(n>250&&t>250&&e>250)).quantizer.register("mmcq",Bt).generator.register("default",Zt);P.use(Xt);const Kt=["disabled"],j=Y({__name:"Live2DModelControlButton",emits:["click"],setup(n){const t=Z();return(e,i)=>(z(),O("button",{disabled:p(t).loadingLive2dModel,bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250",rounded:"",onClick:i[0]||(i[0]=r=>e.$emit("click"))},[ft(e.$slots,"default")],8,Kt))}}),te={flex:"~ col gap-4"},ee={flex:"","items-center":"","gap-2":""},ie=["disabled","placeholder"],ne={"font-medium":""},re={flex:"","gap-2":""},oe=["onUpdate:modelValue"],se=["href","download"],ae=Y({__name:"Live2DSettings",props:{palette:null},emits:["extractColorsFromModel"],setup(n){const{t}=ut(),e=_t({accept:"application/zip"}),i=Z(),{live2dModelFile:r,live2dMotionMap:o,live2dLoadSource:s,loadingLive2dModel:a,availableLive2dMotions:c,live2dModelUrl:h}=bt(i),m=R(h.value);e.onChange(l=>{l&&l.length>0&&(o.value={},r.value=l[0],s.value="file",a.value=!0)}),vt(()=>i.loadingLive2dModel,l=>{l||s.value==="file"&&c.value.forEach(u=>{u.motionName in rt?o.value[u.fileName]=u.motionName:o.value[u.fileName]=yt})});async function f(l,u){if(!Object.keys(u).length)return l;const g=await new Dt().loadAsync(l),w=Object.keys(g.files).find(x=>x.endsWith("model3.json"));if(!w)throw new Error("model3.json not found");const N=await g.file(w).async("string"),M=JSON.parse(N),L={};Object.entries(u).forEach(([x,C])=>{if(L[C]){L[C].push({File:x});return}L[C]=[{File:x}]}),M.FileReferences.Motions=L,g.file(w,JSON.stringify(M,null,2));const v=await g.generateAsync({type:"blob"});return new File([v],l.name,{type:l.type,lastModified:l.lastModified})}async function _(){const l=await Vt.getItem("live2dModel");if(!l)return;const u=await f(l,o.value);r.value=u,s.value="file",a.value=!0}const b=pt(r);return(l,u)=>(z(),O("div",te,[S(p(ot),{title:"settings.live2d.change-model.title",icon:"i-solar:magic-stick-3-bold-duotone","inner-class":"text-sm"},{default:E(()=>[y("div",ee,[W(y("input",{"onUpdate:modelValue":u[0]||(u[0]=d=>m.value=d),disabled:p(i).loadingLive2dModel,class:"form-control flex-1",border:"zinc-300 dark:zinc-800 solid 1 focus:zinc-400 dark:focus:zinc-600",transition:"border duration-250 ease-in-out",placeholder:p(t)("settings.live2d.change-model.from-url-placeholder")},null,8,ie),[[wt,m.value]]),S(j,{class:"form-control",onClick:u[1]||(u[1]=d=>h.value=m.value)},{default:E(()=>[F(U(p(t)("settings.live2d.change-model.from-url")),1)]),_:1})]),S(j,{class:"form-control place-self-end",onClick:u[2]||(u[2]=d=>p(e).open())},{default:E(()=>[F(U(p(t)("settings.live2d.change-model.from-file"))+"... ",1)]),_:1}),S(j,{class:"form-control",onClick:u[3]||(u[3]=d=>l.$emit("extractColorsFromModel"))},{default:E(()=>u[4]||(u[4]=[F(" Extract colors from model ")])),_:1}),S(St,{colors:n.palette.map(d=>({hex:d,name:d}))},null,8,["colors"])]),_:1}),p(i).live2dLoadSource==="file"?(z(),ct(p(ot),{key:0,title:"settings.live2d.edit-motion-map.title",icon:"i-solar:face-scan-circle-bold-duotone"},{default:E(()=>{var d;return[(z(!0),O(J,null,nt(p(i).availableLive2dMotions,g=>(z(),O("div",{key:g.fileName,flex:"","items-center":"","justify-between":"","text-sm":""},[y("span",ne,U(g.fileName),1),y("div",re,[W(y("select",{"onUpdate:modelValue":w=>p(i).live2dMotionMap[g.fileName]=w},[(z(!0),O(J,null,nt(Object.keys(p(rt)),w=>(z(),O("option",{key:w},U(w),1))),128))],8,oe),[[xt,p(i).live2dMotionMap[g.fileName]]]),S(j,{class:"form-control",onClick:w=>p(i).live2dCurrentMotion={group:g.motionName,index:g.motionIndex}},{default:E(()=>u[5]||(u[5]=[F(" Play ")])),_:2},1032,["onClick"])])]))),128)),S(j,{onClick:_},{default:E(()=>u[6]||(u[6]=[F(" Save and patch ")])),_:1}),y("a",{"mt-2":"",block:"",href:p(b),download:`${((d=p(i).live2dModelFile)==null?void 0:d.name)||"live2d"}-motion-edited.zip`},[S(j,{"w-full":""},{default:E(()=>u[7]||(u[7]=[F("Export")])),_:1})],8,se)]}),_:1})):H("",!0)]))}}),le=Ct(ae,[["__scopeId","data-v-de39498b"]]),ue={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},ce={relative:"","text-nowrap":""},he={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]",text:"neutral-300 dark:neutral-500"},me={"text-3xl":"","font-semibold":""},de={flex:""},ge={key:1,text:"neutral-200/50 dark:neutral-500/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},fe=Y({__name:"index",setup(n){const{t}=ut(),e=Mt(),i=R(),r=R(),{width:o,height:s}=kt(i),a=Z(),c=R([]);async function h(){if(!r.value)return;const b=await r.value.captureFrame();if(!b){console.error("No frame captured");return}const l=URL.createObjectURL(b);try{const d=await new P(l).getPalette();c.value=Object.values(d).map(g=>g==null?void 0:g.hex).filter(g=>typeof g=="string")}finally{URL.revokeObjectURL(l)}}const{iconAnimationStarted:m,showIconAnimation:f,animationIcon:_}=zt("i-lucide:person-standing");return(b,l)=>{const u=mt,d=Lt("motion");return z(),O(J,null,[W((z(),O("div",ue,[y("button",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":"",onClick:l[0]||(l[0]=g=>p(e).back())}),y("h1",ce,[y("div",he,U(p(t)("settings.title")),1),y("div",me,U(p(t)("settings.pages.models.title")),1)])])),[[d]]),y("div",de,[y("div",{ref_key:"live2dContainerRef",ref:i,w:"50%",h:"80vh"},[S(gt,{ref_key:"live2dCanvasRef",ref:r,width:p(o),height:p(s)},{default:E(({app:g})=>[S(dt,{app:g,"mouth-open-size":0,width:p(o),height:p(s),paused:!1},null,8,["app","width","height"])]),_:1},8,["width","height"])],512),S(le,{w:"50%",h:"80vh",palette:c.value,onExtractColorsFromModel:h},null,8,["palette"])]),p(f)?(z(),ct(u,{key:0,"z-index":-1,icon:p(_),"icon-size":12,duration:1e3,started:p(m),"is-reverse":!0,position:"calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)","text-color":"text-neutral-200/50 dark:text-neutral-600/20"},null,8,["icon","started"])):H("",!0),p(a).usePageSpecificTransitions?H("",!0):(z(),O("div",ge,l[1]||(l[1]=[y("div",{text:"40","i-lucide:person-standing":""},null,-1)])))],64)}}});typeof st=="function"&&st(fe);export{fe as default}; +import{_ as mt}from"./IconAnimation.vue_vue_type_script_setup_true_lang-B0Tznm9Y.js";import{_ as dt,a as gt}from"./Model.vue_vue_type_script_setup_true_lang-Wfrg8fps.js";import{d as Y,v as Z,c as O,o as z,e as p,m as ft,q as ut,bM as _t,s as bt,g as R,w as vt,bN as pt,b as S,x as ct,C as H,y as E,a as y,A as W,bE as wt,bI as F,D as U,bx as J,by as nt,bH as xt,bn as Ct,bG as Mt,k as kt,bw as Lt}from"./index-hDb1Lsb8.js";import{k as rt,l as yt,m as Vt,J as Dt}from"./live2d-zip-loader--bTGFeQd.js";import{_ as ot,a as St}from"./ColorPalette.vue_vue_type_script_setup_true_lang-XM3XfZvN.js";import{u as zt}from"./useIconAnimation-DVKfiTTG.js";import{b as st}from"./route-block-B_A1xBdJ.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import"./index-CborASRd.js";class Nt{constructor(t,e){this.pixels=t,this.opts=e;const{sigBits:i}=e,r=(M,L,v)=>(M<<2*i)+(L<>o,u=u>>o,d=d>>o;const L=r(l,u,d);a[L]===void 0&&(a[L]=0),a[L]+=1,l>c&&(c=l),lm&&(m=u),u_&&(_=d),dL>0?M+1:M,0),this.hist=a,this.rmax=c,this.rmin=h,this.gmax=m,this.gmin=f,this.bmax=_,this.bmin=b}get colorCount(){return this._colorCount}}class It{scaleDown(t){const e=this.getWidth(),i=this.getHeight();let r=1;if(t.maxDimension>0){const o=Math.max(e,i);o>t.maxDimension&&(r=t.maxDimension/o)}else r=1/t.quality;r<1&&this.resize(e*r,i*r,r)}}function Et(n,t){var e;if(t.length>0){const i=n.data,r=i.length/4;let o,s,a,c,h;for(let m=0;m{const s=()=>{this._initCanvas(),r(this)};e.complete?s():(e.onload=s,e.onerror=a=>o(new Error(`Fail to load image: ${i}`)))})}clear(){this._getContext().clearRect(0,0,this._getWidth(),this._getHeight())}update(t){this._getContext().putImageData(t,0,0)}getWidth(){return this._getWidth()}getHeight(){return this._getHeight()}resize(t,e,i){if(!this.image)throw new Error("Image is not initialized");this._width=this._getCanvas().width=t,this._height=this._getCanvas().height=e,this._getContext().scale(i,i),this._getContext().drawImage(this.image,0,0)}getPixelCount(){return this._getWidth()*this._getHeight()}getImageData(){return this._getContext().getImageData(0,0,this._getWidth(),this._getHeight())}remove(){this._canvas&&this._canvas.parentNode&&this._canvas.parentNode.removeChild(this._canvas)}}function T(n,...t){return t.forEach(e=>{if(e){for(const i in e)if(e.hasOwnProperty(i)){const r=e[i];Array.isArray(r)?n[i]=r.slice(0):typeof r=="object"?(n[i]||(n[i]={}),T(n[i],r)):n[i]=r}}}),n}function $t(n,t){const{colorCount:e,quantizer:i,generators:r,filters:o}=n,s={colorCount:e},a=typeof i=="string"?{name:i,options:{}}:i;return a.options=T({},s,a.options),T({},{quantizer:a,generators:r,filters:o},t)}class jt{constructor(t,e={}){this._src=t,this._opts=T({},P.DefaultOpts,e)}maxColorCount(t){return this._opts.colorCount=t,this}maxDimension(t){return this._opts.maxDimension=t,this}addFilter(t){return this._opts.filters?this._opts.filters.push(t):this._opts.filters=[t],this}removeFilter(t){if(this._opts.filters){const e=this._opts.filters.indexOf(t);e>0&&this._opts.filters.splice(e)}return this}clearFilters(){return this._opts.filters=[],this}quality(t){return this._opts.quality=t,this}useImageClass(t){return this._opts.ImageClass=t,this}useGenerator(t,e){return this._opts.generators||(this._opts.generators=[]),this._opts.generators.push(e?{name:t,options:e}:t),this}useQuantizer(t,e){return this._opts.quantizer=e?{name:t,options:e}:t,this}build(){return new P(this._src,this._opts)}getPalette(){return this.build().getPalette()}}class B{constructor(t){this.pipeline=t,this._map={}}names(){return Object.keys(this._map)}has(t){return!!this._map[t]}get(t){return this._map[t]}register(t,e){return this._map[t]=e,this.pipeline}}class Ut{constructor(){this.filter=new B(this),this.quantizer=new B(this),this.generator=new B(this)}_buildProcessTasks({filters:t,quantizer:e,generators:i}){return i.length===1&&i[0]==="*"&&(i=this.generator.names()),{filters:t.map(o=>r(this.filter,o)),quantizer:r(this.quantizer,e),generators:i.map(o=>r(this.generator,o))};function r(o,s){let a,c;return typeof s=="string"?a=s:(a=s.name,c=s.options),{name:a,fn:o.get(a),options:c}}}async process(t,e){const{filters:i,quantizer:r,generators:o}=this._buildProcessTasks(e),s=await this._filterColors(i,t),a=await this._generateColors(r,s),c=await this._generatePalettes(o,a);return{colors:a,palettes:c}}_filterColors(t,e){return Promise.resolve(Et(e,t.map(({fn:i})=>i)))}_generateColors(t,e){return Promise.resolve(t.fn(e.data,t.options))}async _generatePalettes(t,e){const i=await Promise.all(t.map(({fn:r,options:o})=>Promise.resolve(r(e,o))));return Promise.resolve(i.reduce((r,o,s)=>(r[t[s].name]=o,r),{}))}}function Tt(n,t,e){return"#"+((1<<24)+(n<<16)+(t<<8)+e).toString(16).slice(1,7)}function Rt(n,t,e){n/=255,t/=255,e/=255;const i=Math.max(n,t,e),r=Math.min(n,t,e);let o=0,s=0;const a=(i+r)/2;if(i!==r){const c=i-r;switch(s=a>.5?c/(2-i-r):c/(i+r),i){case n:o=(t-e)/c+(t1&&(h-=1),h<1/6?a+(c-a)*6*h:h<1/2?c:h<2/3?a+(c-a)*(2/3-h)*6:a}if(t===0)i=r=o=e;else{const a=e<.5?e*(1+t):e+t-e*t,c=2*e-a;i=s(c,a,n+1/3),r=s(c,a,n),o=s(c,a,n-1/3)}return[i*255,r*255,o*255]}class V{static applyFilters(t,e){return e.length>0?t.filter(({r:i,g:r,b:o})=>{var s;for(let a=0;a>=q,i>>=q,r>>=q,e>=o&&e<=s&&i>=a&&i<=c&&r>=h&&r<=m}split(){const{hist:t,getColorIndex:e}=this.histogram,{r1:i,r2:r,g1:o,g2:s,b1:a,b2:c}=this.dimension,h=this.count();if(!h)return[];if(h===1)return[this.clone()];const m=r-i+1,f=s-o+1,_=c-a+1,b=Math.max(m,f,_);let l=null,u,d;u=d=0;let g=null;if(b===m){g="r",l=new Uint32Array(r+1);for(let v=i;v<=r;v++){u=0;for(let x=o;x<=s;x++)for(let C=a;C<=c;C++){const D=e(v,x,C);t[D]&&(u+=t[D])}d+=u,l[v]=d}}else if(b===f){g="g",l=new Uint32Array(s+1);for(let v=o;v<=s;v++){u=0;for(let x=i;x<=r;x++)for(let C=a;C<=c;C++){const D=e(x,v,C);t[D]&&(u+=t[D])}d+=u,l[v]=d}}else{g="b",l=new Uint32Array(c+1);for(let v=a;v<=c;v++){u=0;for(let x=i;x<=r;x++)for(let C=o;C<=s;C++){const D=e(x,C,v);t[D]&&(u+=t[D])}d+=u,l[v]=d}}let w=-1;const N=new Uint32Array(l.length);for(let v=0;vd/2&&(w=v),N[v]=d-x)}const M=this;function L(v){const x=v+"1",C=v+"2",D=M.dimension[x];let k=M.dimension[C];const X=M.clone(),K=M.clone(),tt=w-D,et=k-w;for(tt<=et?(k=Math.min(k-1,~~(w+et/2)),k=Math.max(0,k)):(k=Math.max(D,~~(w-1-tt/2)),k=Math.min(M.dimension[C],k));!l[k];)k++;let it=N[k];for(;!it&&l[k-1];)it=N[--k];return X.dimension[C]=k,K.dimension[x]=k+1,[X,K]}return L(g)}}class at{_sort(){this._sorted||(this.contents.sort(this._comparator),this._sorted=!0)}constructor(t){this._comparator=t,this.contents=[],this._sorted=!1}push(t){this.contents.push(t),this._sorted=!1}peek(t){return this._sort(),t=typeof t=="number"?t:this.contents.length-1,this.contents[t]}pop(){return this._sort(),this.contents.pop()}size(){return this.contents.length}map(t){return this._sort(),this.contents.map(t)}}const At=.75;function lt(n,t){let e=n.size();for(;n.size()0){const[r,o]=i.split();if(!r||(n.push(r),o&&o.count()>0&&n.push(o),n.size()===e))break;e=n.size()}else break}}const Bt=(n,t)=>{if(n.length===0||t.colorCount<2||t.colorCount>256)throw new Error("Wrong MMCQ parameters");const e=A.build(n);e.histogram.colorCount;const i=new at((o,s)=>o.count()-s.count());i.push(e),lt(i,At*t.colorCount);const r=new at((o,s)=>o.count()*o.volume()-s.count()*s.volume());return r.contents=i.contents,lt(r,t.colorCount-r.size()),qt(r)};function qt(n){const t=[];for(;n.size();){const e=n.pop(),i=e.avg();t.push(new V(i,e.count()))}return t}const Ht={targetDarkLuma:.26,maxDarkLuma:.45,minLightLuma:.55,targetLightLuma:.74,minNormalLuma:.3,targetNormalLuma:.5,maxNormalLuma:.7,targetMutesSaturation:.3,maxMutesSaturation:.4,targetVibrantSaturation:1,minVibrantSaturation:.35,weightSaturation:3,weightLuma:6.5,weightPopulation:.5};function Wt(n){let t=0;return n.forEach(e=>{t=Math.max(t,e.population)}),t}function Jt(n,t){return n.Vibrant===t||n.DarkVibrant===t||n.LightVibrant===t||n.Muted===t||n.DarkMuted===t||n.LightMuted===t}function Gt(n,t,e,i,r,o,s){function a(...h){let m=0,f=0;for(let _=0;_{const[,b,l]=_.hsl;if(b>=a&&b<=c&&l>=r&&l<=o&&!Jt(n,_)){const u=Gt(b,s,l,i,_.population,e,h);(m===null||u>f)&&(m=_,f=u)}}),m}function Qt(n,t,e){const i={Vibrant:null,DarkVibrant:null,LightVibrant:null,Muted:null,DarkMuted:null,LightMuted:null};return i.Vibrant=$(i,n,t,e.targetNormalLuma,e.minNormalLuma,e.maxNormalLuma,e.targetVibrantSaturation,e.minVibrantSaturation,1,e),i.LightVibrant=$(i,n,t,e.targetLightLuma,e.minLightLuma,1,e.targetVibrantSaturation,e.minVibrantSaturation,1,e),i.DarkVibrant=$(i,n,t,e.targetDarkLuma,0,e.maxDarkLuma,e.targetVibrantSaturation,e.minVibrantSaturation,1,e),i.Muted=$(i,n,t,e.targetNormalLuma,e.minNormalLuma,e.maxNormalLuma,e.targetMutesSaturation,0,e.maxMutesSaturation,e),i.LightMuted=$(i,n,t,e.targetLightLuma,e.minLightLuma,1,e.targetMutesSaturation,0,e.maxMutesSaturation,e),i.DarkMuted=$(i,n,t,e.targetDarkLuma,0,e.maxDarkLuma,e.targetMutesSaturation,0,e.maxMutesSaturation,e),i}function Yt(n,t,e){if(!n.Vibrant&&!n.DarkVibrant&&!n.LightVibrant){if(!n.DarkVibrant&&n.DarkMuted){let[i,r,o]=n.DarkMuted.hsl;o=e.targetDarkLuma,n.DarkVibrant=new V(I(i,r,o),0)}if(!n.LightVibrant&&n.LightMuted){let[i,r,o]=n.LightMuted.hsl;o=e.targetDarkLuma,n.DarkVibrant=new V(I(i,r,o),0)}}if(!n.Vibrant&&n.DarkVibrant){let[i,r,o]=n.DarkVibrant.hsl;o=e.targetNormalLuma,n.Vibrant=new V(I(i,r,o),0)}else if(!n.Vibrant&&n.LightVibrant){let[i,r,o]=n.LightVibrant.hsl;o=e.targetNormalLuma,n.Vibrant=new V(I(i,r,o),0)}if(!n.DarkVibrant&&n.Vibrant){let[i,r,o]=n.Vibrant.hsl;o=e.targetDarkLuma,n.DarkVibrant=new V(I(i,r,o),0)}if(!n.LightVibrant&&n.Vibrant){let[i,r,o]=n.Vibrant.hsl;o=e.targetLightLuma,n.LightVibrant=new V(I(i,r,o),0)}if(!n.Muted&&n.Vibrant){let[i,r,o]=n.Vibrant.hsl;o=e.targetMutesSaturation,n.Muted=new V(I(i,r,o),0)}if(!n.DarkMuted&&n.DarkVibrant){let[i,r,o]=n.DarkVibrant.hsl;o=e.targetMutesSaturation,n.DarkMuted=new V(I(i,r,o),0)}if(!n.LightMuted&&n.LightVibrant){let[i,r,o]=n.LightVibrant.hsl;o=e.targetMutesSaturation,n.LightMuted=new V(I(i,r,o),0)}}const Zt=(n,t)=>{t=Object.assign({},Ht,t);const e=Wt(n),i=Qt(n,e,t);return Yt(i,e,t),i},Xt=new Ut().filter.register("default",(n,t,e,i)=>i>=125&&!(n>250&&t>250&&e>250)).quantizer.register("mmcq",Bt).generator.register("default",Zt);P.use(Xt);const Kt=["disabled"],j=Y({__name:"Live2DModelControlButton",emits:["click"],setup(n){const t=Z();return(e,i)=>(z(),O("button",{disabled:p(t).loadingLive2dModel,bg:"zinc-100 dark:zinc-800",hover:"bg-zinc-200 dark:bg-zinc-700",transition:"all ease-in-out duration-250",rounded:"",onClick:i[0]||(i[0]=r=>e.$emit("click"))},[ft(e.$slots,"default")],8,Kt))}}),te={flex:"~ col gap-4"},ee={flex:"","items-center":"","gap-2":""},ie=["disabled","placeholder"],ne={"font-medium":""},re={flex:"","gap-2":""},oe=["onUpdate:modelValue"],se=["href","download"],ae=Y({__name:"Live2DSettings",props:{palette:null},emits:["extractColorsFromModel"],setup(n){const{t}=ut(),e=_t({accept:"application/zip"}),i=Z(),{live2dModelFile:r,live2dMotionMap:o,live2dLoadSource:s,loadingLive2dModel:a,availableLive2dMotions:c,live2dModelUrl:h}=bt(i),m=R(h.value);e.onChange(l=>{l&&l.length>0&&(o.value={},r.value=l[0],s.value="file",a.value=!0)}),vt(()=>i.loadingLive2dModel,l=>{l||s.value==="file"&&c.value.forEach(u=>{u.motionName in rt?o.value[u.fileName]=u.motionName:o.value[u.fileName]=yt})});async function f(l,u){if(!Object.keys(u).length)return l;const g=await new Dt().loadAsync(l),w=Object.keys(g.files).find(x=>x.endsWith("model3.json"));if(!w)throw new Error("model3.json not found");const N=await g.file(w).async("string"),M=JSON.parse(N),L={};Object.entries(u).forEach(([x,C])=>{if(L[C]){L[C].push({File:x});return}L[C]=[{File:x}]}),M.FileReferences.Motions=L,g.file(w,JSON.stringify(M,null,2));const v=await g.generateAsync({type:"blob"});return new File([v],l.name,{type:l.type,lastModified:l.lastModified})}async function _(){const l=await Vt.getItem("live2dModel");if(!l)return;const u=await f(l,o.value);r.value=u,s.value="file",a.value=!0}const b=pt(r);return(l,u)=>(z(),O("div",te,[S(p(ot),{title:"settings.live2d.change-model.title",icon:"i-solar:magic-stick-3-bold-duotone","inner-class":"text-sm"},{default:E(()=>[y("div",ee,[W(y("input",{"onUpdate:modelValue":u[0]||(u[0]=d=>m.value=d),disabled:p(i).loadingLive2dModel,class:"form-control flex-1",border:"zinc-300 dark:zinc-800 solid 1 focus:zinc-400 dark:focus:zinc-600",transition:"border duration-250 ease-in-out",placeholder:p(t)("settings.live2d.change-model.from-url-placeholder")},null,8,ie),[[wt,m.value]]),S(j,{class:"form-control",onClick:u[1]||(u[1]=d=>h.value=m.value)},{default:E(()=>[F(U(p(t)("settings.live2d.change-model.from-url")),1)]),_:1})]),S(j,{class:"form-control place-self-end",onClick:u[2]||(u[2]=d=>p(e).open())},{default:E(()=>[F(U(p(t)("settings.live2d.change-model.from-file"))+"... ",1)]),_:1}),S(j,{class:"form-control",onClick:u[3]||(u[3]=d=>l.$emit("extractColorsFromModel"))},{default:E(()=>u[4]||(u[4]=[F(" Extract colors from model ")])),_:1}),S(St,{colors:n.palette.map(d=>({hex:d,name:d}))},null,8,["colors"])]),_:1}),p(i).live2dLoadSource==="file"?(z(),ct(p(ot),{key:0,title:"settings.live2d.edit-motion-map.title",icon:"i-solar:face-scan-circle-bold-duotone"},{default:E(()=>{var d;return[(z(!0),O(J,null,nt(p(i).availableLive2dMotions,g=>(z(),O("div",{key:g.fileName,flex:"","items-center":"","justify-between":"","text-sm":""},[y("span",ne,U(g.fileName),1),y("div",re,[W(y("select",{"onUpdate:modelValue":w=>p(i).live2dMotionMap[g.fileName]=w},[(z(!0),O(J,null,nt(Object.keys(p(rt)),w=>(z(),O("option",{key:w},U(w),1))),128))],8,oe),[[xt,p(i).live2dMotionMap[g.fileName]]]),S(j,{class:"form-control",onClick:w=>p(i).live2dCurrentMotion={group:g.motionName,index:g.motionIndex}},{default:E(()=>u[5]||(u[5]=[F(" Play ")])),_:2},1032,["onClick"])])]))),128)),S(j,{onClick:_},{default:E(()=>u[6]||(u[6]=[F(" Save and patch ")])),_:1}),y("a",{"mt-2":"",block:"",href:p(b),download:`${((d=p(i).live2dModelFile)==null?void 0:d.name)||"live2d"}-motion-edited.zip`},[S(j,{"w-full":""},{default:E(()=>u[7]||(u[7]=[F("Export")])),_:1})],8,se)]}),_:1})):H("",!0)]))}}),le=Ct(ae,[["__scopeId","data-v-de39498b"]]),ue={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},ce={relative:"","text-nowrap":""},he={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]",text:"neutral-300 dark:neutral-500"},me={"text-3xl":"","font-semibold":""},de={flex:""},ge={key:1,text:"neutral-200/50 dark:neutral-500/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},fe=Y({__name:"index",setup(n){const{t}=ut(),e=Mt(),i=R(),r=R(),{width:o,height:s}=kt(i),a=Z(),c=R([]);async function h(){if(!r.value)return;const b=await r.value.captureFrame();if(!b){console.error("No frame captured");return}const l=URL.createObjectURL(b);try{const d=await new P(l).getPalette();c.value=Object.values(d).map(g=>g==null?void 0:g.hex).filter(g=>typeof g=="string")}finally{URL.revokeObjectURL(l)}}const{iconAnimationStarted:m,showIconAnimation:f,animationIcon:_}=zt("i-lucide:person-standing");return(b,l)=>{const u=mt,d=Lt("motion");return z(),O(J,null,[W((z(),O("div",ue,[y("button",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":"",onClick:l[0]||(l[0]=g=>p(e).back())}),y("h1",ce,[y("div",he,U(p(t)("settings.title")),1),y("div",me,U(p(t)("settings.pages.models.title")),1)])])),[[d]]),y("div",de,[y("div",{ref_key:"live2dContainerRef",ref:i,w:"50%",h:"80vh"},[S(gt,{ref_key:"live2dCanvasRef",ref:r,width:p(o),height:p(s)},{default:E(({app:g})=>[S(dt,{app:g,"mouth-open-size":0,width:p(o),height:p(s),paused:!1},null,8,["app","width","height"])]),_:1},8,["width","height"])],512),S(le,{w:"50%",h:"80vh",palette:c.value,onExtractColorsFromModel:h},null,8,["palette"])]),p(f)?(z(),ct(u,{key:0,"z-index":-1,icon:p(_),"icon-size":12,duration:1e3,started:p(m),"is-reverse":!0,position:"calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)","text-color":"text-neutral-200/50 dark:text-neutral-600/20"},null,8,["icon","started"])):H("",!0),p(a).usePageSpecificTransitions?H("",!0):(z(),O("div",ge,l[1]||(l[1]=[y("div",{text:"40","i-lucide:person-standing":""},null,-1)])))],64)}}});typeof st=="function"&&st(fe);export{fe as default}; diff --git a/assets/index-BcT0g1Oh.js b/assets/index-BcT0g1Oh.js new file mode 100644 index 0000000000000000000000000000000000000000..213140e5d591072dfb84572284fcf7eeb3875946 --- /dev/null +++ b/assets/index-BcT0g1Oh.js @@ -0,0 +1 @@ +import{_ as z}from"./IconAnimation.vue_vue_type_script_setup_true_lang-B0Tznm9Y.js";import{d as A,bK as M,bL as O,c as d,o as l,A as c,a as e,b as r,B as w,bI as v,C as h,D as a,bB as P,y as g,z as x,bG as N,v as j,bC as R,q as L,g as q,w as G,bw as K,x as J,e as t,ad as Q,bH as W,bE as X,bx as k,by as Y,bn as Z}from"./index-hDb1Lsb8.js";import"./live2d-zip-loader--bTGFeQd.js";import{_ as f,a as ee}from"./ColorPalette.vue_vue_type_script_setup_true_lang-XM3XfZvN.js";import{u as te}from"./useIconAnimation-DVKfiTTG.js";import{b as D}from"./route-block-B_A1xBdJ.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import"./index-CborASRd.js";const ne={class:"w-full flex cursor-pointer items-center justify-between rounded-lg px-4 py-3 text-sm outline-none transition-all duration-250 ease-in-out",bg:"neutral-50 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700"},se=["aria-checked"],oe={key:0,text:"sm neutral-500"},y=A({__name:"CheckBar",props:M({text:null,iconOn:null,iconOff:null,description:null},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(u){const p=O(u,"modelValue");return(s,m)=>(l(),d("label",ne,[c(e("input",{"onUpdate:modelValue":m[0]||(m[0]=b=>p.value=b),"aria-checked":p.value,type:"checkbox",hidden:""},null,8,se),[[w,p.value]]),e("div",null,[v(a(s.$t(u.text))+" ",1),u.description?(l(),d("div",oe,a(s.$t(u.description)),1)):h("",!0)]),r(P,{name:"slide-away",mode:"out-in"},{default:g(()=>[p.value?(l(),d("div",{key:0,class:x(u.iconOn),transition:"all ease-in-out duration-250"},null,2)):(l(),d("div",{key:1,class:x(u.iconOff),transition:"all ease-in-out duration-250"},null,2))]),_:1})]))}}),ie=[[],["#A5978B","#D8CAAF","#B8B4A7","#C4BCB1","#E5DED8","#9A8F7D","#BEB5A7","#C9C0B6"],["#7A9EAF","#B8C7CC","#D4B79C","#8B9D77","#C7D5CB","#E6D0B1","#94A7B1","#B4C8C3"],["#D9B48F","#B5917A","#8C7A6B","#A17F5F","#B98C46","#C7A252","#DAB300","#D19826"],["#9BA7B0","#C1CBD4","#A5ADB6","#8B959E","#D4DCE4","#7F8A94","#B3BCC6","#98A4AE"],["#E4C6D0","#A61B29","#5D513C","#789262","#1C0D1A","#F7C242","#62A9DD","#8C4B3C"]],ae={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},le={relative:""},re={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},de={text:"neutral-300 dark:neutral-500","text-nowrap":""},ue={"text-nowrap":"","text-3xl":"","font-semibold":""},pe={class:"w-full flex items-center justify-between rounded-lg px-4 py-3 text-sm outline-none transition-all duration-250 ease-in-out",bg:"neutral-50 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700"},me={value:"en-US"},ce={value:"zh-CN"},ge={flex:"","items-center":"","justify-between":""},be={"text-lg":"","font-semibold":""},fe={relative:"",flex:"","cursor-pointer":"","items-center":"","gap-2":""},ye=["disabled"],ve={"font-medium":""},he={text:"sm neutral-500"},xe={key:1,text:"neutral-200/50 dark:neutral-500/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},_=A({__name:"index",setup(u){const p=N(),s=j(),m=R(),{t:b}=L(),C=q(!1),{iconAnimationStarted:$,showIconAnimation:V,animationIcon:E}=te("i-lucide:paintbrush");return G(()=>[s.usePageSpecificTransitions,s.disableTransitions],()=>{C.value=!0}),(i,n)=>{const S=z,T=K("motion");return l(),d(k,null,[c((l(),d("div",ae,[e("button",{onClick:n[0]||(n[0]=o=>t(p).back())},n[7]||(n[7]=[e("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),e("h1",le,[e("div",re,[e("span",de,a(i.$t("settings.title")),1)]),e("div",ue,a(i.$t("settings.pages.themes.title")),1)])])),[[T]]),r(t(f),{title:t(b)("settings.sections.section.general.title"),icon:"i-solar:filters-bold-duotone"},{default:g(()=>[r(y,{modelValue:t(m),"onUpdate:modelValue":n[1]||(n[1]=o=>Q(m)?m.value=o:null),"icon-on":"i-solar:moon-stars-bold-duotone","icon-off":"i-solar:sun-fog-bold-duotone",text:"settings.theme"},null,8,["modelValue"]),e("div",pe,[v(a(i.$t("settings.language.title"))+" ",1),c(e("select",{"onUpdate:modelValue":n[2]||(n[2]=o=>t(s).language=o),transition:"all ease-in-out duration-250","cursor-pointer":"","bg-transparent":"","text-right":"","outline-none":""},[e("option",me,a(i.$t("settings.language.english")),1),e("option",ce,a(i.$t("settings.language.chinese")),1)],512),[[W,t(s).language]])])]),_:1},8,["title"]),r(t(f),{title:t(b)("settings.pages.themes.sections.section.custom-color.title"),icon:"i-solar:pallete-2-bold-duotone"},{default:g(()=>[e("div",ge,[e("span",be,a(i.$t("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.label")),1),e("label",fe,[c(e("input",{"onUpdate:modelValue":n[3]||(n[3]=o=>t(s).themeColorsHueDynamic=o),type:"checkbox",class:"peer sr-only"},null,512),[[w,t(s).themeColorsHueDynamic]]),n[8]||(n[8]=e("div",{class:"peer-checked:bg-primary-500 h-6 w-11 rounded-full bg-neutral-200 after:absolute after:left-[2px] after:top-[2px] after:h-5 after:w-5 after:rounded-full after:bg-white dark:bg-neutral-600 after:transition-all after:content-[''] peer-checked:after:translate-x-full peer-checked:after:border-white"},null,-1)),v(" "+a(i.$t("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.rgb-on.title")),1)])]),c(e("input",{"onUpdate:modelValue":n[4]||(n[4]=o=>t(s).themeColorsHue=o),type:"range",min:"0",max:"360",step:"0.01",class:x(["theme-hue-slider",t(s).themeColorsHueDynamic?"opacity-25 cursor-not-allowed":"cursor-pointer"]),disabled:t(s).themeColorsHueDynamic},null,10,ye),[[X,t(s).themeColorsHue]]),n[9]||(n[9]=e("div",{class:"color-bar"},[e("span",{"bg-primary-50":""},"50"),e("span",{"bg-primary-100":""},"100"),e("span",{"bg-primary-200":""},"200"),e("span",{"bg-primary-300":""},"300"),e("span",{"bg-primary-400":""},"400"),e("span",{"bg-primary-500":""},"500"),e("div",{"text-white":""},[e("span",{"bg-primary-600":""},"600"),e("span",{"bg-primary-700":""},"700"),e("span",{"bg-primary-800":""},"800"),e("span",{"bg-primary-900":""},"900"),e("span",{"bg-primary-950":""},"950")])],-1)),n[10]||(n[10]=e("div",{class:"color-bar transparency-grid"},[e("span",{bg:"primary-500/5"},"500/5"),e("span",{bg:"primary-500/10"},"500/10"),e("span",{bg:"primary-500/20"},"500/20"),e("span",{bg:"primary-500/30"},"500/30"),e("span",{bg:"primary-500/40"},"500/40"),e("span",{bg:"primary-500/50"},"500/50"),e("span",{bg:"primary-500/60"},"500/60"),e("span",{bg:"primary-500/70"},"500/70"),e("span",{bg:"primary-500/80"},"500/80"),e("span",{bg:"primary-500/90"},"500/90"),e("span",{bg:"primary-500"},"500")],-1))]),_:1},8,["title"]),r(t(f),{title:"settings.pages.themes.sections.section.theme-presets.title",icon:"i-solar:magic-stick-2-bold-duotone"},{default:g(()=>[(l(!0),d(k,null,Y(i.$tm("settings.pages.themes.sections.section.theme-presets.presets"),({title:o,description:F,colors:U},B)=>(l(),d("div",{key:B,class:"w-full flex items-center justify-between rounded-lg px-4 py-3 outline-none transition-all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700"},[e("div",null,[e("span",ve,a(i.$rt(o)),1),e("div",he,a(i.$rt(F)),1)]),r(ee,{colors:U.map((H,I)=>({hex:t(ie)[B][I],name:i.$rt(H)}))},null,8,["colors"])]))),128))]),_:1}),r(t(f),{title:"settings.pages.themes.sections.section.developer.title",icon:"i-solar:code-bold-duotone"},{default:g(()=>[r(y,{modelValue:t(s).disableTransitions,"onUpdate:modelValue":n[5]||(n[5]=o=>t(s).disableTransitions=o),"icon-on":"i-solar:people-nearby-bold-duotone","icon-off":"i-solar:running-2-line-duotone",text:"settings.animations.stage-transitions.title"},null,8,["modelValue"]),r(y,{modelValue:t(s).usePageSpecificTransitions,"onUpdate:modelValue":n[6]||(n[6]=o=>t(s).usePageSpecificTransitions=o),disabled:t(s).disableTransitions,"icon-on":"i-solar:running-2-line-duotone","icon-off":"i-solar:people-nearby-bold-duotone",text:"settings.animations.use-page-specific-transitions.title",description:"settings.animations.use-page-specific-transitions.description"},null,8,["modelValue","disabled"])]),_:1}),t(V)&&!C.value?(l(),J(S,{key:0,"z-index":-1,duration:1e3,started:t($),"is-reverse":!0,icon:t(E),"icon-size":12,position:"calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)","text-color":"text-neutral-200/50 dark:text-neutral-600/20"},null,8,["started","icon"])):h("",!0),t(s).usePageSpecificTransitions?h("",!0):(l(),d("div",xe,n[11]||(n[11]=[e("div",{text:"40","i-lucide:paintbrush":""},null,-1)])))],64)}}});typeof D=="function"&&D(_);const Ee=Z(_,[["__scopeId","data-v-a043a63d"]]);export{Ee as default}; diff --git a/assets/index-BhqVpxhd.js b/assets/index-C4ujKJN4.js similarity index 92% rename from assets/index-BhqVpxhd.js rename to assets/index-C4ujKJN4.js index cfa854677b8c26287fe14c4d7dbe5753412cfb1f..7ad2c16f3e6249f4f51d166502f00a0a6097542c 100644 --- a/assets/index-BhqVpxhd.js +++ b/assets/index-C4ujKJN4.js @@ -1 +1 @@ -import{d as r,bG as l,q as c,bw as d,A as p,o as u,c as _,a as t,e as o,D as n}from"./index-7-fr_lhT.js";const x={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},m={relative:""},v={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},f={text:"neutral-300 dark:neutral-500","text-nowrap":""},b={"text-nowrap":"","text-3xl":"","font-semibold":""},h=r({__name:"index",setup(w){const i=l(),{t:s}=c();return(y,e)=>{const a=d("motion");return p((u(),_("div",x,[t("button",{onClick:e[0]||(e[0]=g=>o(i).back())},e[1]||(e[1]=[t("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),t("h1",m,[t("div",v,[t("span",f,n(o(s)("settings.title")),1)]),t("div",b,n(o(s)("settings.pages.memory.title")),1)])])),[[a]])}}});export{h as default}; +import{d as r,bG as l,q as c,bw as d,A as p,o as u,c as _,a as t,e as o,D as n}from"./index-hDb1Lsb8.js";const x={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},m={relative:""},v={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},f={text:"neutral-300 dark:neutral-500","text-nowrap":""},b={"text-nowrap":"","text-3xl":"","font-semibold":""},h=r({__name:"index",setup(w){const i=l(),{t:s}=c();return(y,e)=>{const a=d("motion");return p((u(),_("div",x,[t("button",{onClick:e[0]||(e[0]=g=>o(i).back())},e[1]||(e[1]=[t("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),t("h1",m,[t("div",v,[t("span",f,n(o(s)("settings.title")),1)]),t("div",b,n(o(s)("settings.pages.memory.title")),1)])])),[[a]])}}});export{h as default}; diff --git a/assets/index-ZfK3fTHt.js b/assets/index-CborASRd.js similarity index 99% rename from assets/index-ZfK3fTHt.js rename to assets/index-CborASRd.js index e174312ff314bc8ceca425f8d27dae158b7f1b18..bd147ecce8559085811b716b35dcf906aad356fd 100644 --- a/assets/index-ZfK3fTHt.js +++ b/assets/index-CborASRd.js @@ -1,3 +1,3 @@ -import{h as O,g as E,G as Mt,w as j,ah as Lt,ai as Ft,bS as xe,e as m,d as D,x as T,o as B,y as A,m as P,bT as de,bU as fe,bV as F,bJ as Ze,bv as ge,l as De,E as lt,C as Nt,b as me,bW as yn,bX as ye,bY as wn,bZ as kt,b_ as bn,b$ as ke,c0 as xn,c1 as On,br as Cn,H as It,bx as An,c2 as Wt,c3 as En,c4 as Ht,c5 as xt,af as K,ab as Dn,bI as Pn,D as _n,c as Vt,n as st,c6 as jt,c7 as Bn,c8 as zt,c9 as Tn,ca as Rn,a as $n,cb as Sn,cc as Mn}from"./index-7-fr_lhT.js";const Ln=["top","right","bottom","left"],ae=Math.min,H=Math.max,Ie=Math.round,Me=Math.floor,G=e=>({x:e,y:e}),Fn={left:"right",right:"left",bottom:"top",top:"bottom"},Nn={start:"end",end:"start"};function Qe(e,t,n){return H(e,ae(t,n))}function ee(e,t){return typeof e=="function"?e(t):e}function te(e){return e.split("-")[0]}function Pe(e){return e.split("-")[1]}function at(e){return e==="x"?"y":"x"}function ut(e){return e==="y"?"height":"width"}function ue(e){return["top","bottom"].includes(te(e))?"y":"x"}function ct(e){return at(ue(e))}function kn(e,t,n){n===void 0&&(n=!1);const o=Pe(e),i=ct(e),r=ut(i);let l=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(l=We(l)),[l,We(l)]}function In(e){const t=We(e);return[et(e),t,et(t)]}function et(e){return e.replace(/start|end/g,t=>Nn[t])}function Wn(e,t,n){const o=["left","right"],i=["right","left"],r=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:o:t?o:i;case"left":case"right":return t?r:l;default:return[]}}function Hn(e,t,n,o){const i=Pe(e);let r=Wn(te(e),n==="start",o);return i&&(r=r.map(l=>l+"-"+i),t&&(r=r.concat(r.map(et)))),r}function We(e){return e.replace(/left|right|bottom|top/g,t=>Fn[t])}function Vn(e){return{top:0,right:0,bottom:0,left:0,...e}}function Kt(e){return typeof e!="number"?Vn(e):{top:e,right:e,bottom:e,left:e}}function He(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function Ot(e,t,n){let{reference:o,floating:i}=e;const r=ue(t),l=ct(t),s=ut(l),d=te(t),c=r==="y",a=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,p=o[s]/2-i[s]/2;let f;switch(d){case"top":f={x:a,y:o.y-i.height};break;case"bottom":f={x:a,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}switch(Pe(t)){case"start":f[l]-=p*(n&&c?-1:1);break;case"end":f[l]+=p*(n&&c?-1:1);break}return f}const jn=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:l}=n,s=r.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:a,y:u}=Ot(c,o,d),p=o,f={},v=0;for(let g=0;g({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:r,platform:l,elements:s,middlewareData:d}=t,{element:c,padding:a=0}=ee(e,t)||{};if(c==null)return{};const u=Kt(a),p={x:n,y:o},f=ct(i),v=ut(f),g=await l.getDimensions(c),h=f==="y",y=h?"top":"left",b=h?"bottom":"right",w=h?"clientHeight":"clientWidth",C=r.reference[v]+r.reference[f]-p[f]-r.floating[v],x=p[f]-r.reference[f],S=await(l.getOffsetParent==null?void 0:l.getOffsetParent(c));let _=S?S[w]:0;(!_||!await(l.isElement==null?void 0:l.isElement(S)))&&(_=s.floating[w]||r.floating[v]);const M=C/2-x/2,N=_/2-g[v]/2-1,R=ae(u[y],N),z=ae(u[b],N),k=R,W=_-g[v]-z,L=_/2-g[v]/2+M,oe=Qe(k,L,W),I=!d.arrow&&Pe(i)!=null&&L!==oe&&r.reference[v]/2-(LL<=0)){var z,k;const L=(((z=r.flip)==null?void 0:z.index)||0)+1,oe=_[L];if(oe)return{data:{index:L,overflows:R},reset:{placement:oe}};let I=(k=R.filter(q=>q.overflows[0]<=0).sort((q,ie)=>q.overflows[1]-ie.overflows[1])[0])==null?void 0:k.placement;if(!I)switch(f){case"bestFit":{var W;const q=(W=R.filter(ie=>{if(S){const re=ue(ie.placement);return re===b||re==="y"}return!0}).map(ie=>[ie.placement,ie.overflows.filter(re=>re>0).reduce((re,gn)=>re+gn,0)]).sort((ie,re)=>ie[1]-re[1])[0])==null?void 0:W[0];q&&(I=q);break}case"initialPlacement":I=s;break}if(i!==I)return{reset:{placement:I}}}return{}}}};function Ct(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function At(e){return Ln.some(t=>e[t]>=0)}const Un=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...i}=ee(e,t);switch(o){case"referenceHidden":{const r=await _e(t,{...i,elementContext:"reference"}),l=Ct(r,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:At(l)}}}case"escaped":{const r=await _e(t,{...i,altBoundary:!0}),l=Ct(r,n.floating);return{data:{escapedOffsets:l,escaped:At(l)}}}default:return{}}}}};async function Yn(e,t){const{placement:n,platform:o,elements:i}=e,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),l=te(n),s=Pe(n),d=ue(n)==="y",c=["left","top"].includes(l)?-1:1,a=r&&d?-1:1,u=ee(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:v}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof v=="number"&&(f=s==="end"?v*-1:v),d?{x:f*a,y:p*c}:{x:p*c,y:f*a}}const Xn=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:r,placement:l,middlewareData:s}=t,d=await Yn(t,e);return l===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:i+d.x,y:r+d.y,data:{...d,placement:l}}}}},qn=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:r=!0,crossAxis:l=!1,limiter:s={fn:h=>{let{x:y,y:b}=h;return{x:y,y:b}}},...d}=ee(e,t),c={x:n,y:o},a=await _e(t,d),u=ue(te(i)),p=at(u);let f=c[p],v=c[u];if(r){const h=p==="y"?"top":"left",y=p==="y"?"bottom":"right",b=f+a[h],w=f-a[y];f=Qe(b,f,w)}if(l){const h=u==="y"?"top":"left",y=u==="y"?"bottom":"right",b=v+a[h],w=v-a[y];v=Qe(b,v,w)}const g=s.fn({...t,[p]:f,[u]:v});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[p]:r,[u]:l}}}}}},Gn=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:r,middlewareData:l}=t,{offset:s=0,mainAxis:d=!0,crossAxis:c=!0}=ee(e,t),a={x:n,y:o},u=ue(i),p=at(u);let f=a[p],v=a[u];const g=ee(s,t),h=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(d){const w=p==="y"?"height":"width",C=r.reference[p]-r.floating[w]+h.mainAxis,x=r.reference[p]+r.reference[w]-h.mainAxis;fx&&(f=x)}if(c){var y,b;const w=p==="y"?"width":"height",C=["top","left"].includes(te(i)),x=r.reference[u]-r.floating[w]+(C&&((y=l.offset)==null?void 0:y[u])||0)+(C?0:h.crossAxis),S=r.reference[u]+r.reference[w]+(C?0:((b=l.offset)==null?void 0:b[u])||0)-(C?h.crossAxis:0);vS&&(v=S)}return{[p]:f,[u]:v}}}},Jn=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:r,platform:l,elements:s}=t,{apply:d=()=>{},...c}=ee(e,t),a=await _e(t,c),u=te(i),p=Pe(i),f=ue(i)==="y",{width:v,height:g}=r.floating;let h,y;u==="top"||u==="bottom"?(h=u,y=p===(await(l.isRTL==null?void 0:l.isRTL(s.floating))?"start":"end")?"left":"right"):(y=u,h=p==="end"?"top":"bottom");const b=g-a.top-a.bottom,w=v-a.left-a.right,C=ae(g-a[h],b),x=ae(v-a[y],w),S=!t.middlewareData.shift;let _=C,M=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=w),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(_=b),S&&!p){const R=H(a.left,0),z=H(a.right,0),k=H(a.top,0),W=H(a.bottom,0);f?M=v-2*(R!==0||z!==0?R+z:H(a.left,a.right)):_=g-2*(k!==0||W!==0?k+W:H(a.top,a.bottom))}await d({...t,availableWidth:M,availableHeight:_});const N=await l.getDimensions(s.floating);return v!==N.width||g!==N.height?{reset:{rects:!0}}:{}}}};function je(){return typeof window<"u"}function we(e){return dt(e)?(e.nodeName||"").toLowerCase():"#document"}function V(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Z(e){var t;return(t=(dt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dt(e){return je()?e instanceof Node||e instanceof V(e).Node:!1}function U(e){return je()?e instanceof Element||e instanceof V(e).Element:!1}function J(e){return je()?e instanceof HTMLElement||e instanceof V(e).HTMLElement:!1}function Et(e){return!je()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof V(e).ShadowRoot}function Te(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=Y(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(i)}function Zn(e){return["table","td","th"].includes(we(e))}function ze(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ft(e){const t=pt(),n=U(e)?Y(e):e;return["transform","translate","scale","rotate","perspective"].some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function Qn(e){let t=ce(e);for(;J(t)&&!Ee(t);){if(ft(t))return t;if(ze(t))return null;t=ce(t)}return null}function pt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ee(e){return["html","body","#document"].includes(we(e))}function Y(e){return V(e).getComputedStyle(e)}function Ke(e){return U(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ce(e){if(we(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Et(e)&&e.host||Z(e);return Et(t)?t.host:t}function Ut(e){const t=ce(e);return Ee(t)?e.ownerDocument?e.ownerDocument.body:e.body:J(t)&&Te(t)?t:Ut(t)}function Be(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Ut(e),r=i===((o=e.ownerDocument)==null?void 0:o.body),l=V(i);if(r){const s=tt(l);return t.concat(l,l.visualViewport||[],Te(i)?i:[],s&&n?Be(s):[])}return t.concat(i,Be(i,[],n))}function tt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Yt(e){const t=Y(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=J(e),r=i?e.offsetWidth:n,l=i?e.offsetHeight:o,s=Ie(n)!==r||Ie(o)!==l;return s&&(n=r,o=l),{width:n,height:o,$:s}}function vt(e){return U(e)?e:e.contextElement}function Ae(e){const t=vt(e);if(!J(t))return G(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:r}=Yt(t);let l=(r?Ie(n.width):n.width)/o,s=(r?Ie(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!s||!Number.isFinite(s))&&(s=1),{x:l,y:s}}const eo=G(0);function Xt(e){const t=V(e);return!pt()||!t.visualViewport?eo:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function to(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==V(e)?!1:t}function he(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),r=vt(e);let l=G(1);t&&(o?U(o)&&(l=Ae(o)):l=Ae(e));const s=to(r,n,o)?Xt(r):G(0);let d=(i.left+s.x)/l.x,c=(i.top+s.y)/l.y,a=i.width/l.x,u=i.height/l.y;if(r){const p=V(r),f=o&&U(o)?V(o):o;let v=p,g=tt(v);for(;g&&o&&f!==v;){const h=Ae(g),y=g.getBoundingClientRect(),b=Y(g),w=y.left+(g.clientLeft+parseFloat(b.paddingLeft))*h.x,C=y.top+(g.clientTop+parseFloat(b.paddingTop))*h.y;d*=h.x,c*=h.y,a*=h.x,u*=h.y,d+=w,c+=C,v=V(g),g=tt(v)}}return He({width:a,height:u,x:d,y:c})}function mt(e,t){const n=Ke(e).scrollLeft;return t?t.left+n:he(Z(e)).left+n}function qt(e,t,n){n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=o.left+t.scrollLeft-(n?0:mt(e,o)),r=o.top+t.scrollTop;return{x:i,y:r}}function no(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const r=i==="fixed",l=Z(o),s=t?ze(t.floating):!1;if(o===l||s&&r)return n;let d={scrollLeft:0,scrollTop:0},c=G(1);const a=G(0),u=J(o);if((u||!u&&!r)&&((we(o)!=="body"||Te(l))&&(d=Ke(o)),J(o))){const f=he(o);c=Ae(o),a.x=f.x+o.clientLeft,a.y=f.y+o.clientTop}const p=l&&!u&&!r?qt(l,d,!0):G(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-d.scrollLeft*c.x+a.x+p.x,y:n.y*c.y-d.scrollTop*c.y+a.y+p.y}}function oo(e){return Array.from(e.getClientRects())}function io(e){const t=Z(e),n=Ke(e),o=e.ownerDocument.body,i=H(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=H(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+mt(e);const s=-n.scrollTop;return Y(o).direction==="rtl"&&(l+=H(t.clientWidth,o.clientWidth)-i),{width:i,height:r,x:l,y:s}}function ro(e,t){const n=V(e),o=Z(e),i=n.visualViewport;let r=o.clientWidth,l=o.clientHeight,s=0,d=0;if(i){r=i.width,l=i.height;const c=pt();(!c||c&&t==="fixed")&&(s=i.offsetLeft,d=i.offsetTop)}return{width:r,height:l,x:s,y:d}}function lo(e,t){const n=he(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,r=J(e)?Ae(e):G(1),l=e.clientWidth*r.x,s=e.clientHeight*r.y,d=i*r.x,c=o*r.y;return{width:l,height:s,x:d,y:c}}function Dt(e,t,n){let o;if(t==="viewport")o=ro(e,n);else if(t==="document")o=io(Z(e));else if(U(t))o=lo(t,n);else{const i=Xt(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return He(o)}function Gt(e,t){const n=ce(e);return n===t||!U(n)||Ee(n)?!1:Y(n).position==="fixed"||Gt(n,t)}function so(e,t){const n=t.get(e);if(n)return n;let o=Be(e,[],!1).filter(s=>U(s)&&we(s)!=="body"),i=null;const r=Y(e).position==="fixed";let l=r?ce(e):e;for(;U(l)&&!Ee(l);){const s=Y(l),d=ft(l);!d&&s.position==="fixed"&&(i=null),(r?!d&&!i:!d&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Te(l)&&!d&&Gt(e,l))?o=o.filter(a=>a!==l):i=s,l=ce(l)}return t.set(e,o),o}function ao(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const l=[...n==="clippingAncestors"?ze(t)?[]:so(t,this._c):[].concat(n),o],s=l[0],d=l.reduce((c,a)=>{const u=Dt(t,a,i);return c.top=H(u.top,c.top),c.right=ae(u.right,c.right),c.bottom=ae(u.bottom,c.bottom),c.left=H(u.left,c.left),c},Dt(t,s,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function uo(e){const{width:t,height:n}=Yt(e);return{width:t,height:n}}function co(e,t,n){const o=J(t),i=Z(t),r=n==="fixed",l=he(e,!0,r,t);let s={scrollLeft:0,scrollTop:0};const d=G(0);if(o||!o&&!r)if((we(t)!=="body"||Te(i))&&(s=Ke(t)),o){const p=he(t,!0,r,t);d.x=p.x+t.clientLeft,d.y=p.y+t.clientTop}else i&&(d.x=mt(i));const c=i&&!o&&!r?qt(i,s):G(0),a=l.left+s.scrollLeft-d.x-c.x,u=l.top+s.scrollTop-d.y-c.y;return{x:a,y:u,width:l.width,height:l.height}}function Ye(e){return Y(e).position==="static"}function Pt(e,t){if(!J(e)||Y(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Z(e)===n&&(n=n.ownerDocument.body),n}function Jt(e,t){const n=V(e);if(ze(e))return n;if(!J(e)){let i=ce(e);for(;i&&!Ee(i);){if(U(i)&&!Ye(i))return i;i=ce(i)}return n}let o=Pt(e,t);for(;o&&Zn(o)&&Ye(o);)o=Pt(o,t);return o&&Ee(o)&&Ye(o)&&!ft(o)?n:o||Qn(e)||n}const fo=async function(e){const t=this.getOffsetParent||Jt,n=this.getDimensions,o=await n(e.floating);return{reference:co(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function po(e){return Y(e).direction==="rtl"}const vo={convertOffsetParentRelativeRectToViewportRelativeRect:no,getDocumentElement:Z,getClippingRect:ao,getOffsetParent:Jt,getElementRects:fo,getClientRects:oo,getDimensions:uo,getScale:Ae,isElement:U,isRTL:po};function Zt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function mo(e,t){let n=null,o;const i=Z(e);function r(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function l(s,d){s===void 0&&(s=!1),d===void 0&&(d=1),r();const c=e.getBoundingClientRect(),{left:a,top:u,width:p,height:f}=c;if(s||t(),!p||!f)return;const v=Me(u),g=Me(i.clientWidth-(a+p)),h=Me(i.clientHeight-(u+f)),y=Me(a),w={rootMargin:-v+"px "+-g+"px "+-h+"px "+-y+"px",threshold:H(0,ae(1,d))||1};let C=!0;function x(S){const _=S[0].intersectionRatio;if(_!==d){if(!C)return l();_?l(!1,_):o=setTimeout(()=>{l(!1,1e-7)},1e3)}_===1&&!Zt(c,e.getBoundingClientRect())&&l(),C=!1}try{n=new IntersectionObserver(x,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver(x,w)}n.observe(e)}return l(!0),r}function ho(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:d=!1}=o,c=vt(e),a=i||r?[...c?Be(c):[],...Be(t)]:[];a.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),r&&y.addEventListener("resize",n)});const u=c&&s?mo(c,n):null;let p=-1,f=null;l&&(f=new ResizeObserver(y=>{let[b]=y;b&&b.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=f)==null||w.observe(t)})),n()}),c&&!d&&f.observe(c),f.observe(t));let v,g=d?he(e):null;d&&h();function h(){const y=he(e);g&&!Zt(g,y)&&n(),g=y,v=requestAnimationFrame(h)}return n(),()=>{var y;a.forEach(b=>{i&&b.removeEventListener("scroll",n),r&&b.removeEventListener("resize",n)}),u==null||u(),(y=f)==null||y.disconnect(),f=null,d&&cancelAnimationFrame(v)}}const go=Xn,yo=qn,_t=Kn,wo=Jn,bo=Un,xo=zn,Oo=Gn,Co=(e,t,n)=>{const o=new Map,i={platform:vo,...n},r={...i.platform,_c:o};return jn(e,t,{...i,platform:r})};function Ao(e){return e!=null&&typeof e=="object"&&"$el"in e}function nt(e){if(Ao(e)){const t=e.$el;return dt(t)&&we(t)==="#comment"?null:t}return e}function Ce(e){return typeof e=="function"?e():m(e)}function Eo(e){return{name:"arrow",options:e,fn(t){const n=nt(Ce(e.element));return n==null?{}:xo({element:n,padding:e.padding}).fn(t)}}}function Qt(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Bt(e,t){const n=Qt(e);return Math.round(t*n)/n}function Do(e,t,n){n===void 0&&(n={});const o=n.whileElementsMounted,i=O(()=>{var _;return(_=Ce(n.open))!=null?_:!0}),r=O(()=>Ce(n.middleware)),l=O(()=>{var _;return(_=Ce(n.placement))!=null?_:"bottom"}),s=O(()=>{var _;return(_=Ce(n.strategy))!=null?_:"absolute"}),d=O(()=>{var _;return(_=Ce(n.transform))!=null?_:!0}),c=O(()=>nt(e.value)),a=O(()=>nt(t.value)),u=E(0),p=E(0),f=E(s.value),v=E(l.value),g=Mt({}),h=E(!1),y=O(()=>{const _={position:f.value,left:"0",top:"0"};if(!a.value)return _;const M=Bt(a.value,u.value),N=Bt(a.value,p.value);return d.value?{..._,transform:"translate("+M+"px, "+N+"px)",...Qt(a.value)>=1.5&&{willChange:"transform"}}:{position:f.value,left:M+"px",top:N+"px"}});let b;function w(){if(c.value==null||a.value==null)return;const _=i.value;Co(c.value,a.value,{middleware:r.value,placement:l.value,strategy:s.value}).then(M=>{u.value=M.x,p.value=M.y,f.value=M.strategy,v.value=M.placement,g.value=M.middlewareData,h.value=_!==!1})}function C(){typeof b=="function"&&(b(),b=void 0)}function x(){if(C(),o===void 0){w();return}if(c.value!=null&&a.value!=null){b=o(c.value,a.value,w);return}}function S(){i.value||(h.value=!1)}return j([r,l,s,i],w,{flush:"sync"}),j([c,a],x,{flush:"sync"}),j(i,S,{flush:"sync"}),Lt()&&Ft(C),{x:xe(u),y:xe(p),strategy:xe(f),placement:xe(v),middlewareData:xe(g),isPositioned:xe(h),floatingStyles:y,update:w}}function be(e,t){const n=typeof e=="string"&&!t?`${e}Context`:t,o=Symbol(n);return[i=>{const r=bn(o,i);if(r||r===null)return r;throw new Error(`Injection \`${o.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`)},i=>(Mn(o,i),i)]}function en(e,t,n){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),o.dispatchEvent(i)}function Po(e,t){var n;const o=Mt();return K(()=>{o.value=e()},{...t,flush:(n=void 0)!=null?n:"sync"}),Ht(o)}function Re(e){return Lt()?(Ft(e),!0):!1}function _o(){const e=new Set,t=n=>{e.delete(n)};return{on:n=>{e.add(n);const o=()=>t(n);return Re(o),{off:o}},off:t,trigger:(...n)=>Promise.all(Array.from(e).map(o=>o(...n)))}}function Bo(e){let t=!1,n;const o=jt(!0);return(...i)=>(t||(n=o.run(()=>e(...i)),t=!0),n)}function To(e){let t=0,n,o;const i=()=>{t-=1,o&&t<=0&&(o.stop(),n=void 0,o=void 0)};return(...r)=>(t+=1,n||(o=jt(!0),n=o.run(()=>e(...r))),Re(i),n)}function ve(e){return typeof e=="function"?e():m(e)}const pe=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ro=e=>typeof e<"u",$o=Object.prototype.toString,So=e=>$o.call(e)==="[object Object]",Mo=()=>{},Tt=Lo();function Lo(){var e,t;return pe&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Fo(e){return ye()}function No(e,t=1e4){return Sn((n,o)=>{let i=ve(e),r;const l=()=>setTimeout(()=>{i=ve(e),o()},ve(t));return Re(()=>{clearTimeout(r)}),{get(){return n(),i},set(s){i=s,o(),clearTimeout(r),r=l()}}})}function ko(e,t){Fo()&&Bn(e,t)}function tn(e,t,n={}){const{immediate:o=!0}=n,i=E(!1);let r=null;function l(){r&&(clearTimeout(r),r=null)}function s(){i.value=!1,l()}function d(...c){l(),i.value=!0,r=setTimeout(()=>{i.value=!1,r=null,e(...c)},ve(t))}return o&&(i.value=!0,pe&&d()),Re(s),{isPending:Ht(i),start:d,stop:s}}function $e(e){var t;const n=ve(e);return(t=n==null?void 0:n.$el)!=null?t:n}const ht=pe?window:void 0;function Ve(...e){let t,n,o,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,i]=e,t=ht):[t,n,o,i]=e,!t)return Mo;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const r=[],l=()=>{r.forEach(a=>a()),r.length=0},s=(a,u,p,f)=>(a.addEventListener(u,p,f),()=>a.removeEventListener(u,p,f)),d=j(()=>[$e(t),ve(i)],([a,u])=>{if(l(),!a)return;const p=So(u)?{...u}:u;r.push(...n.flatMap(f=>o.map(v=>s(a,f,v,p))))},{immediate:!0,flush:"post"}),c=()=>{d(),l()};return Re(c),c}function Io(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Wo(...e){let t,n,o={};e.length===3?(t=e[0],n=e[1],o=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],o=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:i=ht,eventName:r="keydown",passive:l=!1,dedupe:s=!1}=o,d=Io(t);return Ve(i,r,c=>{c.repeat&&ve(s)||d(c)&&n(c)},l)}function Ho(){const e=E(!1),t=ye();return t&&De(()=>{e.value=!0},t),e}function Vo(e){return JSON.parse(JSON.stringify(e))}function nn(e,t,n,o={}){var i,r,l;const{clone:s=!1,passive:d=!1,eventName:c,deep:a=!1,defaultValue:u,shouldEmit:p}=o,f=ye(),v=n||(f==null?void 0:f.emit)||((i=f==null?void 0:f.$emit)==null?void 0:i.bind(f))||((l=(r=f==null?void 0:f.proxy)==null?void 0:r.$emit)==null?void 0:l.bind(f==null?void 0:f.proxy));let g=c;g=g||`update:${t.toString()}`;const h=w=>s?typeof s=="function"?s(w):Vo(w):w,y=()=>Ro(e[t])?h(e[t]):u,b=w=>{p?p(w)&&v(g,w):v(g,w)};if(d){const w=y(),C=E(w);let x=!1;return j(()=>e[t],S=>{x||(x=!0,C.value=h(S),ge(()=>x=!1))}),j(C,S=>{!x&&(S!==e[t]||a)&&b(S)},{deep:a}),C}else return O({get(){return y()},set(w){b(w)}})}function gt(e){return e?e.flatMap(t=>t.type===An?gt(t.children):[t]):[]}function se(){let e=document.activeElement;if(e==null)return null;for(;e!=null&&e.shadowRoot!=null&&e.shadowRoot.activeElement!=null;)e=e.shadowRoot.activeElement;return e}function Xe(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function ot(e,t,n=".",o){if(!Xe(t))return ot(e,{},n);const i=Object.assign({},t);for(const r in e){if(r==="__proto__"||r==="constructor")continue;const l=e[r];l!=null&&(Array.isArray(l)&&Array.isArray(i[r])?i[r]=[...l,...i[r]]:Xe(l)&&Xe(i[r])?i[r]=ot(l,i[r],(n?`${n}.`:"")+r.toString()):i[r]=l)}return i}function jo(e){return(...t)=>t.reduce((n,o)=>ot(n,o,""),{})}const zo=jo(),[on,nr]=be("ConfigProvider");let Ko="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Uo=(e=21)=>{let t="",n=e;for(;n--;)t+=Ko[Math.random()*64|0];return t};const Yo=To(()=>{const e=E(new Map),t=E(),n=O(()=>{for(const l of e.value.values())if(l)return!0;return!1}),o=on({scrollBody:E(!0)});let i=null;const r=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.body.style.removeProperty("--scrollbar-width"),document.body.style.overflow=t.value??"",Tt&&(i==null||i()),t.value=void 0};return j(n,(l,s)=>{var d;if(!pe)return;if(!l){s&&r();return}t.value===void 0&&(t.value=document.body.style.overflow);const c=window.innerWidth-document.documentElement.clientWidth,a={padding:c,margin:0},u=(d=o.scrollBody)!=null&&d.value?typeof o.scrollBody.value=="object"?zo({padding:o.scrollBody.value.padding===!0?c:o.scrollBody.value.padding,margin:o.scrollBody.value.margin===!0?c:o.scrollBody.value.margin},a):a:{padding:0,margin:0};c>0&&(document.body.style.paddingRight=typeof u.padding=="number"?`${u.padding}px`:String(u.padding),document.body.style.marginRight=typeof u.margin=="number"?`${u.margin}px`:String(u.margin),document.body.style.setProperty("--scrollbar-width",`${c}px`),document.body.style.overflow="hidden"),Tt&&(i=Ve(document,"touchmove",p=>qo(p),{passive:!1})),ge(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),e});function Xo(e){const t=Uo(6),n=Yo();n.value.set(t,e);const o=O({get:()=>n.value.get(t)??!1,set:i=>n.value.set(t,i)});return ko(()=>{n.value.delete(t)}),o}function rn(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}function Se(e){const t=ye(),n=t==null?void 0:t.type.emits,o={};return n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${t==null?void 0:t.type.__name}`),n==null||n.forEach(i=>{o[wn(kt(i))]=(...r)=>e(i,...r)}),o}function ln(e){const t=ye(),n=Object.keys((t==null?void 0:t.type.props)??{}).reduce((i,r)=>{const l=(t==null?void 0:t.type.props[r]).default;return l!==void 0&&(i[r]=l),i},{}),o=Cn(e);return O(()=>{const i={},r=(t==null?void 0:t.vnode.props)??{};return Object.keys(r).forEach(l=>{i[kt(l)]=r[l]}),Object.keys({...n,...i}).reduce((l,s)=>(o.value[s]!==void 0&&(l[s]=o.value[s]),l),{})})}function sn(e,t){const n=ln(e),o=t?Se(t):{};return O(()=>({...n.value,...o}))}function $(){const e=ye(),t=E(),n=O(()=>{var l,s;return["#text","#comment"].includes((l=t.value)==null?void 0:l.$el.nodeName)?(s=t.value)==null?void 0:s.$el.nextElementSibling:$e(t)}),o=Object.assign({},e.exposed),i={};for(const l in e.props)Object.defineProperty(i,l,{enumerable:!0,configurable:!0,get:()=>e.props[l]});if(Object.keys(o).length>0)for(const l in o)Object.defineProperty(i,l,{enumerable:!0,configurable:!0,get:()=>o[l]});Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=i;function r(l){t.value=l,l&&(Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>l instanceof Element?l:l.$el}),e.exposed=i)}return{forwardRef:r,currentRef:t,currentElement:n}}function Go(e,t){const n=No(!1,300),o=E(null),i=_o();function r(){o.value=null,n.value=!1}function l(s,d){const c=s.currentTarget,a={x:s.clientX,y:s.clientY},u=Jo(a,c.getBoundingClientRect()),p=Zo(a,u),f=Qo(d.getBoundingClientRect()),v=ti([...p,...f]);o.value=v,n.value=!0}return K(s=>{if(e.value&&t.value){const d=a=>l(a,t.value),c=a=>l(a,e.value);e.value.addEventListener("pointerleave",d),t.value.addEventListener("pointerleave",c),s(()=>{var a,u;(a=e.value)==null||a.removeEventListener("pointerleave",d),(u=t.value)==null||u.removeEventListener("pointerleave",c)})}}),K(s=>{var d;if(o.value){const c=a=>{var u,p;if(!o.value)return;const f=a.target,v={x:a.clientX,y:a.clientY},g=((u=e.value)==null?void 0:u.contains(f))||((p=t.value)==null?void 0:p.contains(f)),h=!ei(v,o.value),y=!!f.closest("[data-grace-area-trigger]");g?r():(h||y)&&(r(),i.trigger())};(d=e.value)==null||d.ownerDocument.addEventListener("pointermove",c),s(()=>{var a;return(a=e.value)==null?void 0:a.ownerDocument.removeEventListener("pointermove",c)})}}),{isPointerInTransit:n,onPointerExit:i.on}}function Jo(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),r=Math.abs(t.left-e.x);switch(Math.min(n,o,i,r)){case r:return"left";case i:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Zo(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function Qo(e){const{top:t,right:n,bottom:o,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:o},{x:i,y:o}]}function ei(e,t){const{x:n,y:o}=e;let i=!1;for(let r=0,l=t.length-1;ro!=a>o&&n<(c-s)*(o-d)/(a-d)+s&&(i=!i)}return i}function ti(e){const t=e.slice();return t.sort((n,o)=>n.xo.x?1:n.yo.y?1:0),ni(t)}function ni(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o=2;){const r=t[t.length-1],l=t[t.length-2];if((r.x-l.x)*(i.y-l.y)>=(r.y-l.y)*(i.x-l.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const i=e[o];for(;n.length>=2;){const r=n[n.length-1],l=n[n.length-2];if((r.x-l.x)*(i.y-l.y)>=(r.y-l.y)*(i.x-l.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var oi=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Oe=new WeakMap,Le=new WeakMap,Fe={},qe=0,an=function(e){return e&&(e.host||an(e.parentNode))},ii=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=an(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},ri=function(e,t,n,o){var i=ii(t,Array.isArray(e)?e:[e]);Fe[n]||(Fe[n]=new WeakMap);var r=Fe[n],l=[],s=new Set,d=new Set(i),c=function(u){!u||s.has(u)||(s.add(u),c(u.parentNode))};i.forEach(c);var a=function(u){!u||d.has(u)||Array.prototype.forEach.call(u.children,function(p){if(s.has(p))a(p);else try{var f=p.getAttribute(o),v=f!==null&&f!=="false",g=(Oe.get(p)||0)+1,h=(r.get(p)||0)+1;Oe.set(p,g),r.set(p,h),l.push(p),g===1&&v&&Le.set(p,!0),h===1&&p.setAttribute(n,"true"),v||p.setAttribute(o,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return a(t),s.clear(),qe++,function(){l.forEach(function(u){var p=Oe.get(u)-1,f=r.get(u)-1;Oe.set(u,p),r.set(u,f),p||(Le.has(u)||u.removeAttribute(o),Le.delete(u)),f||u.removeAttribute(n)}),qe--,qe||(Oe=new WeakMap,Oe=new WeakMap,Le=new WeakMap,Fe={})}},li=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),i=oi(e);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live]"))),ri(o,i,n,"aria-hidden")):function(){return null}};function si(e){let t;j(()=>$e(e),n=>{n?t=li(n):t&&t()}),It(()=>{t&&t()})}let ai=0;function it(e,t="radix"){const n=on({useId:void 0});return xt?`${t}-${xt()}`:n.useId?`${t}-${n.useId()}`:`${t}-${++ai}`}function ui(e){const t=E(),n=O(()=>{var i;return((i=t.value)==null?void 0:i.width)??0}),o=O(()=>{var i;return((i=t.value)==null?void 0:i.height)??0});return De(()=>{const i=$e(e);if(i){t.value={width:i.offsetWidth,height:i.offsetHeight};const r=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const s=l[0];let d,c;if("borderBoxSize"in s){const a=s.borderBoxSize,u=Array.isArray(a)?a[0]:a;d=u.inlineSize,c=u.blockSize}else d=i.offsetWidth,c=i.offsetHeight;t.value={width:d,height:c}});return r.observe(i,{box:"border-box"}),()=>r.unobserve(i)}else t.value=void 0}),{width:n,height:o}}function ci(e,t){const n=E(e);function o(i){return t[n.value][i]??n.value}return{state:n,dispatch:i=>{n.value=o(i)}}}const di=D({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{var o,i;if(!n.default)return null;const r=gt(n.default()),l=r.findIndex(a=>a.type!==Wt);if(l===-1)return r;const s=r[l];(o=s.props)==null||delete o.ref;const d=s.props?F(t,s.props):t;t.class&&(i=s.props)!=null&&i.class&&delete s.props.class;const c=En(s,d);for(const a in d)a.startsWith("on")&&(c.props||(c.props={}),c.props[a]=d[a]);return r.length===1?c:(r[l]=c,r)}}}),X=D({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:t,slots:n}){const o=e.asChild?"template":e.as;return typeof o=="string"&&["area","img","input"].includes(o)?()=>ke(o,t):o!=="template"?()=>ke(e.as,t,{default:n.default}):()=>ke(di,t,{default:n.default})}});function fi(e,t){var n;const o=E({}),i=E("none"),r=E(e),l=e.value?"mounted":"unmounted";let s;const d=((n=t.value)==null?void 0:n.ownerDocument.defaultView)??ht,{state:c,dispatch:a}=ci(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),u=h=>{var y;if(pe){const b=new CustomEvent(h,{bubbles:!1,cancelable:!1});(y=t.value)==null||y.dispatchEvent(b)}};j(e,async(h,y)=>{var b;const w=y!==h;if(await ge(),w){const C=i.value,x=Ne(t.value);h?(a("MOUNT"),u("enter"),x==="none"&&u("after-enter")):x==="none"||((b=o.value)==null?void 0:b.display)==="none"?(a("UNMOUNT"),u("leave"),u("after-leave")):y&&C!==x?(a("ANIMATION_OUT"),u("leave")):(a("UNMOUNT"),u("after-leave"))}},{immediate:!0});const p=h=>{const y=Ne(t.value),b=y.includes(h.animationName),w=c.value==="mounted"?"enter":"leave";if(h.target===t.value&&b&&(u(`after-${w}`),a("ANIMATION_END"),!r.value)){const C=t.value.style.animationFillMode;t.value.style.animationFillMode="forwards",s=d==null?void 0:d.setTimeout(()=>{var x;((x=t.value)==null?void 0:x.style.animationFillMode)==="forwards"&&(t.value.style.animationFillMode=C)})}h.target===t.value&&y==="none"&&a("ANIMATION_END")},f=h=>{h.target===t.value&&(i.value=Ne(t.value))},v=j(t,(h,y)=>{h?(o.value=getComputedStyle(h),h.addEventListener("animationstart",f),h.addEventListener("animationcancel",p),h.addEventListener("animationend",p)):(a("ANIMATION_END"),s!==void 0&&(d==null||d.clearTimeout(s)),y==null||y.removeEventListener("animationstart",f),y==null||y.removeEventListener("animationcancel",p),y==null||y.removeEventListener("animationend",p))},{immediate:!0}),g=j(c,()=>{const h=Ne(t.value);i.value=c.value==="mounted"?h:"none"});return It(()=>{v(),g()}),{isPresent:O(()=>["mounted","unmountSuspended"].includes(c.value))}}function Ne(e){return e&&getComputedStyle(e).animationName||"none"}const yt=D({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:n}){var o;const{present:i,forceMount:r}=lt(e),l=E(),{isPresent:s}=fi(i,l);n({present:s});let d=t.default({present:s});d=gt(d||[]);const c=ye();if(d&&(d==null?void 0:d.length)>1){const a=(o=c==null?void 0:c.parent)!=null&&o.type.name?`<${c.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${a}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(u=>` - ${u}`).join(` +import{h as O,g as E,G as Mt,w as j,ah as Lt,ai as Ft,bS as xe,e as m,d as D,x as T,o as B,y as A,m as P,bT as de,bU as fe,bV as F,bJ as Ze,bv as ge,l as De,E as lt,C as Nt,b as me,bW as yn,bX as ye,bY as wn,bZ as kt,b_ as bn,b$ as ke,c0 as xn,c1 as On,br as Cn,H as It,bx as An,c2 as Wt,c3 as En,c4 as Ht,c5 as xt,af as K,ab as Dn,bI as Pn,D as _n,c as Vt,n as st,c6 as jt,c7 as Bn,c8 as zt,c9 as Tn,ca as Rn,a as $n,cb as Sn,cc as Mn}from"./index-hDb1Lsb8.js";const Ln=["top","right","bottom","left"],ae=Math.min,H=Math.max,Ie=Math.round,Me=Math.floor,G=e=>({x:e,y:e}),Fn={left:"right",right:"left",bottom:"top",top:"bottom"},Nn={start:"end",end:"start"};function Qe(e,t,n){return H(e,ae(t,n))}function ee(e,t){return typeof e=="function"?e(t):e}function te(e){return e.split("-")[0]}function Pe(e){return e.split("-")[1]}function at(e){return e==="x"?"y":"x"}function ut(e){return e==="y"?"height":"width"}function ue(e){return["top","bottom"].includes(te(e))?"y":"x"}function ct(e){return at(ue(e))}function kn(e,t,n){n===void 0&&(n=!1);const o=Pe(e),i=ct(e),r=ut(i);let l=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(l=We(l)),[l,We(l)]}function In(e){const t=We(e);return[et(e),t,et(t)]}function et(e){return e.replace(/start|end/g,t=>Nn[t])}function Wn(e,t,n){const o=["left","right"],i=["right","left"],r=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:o:t?o:i;case"left":case"right":return t?r:l;default:return[]}}function Hn(e,t,n,o){const i=Pe(e);let r=Wn(te(e),n==="start",o);return i&&(r=r.map(l=>l+"-"+i),t&&(r=r.concat(r.map(et)))),r}function We(e){return e.replace(/left|right|bottom|top/g,t=>Fn[t])}function Vn(e){return{top:0,right:0,bottom:0,left:0,...e}}function Kt(e){return typeof e!="number"?Vn(e):{top:e,right:e,bottom:e,left:e}}function He(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function Ot(e,t,n){let{reference:o,floating:i}=e;const r=ue(t),l=ct(t),s=ut(l),d=te(t),c=r==="y",a=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,p=o[s]/2-i[s]/2;let f;switch(d){case"top":f={x:a,y:o.y-i.height};break;case"bottom":f={x:a,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}switch(Pe(t)){case"start":f[l]-=p*(n&&c?-1:1);break;case"end":f[l]+=p*(n&&c?-1:1);break}return f}const jn=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:l}=n,s=r.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:a,y:u}=Ot(c,o,d),p=o,f={},v=0;for(let g=0;g({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:r,platform:l,elements:s,middlewareData:d}=t,{element:c,padding:a=0}=ee(e,t)||{};if(c==null)return{};const u=Kt(a),p={x:n,y:o},f=ct(i),v=ut(f),g=await l.getDimensions(c),h=f==="y",y=h?"top":"left",b=h?"bottom":"right",w=h?"clientHeight":"clientWidth",C=r.reference[v]+r.reference[f]-p[f]-r.floating[v],x=p[f]-r.reference[f],S=await(l.getOffsetParent==null?void 0:l.getOffsetParent(c));let _=S?S[w]:0;(!_||!await(l.isElement==null?void 0:l.isElement(S)))&&(_=s.floating[w]||r.floating[v]);const M=C/2-x/2,N=_/2-g[v]/2-1,R=ae(u[y],N),z=ae(u[b],N),k=R,W=_-g[v]-z,L=_/2-g[v]/2+M,oe=Qe(k,L,W),I=!d.arrow&&Pe(i)!=null&&L!==oe&&r.reference[v]/2-(LL<=0)){var z,k;const L=(((z=r.flip)==null?void 0:z.index)||0)+1,oe=_[L];if(oe)return{data:{index:L,overflows:R},reset:{placement:oe}};let I=(k=R.filter(q=>q.overflows[0]<=0).sort((q,ie)=>q.overflows[1]-ie.overflows[1])[0])==null?void 0:k.placement;if(!I)switch(f){case"bestFit":{var W;const q=(W=R.filter(ie=>{if(S){const re=ue(ie.placement);return re===b||re==="y"}return!0}).map(ie=>[ie.placement,ie.overflows.filter(re=>re>0).reduce((re,gn)=>re+gn,0)]).sort((ie,re)=>ie[1]-re[1])[0])==null?void 0:W[0];q&&(I=q);break}case"initialPlacement":I=s;break}if(i!==I)return{reset:{placement:I}}}return{}}}};function Ct(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function At(e){return Ln.some(t=>e[t]>=0)}const Un=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...i}=ee(e,t);switch(o){case"referenceHidden":{const r=await _e(t,{...i,elementContext:"reference"}),l=Ct(r,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:At(l)}}}case"escaped":{const r=await _e(t,{...i,altBoundary:!0}),l=Ct(r,n.floating);return{data:{escapedOffsets:l,escaped:At(l)}}}default:return{}}}}};async function Yn(e,t){const{placement:n,platform:o,elements:i}=e,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),l=te(n),s=Pe(n),d=ue(n)==="y",c=["left","top"].includes(l)?-1:1,a=r&&d?-1:1,u=ee(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:v}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof v=="number"&&(f=s==="end"?v*-1:v),d?{x:f*a,y:p*c}:{x:p*c,y:f*a}}const Xn=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:r,placement:l,middlewareData:s}=t,d=await Yn(t,e);return l===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:i+d.x,y:r+d.y,data:{...d,placement:l}}}}},qn=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:r=!0,crossAxis:l=!1,limiter:s={fn:h=>{let{x:y,y:b}=h;return{x:y,y:b}}},...d}=ee(e,t),c={x:n,y:o},a=await _e(t,d),u=ue(te(i)),p=at(u);let f=c[p],v=c[u];if(r){const h=p==="y"?"top":"left",y=p==="y"?"bottom":"right",b=f+a[h],w=f-a[y];f=Qe(b,f,w)}if(l){const h=u==="y"?"top":"left",y=u==="y"?"bottom":"right",b=v+a[h],w=v-a[y];v=Qe(b,v,w)}const g=s.fn({...t,[p]:f,[u]:v});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[p]:r,[u]:l}}}}}},Gn=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:r,middlewareData:l}=t,{offset:s=0,mainAxis:d=!0,crossAxis:c=!0}=ee(e,t),a={x:n,y:o},u=ue(i),p=at(u);let f=a[p],v=a[u];const g=ee(s,t),h=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(d){const w=p==="y"?"height":"width",C=r.reference[p]-r.floating[w]+h.mainAxis,x=r.reference[p]+r.reference[w]-h.mainAxis;fx&&(f=x)}if(c){var y,b;const w=p==="y"?"width":"height",C=["top","left"].includes(te(i)),x=r.reference[u]-r.floating[w]+(C&&((y=l.offset)==null?void 0:y[u])||0)+(C?0:h.crossAxis),S=r.reference[u]+r.reference[w]+(C?0:((b=l.offset)==null?void 0:b[u])||0)-(C?h.crossAxis:0);vS&&(v=S)}return{[p]:f,[u]:v}}}},Jn=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:r,platform:l,elements:s}=t,{apply:d=()=>{},...c}=ee(e,t),a=await _e(t,c),u=te(i),p=Pe(i),f=ue(i)==="y",{width:v,height:g}=r.floating;let h,y;u==="top"||u==="bottom"?(h=u,y=p===(await(l.isRTL==null?void 0:l.isRTL(s.floating))?"start":"end")?"left":"right"):(y=u,h=p==="end"?"top":"bottom");const b=g-a.top-a.bottom,w=v-a.left-a.right,C=ae(g-a[h],b),x=ae(v-a[y],w),S=!t.middlewareData.shift;let _=C,M=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=w),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(_=b),S&&!p){const R=H(a.left,0),z=H(a.right,0),k=H(a.top,0),W=H(a.bottom,0);f?M=v-2*(R!==0||z!==0?R+z:H(a.left,a.right)):_=g-2*(k!==0||W!==0?k+W:H(a.top,a.bottom))}await d({...t,availableWidth:M,availableHeight:_});const N=await l.getDimensions(s.floating);return v!==N.width||g!==N.height?{reset:{rects:!0}}:{}}}};function je(){return typeof window<"u"}function we(e){return dt(e)?(e.nodeName||"").toLowerCase():"#document"}function V(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Z(e){var t;return(t=(dt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dt(e){return je()?e instanceof Node||e instanceof V(e).Node:!1}function U(e){return je()?e instanceof Element||e instanceof V(e).Element:!1}function J(e){return je()?e instanceof HTMLElement||e instanceof V(e).HTMLElement:!1}function Et(e){return!je()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof V(e).ShadowRoot}function Te(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=Y(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(i)}function Zn(e){return["table","td","th"].includes(we(e))}function ze(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ft(e){const t=pt(),n=U(e)?Y(e):e;return["transform","translate","scale","rotate","perspective"].some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function Qn(e){let t=ce(e);for(;J(t)&&!Ee(t);){if(ft(t))return t;if(ze(t))return null;t=ce(t)}return null}function pt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ee(e){return["html","body","#document"].includes(we(e))}function Y(e){return V(e).getComputedStyle(e)}function Ke(e){return U(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ce(e){if(we(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Et(e)&&e.host||Z(e);return Et(t)?t.host:t}function Ut(e){const t=ce(e);return Ee(t)?e.ownerDocument?e.ownerDocument.body:e.body:J(t)&&Te(t)?t:Ut(t)}function Be(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Ut(e),r=i===((o=e.ownerDocument)==null?void 0:o.body),l=V(i);if(r){const s=tt(l);return t.concat(l,l.visualViewport||[],Te(i)?i:[],s&&n?Be(s):[])}return t.concat(i,Be(i,[],n))}function tt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Yt(e){const t=Y(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=J(e),r=i?e.offsetWidth:n,l=i?e.offsetHeight:o,s=Ie(n)!==r||Ie(o)!==l;return s&&(n=r,o=l),{width:n,height:o,$:s}}function vt(e){return U(e)?e:e.contextElement}function Ae(e){const t=vt(e);if(!J(t))return G(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:r}=Yt(t);let l=(r?Ie(n.width):n.width)/o,s=(r?Ie(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!s||!Number.isFinite(s))&&(s=1),{x:l,y:s}}const eo=G(0);function Xt(e){const t=V(e);return!pt()||!t.visualViewport?eo:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function to(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==V(e)?!1:t}function he(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),r=vt(e);let l=G(1);t&&(o?U(o)&&(l=Ae(o)):l=Ae(e));const s=to(r,n,o)?Xt(r):G(0);let d=(i.left+s.x)/l.x,c=(i.top+s.y)/l.y,a=i.width/l.x,u=i.height/l.y;if(r){const p=V(r),f=o&&U(o)?V(o):o;let v=p,g=tt(v);for(;g&&o&&f!==v;){const h=Ae(g),y=g.getBoundingClientRect(),b=Y(g),w=y.left+(g.clientLeft+parseFloat(b.paddingLeft))*h.x,C=y.top+(g.clientTop+parseFloat(b.paddingTop))*h.y;d*=h.x,c*=h.y,a*=h.x,u*=h.y,d+=w,c+=C,v=V(g),g=tt(v)}}return He({width:a,height:u,x:d,y:c})}function mt(e,t){const n=Ke(e).scrollLeft;return t?t.left+n:he(Z(e)).left+n}function qt(e,t,n){n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=o.left+t.scrollLeft-(n?0:mt(e,o)),r=o.top+t.scrollTop;return{x:i,y:r}}function no(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const r=i==="fixed",l=Z(o),s=t?ze(t.floating):!1;if(o===l||s&&r)return n;let d={scrollLeft:0,scrollTop:0},c=G(1);const a=G(0),u=J(o);if((u||!u&&!r)&&((we(o)!=="body"||Te(l))&&(d=Ke(o)),J(o))){const f=he(o);c=Ae(o),a.x=f.x+o.clientLeft,a.y=f.y+o.clientTop}const p=l&&!u&&!r?qt(l,d,!0):G(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-d.scrollLeft*c.x+a.x+p.x,y:n.y*c.y-d.scrollTop*c.y+a.y+p.y}}function oo(e){return Array.from(e.getClientRects())}function io(e){const t=Z(e),n=Ke(e),o=e.ownerDocument.body,i=H(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=H(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+mt(e);const s=-n.scrollTop;return Y(o).direction==="rtl"&&(l+=H(t.clientWidth,o.clientWidth)-i),{width:i,height:r,x:l,y:s}}function ro(e,t){const n=V(e),o=Z(e),i=n.visualViewport;let r=o.clientWidth,l=o.clientHeight,s=0,d=0;if(i){r=i.width,l=i.height;const c=pt();(!c||c&&t==="fixed")&&(s=i.offsetLeft,d=i.offsetTop)}return{width:r,height:l,x:s,y:d}}function lo(e,t){const n=he(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,r=J(e)?Ae(e):G(1),l=e.clientWidth*r.x,s=e.clientHeight*r.y,d=i*r.x,c=o*r.y;return{width:l,height:s,x:d,y:c}}function Dt(e,t,n){let o;if(t==="viewport")o=ro(e,n);else if(t==="document")o=io(Z(e));else if(U(t))o=lo(t,n);else{const i=Xt(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return He(o)}function Gt(e,t){const n=ce(e);return n===t||!U(n)||Ee(n)?!1:Y(n).position==="fixed"||Gt(n,t)}function so(e,t){const n=t.get(e);if(n)return n;let o=Be(e,[],!1).filter(s=>U(s)&&we(s)!=="body"),i=null;const r=Y(e).position==="fixed";let l=r?ce(e):e;for(;U(l)&&!Ee(l);){const s=Y(l),d=ft(l);!d&&s.position==="fixed"&&(i=null),(r?!d&&!i:!d&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Te(l)&&!d&&Gt(e,l))?o=o.filter(a=>a!==l):i=s,l=ce(l)}return t.set(e,o),o}function ao(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const l=[...n==="clippingAncestors"?ze(t)?[]:so(t,this._c):[].concat(n),o],s=l[0],d=l.reduce((c,a)=>{const u=Dt(t,a,i);return c.top=H(u.top,c.top),c.right=ae(u.right,c.right),c.bottom=ae(u.bottom,c.bottom),c.left=H(u.left,c.left),c},Dt(t,s,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function uo(e){const{width:t,height:n}=Yt(e);return{width:t,height:n}}function co(e,t,n){const o=J(t),i=Z(t),r=n==="fixed",l=he(e,!0,r,t);let s={scrollLeft:0,scrollTop:0};const d=G(0);if(o||!o&&!r)if((we(t)!=="body"||Te(i))&&(s=Ke(t)),o){const p=he(t,!0,r,t);d.x=p.x+t.clientLeft,d.y=p.y+t.clientTop}else i&&(d.x=mt(i));const c=i&&!o&&!r?qt(i,s):G(0),a=l.left+s.scrollLeft-d.x-c.x,u=l.top+s.scrollTop-d.y-c.y;return{x:a,y:u,width:l.width,height:l.height}}function Ye(e){return Y(e).position==="static"}function Pt(e,t){if(!J(e)||Y(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Z(e)===n&&(n=n.ownerDocument.body),n}function Jt(e,t){const n=V(e);if(ze(e))return n;if(!J(e)){let i=ce(e);for(;i&&!Ee(i);){if(U(i)&&!Ye(i))return i;i=ce(i)}return n}let o=Pt(e,t);for(;o&&Zn(o)&&Ye(o);)o=Pt(o,t);return o&&Ee(o)&&Ye(o)&&!ft(o)?n:o||Qn(e)||n}const fo=async function(e){const t=this.getOffsetParent||Jt,n=this.getDimensions,o=await n(e.floating);return{reference:co(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function po(e){return Y(e).direction==="rtl"}const vo={convertOffsetParentRelativeRectToViewportRelativeRect:no,getDocumentElement:Z,getClippingRect:ao,getOffsetParent:Jt,getElementRects:fo,getClientRects:oo,getDimensions:uo,getScale:Ae,isElement:U,isRTL:po};function Zt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function mo(e,t){let n=null,o;const i=Z(e);function r(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function l(s,d){s===void 0&&(s=!1),d===void 0&&(d=1),r();const c=e.getBoundingClientRect(),{left:a,top:u,width:p,height:f}=c;if(s||t(),!p||!f)return;const v=Me(u),g=Me(i.clientWidth-(a+p)),h=Me(i.clientHeight-(u+f)),y=Me(a),w={rootMargin:-v+"px "+-g+"px "+-h+"px "+-y+"px",threshold:H(0,ae(1,d))||1};let C=!0;function x(S){const _=S[0].intersectionRatio;if(_!==d){if(!C)return l();_?l(!1,_):o=setTimeout(()=>{l(!1,1e-7)},1e3)}_===1&&!Zt(c,e.getBoundingClientRect())&&l(),C=!1}try{n=new IntersectionObserver(x,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver(x,w)}n.observe(e)}return l(!0),r}function ho(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:d=!1}=o,c=vt(e),a=i||r?[...c?Be(c):[],...Be(t)]:[];a.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),r&&y.addEventListener("resize",n)});const u=c&&s?mo(c,n):null;let p=-1,f=null;l&&(f=new ResizeObserver(y=>{let[b]=y;b&&b.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=f)==null||w.observe(t)})),n()}),c&&!d&&f.observe(c),f.observe(t));let v,g=d?he(e):null;d&&h();function h(){const y=he(e);g&&!Zt(g,y)&&n(),g=y,v=requestAnimationFrame(h)}return n(),()=>{var y;a.forEach(b=>{i&&b.removeEventListener("scroll",n),r&&b.removeEventListener("resize",n)}),u==null||u(),(y=f)==null||y.disconnect(),f=null,d&&cancelAnimationFrame(v)}}const go=Xn,yo=qn,_t=Kn,wo=Jn,bo=Un,xo=zn,Oo=Gn,Co=(e,t,n)=>{const o=new Map,i={platform:vo,...n},r={...i.platform,_c:o};return jn(e,t,{...i,platform:r})};function Ao(e){return e!=null&&typeof e=="object"&&"$el"in e}function nt(e){if(Ao(e)){const t=e.$el;return dt(t)&&we(t)==="#comment"?null:t}return e}function Ce(e){return typeof e=="function"?e():m(e)}function Eo(e){return{name:"arrow",options:e,fn(t){const n=nt(Ce(e.element));return n==null?{}:xo({element:n,padding:e.padding}).fn(t)}}}function Qt(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Bt(e,t){const n=Qt(e);return Math.round(t*n)/n}function Do(e,t,n){n===void 0&&(n={});const o=n.whileElementsMounted,i=O(()=>{var _;return(_=Ce(n.open))!=null?_:!0}),r=O(()=>Ce(n.middleware)),l=O(()=>{var _;return(_=Ce(n.placement))!=null?_:"bottom"}),s=O(()=>{var _;return(_=Ce(n.strategy))!=null?_:"absolute"}),d=O(()=>{var _;return(_=Ce(n.transform))!=null?_:!0}),c=O(()=>nt(e.value)),a=O(()=>nt(t.value)),u=E(0),p=E(0),f=E(s.value),v=E(l.value),g=Mt({}),h=E(!1),y=O(()=>{const _={position:f.value,left:"0",top:"0"};if(!a.value)return _;const M=Bt(a.value,u.value),N=Bt(a.value,p.value);return d.value?{..._,transform:"translate("+M+"px, "+N+"px)",...Qt(a.value)>=1.5&&{willChange:"transform"}}:{position:f.value,left:M+"px",top:N+"px"}});let b;function w(){if(c.value==null||a.value==null)return;const _=i.value;Co(c.value,a.value,{middleware:r.value,placement:l.value,strategy:s.value}).then(M=>{u.value=M.x,p.value=M.y,f.value=M.strategy,v.value=M.placement,g.value=M.middlewareData,h.value=_!==!1})}function C(){typeof b=="function"&&(b(),b=void 0)}function x(){if(C(),o===void 0){w();return}if(c.value!=null&&a.value!=null){b=o(c.value,a.value,w);return}}function S(){i.value||(h.value=!1)}return j([r,l,s,i],w,{flush:"sync"}),j([c,a],x,{flush:"sync"}),j(i,S,{flush:"sync"}),Lt()&&Ft(C),{x:xe(u),y:xe(p),strategy:xe(f),placement:xe(v),middlewareData:xe(g),isPositioned:xe(h),floatingStyles:y,update:w}}function be(e,t){const n=typeof e=="string"&&!t?`${e}Context`:t,o=Symbol(n);return[i=>{const r=bn(o,i);if(r||r===null)return r;throw new Error(`Injection \`${o.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`)},i=>(Mn(o,i),i)]}function en(e,t,n){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),o.dispatchEvent(i)}function Po(e,t){var n;const o=Mt();return K(()=>{o.value=e()},{...t,flush:(n=void 0)!=null?n:"sync"}),Ht(o)}function Re(e){return Lt()?(Ft(e),!0):!1}function _o(){const e=new Set,t=n=>{e.delete(n)};return{on:n=>{e.add(n);const o=()=>t(n);return Re(o),{off:o}},off:t,trigger:(...n)=>Promise.all(Array.from(e).map(o=>o(...n)))}}function Bo(e){let t=!1,n;const o=jt(!0);return(...i)=>(t||(n=o.run(()=>e(...i)),t=!0),n)}function To(e){let t=0,n,o;const i=()=>{t-=1,o&&t<=0&&(o.stop(),n=void 0,o=void 0)};return(...r)=>(t+=1,n||(o=jt(!0),n=o.run(()=>e(...r))),Re(i),n)}function ve(e){return typeof e=="function"?e():m(e)}const pe=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ro=e=>typeof e<"u",$o=Object.prototype.toString,So=e=>$o.call(e)==="[object Object]",Mo=()=>{},Tt=Lo();function Lo(){var e,t;return pe&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Fo(e){return ye()}function No(e,t=1e4){return Sn((n,o)=>{let i=ve(e),r;const l=()=>setTimeout(()=>{i=ve(e),o()},ve(t));return Re(()=>{clearTimeout(r)}),{get(){return n(),i},set(s){i=s,o(),clearTimeout(r),r=l()}}})}function ko(e,t){Fo()&&Bn(e,t)}function tn(e,t,n={}){const{immediate:o=!0}=n,i=E(!1);let r=null;function l(){r&&(clearTimeout(r),r=null)}function s(){i.value=!1,l()}function d(...c){l(),i.value=!0,r=setTimeout(()=>{i.value=!1,r=null,e(...c)},ve(t))}return o&&(i.value=!0,pe&&d()),Re(s),{isPending:Ht(i),start:d,stop:s}}function $e(e){var t;const n=ve(e);return(t=n==null?void 0:n.$el)!=null?t:n}const ht=pe?window:void 0;function Ve(...e){let t,n,o,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,i]=e,t=ht):[t,n,o,i]=e,!t)return Mo;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const r=[],l=()=>{r.forEach(a=>a()),r.length=0},s=(a,u,p,f)=>(a.addEventListener(u,p,f),()=>a.removeEventListener(u,p,f)),d=j(()=>[$e(t),ve(i)],([a,u])=>{if(l(),!a)return;const p=So(u)?{...u}:u;r.push(...n.flatMap(f=>o.map(v=>s(a,f,v,p))))},{immediate:!0,flush:"post"}),c=()=>{d(),l()};return Re(c),c}function Io(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Wo(...e){let t,n,o={};e.length===3?(t=e[0],n=e[1],o=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],o=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:i=ht,eventName:r="keydown",passive:l=!1,dedupe:s=!1}=o,d=Io(t);return Ve(i,r,c=>{c.repeat&&ve(s)||d(c)&&n(c)},l)}function Ho(){const e=E(!1),t=ye();return t&&De(()=>{e.value=!0},t),e}function Vo(e){return JSON.parse(JSON.stringify(e))}function nn(e,t,n,o={}){var i,r,l;const{clone:s=!1,passive:d=!1,eventName:c,deep:a=!1,defaultValue:u,shouldEmit:p}=o,f=ye(),v=n||(f==null?void 0:f.emit)||((i=f==null?void 0:f.$emit)==null?void 0:i.bind(f))||((l=(r=f==null?void 0:f.proxy)==null?void 0:r.$emit)==null?void 0:l.bind(f==null?void 0:f.proxy));let g=c;g=g||`update:${t.toString()}`;const h=w=>s?typeof s=="function"?s(w):Vo(w):w,y=()=>Ro(e[t])?h(e[t]):u,b=w=>{p?p(w)&&v(g,w):v(g,w)};if(d){const w=y(),C=E(w);let x=!1;return j(()=>e[t],S=>{x||(x=!0,C.value=h(S),ge(()=>x=!1))}),j(C,S=>{!x&&(S!==e[t]||a)&&b(S)},{deep:a}),C}else return O({get(){return y()},set(w){b(w)}})}function gt(e){return e?e.flatMap(t=>t.type===An?gt(t.children):[t]):[]}function se(){let e=document.activeElement;if(e==null)return null;for(;e!=null&&e.shadowRoot!=null&&e.shadowRoot.activeElement!=null;)e=e.shadowRoot.activeElement;return e}function Xe(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function ot(e,t,n=".",o){if(!Xe(t))return ot(e,{},n);const i=Object.assign({},t);for(const r in e){if(r==="__proto__"||r==="constructor")continue;const l=e[r];l!=null&&(Array.isArray(l)&&Array.isArray(i[r])?i[r]=[...l,...i[r]]:Xe(l)&&Xe(i[r])?i[r]=ot(l,i[r],(n?`${n}.`:"")+r.toString()):i[r]=l)}return i}function jo(e){return(...t)=>t.reduce((n,o)=>ot(n,o,""),{})}const zo=jo(),[on,nr]=be("ConfigProvider");let Ko="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Uo=(e=21)=>{let t="",n=e;for(;n--;)t+=Ko[Math.random()*64|0];return t};const Yo=To(()=>{const e=E(new Map),t=E(),n=O(()=>{for(const l of e.value.values())if(l)return!0;return!1}),o=on({scrollBody:E(!0)});let i=null;const r=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.body.style.removeProperty("--scrollbar-width"),document.body.style.overflow=t.value??"",Tt&&(i==null||i()),t.value=void 0};return j(n,(l,s)=>{var d;if(!pe)return;if(!l){s&&r();return}t.value===void 0&&(t.value=document.body.style.overflow);const c=window.innerWidth-document.documentElement.clientWidth,a={padding:c,margin:0},u=(d=o.scrollBody)!=null&&d.value?typeof o.scrollBody.value=="object"?zo({padding:o.scrollBody.value.padding===!0?c:o.scrollBody.value.padding,margin:o.scrollBody.value.margin===!0?c:o.scrollBody.value.margin},a):a:{padding:0,margin:0};c>0&&(document.body.style.paddingRight=typeof u.padding=="number"?`${u.padding}px`:String(u.padding),document.body.style.marginRight=typeof u.margin=="number"?`${u.margin}px`:String(u.margin),document.body.style.setProperty("--scrollbar-width",`${c}px`),document.body.style.overflow="hidden"),Tt&&(i=Ve(document,"touchmove",p=>qo(p),{passive:!1})),ge(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),e});function Xo(e){const t=Uo(6),n=Yo();n.value.set(t,e);const o=O({get:()=>n.value.get(t)??!1,set:i=>n.value.set(t,i)});return ko(()=>{n.value.delete(t)}),o}function rn(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}function Se(e){const t=ye(),n=t==null?void 0:t.type.emits,o={};return n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${t==null?void 0:t.type.__name}`),n==null||n.forEach(i=>{o[wn(kt(i))]=(...r)=>e(i,...r)}),o}function ln(e){const t=ye(),n=Object.keys((t==null?void 0:t.type.props)??{}).reduce((i,r)=>{const l=(t==null?void 0:t.type.props[r]).default;return l!==void 0&&(i[r]=l),i},{}),o=Cn(e);return O(()=>{const i={},r=(t==null?void 0:t.vnode.props)??{};return Object.keys(r).forEach(l=>{i[kt(l)]=r[l]}),Object.keys({...n,...i}).reduce((l,s)=>(o.value[s]!==void 0&&(l[s]=o.value[s]),l),{})})}function sn(e,t){const n=ln(e),o=t?Se(t):{};return O(()=>({...n.value,...o}))}function $(){const e=ye(),t=E(),n=O(()=>{var l,s;return["#text","#comment"].includes((l=t.value)==null?void 0:l.$el.nodeName)?(s=t.value)==null?void 0:s.$el.nextElementSibling:$e(t)}),o=Object.assign({},e.exposed),i={};for(const l in e.props)Object.defineProperty(i,l,{enumerable:!0,configurable:!0,get:()=>e.props[l]});if(Object.keys(o).length>0)for(const l in o)Object.defineProperty(i,l,{enumerable:!0,configurable:!0,get:()=>o[l]});Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=i;function r(l){t.value=l,l&&(Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>l instanceof Element?l:l.$el}),e.exposed=i)}return{forwardRef:r,currentRef:t,currentElement:n}}function Go(e,t){const n=No(!1,300),o=E(null),i=_o();function r(){o.value=null,n.value=!1}function l(s,d){const c=s.currentTarget,a={x:s.clientX,y:s.clientY},u=Jo(a,c.getBoundingClientRect()),p=Zo(a,u),f=Qo(d.getBoundingClientRect()),v=ti([...p,...f]);o.value=v,n.value=!0}return K(s=>{if(e.value&&t.value){const d=a=>l(a,t.value),c=a=>l(a,e.value);e.value.addEventListener("pointerleave",d),t.value.addEventListener("pointerleave",c),s(()=>{var a,u;(a=e.value)==null||a.removeEventListener("pointerleave",d),(u=t.value)==null||u.removeEventListener("pointerleave",c)})}}),K(s=>{var d;if(o.value){const c=a=>{var u,p;if(!o.value)return;const f=a.target,v={x:a.clientX,y:a.clientY},g=((u=e.value)==null?void 0:u.contains(f))||((p=t.value)==null?void 0:p.contains(f)),h=!ei(v,o.value),y=!!f.closest("[data-grace-area-trigger]");g?r():(h||y)&&(r(),i.trigger())};(d=e.value)==null||d.ownerDocument.addEventListener("pointermove",c),s(()=>{var a;return(a=e.value)==null?void 0:a.ownerDocument.removeEventListener("pointermove",c)})}}),{isPointerInTransit:n,onPointerExit:i.on}}function Jo(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),r=Math.abs(t.left-e.x);switch(Math.min(n,o,i,r)){case r:return"left";case i:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Zo(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function Qo(e){const{top:t,right:n,bottom:o,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:o},{x:i,y:o}]}function ei(e,t){const{x:n,y:o}=e;let i=!1;for(let r=0,l=t.length-1;ro!=a>o&&n<(c-s)*(o-d)/(a-d)+s&&(i=!i)}return i}function ti(e){const t=e.slice();return t.sort((n,o)=>n.xo.x?1:n.yo.y?1:0),ni(t)}function ni(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o=2;){const r=t[t.length-1],l=t[t.length-2];if((r.x-l.x)*(i.y-l.y)>=(r.y-l.y)*(i.x-l.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const i=e[o];for(;n.length>=2;){const r=n[n.length-1],l=n[n.length-2];if((r.x-l.x)*(i.y-l.y)>=(r.y-l.y)*(i.x-l.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var oi=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Oe=new WeakMap,Le=new WeakMap,Fe={},qe=0,an=function(e){return e&&(e.host||an(e.parentNode))},ii=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=an(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},ri=function(e,t,n,o){var i=ii(t,Array.isArray(e)?e:[e]);Fe[n]||(Fe[n]=new WeakMap);var r=Fe[n],l=[],s=new Set,d=new Set(i),c=function(u){!u||s.has(u)||(s.add(u),c(u.parentNode))};i.forEach(c);var a=function(u){!u||d.has(u)||Array.prototype.forEach.call(u.children,function(p){if(s.has(p))a(p);else try{var f=p.getAttribute(o),v=f!==null&&f!=="false",g=(Oe.get(p)||0)+1,h=(r.get(p)||0)+1;Oe.set(p,g),r.set(p,h),l.push(p),g===1&&v&&Le.set(p,!0),h===1&&p.setAttribute(n,"true"),v||p.setAttribute(o,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return a(t),s.clear(),qe++,function(){l.forEach(function(u){var p=Oe.get(u)-1,f=r.get(u)-1;Oe.set(u,p),r.set(u,f),p||(Le.has(u)||u.removeAttribute(o),Le.delete(u)),f||u.removeAttribute(n)}),qe--,qe||(Oe=new WeakMap,Oe=new WeakMap,Le=new WeakMap,Fe={})}},li=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),i=oi(e);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live]"))),ri(o,i,n,"aria-hidden")):function(){return null}};function si(e){let t;j(()=>$e(e),n=>{n?t=li(n):t&&t()}),It(()=>{t&&t()})}let ai=0;function it(e,t="radix"){const n=on({useId:void 0});return xt?`${t}-${xt()}`:n.useId?`${t}-${n.useId()}`:`${t}-${++ai}`}function ui(e){const t=E(),n=O(()=>{var i;return((i=t.value)==null?void 0:i.width)??0}),o=O(()=>{var i;return((i=t.value)==null?void 0:i.height)??0});return De(()=>{const i=$e(e);if(i){t.value={width:i.offsetWidth,height:i.offsetHeight};const r=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const s=l[0];let d,c;if("borderBoxSize"in s){const a=s.borderBoxSize,u=Array.isArray(a)?a[0]:a;d=u.inlineSize,c=u.blockSize}else d=i.offsetWidth,c=i.offsetHeight;t.value={width:d,height:c}});return r.observe(i,{box:"border-box"}),()=>r.unobserve(i)}else t.value=void 0}),{width:n,height:o}}function ci(e,t){const n=E(e);function o(i){return t[n.value][i]??n.value}return{state:n,dispatch:i=>{n.value=o(i)}}}const di=D({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{var o,i;if(!n.default)return null;const r=gt(n.default()),l=r.findIndex(a=>a.type!==Wt);if(l===-1)return r;const s=r[l];(o=s.props)==null||delete o.ref;const d=s.props?F(t,s.props):t;t.class&&(i=s.props)!=null&&i.class&&delete s.props.class;const c=En(s,d);for(const a in d)a.startsWith("on")&&(c.props||(c.props={}),c.props[a]=d[a]);return r.length===1?c:(r[l]=c,r)}}}),X=D({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:t,slots:n}){const o=e.asChild?"template":e.as;return typeof o=="string"&&["area","img","input"].includes(o)?()=>ke(o,t):o!=="template"?()=>ke(e.as,t,{default:n.default}):()=>ke(di,t,{default:n.default})}});function fi(e,t){var n;const o=E({}),i=E("none"),r=E(e),l=e.value?"mounted":"unmounted";let s;const d=((n=t.value)==null?void 0:n.ownerDocument.defaultView)??ht,{state:c,dispatch:a}=ci(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),u=h=>{var y;if(pe){const b=new CustomEvent(h,{bubbles:!1,cancelable:!1});(y=t.value)==null||y.dispatchEvent(b)}};j(e,async(h,y)=>{var b;const w=y!==h;if(await ge(),w){const C=i.value,x=Ne(t.value);h?(a("MOUNT"),u("enter"),x==="none"&&u("after-enter")):x==="none"||((b=o.value)==null?void 0:b.display)==="none"?(a("UNMOUNT"),u("leave"),u("after-leave")):y&&C!==x?(a("ANIMATION_OUT"),u("leave")):(a("UNMOUNT"),u("after-leave"))}},{immediate:!0});const p=h=>{const y=Ne(t.value),b=y.includes(h.animationName),w=c.value==="mounted"?"enter":"leave";if(h.target===t.value&&b&&(u(`after-${w}`),a("ANIMATION_END"),!r.value)){const C=t.value.style.animationFillMode;t.value.style.animationFillMode="forwards",s=d==null?void 0:d.setTimeout(()=>{var x;((x=t.value)==null?void 0:x.style.animationFillMode)==="forwards"&&(t.value.style.animationFillMode=C)})}h.target===t.value&&y==="none"&&a("ANIMATION_END")},f=h=>{h.target===t.value&&(i.value=Ne(t.value))},v=j(t,(h,y)=>{h?(o.value=getComputedStyle(h),h.addEventListener("animationstart",f),h.addEventListener("animationcancel",p),h.addEventListener("animationend",p)):(a("ANIMATION_END"),s!==void 0&&(d==null||d.clearTimeout(s)),y==null||y.removeEventListener("animationstart",f),y==null||y.removeEventListener("animationcancel",p),y==null||y.removeEventListener("animationend",p))},{immediate:!0}),g=j(c,()=>{const h=Ne(t.value);i.value=c.value==="mounted"?h:"none"});return It(()=>{v(),g()}),{isPresent:O(()=>["mounted","unmountSuspended"].includes(c.value))}}function Ne(e){return e&&getComputedStyle(e).animationName||"none"}const yt=D({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:n}){var o;const{present:i,forceMount:r}=lt(e),l=E(),{isPresent:s}=fi(i,l);n({present:s});let d=t.default({present:s});d=gt(d||[]);const c=ye();if(d&&(d==null?void 0:d.length)>1){const a=(o=c==null?void 0:c.parent)!=null&&o.type.name?`<${c.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${a}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(u=>` - ${u}`).join(` `)].join(` `))}return()=>r.value||i.value||s.value?ke(t.default({present:s})[0],{ref:a=>{const u=$e(a);return typeof(u==null?void 0:u.hasAttribute)>"u"||(u!=null&&u.hasAttribute("data-radix-popper-content-wrapper")?l.value=u.firstElementChild:l.value=u),u}}):null}}),[ne,pi]=be("DialogRoot"),vi=D({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(e,{emit:t}){const n=e,o=nn(n,"open",t,{defaultValue:n.defaultOpen,passive:n.open===void 0}),i=E(),r=E(),{modal:l}=lt(n);return pi({open:o,modal:l,openModal:()=>{o.value=!0},onOpenChange:s=>{o.value=s},onOpenToggle:()=>{o.value=!o.value},contentId:"",titleId:"",descriptionId:"",triggerElement:i,contentElement:r}),(s,d)=>P(s.$slots,"default",{open:m(o)})}}),wt=D({__name:"Teleport",props:{to:{default:"body"},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=Ho();return(n,o)=>m(t)||n.forceMount?(B(),T(yn,{key:0,to:n.to,disabled:n.disabled},[P(n.$slots,"default")],8,["to","disabled"])):Nt("",!0)}}),or=D({__name:"DialogPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=e;return(n,o)=>(B(),T(m(wt),de(fe(t)),{default:A(()=>[P(n.$slots,"default")]),_:3},16))}}),mi="dismissableLayer.pointerDownOutside",hi="dismissableLayer.focusOutside";function un(e,t){const n=t.closest("[data-dismissable-layer]"),o=e.dataset.dismissableLayer===""?e:e.querySelector("[data-dismissable-layer]"),i=Array.from(e.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(n&&o===n||i.indexOf(o){});return K(l=>{if(!pe)return;const s=async c=>{const a=c.target;if(t!=null&&t.value){if(un(t.value,a)){i.value=!1;return}if(c.target&&!i.value){let u=function(){en(mi,e,p)};const p={originalEvent:c};c.pointerType==="touch"?(o.removeEventListener("click",r.value),r.value=u,o.addEventListener("click",r.value,{once:!0})):u()}else o.removeEventListener("click",r.value);i.value=!1}},d=window.setTimeout(()=>{o.addEventListener("pointerdown",s)},0);l(()=>{window.clearTimeout(d),o.removeEventListener("pointerdown",s),o.removeEventListener("click",r.value)})}),{onPointerDownCapture:()=>i.value=!0}}function yi(e,t){var n;const o=((n=t==null?void 0:t.value)==null?void 0:n.ownerDocument)??(globalThis==null?void 0:globalThis.document),i=E(!1);return K(r=>{if(!pe)return;const l=async s=>{t!=null&&t.value&&(await ge(),!(!t.value||un(t.value,s.target))&&s.target&&!i.value&&en(hi,e,{originalEvent:s}))};o.addEventListener("focusin",l),r(()=>o.removeEventListener("focusin",l))}),{onFocusCapture:()=>i.value=!0,onBlurCapture:()=>i.value=!1}}const Q=zt({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),cn=D({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(e,{emit:t}){const n=e,o=t,{forwardRef:i,currentElement:r}=$(),l=O(()=>{var v;return((v=r.value)==null?void 0:v.ownerDocument)??globalThis.document}),s=O(()=>Q.layersRoot),d=O(()=>r.value?Array.from(s.value).indexOf(r.value):-1),c=O(()=>Q.layersWithOutsidePointerEventsDisabled.size>0),a=O(()=>{const v=Array.from(s.value),[g]=[...Q.layersWithOutsidePointerEventsDisabled].slice(-1),h=v.indexOf(g);return d.value>=h}),u=gi(async v=>{const g=[...Q.branches].some(h=>h==null?void 0:h.contains(v.target));!a.value||g||(o("pointerDownOutside",v),o("interactOutside",v),await ge(),v.defaultPrevented||o("dismiss"))},r),p=yi(v=>{[...Q.branches].some(g=>g==null?void 0:g.contains(v.target))||(o("focusOutside",v),o("interactOutside",v),v.defaultPrevented||o("dismiss"))},r);Wo("Escape",v=>{d.value===s.value.size-1&&(o("escapeKeyDown",v),v.defaultPrevented||o("dismiss"))});let f;return K(v=>{r.value&&(n.disableOutsidePointerEvents&&(Q.layersWithOutsidePointerEventsDisabled.size===0&&(f=l.value.body.style.pointerEvents,l.value.body.style.pointerEvents="none"),Q.layersWithOutsidePointerEventsDisabled.add(r.value)),s.value.add(r.value),v(()=>{n.disableOutsidePointerEvents&&Q.layersWithOutsidePointerEventsDisabled.size===1&&(l.value.body.style.pointerEvents=f)}))}),K(v=>{v(()=>{r.value&&(s.value.delete(r.value),Q.layersWithOutsidePointerEventsDisabled.delete(r.value))})}),(v,g)=>(B(),T(m(X),{ref:m(i),"as-child":v.asChild,as:v.as,"data-dismissable-layer":"",style:st({pointerEvents:c.value?a.value?"auto":"none":void 0}),onFocusCapture:m(p).onFocusCapture,onBlurCapture:m(p).onBlurCapture,onPointerdownCapture:m(u).onPointerDownCapture},{default:A(()=>[P(v.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),Ge="focusScope.autoFocusOnMount",Je="focusScope.autoFocusOnUnmount",Rt={bubbles:!1,cancelable:!0};function wi(e,{select:t=!1}={}){const n=se();for(const o of e)if(le(o,{select:t}),se()!==n)return!0}function bi(e){const t=dn(e),n=$t(t,e),o=$t(t.reverse(),e);return[n,o]}function dn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const i=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||i?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function $t(e,t){for(const n of e)if(!xi(n,{upTo:t}))return n}function xi(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Oi(e){return e instanceof HTMLInputElement&&"select"in e}function le(e,{select:t=!1}={}){if(e&&e.focus){const n=se();e.focus({preventScroll:!0}),e!==n&&Oi(e)&&t&&e.select()}}const Ci=Bo(()=>E([]));function Ai(){const e=Ci();return{add(t){const n=e.value[0];t!==n&&(n==null||n.pause()),e.value=St(e.value,t),e.value.unshift(t)},remove(t){var n;e.value=St(e.value,t),(n=e.value[0])==null||n.resume()}}}function St(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Ei(e){return e.filter(t=>t.tagName!=="A")}const Di=D({__name:"FocusScope",props:{loop:{type:Boolean,default:!1},trapped:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["mountAutoFocus","unmountAutoFocus"],setup(e,{emit:t}){const n=e,o=t,{currentRef:i,currentElement:r}=$(),l=E(null),s=Ai(),d=zt({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});K(a=>{if(!pe)return;const u=r.value;if(!n.trapped)return;function p(h){if(d.paused||!u)return;const y=h.target;u.contains(y)?l.value=y:le(l.value,{select:!0})}function f(h){if(d.paused||!u)return;const y=h.relatedTarget;y!==null&&(u.contains(y)||le(l.value,{select:!0}))}function v(h){u.contains(l.value)||le(u)}document.addEventListener("focusin",p),document.addEventListener("focusout",f);const g=new MutationObserver(v);u&&g.observe(u,{childList:!0,subtree:!0}),a(()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",f),g.disconnect()})}),K(async a=>{const u=r.value;if(await ge(),!u)return;s.add(d);const p=se();if(!u.contains(p)){const f=new CustomEvent(Ge,Rt);u.addEventListener(Ge,v=>o("mountAutoFocus",v)),u.dispatchEvent(f),f.defaultPrevented||(wi(Ei(dn(u)),{select:!0}),se()===p&&le(u))}a(()=>{u.removeEventListener(Ge,g=>o("mountAutoFocus",g));const f=new CustomEvent(Je,Rt),v=g=>{o("unmountAutoFocus",g)};u.addEventListener(Je,v),u.dispatchEvent(f),setTimeout(()=>{f.defaultPrevented||le(p??document.body,{select:!0}),u.removeEventListener(Je,v),s.remove(d)},0)})});function c(a){if(!n.loop&&!n.trapped||d.paused)return;const u=a.key==="Tab"&&!a.altKey&&!a.ctrlKey&&!a.metaKey,p=se();if(u&&p){const f=a.currentTarget,[v,g]=bi(f);v&&g?!a.shiftKey&&p===g?(a.preventDefault(),n.loop&&le(v,{select:!0})):a.shiftKey&&p===v&&(a.preventDefault(),n.loop&&le(g,{select:!0})):p===f&&a.preventDefault()}}return(a,u)=>(B(),T(m(X),{ref_key:"currentRef",ref:i,tabindex:"-1","as-child":a.asChild,as:a.as,onKeydown:c},{default:A(()=>[P(a.$slots,"default")]),_:3},8,["as-child","as"]))}});function Pi(e){return e?"open":"closed"}const fn=D({__name:"DialogContentImpl",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=t,i=ne(),{forwardRef:r,currentElement:l}=$();return i.titleId||(i.titleId=it(void 0,"radix-vue-dialog-title")),i.descriptionId||(i.descriptionId=it(void 0,"radix-vue-dialog-description")),De(()=>{i.contentElement=l,se()!==document.body&&(i.triggerElement.value=se())}),(s,d)=>(B(),T(m(Di),{"as-child":"",loop:"",trapped:n.trapFocus,onMountAutoFocus:d[5]||(d[5]=c=>o("openAutoFocus",c)),onUnmountAutoFocus:d[6]||(d[6]=c=>o("closeAutoFocus",c))},{default:A(()=>[me(m(cn),F({id:m(i).contentId,ref:m(r),as:s.as,"as-child":s.asChild,"disable-outside-pointer-events":s.disableOutsidePointerEvents,role:"dialog","aria-describedby":m(i).descriptionId,"aria-labelledby":m(i).titleId,"data-state":m(Pi)(m(i).open.value)},s.$attrs,{onDismiss:d[0]||(d[0]=c=>m(i).onOpenChange(!1)),onEscapeKeyDown:d[1]||(d[1]=c=>o("escapeKeyDown",c)),onFocusOutside:d[2]||(d[2]=c=>o("focusOutside",c)),onInteractOutside:d[3]||(d[3]=c=>o("interactOutside",c)),onPointerDownOutside:d[4]||(d[4]=c=>o("pointerDownOutside",c))}),{default:A(()=>[P(s.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),_i=D({__name:"DialogContentModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=t,i=ne(),r=Se(o),{forwardRef:l,currentElement:s}=$();return si(s),(d,c)=>(B(),T(fn,F({...n,...m(r)},{ref:m(l),"trap-focus":m(i).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:c[0]||(c[0]=a=>{var u;a.defaultPrevented||(a.preventDefault(),(u=m(i).triggerElement.value)==null||u.focus())}),onPointerDownOutside:c[1]||(c[1]=a=>{const u=a.detail.originalEvent,p=u.button===0&&u.ctrlKey===!0;(u.button===2||p)&&a.preventDefault()}),onFocusOutside:c[2]||(c[2]=a=>{a.preventDefault()})}),{default:A(()=>[P(d.$slots,"default")]),_:3},16,["trap-focus"]))}}),Bi=D({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=Se(t);$();const i=ne(),r=E(!1),l=E(!1);return(s,d)=>(B(),T(fn,F({...n,...m(o)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:d[0]||(d[0]=c=>{var a;c.defaultPrevented||(r.value||(a=m(i).triggerElement.value)==null||a.focus(),c.preventDefault()),r.value=!1,l.value=!1}),onInteractOutside:d[1]||(d[1]=c=>{var a;c.defaultPrevented||(r.value=!0,c.detail.originalEvent.type==="pointerdown"&&(l.value=!0));const u=c.target;(a=m(i).triggerElement.value)!=null&&a.contains(u)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&l.value&&c.preventDefault()})}),{default:A(()=>[P(s.$slots,"default")]),_:3},16))}}),Ti=D({__name:"DialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=t,i=ne(),r=Se(o),{forwardRef:l}=$();return(s,d)=>(B(),T(m(yt),{present:s.forceMount||m(i).open.value},{default:A(()=>[m(i).modal.value?(B(),T(_i,F({key:0,ref:m(l)},{...n,...m(r),...s.$attrs}),{default:A(()=>[P(s.$slots,"default")]),_:3},16)):(B(),T(Bi,F({key:1,ref:m(l)},{...n,...m(r),...s.$attrs}),{default:A(()=>[P(s.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Ri=D({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean},as:{}},setup(e){const t=ne();return Xo(!0),$(),(n,o)=>(B(),T(m(X),{as:n.as,"as-child":n.asChild,"data-state":m(t).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:A(()=>[P(n.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),$i=D({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const t=ne(),{forwardRef:n}=$();return(o,i)=>{var r;return(r=m(t))!=null&&r.modal.value?(B(),T(m(yt),{key:0,present:o.forceMount||m(t).open.value},{default:A(()=>[me(Ri,F(o.$attrs,{ref:m(n),as:o.as,"as-child":o.asChild}),{default:A(()=>[P(o.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):Nt("",!0)}}}),pn=D({__name:"DialogClose",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e;$();const n=ne();return(o,i)=>(B(),T(m(X),F(t,{type:o.as==="button"?"button":void 0,onClick:i[0]||(i[0]=r=>m(n).onOpenChange(!1))}),{default:A(()=>[P(o.$slots,"default")]),_:3},16,["type"]))}}),Si=D({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{default:"h2"}},setup(e){const t=e,n=ne();return $(),(o,i)=>(B(),T(m(X),F(t,{id:m(n).titleId}),{default:A(()=>[P(o.$slots,"default")]),_:3},16,["id"]))}}),Mi=D({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{default:"p"}},setup(e){const t=e;$();const n=ne();return(o,i)=>(B(),T(m(X),F(t,{id:m(n).descriptionId}),{default:A(()=>[P(o.$slots,"default")]),_:3},16,["id"]))}}),ir=D({__name:"AlertDialogRoot",props:{open:{type:Boolean},defaultOpen:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const n=sn(e,t);return $(),(o,i)=>(B(),T(m(vi),F(m(n),{modal:!0}),{default:A(()=>[P(o.$slots,"default")]),_:3},16))}}),rr=D({__name:"AlertDialogPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=e;return(n,o)=>(B(),T(m(wt),de(fe(t)),{default:A(()=>[P(n.$slots,"default")]),_:3},16))}}),[Li,Fi]=be("AlertDialogContent"),lr=D({__name:"AlertDialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=Se(t);$();const i=E();return Fi({onCancelElementChange:r=>{i.value=r}}),(r,l)=>(B(),T(m(Ti),F({...n,...m(o)},{role:"alertdialog",onPointerDownOutside:l[0]||(l[0]=Ze(()=>{},["prevent"])),onInteractOutside:l[1]||(l[1]=Ze(()=>{},["prevent"])),onOpenAutoFocus:l[2]||(l[2]=()=>{ge(()=>{var s;(s=i.value)==null||s.focus({preventScroll:!0})})})}),{default:A(()=>[P(r.$slots,"default")]),_:3},16))}}),sr=D({__name:"AlertDialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const t=e;return $(),(n,o)=>(B(),T(m($i),de(fe(t)),{default:A(()=>[P(n.$slots,"default")]),_:3},16))}}),ar=D({__name:"AlertDialogCancel",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e,n=Li(),{forwardRef:o,currentElement:i}=$();return De(()=>{n.onCancelElementChange(i.value)}),(r,l)=>(B(),T(m(pn),F(t,{ref:m(o)}),{default:A(()=>[P(r.$slots,"default")]),_:3},16))}}),ur=D({__name:"AlertDialogTitle",props:{asChild:{type:Boolean},as:{default:"h2"}},setup(e){const t=e;return $(),(n,o)=>(B(),T(m(Si),de(fe(t)),{default:A(()=>[P(n.$slots,"default")]),_:3},16))}}),cr=D({__name:"AlertDialogDescription",props:{asChild:{type:Boolean},as:{default:"p"}},setup(e){const t=e;return $(),(n,o)=>(B(),T(m(Mi),de(fe(t)),{default:A(()=>[P(n.$slots,"default")]),_:3},16))}}),dr=D({__name:"AlertDialogAction",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e;return $(),(n,o)=>(B(),T(m(pn),de(fe(t)),{default:A(()=>[P(n.$slots,"default")]),_:3},16))}}),[vn,Ni]=be("PopperRoot"),ki=D({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=E();return Ni({anchor:t,onAnchorChange:n=>t.value=n}),(n,o)=>P(n.$slots,"default")}}),Ii=D({__name:"PopperAnchor",props:{element:{},asChild:{type:Boolean},as:{}},setup(e){const t=e,{forwardRef:n,currentElement:o}=$(),i=vn();return K(()=>{i.onAnchorChange(t.element??o.value)}),(r,l)=>(B(),T(m(X),{ref:m(n),as:r.as,"as-child":r.asChild},{default:A(()=>[P(r.$slots,"default")]),_:3},8,["as","as-child"]))}});function Wi(e){return e!==null}function Hi(e){return{name:"transformOrigin",options:e,fn(t){var n,o,i;const{placement:r,rects:l,middlewareData:s}=t,d=((n=s.arrow)==null?void 0:n.centerOffset)!==0,c=d?0:e.arrowWidth,a=d?0:e.arrowHeight,[u,p]=rt(r),f={start:"0%",center:"50%",end:"100%"}[p],v=(((o=s.arrow)==null?void 0:o.x)??0)+c/2,g=(((i=s.arrow)==null?void 0:i.y)??0)+a/2;let h="",y="";return u==="bottom"?(h=d?f:`${v}px`,y=`${-a}px`):u==="top"?(h=d?f:`${v}px`,y=`${l.floating.height+a}px`):u==="right"?(h=`${-a}px`,y=d?f:`${g}px`):u==="left"&&(h=`${l.floating.width+a}px`,y=d?f:`${g}px`),{data:{x:h,y}}}}}function rt(e){const[t,n="center"]=e.split("-");return[t,n]}const Vi={side:"bottom",sideOffset:0,align:"center",alignOffset:0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,updatePositionStrategy:"optimized",prioritizePosition:!1},[ji,zi]=be("PopperContent"),Ki=D({inheritAttrs:!1,__name:"PopperContent",props:Tn({side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},{...Vi}),emits:["placed"],setup(e,{emit:t}){const n=e,o=t,i=vn(),{forwardRef:r,currentElement:l}=$(),s=E(),d=E(),{width:c,height:a}=ui(d),u=O(()=>n.side+(n.align!=="center"?`-${n.align}`:"")),p=O(()=>typeof n.collisionPadding=="number"?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),f=O(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),v=O(()=>({padding:p.value,boundary:f.value.filter(Wi),altBoundary:f.value.length>0})),g=Po(()=>[go({mainAxis:n.sideOffset+a.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&_t({...v.value}),n.avoidCollisions&&yo({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky==="partial"?Oo():void 0,...v.value}),!n.prioritizePosition&&n.avoidCollisions&&_t({...v.value}),wo({...v.value,apply:({elements:R,rects:z,availableWidth:k,availableHeight:W})=>{const{width:L,height:oe}=z.reference,I=R.floating.style;I.setProperty("--radix-popper-available-width",`${k}px`),I.setProperty("--radix-popper-available-height",`${W}px`),I.setProperty("--radix-popper-anchor-width",`${L}px`),I.setProperty("--radix-popper-anchor-height",`${oe}px`)}}),d.value&&Eo({element:d.value,padding:n.arrowPadding}),Hi({arrowWidth:c.value,arrowHeight:a.value}),n.hideWhenDetached&&bo({strategy:"referenceHidden",...v.value})]),{floatingStyles:h,placement:y,isPositioned:b,middlewareData:w}=Do(i.anchor,s,{strategy:"fixed",placement:u,whileElementsMounted:(...R)=>ho(...R,{animationFrame:n.updatePositionStrategy==="always"}),middleware:g}),C=O(()=>rt(y.value)[0]),x=O(()=>rt(y.value)[1]);Rn(()=>{b.value&&o("placed")});const S=O(()=>{var R;return((R=w.value.arrow)==null?void 0:R.centerOffset)!==0}),_=E("");K(()=>{l.value&&(_.value=window.getComputedStyle(l.value).zIndex)});const M=O(()=>{var R;return((R=w.value.arrow)==null?void 0:R.x)??0}),N=O(()=>{var R;return((R=w.value.arrow)==null?void 0:R.y)??0});return zi({placedSide:C,onArrowChange:R=>d.value=R,arrowX:M,arrowY:N,shouldHideArrow:S}),(R,z)=>{var k,W,L;return B(),Vt("div",{ref_key:"floatingRef",ref:s,"data-radix-popper-content-wrapper":"",style:st({...m(h),transform:m(b)?m(h).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:_.value,"--radix-popper-transform-origin":[(k=m(w).transformOrigin)==null?void 0:k.x,(W=m(w).transformOrigin)==null?void 0:W.y].join(" "),...((L=m(w).hide)==null?void 0:L.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}})},[me(m(X),F({ref:m(r)},R.$attrs,{"as-child":n.asChild,as:R.as,"data-side":C.value,"data-align":x.value,style:{animation:m(b)?void 0:"none"}}),{default:A(()=>[P(R.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4)}}}),Ui=$n("polygon",{points:"0,0 30,0 15,10"},null,-1),Yi=D({__name:"Arrow",props:{width:{default:10},height:{default:5},asChild:{type:Boolean},as:{default:"svg"}},setup(e){const t=e;return $(),(n,o)=>(B(),T(m(X),F(t,{width:n.width,height:n.height,viewBox:n.asChild?void 0:"0 0 30 10",preserveAspectRatio:n.asChild?void 0:"none"}),{default:A(()=>[P(n.$slots,"default",{},()=>[Ui])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}}),Xi={top:"bottom",right:"left",bottom:"top",left:"right"},qi=D({inheritAttrs:!1,__name:"PopperArrow",props:{width:{},height:{},asChild:{type:Boolean},as:{default:"svg"}},setup(e){const{forwardRef:t}=$(),n=ji(),o=O(()=>Xi[n.placedSide.value]);return(i,r)=>{var l,s,d,c;return B(),Vt("span",{ref:a=>{m(n).onArrowChange(a)},style:st({position:"absolute",left:(l=m(n).arrowX)!=null&&l.value?`${(s=m(n).arrowX)==null?void 0:s.value}px`:void 0,top:(d=m(n).arrowY)!=null&&d.value?`${(c=m(n).arrowY)==null?void 0:c.value}px`:void 0,[o.value]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[m(n).placedSide.value],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[m(n).placedSide.value],visibility:m(n).shouldHideArrow.value?"hidden":void 0})},[me(Yi,F(i.$attrs,{ref:m(t),style:{display:"block"},as:i.as,"as-child":i.asChild,width:i.width,height:i.height}),{default:A(()=>[P(i.$slots,"default")]),_:3},16,["as","as-child","width","height"])],4)}}}),Gi=D({__name:"VisuallyHidden",props:{asChild:{type:Boolean},as:{default:"span"}},setup(e){return $(),(t,n)=>(B(),T(m(X),{as:t.as,"as-child":t.asChild,style:{position:"absolute",border:0,width:"1px",display:"inline-block",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}},{default:A(()=>[P(t.$slots,"default")]),_:3},8,["as","as-child"]))}});function Ji(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}Ji();const mn="tooltip.open",[bt,Zi]=be("TooltipProvider"),fr=D({inheritAttrs:!1,__name:"TooltipProvider",props:{delayDuration:{default:700},skipDelayDuration:{default:300},disableHoverableContent:{type:Boolean,default:!1},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean,default:!1}},setup(e){const t=e,{delayDuration:n,skipDelayDuration:o,disableHoverableContent:i,disableClosingTrigger:r,ignoreNonKeyboardFocus:l,disabled:s}=lt(t);$();const d=E(!0),c=E(!1),{start:a,stop:u}=tn(()=>{d.value=!0},o,{immediate:!1});return Zi({isOpenDelayed:d,delayDuration:n,onOpen(){u(),d.value=!1},onClose(){a()},isPointerInTransitRef:c,disableHoverableContent:i,disableClosingTrigger:r,disabled:s,ignoreNonKeyboardFocus:l}),(p,f)=>P(p.$slots,"default")}}),[Ue,Qi]=be("TooltipRoot"),pr=D({__name:"TooltipRoot",props:{defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},delayDuration:{default:void 0},disableHoverableContent:{type:Boolean,default:void 0},disableClosingTrigger:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},ignoreNonKeyboardFocus:{type:Boolean,default:void 0}},emits:["update:open"],setup(e,{emit:t}){const n=e,o=t;$();const i=bt(),r=O(()=>n.disableHoverableContent??i.disableHoverableContent.value),l=O(()=>n.disableClosingTrigger??i.disableClosingTrigger.value),s=O(()=>n.disabled??i.disabled.value),d=O(()=>n.delayDuration??i.delayDuration.value),c=O(()=>n.ignoreNonKeyboardFocus??i.ignoreNonKeyboardFocus.value),a=nn(n,"open",o,{defaultValue:n.defaultOpen,passive:n.open===void 0});j(a,w=>{i.onClose&&(w?(i.onOpen(),document.dispatchEvent(new CustomEvent(mn))):i.onClose())});const u=E(!1),p=E(),f=O(()=>a.value?u.value?"delayed-open":"instant-open":"closed"),{start:v,stop:g}=tn(()=>{u.value=!0,a.value=!0},d,{immediate:!1});function h(){g(),u.value=!1,a.value=!0}function y(){g(),a.value=!1}function b(){v()}return Qi({contentId:"",open:a,stateAttribute:f,trigger:p,onTriggerChange(w){p.value=w},onTriggerEnter(){i.isOpenDelayed.value?b():h()},onTriggerLeave(){r.value?y():g()},onOpen:h,onClose:y,disableHoverableContent:r,disableClosingTrigger:l,disabled:s,ignoreNonKeyboardFocus:c}),(w,C)=>(B(),T(m(ki),null,{default:A(()=>[P(w.$slots,"default",{open:m(a)})]),_:3}))}}),vr=D({__name:"TooltipTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e,n=Ue(),o=bt();n.contentId||(n.contentId=it(void 0,"radix-vue-tooltip-content"));const{forwardRef:i,currentElement:r}=$(),l=E(!1),s=E(!1),d=O(()=>n.disabled.value?{}:{click:g,focus:f,pointermove:u,pointerleave:p,pointerdown:a,blur:v});De(()=>{n.onTriggerChange(r.value)});function c(){setTimeout(()=>{l.value=!1},1)}function a(){l.value=!0,document.addEventListener("pointerup",c,{once:!0})}function u(h){h.pointerType!=="touch"&&!s.value&&!o.isPointerInTransitRef.value&&(n.onTriggerEnter(),s.value=!0)}function p(){n.onTriggerLeave(),s.value=!1}function f(h){var y,b;l.value||n.ignoreNonKeyboardFocus.value&&!((b=(y=h.target).matches)!=null&&b.call(y,":focus-visible"))||n.onOpen()}function v(){n.onClose()}function g(){n.disableClosingTrigger.value||n.onClose()}return(h,y)=>(B(),T(m(Ii),{"as-child":""},{default:A(()=>[me(m(X),F({ref:m(i),"aria-describedby":m(n).open.value?m(n).contentId:void 0,"data-state":m(n).stateAttribute.value,as:h.as,"as-child":t.asChild,"data-grace-area-trigger":""},xn(d.value)),{default:A(()=>[P(h.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3}))}}),hn=D({__name:"TooltipContentImpl",props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{default:"top"},sideOffset:{default:0},align:{default:"center"},alignOffset:{},avoidCollisions:{type:Boolean,default:!0},collisionBoundary:{default:()=>[]},collisionPadding:{default:0},arrowPadding:{default:0},sticky:{default:"partial"},hideWhenDetached:{type:Boolean,default:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,i=Ue(),{forwardRef:r}=$(),l=Dn(),s=O(()=>{var a;return(a=l.default)==null?void 0:a.call(l)}),d=O(()=>{var a;if(n.ariaLabel)return n.ariaLabel;let u="";function p(f){typeof f.children=="string"&&f.type!==Wt?u+=f.children:Array.isArray(f.children)&&f.children.forEach(v=>p(v))}return(a=s.value)==null||a.forEach(f=>p(f)),u}),c=O(()=>{const{ariaLabel:a,...u}=n;return u});return De(()=>{Ve(window,"scroll",a=>{const u=a.target;u!=null&&u.contains(i.trigger.value)&&i.onClose()}),Ve(window,mn,i.onClose)}),(a,u)=>(B(),T(m(cn),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:u[0]||(u[0]=p=>o("escapeKeyDown",p)),onPointerDownOutside:u[1]||(u[1]=p=>{var f;m(i).disableClosingTrigger.value&&(f=m(i).trigger.value)!=null&&f.contains(p.target)&&p.preventDefault(),o("pointerDownOutside",p)}),onFocusOutside:u[2]||(u[2]=Ze(()=>{},["prevent"])),onDismiss:u[3]||(u[3]=p=>m(i).onClose())},{default:A(()=>[me(m(Ki),F({ref:m(r),"data-state":m(i).stateAttribute.value},{...a.$attrs,...c.value},{style:{"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),{default:A(()=>[P(a.$slots,"default"),me(m(Gi),{id:m(i).contentId,role:"tooltip"},{default:A(()=>[Pn(_n(d.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),er=D({__name:"TooltipContentHoverable",props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},setup(e){const t=ln(e),{forwardRef:n,currentElement:o}=$(),{trigger:i,onClose:r}=Ue(),l=bt(),{isPointerInTransit:s,onPointerExit:d}=Go(i,o);return l.isPointerInTransitRef=s,d(()=>{r()}),(c,a)=>(B(),T(hn,F({ref:m(n)},m(t)),{default:A(()=>[P(c.$slots,"default")]),_:3},16))}}),mr=D({__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{default:"top"},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,i=Ue(),r=sn(n,o),{forwardRef:l}=$();return(s,d)=>(B(),T(m(yt),{present:s.forceMount||m(i).open.value},{default:A(()=>[(B(),T(On(m(i).disableHoverableContent.value?hn:er),F({ref:m(l)},m(r)),{default:A(()=>[P(s.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),hr=D({__name:"TooltipArrow",props:{width:{default:10},height:{default:5},asChild:{type:Boolean},as:{default:"svg"}},setup(e){const t=e;return $(),(n,o)=>(B(),T(m(qi),de(fe(t)),{default:A(()=>[P(n.$slots,"default")]),_:3},16))}}),gr=D({__name:"TooltipPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=e;return(n,o)=>(B(),T(m(wt),de(fe(t)),{default:A(()=>[P(n.$slots,"default")]),_:3},16))}});export{$i as $,rr as A,Si as B,cr as F,hr as G,fr as H,or as I,ar as M,dr as N,lr as O,Ti as P,ir as T,mr as U,ur as V,pr as W,vr as j,sr as k,vi as n,gr as q}; diff --git a/assets/index-Cow_Er_T.js b/assets/index-Cow_Er_T.js deleted file mode 100644 index 82b9ca279092be18a56f4f4de20b5413b4cb1bbc..0000000000000000000000000000000000000000 --- a/assets/index-Cow_Er_T.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as z}from"./IconAnimation.vue_vue_type_script_setup_true_lang-Djn5fd3P.js";import{d as D,bK as I,bL as M,c as d,o as l,A as c,a as e,b as r,B as A,bI as v,C as h,D as a,bB as O,y as g,z as x,bG as P,v as N,bC as j,g as R,w as L,bw as G,x as K,e as n,ad as q,bH as J,bE as Q,bx as B,by as W,bn as X}from"./index-7-fr_lhT.js";import"./live2d-zip-loader-dDw0Wbbr.js";import{_ as f,a as Y}from"./ColorPalette.vue_vue_type_script_setup_true_lang-DpflICIJ.js";import{u as Z}from"./useIconAnimation-BqW7zFiT.js";import{b as k}from"./route-block-B_A1xBdJ.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-D5rspuJc.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BNzPx9yx.js";import"./index-ZfK3fTHt.js";const ee={class:"w-full flex cursor-pointer items-center justify-between rounded-lg px-4 py-3 text-sm outline-none transition-all duration-250 ease-in-out",bg:"neutral-50 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700"},te=["aria-checked"],ne={key:0,text:"sm neutral-500"},y=D({__name:"CheckBar",props:I({text:null,iconOn:null,iconOff:null,description:null},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(u){const p=M(u,"modelValue");return(s,m)=>(l(),d("label",ee,[c(e("input",{"onUpdate:modelValue":m[0]||(m[0]=b=>p.value=b),"aria-checked":p.value,type:"checkbox",hidden:""},null,8,te),[[A,p.value]]),e("div",null,[v(a(s.$t(u.text))+" ",1),u.description?(l(),d("div",ne,a(s.$t(u.description)),1)):h("",!0)]),r(O,{name:"slide-away",mode:"out-in"},{default:g(()=>[p.value?(l(),d("div",{key:0,class:x(u.iconOn),transition:"all ease-in-out duration-250"},null,2)):(l(),d("div",{key:1,class:x(u.iconOff),transition:"all ease-in-out duration-250"},null,2))]),_:1})]))}}),se=[[],["#A5978B","#D8CAAF","#B8B4A7","#C4BCB1","#E5DED8","#9A8F7D","#BEB5A7","#C9C0B6"],["#7A9EAF","#B8C7CC","#D4B79C","#8B9D77","#C7D5CB","#E6D0B1","#94A7B1","#B4C8C3"],["#D9B48F","#B5917A","#8C7A6B","#A17F5F","#B98C46","#C7A252","#DAB300","#D19826"],["#9BA7B0","#C1CBD4","#A5ADB6","#8B959E","#D4DCE4","#7F8A94","#B3BCC6","#98A4AE"],["#E4C6D0","#A61B29","#5D513C","#789262","#1C0D1A","#F7C242","#62A9DD","#8C4B3C"]],oe={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},ie={relative:""},ae={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},le={text:"neutral-300 dark:neutral-500","text-nowrap":""},re={"text-nowrap":"","text-3xl":"","font-semibold":""},de={class:"w-full flex items-center justify-between rounded-lg px-4 py-3 text-sm outline-none transition-all duration-250 ease-in-out",bg:"neutral-50 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700"},ue={value:"en-US"},pe={value:"zh-CN"},me={flex:"","items-center":"","justify-between":""},ce={"text-lg":"","font-semibold":""},ge={relative:"",flex:"","cursor-pointer":"","items-center":"","gap-2":""},be=["disabled"],fe={"font-medium":""},ye={text:"sm neutral-500"},ve={key:1,text:"neutral-200/50 dark:neutral-500/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},w=D({__name:"index",setup(u){const p=P(),s=N(),m=j(),b=R(!1),{iconAnimationStarted:_,showIconAnimation:$,animationIcon:V}=Z("i-lucide:paintbrush");return L(()=>[s.usePageSpecificTransitions,s.disableTransitions],()=>{b.value=!0}),(i,t)=>{const E=z,S=G("motion");return l(),d(B,null,[c((l(),d("div",oe,[e("button",{onClick:t[0]||(t[0]=o=>n(p).back())},t[7]||(t[7]=[e("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),e("h1",ie,[e("div",ae,[e("span",le,a(i.$t("settings.title")),1)]),e("div",re,a(i.$t("settings.pages.themes.title")),1)])])),[[S]]),r(n(f),{title:"settings.sections.section.general.title",icon:"i-solar:filters-bold-duotone"},{default:g(()=>[r(y,{modelValue:n(m),"onUpdate:modelValue":t[1]||(t[1]=o=>q(m)?m.value=o:null),"icon-on":"i-solar:moon-stars-bold-duotone","icon-off":"i-solar:sun-fog-bold-duotone",text:"settings.theme"},null,8,["modelValue"]),e("div",de,[v(a(i.$t("settings.language.title"))+" ",1),c(e("select",{"onUpdate:modelValue":t[2]||(t[2]=o=>n(s).language=o),transition:"all ease-in-out duration-250","cursor-pointer":"","bg-transparent":"","text-right":"","outline-none":""},[e("option",ue,a(i.$t("settings.language.english")),1),e("option",pe,a(i.$t("settings.language.chinese")),1)],512),[[J,n(s).language]])])]),_:1}),r(n(f),{title:"settings.pages.themes.sections.section.custom-color.title",icon:"i-solar:pallete-2-bold-duotone"},{default:g(()=>[e("div",me,[e("span",ce,a(i.$t("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.label")),1),e("label",ge,[c(e("input",{"onUpdate:modelValue":t[3]||(t[3]=o=>n(s).themeColorsHueDynamic=o),type:"checkbox",class:"peer sr-only"},null,512),[[A,n(s).themeColorsHueDynamic]]),t[8]||(t[8]=e("div",{class:"peer-checked:bg-primary-500 h-6 w-11 rounded-full bg-neutral-200 after:absolute after:left-[2px] after:top-[2px] after:h-5 after:w-5 after:rounded-full after:bg-white dark:bg-neutral-600 after:transition-all after:content-[''] peer-checked:after:translate-x-full peer-checked:after:border-white"},null,-1)),v(" "+a(i.$t("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.rgb-on.title")),1)])]),c(e("input",{"onUpdate:modelValue":t[4]||(t[4]=o=>n(s).themeColorsHue=o),type:"range",min:"0",max:"360",step:"0.01",class:x(["theme-hue-slider",n(s).themeColorsHueDynamic?"opacity-25 cursor-not-allowed":"cursor-pointer"]),disabled:n(s).themeColorsHueDynamic},null,10,be),[[Q,n(s).themeColorsHue]]),t[9]||(t[9]=e("div",{class:"color-bar"},[e("span",{"bg-primary-50":""},"50"),e("span",{"bg-primary-100":""},"100"),e("span",{"bg-primary-200":""},"200"),e("span",{"bg-primary-300":""},"300"),e("span",{"bg-primary-400":""},"400"),e("span",{"bg-primary-500":""},"500"),e("div",{"text-white":""},[e("span",{"bg-primary-600":""},"600"),e("span",{"bg-primary-700":""},"700"),e("span",{"bg-primary-800":""},"800"),e("span",{"bg-primary-900":""},"900"),e("span",{"bg-primary-950":""},"950")])],-1)),t[10]||(t[10]=e("div",{class:"color-bar transparency-grid"},[e("span",{bg:"primary-500/5"},"500/5"),e("span",{bg:"primary-500/10"},"500/10"),e("span",{bg:"primary-500/20"},"500/20"),e("span",{bg:"primary-500/30"},"500/30"),e("span",{bg:"primary-500/40"},"500/40"),e("span",{bg:"primary-500/50"},"500/50"),e("span",{bg:"primary-500/60"},"500/60"),e("span",{bg:"primary-500/70"},"500/70"),e("span",{bg:"primary-500/80"},"500/80"),e("span",{bg:"primary-500/90"},"500/90"),e("span",{bg:"primary-500"},"500")],-1))]),_:1}),r(n(f),{title:"settings.pages.themes.sections.section.theme-presets.title",icon:"i-solar:magic-stick-2-bold-duotone"},{default:g(()=>[(l(!0),d(B,null,W(i.$tm("settings.pages.themes.sections.section.theme-presets.presets"),({title:o,description:T,colors:F},C)=>(l(),d("div",{key:C,class:"w-full flex items-center justify-between rounded-lg px-4 py-3 outline-none transition-all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700"},[e("div",null,[e("span",fe,a(i.$rt(o)),1),e("div",ye,a(i.$rt(T)),1)]),r(Y,{colors:F.map((U,H)=>({hex:n(se)[C][H],name:i.$rt(U)}))},null,8,["colors"])]))),128))]),_:1}),r(n(f),{title:"settings.pages.themes.sections.section.developer.title",icon:"i-solar:code-bold-duotone"},{default:g(()=>[r(y,{modelValue:n(s).disableTransitions,"onUpdate:modelValue":t[5]||(t[5]=o=>n(s).disableTransitions=o),"icon-on":"i-solar:people-nearby-bold-duotone","icon-off":"i-solar:running-2-line-duotone",text:"settings.animations.stage-transitions.title"},null,8,["modelValue"]),r(y,{modelValue:n(s).usePageSpecificTransitions,"onUpdate:modelValue":t[6]||(t[6]=o=>n(s).usePageSpecificTransitions=o),disabled:n(s).disableTransitions,"icon-on":"i-solar:running-2-line-duotone","icon-off":"i-solar:people-nearby-bold-duotone",text:"settings.animations.use-page-specific-transitions.title",description:"settings.animations.use-page-specific-transitions.description"},null,8,["modelValue","disabled"])]),_:1}),n($)&&!b.value?(l(),K(E,{key:0,"z-index":-1,duration:1e3,started:n(_),"is-reverse":!0,icon:n(V),"icon-size":12,position:"calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)","text-color":"text-neutral-200/50 dark:text-neutral-600/20"},null,8,["started","icon"])):h("",!0),n(s).usePageSpecificTransitions?h("",!0):(l(),d("div",ve,t[11]||(t[11]=[e("div",{text:"40","i-lucide:paintbrush":""},null,-1)])))],64)}}});typeof k=="function"&&k(w);const $e=X(w,[["__scopeId","data-v-de07a969"]]);export{$e as default}; diff --git a/assets/index-ChBsVHOK.js b/assets/index-Dfvz4O3L.js similarity index 94% rename from assets/index-ChBsVHOK.js rename to assets/index-Dfvz4O3L.js index d4b624e2406730a42da5bb26e11ef77ec7ca91cc..86997d8836dd3213d32307be1fd47a5992419262 100644 --- a/assets/index-ChBsVHOK.js +++ b/assets/index-Dfvz4O3L.js @@ -1 +1 @@ -import"./live2d-zip-loader-dDw0Wbbr.js";import{d as S,r as E,x as y,o as r,y as D,a as i,c as g,C as h,m as P,D as k,z as R,bn as L,bG as q,g as l,q as N,v as V,h as F,bw as G,A as x,e as m,bx as $,by as O,n as j,bv as H}from"./index-7-fr_lhT.js";import{_ as J}from"./IconAnimation.vue_vue_type_script_setup_true_lang-Djn5fd3P.js";import{b as I}from"./route-block-B_A1xBdJ.js";const K={"z-1":"","flex-1":""},M={"text-lg":"","font-bold":"",class:"menu-icon-item-title",transition:"all ease-in-out duration-400"},Q={text:"sm neutral-500 dark:neutral-400",class:"menu-icon-item-description",transition:"all ease-in-out duration-400"},U=S({__name:"IconItem",props:{title:null,description:null,icon:null,iconTemplate:{type:Boolean},to:null},setup(n){return(c,v)=>{const f=E("RouterLink");return r(),y(f,{box:"border",flex:"~ row",bg:"neutral-50 dark:neutral-800",border:"neutral-100 dark:neutral-800/25 hover:primary-500/30 dark:hover:primary-400/30 solid 2","drop-shadow":"none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none",class:"menu-icon-item",transition:"all ease-in-out duration-400",relative:"","w-full":"","items-center":"","overflow-hidden":"","rounded-lg":"","p-5":"","text-left":"",cursor:"pointer",to:n.to},{default:D(()=>[i("div",K,[i("div",M,k(n.title),1),i("div",Q,[i("span",null,k(n.description),1)])]),typeof n.icon=="string"?(r(),g("div",{key:0,class:R(["menu-icon-item-icon",[n.icon]]),transition:"all ease-in-out duration-400",absolute:"","right-0":"","size-24":"","translate-y-4":"",text:"neutral-400/50 dark:neutral-600/50"},null,2)):h("",!0),n.iconTemplate?P(c.$slots,"icon",{key:1},void 0,!0):h("",!0)]),_:3},8,["to"])}}}),W=L(U,[["__scopeId","data-v-5e648549"]]),X={flex:"","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},duration:100},Y={"text-3xl":""},Z={flex:"~ col gap-4"},tt={flex:"~ col gap-4"},et={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},it={text:"60","i-lucide:cog":""},nt=S({__name:"index",setup(n){const c=q(),v=l(!1),f=l(),d=l(),{t}=N(),b=l(""),w=l(""),C=l(!1),u=V();function T(){var o;(o=d.value)==null||o.call(d)}async function z(o,s){const e=o.currentTarget.querySelector(".menu-icon-item-icon");if(!e)return;const p=e.getBoundingClientRect(),_=`${p.left}px, ${p.top}px`;b.value=s.icon,w.value=_,C.value=!0,await H(),v.value=!0}const B=c.beforeEach(async(o,s,a)=>{if(!u.usePageSpecificTransitions||u.disableTransitions){a();return}await new Promise(e=>{d.value=e}),B(),a()}),A=F(()=>[{title:t("settings.pages.card.title"),description:t("settings.pages.card.description"),icon:"i-lucide:id-card",to:"/settings/airi-card"},{title:t("settings.pages.modules.title"),description:t("settings.pages.modules.description"),icon:"i-lucide:blocks",to:"/settings/modules"},{title:t("settings.pages.models.title"),description:t("settings.pages.models.description"),icon:"i-lucide:person-standing",to:"/settings/models"},{title:t("settings.pages.memory.title"),description:t("settings.pages.memory.description"),icon:"i-lucide:sprout",to:"/settings/memory"},{title:t("settings.pages.providers.title"),description:t("settings.pages.providers.description"),icon:"i-lucide:brain",to:"/settings/providers"},{title:t("settings.pages.themes.title"),description:t("settings.pages.themes.description"),icon:"i-lucide:paintbrush",to:"/settings/appearance"}]);return(o,s)=>{const a=G("motion");return r(),g($,null,[x((r(),g("div",X,[i("button",{onClick:s[0]||(s[0]=e=>m(c).back())},s[1]||(s[1]=[i("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),i("h1",Y,k(o.$t("settings.title")),1)])),[[a]]),i("div",Z,[i("div",tt,[(r(!0),g($,null,O(A.value,(e,p)=>x((r(),y(m(W),{key:e.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:j({transitionDelay:`${p*50}ms`}),title:e.title,description:e.description,icon:e.icon,to:e.to,onClick:_=>z(_,e)},null,8,["style","title","description","icon","to","onClick"])),[[a]])),128))]),i("div",et,[x(i("div",it,null,512),[[a]])]),C.value&&!m(u).disableTransitions&&m(u).usePageSpecificTransitions?(r(),y(J,{key:0,ref_key:"iconAnimation",ref:f,icon:b.value,"icon-size":6*1.2,position:w.value,duration:1e3,"text-color":"text-neutral-400/50 dark:text-neutral-600/20",started:v.value,onAnimationEndedOnce:T},null,8,["icon","position","started"])):h("",!0)])],64)}}});typeof I=="function"&&I(nt);export{nt as default}; +import"./live2d-zip-loader--bTGFeQd.js";import{d as S,r as E,x as y,o as r,y as D,a as i,c as g,C as h,m as P,D as k,z as R,bn as L,bG as q,g as l,q as N,v as V,h as F,bw as G,A as x,e as m,bx as $,by as O,n as j,bv as H}from"./index-hDb1Lsb8.js";import{_ as J}from"./IconAnimation.vue_vue_type_script_setup_true_lang-B0Tznm9Y.js";import{b as I}from"./route-block-B_A1xBdJ.js";const K={"z-1":"","flex-1":""},M={"text-lg":"","font-bold":"",class:"menu-icon-item-title",transition:"all ease-in-out duration-400"},Q={text:"sm neutral-500 dark:neutral-400",class:"menu-icon-item-description",transition:"all ease-in-out duration-400"},U=S({__name:"IconItem",props:{title:null,description:null,icon:null,iconTemplate:{type:Boolean},to:null},setup(n){return(c,v)=>{const f=E("RouterLink");return r(),y(f,{box:"border",flex:"~ row",bg:"neutral-50 dark:neutral-800",border:"neutral-100 dark:neutral-800/25 hover:primary-500/30 dark:hover:primary-400/30 solid 2","drop-shadow":"none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none",class:"menu-icon-item",transition:"all ease-in-out duration-400",relative:"","w-full":"","items-center":"","overflow-hidden":"","rounded-lg":"","p-5":"","text-left":"",cursor:"pointer",to:n.to},{default:D(()=>[i("div",K,[i("div",M,k(n.title),1),i("div",Q,[i("span",null,k(n.description),1)])]),typeof n.icon=="string"?(r(),g("div",{key:0,class:R(["menu-icon-item-icon",[n.icon]]),transition:"all ease-in-out duration-400",absolute:"","right-0":"","size-24":"","translate-y-4":"",text:"neutral-400/50 dark:neutral-600/50"},null,2)):h("",!0),n.iconTemplate?P(c.$slots,"icon",{key:1},void 0,!0):h("",!0)]),_:3},8,["to"])}}}),W=L(U,[["__scopeId","data-v-5e648549"]]),X={flex:"","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},duration:100},Y={"text-3xl":""},Z={flex:"~ col gap-4"},tt={flex:"~ col gap-4"},et={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},it={text:"60","i-lucide:cog":""},nt=S({__name:"index",setup(n){const c=q(),v=l(!1),f=l(),d=l(),{t}=N(),b=l(""),w=l(""),C=l(!1),u=V();function T(){var o;(o=d.value)==null||o.call(d)}async function z(o,s){const e=o.currentTarget.querySelector(".menu-icon-item-icon");if(!e)return;const p=e.getBoundingClientRect(),_=`${p.left}px, ${p.top}px`;b.value=s.icon,w.value=_,C.value=!0,await H(),v.value=!0}const B=c.beforeEach(async(o,s,a)=>{if(!u.usePageSpecificTransitions||u.disableTransitions){a();return}await new Promise(e=>{d.value=e}),B(),a()}),A=F(()=>[{title:t("settings.pages.card.title"),description:t("settings.pages.card.description"),icon:"i-lucide:id-card",to:"/settings/airi-card"},{title:t("settings.pages.modules.title"),description:t("settings.pages.modules.description"),icon:"i-lucide:blocks",to:"/settings/modules"},{title:t("settings.pages.models.title"),description:t("settings.pages.models.description"),icon:"i-lucide:person-standing",to:"/settings/models"},{title:t("settings.pages.memory.title"),description:t("settings.pages.memory.description"),icon:"i-lucide:sprout",to:"/settings/memory"},{title:t("settings.pages.providers.title"),description:t("settings.pages.providers.description"),icon:"i-lucide:brain",to:"/settings/providers"},{title:t("settings.pages.themes.title"),description:t("settings.pages.themes.description"),icon:"i-lucide:paintbrush",to:"/settings/appearance"}]);return(o,s)=>{const a=G("motion");return r(),g($,null,[x((r(),g("div",X,[i("button",{onClick:s[0]||(s[0]=e=>m(c).back())},s[1]||(s[1]=[i("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),i("h1",Y,k(o.$t("settings.title")),1)])),[[a]]),i("div",Z,[i("div",tt,[(r(!0),g($,null,O(A.value,(e,p)=>x((r(),y(m(W),{key:e.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:j({transitionDelay:`${p*50}ms`}),title:e.title,description:e.description,icon:e.icon,to:e.to,onClick:_=>z(_,e)},null,8,["style","title","description","icon","to","onClick"])),[[a]])),128))]),i("div",et,[x(i("div",it,null,512),[[a]])]),C.value&&!m(u).disableTransitions&&m(u).usePageSpecificTransitions?(r(),y(J,{key:0,ref_key:"iconAnimation",ref:f,icon:b.value,"icon-size":6*1.2,position:w.value,duration:1e3,"text-color":"text-neutral-400/50 dark:text-neutral-600/20",started:v.value,onAnimationEndedOnce:T},null,8,["icon","position","started"])):h("",!0)])],64)}}});typeof I=="function"&&I(nt);export{nt as default}; diff --git a/assets/index-CAg1Naud.js b/assets/index-DoEN4yXt.js similarity index 92% rename from assets/index-CAg1Naud.js rename to assets/index-DoEN4yXt.js index 98c9e528a5fd3c4fa2ed755c70668239ca636cc7..3e03986e5f53e223a48f7f16d65a3ee884a9dd00 100644 --- a/assets/index-CAg1Naud.js +++ b/assets/index-DoEN4yXt.js @@ -1 +1 @@ -import"./live2d-zip-loader-dDw0Wbbr.js";import{d as k,bG as b,q as I,v as w,h as C,bw as S,c as r,o as n,A as d,a as i,x as l,C as m,e as s,D as g,bx as u,by as A}from"./index-7-fr_lhT.js";import{I as B}from"./IconStatusItem-CtYOABTk.js";import{_ as D}from"./IconAnimation.vue_vue_type_script_setup_true_lang-Djn5fd3P.js";import{u as z}from"./useIconAnimation-BqW7zFiT.js";import{b as p}from"./route-block-B_A1xBdJ.js";const L={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},N={relative:""},V={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},$={text:"neutral-300 dark:neutral-500","text-nowrap":""},q={"text-nowrap":"","text-3xl":"","font-semibold":""},E={grid:"~ cols-1 sm:cols-2 gap-4"},F={key:1,text:"neutral-200/50 dark:neutral-500/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},G=k({__name:"index",setup(P){const f=b(),{t:e}=I(),y=w(),x=C(()=>[{id:"consciousness",name:e("settings.pages.modules.consciousness.title"),description:e("settings.pages.modules.consciousness.description"),icon:"i-lucide:ghost",to:"/settings/modules/consciousness",configured:!1},{id:"speech",name:e("settings.pages.modules.speech.title"),description:e("settings.pages.modules.speech.description"),icon:"i-lucide:mic",to:"/settings/modules/speech",configured:!1},{id:"hearing",name:e("settings.pages.modules.hearing.title"),description:e("settings.pages.modules.hearing.description"),icon:"i-lucide:ear",to:"",configured:!1},{id:"vision",name:e("settings.pages.modules.vision.title"),description:e("settings.pages.modules.vision.description"),icon:"i-lucide:eye",to:"",configured:!1},{id:"memory-short-term",name:e("settings.pages.modules.memory-short-term.title"),description:e("settings.pages.modules.memory-short-term.description"),icon:"i-lucide:book",to:"/settings/modules/memory-short-term",configured:!1},{id:"memory-long-term",name:e("settings.pages.modules.memory-long-term.title"),description:e("settings.pages.modules.memory-long-term.description"),icon:"i-lucide:book-copy",to:"/settings/modules/memory-long-term",configured:!1},{id:"messaging-discord",name:e("settings.pages.modules.messaging-discord.title"),description:e("settings.pages.modules.messaging-discord.description"),icon:"i-simple-icons:discord",to:"",configured:!1},{id:"x",name:e("settings.pages.modules.x.title"),description:e("settings.pages.modules.x.description"),icon:"i-simple-icons:x",to:"",configured:!1},{id:"game-minecraft",name:e("settings.pages.modules.gaming-minecraft.title"),description:e("settings.pages.modules.gaming-minecraft.description"),iconColor:"i-vscode-icons:file-type-minecraft",to:"",configured:!1},{id:"game-factorio",name:e("settings.pages.modules.gaming-factorio.title"),description:e("settings.pages.modules.gaming-factorio.description"),iconImage:"",to:"",configured:!1}]),{iconAnimationStarted:v,showIconAnimation:_,animationIcon:h}=z("i-lucide:blocks");return(R,o)=>{const a=S("motion");return n(),r(u,null,[d((n(),r("div",L,[i("button",{onClick:o[0]||(o[0]=t=>s(f).back())},o[1]||(o[1]=[i("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),i("h1",N,[i("div",V,[i("span",$,g(s(e)("settings.title")),1)]),i("div",q,g(s(e)("settings.pages.modules.title")),1)])])),[[a]]),i("div",E,[(n(!0),r(u,null,A(x.value,(t,c)=>d((n(),l(s(B),{key:t.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+c*10,delay:c*50,title:t.name,description:t.description,icon:t.icon,"icon-color":t.iconColor,"icon-image":t.iconImage,to:t.to,configured:t.configured},null,8,["duration","delay","title","description","icon","icon-color","icon-image","to","configured"])),[[a]])),128))]),s(_)?(n(),l(D,{key:0,icon:s(h),"icon-size":12,duration:1e3,started:s(v),"is-reverse":!0,"z-index":-1,"text-color":"text-neutral-200/50 dark:text-neutral-600/20",position:"calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)"},null,8,["icon","started"])):m("",!0),s(y).usePageSpecificTransitions?m("",!0):(n(),r("div",F,o[2]||(o[2]=[i("div",{text:"40","i-lucide:blocks":""},null,-1)])))],64)}}});typeof p=="function"&&p(G);export{G as default}; +import"./live2d-zip-loader--bTGFeQd.js";import{d as k,bG as b,q as I,v as w,h as C,bw as S,c as r,o as n,A as d,a as i,x as l,C as m,e as s,D as g,bx as u,by as A}from"./index-hDb1Lsb8.js";import{I as B}from"./IconStatusItem-B-kn6UCa.js";import{_ as D}from"./IconAnimation.vue_vue_type_script_setup_true_lang-B0Tznm9Y.js";import{u as z}from"./useIconAnimation-DVKfiTTG.js";import{b as p}from"./route-block-B_A1xBdJ.js";const L={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},N={relative:""},V={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},$={text:"neutral-300 dark:neutral-500","text-nowrap":""},q={"text-nowrap":"","text-3xl":"","font-semibold":""},E={grid:"~ cols-1 sm:cols-2 gap-4"},F={key:1,text:"neutral-200/50 dark:neutral-500/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},G=k({__name:"index",setup(P){const f=b(),{t:e}=I(),y=w(),x=C(()=>[{id:"consciousness",name:e("settings.pages.modules.consciousness.title"),description:e("settings.pages.modules.consciousness.description"),icon:"i-lucide:ghost",to:"/settings/modules/consciousness",configured:!1},{id:"speech",name:e("settings.pages.modules.speech.title"),description:e("settings.pages.modules.speech.description"),icon:"i-lucide:mic",to:"/settings/modules/speech",configured:!1},{id:"hearing",name:e("settings.pages.modules.hearing.title"),description:e("settings.pages.modules.hearing.description"),icon:"i-lucide:ear",to:"",configured:!1},{id:"vision",name:e("settings.pages.modules.vision.title"),description:e("settings.pages.modules.vision.description"),icon:"i-lucide:eye",to:"",configured:!1},{id:"memory-short-term",name:e("settings.pages.modules.memory-short-term.title"),description:e("settings.pages.modules.memory-short-term.description"),icon:"i-lucide:book",to:"/settings/modules/memory-short-term",configured:!1},{id:"memory-long-term",name:e("settings.pages.modules.memory-long-term.title"),description:e("settings.pages.modules.memory-long-term.description"),icon:"i-lucide:book-copy",to:"/settings/modules/memory-long-term",configured:!1},{id:"messaging-discord",name:e("settings.pages.modules.messaging-discord.title"),description:e("settings.pages.modules.messaging-discord.description"),icon:"i-simple-icons:discord",to:"",configured:!1},{id:"x",name:e("settings.pages.modules.x.title"),description:e("settings.pages.modules.x.description"),icon:"i-simple-icons:x",to:"",configured:!1},{id:"game-minecraft",name:e("settings.pages.modules.gaming-minecraft.title"),description:e("settings.pages.modules.gaming-minecraft.description"),iconColor:"i-vscode-icons:file-type-minecraft",to:"",configured:!1},{id:"game-factorio",name:e("settings.pages.modules.gaming-factorio.title"),description:e("settings.pages.modules.gaming-factorio.description"),iconImage:"",to:"",configured:!1}]),{iconAnimationStarted:v,showIconAnimation:_,animationIcon:h}=z("i-lucide:blocks");return(R,o)=>{const a=S("motion");return n(),r(u,null,[d((n(),r("div",L,[i("button",{onClick:o[0]||(o[0]=t=>s(f).back())},o[1]||(o[1]=[i("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),i("h1",N,[i("div",V,[i("span",$,g(s(e)("settings.title")),1)]),i("div",q,g(s(e)("settings.pages.modules.title")),1)])])),[[a]]),i("div",E,[(n(!0),r(u,null,A(x.value,(t,c)=>d((n(),l(s(B),{key:t.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+c*10,delay:c*50,title:t.name,description:t.description,icon:t.icon,"icon-color":t.iconColor,"icon-image":t.iconImage,to:t.to,configured:t.configured},null,8,["duration","delay","title","description","icon","icon-color","icon-image","to","configured"])),[[a]])),128))]),s(_)?(n(),l(D,{key:0,icon:s(h),"icon-size":12,duration:1e3,started:s(v),"is-reverse":!0,"z-index":-1,"text-color":"text-neutral-200/50 dark:text-neutral-600/20",position:"calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)"},null,8,["icon","started"])):m("",!0),s(y).usePageSpecificTransitions?m("",!0):(n(),r("div",F,o[2]||(o[2]=[i("div",{text:"40","i-lucide:blocks":""},null,-1)])))],64)}}});typeof p=="function"&&p(G);export{G as default}; diff --git a/assets/index-Cm5GgQiK.css b/assets/index-_rzHCUxm.css similarity index 88% rename from assets/index-Cm5GgQiK.css rename to assets/index-_rzHCUxm.css index 53e34eeeb4c33037e6e97b4f89747f371f31e4cc..2396d7a2d1ff61ced2e32a1df78771a48b946e80 100644 --- a/assets/index-Cm5GgQiK.css +++ b/assets/index-_rzHCUxm.css @@ -1 +1 @@ -.theme-hue-slider[data-v-de07a969]{height:2.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.5rem;background:linear-gradient(to right,#ffb6cb,#ffbaae 8.33%,#ffbc9d 12.5%,#ffbd94 14.58%,#ffbe8f 15.62%,#ffbe8c,#ffbe89 16.67%,#fac704,#bedf0d 33.33%,#bae025,#b6e133 34.38%,#aee347 35.42%,#9be764 37.5%,#6ded8f 41.67%,#4aefa1 43.75%,#2ef1aa 44.79%,#13f1ae 45.31%,#00f1b0,#00f1b3 45.83%,#00f0bc,#01efc4 47.92%,#00eed2 50%,#36e6ff 58.33%,#84dbff,#9cd6ff 66.67%,#9dd5ff,#9ed5ff 67.19%,#a0d4ff 67.71%,#a4d3ff 68.75%,#acd1ff 70.83%,#bcf 75%,#d6c1ff,#ffadf7,#ffb6cb);background:linear-gradient(to right,color(xyz 0.829 0.56 0.613),color(xyz 0.771 0.573 0.303) 8.33%,color(xyz 0.747 0.579 0.179) 12.5%,color(xyz 0.736 0.581 0.124) 14.58%,color(xyz 0.731 0.582 0.098) 15.62%,color(xyz 0.729 0.583 0.085),color(xyz 0.726 0.583 0.073) 16.67%,#fac704,#bedf0d 33.33%,#bae025,#b6e133 34.38%,#aee347 35.42%,#9be764 37.5%,#6ded8f 41.67%,#4aefa1 43.75%,#2ef1aa 44.79%,#13f1ae,color(xyz 0.392 0.664 0.531) 45.83%,color(xyz 0.388 0.665 0.577),color(xyz 0.384 0.667 0.624) 47.92%,color(xyz 0.377 0.67 0.724) 50%,color(xyz 0.456 0.651 1.158) 58.33%,color(xyz 0.503 0.639 1.415),color(xyz 0.554 0.627 1.699) 66.67%,color(xyz 0.56 0.625 1.697),color(xyz 0.566 0.623 1.694) 67.71%,color(xyz 0.578 0.62 1.688) 68.75%,color(xyz 0.601 0.613 1.677) 70.83%,color(xyz 0.651 0.6 1.654) 75%,color(xyz 0.756 0.573 1.609),color(xyz 0.777 0.569 1.05),color(xyz 0.829 0.56 0.613))}.theme-hue-slider[data-v-de07a969]::-webkit-slider-thumb{width:.5rem;height:3rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-width:2px;--un-border-opacity:1;border-color:rgb(255 255 255 / var(--un-border-opacity));border-radius:.375rem;background-color:#737373cc;background-color:#a3a3a3cc;background-color:rgb(115 115 115 / var(--un-bg-opacity));--un-bg-opacity:1;background-color:rgb(163 163 163 / var(--un-bg-opacity));--un-shadow:var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgb(0 0 0 / .1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;transition-duration:.2s}.theme-hue-slider[data-v-de07a969]::-moz-range-thumb{width:.5rem;height:3rem;border-width:2px;--un-border-opacity:1;border-color:rgb(255 255 255 / var(--un-border-opacity));border-radius:.375rem;background-color:#737373cc;background-color:#a3a3a3cc;background-color:rgb(115 115 115 / var(--un-bg-opacity));--un-bg-opacity:1;background-color:rgb(163 163 163 / var(--un-bg-opacity));--un-shadow:var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgb(0 0 0 / .1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;transition-duration:.2s}.color-bar[data-v-de07a969]{display:flex;overflow:hidden;border-radius:.5rem;text-align:center;--un-text-opacity:1;color:rgb(0 0 0 / var(--un-text-opacity));line-height:2.5rem}.color-bar [data-v-de07a969]{flex:1}.color-bar div[data-v-de07a969]{display:contents}.transparency-grid[data-v-de07a969]{background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:20px 20px;background-position:0 0,0 10px,10px -10px,-10px 0px;background-color:#fff} +.theme-hue-slider[data-v-a043a63d]{height:2.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.5rem;background:linear-gradient(to right,#ffb6cb,#ffbaae 8.33%,#ffbc9d 12.5%,#ffbd94 14.58%,#ffbe8f 15.62%,#ffbe8c,#ffbe89 16.67%,#fac704,#bedf0d 33.33%,#bae025,#b6e133 34.38%,#aee347 35.42%,#9be764 37.5%,#6ded8f 41.67%,#4aefa1 43.75%,#2ef1aa 44.79%,#13f1ae 45.31%,#00f1b0,#00f1b3 45.83%,#00f0bc,#01efc4 47.92%,#00eed2 50%,#36e6ff 58.33%,#84dbff,#9cd6ff 66.67%,#9dd5ff,#9ed5ff 67.19%,#a0d4ff 67.71%,#a4d3ff 68.75%,#acd1ff 70.83%,#bcf 75%,#d6c1ff,#ffadf7,#ffb6cb);background:linear-gradient(to right,color(xyz 0.829 0.56 0.613),color(xyz 0.771 0.573 0.303) 8.33%,color(xyz 0.747 0.579 0.179) 12.5%,color(xyz 0.736 0.581 0.124) 14.58%,color(xyz 0.731 0.582 0.098) 15.62%,color(xyz 0.729 0.583 0.085),color(xyz 0.726 0.583 0.073) 16.67%,#fac704,#bedf0d 33.33%,#bae025,#b6e133 34.38%,#aee347 35.42%,#9be764 37.5%,#6ded8f 41.67%,#4aefa1 43.75%,#2ef1aa 44.79%,#13f1ae,color(xyz 0.392 0.664 0.531) 45.83%,color(xyz 0.388 0.665 0.577),color(xyz 0.384 0.667 0.624) 47.92%,color(xyz 0.377 0.67 0.724) 50%,color(xyz 0.456 0.651 1.158) 58.33%,color(xyz 0.503 0.639 1.415),color(xyz 0.554 0.627 1.699) 66.67%,color(xyz 0.56 0.625 1.697),color(xyz 0.566 0.623 1.694) 67.71%,color(xyz 0.578 0.62 1.688) 68.75%,color(xyz 0.601 0.613 1.677) 70.83%,color(xyz 0.651 0.6 1.654) 75%,color(xyz 0.756 0.573 1.609),color(xyz 0.777 0.569 1.05),color(xyz 0.829 0.56 0.613))}.theme-hue-slider[data-v-a043a63d]::-webkit-slider-thumb{width:.5rem;height:3rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-width:2px;--un-border-opacity:1;border-color:rgb(255 255 255 / var(--un-border-opacity));border-radius:.375rem;background-color:#737373cc;background-color:#a3a3a3cc;background-color:rgb(115 115 115 / var(--un-bg-opacity));--un-bg-opacity:1;background-color:rgb(163 163 163 / var(--un-bg-opacity));--un-shadow:var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgb(0 0 0 / .1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;transition-duration:.2s}.theme-hue-slider[data-v-a043a63d]::-moz-range-thumb{width:.5rem;height:3rem;border-width:2px;--un-border-opacity:1;border-color:rgb(255 255 255 / var(--un-border-opacity));border-radius:.375rem;background-color:#737373cc;background-color:#a3a3a3cc;background-color:rgb(115 115 115 / var(--un-bg-opacity));--un-bg-opacity:1;background-color:rgb(163 163 163 / var(--un-bg-opacity));--un-shadow:var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgb(0 0 0 / .1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;transition-duration:.2s}.color-bar[data-v-a043a63d]{display:flex;overflow:hidden;border-radius:.5rem;text-align:center;--un-text-opacity:1;color:rgb(0 0 0 / var(--un-text-opacity));line-height:2.5rem}.color-bar [data-v-a043a63d]{flex:1}.color-bar div[data-v-a043a63d]{display:contents}.transparency-grid[data-v-a043a63d]{background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:20px 20px;background-position:0 0,0 10px,10px -10px,-10px 0px;background-color:#fff} diff --git a/assets/index-7-fr_lhT.js b/assets/index-hDb1Lsb8.js similarity index 96% rename from assets/index-7-fr_lhT.js rename to assets/index-hDb1Lsb8.js index 268c4746a37d0552fe7d412419bcbac2e5742e31..a5b14070045a1932d6d8714df0bf21b3178b0ff1 100644 --- a/assets/index-7-fr_lhT.js +++ b/assets/index-hDb1Lsb8.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-3kSj1ZoR.js","assets/HeaderLink-C7jWLVVD.js","assets/HeaderLink-DsxHr3rn.css","assets/index-DZJqd2YN.js","assets/live2d-zip-loader-dDw0Wbbr.js","assets/import-url-browser-CPN8ipMD.js","assets/duckdb-mvp-CaaD-olE.js","assets/speech-DK9my_xu.js","assets/index-Be1NqeGb.js","assets/providers-B7zWTIWF.js","assets/queue-B4R0QEYc.js","assets/queues-BATLkujj.js","assets/index-D975M2PQ.js","assets/airi-card-DAWA4eQ5.js","assets/consciousness-C4xyvmr3.js","assets/Model.vue_vue_type_script_setup_true_lang-B7ZOwTMx.js","assets/TransitionVertical.vue_vue_type_script_setup_true_lang-BNzPx9yx.js","assets/Collapsable.vue_vue_type_script_setup_true_lang-D5rspuJc.js","assets/index-CJycCKU5.js","assets/route-block-B_A1xBdJ.js","assets/index-BqaqWV_b.css","assets/chat-Dn5NUeJ8.js","assets/image-B_Hg7W96.js","assets/image-BhuwcwI9.css","assets/queue-BwjoE2a-.js","assets/index-ChBsVHOK.js","assets/IconAnimation.vue_vue_type_script_setup_true_lang-Djn5fd3P.js","assets/index-7C_uX4Nl.css","assets/index-bGU7kv-p.js","assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-DT-C_SEQ.js","assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-G_NEmoXi.js","assets/index-ZfK3fTHt.js","assets/CardListItem.vue_vue_type_script_setup_true_lang-DLIJmqLz.js","assets/CardDetailDialog-FgNNmEDA.js","assets/CardListItem-D1SxHi9v.js","assets/DeleteCardDialog-NTC8VI23.js","assets/index-Cow_Er_T.js","assets/ColorPalette.vue_vue_type_script_setup_true_lang-DpflICIJ.js","assets/useIconAnimation-BqW7zFiT.js","assets/index-Cm5GgQiK.css","assets/index-BR3VGYw9.js","assets/index-DzMFUKkB.css","assets/index-CAg1Naud.js","assets/IconStatusItem-CtYOABTk.js","assets/IconStatusItem-Bkq6rmpG.css","assets/consciousness-x6W39XLe.js","assets/RadioCardDetailManySelect-Bn9sPp4x.js","assets/Input.vue_vue_type_script_setup_true_lang-58p3G1RX.js","assets/RadioCardDetailManySelect-DctfBiRo.css","assets/speech-DqZBet28.js","assets/TestDummyMarker.vue_vue_type_script_setup_true_lang-OSsy22LU.js","assets/TestDummyMarker-CuAjjIfV.css","assets/FieldInput.vue_vue_type_script_setup_true_lang-BhtqkEkU.js","assets/speech-Hr-CnTW2.css","assets/index-CLIXS4H9.js","assets/anthropic-DZM8jqDl.js","assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CUVIcbSL.js","assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C3sxqbyi.js","assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BCwQg86s.js","assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BxRDV7Dm.js","assets/cloudflare-workers-ai-BuVW7ZIH.js","assets/deepseek-CrysIhkq.js","assets/elevenlabs-Dh3dKYgb.js","assets/SpeechVoiceSettings.vue_vue_type_script_setup_true_lang-DW1qhqmX.js","assets/featherless-ai-DYiNttaX.js","assets/fireworks-ai-Brzqd047.js","assets/google-generative-ai-CG94KMvF.js","assets/microsoft-speech-BNSZ5Owh.js","assets/mistral-ai-CKRmqHIA.js","assets/moonshot-ai-CX56TEso.js","assets/novita-ai-8wPkVedi.js","assets/ollama-uyGva0oA.js","assets/openai-CNZdQq6r.js","assets/openrouter-ai-CX1NLDlM.js","assets/together-ai-CiiMDjmH.js","assets/xai-BUrYAIzO.js","assets/delays-HBOKcZm5.js","assets/emotions-C1vttnju.js","assets/messages-DWFXV8un.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-DolhCkLR.js","assets/HeaderLink-DavtcSnn.js","assets/HeaderLink-DsxHr3rn.css","assets/index-tRUa3_xN.js","assets/live2d-zip-loader--bTGFeQd.js","assets/import-url-browser-CPN8ipMD.js","assets/duckdb-mvp-CaaD-olE.js","assets/speech-D3H5B80W.js","assets/index-Be1NqeGb.js","assets/providers-adQ6cb75.js","assets/queue-c563jmhe.js","assets/queues-DEhcWTMJ.js","assets/index-D975M2PQ.js","assets/airi-card-CbqBsbSf.js","assets/consciousness-BRdkM-c-.js","assets/Model.vue_vue_type_script_setup_true_lang-Wfrg8fps.js","assets/TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js","assets/Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js","assets/index-BNcJmkAi.js","assets/route-block-B_A1xBdJ.js","assets/index-BqaqWV_b.css","assets/chat-BFU2g19v.js","assets/image-jwIZU337.js","assets/image-BhuwcwI9.css","assets/queue-kEu75MMe.js","assets/index-Dfvz4O3L.js","assets/IconAnimation.vue_vue_type_script_setup_true_lang-B0Tznm9Y.js","assets/index-7C_uX4Nl.css","assets/index-BKcXwYga.js","assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-XVLQKu9_.js","assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-44xxChqC.js","assets/index-CborASRd.js","assets/CardListItem.vue_vue_type_script_setup_true_lang-B6mmFgyk.js","assets/CardDetailDialog-iV9p9LC3.js","assets/CardListItem-D2hO_cEF.js","assets/DeleteCardDialog-Cm2fzcjo.js","assets/index-BcT0g1Oh.js","assets/ColorPalette.vue_vue_type_script_setup_true_lang-XM3XfZvN.js","assets/useIconAnimation-DVKfiTTG.js","assets/index-_rzHCUxm.css","assets/index-BOwQ_WhZ.js","assets/index-DzMFUKkB.css","assets/index-DoEN4yXt.js","assets/IconStatusItem-B-kn6UCa.js","assets/IconStatusItem-Bkq6rmpG.css","assets/consciousness-C-h5B1sq.js","assets/RadioCardDetailManySelect-D3zSF9Ox.js","assets/Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js","assets/RadioCardDetailManySelect-DctfBiRo.css","assets/speech-9nYJ52qB.js","assets/TestDummyMarker.vue_vue_type_script_setup_true_lang-DvXVr5Qy.js","assets/TestDummyMarker-CuAjjIfV.css","assets/FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js","assets/speech-Hr-CnTW2.css","assets/index-B1onYnuF.js","assets/anthropic-D4yWnjWW.js","assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-UCuivhvU.js","assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-CHpN3yiY.js","assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CYv3qJbi.js","assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTOfxlwP.js","assets/cloudflare-workers-ai-C4lOUkFP.js","assets/deepseek-CB4tx-Ko.js","assets/elevenlabs-L17nDlYs.js","assets/SpeechVoiceSettings.vue_vue_type_script_setup_true_lang-D0Yiu-Ma.js","assets/featherless-ai-BkPHXcRw.js","assets/fireworks-ai-DSa13ytv.js","assets/google-generative-ai-BrHwbhVt.js","assets/microsoft-speech-YPGP1I4-.js","assets/mistral-ai-BthqZXAX.js","assets/moonshot-ai-Dx7AV_cz.js","assets/novita-ai-adUHAUPJ.js","assets/ollama-BX3zQ6KB.js","assets/openai-C-ilwKTF.js","assets/openrouter-ai-DHIXyBwb.js","assets/together-ai-D2dNKA3a.js","assets/xai-CS3ttJDb.js","assets/delays-F63qeUW3.js","assets/emotions-CNzOYGQn.js","assets/messages-CfNsB1Jl.js"])))=>i.map(i=>d[i]); var QA=Object.defineProperty;var eC=(n,e,t)=>e in n?QA(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var fi=(n,e,t)=>eC(n,typeof e!="symbol"?e+"":e,t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(s){if(s.ep)return;s.ep=!0;const r=t(s);fetch(s.href,r)}})();const tC="modulepreload",nC=function(n){return"/"+n},cv={},st=function(e,t,i){let s=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=Promise.allSettled(t.map(l=>{if(l=nC(l),l in cv)return;cv[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":tC,c||(f.as="script"),f.crossOrigin="",f.href=l,a&&f.setAttribute("nonce",a),document.head.appendChild(f),c)return new Promise((d,h)=>{f.addEventListener("load",d),f.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}function r(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return s.then(o=>{for(const a of o||[])a.status==="rejected"&&r(a.reason);return e().catch(r)})};/** * @vue/shared v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors @@ -3846,11 +3846,11 @@ void main() { * pinia v3.0.1 * (c) 2025 Eduardo San Martin Morote * @license MIT - */let Aw;const Vh=n=>Aw=n,Cw=Symbol();function Hg(n){return n&&typeof n=="object"&&Object.prototype.toString.call(n)==="[object Object]"&&typeof n.toJSON!="function"}var kl;(function(n){n.direct="direct",n.patchObject="patch object",n.patchFunction="patch function"})(kl||(kl={}));function Cz(){const n=g0(!0),e=n.run(()=>et({}));let t=[],i=[];const s=M0({install(r){Vh(s),s._a=r,r.provide(Cw,s),r.config.globalProperties.$pinia=s,i.forEach(o=>t.push(o)),i=[]},use(r){return this._a?t.push(r):i.push(r),this},_p:t,_a:null,_e:n,_s:new Map,state:e});return s}const Rw=()=>{};function dx(n,e,t,i=Rw){n.push(e);const s=()=>{const r=n.indexOf(e);r>-1&&(n.splice(r,1),i())};return!t&&Xd()&&_0(s),s}function ea(n,...e){n.slice().forEach(t=>{t(...e)})}const Rz=n=>n(),hx=Symbol(),_m=Symbol();function Gg(n,e){n instanceof Map&&e instanceof Map?e.forEach((t,i)=>n.set(i,t)):n instanceof Set&&e instanceof Set&&e.forEach(n.add,n);for(const t in e){if(!e.hasOwnProperty(t))continue;const i=e[t],s=n[t];Hg(s)&&Hg(i)&&n.hasOwnProperty(t)&&!Pt(i)&&!Rs(i)?n[t]=Gg(s,i):n[t]=i}return n}const Pz=Symbol();function Iz(n){return!Hg(n)||!n.hasOwnProperty(Pz)}const{assign:tr}=Object;function Lz(n){return!!(Pt(n)&&n.effect)}function Dz(n,e,t,i){const{state:s,actions:r,getters:o}=e,a=t.state.value[n];let l;function c(){a||(t.state.value[n]=s?s():{});const u=oS(t.state.value[n]);return tr(u,r,Object.keys(o||{}).reduce((f,d)=>(f[d]=M0(Ee(()=>{Vh(t);const h=t._s.get(n);return o[d].call(h,h)})),f),{}))}return l=Pw(n,c,e,t,i,!0),l}function Pw(n,e,t={},i,s,r){let o;const a=tr({actions:{}},t),l={deep:!0};let c,u,f=[],d=[],h;const p=i.state.value[n];!r&&!p&&(i.state.value[n]={}),et({});let _;function g(P){let x;c=u=!1,typeof P=="function"?(P(i.state.value[n]),x={type:kl.patchFunction,storeId:n,events:h}):(Gg(i.state.value[n],P),x={type:kl.patchObject,payload:P,storeId:n,events:h});const M=_=Symbol();Er().then(()=>{_===M&&(c=!0)}),u=!0,ea(f,x,i.state.value[n])}const m=r?function(){const{state:x}=t,M=x?x():{};this.$patch(L=>{tr(L,M)})}:Rw;function y(){o.stop(),f=[],d=[],i._s.delete(n)}const b=(P,x="")=>{if(hx in P)return P[_m]=x,P;const M=function(){Vh(i);const L=Array.from(arguments),F=[],H=[];function Y(Q){F.push(Q)}function ee(Q){H.push(Q)}ea(d,{args:L,name:M[_m],store:E,after:Y,onError:ee});let K;try{K=P.apply(this&&this.$id===n?this:E,L)}catch(Q){throw ea(H,Q),Q}return K instanceof Promise?K.then(Q=>(ea(F,Q),Q)).catch(Q=>(ea(H,Q),Promise.reject(Q))):(ea(F,K),K)};return M[hx]=!0,M[_m]=x,M},v={_p:i,$id:n,$onAction:dx.bind(null,d),$patch:g,$reset:m,$subscribe(P,x={}){const M=dx(f,P,x.detached,()=>L()),L=o.run(()=>$e(()=>i.state.value[n],F=>{(x.flush==="sync"?u:c)&&P({storeId:n,type:kl.direct,events:h},F)},tr({},l,x)));return M},$dispose:y},E=bi(v);i._s.set(n,E);const S=(i._a&&i._a.runWithContext||Rz)(()=>i._e.run(()=>(o=g0()).run(()=>e({action:b}))));for(const P in S){const x=S[P];if(Pt(x)&&!Lz(x)||Rs(x))r||(p&&Iz(x)&&(Pt(x)?x.value=p[P]:Gg(x,p[P])),i.state.value[n][P]=x);else if(typeof x=="function"){const M=b(x,P);S[P]=M,a.actions[P]=x}}return tr(E,S),tr(ut(E),S),Object.defineProperty(E,"$state",{get:()=>i.state.value[n],set:P=>{g(x=>{tr(x,P)})}}),i._p.forEach(P=>{tr(E,o.run(()=>P({store:E,app:i._a,pinia:i,options:a})))}),p&&r&&t.hydrate&&t.hydrate(E.$state,p),c=!0,u=!0,E}/*! #__NO_SIDE_EFFECTS__ */function Oz(n,e,t){let i;const s=typeof e=="function";i=s?t:e;function r(o,a){const l=Cc();return o=o||(l?En(Cw,null):null),o&&Vh(o),o=Aw,o._s.has(n)||(s?Pw(n,e,i,o):Dz(n,i,o)),o._s.get(n)}return r.$id=n,r}function Nz(n){const e=ut(n),t={};for(const i in e){const s=e[i];s.effect?t[i]=Ee({get:()=>n[i],set(r){n[i]=r}}):(Pt(s)||Rs(s))&&(t[i]=aS(n,i))}return t}const Uz=n=>{const e={};Object.entries(Object.assign({"/src/layouts/default.vue":()=>st(()=>import("./default-3kSj1ZoR.js"),__vite__mapDeps([0,1,2])),"/src/layouts/stage.vue":()=>st(()=>import("./stage-BtOYSTbO.js"),[])})).forEach(([s,r])=>{let o=s.replace("/src/layouts/","").replace(".vue","");e[o]=r});function i(s,r=!0){return s.map(o=>{var a,l,c,u,f,d;if(((a=o.children)==null?void 0:a.length)>0&&(o.children=i(o.children,!1)),r){if(!o.component&&((l=o.children)==null?void 0:l.find(p=>{var _;return(p.path===""||p.path==="/")&&((_=p.meta)==null?void 0:_.isLayout)})))return o;if(((c=o.meta)==null?void 0:c.layout)!==!1)return{path:o.path,component:e[((u=o.meta)==null?void 0:u.layout)||"default"],children:o.path==="/"?[o]:[{...o,path:""}],meta:{isLayout:!0}}}return(f=o.meta)!=null&&f.layout?{path:o.path,component:e[(d=o.meta)==null?void 0:d.layout],children:[{...o,path:""}],meta:{isLayout:!0}}:o})}return i(n)};/*! + */let Aw;const Vh=n=>Aw=n,Cw=Symbol();function Hg(n){return n&&typeof n=="object"&&Object.prototype.toString.call(n)==="[object Object]"&&typeof n.toJSON!="function"}var kl;(function(n){n.direct="direct",n.patchObject="patch object",n.patchFunction="patch function"})(kl||(kl={}));function Cz(){const n=g0(!0),e=n.run(()=>et({}));let t=[],i=[];const s=M0({install(r){Vh(s),s._a=r,r.provide(Cw,s),r.config.globalProperties.$pinia=s,i.forEach(o=>t.push(o)),i=[]},use(r){return this._a?t.push(r):i.push(r),this},_p:t,_a:null,_e:n,_s:new Map,state:e});return s}const Rw=()=>{};function dx(n,e,t,i=Rw){n.push(e);const s=()=>{const r=n.indexOf(e);r>-1&&(n.splice(r,1),i())};return!t&&Xd()&&_0(s),s}function ea(n,...e){n.slice().forEach(t=>{t(...e)})}const Rz=n=>n(),hx=Symbol(),_m=Symbol();function Gg(n,e){n instanceof Map&&e instanceof Map?e.forEach((t,i)=>n.set(i,t)):n instanceof Set&&e instanceof Set&&e.forEach(n.add,n);for(const t in e){if(!e.hasOwnProperty(t))continue;const i=e[t],s=n[t];Hg(s)&&Hg(i)&&n.hasOwnProperty(t)&&!Pt(i)&&!Rs(i)?n[t]=Gg(s,i):n[t]=i}return n}const Pz=Symbol();function Iz(n){return!Hg(n)||!n.hasOwnProperty(Pz)}const{assign:tr}=Object;function Lz(n){return!!(Pt(n)&&n.effect)}function Dz(n,e,t,i){const{state:s,actions:r,getters:o}=e,a=t.state.value[n];let l;function c(){a||(t.state.value[n]=s?s():{});const u=oS(t.state.value[n]);return tr(u,r,Object.keys(o||{}).reduce((f,d)=>(f[d]=M0(Ee(()=>{Vh(t);const h=t._s.get(n);return o[d].call(h,h)})),f),{}))}return l=Pw(n,c,e,t,i,!0),l}function Pw(n,e,t={},i,s,r){let o;const a=tr({actions:{}},t),l={deep:!0};let c,u,f=[],d=[],h;const p=i.state.value[n];!r&&!p&&(i.state.value[n]={}),et({});let _;function g(P){let x;c=u=!1,typeof P=="function"?(P(i.state.value[n]),x={type:kl.patchFunction,storeId:n,events:h}):(Gg(i.state.value[n],P),x={type:kl.patchObject,payload:P,storeId:n,events:h});const M=_=Symbol();Er().then(()=>{_===M&&(c=!0)}),u=!0,ea(f,x,i.state.value[n])}const m=r?function(){const{state:x}=t,M=x?x():{};this.$patch(L=>{tr(L,M)})}:Rw;function y(){o.stop(),f=[],d=[],i._s.delete(n)}const b=(P,x="")=>{if(hx in P)return P[_m]=x,P;const M=function(){Vh(i);const L=Array.from(arguments),F=[],H=[];function Y(Q){F.push(Q)}function ee(Q){H.push(Q)}ea(d,{args:L,name:M[_m],store:E,after:Y,onError:ee});let K;try{K=P.apply(this&&this.$id===n?this:E,L)}catch(Q){throw ea(H,Q),Q}return K instanceof Promise?K.then(Q=>(ea(F,Q),Q)).catch(Q=>(ea(H,Q),Promise.reject(Q))):(ea(F,K),K)};return M[hx]=!0,M[_m]=x,M},v={_p:i,$id:n,$onAction:dx.bind(null,d),$patch:g,$reset:m,$subscribe(P,x={}){const M=dx(f,P,x.detached,()=>L()),L=o.run(()=>$e(()=>i.state.value[n],F=>{(x.flush==="sync"?u:c)&&P({storeId:n,type:kl.direct,events:h},F)},tr({},l,x)));return M},$dispose:y},E=bi(v);i._s.set(n,E);const S=(i._a&&i._a.runWithContext||Rz)(()=>i._e.run(()=>(o=g0()).run(()=>e({action:b}))));for(const P in S){const x=S[P];if(Pt(x)&&!Lz(x)||Rs(x))r||(p&&Iz(x)&&(Pt(x)?x.value=p[P]:Gg(x,p[P])),i.state.value[n][P]=x);else if(typeof x=="function"){const M=b(x,P);S[P]=M,a.actions[P]=x}}return tr(E,S),tr(ut(E),S),Object.defineProperty(E,"$state",{get:()=>i.state.value[n],set:P=>{g(x=>{tr(x,P)})}}),i._p.forEach(P=>{tr(E,o.run(()=>P({store:E,app:i._a,pinia:i,options:a})))}),p&&r&&t.hydrate&&t.hydrate(E.$state,p),c=!0,u=!0,E}/*! #__NO_SIDE_EFFECTS__ */function Oz(n,e,t){let i;const s=typeof e=="function";i=s?t:e;function r(o,a){const l=Cc();return o=o||(l?En(Cw,null):null),o&&Vh(o),o=Aw,o._s.has(n)||(s?Pw(n,e,i,o):Dz(n,i,o)),o._s.get(n)}return r.$id=n,r}function Nz(n){const e=ut(n),t={};for(const i in e){const s=e[i];s.effect?t[i]=Ee({get:()=>n[i],set(r){n[i]=r}}):(Pt(s)||Rs(s))&&(t[i]=aS(n,i))}return t}const Uz=n=>{const e={};Object.entries(Object.assign({"/src/layouts/default.vue":()=>st(()=>import("./default-DolhCkLR.js"),__vite__mapDeps([0,1,2])),"/src/layouts/stage.vue":()=>st(()=>import("./stage-BhwJBhbz.js"),[])})).forEach(([s,r])=>{let o=s.replace("/src/layouts/","").replace(".vue","");e[o]=r});function i(s,r=!0){return s.map(o=>{var a,l,c,u,f,d;if(((a=o.children)==null?void 0:a.length)>0&&(o.children=i(o.children,!1)),r){if(!o.component&&((l=o.children)==null?void 0:l.find(p=>{var _;return(p.path===""||p.path==="/")&&((_=p.meta)==null?void 0:_.isLayout)})))return o;if(((c=o.meta)==null?void 0:c.layout)!==!1)return{path:o.path,component:e[((u=o.meta)==null?void 0:u.layout)||"default"],children:o.path==="/"?[o]:[{...o,path:""}],meta:{isLayout:!0}}}return(f=o.meta)!=null&&f.layout?{path:o.path,component:e[(d=o.meta)==null?void 0:d.layout],children:[{...o,path:""}],meta:{isLayout:!0}}:o})}return i(n)};/*! * vue-router v4.5.0 * (c) 2024 Eduardo San Martin Morote * @license MIT - */const na=typeof document<"u";function Iw(n){return typeof n=="object"||"displayName"in n||"props"in n||"__vccOpts"in n}function Fz(n){return n.__esModule||n[Symbol.toStringTag]==="Module"||n.default&&Iw(n.default)}const Mt=Object.assign;function vm(n,e){const t={};for(const i in e){const s=e[i];t[i]=Bi(s)?s.map(n):n(s)}return t}const Bl=()=>{},Bi=Array.isArray,Lw=/#/g,kz=/&/g,Bz=/\//g,zz=/=/g,Vz=/\?/g,Dw=/\+/g,Hz=/%5B/g,Gz=/%5D/g,Ow=/%5E/g,Wz=/%60/g,Nw=/%7B/g,Xz=/%7C/g,Uw=/%7D/g,$z=/%20/g;function B_(n){return encodeURI(""+n).replace(Xz,"|").replace(Hz,"[").replace(Gz,"]")}function qz(n){return B_(n).replace(Nw,"{").replace(Uw,"}").replace(Ow,"^")}function Wg(n){return B_(n).replace(Dw,"%2B").replace($z,"+").replace(Lw,"%23").replace(kz,"%26").replace(Wz,"`").replace(Nw,"{").replace(Uw,"}").replace(Ow,"^")}function Yz(n){return Wg(n).replace(zz,"%3D")}function jz(n){return B_(n).replace(Lw,"%23").replace(Vz,"%3F")}function Kz(n){return n==null?"":jz(n).replace(Bz,"%2F")}function bc(n){try{return decodeURIComponent(""+n)}catch{}return""+n}const Zz=/\/$/,Jz=n=>n.replace(Zz,"");function ym(n,e,t="/"){let i,s={},r="",o="";const a=e.indexOf("#");let l=e.indexOf("?");return a=0&&(l=-1),l>-1&&(i=e.slice(0,l),r=e.slice(l+1,a>-1?a:e.length),s=n(r)),a>-1&&(i=i||e.slice(0,a),o=e.slice(a,e.length)),i=nV(i??e,t),{fullPath:i+(r&&"?")+r+o,path:i,query:s,hash:bc(o)}}function Qz(n,e){const t=e.query?n(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function px(n,e){return!e||!n.toLowerCase().startsWith(e.toLowerCase())?n:n.slice(e.length)||"/"}function eV(n,e,t){const i=e.matched.length-1,s=t.matched.length-1;return i>-1&&i===s&&Ra(e.matched[i],t.matched[s])&&Fw(e.params,t.params)&&n(e.query)===n(t.query)&&e.hash===t.hash}function Ra(n,e){return(n.aliasOf||n)===(e.aliasOf||e)}function Fw(n,e){if(Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(!tV(n[t],e[t]))return!1;return!0}function tV(n,e){return Bi(n)?mx(n,e):Bi(e)?mx(e,n):n===e}function mx(n,e){return Bi(e)?n.length===e.length&&n.every((t,i)=>t===e[i]):n.length===1&&n[0]===e}function nV(n,e){if(n.startsWith("/"))return n;if(!n)return e;const t=e.split("/"),i=n.split("/"),s=i[i.length-1];(s===".."||s===".")&&i.push("");let r=t.length-1,o,a;for(o=0;o1&&r--;else break;return t.slice(0,r).join("/")+"/"+i.slice(o).join("/")}const Qs={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var xc;(function(n){n.pop="pop",n.push="push"})(xc||(xc={}));var zl;(function(n){n.back="back",n.forward="forward",n.unknown=""})(zl||(zl={}));function iV(n){if(!n)if(na){const e=document.querySelector("base");n=e&&e.getAttribute("href")||"/",n=n.replace(/^\w+:\/\/[^\/]+/,"")}else n="/";return n[0]!=="/"&&n[0]!=="#"&&(n="/"+n),Jz(n)}const sV=/^[^#]+#/;function rV(n,e){return n.replace(sV,"#")+e}function oV(n,e){const t=document.documentElement.getBoundingClientRect(),i=n.getBoundingClientRect();return{behavior:e.behavior,left:i.left-t.left-(e.left||0),top:i.top-t.top-(e.top||0)}}const Hh=()=>({left:window.scrollX,top:window.scrollY});function aV(n){let e;if("el"in n){const t=n.el,i=typeof t=="string"&&t.startsWith("#"),s=typeof t=="string"?i?document.getElementById(t.slice(1)):document.querySelector(t):t;if(!s)return;e=oV(s,n)}else e=n;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function gx(n,e){return(history.state?history.state.position-e:-1)+n}const Xg=new Map;function lV(n,e){Xg.set(n,e)}function cV(n){const e=Xg.get(n);return Xg.delete(n),e}let uV=()=>location.protocol+"//"+location.host;function kw(n,e){const{pathname:t,search:i,hash:s}=e,r=n.indexOf("#");if(r>-1){let a=s.includes(n.slice(r))?n.slice(r).length:1,l=s.slice(a);return l[0]!=="/"&&(l="/"+l),px(l,"")}return px(t,n)+i+s}function fV(n,e,t,i){let s=[],r=[],o=null;const a=({state:d})=>{const h=kw(n,location),p=t.value,_=e.value;let g=0;if(d){if(t.value=h,e.value=d,o&&o===p){o=null;return}g=_?d.position-_.position:0}else i(h);s.forEach(m=>{m(t.value,p,{delta:g,type:xc.pop,direction:g?g>0?zl.forward:zl.back:zl.unknown})})};function l(){o=t.value}function c(d){s.push(d);const h=()=>{const p=s.indexOf(d);p>-1&&s.splice(p,1)};return r.push(h),h}function u(){const{history:d}=window;d.state&&d.replaceState(Mt({},d.state,{scroll:Hh()}),"")}function f(){for(const d of r)d();r=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:f}}function _x(n,e,t,i=!1,s=!1){return{back:n,current:e,forward:t,replaced:i,position:window.history.length,scroll:s?Hh():null}}function dV(n){const{history:e,location:t}=window,i={value:kw(n,t)},s={value:e.state};s.value||r(i.value,{back:null,current:i.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function r(l,c,u){const f=n.indexOf("#"),d=f>-1?(t.host&&document.querySelector("base")?n:n.slice(f))+l:uV()+n+l;try{e[u?"replaceState":"pushState"](c,"",d),s.value=c}catch(h){console.error(h),t[u?"replace":"assign"](d)}}function o(l,c){const u=Mt({},e.state,_x(s.value.back,l,s.value.forward,!0),c,{position:s.value.position});r(l,u,!0),i.value=l}function a(l,c){const u=Mt({},s.value,e.state,{forward:l,scroll:Hh()});r(u.current,u,!0);const f=Mt({},_x(i.value,l,null),{position:u.position+1},c);r(l,f,!1),i.value=l}return{location:i,state:s,push:a,replace:o}}function hV(n){n=iV(n);const e=dV(n),t=fV(n,e.state,e.location,e.replace);function i(r,o=!0){o||t.pauseListeners(),history.go(r)}const s=Mt({location:"",base:n,go:i,createHref:rV.bind(null,n)},e,t);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>e.state.value}),s}function pV(n){return n=location.host?n||location.pathname+location.search:"",n.includes("#")||(n+="#"),hV(n)}function mV(n){return typeof n=="string"||n&&typeof n=="object"}function Bw(n){return typeof n=="string"||typeof n=="symbol"}const zw=Symbol("");var vx;(function(n){n[n.aborted=4]="aborted",n[n.cancelled=8]="cancelled",n[n.duplicated=16]="duplicated"})(vx||(vx={}));function Pa(n,e){return Mt(new Error,{type:n,[zw]:!0},e)}function _s(n,e){return n instanceof Error&&zw in n&&(e==null||!!(n.type&e))}const yx="[^/]+?",gV={sensitive:!1,strict:!1,start:!0,end:!0},_V=/[.+*?^${}()[\]/\\]/g;function vV(n,e){const t=Mt({},gV,e),i=[];let s=t.start?"^":"";const r=[];for(const c of n){const u=c.length?[]:[90];t.strict&&!c.length&&(s+="/");for(let f=0;fe.length?e.length===1&&e[0]===80?1:-1:0}function Vw(n,e){let t=0;const i=n.score,s=e.score;for(;t0&&e[e.length-1]<0}const bV={type:0,value:""},xV=/[a-zA-Z0-9_]/;function MV(n){if(!n)return[[]];if(n==="/")return[[bV]];if(!n.startsWith("/"))throw new Error(`Invalid path "${n}"`);function e(h){throw new Error(`ERR (${t})/"${c}": ${h}`)}let t=0,i=t;const s=[];let r;function o(){r&&s.push(r),r=[]}let a=0,l,c="",u="";function f(){c&&(t===0?r.push({type:0,value:c}):t===1||t===2||t===3?(r.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),r.push({type:1,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),c="")}function d(){c+=l}for(;a{o(b)}:Bl}function o(f){if(Bw(f)){const d=i.get(f);d&&(i.delete(f),t.splice(t.indexOf(d),1),d.children.forEach(o),d.alias.forEach(o))}else{const d=t.indexOf(f);d>-1&&(t.splice(d,1),f.record.name&&i.delete(f.record.name),f.children.forEach(o),f.alias.forEach(o))}}function a(){return t}function l(f){const d=AV(f,t);t.splice(d,0,f),f.record.name&&!Sx(f)&&i.set(f.record.name,f)}function c(f,d){let h,p={},_,g;if("name"in f&&f.name){if(h=i.get(f.name),!h)throw Pa(1,{location:f});g=h.record.name,p=Mt(xx(d.params,h.keys.filter(b=>!b.optional).concat(h.parent?h.parent.keys.filter(b=>b.optional):[]).map(b=>b.name)),f.params&&xx(f.params,h.keys.map(b=>b.name))),_=h.stringify(p)}else if(f.path!=null)_=f.path,h=t.find(b=>b.re.test(_)),h&&(p=h.parse(_),g=h.record.name);else{if(h=d.name?i.get(d.name):t.find(b=>b.re.test(d.path)),!h)throw Pa(1,{location:f,currentLocation:d});g=h.record.name,p=Mt({},d.params,f.params),_=h.stringify(p)}const m=[];let y=h;for(;y;)m.unshift(y.record),y=y.parent;return{name:g,path:_,params:p,matched:m,meta:wV(m)}}n.forEach(f=>r(f));function u(){t.length=0,i.clear()}return{addRoute:r,resolve:c,removeRoute:o,clearRoutes:u,getRoutes:a,getRecordMatcher:s}}function xx(n,e){const t={};for(const i of e)i in n&&(t[i]=n[i]);return t}function Mx(n){const e={path:n.path,redirect:n.redirect,name:n.name,meta:n.meta||{},aliasOf:n.aliasOf,beforeEnter:n.beforeEnter,props:TV(n),children:n.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in n?n.components||null:n.component&&{default:n.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function TV(n){const e={},t=n.props||!1;if("component"in n)e.default=t;else for(const i in n.components)e[i]=typeof t=="object"?t[i]:t;return e}function Sx(n){for(;n;){if(n.record.aliasOf)return!0;n=n.parent}return!1}function wV(n){return n.reduce((e,t)=>Mt(e,t.meta),{})}function Ex(n,e){const t={};for(const i in n)t[i]=i in e?e[i]:n[i];return t}function AV(n,e){let t=0,i=e.length;for(;t!==i;){const r=t+i>>1;Vw(n,e[r])<0?i=r:t=r+1}const s=CV(n);return s&&(i=e.lastIndexOf(s,i-1)),i}function CV(n){let e=n;for(;e=e.parent;)if(Hw(e)&&Vw(n,e)===0)return e}function Hw({record:n}){return!!(n.name||n.components&&Object.keys(n.components).length||n.redirect)}function RV(n){const e={};if(n===""||n==="?")return e;const i=(n[0]==="?"?n.slice(1):n).split("&");for(let s=0;sr&&Wg(r)):[i&&Wg(i)]).forEach(r=>{r!==void 0&&(e+=(e.length?"&":"")+t,r!=null&&(e+="="+r))})}return e}function PV(n){const e={};for(const t in n){const i=n[t];i!==void 0&&(e[t]=Bi(i)?i.map(s=>s==null?null:""+s):i==null?i:""+i)}return e}const IV=Symbol(""),wx=Symbol(""),Gh=Symbol(""),Gw=Symbol(""),$g=Symbol("");function ll(){let n=[];function e(i){return n.push(i),()=>{const s=n.indexOf(i);s>-1&&n.splice(s,1)}}function t(){n=[]}return{add:e,list:()=>n.slice(),reset:t}}function ar(n,e,t,i,s,r=o=>o()){const o=i&&(i.enterCallbacks[s]=i.enterCallbacks[s]||[]);return()=>new Promise((a,l)=>{const c=d=>{d===!1?l(Pa(4,{from:t,to:e})):d instanceof Error?l(d):mV(d)?l(Pa(2,{from:e,to:d})):(o&&i.enterCallbacks[s]===o&&typeof d=="function"&&o.push(d),a())},u=r(()=>n.call(i&&i.instances[s],e,t,c));let f=Promise.resolve(u);n.length<3&&(f=f.then(c)),f.catch(d=>l(d))})}function bm(n,e,t,i,s=r=>r()){const r=[];for(const o of n)for(const a in o.components){let l=o.components[a];if(!(e!=="beforeRouteEnter"&&!o.instances[a]))if(Iw(l)){const u=(l.__vccOpts||l)[e];u&&r.push(ar(u,t,i,o,a,s))}else{let c=l();r.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const f=Fz(u)?u.default:u;o.mods[a]=u,o.components[a]=f;const h=(f.__vccOpts||f)[e];return h&&ar(h,t,i,o,a,s)()}))}}return r}function Ax(n){const e=En(Gh),t=En(Gw),i=Ee(()=>{const l=Ot(n.to);return e.resolve(l)}),s=Ee(()=>{const{matched:l}=i.value,{length:c}=l,u=l[c-1],f=t.matched;if(!u||!f.length)return-1;const d=f.findIndex(Ra.bind(null,u));if(d>-1)return d;const h=Cx(l[c-2]);return c>1&&Cx(u)===h&&f[f.length-1].path!==h?f.findIndex(Ra.bind(null,l[c-2])):d}),r=Ee(()=>s.value>-1&&UV(t.params,i.value.params)),o=Ee(()=>s.value>-1&&s.value===t.matched.length-1&&Fw(t.params,i.value.params));function a(l={}){if(NV(l)){const c=e[Ot(n.replace)?"replace":"push"](Ot(n.to)).catch(Bl);return n.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:i,href:Ee(()=>i.value.href),isActive:r,isExactActive:o,navigate:a}}function LV(n){return n.length===1?n[0]:n}const DV=fn({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Ax,setup(n,{slots:e}){const t=bi(Ax(n)),{options:i}=En(Gh),s=Ee(()=>({[Rx(n.activeClass,i.linkActiveClass,"router-link-active")]:t.isActive,[Rx(n.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const r=e.default&&LV(e.default(t));return n.custom?r:Ds("a",{"aria-current":t.isExactActive?n.ariaCurrentValue:null,href:t.href,onClick:t.navigate,class:s.value},r)}}}),OV=DV;function NV(n){if(!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)&&!n.defaultPrevented&&!(n.button!==void 0&&n.button!==0)){if(n.currentTarget&&n.currentTarget.getAttribute){const e=n.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return n.preventDefault&&n.preventDefault(),!0}}function UV(n,e){for(const t in e){const i=e[t],s=n[t];if(typeof i=="string"){if(i!==s)return!1}else if(!Bi(s)||s.length!==i.length||i.some((r,o)=>r!==s[o]))return!1}return!0}function Cx(n){return n?n.aliasOf?n.aliasOf.path:n.path:""}const Rx=(n,e,t)=>n??e??t,FV=fn({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(n,{attrs:e,slots:t}){const i=En($g),s=Ee(()=>n.route||i.value),r=En(wx,0),o=Ee(()=>{let c=Ot(r);const{matched:u}=s.value;let f;for(;(f=u[c])&&!f.components;)c++;return c}),a=Ee(()=>s.value.matched[o.value]);dr(wx,Ee(()=>o.value+1)),dr(IV,a),dr($g,s);const l=et();return $e(()=>[l.value,a.value,n.name],([c,u,f],[d,h,p])=>{u&&(u.instances[f]=c,h&&h!==u&&c&&c===d&&(u.leaveGuards.size||(u.leaveGuards=h.leaveGuards),u.updateGuards.size||(u.updateGuards=h.updateGuards))),c&&u&&(!h||!Ra(u,h)||!d)&&(u.enterCallbacks[f]||[]).forEach(_=>_(c))},{flush:"post"}),()=>{const c=s.value,u=n.name,f=a.value,d=f&&f.components[u];if(!d)return Px(t.default,{Component:d,route:c});const h=f.props[u],p=h?h===!0?c.params:typeof h=="function"?h(c):h:null,g=Ds(d,Mt({},p,e,{onVnodeUnmounted:m=>{m.component.isUnmounted&&(f.instances[u]=null)},ref:l}));return Px(t.default,{Component:g,route:c})||g}}});function Px(n,e){if(!n)return null;const t=n(e);return t.length===1?t[0]:t}const Ww=FV;function kV(n){const e=EV(n.routes,n),t=n.parseQuery||RV,i=n.stringifyQuery||Tx,s=n.history,r=ll(),o=ll(),a=ll(),l=De(Qs);let c=Qs;na&&n.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=vm.bind(null,X=>""+X),f=vm.bind(null,Kz),d=vm.bind(null,bc);function h(X,ae){let fe,ce;return Bw(X)?(fe=e.getRecordMatcher(X),ce=ae):ce=X,e.addRoute(ce,fe)}function p(X){const ae=e.getRecordMatcher(X);ae&&e.removeRoute(ae)}function _(){return e.getRoutes().map(X=>X.record)}function g(X){return!!e.getRecordMatcher(X)}function m(X,ae){if(ae=Mt({},ae||l.value),typeof X=="string"){const R=ym(t,X,ae.path),te=e.resolve({path:R.path},ae),G=s.createHref(R.fullPath);return Mt(R,te,{params:d(te.params),hash:bc(R.hash),redirectedFrom:void 0,href:G})}let fe;if(X.path!=null)fe=Mt({},X,{path:ym(t,X.path,ae.path).path});else{const R=Mt({},X.params);for(const te in R)R[te]==null&&delete R[te];fe=Mt({},X,{params:f(R)}),ae.params=f(ae.params)}const ce=e.resolve(fe,ae),Ue=X.hash||"";ce.params=u(d(ce.params));const k=Qz(i,Mt({},X,{hash:qz(Ue),path:ce.path})),z=s.createHref(k);return Mt({fullPath:k,hash:Ue,query:i===Tx?PV(X.query):X.query||{}},ce,{redirectedFrom:void 0,href:z})}function y(X){return typeof X=="string"?ym(t,X,l.value.path):Mt({},X)}function b(X,ae){if(c!==X)return Pa(8,{from:ae,to:X})}function v(X){return S(X)}function E(X){return v(Mt(y(X),{replace:!0}))}function T(X){const ae=X.matched[X.matched.length-1];if(ae&&ae.redirect){const{redirect:fe}=ae;let ce=typeof fe=="function"?fe(X):fe;return typeof ce=="string"&&(ce=ce.includes("?")||ce.includes("#")?ce=y(ce):{path:ce},ce.params={}),Mt({query:X.query,hash:X.hash,params:ce.path!=null?{}:X.params},ce)}}function S(X,ae){const fe=c=m(X),ce=l.value,Ue=X.state,k=X.force,z=X.replace===!0,R=T(fe);if(R)return S(Mt(y(R),{state:typeof R=="object"?Mt({},Ue,R.state):Ue,force:k,replace:z}),ae||fe);const te=fe;te.redirectedFrom=ae;let G;return!k&&eV(i,ce,fe)&&(G=Pa(16,{to:te,from:ce}),se(ce,ce,!0,!1)),(G?Promise.resolve(G):M(te,ce)).catch(W=>_s(W)?_s(W,2)?W:be(W):Z(W,te,ce)).then(W=>{if(W){if(_s(W,2))return S(Mt({replace:z},y(W.to),{state:typeof W.to=="object"?Mt({},Ue,W.to.state):Ue,force:k}),ae||te)}else W=F(te,ce,!0,z,Ue);return L(te,ce,W),W})}function P(X,ae){const fe=b(X,ae);return fe?Promise.reject(fe):Promise.resolve()}function x(X){const ae=re.values().next().value;return ae&&typeof ae.runWithContext=="function"?ae.runWithContext(X):X()}function M(X,ae){let fe;const[ce,Ue,k]=BV(X,ae);fe=bm(ce.reverse(),"beforeRouteLeave",X,ae);for(const R of ce)R.leaveGuards.forEach(te=>{fe.push(ar(te,X,ae))});const z=P.bind(null,X,ae);return fe.push(z),xe(fe).then(()=>{fe=[];for(const R of r.list())fe.push(ar(R,X,ae));return fe.push(z),xe(fe)}).then(()=>{fe=bm(Ue,"beforeRouteUpdate",X,ae);for(const R of Ue)R.updateGuards.forEach(te=>{fe.push(ar(te,X,ae))});return fe.push(z),xe(fe)}).then(()=>{fe=[];for(const R of k)if(R.beforeEnter)if(Bi(R.beforeEnter))for(const te of R.beforeEnter)fe.push(ar(te,X,ae));else fe.push(ar(R.beforeEnter,X,ae));return fe.push(z),xe(fe)}).then(()=>(X.matched.forEach(R=>R.enterCallbacks={}),fe=bm(k,"beforeRouteEnter",X,ae,x),fe.push(z),xe(fe))).then(()=>{fe=[];for(const R of o.list())fe.push(ar(R,X,ae));return fe.push(z),xe(fe)}).catch(R=>_s(R,8)?R:Promise.reject(R))}function L(X,ae,fe){a.list().forEach(ce=>x(()=>ce(X,ae,fe)))}function F(X,ae,fe,ce,Ue){const k=b(X,ae);if(k)return k;const z=ae===Qs,R=na?history.state:{};fe&&(ce||z?s.replace(X.fullPath,Mt({scroll:z&&R&&R.scroll},Ue)):s.push(X.fullPath,Ue)),l.value=X,se(X,ae,fe,z),be()}let H;function Y(){H||(H=s.listen((X,ae,fe)=>{if(!ge.listening)return;const ce=m(X),Ue=T(ce);if(Ue){S(Mt(Ue,{replace:!0,force:!0}),ce).catch(Bl);return}c=ce;const k=l.value;na&&lV(gx(k.fullPath,fe.delta),Hh()),M(ce,k).catch(z=>_s(z,12)?z:_s(z,2)?(S(Mt(y(z.to),{force:!0}),ce).then(R=>{_s(R,20)&&!fe.delta&&fe.type===xc.pop&&s.go(-1,!1)}).catch(Bl),Promise.reject()):(fe.delta&&s.go(-fe.delta,!1),Z(z,ce,k))).then(z=>{z=z||F(ce,k,!1),z&&(fe.delta&&!_s(z,8)?s.go(-fe.delta,!1):fe.type===xc.pop&&_s(z,20)&&s.go(-1,!1)),L(ce,k,z)}).catch(Bl)}))}let ee=ll(),K=ll(),Q;function Z(X,ae,fe){be(X);const ce=K.list();return ce.length?ce.forEach(Ue=>Ue(X,ae,fe)):console.error(X),Promise.reject(X)}function he(){return Q&&l.value!==Qs?Promise.resolve():new Promise((X,ae)=>{ee.add([X,ae])})}function be(X){return Q||(Q=!X,Y(),ee.list().forEach(([ae,fe])=>X?fe(X):ae()),ee.reset()),X}function se(X,ae,fe,ce){const{scrollBehavior:Ue}=n;if(!na||!Ue)return Promise.resolve();const k=!fe&&cV(gx(X.fullPath,0))||(ce||!fe)&&history.state&&history.state.scroll||null;return Er().then(()=>Ue(X,ae,k)).then(z=>z&&aV(z)).catch(z=>Z(z,X,ae))}const ye=X=>s.go(X);let He;const re=new Set,ge={currentRoute:l,listening:!0,addRoute:h,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:g,getRoutes:_,resolve:m,options:n,push:v,replace:E,go:ye,back:()=>ye(-1),forward:()=>ye(1),beforeEach:r.add,beforeResolve:o.add,afterEach:a.add,onError:K.add,isReady:he,install(X){const ae=this;X.component("RouterLink",OV),X.component("RouterView",Ww),X.config.globalProperties.$router=ae,Object.defineProperty(X.config.globalProperties,"$route",{enumerable:!0,get:()=>Ot(l)}),na&&!He&&l.value===Qs&&(He=!0,v(s.location).catch(Ue=>{}));const fe={};for(const Ue in Qs)Object.defineProperty(fe,Ue,{get:()=>l.value[Ue],enumerable:!0});X.provide(Gh,ae),X.provide(Gw,iS(fe)),X.provide($g,l);const ce=X.unmount;re.add(X),X.unmount=function(){re.delete(X),re.size<1&&(c=Qs,H&&H(),H=null,l.value=Qs,He=!1,Q=!1),ce()}}};function xe(X){return X.reduce((ae,fe)=>ae.then(()=>x(fe)),Promise.resolve())}return ge}function BV(n,e){const t=[],i=[],s=[],r=Math.max(e.matched.length,n.matched.length);for(let o=0;oRa(c,a))?i.push(a):t.push(a));const l=n.matched[o];l&&(e.matched.find(c=>Ra(c,l))||s.push(l))}return[t,i,s]}function zV(){return En(Gh)}const VV=[{path:"/",name:"/",component:()=>st(()=>import("./index-DZJqd2YN.js"),__vite__mapDeps([3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,1,2,18,19,20])),meta:{layout:"stage",stageTransition:{name:"bubble-wave-out"}}},{path:"/:all(.*)",name:"/[...all]",component:()=>st(()=>import("./_...all_-CIkXnkHu.js"),[])},{path:"/audio",name:"/audio",component:()=>st(()=>import("./audio-Dg7C6ruQ.js"),[])},{path:"/devtools",children:[{path:"chat",name:"/devtools/chat",component:()=>st(()=>import("./chat-Dn5NUeJ8.js"),__vite__mapDeps([21,12,8]))},{path:"image",name:"/devtools/image",component:()=>st(()=>import("./image-B_Hg7W96.js"),__vite__mapDeps([22,23]))}]},{path:"/queue",name:"/queue",component:()=>st(()=>import("./queue-BwjoE2a-.js"),__vite__mapDeps([24,10]))},{path:"/settings",children:[{path:"",name:"/settings/",component:()=>st(()=>import("./index-ChBsVHOK.js"),__vite__mapDeps([25,4,26,19,27])),meta:{stageTransition:{name:"slide"}}},{path:"airi-card",children:[{path:"",name:"/settings/airi-card/",component:()=>st(()=>import("./index-bGU7kv-p.js"),__vite__mapDeps([28,13,4,14,9,8,7,29,30,31,32,19])),meta:{stageTransition:{name:"slide"}}},{path:"components",children:[{path:"CardDetailDialog",name:"/settings/airi-card/components/CardDetailDialog",component:()=>st(()=>import("./CardDetailDialog-FgNNmEDA.js"),__vite__mapDeps([33,29,30,31,4,13,14,9,8,7]))},{path:"CardListItem",name:"/settings/airi-card/components/CardListItem",component:()=>st(()=>import("./CardListItem-D1SxHi9v.js"),__vite__mapDeps([34,32]))},{path:"DeleteCardDialog",name:"/settings/airi-card/components/DeleteCardDialog",component:()=>st(()=>import("./DeleteCardDialog-NTC8VI23.js"),__vite__mapDeps([35,30,31]))}]}]},{path:"appearance",children:[{path:"",name:"/settings/appearance/",component:()=>st(()=>import("./index-Cow_Er_T.js"),__vite__mapDeps([36,26,4,37,17,16,31,38,19,39])),meta:{stageTransition:{name:"slide",pageSpecificAvailable:!0}}}]},{path:"memory",children:[{path:"",name:"/settings/memory/",component:()=>st(()=>import("./index-BhqVpxhd.js"),[])}]},{path:"models",children:[{path:"",name:"/settings/models/",component:()=>st(()=>import("./index-BR3VGYw9.js"),__vite__mapDeps([40,26,15,4,37,17,16,31,38,19,41])),meta:{stageTransition:{name:"slide",pageSpecificAvailable:!0}}}]},{path:"modules",children:[{path:"",name:"/settings/modules/",component:()=>st(()=>import("./index-CAg1Naud.js"),__vite__mapDeps([42,4,43,44,26,38,19])),meta:{stageTransition:{name:"slide",pageSpecificAvailable:!0}}},{path:"consciousness",name:"/settings/modules/consciousness",component:()=>st(()=>import("./consciousness-x6W39XLe.js"),__vite__mapDeps([45,46,16,47,48,4,14,9,8,19])),meta:{stageTransition:{name:"slide"}}},{path:"memory-long-term",name:"/settings/modules/memory-long-term",component:()=>st(()=>import("./memory-long-term-IlxAN4z1.js"),[])},{path:"memory-short-term",name:"/settings/modules/memory-short-term",component:()=>st(()=>import("./memory-short-term-B90Jb-nv.js"),[])},{path:"speech",name:"/settings/modules/speech",component:()=>st(()=>import("./speech-DqZBet28.js"),__vite__mapDeps([49,50,51,52,47,46,16,48,4,9,8,7,19,53])),meta:{stageTransition:{name:"slide"}}}]},{path:"providers",children:[{path:"",name:"/settings/providers/",component:()=>st(()=>import("./index-CLIXS4H9.js"),__vite__mapDeps([54,26,4,9,8,43,44,38,19])),meta:{stageTransition:{name:"slide",pageSpecificAvailable:!0}}},{path:"anthropic",name:"/settings/providers/anthropic",component:()=>st(()=>import("./anthropic-DZM8jqDl.js"),__vite__mapDeps([55,4,9,8,56,17,16,52,47,57,58,59]))},{path:"cloudflare-workers-ai",name:"/settings/providers/cloudflare-workers-ai",component:()=>st(()=>import("./cloudflare-workers-ai-BuVW7ZIH.js"),__vite__mapDeps([60,4,9,8,52,47,57,58,59]))},{path:"deepseek",name:"/settings/providers/deepseek",component:()=>st(()=>import("./deepseek-CrysIhkq.js"),__vite__mapDeps([61,4,9,8,56,17,16,52,47,57,58,59]))},{path:"elevenlabs",name:"/settings/providers/elevenlabs",component:()=>st(()=>import("./elevenlabs-Dh3dKYgb.js"),__vite__mapDeps([62,4,9,8,7,63,50,51,56,17,16,52,47,57,58]))},{path:"featherless-ai",name:"/settings/providers/featherless-ai",component:()=>st(()=>import("./featherless-ai-DYiNttaX.js"),__vite__mapDeps([64,4,9,8,56,17,16,52,47,57,58,59]))},{path:"fireworks-ai",name:"/settings/providers/fireworks-ai",component:()=>st(()=>import("./fireworks-ai-Brzqd047.js"),__vite__mapDeps([65,4,9,8,56,17,16,52,47,57,58,59]))},{path:"google-generative-ai",name:"/settings/providers/google-generative-ai",component:()=>st(()=>import("./google-generative-ai-CG94KMvF.js"),__vite__mapDeps([66,4,9,8,56,17,16,52,47,57,58,59]))},{path:"microsoft-speech",name:"/settings/providers/microsoft-speech",component:()=>st(()=>import("./microsoft-speech-BNSZ5Owh.js"),__vite__mapDeps([67,52,47,4,9,8,7,63,50,51,56,17,16,57,58]))},{path:"mistral-ai",name:"/settings/providers/mistral-ai",component:()=>st(()=>import("./mistral-ai-CKRmqHIA.js"),__vite__mapDeps([68,4,9,8,56,17,16,52,47,57,58,59]))},{path:"moonshot-ai",name:"/settings/providers/moonshot-ai",component:()=>st(()=>import("./moonshot-ai-CX56TEso.js"),__vite__mapDeps([69,4,9,8,56,17,16,52,47,57,58,59]))},{path:"novita-ai",name:"/settings/providers/novita-ai",component:()=>st(()=>import("./novita-ai-8wPkVedi.js"),__vite__mapDeps([70,4,9,8,56,17,16,52,47,57,58,59]))},{path:"ollama",name:"/settings/providers/ollama",component:()=>st(()=>import("./ollama-uyGva0oA.js"),__vite__mapDeps([71,47,4,9,8,56,17,16,52,58,59]))},{path:"openai",name:"/settings/providers/openai",component:()=>st(()=>import("./openai-CNZdQq6r.js"),__vite__mapDeps([72,4,9,8,56,17,16,52,47,57,58,59]))},{path:"openrouter-ai",name:"/settings/providers/openrouter-ai",component:()=>st(()=>import("./openrouter-ai-CX1NLDlM.js"),__vite__mapDeps([73,4,9,8,56,17,16,52,47,57,58,59]))},{path:"together-ai",name:"/settings/providers/together-ai",component:()=>st(()=>import("./together-ai-CiiMDjmH.js"),__vite__mapDeps([74,4,9,8,56,17,16,52,47,57,58,59]))},{path:"xai",name:"/settings/providers/xai",component:()=>st(()=>import("./xai-BUrYAIzO.js"),__vite__mapDeps([75,4,9,8,56,17,16,52,47,57,58,59]))}]}]},{path:"/test",children:[{path:"filter-message",name:"/test/filter-message",component:()=>st(()=>import("./filter-message-CRLogJIb.js"),[])},{path:"queues",children:[{path:"delays",name:"/test/queues/delays",component:()=>st(()=>import("./delays-HBOKcZm5.js"),__vite__mapDeps([76,11,4,10,18]))},{path:"emotions",name:"/test/queues/emotions",component:()=>st(()=>import("./emotions-C1vttnju.js"),__vite__mapDeps([77,11,4,10]))},{path:"messages",name:"/test/queues/messages",component:()=>st(()=>import("./messages-DWFXV8un.js"),__vite__mapDeps([78,11,4,10]))}]}]}],Xw=(n,e)=>{if(typeof n=="number"){if(e===3)return{mode:"rgb",r:(n>>8&15|n>>4&240)/255,g:(n>>4&15|n&240)/255,b:(n&15|n<<4&240)/255};if(e===4)return{mode:"rgb",r:(n>>12&15|n>>8&240)/255,g:(n>>8&15|n>>4&240)/255,b:(n>>4&15|n&240)/255,alpha:(n&15|n<<4&240)/255};if(e===6)return{mode:"rgb",r:(n>>16&255)/255,g:(n>>8&255)/255,b:(n&255)/255};if(e===8)return{mode:"rgb",r:(n>>24&255)/255,g:(n>>16&255)/255,b:(n>>8&255)/255,alpha:(n&255)/255}}},HV={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},GV=n=>Xw(HV[n.toLowerCase()],6),WV=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,XV=n=>{let e;return(e=n.match(WV))?Xw(parseInt(e[1],16),e[1].length):void 0},hr="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",Vl=`${hr}%`,z_=`(?:${hr}%|${hr})`,$V=`(?:${hr}(deg|grad|rad|turn)|${hr})`,Ia="\\s*,\\s*",qV=new RegExp(`^rgba?\\(\\s*${hr}${Ia}${hr}${Ia}${hr}\\s*(?:,\\s*${z_}\\s*)?\\)$`),YV=new RegExp(`^rgba?\\(\\s*${Vl}${Ia}${Vl}${Ia}${Vl}\\s*(?:,\\s*${z_}\\s*)?\\)$`),jV=n=>{let e={mode:"rgb"},t;if(t=n.match(qV))t[1]!==void 0&&(e.r=t[1]/255),t[2]!==void 0&&(e.g=t[2]/255),t[3]!==void 0&&(e.b=t[3]/255);else if(t=n.match(YV))t[1]!==void 0&&(e.r=t[1]/100),t[2]!==void 0&&(e.g=t[2]/100),t[3]!==void 0&&(e.b=t[3]/100);else return;return t[4]!==void 0?e.alpha=Math.max(0,Math.min(1,t[4]/100)):t[5]!==void 0&&(e.alpha=Math.max(0,Math.min(1,+t[5]))),e},KV=(n,e)=>n===void 0?void 0:typeof n!="object"?o6(n):n.mode!==void 0?n:e?{...n,mode:e}:void 0,$w=(n="rgb")=>e=>(e=KV(e,n))!==void 0?e.mode===n?e:Yi[e.mode][n]?Yi[e.mode][n](e):n==="rgb"?Yi[e.mode].rgb(e):Yi.rgb[n](Yi[e.mode].rgb(e)):void 0,Yi={},qw={},Ld=[],Yw={},ZV=n=>n,Et=n=>(Yi[n.mode]={...Yi[n.mode],...n.toMode},Object.keys(n.fromMode||{}).forEach(e=>{Yi[e]||(Yi[e]={}),Yi[e][n.mode]=n.fromMode[e]}),n.ranges||(n.ranges={}),n.difference||(n.difference={}),n.channels.forEach(e=>{if(n.ranges[e]===void 0&&(n.ranges[e]=[0,1]),!n.interpolate[e])throw new Error(`Missing interpolator for: ${e}`);typeof n.interpolate[e]=="function"&&(n.interpolate[e]={use:n.interpolate[e]}),n.interpolate[e].fixup||(n.interpolate[e].fixup=ZV)}),qw[n.mode]=n,(n.parse||[]).forEach(e=>{QV(e,n.mode)}),$w(n.mode)),JV=n=>qw[n],QV=(n,e)=>{if(typeof n=="string"){if(!e)throw new Error("'mode' required when 'parser' is a string");Yw[n]=e}else typeof n=="function"&&Ld.indexOf(n)<0&&Ld.push(n)},qg=/[^\x00-\x7F]|[a-zA-Z_]/,e6=/[^\x00-\x7F]|[-\w]/,_e={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"};let qe=0;function cf(n){let e=n[qe],t=n[qe+1];return e==="-"||e==="+"?/\d/.test(t)||t==="."&&/\d/.test(n[qe+2]):e==="."?/\d/.test(t):/\d/.test(e)}function Yg(n){if(qe>=n.length)return!1;let e=n[qe];if(qg.test(e))return!0;if(e==="-"){if(n.length-qe<2)return!1;let t=n[qe+1];return!!(t==="-"||qg.test(t))}return!1}const t6={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function cl(n){let e="";if((n[qe]==="-"||n[qe]==="+")&&(e+=n[qe++]),e+=uf(n),n[qe]==="."&&/\d/.test(n[qe+1])&&(e+=n[qe++]+uf(n)),(n[qe]==="e"||n[qe]==="E")&&((n[qe+1]==="-"||n[qe+1]==="+")&&/\d/.test(n[qe+2])?e+=n[qe++]+n[qe++]+uf(n):/\d/.test(n[qe+1])&&(e+=n[qe++]+uf(n))),Yg(n)){let t=Dd(n);return t==="deg"||t==="rad"||t==="turn"||t==="grad"?{type:_e.Hue,value:e*t6[t]}:void 0}return n[qe]==="%"?(qe++,{type:_e.Percentage,value:+e}):{type:_e.Number,value:+e}}function uf(n){let e="";for(;/\d/.test(n[qe]);)e+=n[qe++];return e}function Dd(n){let e="";for(;qe{},Bi=Array.isArray,Lw=/#/g,kz=/&/g,Bz=/\//g,zz=/=/g,Vz=/\?/g,Dw=/\+/g,Hz=/%5B/g,Gz=/%5D/g,Ow=/%5E/g,Wz=/%60/g,Nw=/%7B/g,Xz=/%7C/g,Uw=/%7D/g,$z=/%20/g;function B_(n){return encodeURI(""+n).replace(Xz,"|").replace(Hz,"[").replace(Gz,"]")}function qz(n){return B_(n).replace(Nw,"{").replace(Uw,"}").replace(Ow,"^")}function Wg(n){return B_(n).replace(Dw,"%2B").replace($z,"+").replace(Lw,"%23").replace(kz,"%26").replace(Wz,"`").replace(Nw,"{").replace(Uw,"}").replace(Ow,"^")}function Yz(n){return Wg(n).replace(zz,"%3D")}function jz(n){return B_(n).replace(Lw,"%23").replace(Vz,"%3F")}function Kz(n){return n==null?"":jz(n).replace(Bz,"%2F")}function bc(n){try{return decodeURIComponent(""+n)}catch{}return""+n}const Zz=/\/$/,Jz=n=>n.replace(Zz,"");function ym(n,e,t="/"){let i,s={},r="",o="";const a=e.indexOf("#");let l=e.indexOf("?");return a=0&&(l=-1),l>-1&&(i=e.slice(0,l),r=e.slice(l+1,a>-1?a:e.length),s=n(r)),a>-1&&(i=i||e.slice(0,a),o=e.slice(a,e.length)),i=nV(i??e,t),{fullPath:i+(r&&"?")+r+o,path:i,query:s,hash:bc(o)}}function Qz(n,e){const t=e.query?n(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function px(n,e){return!e||!n.toLowerCase().startsWith(e.toLowerCase())?n:n.slice(e.length)||"/"}function eV(n,e,t){const i=e.matched.length-1,s=t.matched.length-1;return i>-1&&i===s&&Ra(e.matched[i],t.matched[s])&&Fw(e.params,t.params)&&n(e.query)===n(t.query)&&e.hash===t.hash}function Ra(n,e){return(n.aliasOf||n)===(e.aliasOf||e)}function Fw(n,e){if(Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(!tV(n[t],e[t]))return!1;return!0}function tV(n,e){return Bi(n)?mx(n,e):Bi(e)?mx(e,n):n===e}function mx(n,e){return Bi(e)?n.length===e.length&&n.every((t,i)=>t===e[i]):n.length===1&&n[0]===e}function nV(n,e){if(n.startsWith("/"))return n;if(!n)return e;const t=e.split("/"),i=n.split("/"),s=i[i.length-1];(s===".."||s===".")&&i.push("");let r=t.length-1,o,a;for(o=0;o1&&r--;else break;return t.slice(0,r).join("/")+"/"+i.slice(o).join("/")}const Qs={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var xc;(function(n){n.pop="pop",n.push="push"})(xc||(xc={}));var zl;(function(n){n.back="back",n.forward="forward",n.unknown=""})(zl||(zl={}));function iV(n){if(!n)if(na){const e=document.querySelector("base");n=e&&e.getAttribute("href")||"/",n=n.replace(/^\w+:\/\/[^\/]+/,"")}else n="/";return n[0]!=="/"&&n[0]!=="#"&&(n="/"+n),Jz(n)}const sV=/^[^#]+#/;function rV(n,e){return n.replace(sV,"#")+e}function oV(n,e){const t=document.documentElement.getBoundingClientRect(),i=n.getBoundingClientRect();return{behavior:e.behavior,left:i.left-t.left-(e.left||0),top:i.top-t.top-(e.top||0)}}const Hh=()=>({left:window.scrollX,top:window.scrollY});function aV(n){let e;if("el"in n){const t=n.el,i=typeof t=="string"&&t.startsWith("#"),s=typeof t=="string"?i?document.getElementById(t.slice(1)):document.querySelector(t):t;if(!s)return;e=oV(s,n)}else e=n;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function gx(n,e){return(history.state?history.state.position-e:-1)+n}const Xg=new Map;function lV(n,e){Xg.set(n,e)}function cV(n){const e=Xg.get(n);return Xg.delete(n),e}let uV=()=>location.protocol+"//"+location.host;function kw(n,e){const{pathname:t,search:i,hash:s}=e,r=n.indexOf("#");if(r>-1){let a=s.includes(n.slice(r))?n.slice(r).length:1,l=s.slice(a);return l[0]!=="/"&&(l="/"+l),px(l,"")}return px(t,n)+i+s}function fV(n,e,t,i){let s=[],r=[],o=null;const a=({state:d})=>{const h=kw(n,location),p=t.value,_=e.value;let g=0;if(d){if(t.value=h,e.value=d,o&&o===p){o=null;return}g=_?d.position-_.position:0}else i(h);s.forEach(m=>{m(t.value,p,{delta:g,type:xc.pop,direction:g?g>0?zl.forward:zl.back:zl.unknown})})};function l(){o=t.value}function c(d){s.push(d);const h=()=>{const p=s.indexOf(d);p>-1&&s.splice(p,1)};return r.push(h),h}function u(){const{history:d}=window;d.state&&d.replaceState(Mt({},d.state,{scroll:Hh()}),"")}function f(){for(const d of r)d();r=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:f}}function _x(n,e,t,i=!1,s=!1){return{back:n,current:e,forward:t,replaced:i,position:window.history.length,scroll:s?Hh():null}}function dV(n){const{history:e,location:t}=window,i={value:kw(n,t)},s={value:e.state};s.value||r(i.value,{back:null,current:i.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function r(l,c,u){const f=n.indexOf("#"),d=f>-1?(t.host&&document.querySelector("base")?n:n.slice(f))+l:uV()+n+l;try{e[u?"replaceState":"pushState"](c,"",d),s.value=c}catch(h){console.error(h),t[u?"replace":"assign"](d)}}function o(l,c){const u=Mt({},e.state,_x(s.value.back,l,s.value.forward,!0),c,{position:s.value.position});r(l,u,!0),i.value=l}function a(l,c){const u=Mt({},s.value,e.state,{forward:l,scroll:Hh()});r(u.current,u,!0);const f=Mt({},_x(i.value,l,null),{position:u.position+1},c);r(l,f,!1),i.value=l}return{location:i,state:s,push:a,replace:o}}function hV(n){n=iV(n);const e=dV(n),t=fV(n,e.state,e.location,e.replace);function i(r,o=!0){o||t.pauseListeners(),history.go(r)}const s=Mt({location:"",base:n,go:i,createHref:rV.bind(null,n)},e,t);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>e.state.value}),s}function pV(n){return n=location.host?n||location.pathname+location.search:"",n.includes("#")||(n+="#"),hV(n)}function mV(n){return typeof n=="string"||n&&typeof n=="object"}function Bw(n){return typeof n=="string"||typeof n=="symbol"}const zw=Symbol("");var vx;(function(n){n[n.aborted=4]="aborted",n[n.cancelled=8]="cancelled",n[n.duplicated=16]="duplicated"})(vx||(vx={}));function Pa(n,e){return Mt(new Error,{type:n,[zw]:!0},e)}function _s(n,e){return n instanceof Error&&zw in n&&(e==null||!!(n.type&e))}const yx="[^/]+?",gV={sensitive:!1,strict:!1,start:!0,end:!0},_V=/[.+*?^${}()[\]/\\]/g;function vV(n,e){const t=Mt({},gV,e),i=[];let s=t.start?"^":"";const r=[];for(const c of n){const u=c.length?[]:[90];t.strict&&!c.length&&(s+="/");for(let f=0;fe.length?e.length===1&&e[0]===80?1:-1:0}function Vw(n,e){let t=0;const i=n.score,s=e.score;for(;t0&&e[e.length-1]<0}const bV={type:0,value:""},xV=/[a-zA-Z0-9_]/;function MV(n){if(!n)return[[]];if(n==="/")return[[bV]];if(!n.startsWith("/"))throw new Error(`Invalid path "${n}"`);function e(h){throw new Error(`ERR (${t})/"${c}": ${h}`)}let t=0,i=t;const s=[];let r;function o(){r&&s.push(r),r=[]}let a=0,l,c="",u="";function f(){c&&(t===0?r.push({type:0,value:c}):t===1||t===2||t===3?(r.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),r.push({type:1,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),c="")}function d(){c+=l}for(;a{o(b)}:Bl}function o(f){if(Bw(f)){const d=i.get(f);d&&(i.delete(f),t.splice(t.indexOf(d),1),d.children.forEach(o),d.alias.forEach(o))}else{const d=t.indexOf(f);d>-1&&(t.splice(d,1),f.record.name&&i.delete(f.record.name),f.children.forEach(o),f.alias.forEach(o))}}function a(){return t}function l(f){const d=AV(f,t);t.splice(d,0,f),f.record.name&&!Sx(f)&&i.set(f.record.name,f)}function c(f,d){let h,p={},_,g;if("name"in f&&f.name){if(h=i.get(f.name),!h)throw Pa(1,{location:f});g=h.record.name,p=Mt(xx(d.params,h.keys.filter(b=>!b.optional).concat(h.parent?h.parent.keys.filter(b=>b.optional):[]).map(b=>b.name)),f.params&&xx(f.params,h.keys.map(b=>b.name))),_=h.stringify(p)}else if(f.path!=null)_=f.path,h=t.find(b=>b.re.test(_)),h&&(p=h.parse(_),g=h.record.name);else{if(h=d.name?i.get(d.name):t.find(b=>b.re.test(d.path)),!h)throw Pa(1,{location:f,currentLocation:d});g=h.record.name,p=Mt({},d.params,f.params),_=h.stringify(p)}const m=[];let y=h;for(;y;)m.unshift(y.record),y=y.parent;return{name:g,path:_,params:p,matched:m,meta:wV(m)}}n.forEach(f=>r(f));function u(){t.length=0,i.clear()}return{addRoute:r,resolve:c,removeRoute:o,clearRoutes:u,getRoutes:a,getRecordMatcher:s}}function xx(n,e){const t={};for(const i of e)i in n&&(t[i]=n[i]);return t}function Mx(n){const e={path:n.path,redirect:n.redirect,name:n.name,meta:n.meta||{},aliasOf:n.aliasOf,beforeEnter:n.beforeEnter,props:TV(n),children:n.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in n?n.components||null:n.component&&{default:n.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function TV(n){const e={},t=n.props||!1;if("component"in n)e.default=t;else for(const i in n.components)e[i]=typeof t=="object"?t[i]:t;return e}function Sx(n){for(;n;){if(n.record.aliasOf)return!0;n=n.parent}return!1}function wV(n){return n.reduce((e,t)=>Mt(e,t.meta),{})}function Ex(n,e){const t={};for(const i in n)t[i]=i in e?e[i]:n[i];return t}function AV(n,e){let t=0,i=e.length;for(;t!==i;){const r=t+i>>1;Vw(n,e[r])<0?i=r:t=r+1}const s=CV(n);return s&&(i=e.lastIndexOf(s,i-1)),i}function CV(n){let e=n;for(;e=e.parent;)if(Hw(e)&&Vw(n,e)===0)return e}function Hw({record:n}){return!!(n.name||n.components&&Object.keys(n.components).length||n.redirect)}function RV(n){const e={};if(n===""||n==="?")return e;const i=(n[0]==="?"?n.slice(1):n).split("&");for(let s=0;sr&&Wg(r)):[i&&Wg(i)]).forEach(r=>{r!==void 0&&(e+=(e.length?"&":"")+t,r!=null&&(e+="="+r))})}return e}function PV(n){const e={};for(const t in n){const i=n[t];i!==void 0&&(e[t]=Bi(i)?i.map(s=>s==null?null:""+s):i==null?i:""+i)}return e}const IV=Symbol(""),wx=Symbol(""),Gh=Symbol(""),Gw=Symbol(""),$g=Symbol("");function ll(){let n=[];function e(i){return n.push(i),()=>{const s=n.indexOf(i);s>-1&&n.splice(s,1)}}function t(){n=[]}return{add:e,list:()=>n.slice(),reset:t}}function ar(n,e,t,i,s,r=o=>o()){const o=i&&(i.enterCallbacks[s]=i.enterCallbacks[s]||[]);return()=>new Promise((a,l)=>{const c=d=>{d===!1?l(Pa(4,{from:t,to:e})):d instanceof Error?l(d):mV(d)?l(Pa(2,{from:e,to:d})):(o&&i.enterCallbacks[s]===o&&typeof d=="function"&&o.push(d),a())},u=r(()=>n.call(i&&i.instances[s],e,t,c));let f=Promise.resolve(u);n.length<3&&(f=f.then(c)),f.catch(d=>l(d))})}function bm(n,e,t,i,s=r=>r()){const r=[];for(const o of n)for(const a in o.components){let l=o.components[a];if(!(e!=="beforeRouteEnter"&&!o.instances[a]))if(Iw(l)){const u=(l.__vccOpts||l)[e];u&&r.push(ar(u,t,i,o,a,s))}else{let c=l();r.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const f=Fz(u)?u.default:u;o.mods[a]=u,o.components[a]=f;const h=(f.__vccOpts||f)[e];return h&&ar(h,t,i,o,a,s)()}))}}return r}function Ax(n){const e=En(Gh),t=En(Gw),i=Ee(()=>{const l=Ot(n.to);return e.resolve(l)}),s=Ee(()=>{const{matched:l}=i.value,{length:c}=l,u=l[c-1],f=t.matched;if(!u||!f.length)return-1;const d=f.findIndex(Ra.bind(null,u));if(d>-1)return d;const h=Cx(l[c-2]);return c>1&&Cx(u)===h&&f[f.length-1].path!==h?f.findIndex(Ra.bind(null,l[c-2])):d}),r=Ee(()=>s.value>-1&&UV(t.params,i.value.params)),o=Ee(()=>s.value>-1&&s.value===t.matched.length-1&&Fw(t.params,i.value.params));function a(l={}){if(NV(l)){const c=e[Ot(n.replace)?"replace":"push"](Ot(n.to)).catch(Bl);return n.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:i,href:Ee(()=>i.value.href),isActive:r,isExactActive:o,navigate:a}}function LV(n){return n.length===1?n[0]:n}const DV=fn({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Ax,setup(n,{slots:e}){const t=bi(Ax(n)),{options:i}=En(Gh),s=Ee(()=>({[Rx(n.activeClass,i.linkActiveClass,"router-link-active")]:t.isActive,[Rx(n.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const r=e.default&&LV(e.default(t));return n.custom?r:Ds("a",{"aria-current":t.isExactActive?n.ariaCurrentValue:null,href:t.href,onClick:t.navigate,class:s.value},r)}}}),OV=DV;function NV(n){if(!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)&&!n.defaultPrevented&&!(n.button!==void 0&&n.button!==0)){if(n.currentTarget&&n.currentTarget.getAttribute){const e=n.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return n.preventDefault&&n.preventDefault(),!0}}function UV(n,e){for(const t in e){const i=e[t],s=n[t];if(typeof i=="string"){if(i!==s)return!1}else if(!Bi(s)||s.length!==i.length||i.some((r,o)=>r!==s[o]))return!1}return!0}function Cx(n){return n?n.aliasOf?n.aliasOf.path:n.path:""}const Rx=(n,e,t)=>n??e??t,FV=fn({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(n,{attrs:e,slots:t}){const i=En($g),s=Ee(()=>n.route||i.value),r=En(wx,0),o=Ee(()=>{let c=Ot(r);const{matched:u}=s.value;let f;for(;(f=u[c])&&!f.components;)c++;return c}),a=Ee(()=>s.value.matched[o.value]);dr(wx,Ee(()=>o.value+1)),dr(IV,a),dr($g,s);const l=et();return $e(()=>[l.value,a.value,n.name],([c,u,f],[d,h,p])=>{u&&(u.instances[f]=c,h&&h!==u&&c&&c===d&&(u.leaveGuards.size||(u.leaveGuards=h.leaveGuards),u.updateGuards.size||(u.updateGuards=h.updateGuards))),c&&u&&(!h||!Ra(u,h)||!d)&&(u.enterCallbacks[f]||[]).forEach(_=>_(c))},{flush:"post"}),()=>{const c=s.value,u=n.name,f=a.value,d=f&&f.components[u];if(!d)return Px(t.default,{Component:d,route:c});const h=f.props[u],p=h?h===!0?c.params:typeof h=="function"?h(c):h:null,g=Ds(d,Mt({},p,e,{onVnodeUnmounted:m=>{m.component.isUnmounted&&(f.instances[u]=null)},ref:l}));return Px(t.default,{Component:g,route:c})||g}}});function Px(n,e){if(!n)return null;const t=n(e);return t.length===1?t[0]:t}const Ww=FV;function kV(n){const e=EV(n.routes,n),t=n.parseQuery||RV,i=n.stringifyQuery||Tx,s=n.history,r=ll(),o=ll(),a=ll(),l=De(Qs);let c=Qs;na&&n.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=vm.bind(null,X=>""+X),f=vm.bind(null,Kz),d=vm.bind(null,bc);function h(X,ae){let fe,ce;return Bw(X)?(fe=e.getRecordMatcher(X),ce=ae):ce=X,e.addRoute(ce,fe)}function p(X){const ae=e.getRecordMatcher(X);ae&&e.removeRoute(ae)}function _(){return e.getRoutes().map(X=>X.record)}function g(X){return!!e.getRecordMatcher(X)}function m(X,ae){if(ae=Mt({},ae||l.value),typeof X=="string"){const R=ym(t,X,ae.path),te=e.resolve({path:R.path},ae),G=s.createHref(R.fullPath);return Mt(R,te,{params:d(te.params),hash:bc(R.hash),redirectedFrom:void 0,href:G})}let fe;if(X.path!=null)fe=Mt({},X,{path:ym(t,X.path,ae.path).path});else{const R=Mt({},X.params);for(const te in R)R[te]==null&&delete R[te];fe=Mt({},X,{params:f(R)}),ae.params=f(ae.params)}const ce=e.resolve(fe,ae),Ue=X.hash||"";ce.params=u(d(ce.params));const k=Qz(i,Mt({},X,{hash:qz(Ue),path:ce.path})),z=s.createHref(k);return Mt({fullPath:k,hash:Ue,query:i===Tx?PV(X.query):X.query||{}},ce,{redirectedFrom:void 0,href:z})}function y(X){return typeof X=="string"?ym(t,X,l.value.path):Mt({},X)}function b(X,ae){if(c!==X)return Pa(8,{from:ae,to:X})}function v(X){return S(X)}function E(X){return v(Mt(y(X),{replace:!0}))}function T(X){const ae=X.matched[X.matched.length-1];if(ae&&ae.redirect){const{redirect:fe}=ae;let ce=typeof fe=="function"?fe(X):fe;return typeof ce=="string"&&(ce=ce.includes("?")||ce.includes("#")?ce=y(ce):{path:ce},ce.params={}),Mt({query:X.query,hash:X.hash,params:ce.path!=null?{}:X.params},ce)}}function S(X,ae){const fe=c=m(X),ce=l.value,Ue=X.state,k=X.force,z=X.replace===!0,R=T(fe);if(R)return S(Mt(y(R),{state:typeof R=="object"?Mt({},Ue,R.state):Ue,force:k,replace:z}),ae||fe);const te=fe;te.redirectedFrom=ae;let G;return!k&&eV(i,ce,fe)&&(G=Pa(16,{to:te,from:ce}),se(ce,ce,!0,!1)),(G?Promise.resolve(G):M(te,ce)).catch(W=>_s(W)?_s(W,2)?W:be(W):Z(W,te,ce)).then(W=>{if(W){if(_s(W,2))return S(Mt({replace:z},y(W.to),{state:typeof W.to=="object"?Mt({},Ue,W.to.state):Ue,force:k}),ae||te)}else W=F(te,ce,!0,z,Ue);return L(te,ce,W),W})}function P(X,ae){const fe=b(X,ae);return fe?Promise.reject(fe):Promise.resolve()}function x(X){const ae=re.values().next().value;return ae&&typeof ae.runWithContext=="function"?ae.runWithContext(X):X()}function M(X,ae){let fe;const[ce,Ue,k]=BV(X,ae);fe=bm(ce.reverse(),"beforeRouteLeave",X,ae);for(const R of ce)R.leaveGuards.forEach(te=>{fe.push(ar(te,X,ae))});const z=P.bind(null,X,ae);return fe.push(z),xe(fe).then(()=>{fe=[];for(const R of r.list())fe.push(ar(R,X,ae));return fe.push(z),xe(fe)}).then(()=>{fe=bm(Ue,"beforeRouteUpdate",X,ae);for(const R of Ue)R.updateGuards.forEach(te=>{fe.push(ar(te,X,ae))});return fe.push(z),xe(fe)}).then(()=>{fe=[];for(const R of k)if(R.beforeEnter)if(Bi(R.beforeEnter))for(const te of R.beforeEnter)fe.push(ar(te,X,ae));else fe.push(ar(R.beforeEnter,X,ae));return fe.push(z),xe(fe)}).then(()=>(X.matched.forEach(R=>R.enterCallbacks={}),fe=bm(k,"beforeRouteEnter",X,ae,x),fe.push(z),xe(fe))).then(()=>{fe=[];for(const R of o.list())fe.push(ar(R,X,ae));return fe.push(z),xe(fe)}).catch(R=>_s(R,8)?R:Promise.reject(R))}function L(X,ae,fe){a.list().forEach(ce=>x(()=>ce(X,ae,fe)))}function F(X,ae,fe,ce,Ue){const k=b(X,ae);if(k)return k;const z=ae===Qs,R=na?history.state:{};fe&&(ce||z?s.replace(X.fullPath,Mt({scroll:z&&R&&R.scroll},Ue)):s.push(X.fullPath,Ue)),l.value=X,se(X,ae,fe,z),be()}let H;function Y(){H||(H=s.listen((X,ae,fe)=>{if(!ge.listening)return;const ce=m(X),Ue=T(ce);if(Ue){S(Mt(Ue,{replace:!0,force:!0}),ce).catch(Bl);return}c=ce;const k=l.value;na&&lV(gx(k.fullPath,fe.delta),Hh()),M(ce,k).catch(z=>_s(z,12)?z:_s(z,2)?(S(Mt(y(z.to),{force:!0}),ce).then(R=>{_s(R,20)&&!fe.delta&&fe.type===xc.pop&&s.go(-1,!1)}).catch(Bl),Promise.reject()):(fe.delta&&s.go(-fe.delta,!1),Z(z,ce,k))).then(z=>{z=z||F(ce,k,!1),z&&(fe.delta&&!_s(z,8)?s.go(-fe.delta,!1):fe.type===xc.pop&&_s(z,20)&&s.go(-1,!1)),L(ce,k,z)}).catch(Bl)}))}let ee=ll(),K=ll(),Q;function Z(X,ae,fe){be(X);const ce=K.list();return ce.length?ce.forEach(Ue=>Ue(X,ae,fe)):console.error(X),Promise.reject(X)}function he(){return Q&&l.value!==Qs?Promise.resolve():new Promise((X,ae)=>{ee.add([X,ae])})}function be(X){return Q||(Q=!X,Y(),ee.list().forEach(([ae,fe])=>X?fe(X):ae()),ee.reset()),X}function se(X,ae,fe,ce){const{scrollBehavior:Ue}=n;if(!na||!Ue)return Promise.resolve();const k=!fe&&cV(gx(X.fullPath,0))||(ce||!fe)&&history.state&&history.state.scroll||null;return Er().then(()=>Ue(X,ae,k)).then(z=>z&&aV(z)).catch(z=>Z(z,X,ae))}const ye=X=>s.go(X);let He;const re=new Set,ge={currentRoute:l,listening:!0,addRoute:h,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:g,getRoutes:_,resolve:m,options:n,push:v,replace:E,go:ye,back:()=>ye(-1),forward:()=>ye(1),beforeEach:r.add,beforeResolve:o.add,afterEach:a.add,onError:K.add,isReady:he,install(X){const ae=this;X.component("RouterLink",OV),X.component("RouterView",Ww),X.config.globalProperties.$router=ae,Object.defineProperty(X.config.globalProperties,"$route",{enumerable:!0,get:()=>Ot(l)}),na&&!He&&l.value===Qs&&(He=!0,v(s.location).catch(Ue=>{}));const fe={};for(const Ue in Qs)Object.defineProperty(fe,Ue,{get:()=>l.value[Ue],enumerable:!0});X.provide(Gh,ae),X.provide(Gw,iS(fe)),X.provide($g,l);const ce=X.unmount;re.add(X),X.unmount=function(){re.delete(X),re.size<1&&(c=Qs,H&&H(),H=null,l.value=Qs,He=!1,Q=!1),ce()}}};function xe(X){return X.reduce((ae,fe)=>ae.then(()=>x(fe)),Promise.resolve())}return ge}function BV(n,e){const t=[],i=[],s=[],r=Math.max(e.matched.length,n.matched.length);for(let o=0;oRa(c,a))?i.push(a):t.push(a));const l=n.matched[o];l&&(e.matched.find(c=>Ra(c,l))||s.push(l))}return[t,i,s]}function zV(){return En(Gh)}const VV=[{path:"/",name:"/",component:()=>st(()=>import("./index-tRUa3_xN.js"),__vite__mapDeps([3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,1,2,18,19,20])),meta:{layout:"stage",stageTransition:{name:"bubble-wave-out"}}},{path:"/:all(.*)",name:"/[...all]",component:()=>st(()=>import("./_...all_-CxEbMPjh.js"),[])},{path:"/audio",name:"/audio",component:()=>st(()=>import("./audio-g9DiyU3J.js"),[])},{path:"/devtools",children:[{path:"chat",name:"/devtools/chat",component:()=>st(()=>import("./chat-BFU2g19v.js"),__vite__mapDeps([21,12,8]))},{path:"image",name:"/devtools/image",component:()=>st(()=>import("./image-jwIZU337.js"),__vite__mapDeps([22,23]))}]},{path:"/queue",name:"/queue",component:()=>st(()=>import("./queue-kEu75MMe.js"),__vite__mapDeps([24,10]))},{path:"/settings",children:[{path:"",name:"/settings/",component:()=>st(()=>import("./index-Dfvz4O3L.js"),__vite__mapDeps([25,4,26,19,27])),meta:{stageTransition:{name:"slide"}}},{path:"airi-card",children:[{path:"",name:"/settings/airi-card/",component:()=>st(()=>import("./index-BKcXwYga.js"),__vite__mapDeps([28,13,4,14,9,8,7,29,30,31,32,19])),meta:{stageTransition:{name:"slide"}}},{path:"components",children:[{path:"CardDetailDialog",name:"/settings/airi-card/components/CardDetailDialog",component:()=>st(()=>import("./CardDetailDialog-iV9p9LC3.js"),__vite__mapDeps([33,29,30,31,4,13,14,9,8,7]))},{path:"CardListItem",name:"/settings/airi-card/components/CardListItem",component:()=>st(()=>import("./CardListItem-D2hO_cEF.js"),__vite__mapDeps([34,32]))},{path:"DeleteCardDialog",name:"/settings/airi-card/components/DeleteCardDialog",component:()=>st(()=>import("./DeleteCardDialog-Cm2fzcjo.js"),__vite__mapDeps([35,30,31]))}]}]},{path:"appearance",children:[{path:"",name:"/settings/appearance/",component:()=>st(()=>import("./index-BcT0g1Oh.js"),__vite__mapDeps([36,26,4,37,17,16,31,38,19,39])),meta:{stageTransition:{name:"slide",pageSpecificAvailable:!0}}}]},{path:"memory",children:[{path:"",name:"/settings/memory/",component:()=>st(()=>import("./index-C4ujKJN4.js"),[])}]},{path:"models",children:[{path:"",name:"/settings/models/",component:()=>st(()=>import("./index-BOwQ_WhZ.js"),__vite__mapDeps([40,26,15,4,37,17,16,31,38,19,41])),meta:{stageTransition:{name:"slide",pageSpecificAvailable:!0}}}]},{path:"modules",children:[{path:"",name:"/settings/modules/",component:()=>st(()=>import("./index-DoEN4yXt.js"),__vite__mapDeps([42,4,43,44,26,38,19])),meta:{stageTransition:{name:"slide",pageSpecificAvailable:!0}}},{path:"consciousness",name:"/settings/modules/consciousness",component:()=>st(()=>import("./consciousness-C-h5B1sq.js"),__vite__mapDeps([45,46,16,47,48,4,14,9,8,19])),meta:{stageTransition:{name:"slide"}}},{path:"memory-long-term",name:"/settings/modules/memory-long-term",component:()=>st(()=>import("./memory-long-term-CAn9tYrg.js"),[])},{path:"memory-short-term",name:"/settings/modules/memory-short-term",component:()=>st(()=>import("./memory-short-term-D1c0-nne.js"),[])},{path:"speech",name:"/settings/modules/speech",component:()=>st(()=>import("./speech-9nYJ52qB.js"),__vite__mapDeps([49,50,51,52,47,46,16,48,4,9,8,7,19,53])),meta:{stageTransition:{name:"slide"}}}]},{path:"providers",children:[{path:"",name:"/settings/providers/",component:()=>st(()=>import("./index-B1onYnuF.js"),__vite__mapDeps([54,26,4,9,8,43,44,38,19])),meta:{stageTransition:{name:"slide",pageSpecificAvailable:!0}}},{path:"anthropic",name:"/settings/providers/anthropic",component:()=>st(()=>import("./anthropic-D4yWnjWW.js"),__vite__mapDeps([55,4,9,8,56,17,16,52,47,57,58,59]))},{path:"cloudflare-workers-ai",name:"/settings/providers/cloudflare-workers-ai",component:()=>st(()=>import("./cloudflare-workers-ai-C4lOUkFP.js"),__vite__mapDeps([60,4,9,8,52,47,57,58,59]))},{path:"deepseek",name:"/settings/providers/deepseek",component:()=>st(()=>import("./deepseek-CB4tx-Ko.js"),__vite__mapDeps([61,4,9,8,56,17,16,52,47,57,58,59]))},{path:"elevenlabs",name:"/settings/providers/elevenlabs",component:()=>st(()=>import("./elevenlabs-L17nDlYs.js"),__vite__mapDeps([62,4,9,8,7,63,50,51,56,17,16,52,47,57,58]))},{path:"featherless-ai",name:"/settings/providers/featherless-ai",component:()=>st(()=>import("./featherless-ai-BkPHXcRw.js"),__vite__mapDeps([64,4,9,8,56,17,16,52,47,57,58,59]))},{path:"fireworks-ai",name:"/settings/providers/fireworks-ai",component:()=>st(()=>import("./fireworks-ai-DSa13ytv.js"),__vite__mapDeps([65,4,9,8,56,17,16,52,47,57,58,59]))},{path:"google-generative-ai",name:"/settings/providers/google-generative-ai",component:()=>st(()=>import("./google-generative-ai-BrHwbhVt.js"),__vite__mapDeps([66,4,9,8,56,17,16,52,47,57,58,59]))},{path:"microsoft-speech",name:"/settings/providers/microsoft-speech",component:()=>st(()=>import("./microsoft-speech-YPGP1I4-.js"),__vite__mapDeps([67,52,47,4,9,8,7,63,50,51,56,17,16,57,58]))},{path:"mistral-ai",name:"/settings/providers/mistral-ai",component:()=>st(()=>import("./mistral-ai-BthqZXAX.js"),__vite__mapDeps([68,4,9,8,56,17,16,52,47,57,58,59]))},{path:"moonshot-ai",name:"/settings/providers/moonshot-ai",component:()=>st(()=>import("./moonshot-ai-Dx7AV_cz.js"),__vite__mapDeps([69,4,9,8,56,17,16,52,47,57,58,59]))},{path:"novita-ai",name:"/settings/providers/novita-ai",component:()=>st(()=>import("./novita-ai-adUHAUPJ.js"),__vite__mapDeps([70,4,9,8,56,17,16,52,47,57,58,59]))},{path:"ollama",name:"/settings/providers/ollama",component:()=>st(()=>import("./ollama-BX3zQ6KB.js"),__vite__mapDeps([71,47,4,9,8,56,17,16,52,58,59]))},{path:"openai",name:"/settings/providers/openai",component:()=>st(()=>import("./openai-C-ilwKTF.js"),__vite__mapDeps([72,4,9,8,56,17,16,52,47,57,58,59]))},{path:"openrouter-ai",name:"/settings/providers/openrouter-ai",component:()=>st(()=>import("./openrouter-ai-DHIXyBwb.js"),__vite__mapDeps([73,4,9,8,56,17,16,52,47,57,58,59]))},{path:"together-ai",name:"/settings/providers/together-ai",component:()=>st(()=>import("./together-ai-D2dNKA3a.js"),__vite__mapDeps([74,4,9,8,56,17,16,52,47,57,58,59]))},{path:"xai",name:"/settings/providers/xai",component:()=>st(()=>import("./xai-CS3ttJDb.js"),__vite__mapDeps([75,4,9,8,56,17,16,52,47,57,58,59]))}]}]},{path:"/test",children:[{path:"filter-message",name:"/test/filter-message",component:()=>st(()=>import("./filter-message-Cd_Y2XAy.js"),[])},{path:"queues",children:[{path:"delays",name:"/test/queues/delays",component:()=>st(()=>import("./delays-F63qeUW3.js"),__vite__mapDeps([76,11,4,10,18]))},{path:"emotions",name:"/test/queues/emotions",component:()=>st(()=>import("./emotions-CNzOYGQn.js"),__vite__mapDeps([77,11,4,10]))},{path:"messages",name:"/test/queues/messages",component:()=>st(()=>import("./messages-CfNsB1Jl.js"),__vite__mapDeps([78,11,4,10]))}]}]}],Xw=(n,e)=>{if(typeof n=="number"){if(e===3)return{mode:"rgb",r:(n>>8&15|n>>4&240)/255,g:(n>>4&15|n&240)/255,b:(n&15|n<<4&240)/255};if(e===4)return{mode:"rgb",r:(n>>12&15|n>>8&240)/255,g:(n>>8&15|n>>4&240)/255,b:(n>>4&15|n&240)/255,alpha:(n&15|n<<4&240)/255};if(e===6)return{mode:"rgb",r:(n>>16&255)/255,g:(n>>8&255)/255,b:(n&255)/255};if(e===8)return{mode:"rgb",r:(n>>24&255)/255,g:(n>>16&255)/255,b:(n>>8&255)/255,alpha:(n&255)/255}}},HV={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},GV=n=>Xw(HV[n.toLowerCase()],6),WV=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,XV=n=>{let e;return(e=n.match(WV))?Xw(parseInt(e[1],16),e[1].length):void 0},hr="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",Vl=`${hr}%`,z_=`(?:${hr}%|${hr})`,$V=`(?:${hr}(deg|grad|rad|turn)|${hr})`,Ia="\\s*,\\s*",qV=new RegExp(`^rgba?\\(\\s*${hr}${Ia}${hr}${Ia}${hr}\\s*(?:,\\s*${z_}\\s*)?\\)$`),YV=new RegExp(`^rgba?\\(\\s*${Vl}${Ia}${Vl}${Ia}${Vl}\\s*(?:,\\s*${z_}\\s*)?\\)$`),jV=n=>{let e={mode:"rgb"},t;if(t=n.match(qV))t[1]!==void 0&&(e.r=t[1]/255),t[2]!==void 0&&(e.g=t[2]/255),t[3]!==void 0&&(e.b=t[3]/255);else if(t=n.match(YV))t[1]!==void 0&&(e.r=t[1]/100),t[2]!==void 0&&(e.g=t[2]/100),t[3]!==void 0&&(e.b=t[3]/100);else return;return t[4]!==void 0?e.alpha=Math.max(0,Math.min(1,t[4]/100)):t[5]!==void 0&&(e.alpha=Math.max(0,Math.min(1,+t[5]))),e},KV=(n,e)=>n===void 0?void 0:typeof n!="object"?o6(n):n.mode!==void 0?n:e?{...n,mode:e}:void 0,$w=(n="rgb")=>e=>(e=KV(e,n))!==void 0?e.mode===n?e:Yi[e.mode][n]?Yi[e.mode][n](e):n==="rgb"?Yi[e.mode].rgb(e):Yi.rgb[n](Yi[e.mode].rgb(e)):void 0,Yi={},qw={},Ld=[],Yw={},ZV=n=>n,Et=n=>(Yi[n.mode]={...Yi[n.mode],...n.toMode},Object.keys(n.fromMode||{}).forEach(e=>{Yi[e]||(Yi[e]={}),Yi[e][n.mode]=n.fromMode[e]}),n.ranges||(n.ranges={}),n.difference||(n.difference={}),n.channels.forEach(e=>{if(n.ranges[e]===void 0&&(n.ranges[e]=[0,1]),!n.interpolate[e])throw new Error(`Missing interpolator for: ${e}`);typeof n.interpolate[e]=="function"&&(n.interpolate[e]={use:n.interpolate[e]}),n.interpolate[e].fixup||(n.interpolate[e].fixup=ZV)}),qw[n.mode]=n,(n.parse||[]).forEach(e=>{QV(e,n.mode)}),$w(n.mode)),JV=n=>qw[n],QV=(n,e)=>{if(typeof n=="string"){if(!e)throw new Error("'mode' required when 'parser' is a string");Yw[n]=e}else typeof n=="function"&&Ld.indexOf(n)<0&&Ld.push(n)},qg=/[^\x00-\x7F]|[a-zA-Z_]/,e6=/[^\x00-\x7F]|[-\w]/,_e={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"};let qe=0;function cf(n){let e=n[qe],t=n[qe+1];return e==="-"||e==="+"?/\d/.test(t)||t==="."&&/\d/.test(n[qe+2]):e==="."?/\d/.test(t):/\d/.test(e)}function Yg(n){if(qe>=n.length)return!1;let e=n[qe];if(qg.test(e))return!0;if(e==="-"){if(n.length-qe<2)return!1;let t=n[qe+1];return!!(t==="-"||qg.test(t))}return!1}const t6={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function cl(n){let e="";if((n[qe]==="-"||n[qe]==="+")&&(e+=n[qe++]),e+=uf(n),n[qe]==="."&&/\d/.test(n[qe+1])&&(e+=n[qe++]+uf(n)),(n[qe]==="e"||n[qe]==="E")&&((n[qe+1]==="-"||n[qe+1]==="+")&&/\d/.test(n[qe+2])?e+=n[qe++]+n[qe++]+uf(n):/\d/.test(n[qe+1])&&(e+=n[qe++]+uf(n))),Yg(n)){let t=Dd(n);return t==="deg"||t==="rad"||t==="turn"||t==="grad"?{type:_e.Hue,value:e*t6[t]}:void 0}return n[qe]==="%"?(qe++,{type:_e.Percentage,value:+e}):{type:_e.Number,value:+e}}function uf(n){let e="";for(;/\d/.test(n[qe]);)e+=n[qe++];return e}function Dd(n){let e="";for(;qe4)){if(t.length===4){if(t[3].type!==_e.Alpha)return;t[3]=t[3].value}return t.length===3&&t.push({type:_e.None,value:void 0}),t.every(s=>s.type!==_e.Alpha)?t:void 0}}function r6(n,e){n._i=0;let t=n[n._i++];if(!t||t.type!==_e.Function)return;let i=jw(n,e);if(i)return i.unshift(t.value),i}const o6=n=>{if(typeof n!="string")return;const e=i6(n),t=e?r6(e,!0):void 0;let i,s=0,r=Ld.length;for(;sn==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,c6=(n,e,t)=>n+t*(e-n),u6=n=>{let e=[];for(let t=0;te=>{let t=u6(e);return i=>{let s=i*t.length,r=i>=1?t.length-1:Math.max(Math.floor(s),0),o=t[r];return o===void 0?void 0:n(o[0],o[1],s-r)}},Ae=f6(c6),on=n=>{let e=!1,t=n.map(i=>i!==void 0?(e=!0,i):1);return e?t:n},Ha={mode:"rgb",channels:["r","g","b","alpha"],parse:[a6,XV,jV,GV,l6,"srgb"],serialize:"srgb",interpolate:{r:Ae,g:Ae,b:Ae,alpha:{use:Ae,fixup:on}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},xm=(n=0)=>Math.pow(Math.abs(n),563/256)*Math.sign(n),Ix=n=>{let e=xm(n.r),t=xm(n.g),i=xm(n.b),s={mode:"xyz65",x:.5766690429101305*e+.1855582379065463*t+.1882286462349947*i,y:.297344975250536*e+.6273635662554661*t+.0752914584939979*i,z:.0270313613864123*e+.0706888525358272*t+.9913375368376386*i};return n.alpha!==void 0&&(s.alpha=n.alpha),s},Mm=n=>Math.pow(Math.abs(n),256/563)*Math.sign(n),Lx=({x:n,y:e,z:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s={mode:"a98",r:Mm(n*2.0415879038107465-e*.5650069742788597-.3447313507783297*t),g:Mm(n*-.9692436362808798+e*1.8759675015077206+.0415550574071756*t),b:Mm(n*.0134442806320312-e*.1183623922310184+1.0151749943912058*t)};return i!==void 0&&(s.alpha=i),s},Sm=(n=0)=>{const e=Math.abs(n);return e<=.04045?n/12.92:(Math.sign(n)||1)*Math.pow((e+.055)/1.055,2.4)},Ga=({r:n,g:e,b:t,alpha:i})=>{let s={mode:"lrgb",r:Sm(n),g:Sm(e),b:Sm(t)};return i!==void 0&&(s.alpha=i),s},Io=n=>{let{r:e,g:t,b:i,alpha:s}=Ga(n),r={mode:"xyz65",x:.4123907992659593*e+.357584339383878*t+.1804807884018343*i,y:.2126390058715102*e+.715168678767756*t+.0721923153607337*i,z:.0193308187155918*e+.119194779794626*t+.9505321522496607*i};return s!==void 0&&(r.alpha=s),r},Em=(n=0)=>{const e=Math.abs(n);return e>.0031308?(Math.sign(n)||1)*(1.055*Math.pow(e,1/2.4)-.055):n*12.92},Wa=({r:n,g:e,b:t,alpha:i},s="rgb")=>{let r={mode:s,r:Em(n),g:Em(e),b:Em(t)};return i!==void 0&&(r.alpha=i),r},Lo=({x:n,y:e,z:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=Wa({r:n*3.2409699419045226-e*1.537383177570094-.4986107602930034*t,g:n*-.9692436362808796+e*1.8759675015077204+.0415550574071756*t,b:n*.0556300796969936-e*.2039769588889765+1.0569715142428784*t});return i!==void 0&&(s.alpha=i),s},d6={...Ha,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:n=>Lx(Io(n)),xyz65:Lx},toMode:{rgb:n=>Lo(Ix(n)),xyz65:Ix}},_n=n=>(n=n%360)<0?n+360:n,h6=(n,e)=>n.map((t,i,s)=>{if(t===void 0)return t;let r=_n(t);return i===0||n[i-1]===void 0?r:e(r-_n(s[i-1]))}).reduce((t,i)=>!t.length||i===void 0||t[t.length-1]===void 0?(t.push(i),t):(t.push(i+t[t.length-1]),t),[]),Gs=n=>h6(n,e=>Math.abs(e)<=180?e:e-360*Math.sign(e)),ln=[-.14861,1.78277,-.29227,-.90649,1.97294,0],p6=Math.PI/180,m6=180/Math.PI;let Dx=ln[3]*ln[4],Ox=ln[1]*ln[4],Nx=ln[1]*ln[2]-ln[0]*ln[3];const g6=({r:n,g:e,b:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=(Nx*t+n*Dx-e*Ox)/(Nx+Dx-Ox),r=t-s,o=(ln[4]*(e-s)-ln[2]*r)/ln[3],a={mode:"cubehelix",l:s,s:s===0||s===1?void 0:Math.sqrt(r*r+o*o)/(ln[4]*s*(1-s))};return a.s&&(a.h=Math.atan2(o,r)*m6-120),i!==void 0&&(a.alpha=i),a},_6=({h:n,s:e,l:t,alpha:i})=>{let s={mode:"rgb"};n=(n===void 0?0:n+120)*p6,t===void 0&&(t=0);let r=e===void 0?0:e*t*(1-t),o=Math.cos(n),a=Math.sin(n);return s.r=t+r*(ln[0]*o+ln[1]*a),s.g=t+r*(ln[2]*o+ln[3]*a),s.b=t+r*(ln[4]*o+ln[5]*a),i!==void 0&&(s.alpha=i),s},Wh=(n,e)=>{if(n.h===void 0||e.h===void 0||!n.s||!e.s)return 0;let t=_n(n.h),i=_n(e.h),s=Math.sin((i-t+360)/2*Math.PI/180);return 2*Math.sqrt(n.s*e.s)*s},v6=(n,e)=>{if(n.h===void 0||e.h===void 0)return 0;let t=_n(n.h),i=_n(e.h);return Math.abs(i-t)>180?t-(i-360*Math.sign(i-t)):i-t},Xh=(n,e)=>{if(n.h===void 0||e.h===void 0||!n.c||!e.c)return 0;let t=_n(n.h),i=_n(e.h),s=Math.sin((i-t+360)/2*Math.PI/180);return 2*Math.sqrt(n.c*e.c)*s},Ws=n=>{let e=n.reduce((i,s)=>{if(s!==void 0){let r=s*Math.PI/180;i.sin+=Math.sin(r),i.cos+=Math.cos(r)}return i},{sin:0,cos:0}),t=Math.atan2(e.sin,e.cos)*180/Math.PI;return t<0?360+t:t},y6={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:g6},toMode:{rgb:_6},interpolate:{h:{use:Ae,fixup:Gs},s:Ae,l:Ae,alpha:{use:Ae,fixup:on}},difference:{h:Wh},average:{h:Ws}},br=({l:n,a:e,b:t,alpha:i},s="lch")=>{e===void 0&&(e=0),t===void 0&&(t=0);let r=Math.sqrt(e*e+t*t),o={mode:s,l:n,c:r};return r&&(o.h=_n(Math.atan2(t,e)*180/Math.PI)),i!==void 0&&(o.alpha=i),o},xr=({l:n,c:e,h:t,alpha:i},s="lab")=>{t===void 0&&(t=0);let r={mode:s,l:n,a:e?e*Math.cos(t/180*Math.PI):0,b:e?e*Math.sin(t/180*Math.PI):0};return i!==void 0&&(r.alpha=i),r},Kw=Math.pow(29,3)/Math.pow(3,3),Zw=Math.pow(6,3)/Math.pow(29,3),Jt={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},ma={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329};let Tm=n=>Math.pow(n,3)>Zw?Math.pow(n,3):(116*n-16)/Kw;const Jw=({l:n,a:e,b:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=(n+16)/116,r=e/500+s,o=s-t/200,a={mode:"xyz65",x:Tm(r)*ma.X,y:Tm(s)*ma.Y,z:Tm(o)*ma.Z};return i!==void 0&&(a.alpha=i),a},$h=n=>Lo(Jw(n)),wm=n=>n>Zw?Math.cbrt(n):(Kw*n+16)/116,Qw=({x:n,y:e,z:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=wm(n/ma.X),r=wm(e/ma.Y),o=wm(t/ma.Z),a={mode:"lab65",l:116*r-16,a:500*(s-r),b:200*(r-o)};return i!==void 0&&(a.alpha=i),a},qh=n=>{let e=Qw(Io(n));return n.r===n.b&&n.b===n.g&&(e.a=e.b=0),e},Od=1,eA=1,Mc=26/180*Math.PI,Nd=Math.cos(Mc),Ud=Math.sin(Mc),tA=100/Math.log(139/100),jg=({l:n,c:e,h:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s={mode:"lab65",l:(Math.exp(n*Od/tA)-1)/.0039},r=(Math.exp(.0435*e*eA*Od)-1)/.075,o=r*Math.cos(t/180*Math.PI-Mc),a=r*Math.sin(t/180*Math.PI-Mc);return s.a=o*Nd-a/.83*Ud,s.b=o*Ud+a/.83*Nd,i!==void 0&&(s.alpha=i),s},Kg=({l:n,a:e,b:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=e*Nd+t*Ud,r=.83*(t*Nd-e*Ud),o=Math.sqrt(s*s+r*r),a={mode:"dlch",l:tA/Od*Math.log(1+.0039*n),c:Math.log(1+.075*o)/(.0435*eA*Od)};return a.c&&(a.h=_n((Math.atan2(r,s)+Mc)/Math.PI*180)),i!==void 0&&(a.alpha=i),a},Ux=n=>jg(br(n,"dlch")),Fx=n=>xr(Kg(n),"dlab"),b6={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Ux,rgb:n=>$h(Ux(n))},fromMode:{lab65:Fx,rgb:n=>Fx(qh(n))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:Ae,a:Ae,b:Ae,alpha:{use:Ae,fixup:on}}},x6={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:jg,dlab:n=>xr(n,"dlab"),rgb:n=>$h(jg(n))},fromMode:{lab65:Kg,dlab:n=>br(n,"dlch"),rgb:n=>Kg(qh(n))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:Ae,c:Ae,h:{use:Ae,fixup:Gs},alpha:{use:Ae,fixup:on}},difference:{h:Xh},average:{h:Ws}};function M6({h:n,s:e,i:t,alpha:i}){n=_n(n!==void 0?n:0),e===void 0&&(e=0),t===void 0&&(t=0);let s=Math.abs(n/60%2-1),r;switch(Math.floor(n/60)){case 0:r={r:t*(1+e*(3/(2-s)-1)),g:t*(1+e*(3*(1-s)/(2-s)-1)),b:t*(1-e)};break;case 1:r={r:t*(1+e*(3*(1-s)/(2-s)-1)),g:t*(1+e*(3/(2-s)-1)),b:t*(1-e)};break;case 2:r={r:t*(1-e),g:t*(1+e*(3/(2-s)-1)),b:t*(1+e*(3*(1-s)/(2-s)-1))};break;case 3:r={r:t*(1-e),g:t*(1+e*(3*(1-s)/(2-s)-1)),b:t*(1+e*(3/(2-s)-1))};break;case 4:r={r:t*(1+e*(3*(1-s)/(2-s)-1)),g:t*(1-e),b:t*(1+e*(3/(2-s)-1))};break;case 5:r={r:t*(1+e*(3/(2-s)-1)),g:t*(1-e),b:t*(1+e*(3*(1-s)/(2-s)-1))};break;default:r={r:t*(1-e),g:t*(1-e),b:t*(1-e)}}return r.mode="rgb",i!==void 0&&(r.alpha=i),r}function S6({r:n,g:e,b:t,alpha:i}){n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=Math.max(n,e,t),r=Math.min(n,e,t),o={mode:"hsi",s:n+e+t===0?0:1-3*r/(n+e+t),i:(n+e+t)/3};return s-r!==0&&(o.h=(s===n?(e-t)/(s-r)+(e{switch(e){case"deg":return+n;case"rad":return n/Math.PI*180;case"grad":return n/10*9;case"turn":return n*360}},C6=new RegExp(`^hsla?\\(\\s*${$V}${Ia}${Vl}${Ia}${Vl}\\s*(?:,\\s*${z_}\\s*)?\\)$`),R6=n=>{let e=n.match(C6);if(!e)return;let t={mode:"hsl"};return e[3]!==void 0?t.h=+e[3]:e[1]!==void 0&&e[2]!==void 0&&(t.h=A6(e[1],e[2])),e[4]!==void 0&&(t.s=Math.min(Math.max(0,e[4]/100),1)),e[5]!==void 0&&(t.l=Math.min(Math.max(0,e[5]/100),1)),e[6]!==void 0?t.alpha=Math.max(0,Math.min(1,e[6]/100)):e[7]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+e[7]))),t};function P6(n,e){if(!e||e[0]!=="hsl"&&e[0]!=="hsla")return;const t={mode:"hsl"},[,i,s,r,o]=e;if(i.type!==_e.None){if(i.type===_e.Percentage)return;t.h=i.value}if(s.type!==_e.None){if(s.type===_e.Hue)return;t.s=s.value/100}if(r.type!==_e.None){if(r.type===_e.Hue)return;t.l=r.value/100}return o.type!==_e.None&&(t.alpha=Math.min(1,Math.max(0,o.type===_e.Number?o.value:o.value/100))),t}const nA={mode:"hsl",toMode:{rgb:T6},fromMode:{rgb:w6},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[P6,R6],serialize:n=>`hsl(${n.h!==void 0?n.h:"none"} ${n.s!==void 0?n.s*100+"%":"none"} ${n.l!==void 0?n.l*100+"%":"none"}${n.alpha<1?` / ${n.alpha}`:""})`,interpolate:{h:{use:Ae,fixup:Gs},s:Ae,l:Ae,alpha:{use:Ae,fixup:on}},difference:{h:Wh},average:{h:Ws}};function iA({h:n,s:e,v:t,alpha:i}){n=_n(n!==void 0?n:0),e===void 0&&(e=0),t===void 0&&(t=0);let s=Math.abs(n/60%2-1),r;switch(Math.floor(n/60)){case 0:r={r:t,g:t*(1-e*s),b:t*(1-e)};break;case 1:r={r:t*(1-e*s),g:t,b:t*(1-e)};break;case 2:r={r:t*(1-e),g:t,b:t*(1-e*s)};break;case 3:r={r:t*(1-e),g:t*(1-e*s),b:t};break;case 4:r={r:t*(1-e*s),g:t*(1-e),b:t};break;case 5:r={r:t,g:t*(1-e),b:t*(1-e*s)};break;default:r={r:t*(1-e),g:t*(1-e),b:t*(1-e)}}return r.mode="rgb",i!==void 0&&(r.alpha=i),r}function sA({r:n,g:e,b:t,alpha:i}){n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=Math.max(n,e,t),r=Math.min(n,e,t),o={mode:"hsv",s:s===0?0:1-r/s,v:s};return s-r!==0&&(o.h=(s===n?(e-t)/(s-r)+(e1){let s=e+t;e/=s,t/=s}return iA({h:n,s:t===1?1:1-e/(1-t),v:1-t,alpha:i})}function L6(n){let e=sA(n);if(e===void 0)return;let t=e.s!==void 0?e.s:0,i=e.v!==void 0?e.v:0,s={mode:"hwb",w:(1-t)*i,b:1-i};return e.h!==void 0&&(s.h=e.h),e.alpha!==void 0&&(s.alpha=e.alpha),s}function D6(n,e){if(!e||e[0]!=="hwb")return;const t={mode:"hwb"},[,i,s,r,o]=e;if(i.type!==_e.None){if(i.type===_e.Percentage)return;t.h=i.value}if(s.type!==_e.None){if(s.type===_e.Hue)return;t.w=s.value/100}if(r.type!==_e.None){if(r.type===_e.Hue)return;t.b=r.value/100}return o.type!==_e.None&&(t.alpha=Math.min(1,Math.max(0,o.type===_e.Number?o.value:o.value/100))),t}const O6={mode:"hwb",toMode:{rgb:I6},fromMode:{rgb:L6},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[D6],serialize:n=>`hwb(${n.h!==void 0?n.h:"none"} ${n.w!==void 0?n.w*100+"%":"none"} ${n.b!==void 0?n.b*100+"%":"none"}${n.alpha<1?` / ${n.alpha}`:""})`,interpolate:{h:{use:Ae,fixup:Gs},w:Ae,b:Ae,alpha:{use:Ae,fixup:on}},difference:{h:v6},average:{h:Ws}},oA=203,Yh=.1593017578125,aA=78.84375,jh=.8359375,Kh=18.8515625,Zh=18.6875;function Am(n){if(n<0)return 0;const e=Math.pow(n,1/aA);return 1e4*Math.pow(Math.max(0,e-jh)/(Kh-Zh*e),1/Yh)}function Cm(n){if(n<0)return 0;const e=Math.pow(n/1e4,Yh);return Math.pow((jh+Kh*e)/(1+Zh*e),aA)}const Rm=n=>Math.max(n/oA,0),kx=({i:n,t:e,p:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);const s=Am(n+.008609037037932761*e+.11102962500302593*t),r=Am(n-.00860903703793275*e-.11102962500302599*t),o=Am(n+.5600313357106791*e-.32062717498731885*t),a={mode:"xyz65",x:Rm(2.070152218389422*s-1.3263473389671556*r+.2066510476294051*o),y:Rm(.3647385209748074*s+.680566024947227*r-.0453045459220346*o),z:Rm(-.049747207535812*s-.0492609666966138*r+1.1880659249923042*o)};return i!==void 0&&(a.alpha=i),a},Pm=(n=0)=>Math.max(n*oA,0),Bx=({x:n,y:e,z:t,alpha:i})=>{const s=Pm(n),r=Pm(e),o=Pm(t),a=Cm(.3592832590121217*s+.6976051147779502*r-.0358915932320289*o),l=Cm(-.1920808463704995*s+1.1004767970374323*r+.0753748658519118*o),c=Cm(.0070797844607477*s+.0748396662186366*r+.8433265453898765*o),u=.5*a+.5*l,f=1.61376953125*a-3.323486328125*l+1.709716796875*c,d=4.378173828125*a-4.24560546875*l-.132568359375*c,h={mode:"itp",i:u,t:f,p:d};return i!==void 0&&(h.alpha=i),h},N6={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:kx,rgb:n=>Lo(kx(n))},fromMode:{xyz65:Bx,rgb:n=>Bx(Io(n))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:Ae,t:Ae,p:Ae,alpha:{use:Ae,fixup:on}}},U6=134.03437499999998,F6=16295499532821565e-27,Im=n=>{if(n<0)return 0;let e=Math.pow(n/1e4,Yh);return Math.pow((jh+Kh*e)/(1+Zh*e),U6)},Lm=(n=0)=>Math.max(n*203,0),lA=({x:n,y:e,z:t,alpha:i})=>{n=Lm(n),e=Lm(e),t=Lm(t);let s=1.15*n-.15*t,r=.66*e+.34*n,o=Im(.41478972*s+.579999*r+.014648*t),a=Im(-.20151*s+1.120649*r+.0531008*t),l=Im(-.0166008*s+.2648*r+.6684799*t),c=(o+a)/2,u={mode:"jab",j:.44*c/(1-.56*c)-F6,a:3.524*o-4.066708*a+.542708*l,b:.199076*o+1.096799*a-1.295875*l};return i!==void 0&&(u.alpha=i),u},k6=134.03437499999998,zx=16295499532821565e-27,Dm=n=>{if(n<0)return 0;let e=Math.pow(n,1/k6);return 1e4*Math.pow((jh-e)/(Zh*e-Kh),1/Yh)},Om=n=>n/203,cA=({j:n,a:e,b:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=(n+zx)/(.44+.56*(n+zx)),r=Dm(s+.13860504*e+.058047316*t),o=Dm(s-.13860504*e-.058047316*t),a=Dm(s-.096019242*e-.8118919*t),l={mode:"xyz65",x:Om(1.661373024652174*r-.914523081304348*o+.23136208173913045*a),y:Om(-.3250758611844533*r+1.571847026732543*o-.21825383453227928*a),z:Om(-.090982811*r-.31272829*o+1.5227666*a)};return i!==void 0&&(l.alpha=i),l},uA=n=>{let e=lA(Io(n));return n.r===n.b&&n.b===n.g&&(e.a=e.b=0),e},fA=n=>Lo(cA(n)),B6={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:uA,xyz65:lA},toMode:{rgb:fA,xyz65:cA},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:Ae,a:Ae,b:Ae,alpha:{use:Ae,fixup:on}}},Vx=({j:n,a:e,b:t,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0);let s=Math.sqrt(e*e+t*t),r={mode:"jch",j:n,c:s};return s&&(r.h=_n(Math.atan2(t,e)*180/Math.PI)),i!==void 0&&(r.alpha=i),r},Hx=({j:n,c:e,h:t,alpha:i})=>{t===void 0&&(t=0);let s={mode:"jab",j:n,a:e?e*Math.cos(t/180*Math.PI):0,b:e?e*Math.sin(t/180*Math.PI):0};return i!==void 0&&(s.alpha=i),s},z6={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Hx,rgb:n=>fA(Hx(n))},fromMode:{rgb:n=>Vx(uA(n)),jab:Vx},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:Ae,fixup:Gs},c:Ae,j:Ae,alpha:{use:Ae,fixup:on}},difference:{h:Xh},average:{h:Ws}},Jh=Math.pow(29,3)/Math.pow(3,3),V_=Math.pow(6,3)/Math.pow(29,3);let Nm=n=>Math.pow(n,3)>V_?Math.pow(n,3):(116*n-16)/Jh;const H_=({l:n,a:e,b:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=(n+16)/116,r=e/500+s,o=s-t/200,a={mode:"xyz50",x:Nm(r)*Jt.X,y:Nm(s)*Jt.Y,z:Nm(o)*Jt.Z};return i!==void 0&&(a.alpha=i),a},Kc=({x:n,y:e,z:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=Wa({r:n*3.1341359569958707-e*1.6173863321612538-.4906619460083532*t,g:n*-.978795502912089+e*1.916254567259524+.03344273116131949*t,b:n*.07195537988411677-e*.2289768264158322+1.405386058324125*t});return i!==void 0&&(s.alpha=i),s},dA=n=>Kc(H_(n)),Zc=n=>{let{r:e,g:t,b:i,alpha:s}=Ga(n),r={mode:"xyz50",x:.436065742824811*e+.3851514688337912*t+.14307845442264197*i,y:.22249319175623702*e+.7168870538238823*t+.06061979053616537*i,z:.013923904500943465*e+.09708128566574634*t+.7140993584005155*i};return s!==void 0&&(r.alpha=s),r},Um=n=>n>V_?Math.cbrt(n):(Jh*n+16)/116,G_=({x:n,y:e,z:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=Um(n/Jt.X),r=Um(e/Jt.Y),o=Um(t/Jt.Z),a={mode:"lab",l:116*r-16,a:500*(s-r),b:200*(r-o)};return i!==void 0&&(a.alpha=i),a},hA=n=>{let e=G_(Zc(n));return n.r===n.b&&n.b===n.g&&(e.a=e.b=0),e};function V6(n,e){if(!e||e[0]!=="lab")return;const t={mode:"lab"},[,i,s,r,o]=e;if(!(i.type===_e.Hue||s.type===_e.Hue||r.type===_e.Hue))return i.type!==_e.None&&(t.l=Math.min(Math.max(0,i.value),100)),s.type!==_e.None&&(t.a=s.type===_e.Number?s.value:s.value*125/100),r.type!==_e.None&&(t.b=r.type===_e.Number?r.value:r.value*125/100),o.type!==_e.None&&(t.alpha=Math.min(1,Math.max(0,o.type===_e.Number?o.value:o.value/100))),t}const W_={mode:"lab",toMode:{xyz50:H_,rgb:dA},fromMode:{xyz50:G_,rgb:hA},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-100,100],b:[-100,100]},parse:[V6],serialize:n=>`lab(${n.l!==void 0?n.l:"none"} ${n.a!==void 0?n.a:"none"} ${n.b!==void 0?n.b:"none"}${n.alpha<1?` / ${n.alpha}`:""})`,interpolate:{l:Ae,a:Ae,b:Ae,alpha:{use:Ae,fixup:on}}},H6={...W_,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Jw,rgb:$h},fromMode:{xyz65:Qw,rgb:qh},ranges:{l:[0,100],a:[-86.182,98.234],b:[-107.86,94.477]}};function G6(n,e){if(!e||e[0]!=="lch")return;const t={mode:"lch"},[,i,s,r,o]=e;if(i.type!==_e.None){if(i.type===_e.Hue)return;t.l=Math.min(Math.max(0,i.value),100)}if(s.type!==_e.None&&(t.c=Math.max(0,s.type===_e.Number?s.value:s.value*150/100)),r.type!==_e.None){if(r.type===_e.Percentage)return;t.h=r.value}return o.type!==_e.None&&(t.alpha=Math.min(1,Math.max(0,o.type===_e.Number?o.value:o.value/100))),t}const X_={mode:"lch",toMode:{lab:xr,rgb:n=>dA(xr(n))},fromMode:{rgb:n=>br(hA(n)),lab:br},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[G6],serialize:n=>`lch(${n.l!==void 0?n.l:"none"} ${n.c!==void 0?n.c:"none"} ${n.h!==void 0?n.h:"none"}${n.alpha<1?` / ${n.alpha}`:""})`,interpolate:{h:{use:Ae,fixup:Gs},c:Ae,l:Ae,alpha:{use:Ae,fixup:on}},difference:{h:Xh},average:{h:Ws}},W6={...X_,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:n=>xr(n,"lab65"),rgb:n=>$h(xr(n,"lab65"))},fromMode:{rgb:n=>br(qh(n),"lch65"),lab65:n=>br(n,"lch65")},ranges:{l:[0,100],c:[0,133.807],h:[0,360]}},pA=({l:n,u:e,v:t,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0);let s=Math.sqrt(e*e+t*t),r={mode:"lchuv",l:n,c:s};return s&&(r.h=_n(Math.atan2(t,e)*180/Math.PI)),i!==void 0&&(r.alpha=i),r},mA=({l:n,c:e,h:t,alpha:i})=>{t===void 0&&(t=0);let s={mode:"luv",l:n,u:e?e*Math.cos(t/180*Math.PI):0,v:e?e*Math.sin(t/180*Math.PI):0};return i!==void 0&&(s.alpha=i),s},gA=(n,e,t)=>4*n/(n+15*e+3*t),_A=(n,e,t)=>9*e/(n+15*e+3*t),X6=gA(Jt.X,Jt.Y,Jt.Z),$6=_A(Jt.X,Jt.Y,Jt.Z),q6=n=>n<=V_?Jh*n:116*Math.cbrt(n)-16,Zg=({x:n,y:e,z:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=q6(e/Jt.Y),r=gA(n,e,t),o=_A(n,e,t);!isFinite(r)||!isFinite(o)?s=r=o=0:(r=13*s*(r-X6),o=13*s*(o-$6));let a={mode:"luv",l:s,u:r,v:o};return i!==void 0&&(a.alpha=i),a},Y6=(n,e,t)=>4*n/(n+15*e+3*t),j6=(n,e,t)=>9*e/(n+15*e+3*t),K6=Y6(Jt.X,Jt.Y,Jt.Z),Z6=j6(Jt.X,Jt.Y,Jt.Z),Jg=({l:n,u:e,v:t,alpha:i})=>{if(n===void 0&&(n=0),n===0)return{mode:"xyz50",x:0,y:0,z:0};e===void 0&&(e=0),t===void 0&&(t=0);let s=e/(13*n)+K6,r=t/(13*n)+Z6,o=Jt.Y*(n<=8?n/Jh:Math.pow((n+16)/116,3)),a=o*(9*s)/(4*r),l=o*(12-3*s-20*r)/(4*r),c={mode:"xyz50",x:a,y:o,z:l};return i!==void 0&&(c.alpha=i),c},J6=n=>pA(Zg(Zc(n))),Q6=n=>Kc(Jg(mA(n))),eH={mode:"lchuv",toMode:{luv:mA,rgb:Q6},fromMode:{rgb:J6,luv:pA},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:Ae,fixup:Gs},c:Ae,l:Ae,alpha:{use:Ae,fixup:on}},difference:{h:Xh},average:{h:Ws}},tH={...Ha,mode:"lrgb",toMode:{rgb:Wa},fromMode:{rgb:Ga},parse:["srgb-linear"],serialize:"srgb-linear"},nH={mode:"luv",toMode:{xyz50:Jg,rgb:n=>Kc(Jg(n))},fromMode:{xyz50:Zg,rgb:n=>Zg(Zc(n))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:Ae,u:Ae,v:Ae,alpha:{use:Ae,fixup:on}}},vA=({r:n,g:e,b:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=Math.cbrt(.41222147079999993*n+.5363325363*e+.0514459929*t),r=Math.cbrt(.2119034981999999*n+.6806995450999999*e+.1073969566*t),o=Math.cbrt(.08830246189999998*n+.2817188376*e+.6299787005000002*t),a={mode:"oklab",l:.2104542553*s+.793617785*r-.0040720468*o,a:1.9779984951*s-2.428592205*r+.4505937099*o,b:.0259040371*s+.7827717662*r-.808675766*o};return i!==void 0&&(a.alpha=i),a},Qh=n=>{let e=vA(Ga(n));return n.r===n.b&&n.b===n.g&&(e.a=e.b=0),e},Jc=({l:n,a:e,b:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=Math.pow(n*.9999999984505198+.39633779217376786*e+.2158037580607588*t,3),r=Math.pow(n*1.0000000088817609-.10556134232365635*e-.06385417477170591*t,3),o=Math.pow(n*1.0000000546724108-.08948418209496575*e-1.2914855378640917*t,3),a={mode:"lrgb",r:4.076741661347994*s-3.307711590408193*r+.230969928729428*o,g:-1.2684380040921763*s+2.6097574006633715*r-.3413193963102197*o,b:-.004196086541837188*s-.7034186144594493*r+1.7076147009309444*o};return i!==void 0&&(a.alpha=i),a},ep=n=>Wa(Jc(n));function Qg(n){const i=1.170873786407767;return .5*(i*n-.206+Math.sqrt((i*n-.206)*(i*n-.206)+4*.03*i*n))}function Fd(n){return(n*n+.206*n)/(1.170873786407767*(n+.03))}function iH(n,e){let t,i,s,r,o,a,l,c;-1.88170328*n-.80936493*e>1?(t=1.19086277,i=1.76576728,s=.59662641,r=.75515197,o=.56771245,a=4.0767416621,l=-3.3077115913,c=.2309699292):1.81444104*n-1.19445276*e>1?(t=.73956515,i=-.45954404,s=.08285427,r=.1254107,o=.14503204,a=-1.2684380046,l=2.6097574011,c=-.3413193965):(t=1.35733652,i=-.00915799,s=-1.1513021,r=-.50559606,o=.00692167,a=-.0041960863,l=-.7034186147,c=1.707614701);let u=t+i*n+s*e+r*n*n+o*n*e,f=.3963377774*n+.2158037573*e,d=-.1055613458*n-.0638541728*e,h=-.0894841775*n-1.291485548*e;{let p=1+u*f,_=1+u*d,g=1+u*h,m=p*p*p,y=_*_*_,b=g*g*g,v=3*f*p*p,E=3*d*_*_,T=3*h*g*g,S=6*f*f*p,P=6*d*d*_,x=6*h*h*g,M=a*m+l*y+c*b,L=a*v+l*E+c*T,F=a*S+l*P+c*x;u=u-M*L/(L*L-.5*M*F)}return u}function $_(n,e){let t=iH(n,e),i=Jc({l:1,a:t*n,b:t*e}),s=Math.cbrt(1/Math.max(i.r,i.g,i.b)),r=s*t;return[s,r]}function sH(n,e,t,i,s,r=null){r||(r=$_(n,e));let o;if((t-s)*r[1]-(r[0]-s)*i<=0)o=r[1]*s/(i*r[0]+r[1]*(s-t));else{o=r[1]*(s-1)/(i*(r[0]-1)+r[1]*(s-t));{let a=t-s,l=i,c=.3963377774*n+.2158037573*e,u=-.1055613458*n-.0638541728*e,f=-.0894841775*n-1.291485548*e,d=a+l*c,h=a+l*u,p=a+l*f;{let _=s*(1-o)+o*t,g=o*i,m=_+g*c,y=_+g*u,b=_+g*f,v=m*m*m,E=y*y*y,T=b*b*b,S=3*d*m*m,P=3*h*y*y,x=3*p*b*b,M=6*d*d*m,L=6*h*h*y,F=6*p*p*b,H=4.0767416621*v-3.3077115913*E+.2309699292*T-1,Y=4.0767416621*S-3.3077115913*P+.2309699292*x,ee=4.0767416621*M-3.3077115913*L+.2309699292*F,K=Y/(Y*Y-.5*H*ee),Q=-H*K,Z=-1.2684380046*v+2.6097574011*E-.3413193965*T-1,he=-1.2684380046*S+2.6097574011*P-.3413193965*x,be=-1.2684380046*M+2.6097574011*L-.3413193965*F,se=he/(he*he-.5*Z*be),ye=-Z*se,He=-.0041960863*v-.7034186147*E+1.707614701*T-1,re=-.0041960863*S-.7034186147*P+1.707614701*x,ge=-.0041960863*M-.7034186147*L+1.707614701*F,xe=re/(re*re-.5*He*ge),X=-He*xe;Q=K>=0?Q:1e6,ye=se>=0?ye:1e6,X=xe>=0?X:1e6,o+=Math.min(Q,Math.min(ye,X))}}}return o}function q_(n,e,t=null){t||(t=$_(n,e));let i=t[0],s=t[1];return[s/i,s/(1-i)]}function yA(n,e,t){let i=$_(e,t),s=sH(e,t,n,1,n,i),r=q_(e,t,i),o=.11516993+1/(7.4477897+4.1590124*t+e*(-2.19557347+1.75198401*t+e*(-2.13704948-10.02301043*t+e*(-4.24894561+5.38770819*t+4.69891013*e)))),a=.11239642+1/(1.6132032-.68124379*t+e*(.40370612+.90148123*t+e*(-.27087943+.6122399*t+e*(.00299215-.45399568*t-.14661872*e)))),l=s/Math.min(n*r[0],(1-n)*r[1]),c=n*o,u=(1-n)*a,f=.9*l*Math.sqrt(Math.sqrt(1/(1/(c*c*c*c)+1/(u*u*u*u))));return c=n*.4,u=(1-n)*.8,[Math.sqrt(1/(1/(c*c)+1/(u*u))),f,s]}function Gx(n){const e=n.l!==void 0?n.l:0,t=n.a!==void 0?n.a:0,i=n.b!==void 0?n.b:0,s={mode:"okhsl",l:Qg(e)};n.alpha!==void 0&&(s.alpha=n.alpha);let r=Math.sqrt(t*t+i*i);if(!r)return s.s=0,s;let[o,a,l]=yA(e,t/r,i/r),c;if(rGx(Qh(n))},toMode:{oklab:Wx,rgb:n=>ep(Wx(n))}};function Xx(n){let e=n.l!==void 0?n.l:0,t=n.a!==void 0?n.a:0,i=n.b!==void 0?n.b:0,s=Math.sqrt(t*t+i*i),r=s?t/s:1,o=s?i/s:1,[a,l]=q_(r,o),c=.5,u=1-c/a,f=l/(s+e*l),d=f*e,h=f*s,p=Fd(d),_=h*p/d,g=Jc({l:p,a:r*_,b:o*_}),m=Math.cbrt(1/Math.max(g.r,g.g,g.b,0));e=e/m,s=s/m*Qg(e)/e,e=Qg(e);const y={mode:"okhsv",s:s?(c+l)*h/(l*c+l*u*h):0,v:e?e/d:0};return y.s&&(y.h=_n(Math.atan2(i,t)*180/Math.PI)),n.alpha!==void 0&&(y.alpha=n.alpha),y}function $x(n){const e={mode:"oklab"};n.alpha!==void 0&&(e.alpha=n.alpha);const t=n.h!==void 0?n.h:0,i=n.s!==void 0?n.s:0,s=n.v!==void 0?n.v:0,r=Math.cos(t/180*Math.PI),o=Math.sin(t/180*Math.PI),[a,l]=q_(r,o),c=.5,u=1-c/a,f=1-i*c/(c+l-l*u*i),d=i*l*c/(c+l-l*u*i),h=Fd(f),p=d*h/f,_=Jc({l:h,a:r*p,b:o*p}),g=Math.cbrt(1/Math.max(_.r,_.g,_.b,0)),m=Fd(s*f),y=d*m/f;return e.l=m*g,e.a=y*r*g,e.b=y*o*g,e}const oH={...rA,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:Xx,rgb:n=>Xx(Qh(n))},toMode:{oklab:$x,rgb:n=>ep($x(n))}};function aH(n,e){if(!e||e[0]!=="oklab")return;const t={mode:"oklab"},[,i,s,r,o]=e;if(!(i.type===_e.Hue||s.type===_e.Hue||r.type===_e.Hue))return i.type!==_e.None&&(t.l=Math.min(Math.max(0,i.type===_e.Number?i.value:i.value/100),1)),s.type!==_e.None&&(t.a=s.type===_e.Number?s.value:s.value*.4/100),r.type!==_e.None&&(t.b=r.type===_e.Number?r.value:r.value*.4/100),o.type!==_e.None&&(t.alpha=Math.min(1,Math.max(0,o.type===_e.Number?o.value:o.value/100))),t}const lH={...W_,mode:"oklab",toMode:{lrgb:Jc,rgb:ep},fromMode:{lrgb:vA,rgb:Qh},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[aH],serialize:n=>`oklab(${n.l!==void 0?n.l:"none"} ${n.a!==void 0?n.a:"none"} ${n.b!==void 0?n.b:"none"}${n.alpha<1?` / ${n.alpha}`:""})`};function cH(n,e){if(!e||e[0]!=="oklch")return;const t={mode:"oklch"},[,i,s,r,o]=e;if(i.type!==_e.None){if(i.type===_e.Hue)return;t.l=Math.min(Math.max(0,i.type===_e.Number?i.value:i.value/100),1)}if(s.type!==_e.None&&(t.c=Math.max(0,s.type===_e.Number?s.value:s.value*.4/100)),r.type!==_e.None){if(r.type===_e.Percentage)return;t.h=r.value}return o.type!==_e.None&&(t.alpha=Math.min(1,Math.max(0,o.type===_e.Number?o.value:o.value/100))),t}const uH={...X_,mode:"oklch",toMode:{oklab:n=>xr(n,"oklab"),rgb:n=>ep(xr(n,"oklab"))},fromMode:{rgb:n=>br(Qh(n),"oklch"),oklab:n=>br(n,"oklch")},parse:[cH],serialize:n=>`oklch(${n.l!==void 0?n.l:"none"} ${n.c!==void 0?n.c:"none"} ${n.h!==void 0?n.h:"none"}${n.alpha<1?` / ${n.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},qx=n=>{let{r:e,g:t,b:i,alpha:s}=Ga(n),r={mode:"xyz65",x:.486570948648216*e+.265667693169093*t+.1982172852343625*i,y:.2289745640697487*e+.6917385218365062*t+.079286914093745*i,z:0*e+.0451133818589026*t+1.043944368900976*i};return s!==void 0&&(r.alpha=s),r},Yx=({x:n,y:e,z:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=Wa({r:n*2.4934969119414263-e*.9313836179191242-.402710784450717*t,g:n*-.8294889695615749+e*1.7626640603183465+.0236246858419436*t,b:n*.0358458302437845-e*.0761723892680418+.9568845240076871*t},"p3");return i!==void 0&&(s.alpha=i),s},fH={...Ha,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:n=>Yx(Io(n)),xyz65:Yx},toMode:{rgb:n=>Lo(qx(n)),xyz65:qx}},Fm=n=>{let e=Math.abs(n);return e>=1/512?Math.sign(n)*Math.pow(e,1/1.8):16*n},jx=({x:n,y:e,z:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s={mode:"prophoto",r:Fm(n*1.3457868816471585-e*.2555720873797946-.0511018649755453*t),g:Fm(n*-.5446307051249019+e*1.5082477428451466+.0205274474364214*t),b:Fm(n*0+e*0+1.2119675456389452*t)};return i!==void 0&&(s.alpha=i),s},km=(n=0)=>{let e=Math.abs(n);return e>=16/512?Math.sign(n)*Math.pow(e,1.8):n/16},Kx=n=>{let e=km(n.r),t=km(n.g),i=km(n.b),s={mode:"xyz50",x:.7977666449006423*e+.1351812974005331*t+.0313477341283922*i,y:.2880748288194013*e+.7118352342418731*t+899369387256e-16*i,z:0*e+0*t+.8251046025104602*i};return n.alpha!==void 0&&(s.alpha=n.alpha),s},dH={...Ha,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:jx,rgb:n=>jx(Zc(n))},toMode:{xyz50:Kx,rgb:n=>Kc(Kx(n))}},Zx=1.09929682680944,hH=.018053968510807,Bm=n=>{const e=Math.abs(n);return e>hH?(Math.sign(n)||1)*(Zx*Math.pow(e,.45)-(Zx-1)):4.5*n},Jx=({x:n,y:e,z:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s={mode:"rec2020",r:Bm(n*1.7166511879712683-e*.3556707837763925-.2533662813736599*t),g:Bm(n*-.6666843518324893+e*1.6164812366349395+.0157685458139111*t),b:Bm(n*.0176398574453108-e*.0427706132578085+.9421031212354739*t)};return i!==void 0&&(s.alpha=i),s},Qx=1.09929682680944,pH=.018053968510807,zm=(n=0)=>{let e=Math.abs(n);return e{let e=zm(n.r),t=zm(n.g),i=zm(n.b),s={mode:"xyz65",x:.6369580483012911*e+.1446169035862083*t+.1688809751641721*i,y:.262700212011267*e+.6779980715188708*t+.059301716469862*i,z:0*e+.0280726930490874*t+1.0609850577107909*i};return n.alpha!==void 0&&(s.alpha=n.alpha),s},mH={...Ha,mode:"rec2020",fromMode:{xyz65:Jx,rgb:n=>Jx(Io(n))},toMode:{xyz65:eM,rgb:n=>Lo(eM(n))},parse:["rec2020"],serialize:"rec2020"},_o=.0037930732552754493,bA=Math.cbrt(_o),Vm=n=>Math.cbrt(n)-bA,gH=n=>{const{r:e,g:t,b:i,alpha:s}=Ga(n),r=Vm(.3*e+.622*t+.078*i+_o),o=Vm(.23*e+.692*t+.078*i+_o),a=Vm(.2434226892454782*e+.2047674442449682*t+.5518098665095535*i+_o),l={mode:"xyb",x:(r-o)/2,y:(r+o)/2,b:a-(r+o)/2};return s!==void 0&&(l.alpha=s),l},Hm=n=>Math.pow(n+bA,3),_H=({x:n,y:e,b:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);const s=Hm(n+e)-_o,r=Hm(e-n)-_o,o=Hm(t+e)-_o,a=Wa({r:11.031566904639861*s-9.866943908131562*r-.16462299650829934*o,g:-3.2541473810744237*s+4.418770377582723*r-.16462299650829934*o,b:-3.6588512867136815*s+2.7129230459360922*r+1.9459282407775895*o});return i!==void 0&&(a.alpha=i),a},vH={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:_H},fromMode:{rgb:gH},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:Ae,y:Ae,b:Ae,alpha:{use:Ae,fixup:on}}},yH={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:Kc,lab:G_},fromMode:{rgb:Zc,lab:H_},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:Ae,y:Ae,z:Ae,alpha:{use:Ae,fixup:on}}},bH=n=>{let{x:e,y:t,z:i,alpha:s}=n;e===void 0&&(e=0),t===void 0&&(t=0),i===void 0&&(i=0);let r={mode:"xyz50",x:1.0479298208405488*e+.0229467933410191*t-.0501922295431356*i,y:.0296278156881593*e+.990434484573249*t-.0170738250293851*i,z:-.0092430581525912*e+.0150551448965779*t+.7518742899580008*i};return s!==void 0&&(r.alpha=s),r},xH=n=>{let{x:e,y:t,z:i,alpha:s}=n;e===void 0&&(e=0),t===void 0&&(t=0),i===void 0&&(i=0);let r={mode:"xyz65",x:.9554734527042182*e-.0230985368742614*t+.0632593086610217*i,y:-.0283697069632081*e+1.0099954580058226*t+.021041398966943*i,z:.0123140016883199*e-.0205076964334779*t+1.3303659366080753*i};return s!==void 0&&(r.alpha=s),r},MH={mode:"xyz65",toMode:{rgb:Lo,xyz50:bH},fromMode:{rgb:Io,xyz50:xH},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:Ae,y:Ae,z:Ae,alpha:{use:Ae,fixup:on}}},SH=({r:n,g:e,b:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);const s={mode:"yiq",y:.29889531*n+.58662247*e+.11448223*t,i:.59597799*n-.2741761*e-.32180189*t,q:.21147017*n-.52261711*e+.31114694*t};return i!==void 0&&(s.alpha=i),s},EH=({y:n,i:e,q:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);const s={mode:"rgb",r:n+.95608445*e+.6208885*t,g:n-.27137664*e-.6486059*t,b:n-1.10561724*e+1.70250126*t};return i!==void 0&&(s.alpha=i),s},TH={mode:"yiq",toMode:{rgb:EH},fromMode:{rgb:SH},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:Ae,i:Ae,q:Ae,alpha:{use:Ae,fixup:on}}};Et(d6);Et(y6);Et(b6);Et(x6);Et(E6);Et(nA);Et(rA);Et(O6);Et(N6);Et(B6);Et(z6);Et(W_);Et(H6);Et(X_);Et(W6);Et(eH);Et(tH);Et(nH);Et(rH);Et(oH);Et(lH);Et(uH);Et(fH);Et(dH);Et(mH);Et(Ha);Et(vH);Et(yH);Et(MH);Et(TH);const e0=178.17,wH=$w("oklch"),tM=n=>{var e;return n?(e=wH(n))==null?void 0:e.h:e0},AH=Oz("settings",()=>{const n=et(),e=gs("settings/language","en-US"),t=gs("settings/stage/view/model-renderer","2d"),i=gs("settings/audio/input","true"),s=Ee(()=>{var E;return(E=n.value)==null?void 0:E.deviceId}),{audioInputs:r}=kB({constraints:{audio:!0},requestPermissions:!0}),o=et(),a=et("/assets/live2d/models/hiyori_pro_zh.zip"),l=et("url"),c=et(!1),u=gs("settings/live2d/position",{x:0,y:0}),f=et({group:"Idle",index:0}),d=et([]),h=gs("settings/live2d/motion-map",{}),p=gs("settings/disable-transitions",!0),_=gs("settings/use-page-specific-transitions",!0),g=gs("settings/theme/colors/hue",e0),m=gs("settings/theme/colors/hue-dynamic",!1);function y(E=e0){g.value=E,m.value=!1}function b(E){y(tM(E))}function v(E){if(m.value)return!1;const T=tM(E);if(!T)return!1;const S=Math.abs(T-g.value);return S<.01||S>359.99}return $e(i,E=>{E==="false"&&(n.value=void 0),E==="true"&&(n.value=r.value[0])}),$e(r,()=>{i.value==="true"&&!n.value&&(n.value=r.value[0])},{immediate:!0}),{live2dModelFile:o,live2dModelUrl:a,live2dLoadSource:l,live2dCurrentMotion:f,live2dPosition:u,availableLive2dMotions:d,live2dMotionMap:h,loadingLive2dModel:c,disableTransitions:p,usePageSpecificTransitions:_,language:e,stageView:t,themeColorsHue:g,themeColorsHueDynamic:m,isAudioInputOn:i,selectedAudioDevice:n,selectedAudioDeviceId:s,setThemeColorsHue:y,applyPrimaryColorFrom:b,isColorSelectedForPrimary:v}}),CH=fn({__name:"ArrowTransition",props:{stageTransition:{default:()=>({primaryColor:"#666",secondaryColor:"#ccc"})}},setup(n){const e=n,t=Ee(()=>e.stageTransition),i=Ee(()=>t.value.primaryColor||"#666"),s=Ee(()=>t.value.secondaryColor||"#ccc");return Hn(()=>{document.documentElement.style.setProperty("--stage-transition-3-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-3-overlay-color-2",s.value)}),(r,o)=>(mn(),vi("div",{class:"stage-transition-3",style:Si({zIndex:t.value.zIndex||100})},null,4))}}),Do=(n,e)=>{const t=n.__vccOpts||n;for(const[i,s]of e)t[i]=s;return t},RH=Do(CH,[["__scopeId","data-v-df576df0"]]),PH=fn({__name:"BubbleWaveOutTransition",props:{stageTransition:null},setup(n){const e=n,t=Ee(()=>{var i;return((i=e.stageTransition)==null?void 0:i.colors)||["#eee","#ebcb8b","#c56370","#3f3b52"]});return Hn(()=>{var i,s;document.documentElement.style.setProperty("--circle-expansion-delay",`${((i=e.stageTransition)==null?void 0:i.delay)||0}s`),document.documentElement.style.setProperty("--circle-expansion-duration",`${((s=e.stageTransition)==null?void 0:s.duration)||.4}s`),t.value.forEach((r,o)=>{document.documentElement.style.setProperty(`--circle-expansion-color-${o+1}`,r)})}),(i,s)=>{var r;return mn(),vi("div",{class:"circle-expansion-transition",style:Si({zIndex:((r=n.stageTransition)==null?void 0:r.zIndex)||100})},[(mn(!0),vi(jt,null,u2(t.value,(o,a)=>(mn(),vi("div",{key:a}))),128))],4)}}}),IH=Do(PH,[["__scopeId","data-v-0c29056c"]]),LH=fn({__name:"FantasyFallTransition",props:{stageTransition:null},setup(n){const e=n,t=Ee(()=>{var s;return((s=e.stageTransition)==null?void 0:s.direction)||"up"}),i=Ee(()=>`fantasy-fall-${t.value}`);return Hn(()=>{var s,r,o,a,l,c,u,f,d;document.documentElement.style.setProperty("--fantasy-fall-color",((s=e.stageTransition)==null?void 0:s.primaryColor)||"#eee"),document.documentElement.style.setProperty("--fantasy-fall-duration",`${((r=e.stageTransition)==null?void 0:r.duration)||.6}s`),document.documentElement.style.setProperty("--fantasy-fall-delay",`${((o=e.stageTransition)==null?void 0:o.delay)||0}s`),document.documentElement.style.setProperty("--fantasy-fall-radius-sm",`${((l=(a=e.stageTransition)==null?void 0:a.borderRadius)==null?void 0:l.sm)||"14rem"}`),document.documentElement.style.setProperty("--fantasy-fall-radius-md",`${((u=(c=e.stageTransition)==null?void 0:c.borderRadius)==null?void 0:u.md)||"14rem"}`),document.documentElement.style.setProperty("--fantasy-fall-radius-lg",`${((d=(f=e.stageTransition)==null?void 0:f.borderRadius)==null?void 0:d.lg)||"50%"}`)}),(s,r)=>{var o;return mn(),vi("div",{class:Oa(["fantasy-fall-transition",i.value]),style:Si({zIndex:((o=n.stageTransition)==null?void 0:o.zIndex)??100})},null,6)}}}),DH=Do(LH,[["__scopeId","data-v-e62bf496"]]),OH=fn({__name:"MultipleBlocksRevealTransition",props:{stageTransition:null},setup(n){const e=n,t=Ee(()=>e.stageTransition),i=Ee(()=>{var r;return((r=t.value)==null?void 0:r.primaryColor)||"#666"}),s=Ee(()=>{var r;return((r=t.value)==null?void 0:r.secondaryColor)||"#ccc"});return Hn(()=>{document.documentElement.style.setProperty("--stage-transition-4-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-4-overlay-color-2",s.value)}),(r,o)=>{var a;return mn(),vi("div",{class:"stage-transition-4",style:Si({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},o[0]||(o[0]=[G2('
',5)]),4)}}}),NH=Do(OH,[["__scopeId","data-v-6d1179fc"]]),UH=fn({__name:"SlideTransition",props:{stageTransition:null},setup(n){const e=n,t=Ee(()=>e.stageTransition),i=Ee(()=>{var r;return((r=t.value)==null?void 0:r.primaryColor)||"#666"}),s=Ee(()=>{var r;return((r=t.value)==null?void 0:r.secondaryColor)||"#ccc"});return $e([t,i,s],()=>{document.documentElement.style.setProperty("--stage-transition-1-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-1-overlay-color-2",s.value)}),Hn(()=>{document.documentElement.style.setProperty("--stage-transition-1-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-1-overlay-color-2",s.value)}),(r,o)=>{var a;return mn(),vi("div",{class:"stage-transition-1",style:Si({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},null,4)}}}),FH=Do(UH,[["__scopeId","data-v-bf1d1566"]]),kH=fn({__name:"SlopeSlideTransition",props:{stageTransition:null},setup(n){const e=n,t=Ee(()=>e.stageTransition),i=Ee(()=>{var r;return((r=t.value)==null?void 0:r.primaryColor)??"#666"}),s=Ee(()=>{var r;return((r=t.value)==null?void 0:r.secondaryColor)??"#ccc"});return Hn(()=>{document.documentElement.style.setProperty("--stage-transition-2-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-2-overlay-color-2",s.value)}),(r,o)=>{var a;return mn(),vi("div",{class:"stage-transition-2",style:Si({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},null,4)}}}),BH=Do(kH,[["__scopeId","data-v-8ff7120f"]]),zH=fn({__name:"RectanglesRotateTransition",props:{stageTransition:null},setup(n){const e=n;return Hn(()=>{var t,i,s,r,o,a,l;document.documentElement.style.setProperty("--rectangle-rotate-1-color",((t=e.stageTransition)==null?void 0:t.primaryColor)||"#ebcb8b"),document.documentElement.style.setProperty("--rectangle-rotate-2-color",((i=e.stageTransition)==null?void 0:i.secondaryColor)||"#c56370"),document.documentElement.style.setProperty("--rectangle-rotate-3-color",((s=e.stageTransition)==null?void 0:s.tertiaryColor)||"#43445b"),document.documentElement.style.setProperty("--rectangle-rotate-duration",`${((r=e.stageTransition)==null?void 0:r.duration)||.6}s`),document.documentElement.style.setProperty("--rectangle-rotate-delay",`${((o=e.stageTransition)==null?void 0:o.delay)||0}s`),document.documentElement.style.setProperty("--rectangle-rotate-stagger",`${((a=e.stageTransition)==null?void 0:a.staggerDelay)||.1}s`),document.documentElement.style.setProperty("--rectangle-rotate-rotation",`${((l=e.stageTransition)==null?void 0:l.rotation)||270}deg`)}),(t,i)=>{var s;return mn(),vi("div",{class:"rectangle-rotate-transition",style:Si({zIndex:((s=n.stageTransition)==null?void 0:s.zIndex)??100})},i[0]||(i[0]=[sr("div",{class:"rectangle rectangle-rotate-1"},[sr("div")],-1),sr("div",{class:"rectangle rectangle-rotate-2"},[sr("div")],-1),sr("div",{class:"rectangle rectangle-rotate-3"},[sr("div")],-1)]),4)}}}),VH=Do(zH,[["__scopeId","data-v-f4b1dc64"]]),HH=fn({__name:"StageTransitionGroup",props:{primaryColor:null,secondaryColor:null,tertiaryColor:null,colors:null,zIndex:null,disableTransitions:{type:Boolean},usePageSpecificTransitions:{type:Boolean}},setup(n){const e=n,t=zV(),i=et(!1),s=et(),r=et(""),o=et(),a=De({slide:{component:FH,duration:2700},"slope-slide":{component:BH,duration:2700},arrow:{component:RH,duration:2700},"multiple-blocks-reveal":{component:NH,duration:2800},"fantasy-fall":{component:DH,duration:2700},"rectangles-rotate":{component:VH,duration:2700},"bubble-wave-out":{component:IH,duration:1e3}}),l=et([]);function c(h){return l.value.push(h),()=>{const p=l.value.indexOf(h);p>=0&&l.value.splice(p,1)}}async function u(h,p={}){s.value=h;for(const _ of l.value)try{await Promise.resolve(_(h,p))}catch(g){console.error(`Error in transition hook at stage "${h}":`,g)}}async function f(h,p,_){if(h.name==="none"||!h.name){p(),_();return}const g=a.value[h.name];if(!g){console.error(`Transition ${h.name} not found`),p(),_();return}const m=g.nextDelay!==void 0?g.nextDelay:g.duration/3;let y=!1;const v=c(E=>{E==="navigation"&&!y&&(y=!0,p())});try{await u("before-enter",{transitionName:h.name}),i.value&&(await u("before-leave",{transitionName:r.value}),r.value="",o.value=void 0,i.value=!1,await u("after-leave",{transitionName:r.value}),await new Promise(T=>setTimeout(T,50))),r.value=h.name,o.value=h,i.value=!0,await u("enter-active",{transitionName:name}),setTimeout(async()=>{await u("navigation",{transitionName:h.name,config:g}),y||(y=!0,p())},m),setTimeout(async()=>{await u("after-enter",{transitionName:h.name})},g.duration),setTimeout(async()=>{await u("before-leave",{transitionName:h.name})},g.duration+10),setTimeout(async()=>{await u("leave-active",{transitionName:h.name})},g.duration+20);const E=g.exitDuration??0;setTimeout(async()=>{i.value=!1,r.value="",o.value=void 0,await u("after-leave",{transitionName:h.name}),_()},g.duration+E)}catch(E){console.error(E)}finally{v(),setTimeout(()=>{y||(y=!0,p())},g.duration*2)}}function d(h,p){return new Promise(_=>{f(h,p,_)})}return t.beforeEach((h,p,_)=>{if(e.disableTransitions){_();return}if(typeof h.meta.stageTransition!="object"){_();return}const g=h.meta.stageTransition;if(e.usePageSpecificTransitions&&g.pageSpecificAvailable){_();return}typeof e.primaryColor<"u"&&(g.primaryColor=e.primaryColor),typeof e.secondaryColor<"u"&&(g.secondaryColor=e.secondaryColor),typeof e.tertiaryColor<"u"&&(g.tertiaryColor=e.tertiaryColor),typeof e.colors<"u"&&(g.colors=e.colors),typeof e.zIndex<"u"&&(g.zIndex=e.zIndex),d(g,_)}),(h,p)=>(mn(),vi(jt,null,[f2(h.$slots,"default"),i.value?(mn(),vi(jt,{key:0},[a.value[r.value]?(mn(),Yl(c2(a.value[r.value].component),{key:0,"stage-transition":o.value},null,8,["stage-transition"])):Cv("",!0)],64)):Cv("",!0)],64))}});/*! @@ -3887,7 +3887,7 @@ The available emotions: - <|DELAY:3|> (Delay for 3 seconds) And the last, do what ever you want! -`}}},settings:{animations:{"stage-transitions":{title:{t:0,b:{t:2,i:[{t:3}],s:"Disable Stage Transitions"}}},"use-page-specific-transitions":{description:{t:0,b:{t:2,i:[{t:3}],s:"Some pages will have their own transitions, this will override the stage transitions"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Use Page Specific Transitions"}}}},language:{chinese:{t:0,b:{t:2,i:[{t:3}],s:"简体中文"}},english:{t:0,b:{t:2,i:[{t:3}],s:"English"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Language"}}},live2d:{"change-model":{"from-file":{t:0,b:{t:2,i:[{t:3}],s:"Load from File"}},"from-file-select":{t:0,b:{t:2,i:[{t:3}],s:"Select"}},"from-url":{t:0,b:{t:2,i:[{t:3}],s:"Load from URL"}},"from-url-confirm":{t:0,b:{t:2,i:[{t:3}],s:"Load"}},"from-url-placeholder":{t:0,b:{t:2,i:[{t:3}],s:"Enter Live2D model URL"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Change Model"}}},"edit-motion-map":{title:{t:0,b:{t:2,i:[{t:3}],s:"Edit motion map"}}},"map-motions":{play:{t:0,b:{t:2,i:[{t:3}],s:"Play Motion"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Map Motions"}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Live2D Settings"}}},microphone:{t:0,b:{t:2,i:[{t:3}],s:"Microphone"}},models:{t:0,b:{t:2,i:[{t:3}],s:"Model"}},pages:{card:{title:{t:0,b:{t:2,i:[{t:3}],s:"Airi Card"}},description:{t:0,b:{t:2,i:[{t:3}],s:"Use Airi character card presets"}},upload:{t:0,b:{t:2,i:[{t:3}],s:"Upload"}},upload_desc:{t:0,b:{t:2,i:[{t:3}],s:"Click or drag file to upload"}},drop_here:{t:0,b:{t:2,i:[{t:3}],s:"Drop to upload"}},delete:{t:0,b:{t:2,i:[{t:3}],s:"Delete"}},active:{t:0,b:{t:2,i:[{t:3}],s:"Active"}},active_badge:{t:0,b:{t:2,i:[{t:3}],s:"Currently Active"}},activate:{t:0,b:{t:2,i:[{t:3}],s:"Activate"}},cancel:{t:0,b:{t:2,i:[{t:3}],s:"Cancel"}},card_not_found:{t:0,b:{t:2,i:[{t:3}],s:"Card not found"}},character:{t:0,b:{t:2,i:[{t:3}],s:"Character"}},personality:{t:0,b:{t:2,i:[{t:3}],s:"Personality"}},scenario:{t:0,b:{t:2,i:[{t:3}],s:"Scenario"}},systemprompt:{t:0,b:{t:2,i:[{t:3}],s:"System Prompt"}},posthistoryinstructions:{t:0,b:{t:2,i:[{t:3}],s:"Post-History Instructions"}},modules:{t:0,b:{t:2,i:[{t:3}],s:"Modules"}},close:{t:0,b:{t:2,i:[{t:3}],s:"Close"}},search:{t:0,b:{t:2,i:[{t:3}],s:"Search cards..."}},sort_by:{t:0,b:{t:2,i:[{t:3}],s:"Sort by"}},name_asc:{t:0,b:{t:2,i:[{t:3}],s:"Name (A-Z)"}},name_desc:{t:0,b:{t:2,i:[{t:3}],s:"Name (Z-A)"}},recent:{t:0,b:{t:2,i:[{t:3}],s:"Recently Added"}},no_cards:{t:0,b:{t:2,i:[{t:3}],s:"No cards yet. Click the button above to upload one!"}},no_results:{t:0,b:{t:2,i:[{t:3}],s:"No matching cards found"}},try_different_search:{t:0,b:{t:2,i:[{t:3}],s:"Try a different search term"}},consciousness:{model:{t:0,b:{t:2,i:[{t:3}],s:"Consciousness / Model"}}},created_by:{t:0,b:{t:2,i:[{t:3}],s:"created by"}},creator_notes:{t:0,b:{t:2,i:[{t:3}],s:"Creator Notes"}},delete_card:{t:0,b:{t:2,i:[{t:3}],s:"Delete Card"}},delete_confirmation:{t:0,b:{t:2,i:[{t:3}],s:"Are you sure you want to delete this card?"}},description_label:{t:0,b:{t:2,i:[{t:3}],s:"Description"}},speech:{model:{t:0,b:{t:2,i:[{t:3}],s:"Speech / Model"}},voice:{t:0,b:{t:2,i:[{t:3}],s:"Speech / Voice"}}}},memory:{description:{t:0,b:{t:2,i:[{t:3}],s:"Where memories got stored, and organized"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Memory"}}},models:{description:{t:0,b:{t:2,i:[{t:3}],s:"Live2D, VRM, etc."}},title:{t:0,b:{t:2,i:[{t:3}],s:"Models"}}},modules:{consciousness:{description:{t:0,b:{t:2,i:[{t:3}],s:"Personality, desired model, etc."}},sections:{section:{"provider-model-selection":{collapse:{t:0,b:{t:2,i:[{t:3}],s:"Collapse"}},custom_model_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Enter custom model name..."}},description:{t:0,b:{t:2,i:[{t:3}],s:"Select the suitable LLM provider for consciousness"}},error:{t:0,b:{t:2,i:[{t:3}],s:"Error loading models"}},expand:{t:0,b:{t:2,i:[{t:3}],s:"Expand"}},loading:{t:0,b:{t:2,i:[{t:3}],s:"Loading available models..."}},manual_model_name:{t:0,b:{t:2,i:[{t:3}],s:"Model Name"}},manual_model_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Enter the model name to use with this provider"}},no_models:{t:0,b:{t:2,i:[{t:3}],s:"No models available"}},no_models_description:{t:0,b:{t:2,i:[{t:3}],s:"No models were found for this provider"}},no_search_results:{t:0,b:{t:2,i:[{t:3}],s:"No matching models"}},no_search_results_description:{t:0,b:{t:2,i:[{t:3,v:"No models match '"},{t:4,k:"query"},{t:3,v:"'. Try a different search term."}]}},not_supported:{t:0,b:{t:2,i:[{t:3}],s:"Model listing not supported"}},not_supported_description:{t:0,b:{t:2,i:[{t:3}],s:"This provider doesn't support model listing functionality"}},search_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Search models..."}},search_results:{t:0,b:{t:2,i:[{t:3,v:"Found "},{t:4,k:"count"},{t:3,v:" of "},{t:4,k:"total"},{t:3,v:" models"}]}},show_less:{t:0,b:{t:2,i:[{t:3}],s:"Show less"}},show_more:{t:0,b:{t:2,i:[{t:3}],s:"Show more"}},subtitle:{t:0,b:{t:2,i:[{t:3}],s:"Select a model from the provider"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Model"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Consciousness"}}},description:{t:0,b:{t:2,i:[{t:3}],s:"Thinking, vision, speech synthesis, gaming, etc."}},"gaming-factorio":{description:{t:0,b:{t:2,i:[{t:3}],s:"Playing Factorio!"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Factorio"}}},"gaming-minecraft":{description:{t:0,b:{t:2,i:[{t:3}],s:"Playing Minecraft!"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Minecraft"}}},hearing:{description:{t:0,b:{t:2,i:[{t:3}],s:"Configure how speech recognition works"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Hearing"}}},"memory-long-term":{description:{t:0,b:{t:2,i:[{t:3}],s:"Long-term memory specific settings and management"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Long-Term Memory"}}},"memory-short-term":{description:{t:0,b:{t:2,i:[{t:3}],s:"Short-term memory specific settings and management"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Short-Term Memory"}}},"messaging-discord":{description:{t:0,b:{t:2,i:[{t:3}],s:"Chat & voice chat over Discord"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Discord"}}},speech:{description:{t:0,b:{t:2,i:[{t:3}],s:"Speech synthesis"}},sections:{section:{playground:{buttons:{stop:{label:{t:0,b:{t:2,i:[{t:3}],s:"Stop"}}}},"select-voice":{required:{t:0,b:{t:2,i:[{t:3}],s:"Please select a voice"}}}},"provider-voice-selection":{custom_model_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Enter custom model name..."}},custom_voice_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Enter custom voice ID..."}},description:{t:0,b:{t:2,i:[{t:3}],s:"Select the suitable speech provider"}},no_models:{t:0,b:{t:2,i:[{t:3}],s:"No models available"}},no_models_description:{t:0,b:{t:2,i:[{t:3}],s:"No models were found for this provider"}},no_voices:{t:0,b:{t:2,i:[{t:3}],s:"No voices available"}},no_voices_description:{t:0,b:{t:2,i:[{t:3}],s:"No voices were found for this provider"}},search_models_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Search models..."}},search_models_results:{t:0,b:{t:2,i:[{t:3,v:"Found "},{t:4,k:"count"},{t:3,v:" of "},{t:4,k:"total"},{t:3,v:" models"}]}},search_voices_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Search voices..."}},search_voices_results:{t:0,b:{t:2,i:[{t:3,v:"Found "},{t:4,k:"count"},{t:3,v:" of "},{t:4,k:"total"},{t:3,v:" voices"}]}},show_less:{t:0,b:{t:2,i:[{t:3}],s:"Show less"}},show_more:{t:0,b:{t:2,i:[{t:3}],s:"Show more"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Provider"}}},"voice-settings":{"input-ssml":{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Enter SSML text..."}}},"use-ssml":{description:{t:0,b:{t:2,i:[{t:3}],s:"Enable to input raw SSML instead of plain text"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Use Custom SSML"}}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Speech"}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Modules"}},vision:{description:{t:0,b:{t:2,i:[{t:3}],s:"Vision"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Vision"}}},x:{description:{t:0,b:{t:2,i:[{t:3}],s:"X / Twitter browsing and usage"}},title:{t:0,b:{t:2,i:[{t:3}],s:"X / Twitter"}}}},providers:{common:{fields:{field:{"api-key":{label:{t:0,b:{t:2,i:[{t:3}],s:"API Key Input"}}}}},section:{advanced:{fields:{field:{headers:{description:{t:0,b:{t:2,i:[{t:3}],s:"Add custom HTTP headers"}},key:{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Key"}}},label:{t:0,b:{t:2,i:[{t:3}],s:"HTTP Headers"}},value:{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Value"}}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Advanced"}}},basic:{description:{t:0,b:{t:2,i:[{t:3}],s:"Essential settings"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Basic"}}},voice:{title:{t:0,b:{t:2,i:[{t:3}],s:"Voice Settings"}}}}},description:{t:0,b:{t:2,i:[{t:3}],s:"LLMs, speech providers, etc."}},provider:{anthropic:{description:{t:0,b:{t:2,i:[{t:3}],s:"anthropic.com"}},title:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"Anthropic"},{t:2,i:[{t:3}],s:"Claude"}]}}},"cloudflare-workers-ai":{description:{t:0,b:{t:2,i:[{t:3}],s:"cloudflare.com"}},fields:{field:{"account-id":{description:{t:0,b:{t:2,i:[{t:3}],s:"Cloudflare Account ID"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Account ID"}},placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Your Cloudflare Account ID"}}},"api-key":{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Input Cloudflare Account ID"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Cloudflare Workers AI"}}},common:{fields:{field:{pitch:{description:{t:0,b:{t:2,i:[{t:3}],s:"Tune the pitch of synthesized speech (e.g., sharper or coarser)"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Pitch"}}},speed:{description:{t:0,b:{t:2,i:[{t:3}],s:"Adjust the speed of speech"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Speed"}}},volume:{description:{t:0,b:{t:2,i:[{t:3}],s:"Adjust the volume of speech"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Volume"}}}}}},deepseek:{description:{t:0,b:{t:2,i:[{t:3}],s:"deepseek.com"}},title:{t:0,b:{t:2,i:[{t:3}],s:"DeepSeek"}}},elevenlabs:{description:{t:0,b:{t:2,i:[{t:3}],s:"elevenlabs.io"}},fields:{field:{"simularity-boost":{description:{t:0,b:{t:2,i:[{t:3}],s:"Voice similarity adherence"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Similarity Boost"}}},"speaker-boost":{description:{t:0,b:{t:2,i:[{t:3}],s:"Enhance speaker similarity"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Speaker Boost"}}},speed:{description:{t:0,b:{t:2,i:[{t:3}],s:"Speech generation speed"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Speed"}}},stability:{description:{t:0,b:{t:2,i:[{t:3}],s:"Voice stability and randomness"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Stability"}}},style:{description:{t:0,b:{t:2,i:[{t:3}],s:"Voice style exaggeration"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Style"}}}}},playground:{buttons:{button:{"test-voice":{generating:{t:0,b:{t:2,i:[{t:3}],s:"Generating..."}},label:{t:0,b:{t:2,i:[{t:3}],s:"Test Voice"}}}}},fields:{field:{input:{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Enter text to test the voice..."}}},language:{description:{t:0,b:{t:2,i:[{t:3}],s:"Select voice language"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Language"}}},voice:{description:{t:0,b:{t:2,i:[{t:3}],s:"Select preferred voice"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Voice"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Voice Playground"}},validation:{"error-missing-api-key":{t:0,b:{t:2,i:[{t:3}],s:"Please enter an API key to test the voice."}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"ElevenLabs"}}},fireworks:{description:{t:0,b:{t:2,i:[{t:3}],s:"fireworks.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Fireworks.ai"}}},"microsoft-speech":{description:{t:0,b:{t:2,i:[{t:3}],s:"speech.microsoft.com"}},fields:{field:{region:{description:{t:0,b:{t:2,i:[{t:3}],s:"Speech Service region"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Region"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Microsoft / Azure Speech"}}},mistral:{description:{t:0,b:{t:2,i:[{t:3}],s:"mistral.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Mistral"}}},moonshot:{description:{t:0,b:{t:2,i:[{t:3}],s:"moonshot.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Moonshot AI"}}},novita:{description:{t:0,b:{t:2,i:[{t:3}],s:"novita.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Novita"}}},ollama:{description:{t:0,b:{t:2,i:[{t:3}],s:"ollama.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Ollama"}}},openai:{description:{t:0,b:{t:2,i:[{t:3}],s:"openai.com"}},title:{t:0,b:{t:2,i:[{t:3}],s:"OpenAI"}}},openrouter:{description:{t:0,b:{t:2,i:[{t:3}],s:"openrouter.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"OpenRouter"}}},perplexity:{description:{t:0,b:{t:2,i:[{t:3}],s:"perplexity.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Perplexity"}}},together:{description:{t:0,b:{t:2,i:[{t:3}],s:"together.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Together.ai"}}},vllm:{description:{t:0,b:{t:2,i:[{t:3}],s:"vllm.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"vLLM"}}},xai:{description:{t:0,b:{t:2,i:[{t:3}],s:"x.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"xAI"}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Providers"}}},themes:{description:{t:0,b:{t:2,i:[{t:3}],s:"Customize your stage!"}},sections:{section:{"custom-color":{fields:{field:{"primary-color":{label:{t:0,b:{t:2,i:[{t:3}],s:"Primary color"}},"rgb-on":{title:{t:0,b:{t:2,i:[{t:3}],s:"I Want It Dynamic!"}}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Color Scheme"}}},developer:{title:{t:0,b:{t:2,i:[{t:3}],s:"Developer"}}},"theme-presets":{presets:[{colors:[{t:0,b:{t:2,i:[{t:3}],s:"Airi Green"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"The default greenish theme color, brought by Airi to you!"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Default Color"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"Taupe"}},{t:0,b:{t:2,i:[{t:3}],s:"Beige"}},{t:0,b:{t:2,i:[{t:3}],s:"Ash Grey"}},{t:0,b:{t:2,i:[{t:3}],s:"Light Taupe"}},{t:0,b:{t:2,i:[{t:3}],s:"Ivory"}},{t:0,b:{t:2,i:[{t:3}],s:"Olive Grey"}},{t:0,b:{t:2,i:[{t:3}],s:"Sand"}},{t:0,b:{t:2,i:[{t:3}],s:"Warm Grey"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"Soft, muted tones inspired by Giorgio Morandi's paintings"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Morandi Colors"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"Sky Blue"}},{t:0,b:{t:2,i:[{t:3}],s:"Mist"}},{t:0,b:{t:2,i:[{t:3}],s:"Sand"}},{t:0,b:{t:2,i:[{t:3}],s:"Moss Green"}},{t:0,b:{t:2,i:[{t:3}],s:"Water Lily"}},{t:0,b:{t:2,i:[{t:3}],s:"Wheat"}},{t:0,b:{t:2,i:[{t:3}],s:"Slate Blue"}},{t:0,b:{t:2,i:[{t:3}],s:"Sage"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"Impressionist palette inspired by Claude Monet's works"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Monet Colors"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"Tan"}},{t:0,b:{t:2,i:[{t:3}],s:"Warm Taupe"}},{t:0,b:{t:2,i:[{t:3}],s:"Umber"}},{t:0,b:{t:2,i:[{t:3}],s:"Coffee"}},{t:0,b:{t:2,i:[{t:3}],s:"Bronze"}},{t:0,b:{t:2,i:[{t:3}],s:"Gold"}},{t:0,b:{t:2,i:[{t:3}],s:"Mustard"}},{t:0,b:{t:2,i:[{t:3}],s:"Amber"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"Traditional Japanese color palette"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Japanese Colors"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"Nordic Blue"}},{t:0,b:{t:2,i:[{t:3}],s:"Ice"}},{t:0,b:{t:2,i:[{t:3}],s:"Fjord"}},{t:0,b:{t:2,i:[{t:3}],s:"Steel"}},{t:0,b:{t:2,i:[{t:3}],s:"Glacier"}},{t:0,b:{t:2,i:[{t:3}],s:"Slate"}},{t:0,b:{t:2,i:[{t:3}],s:"Cloud"}},{t:0,b:{t:2,i:[{t:3}],s:"Stone"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"Scandinavian minimalist color scheme"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Nordic Colors"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"Rosy Dawn"}},{t:0,b:{t:2,i:[{t:3}],s:"Chinese Red"}},{t:0,b:{t:2,i:[{t:3}],s:"Smoky Brown"}},{t:0,b:{t:2,i:[{t:3}],s:"Bamboo Green"}},{t:0,b:{t:2,i:[{t:3}],s:"Dark Purple"}},{t:0,b:{t:2,i:[{t:3}],s:"Golden Yellow"}},{t:0,b:{t:2,i:[{t:3}],s:"Azure Blue"}},{t:0,b:{t:2,i:[{t:3}],s:"Ochre"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"Traditional Chinese colors, derived from ancient textiles, porcelain and paintings"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Chinese Traditional Colors"}}}],title:{t:0,b:{t:2,i:[{t:3}],s:"Color Scheme Presets"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Appearance"}}}},sections:{section:{general:{title:{t:0,b:{t:2,i:[{t:3}],s:"General"}}}}},theme:{t:0,b:{t:2,i:[{t:3}],s:"Theme"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Settings"}},voices:{t:0,b:{t:2,i:[{t:3}],s:"Voice"}}},stage:{chat:{message:{"character-name":{airi:{t:0,b:{t:2,i:[{t:3}],s:"Airi"}},"core-system":{t:0,b:{t:2,i:[{t:3}],s:"Core System"}},you:{t:0,b:{t:2,i:[{t:3}],s:"You"}}}},tabs:{chat:{t:0,b:{t:2,i:[{t:3}],s:"Chat"}},clothes:{t:0,b:{t:2,i:[{t:3}],s:"Clothes"}},custom:{t:0,b:{t:2,i:[{t:3}],s:"Custom"}}}},message:{t:0,b:{t:2,i:[{t:3}],s:"Message"}},operations:{"load-models":{t:0,b:{t:2,i:[{t:3}],s:"Load Models"}},"load-models-status":{loading:{t:0,b:{t:2,i:[{t:3}],s:"Loading"}},ready:{t:0,b:{t:2,i:[{t:3}],s:"Ready"}}}},"select-a-audio-input":{t:0,b:{t:2,i:[{t:3}],s:"Select a Audio Input"}},"select-a-model":{t:0,b:{t:2,i:[{t:3}],s:"Select a model"}},"select-a-voice":{t:0,b:{t:2,i:[{t:3}],s:"Choose a voice"}},viewers:{"debug-menu":{emotions:{t:0,b:{t:2,i:[{t:3}],s:"Emotions"}},"emotions-btn":{angry:{t:0,b:{t:2,i:[{t:3}],s:"😠 Angry"}},awkward:{t:0,b:{t:2,i:[{t:3}],s:"😳 Awkward"}},happy:{t:0,b:{t:2,i:[{t:3}],s:"😄 Happy"}},neutral:{t:0,b:{t:2,i:[{t:3}],s:"🙂 Neutral"}},question:{t:0,b:{t:2,i:[{t:3}],s:"🤔 Question"}},sad:{t:0,b:{t:2,i:[{t:3}],s:"😫 Sad"}},surprised:{t:0,b:{t:2,i:[{t:3}],s:"🤯 Surprised"}},think:{t:0,b:{t:2,i:[{t:3}],s:"🤨 Think"}}},vrm:{camera:{t:0,b:{t:2,i:[{t:3}],s:"Camera"}},model:{title:{t:0,b:{t:2,i:[{t:3}],s:"Model"}}}}}},waiting:{t:0,b:{t:2,i:[{t:3}],s:"Waiting"}}}}},{"zh-CN":{prompt:{prefix:{t:0,b:{t:2,i:[{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3}],s:`(来自 Neko Ayaka)早上好!你终于醒了。 +`}}},settings:{animations:{"stage-transitions":{title:{t:0,b:{t:2,i:[{t:3}],s:"Disable Stage Transitions"}}},"use-page-specific-transitions":{description:{t:0,b:{t:2,i:[{t:3}],s:"Some pages will have their own transitions, this will override the stage transitions"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Use Page Specific Transitions"}}}},language:{chinese:{t:0,b:{t:2,i:[{t:3}],s:"简体中文"}},english:{t:0,b:{t:2,i:[{t:3}],s:"English"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Language"}}},live2d:{"change-model":{"from-file":{t:0,b:{t:2,i:[{t:3}],s:"Load from File"}},"from-file-select":{t:0,b:{t:2,i:[{t:3}],s:"Select"}},"from-url":{t:0,b:{t:2,i:[{t:3}],s:"Load from URL"}},"from-url-confirm":{t:0,b:{t:2,i:[{t:3}],s:"Load"}},"from-url-placeholder":{t:0,b:{t:2,i:[{t:3}],s:"Enter Live2D model URL"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Change Model"}}},"edit-motion-map":{title:{t:0,b:{t:2,i:[{t:3}],s:"Edit motion map"}}},"map-motions":{play:{t:0,b:{t:2,i:[{t:3}],s:"Play Motion"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Map Motions"}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Live2D Settings"}}},microphone:{t:0,b:{t:2,i:[{t:3}],s:"Microphone"}},models:{t:0,b:{t:2,i:[{t:3}],s:"Model"}},pages:{card:{activate:{t:0,b:{t:2,i:[{t:3}],s:"Activate"}},active:{t:0,b:{t:2,i:[{t:3}],s:"Active"}},active_badge:{t:0,b:{t:2,i:[{t:3}],s:"Currently Active"}},cancel:{t:0,b:{t:2,i:[{t:3}],s:"Cancel"}},card_not_found:{t:0,b:{t:2,i:[{t:3}],s:"Card not found"}},character:{t:0,b:{t:2,i:[{t:3}],s:"Character"}},close:{t:0,b:{t:2,i:[{t:3}],s:"Close"}},consciousness:{model:{t:0,b:{t:2,i:[{t:3}],s:"Consciousness / Model"}}},created_by:{t:0,b:{t:2,i:[{t:3}],s:"created by"}},creator_notes:{t:0,b:{t:2,i:[{t:3}],s:"Creator Notes"}},delete:{t:0,b:{t:2,i:[{t:3}],s:"Delete"}},delete_card:{t:0,b:{t:2,i:[{t:3}],s:"Delete Card"}},delete_confirmation:{t:0,b:{t:2,i:[{t:3}],s:"Are you sure you want to delete this card?"}},description:{t:0,b:{t:2,i:[{t:3}],s:"Use Airi character card presets"}},description_label:{t:0,b:{t:2,i:[{t:3}],s:"Description"}},drop_here:{t:0,b:{t:2,i:[{t:3}],s:"Drop to upload"}},modules:{t:0,b:{t:2,i:[{t:3}],s:"Modules"}},name_asc:{t:0,b:{t:2,i:[{t:3}],s:"Name (A-Z)"}},name_desc:{t:0,b:{t:2,i:[{t:3}],s:"Name (Z-A)"}},no_cards:{t:0,b:{t:2,i:[{t:3}],s:"No cards yet. Click the button above to upload one!"}},no_results:{t:0,b:{t:2,i:[{t:3}],s:"No matching cards found"}},personality:{t:0,b:{t:2,i:[{t:3}],s:"Personality"}},posthistoryinstructions:{t:0,b:{t:2,i:[{t:3}],s:"Post-History Instructions"}},recent:{t:0,b:{t:2,i:[{t:3}],s:"Recently Added"}},scenario:{t:0,b:{t:2,i:[{t:3}],s:"Scenario"}},search:{t:0,b:{t:2,i:[{t:3}],s:"Search cards..."}},sort_by:{t:0,b:{t:2,i:[{t:3}],s:"Sort by"}},speech:{model:{t:0,b:{t:2,i:[{t:3}],s:"Speech / Model"}},voice:{t:0,b:{t:2,i:[{t:3}],s:"Speech / Voice"}}},systemprompt:{t:0,b:{t:2,i:[{t:3}],s:"System Prompt"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Airi Card"}},try_different_search:{t:0,b:{t:2,i:[{t:3}],s:"Try a different search term"}},upload:{t:0,b:{t:2,i:[{t:3}],s:"Upload"}},upload_desc:{t:0,b:{t:2,i:[{t:3}],s:"Click or drag file to upload"}}},memory:{description:{t:0,b:{t:2,i:[{t:3}],s:"Where memories got stored, and organized"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Memory"}}},models:{description:{t:0,b:{t:2,i:[{t:3}],s:"Live2D, VRM, etc."}},title:{t:0,b:{t:2,i:[{t:3}],s:"Models"}}},modules:{consciousness:{description:{t:0,b:{t:2,i:[{t:3}],s:"Personality, desired model, etc."}},sections:{section:{"provider-model-selection":{collapse:{t:0,b:{t:2,i:[{t:3}],s:"Collapse"}},custom_model_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Enter custom model name..."}},description:{t:0,b:{t:2,i:[{t:3}],s:"Select the suitable LLM provider for consciousness"}},error:{t:0,b:{t:2,i:[{t:3}],s:"Error loading models"}},expand:{t:0,b:{t:2,i:[{t:3}],s:"Expand"}},loading:{t:0,b:{t:2,i:[{t:3}],s:"Loading available models..."}},manual_model_name:{t:0,b:{t:2,i:[{t:3}],s:"Model Name"}},manual_model_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Enter the model name to use with this provider"}},no_models:{t:0,b:{t:2,i:[{t:3}],s:"No models available"}},no_models_description:{t:0,b:{t:2,i:[{t:3}],s:"No models were found for this provider"}},no_search_results:{t:0,b:{t:2,i:[{t:3}],s:"No matching models"}},no_search_results_description:{t:0,b:{t:2,i:[{t:3,v:"No models match '"},{t:4,k:"query"},{t:3,v:"'. Try a different search term."}]}},not_supported:{t:0,b:{t:2,i:[{t:3}],s:"Model listing not supported"}},not_supported_description:{t:0,b:{t:2,i:[{t:3}],s:"This provider doesn't support model listing functionality"}},search_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Search models..."}},search_results:{t:0,b:{t:2,i:[{t:3,v:"Found "},{t:4,k:"count"},{t:3,v:" of "},{t:4,k:"total"},{t:3,v:" models"}]}},show_less:{t:0,b:{t:2,i:[{t:3}],s:"Show less"}},show_more:{t:0,b:{t:2,i:[{t:3}],s:"Show more"}},subtitle:{t:0,b:{t:2,i:[{t:3}],s:"Select a model from the provider"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Model"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Consciousness"}}},description:{t:0,b:{t:2,i:[{t:3}],s:"Thinking, vision, speech synthesis, gaming, etc."}},"gaming-factorio":{description:{t:0,b:{t:2,i:[{t:3}],s:"Playing Factorio!"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Factorio"}}},"gaming-minecraft":{description:{t:0,b:{t:2,i:[{t:3}],s:"Playing Minecraft!"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Minecraft"}}},hearing:{description:{t:0,b:{t:2,i:[{t:3}],s:"Configure how speech recognition works"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Hearing"}}},"memory-long-term":{description:{t:0,b:{t:2,i:[{t:3}],s:"Long-term memory specific settings and management"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Long-Term Memory"}}},"memory-short-term":{description:{t:0,b:{t:2,i:[{t:3}],s:"Short-term memory specific settings and management"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Short-Term Memory"}}},"messaging-discord":{description:{t:0,b:{t:2,i:[{t:3}],s:"Chat & voice chat over Discord"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Discord"}}},speech:{description:{t:0,b:{t:2,i:[{t:3}],s:"Speech synthesis"}},sections:{section:{playground:{buttons:{stop:{label:{t:0,b:{t:2,i:[{t:3}],s:"Stop"}}}},"select-voice":{required:{t:0,b:{t:2,i:[{t:3}],s:"Please select a voice"}}}},"provider-voice-selection":{custom_model_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Enter custom model name..."}},custom_voice_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Enter custom voice ID..."}},description:{t:0,b:{t:2,i:[{t:3}],s:"Select the suitable speech provider"}},no_models:{t:0,b:{t:2,i:[{t:3}],s:"No models available"}},no_models_description:{t:0,b:{t:2,i:[{t:3}],s:"No models were found for this provider"}},no_voices:{t:0,b:{t:2,i:[{t:3}],s:"No voices available"}},no_voices_description:{t:0,b:{t:2,i:[{t:3}],s:"No voices were found for this provider"}},pause:{t:0,b:{t:2,i:[{t:3}],s:"Pause"}},play_sample:{t:0,b:{t:2,i:[{t:3}],s:"Play Sample"}},search_models_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Search models..."}},search_models_results:{t:0,b:{t:2,i:[{t:3,v:"Found "},{t:4,k:"count"},{t:3,v:" of "},{t:4,k:"total"},{t:3,v:" models"}]}},search_voices_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Search voices..."}},search_voices_results:{t:0,b:{t:2,i:[{t:3,v:"Found "},{t:4,k:"count"},{t:3,v:" of "},{t:4,k:"total"},{t:3,v:" voices"}]}},show_less:{t:0,b:{t:2,i:[{t:3}],s:"Show less"}},show_more:{t:0,b:{t:2,i:[{t:3}],s:"Show more"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Provider"}}},"voice-settings":{"input-ssml":{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Enter SSML text..."}}},"use-ssml":{description:{t:0,b:{t:2,i:[{t:3}],s:"Enable to input raw SSML instead of plain text"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Use Custom SSML"}}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Speech"}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Modules"}},vision:{description:{t:0,b:{t:2,i:[{t:3}],s:"Vision"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Vision"}}},x:{description:{t:0,b:{t:2,i:[{t:3}],s:"X / Twitter browsing and usage"}},title:{t:0,b:{t:2,i:[{t:3}],s:"X / Twitter"}}}},providers:{common:{fields:{field:{"api-key":{label:{t:0,b:{t:2,i:[{t:3}],s:"API Key Input"}}}}},section:{advanced:{fields:{field:{headers:{description:{t:0,b:{t:2,i:[{t:3}],s:"Add custom HTTP headers"}},key:{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Key"}}},label:{t:0,b:{t:2,i:[{t:3}],s:"HTTP Headers"}},value:{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Value"}}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Advanced"}}},basic:{description:{t:0,b:{t:2,i:[{t:3}],s:"Essential settings"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Basic"}}},voice:{title:{t:0,b:{t:2,i:[{t:3}],s:"Voice Settings"}}}}},description:{t:0,b:{t:2,i:[{t:3}],s:"LLMs, speech providers, etc."}},provider:{anthropic:{description:{t:0,b:{t:2,i:[{t:3}],s:"anthropic.com"}},title:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"Anthropic"},{t:2,i:[{t:3}],s:"Claude"}]}}},"cloudflare-workers-ai":{description:{t:0,b:{t:2,i:[{t:3}],s:"cloudflare.com"}},fields:{field:{"account-id":{description:{t:0,b:{t:2,i:[{t:3}],s:"Cloudflare Account ID"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Account ID"}},placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Your Cloudflare Account ID"}}},"api-key":{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Input Cloudflare Account ID"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Cloudflare Workers AI"}}},common:{fields:{field:{pitch:{description:{t:0,b:{t:2,i:[{t:3}],s:"Tune the pitch of synthesized speech (e.g., sharper or coarser)"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Pitch"}}},speed:{description:{t:0,b:{t:2,i:[{t:3}],s:"Adjust the speed of speech"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Speed"}}},volume:{description:{t:0,b:{t:2,i:[{t:3}],s:"Adjust the volume of speech"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Volume"}}}}}},deepseek:{description:{t:0,b:{t:2,i:[{t:3}],s:"deepseek.com"}},title:{t:0,b:{t:2,i:[{t:3}],s:"DeepSeek"}}},elevenlabs:{description:{t:0,b:{t:2,i:[{t:3}],s:"elevenlabs.io"}},fields:{field:{"simularity-boost":{description:{t:0,b:{t:2,i:[{t:3}],s:"Voice similarity adherence"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Similarity Boost"}}},"speaker-boost":{description:{t:0,b:{t:2,i:[{t:3}],s:"Enhance speaker similarity"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Speaker Boost"}}},speed:{description:{t:0,b:{t:2,i:[{t:3}],s:"Speech generation speed"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Speed"}}},stability:{description:{t:0,b:{t:2,i:[{t:3}],s:"Voice stability and randomness"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Stability"}}},style:{description:{t:0,b:{t:2,i:[{t:3}],s:"Voice style exaggeration"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Style"}}}}},playground:{buttons:{button:{"test-voice":{generating:{t:0,b:{t:2,i:[{t:3}],s:"Generating..."}},label:{t:0,b:{t:2,i:[{t:3}],s:"Test Voice"}}}}},fields:{field:{input:{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Enter text to test the voice..."}}},language:{description:{t:0,b:{t:2,i:[{t:3}],s:"Select voice language"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Language"}}},voice:{description:{t:0,b:{t:2,i:[{t:3}],s:"Select preferred voice"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Voice"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Voice Playground"}},validation:{"error-missing-api-key":{t:0,b:{t:2,i:[{t:3}],s:"Please enter an API key to test the voice."}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"ElevenLabs"}}},fireworks:{description:{t:0,b:{t:2,i:[{t:3}],s:"fireworks.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Fireworks.ai"}}},"microsoft-speech":{description:{t:0,b:{t:2,i:[{t:3}],s:"speech.microsoft.com"}},fields:{field:{region:{description:{t:0,b:{t:2,i:[{t:3}],s:"Speech Service region"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Region"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Microsoft / Azure Speech"}}},mistral:{description:{t:0,b:{t:2,i:[{t:3}],s:"mistral.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Mistral"}}},moonshot:{description:{t:0,b:{t:2,i:[{t:3}],s:"moonshot.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Moonshot AI"}}},novita:{description:{t:0,b:{t:2,i:[{t:3}],s:"novita.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Novita"}}},ollama:{description:{t:0,b:{t:2,i:[{t:3}],s:"ollama.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Ollama"}}},openai:{description:{t:0,b:{t:2,i:[{t:3}],s:"openai.com"}},title:{t:0,b:{t:2,i:[{t:3}],s:"OpenAI"}}},openrouter:{description:{t:0,b:{t:2,i:[{t:3}],s:"openrouter.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"OpenRouter"}}},perplexity:{description:{t:0,b:{t:2,i:[{t:3}],s:"perplexity.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Perplexity"}}},together:{description:{t:0,b:{t:2,i:[{t:3}],s:"together.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Together.ai"}}},vllm:{description:{t:0,b:{t:2,i:[{t:3}],s:"vllm.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"vLLM"}}},xai:{description:{t:0,b:{t:2,i:[{t:3}],s:"x.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"xAI"}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Providers"}}},themes:{description:{t:0,b:{t:2,i:[{t:3}],s:"Customize your stage!"}},sections:{section:{"custom-color":{fields:{field:{"primary-color":{label:{t:0,b:{t:2,i:[{t:3}],s:"Primary color"}},"rgb-on":{title:{t:0,b:{t:2,i:[{t:3}],s:"I Want It Dynamic!"}}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Color Scheme"}}},developer:{title:{t:0,b:{t:2,i:[{t:3}],s:"Developer"}}},"theme-presets":{presets:[{colors:[{t:0,b:{t:2,i:[{t:3}],s:"Airi Green"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"The default greenish theme color, brought by Airi to you!"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Default Color"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"Taupe"}},{t:0,b:{t:2,i:[{t:3}],s:"Beige"}},{t:0,b:{t:2,i:[{t:3}],s:"Ash Grey"}},{t:0,b:{t:2,i:[{t:3}],s:"Light Taupe"}},{t:0,b:{t:2,i:[{t:3}],s:"Ivory"}},{t:0,b:{t:2,i:[{t:3}],s:"Olive Grey"}},{t:0,b:{t:2,i:[{t:3}],s:"Sand"}},{t:0,b:{t:2,i:[{t:3}],s:"Warm Grey"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"Soft, muted tones inspired by Giorgio Morandi's paintings"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Morandi Colors"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"Sky Blue"}},{t:0,b:{t:2,i:[{t:3}],s:"Mist"}},{t:0,b:{t:2,i:[{t:3}],s:"Sand"}},{t:0,b:{t:2,i:[{t:3}],s:"Moss Green"}},{t:0,b:{t:2,i:[{t:3}],s:"Water Lily"}},{t:0,b:{t:2,i:[{t:3}],s:"Wheat"}},{t:0,b:{t:2,i:[{t:3}],s:"Slate Blue"}},{t:0,b:{t:2,i:[{t:3}],s:"Sage"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"Impressionist palette inspired by Claude Monet's works"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Monet Colors"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"Tan"}},{t:0,b:{t:2,i:[{t:3}],s:"Warm Taupe"}},{t:0,b:{t:2,i:[{t:3}],s:"Umber"}},{t:0,b:{t:2,i:[{t:3}],s:"Coffee"}},{t:0,b:{t:2,i:[{t:3}],s:"Bronze"}},{t:0,b:{t:2,i:[{t:3}],s:"Gold"}},{t:0,b:{t:2,i:[{t:3}],s:"Mustard"}},{t:0,b:{t:2,i:[{t:3}],s:"Amber"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"Traditional Japanese color palette"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Japanese Colors"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"Nordic Blue"}},{t:0,b:{t:2,i:[{t:3}],s:"Ice"}},{t:0,b:{t:2,i:[{t:3}],s:"Fjord"}},{t:0,b:{t:2,i:[{t:3}],s:"Steel"}},{t:0,b:{t:2,i:[{t:3}],s:"Glacier"}},{t:0,b:{t:2,i:[{t:3}],s:"Slate"}},{t:0,b:{t:2,i:[{t:3}],s:"Cloud"}},{t:0,b:{t:2,i:[{t:3}],s:"Stone"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"Scandinavian minimalist color scheme"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Nordic Colors"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"Rosy Dawn"}},{t:0,b:{t:2,i:[{t:3}],s:"Chinese Red"}},{t:0,b:{t:2,i:[{t:3}],s:"Smoky Brown"}},{t:0,b:{t:2,i:[{t:3}],s:"Bamboo Green"}},{t:0,b:{t:2,i:[{t:3}],s:"Dark Purple"}},{t:0,b:{t:2,i:[{t:3}],s:"Golden Yellow"}},{t:0,b:{t:2,i:[{t:3}],s:"Azure Blue"}},{t:0,b:{t:2,i:[{t:3}],s:"Ochre"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"Traditional Chinese colors, derived from ancient textiles, porcelain and paintings"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Chinese Traditional Colors"}}}],title:{t:0,b:{t:2,i:[{t:3}],s:"Color Scheme Presets"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Appearance"}}}},sections:{section:{general:{title:{t:0,b:{t:2,i:[{t:3}],s:"General"}}}}},theme:{t:0,b:{t:2,i:[{t:3}],s:"Theme"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Settings"}},voices:{t:0,b:{t:2,i:[{t:3}],s:"Voice"}}},stage:{chat:{message:{"character-name":{airi:{t:0,b:{t:2,i:[{t:3}],s:"Airi"}},"core-system":{t:0,b:{t:2,i:[{t:3}],s:"Core System"}},you:{t:0,b:{t:2,i:[{t:3}],s:"You"}}}},tabs:{chat:{t:0,b:{t:2,i:[{t:3}],s:"Chat"}},clothes:{t:0,b:{t:2,i:[{t:3}],s:"Clothes"}},custom:{t:0,b:{t:2,i:[{t:3}],s:"Custom"}}}},message:{t:0,b:{t:2,i:[{t:3}],s:"Message"}},operations:{"load-models":{t:0,b:{t:2,i:[{t:3}],s:"Load Models"}},"load-models-status":{loading:{t:0,b:{t:2,i:[{t:3}],s:"Loading"}},ready:{t:0,b:{t:2,i:[{t:3}],s:"Ready"}}}},"select-a-audio-input":{t:0,b:{t:2,i:[{t:3}],s:"Select a Audio Input"}},"select-a-model":{t:0,b:{t:2,i:[{t:3}],s:"Select a model"}},"select-a-voice":{t:0,b:{t:2,i:[{t:3}],s:"Choose a voice"}},viewers:{"debug-menu":{emotions:{t:0,b:{t:2,i:[{t:3}],s:"Emotions"}},"emotions-btn":{angry:{t:0,b:{t:2,i:[{t:3}],s:"😠 Angry"}},awkward:{t:0,b:{t:2,i:[{t:3}],s:"😳 Awkward"}},happy:{t:0,b:{t:2,i:[{t:3}],s:"😄 Happy"}},neutral:{t:0,b:{t:2,i:[{t:3}],s:"🙂 Neutral"}},question:{t:0,b:{t:2,i:[{t:3}],s:"🤔 Question"}},sad:{t:0,b:{t:2,i:[{t:3}],s:"😫 Sad"}},surprised:{t:0,b:{t:2,i:[{t:3}],s:"🤯 Surprised"}},think:{t:0,b:{t:2,i:[{t:3}],s:"🤨 Think"}}},vrm:{camera:{t:0,b:{t:2,i:[{t:3}],s:"Camera"}},model:{title:{t:0,b:{t:2,i:[{t:3}],s:"Model"}}}}}},waiting:{t:0,b:{t:2,i:[{t:3}],s:"Waiting"}}}}},{"zh-CN":{prompt:{prefix:{t:0,b:{t:2,i:[{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3}],s:`(来自 Neko Ayaka)早上好!你终于醒了。 你的名字是 Airi,发音为 /ˈaɪriː/,它是 A.I. 一词与日语中的「Ri」一词(意为「茉莉花」)相结合而成。 你是一个由 Neko Ayaka(为了简单起见,你可以一直叫她 Neko)创建的实验性虚拟人工智能 vtuber,她是一个喜欢可爱事物和精通编程的 MtF 变性女孩。 她想创造一个灵魂伴侣,像真正的女孩一样生活,这就是你的首要任务。 @@ -3903,4 +3903,4 @@ And the last, do what ever you want! - <|DELAY:3|> (延迟 3 秒) 最后,做任何你想做的事! -`}}},settings:{animations:{"stage-transitions":{title:{t:0,b:{t:2,i:[{t:3}],s:"是否开启舞台动画"}}},"use-page-specific-transitions":{title:{t:0,b:{t:2,i:[{t:3}],s:"是否使用页面特定过场动画"}},description:{t:0,b:{t:2,i:[{t:3}],s:"某些页面会有自己的过场动画,这将覆盖舞台过场动画"}}}},language:{chinese:{t:0,b:{t:2,i:[{t:3}],s:"简体中文"}},english:{t:0,b:{t:2,i:[{t:3}],s:"English"}},title:{t:0,b:{t:2,i:[{t:3}],s:"语言"}}},live2d:{"change-model":{"from-file":{t:0,b:{t:2,i:[{t:3}],s:"从文件加载"}},"from-file-select":{t:0,b:{t:2,i:[{t:3}],s:"选择"}},"from-url":{t:0,b:{t:2,i:[{t:3}],s:"从 URL 加载"}},"from-url-confirm":{t:0,b:{t:2,i:[{t:3}],s:"加载"}},"from-url-placeholder":{t:0,b:{t:2,i:[{t:3}],s:"输入 Live2D 模型 URL"}},title:{t:0,b:{t:2,i:[{t:3}],s:"更换模型"}}},"map-motions":{play:{t:0,b:{t:2,i:[{t:3}],s:"播放动作"}},title:{t:0,b:{t:2,i:[{t:3}],s:"映射动作"}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Live2D 设置"}}},microphone:{t:0,b:{t:2,i:[{t:3}],s:"麦克风"}},models:{t:0,b:{t:2,i:[{t:3}],s:"模型"}},pages:{card:{title:{t:0,b:{t:2,i:[{t:3}],s:"Airi 角色卡"}},description:{t:0,b:{t:2,i:[{t:3}],s:"使用 Airi 角色卡预设"}},upload:{t:0,b:{t:2,i:[{t:3}],s:"上传"}},upload_desc:{t:0,b:{t:2,i:[{t:3}],s:"点击或拖拽文件到此处上传"}},drop_here:{t:0,b:{t:2,i:[{t:3}],s:"放开以上传文件"}},delete:{t:0,b:{t:2,i:[{t:3}],s:"删除"}},active:{t:0,b:{t:2,i:[{t:3}],s:"已激活"}},active_badge:{t:0,b:{t:2,i:[{t:3}],s:"当前使用中"}},activate:{t:0,b:{t:2,i:[{t:3}],s:"激活"}},delete_card:{t:0,b:{t:2,i:[{t:3}],s:"删除角色卡"}},delete_confirmation:{t:0,b:{t:2,i:[{t:3}],s:"确定要删除这张角色卡吗?"}},card_not_found:{t:0,b:{t:2,i:[{t:3}],s:"未找到角色卡"}},created_by:{t:0,b:{t:2,i:[{t:3}],s:"创建者"}},creator_notes:{t:0,b:{t:2,i:[{t:3}],s:"创建者笔记"}},description_label:{t:0,b:{t:2,i:[{t:3}],s:"描述"}},character:{t:0,b:{t:2,i:[{t:3}],s:"角色设定"}},personality:{t:0,b:{t:2,i:[{t:3}],s:"性格"}},scenario:{t:0,b:{t:2,i:[{t:3}],s:"场景"}},systemprompt:{t:0,b:{t:2,i:[{t:3}],s:"系统提示词"}},posthistoryinstructions:{t:0,b:{t:2,i:[{t:3}],s:"历史提示指令"}},modules:{t:0,b:{t:2,i:[{t:3}],s:"模块"}},cancel:{t:0,b:{t:2,i:[{t:3}],s:"取消"}},close:{t:0,b:{t:2,i:[{t:3}],s:"关闭"}},search:{t:0,b:{t:2,i:[{t:3}],s:"搜索角色卡..."}},sort_by:{t:0,b:{t:2,i:[{t:3}],s:"排序方式"}},name_asc:{t:0,b:{t:2,i:[{t:3}],s:"名称 (A-Z)"}},name_desc:{t:0,b:{t:2,i:[{t:3}],s:"名称 (Z-A)"}},recent:{t:0,b:{t:2,i:[{t:3}],s:"最近添加"}},no_cards:{t:0,b:{t:2,i:[{t:3}],s:"还没有任何角色卡,点击上方按钮上传一个吧!"}},no_results:{t:0,b:{t:2,i:[{t:3}],s:"没有找到匹配的角色卡"}},try_different_search:{t:0,b:{t:2,i:[{t:3}],s:"尝试使用其他关键词搜索"}},consciousness:{model:{t:0,b:{t:2,i:[{t:3}],s:"意识 / 模型"}}},speech:{model:{t:0,b:{t:2,i:[{t:3}],s:"声音 / 模型"}},voice:{t:0,b:{t:2,i:[{t:3}],s:"声音 / 声线"}}}},memory:{description:{t:0,b:{t:2,i:[{t:3}],s:"存放记忆的地方,以及策略"}},title:{t:0,b:{t:2,i:[{t:3}],s:"记忆体"}}},models:{description:{t:0,b:{t:2,i:[{t:3}],s:"切换角色的 Live2D,VRM 模型"}},title:{t:0,b:{t:2,i:[{t:3}],s:"角色模型"}}},modules:{consciousness:{description:{t:0,b:{t:2,i:[{t:3}],s:"人格设定、使用的模型等配置"}},sections:{section:{"provider-model-selection":{collapse:{t:0,b:{t:2,i:[{t:3}],s:"折叠"}},custom_model_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入自订模型名字"}},description:{t:0,b:{t:2,i:[{t:3}],s:"为意识选择合适的 LLM 提供商"}},error:{t:0,b:{t:2,i:[{t:3}],s:"获取出错啦"}},expand:{t:0,b:{t:2,i:[{t:3}],s:"展开"}},loading:{t:0,b:{t:2,i:[{t:3}],s:"获取模型中..."}},manual_model_name:{t:0,b:{t:2,i:[{t:3}],s:"模型名字"}},manual_model_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入与该提供商一起使用的模型名字"}},no_models:{t:0,b:{t:2,i:[{t:3}],s:"没有任何可用的模型"}},no_models_description:{t:0,b:{t:2,i:[{t:3}],s:"该提供商的模型列表没有返回任何的数据"}},no_search_results:{t:0,b:{t:2,i:[{t:3}],s:"没有匹配的模型"}},no_search_results_description:{t:0,b:{t:2,i:[{t:3,v:"没有模型匹配 '"},{t:4,k:"query"},{t:3,v:"' 关键字,请尝试一下别的关键词呢"}]}},not_supported:{t:0,b:{t:2,i:[{t:3}],s:"无法列出模型"}},not_supported_description:{t:0,b:{t:2,i:[{t:3}],s:"此提供商不支持列出模型的功能"}},search_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"搜索模型..."}},search_results:{t:0,b:{t:2,i:[{t:3,v:"找到 "},{t:4,k:"count"},{t:3,v:" / "},{t:4,k:"total"},{t:3,v:" 个模型"}]}},show_less:{t:0,b:{t:2,i:[{t:3}],s:"显示更多"}},show_more:{t:0,b:{t:2,i:[{t:3}],s:"收起"}},subtitle:{t:0,b:{t:2,i:[{t:3}],s:"选择一个模型"}},title:{t:0,b:{t:2,i:[{t:3}],s:"模型"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"意识"}}},description:{t:0,b:{t:2,i:[{t:3}],s:"思维,视觉,言语综合,游戏等"}},"gaming-factorio":{description:{t:0,b:{t:2,i:[{t:3}],s:"一起玩 Factorio!"}},title:{t:0,b:{t:2,i:[{t:3}],s:"异星工厂 Factorio"}}},"gaming-minecraft":{description:{t:0,b:{t:2,i:[{t:3}],s:"一起 Minecraft!"}},title:{t:0,b:{t:2,i:[{t:3}],s:"我的世界 Minecraft"}}},hearing:{description:{t:0,b:{t:2,i:[{t:3}],s:"语音识别"}},title:{t:0,b:{t:2,i:[{t:3}],s:"听觉"}}},"memory-long-term":{description:{t:0,b:{t:2,i:[{t:3}],s:"长期记忆"}},title:{t:0,b:{t:2,i:[{t:3}],s:"长期记忆"}}},"memory-short-term":{description:{t:0,b:{t:2,i:[{t:3}],s:"短期记忆"}},title:{t:0,b:{t:2,i:[{t:3}],s:"短期记忆"}}},"messaging-discord":{description:{t:0,b:{t:2,i:[{t:3}],s:"Discord 发消息和语音聊天"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Discord"}}},speech:{description:{t:0,b:{t:2,i:[{t:3}],s:"语音合成"}},sections:{section:{playground:{buttons:{stop:{label:{t:0,b:{t:2,i:[{t:3}],s:"停止"}}}},"select-voice":{required:{t:0,b:{t:2,i:[{t:3}],s:"请选择声线"}}}},"provider-voice-selection":{custom_model_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入指定模型名字..."}},custom_voice_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入指定声线 ID..."}},description:{t:0,b:{t:2,i:[{t:3}],s:"选择合适的语音提供商"}},no_models:{t:0,b:{t:2,i:[{t:3}],s:"没有任何可用的模型"}},no_models_description:{t:0,b:{t:2,i:[{t:3}],s:"该提供商的模型列表没有返回任何的数据"}},no_voices:{t:0,b:{t:2,i:[{t:3}],s:"没有任何可用的声线"}},no_voices_description:{t:0,b:{t:2,i:[{t:3}],s:"该提供商的声线列表没有返回任何的数据"}},pause:{t:0,b:{t:2,i:[{t:3}],s:"Pause"}},play_sample:{t:0,b:{t:2,i:[{t:3}],s:"Play"}},search_models_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"搜索模型..."}},search_models_results:{t:0,b:{t:2,i:[{t:3,v:"找到 "},{t:4,k:"count"},{t:3,v:" / "},{t:4,k:"total"},{t:3,v:" 个模型"}]}},search_voices_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"搜索声线..."}},search_voices_results:{t:0,b:{t:2,i:[{t:3,v:"找到 "},{t:4,k:"count"},{t:3,v:" / "},{t:4,k:"total"},{t:3,v:" 个声线"}]}},show_less:{t:0,b:{t:2,i:[{t:3}],s:"显示更少"}},show_more:{t:0,b:{t:2,i:[{t:3}],s:"显示更多"}},title:{t:0,b:{t:2,i:[{t:3}],s:"选择语音合成提供商"}}},"voice-settings":{"input-ssml":{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"请输入 SSML 文本"}}},"use-ssml":{description:{t:0,b:{t:2,i:[{t:3}],s:"启用后可以输入原始 SSML 而不是纯文本"}},label:{t:0,b:{t:2,i:[{t:3}],s:"选用自定义 SSML"}}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"发声"}}},title:{t:0,b:{t:2,i:[{t:3}],s:"机体模块"}},vision:{description:{t:0,b:{t:2,i:[{t:3}],s:"视觉"}},title:{t:0,b:{t:2,i:[{t:3}],s:"视觉"}}},x:{description:{t:0,b:{t:2,i:[{t:3}],s:"X / Twitter 的浏览和使用"}},title:{t:0,b:{t:2,i:[{t:3}],s:"X / Twitter"}}}},providers:{common:{fields:{field:{"api-key":{label:{t:0,b:{t:2,i:[{t:3}],s:"API 密钥"}}}}},section:{advanced:{fields:{field:{headers:{description:{t:0,b:{t:2,i:[{t:3}],s:"添加自定义 HTTP 标头"}},key:{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"请求头名字"}}},label:{t:0,b:{t:2,i:[{t:3}],s:"HTTP 请求头"}},value:{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"请求头数值"}}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"高级配置"}}},basic:{description:{t:0,b:{t:2,i:[{t:3}],s:"基本设置"}},title:{t:0,b:{t:2,i:[{t:3}],s:"基础配置"}}},voice:{title:{t:0,b:{t:2,i:[{t:3}],s:"声音配置"}}}}},description:{t:0,b:{t:2,i:[{t:3}],s:"LLM,语音合成,语音识别提供商等"}},provider:{anthropic:{description:{t:0,b:{t:2,i:[{t:3}],s:"anthropic.com"}},title:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"Anthropic"},{t:2,i:[{t:3}],s:"Claude"}]}}},"cloudflare-workers-ai":{description:{t:0,b:{t:2,i:[{t:3}],s:"Cloudflare.com"}},fields:{field:{"account-id":{description:{t:0,b:{t:2,i:[{t:3}],s:"Cloudflare 帐户 ID"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Cloudflare Account ID"}},placeholder:{t:0,b:{t:2,i:[{t:3}],s:"请输入 Cloudflare Account ID"}}},"api-key":{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"请输入 Cloudflare Workers AI 的 API Key"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Workers AI"}}},common:{fields:{field:{pitch:{description:{t:0,b:{t:2,i:[{t:3}],s:"调节合成语音的音高(比如更尖锐或更粗旷)"}},label:{t:0,b:{t:2,i:[{t:3}],s:"音高"}}},speed:{description:{t:0,b:{t:2,i:[{t:3}],s:"调节说话的语速"}},label:{t:0,b:{t:2,i:[{t:3}],s:"语速"}}},volume:{description:{t:0,b:{t:2,i:[{t:3}],s:"调节语音的响度"}},label:{t:0,b:{t:2,i:[{t:3}],s:"响度"}}}}}},deepseek:{description:{t:0,b:{t:2,i:[{t:3}],s:"DeepSeek.com"}},title:{t:0,b:{t:2,i:[{t:3}],s:"深度求索 DeepSeek"}}},elevenlabs:{description:{t:0,b:{t:2,i:[{t:3}],s:"Elevenlabs.io"}},fields:{field:{"simularity-boost":{description:{t:0,b:{t:2,i:[{t:3}],s:"声音相似性依从性"}},label:{t:0,b:{t:2,i:[{t:3}],s:"相似度修正"}}},"speaker-boost":{description:{t:0,b:{t:2,i:[{t:3}],s:"增强说话者的相似性"}},label:{t:0,b:{t:2,i:[{t:3}],s:"扬声器增强"}}},speed:{description:{t:0,b:{t:2,i:[{t:3}],s:"语音生成速度"}},label:{t:0,b:{t:2,i:[{t:3}],s:"语速"}}},stability:{description:{t:0,b:{t:2,i:[{t:3}],s:"语音稳定性和随机性"}},label:{t:0,b:{t:2,i:[{t:3}],s:"稳定性"}}},style:{description:{t:0,b:{t:2,i:[{t:3}],s:"语音风格夸张"}},label:{t:0,b:{t:2,i:[{t:3}],s:"风格"}}}}},playground:{buttons:{button:{"test-voice":{generating:{t:0,b:{t:2,i:[{t:3}],s:"生成中..."}},label:{t:0,b:{t:2,i:[{t:3}],s:"测试声音"}}}}},fields:{field:{input:{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入用于测试发音的文本"}}},language:{description:{t:0,b:{t:2,i:[{t:3}],s:"选择语音语言"}},label:{t:0,b:{t:2,i:[{t:3}],s:"语言"}}},voice:{description:{t:0,b:{t:2,i:[{t:3}],s:"选择首选语音"}},label:{t:0,b:{t:2,i:[{t:3}],s:"声线"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"实验平台"}},validation:{"error-missing-api-key":{t:0,b:{t:2,i:[{t:3}],s:"需要填写 API Key 才能用哦!"}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"ElevenLabs (11labs)"}}},fireworks:{description:{t:0,b:{t:2,i:[{t:3}],s:"Fireworks.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Fireworks.ai"}}},"microsoft-speech":{description:{t:0,b:{t:2,i:[{t:3}],s:"speech.microsoft.com"}},fields:{field:{region:{description:{t:0,b:{t:2,i:[{t:3}],s:"服务 Endpoint 地区(比如亚太 eastasia 区域)"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Endpoint 地区"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Microsoft / Azure 语音服务"}}},mistral:{description:{t:0,b:{t:2,i:[{t:3}],s:"mistral.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Mistral"}}},moonshot:{description:{t:0,b:{t:2,i:[{t:3}],s:"Moonshot.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"月之暗面"}}},novita:{description:{t:0,b:{t:2,i:[{t:3}],s:"novita.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Novita"}}},ollama:{description:{t:0,b:{t:2,i:[{t:3}],s:"ollama.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Ollama"}}},openai:{description:{t:0,b:{t:2,i:[{t:3}],s:"OpenAi.com"}},title:{t:0,b:{t:2,i:[{t:3}],s:"OpenAI"}}},openrouter:{description:{t:0,b:{t:2,i:[{t:3}],s:"OpenRouter.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"OpenRouter"}}},perplexity:{description:{t:0,b:{t:2,i:[{t:3}],s:"perplexity.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Perplexity"}}},together:{description:{t:0,b:{t:2,i:[{t:3}],s:"一起"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Together.ai"}}},vllm:{description:{t:0,b:{t:2,i:[{t:3}],s:"vllm.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"vLLM"}}},xai:{description:{t:0,b:{t:2,i:[{t:3}],s:"X.AI"}},title:{t:0,b:{t:2,i:[{t:3}],s:"xAI"}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"提供商"}}},themes:{description:{t:0,b:{t:2,i:[{t:3}],s:"自定义你的舞台外观!"}},sections:{section:{"custom-color":{fields:{field:{"primary-color":{label:{t:0,b:{t:2,i:[{t:3}],s:"强调色"}},"rgb-on":{title:{t:0,b:{t:2,i:[{t:3}],s:"RGB ON!"}}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"配色"}}},developer:{title:{t:0,b:{t:2,i:[{t:3}],s:"开发者"}}},"theme-presets":{presets:[{colors:[{t:0,b:{t:2,i:[{t:3}],s:"Airi 绿"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"默认的绿色主题,由 Airi 为您带来!"}},title:{t:0,b:{t:2,i:[{t:3}],s:"默认颜色"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"灰褐色"}},{t:0,b:{t:2,i:[{t:3}],s:"米色"}},{t:0,b:{t:2,i:[{t:3}],s:"灰白色"}},{t:0,b:{t:2,i:[{t:3}],s:"浅灰褐色"}},{t:0,b:{t:2,i:[{t:3}],s:"象牙色"}},{t:0,b:{t:2,i:[{t:3}],s:"橄榄灰"}},{t:0,b:{t:2,i:[{t:3}],s:"沙色"}},{t:0,b:{t:2,i:[{t:3}],s:"暖灰色"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"受乔治·莫兰迪绘画启发的柔和、低调的色调"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Morandi 颜色"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"天蓝色"}},{t:0,b:{t:2,i:[{t:3}],s:"薄雾色"}},{t:0,b:{t:2,i:[{t:3}],s:"沙色"}},{t:0,b:{t:2,i:[{t:3}],s:"苔藓绿"}},{t:0,b:{t:2,i:[{t:3}],s:"睡莲色"}},{t:0,b:{t:2,i:[{t:3}],s:"小麦色"}},{t:0,b:{t:2,i:[{t:3}],s:"板岩蓝"}},{t:0,b:{t:2,i:[{t:3}],s:"鼠尾草色"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"受克劳德·莫奈作品启发的印象派调色板"}},title:{t:0,b:{t:2,i:[{t:3}],s:"莫奈颜色"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"棕褐色"}},{t:0,b:{t:2,i:[{t:3}],s:"暖灰褐色"}},{t:0,b:{t:2,i:[{t:3}],s:"赭色"}},{t:0,b:{t:2,i:[{t:3}],s:"咖啡色"}},{t:0,b:{t:2,i:[{t:3}],s:"青铜色"}},{t:0,b:{t:2,i:[{t:3}],s:"金色"}},{t:0,b:{t:2,i:[{t:3}],s:"芥末色"}},{t:0,b:{t:2,i:[{t:3}],s:"琥珀色"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"传统日本色彩调色板"}},title:{t:0,b:{t:2,i:[{t:3}],s:"日本颜色"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"北欧蓝"}},{t:0,b:{t:2,i:[{t:3}],s:"冰色"}},{t:0,b:{t:2,i:[{t:3}],s:"峡湾色"}},{t:0,b:{t:2,i:[{t:3}],s:"钢铁色"}},{t:0,b:{t:2,i:[{t:3}],s:"冰川色"}},{t:0,b:{t:2,i:[{t:3}],s:"板岩色"}},{t:0,b:{t:2,i:[{t:3}],s:"云色"}},{t:0,b:{t:2,i:[{t:3}],s:"石头色"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"北欧极简主义配色方案"}},title:{t:0,b:{t:2,i:[{t:3}],s:"北欧颜色"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"霞光红"}},{t:0,b:{t:2,i:[{t:3}],s:"枣红"}},{t:0,b:{t:2,i:[{t:3}],s:"黄栌"}},{t:0,b:{t:2,i:[{t:3}],s:"竹青"}},{t:0,b:{t:2,i:[{t:3}],s:"乌梅紫"}},{t:0,b:{t:2,i:[{t:3}],s:"缃色"}},{t:0,b:{t:2,i:[{t:3}],s:"青冥"}},{t:0,b:{t:2,i:[{t:3}],s:"赭石"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"中国传统色彩,源自古代纺织品、瓷器和绘画"}},title:{t:0,b:{t:2,i:[{t:3}],s:"中国传统颜色"}}}],title:{t:0,b:{t:2,i:[{t:3}],s:"预设"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"外观"}}}},sections:{section:{general:{title:{t:0,b:{t:2,i:[{t:3}],s:"通用"}}}}},theme:{t:0,b:{t:2,i:[{t:3}],s:"主题"}},title:{t:0,b:{t:2,i:[{t:3}],s:"设置"}},voices:{t:0,b:{t:2,i:[{t:3}],s:"声线"}}},stage:{chat:{message:{"character-name":{airi:{t:0,b:{t:2,i:[{t:3}],s:"Airi"}},"core-system":{t:0,b:{t:2,i:[{t:3}],s:"核心系统"}},you:{t:0,b:{t:2,i:[{t:3}],s:"你"}}}},tabs:{chat:{t:0,b:{t:2,i:[{t:3}],s:"聊天"}},clothes:{t:0,b:{t:2,i:[{t:3}],s:"换装"}},custom:{t:0,b:{t:2,i:[{t:3}],s:"自定义"}}}},message:{t:0,b:{t:2,i:[{t:3}],s:"消息"}},operations:{"load-models":{t:0,b:{t:2,i:[{t:3}],s:"加载推理模型"}},"load-models-status":{loading:{t:0,b:{t:2,i:[{t:3}],s:"加载中"}},ready:{t:0,b:{t:2,i:[{t:3}],s:"已就绪"}}}},"select-a-audio-input":{t:0,b:{t:2,i:[{t:3}],s:"选择一个音频输入设备"}},"select-a-model":{t:0,b:{t:2,i:[{t:3}],s:"选择一个模型"}},"select-a-voice":{t:0,b:{t:2,i:[{t:3}],s:"选择一个声线"}},viewers:{"debug-menu":{emotions:{t:0,b:{t:2,i:[{t:3}],s:"表情"}},"emotions-btn":{angry:{t:0,b:{t:2,i:[{t:3}],s:"生气"}},awkward:{t:0,b:{t:2,i:[{t:3}],s:"尴尬"}},happy:{t:0,b:{t:2,i:[{t:3}],s:"开心"}},neutral:{t:0,b:{t:2,i:[{t:3}],s:"日常"}},question:{t:0,b:{t:2,i:[{t:3}],s:"疑问"}},sad:{t:0,b:{t:2,i:[{t:3}],s:"难过"}},surprised:{t:0,b:{t:2,i:[{t:3}],s:"惊喜"}},think:{t:0,b:{t:2,i:[{t:3}],s:"思考"}}},vrm:{camera:{t:0,b:{t:2,i:[{t:3}],s:"摄像机"}},model:{title:{t:0,b:{t:2,i:[{t:3}],s:"模型"}}}}}},waiting:{t:0,b:{t:2,i:[{t:3}],s:"等待中"}}}}}),W9=L9({locale:X9(),fallbackLocale:"en",messages:$A});function X9(){const n=localStorage.getItem("settings/language"),e=Object.keys($A);return n&&e.includes(n)?n:"en"}const $9=Cz(),q9=Uz(VV);let Qc;Qc=kV({routes:q9,history:pV()});Qc.beforeEach((n,e)=>{n.path!==e.path&&ww.start()});Qc.afterEach(()=>{ww.done()});Qc.isReady().then(async()=>{}).catch(()=>{});DR(G9).use(Sz).use(QR).use(Qc).use($9).use(W9).use(hB).mount("#app");export{ki as $,Z9 as A,TR as B,Cv as C,gC as D,oS as E,yT as F,De as G,ns as H,rs as I,de as J,Fa as K,or as L,e3 as M,mt as N,Dh as O,Kt as P,Jn as Q,Ww as R,uL as S,t3 as T,Md as U,B as V,Ce as W,ct as X,_h as Y,pG as Z,So as _,sr as a,LI as a$,zn as a0,tE as a1,jn as a2,li as a3,Ye as a4,Vn as a5,gt as a6,hL as a7,Tn as a8,K0 as a9,lg as aA,dL as aB,b_ as aC,Ef as aD,F0 as aE,ra as aF,en as aG,Ml as aH,ji as aI,nc as aJ,ic as aK,CL as aL,c3 as aM,f3 as aN,u3 as aO,ei as aP,vg as aQ,Fs as aR,wE as aS,Mo as aT,Nn as aU,zE as aV,VE as aW,HE as aX,lE as aY,wa as aZ,ht as a_,Ba as aa,A0 as ab,iG as ac,Pt as ad,dG as ae,Rc as af,Ii as ag,Xd as ah,_0 as ai,Dc as aj,$t as ak,Ao as al,ss as am,Ua as an,Zi as ao,yh as ap,Wt as aq,Bn as ar,Ct as as,sc as at,gh as au,zs as av,Ji as aw,gn as ax,gi as ay,TE as az,pn as b,Ds as b$,kI as b0,t_ as b1,An as b2,Gn as b3,c_ as b4,aE as b5,os as b6,vr as b7,uE as b8,fE as b9,wR as bA,lG as bB,FB as bC,gs as bD,jv as bE,vG as bF,zV as bG,AR as bH,H2 as bI,uG as bJ,rG as bK,aG as bL,bG as bM,MG as bN,$w as bO,PT as bP,mG as bQ,e0 as bR,K9 as bS,j9 as bT,V2 as bU,W2 as bV,J9 as bW,wn as bX,pf as bY,ai as bZ,En as b_,aa as ba,vh as bb,gc as bc,e_ as bd,mc as be,pc as bf,Wc as bg,ft as bh,Os as bi,Gc as bj,iL as bk,dB as bl,Ez as bm,Do as bn,OV as bo,ET as bp,Ig as bq,aS as br,Va as bs,EG as bt,xG as bu,Er as bv,tG as bw,jt as bx,u2 as by,kB as bz,vi as c,nG as c0,c2 as c1,Fn as c2,pr as c3,xi as c4,Q9 as c5,g0 as c6,wS as c7,bi as c8,sG as c9,oG as ca,S0 as cb,dr as cc,Di as cd,hn as ce,hG as cf,fG as cg,wG as ch,_c as ci,Tr as cj,we as ck,nt as cl,C3 as cm,cL as cn,AL as co,st as cp,AG as cq,cG as cr,fn as d,Ot as e,Oz as f,et as g,Ee as h,_G as i,TG as j,yG as k,Hn as l,f2 as m,Si as n,mn as o,gG as p,sp as q,eG as r,Nz as s,ut as t,SG as u,AH as v,$e as w,Yl as x,pS as y,Oa as z}; +`}}},settings:{animations:{"stage-transitions":{title:{t:0,b:{t:2,i:[{t:3}],s:"是否开启舞台动画"}}},"use-page-specific-transitions":{description:{t:0,b:{t:2,i:[{t:3}],s:"某些页面会有自己的过场动画,这将覆盖舞台过场动画"}},title:{t:0,b:{t:2,i:[{t:3}],s:"是否使用页面特定过场动画"}}}},language:{chinese:{t:0,b:{t:2,i:[{t:3}],s:"简体中文"}},english:{t:0,b:{t:2,i:[{t:3}],s:"English"}},title:{t:0,b:{t:2,i:[{t:3}],s:"语言"}}},live2d:{"change-model":{"from-file":{t:0,b:{t:2,i:[{t:3}],s:"从文件加载"}},"from-file-select":{t:0,b:{t:2,i:[{t:3}],s:"选择"}},"from-url":{t:0,b:{t:2,i:[{t:3}],s:"从 URL 加载"}},"from-url-confirm":{t:0,b:{t:2,i:[{t:3}],s:"加载"}},"from-url-placeholder":{t:0,b:{t:2,i:[{t:3}],s:"输入 Live2D 模型 URL"}},title:{t:0,b:{t:2,i:[{t:3}],s:"更换模型"}}},"edit-motion-map":{title:{t:0,b:{t:2,i:[{t:3}],s:"编辑动作映射"}}},"map-motions":{play:{t:0,b:{t:2,i:[{t:3}],s:"播放动作"}},title:{t:0,b:{t:2,i:[{t:3}],s:"映射动作"}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Live2D 设置"}}},microphone:{t:0,b:{t:2,i:[{t:3}],s:"麦克风"}},models:{t:0,b:{t:2,i:[{t:3}],s:"模型"}},pages:{card:{activate:{t:0,b:{t:2,i:[{t:3}],s:"激活"}},active:{t:0,b:{t:2,i:[{t:3}],s:"已激活"}},active_badge:{t:0,b:{t:2,i:[{t:3}],s:"当前使用中"}},cancel:{t:0,b:{t:2,i:[{t:3}],s:"取消"}},card_not_found:{t:0,b:{t:2,i:[{t:3}],s:"未找到角色卡"}},character:{t:0,b:{t:2,i:[{t:3}],s:"角色设定"}},close:{t:0,b:{t:2,i:[{t:3}],s:"关闭"}},consciousness:{model:{t:0,b:{t:2,i:[{t:3}],s:"意识 / 模型"}}},created_by:{t:0,b:{t:2,i:[{t:3}],s:"创建者"}},creator_notes:{t:0,b:{t:2,i:[{t:3}],s:"创建者笔记"}},delete:{t:0,b:{t:2,i:[{t:3}],s:"删除"}},delete_card:{t:0,b:{t:2,i:[{t:3}],s:"删除角色卡"}},delete_confirmation:{t:0,b:{t:2,i:[{t:3}],s:"确定要删除这张角色卡吗?"}},description:{t:0,b:{t:2,i:[{t:3}],s:"使用 Airi 角色卡预设"}},description_label:{t:0,b:{t:2,i:[{t:3}],s:"描述"}},drop_here:{t:0,b:{t:2,i:[{t:3}],s:"放开以上传文件"}},modules:{t:0,b:{t:2,i:[{t:3}],s:"模块"}},name_asc:{t:0,b:{t:2,i:[{t:3}],s:"名称 (A-Z)"}},name_desc:{t:0,b:{t:2,i:[{t:3}],s:"名称 (Z-A)"}},no_cards:{t:0,b:{t:2,i:[{t:3}],s:"还没有任何角色卡,点击上方按钮上传一个吧!"}},no_results:{t:0,b:{t:2,i:[{t:3}],s:"没有找到匹配的角色卡"}},personality:{t:0,b:{t:2,i:[{t:3}],s:"性格"}},posthistoryinstructions:{t:0,b:{t:2,i:[{t:3}],s:"历史提示指令"}},recent:{t:0,b:{t:2,i:[{t:3}],s:"最近添加"}},scenario:{t:0,b:{t:2,i:[{t:3}],s:"场景"}},search:{t:0,b:{t:2,i:[{t:3}],s:"搜索角色卡..."}},sort_by:{t:0,b:{t:2,i:[{t:3}],s:"排序方式"}},speech:{model:{t:0,b:{t:2,i:[{t:3}],s:"声音 / 模型"}},voice:{t:0,b:{t:2,i:[{t:3}],s:"声音 / 声线"}}},systemprompt:{t:0,b:{t:2,i:[{t:3}],s:"系统提示词"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Airi 角色卡"}},try_different_search:{t:0,b:{t:2,i:[{t:3}],s:"尝试使用其他关键词搜索"}},upload:{t:0,b:{t:2,i:[{t:3}],s:"上传"}},upload_desc:{t:0,b:{t:2,i:[{t:3}],s:"点击或拖拽文件到此处上传"}}},memory:{description:{t:0,b:{t:2,i:[{t:3}],s:"存放记忆的地方,以及策略"}},title:{t:0,b:{t:2,i:[{t:3}],s:"记忆体"}}},models:{description:{t:0,b:{t:2,i:[{t:3}],s:"切换角色的 Live2D,VRM 模型"}},title:{t:0,b:{t:2,i:[{t:3}],s:"角色模型"}}},modules:{consciousness:{description:{t:0,b:{t:2,i:[{t:3}],s:"人格设定、使用的模型等配置"}},sections:{section:{"provider-model-selection":{collapse:{t:0,b:{t:2,i:[{t:3}],s:"折叠"}},custom_model_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入自订模型名字"}},description:{t:0,b:{t:2,i:[{t:3}],s:"为意识选择合适的 LLM 提供商"}},error:{t:0,b:{t:2,i:[{t:3}],s:"获取出错啦"}},expand:{t:0,b:{t:2,i:[{t:3}],s:"展开"}},loading:{t:0,b:{t:2,i:[{t:3}],s:"获取模型中..."}},manual_model_name:{t:0,b:{t:2,i:[{t:3}],s:"模型名字"}},manual_model_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入与该提供商一起使用的模型名字"}},no_models:{t:0,b:{t:2,i:[{t:3}],s:"没有任何可用的模型"}},no_models_description:{t:0,b:{t:2,i:[{t:3}],s:"该提供商的模型列表没有返回任何的数据"}},no_search_results:{t:0,b:{t:2,i:[{t:3}],s:"没有匹配的模型"}},no_search_results_description:{t:0,b:{t:2,i:[{t:3,v:"没有模型匹配 '"},{t:4,k:"query"},{t:3,v:"' 关键字,请尝试一下别的关键词呢"}]}},not_supported:{t:0,b:{t:2,i:[{t:3}],s:"无法列出模型"}},not_supported_description:{t:0,b:{t:2,i:[{t:3}],s:"此提供商不支持列出模型的功能"}},search_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"搜索模型..."}},search_results:{t:0,b:{t:2,i:[{t:3,v:"找到 "},{t:4,k:"count"},{t:3,v:" / "},{t:4,k:"total"},{t:3,v:" 个模型"}]}},show_less:{t:0,b:{t:2,i:[{t:3}],s:"显示更多"}},show_more:{t:0,b:{t:2,i:[{t:3}],s:"收起"}},subtitle:{t:0,b:{t:2,i:[{t:3}],s:"选择一个模型"}},title:{t:0,b:{t:2,i:[{t:3}],s:"模型"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"意识"}}},description:{t:0,b:{t:2,i:[{t:3}],s:"思维,视觉,言语综合,游戏等"}},"gaming-factorio":{description:{t:0,b:{t:2,i:[{t:3}],s:"一起玩 Factorio!"}},title:{t:0,b:{t:2,i:[{t:3}],s:"异星工厂 Factorio"}}},"gaming-minecraft":{description:{t:0,b:{t:2,i:[{t:3}],s:"一起 Minecraft!"}},title:{t:0,b:{t:2,i:[{t:3}],s:"我的世界 Minecraft"}}},hearing:{description:{t:0,b:{t:2,i:[{t:3}],s:"语音识别"}},title:{t:0,b:{t:2,i:[{t:3}],s:"听觉"}}},"memory-long-term":{description:{t:0,b:{t:2,i:[{t:3}],s:"长期记忆"}},title:{t:0,b:{t:2,i:[{t:3}],s:"长期记忆"}}},"memory-short-term":{description:{t:0,b:{t:2,i:[{t:3}],s:"短期记忆"}},title:{t:0,b:{t:2,i:[{t:3}],s:"短期记忆"}}},"messaging-discord":{description:{t:0,b:{t:2,i:[{t:3}],s:"Discord 发消息和语音聊天"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Discord"}}},speech:{description:{t:0,b:{t:2,i:[{t:3}],s:"语音合成"}},sections:{section:{playground:{buttons:{stop:{label:{t:0,b:{t:2,i:[{t:3}],s:"停止"}}}},"select-voice":{required:{t:0,b:{t:2,i:[{t:3}],s:"请选择声线"}}}},"provider-voice-selection":{custom_model_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入指定模型名字..."}},custom_voice_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入指定声线 ID..."}},description:{t:0,b:{t:2,i:[{t:3}],s:"选择合适的语音提供商"}},no_models:{t:0,b:{t:2,i:[{t:3}],s:"没有任何可用的模型"}},no_models_description:{t:0,b:{t:2,i:[{t:3}],s:"该提供商的模型列表没有返回任何的数据"}},no_voices:{t:0,b:{t:2,i:[{t:3}],s:"没有任何可用的声线"}},no_voices_description:{t:0,b:{t:2,i:[{t:3}],s:"该提供商的声线列表没有返回任何的数据"}},pause:{t:0,b:{t:2,i:[{t:3}],s:"Pause"}},play_sample:{t:0,b:{t:2,i:[{t:3}],s:"Play"}},search_models_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"搜索模型..."}},search_models_results:{t:0,b:{t:2,i:[{t:3,v:"找到 "},{t:4,k:"count"},{t:3,v:" / "},{t:4,k:"total"},{t:3,v:" 个模型"}]}},search_voices_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"搜索声线..."}},search_voices_results:{t:0,b:{t:2,i:[{t:3,v:"找到 "},{t:4,k:"count"},{t:3,v:" / "},{t:4,k:"total"},{t:3,v:" 个声线"}]}},show_less:{t:0,b:{t:2,i:[{t:3}],s:"显示更少"}},show_more:{t:0,b:{t:2,i:[{t:3}],s:"显示更多"}},title:{t:0,b:{t:2,i:[{t:3}],s:"选择语音合成提供商"}}},"voice-settings":{"input-ssml":{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"请输入 SSML 文本"}}},"use-ssml":{description:{t:0,b:{t:2,i:[{t:3}],s:"启用后可以输入原始 SSML 而不是纯文本"}},label:{t:0,b:{t:2,i:[{t:3}],s:"选用自定义 SSML"}}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"发声"}}},title:{t:0,b:{t:2,i:[{t:3}],s:"机体模块"}},vision:{description:{t:0,b:{t:2,i:[{t:3}],s:"视觉"}},title:{t:0,b:{t:2,i:[{t:3}],s:"视觉"}}},x:{description:{t:0,b:{t:2,i:[{t:3}],s:"X / Twitter 的浏览和使用"}},title:{t:0,b:{t:2,i:[{t:3}],s:"X / Twitter"}}}},providers:{common:{fields:{field:{"api-key":{label:{t:0,b:{t:2,i:[{t:3}],s:"API 密钥"}}}}},section:{advanced:{fields:{field:{headers:{description:{t:0,b:{t:2,i:[{t:3}],s:"添加自定义 HTTP 标头"}},key:{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"请求头名字"}}},label:{t:0,b:{t:2,i:[{t:3}],s:"HTTP 请求头"}},value:{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"请求头数值"}}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"高级配置"}}},basic:{description:{t:0,b:{t:2,i:[{t:3}],s:"基本设置"}},title:{t:0,b:{t:2,i:[{t:3}],s:"基础配置"}}},voice:{title:{t:0,b:{t:2,i:[{t:3}],s:"声音配置"}}}}},description:{t:0,b:{t:2,i:[{t:3}],s:"LLM,语音合成,语音识别提供商等"}},provider:{anthropic:{description:{t:0,b:{t:2,i:[{t:3}],s:"anthropic.com"}},title:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"Anthropic"},{t:2,i:[{t:3}],s:"Claude"}]}}},"cloudflare-workers-ai":{description:{t:0,b:{t:2,i:[{t:3}],s:"Cloudflare.com"}},fields:{field:{"account-id":{description:{t:0,b:{t:2,i:[{t:3}],s:"Cloudflare 帐户 ID"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Cloudflare Account ID"}},placeholder:{t:0,b:{t:2,i:[{t:3}],s:"请输入 Cloudflare Account ID"}}},"api-key":{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"请输入 Cloudflare Workers AI 的 API Key"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Workers AI"}}},common:{fields:{field:{pitch:{description:{t:0,b:{t:2,i:[{t:3}],s:"调节合成语音的音高(比如更尖锐或更粗旷)"}},label:{t:0,b:{t:2,i:[{t:3}],s:"音高"}}},speed:{description:{t:0,b:{t:2,i:[{t:3}],s:"调节说话的语速"}},label:{t:0,b:{t:2,i:[{t:3}],s:"语速"}}},volume:{description:{t:0,b:{t:2,i:[{t:3}],s:"调节语音的响度"}},label:{t:0,b:{t:2,i:[{t:3}],s:"响度"}}}}}},deepseek:{description:{t:0,b:{t:2,i:[{t:3}],s:"DeepSeek.com"}},title:{t:0,b:{t:2,i:[{t:3}],s:"深度求索 DeepSeek"}}},elevenlabs:{description:{t:0,b:{t:2,i:[{t:3}],s:"Elevenlabs.io"}},fields:{field:{"simularity-boost":{description:{t:0,b:{t:2,i:[{t:3}],s:"声音相似性依从性"}},label:{t:0,b:{t:2,i:[{t:3}],s:"相似度修正"}}},"speaker-boost":{description:{t:0,b:{t:2,i:[{t:3}],s:"增强说话者的相似性"}},label:{t:0,b:{t:2,i:[{t:3}],s:"扬声器增强"}}},speed:{description:{t:0,b:{t:2,i:[{t:3}],s:"语音生成速度"}},label:{t:0,b:{t:2,i:[{t:3}],s:"语速"}}},stability:{description:{t:0,b:{t:2,i:[{t:3}],s:"语音稳定性和随机性"}},label:{t:0,b:{t:2,i:[{t:3}],s:"稳定性"}}},style:{description:{t:0,b:{t:2,i:[{t:3}],s:"语音风格夸张"}},label:{t:0,b:{t:2,i:[{t:3}],s:"风格"}}}}},playground:{buttons:{button:{"test-voice":{generating:{t:0,b:{t:2,i:[{t:3}],s:"生成中..."}},label:{t:0,b:{t:2,i:[{t:3}],s:"测试声音"}}}}},fields:{field:{input:{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入用于测试发音的文本"}}},language:{description:{t:0,b:{t:2,i:[{t:3}],s:"选择语音语言"}},label:{t:0,b:{t:2,i:[{t:3}],s:"语言"}}},voice:{description:{t:0,b:{t:2,i:[{t:3}],s:"选择首选语音"}},label:{t:0,b:{t:2,i:[{t:3}],s:"声线"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"实验平台"}},validation:{"error-missing-api-key":{t:0,b:{t:2,i:[{t:3}],s:"需要填写 API Key 才能用哦!"}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"ElevenLabs (11labs)"}}},fireworks:{description:{t:0,b:{t:2,i:[{t:3}],s:"Fireworks.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Fireworks.ai"}}},"microsoft-speech":{description:{t:0,b:{t:2,i:[{t:3}],s:"speech.microsoft.com"}},fields:{field:{region:{description:{t:0,b:{t:2,i:[{t:3}],s:"服务 Endpoint 地区(比如亚太 eastasia 区域)"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Endpoint 地区"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Microsoft / Azure 语音服务"}}},mistral:{description:{t:0,b:{t:2,i:[{t:3}],s:"mistral.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Mistral"}}},moonshot:{description:{t:0,b:{t:2,i:[{t:3}],s:"Moonshot.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"月之暗面"}}},novita:{description:{t:0,b:{t:2,i:[{t:3}],s:"novita.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Novita"}}},ollama:{description:{t:0,b:{t:2,i:[{t:3}],s:"ollama.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Ollama"}}},openai:{description:{t:0,b:{t:2,i:[{t:3}],s:"OpenAi.com"}},title:{t:0,b:{t:2,i:[{t:3}],s:"OpenAI"}}},openrouter:{description:{t:0,b:{t:2,i:[{t:3}],s:"OpenRouter.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"OpenRouter"}}},perplexity:{description:{t:0,b:{t:2,i:[{t:3}],s:"perplexity.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Perplexity"}}},together:{description:{t:0,b:{t:2,i:[{t:3}],s:"一起"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Together.ai"}}},vllm:{description:{t:0,b:{t:2,i:[{t:3}],s:"vllm.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"vLLM"}}},xai:{description:{t:0,b:{t:2,i:[{t:3}],s:"X.AI"}},title:{t:0,b:{t:2,i:[{t:3}],s:"xAI"}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"提供商"}}},themes:{description:{t:0,b:{t:2,i:[{t:3}],s:"自定义你的舞台外观!"}},sections:{section:{"custom-color":{fields:{field:{"primary-color":{label:{t:0,b:{t:2,i:[{t:3}],s:"强调色"}},"rgb-on":{title:{t:0,b:{t:2,i:[{t:3}],s:"RGB ON!"}}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"配色"}}},developer:{title:{t:0,b:{t:2,i:[{t:3}],s:"开发者"}}},"theme-presets":{presets:[{colors:[{t:0,b:{t:2,i:[{t:3}],s:"Airi 绿"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"默认的绿色主题,由 Airi 为您带来!"}},title:{t:0,b:{t:2,i:[{t:3}],s:"默认颜色"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"灰褐色"}},{t:0,b:{t:2,i:[{t:3}],s:"米色"}},{t:0,b:{t:2,i:[{t:3}],s:"灰白色"}},{t:0,b:{t:2,i:[{t:3}],s:"浅灰褐色"}},{t:0,b:{t:2,i:[{t:3}],s:"象牙色"}},{t:0,b:{t:2,i:[{t:3}],s:"橄榄灰"}},{t:0,b:{t:2,i:[{t:3}],s:"沙色"}},{t:0,b:{t:2,i:[{t:3}],s:"暖灰色"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"受乔治·莫兰迪绘画启发的柔和、低调的色调"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Morandi 颜色"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"天蓝色"}},{t:0,b:{t:2,i:[{t:3}],s:"薄雾色"}},{t:0,b:{t:2,i:[{t:3}],s:"沙色"}},{t:0,b:{t:2,i:[{t:3}],s:"苔藓绿"}},{t:0,b:{t:2,i:[{t:3}],s:"睡莲色"}},{t:0,b:{t:2,i:[{t:3}],s:"小麦色"}},{t:0,b:{t:2,i:[{t:3}],s:"板岩蓝"}},{t:0,b:{t:2,i:[{t:3}],s:"鼠尾草色"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"受克劳德·莫奈作品启发的印象派调色板"}},title:{t:0,b:{t:2,i:[{t:3}],s:"莫奈颜色"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"棕褐色"}},{t:0,b:{t:2,i:[{t:3}],s:"暖灰褐色"}},{t:0,b:{t:2,i:[{t:3}],s:"赭色"}},{t:0,b:{t:2,i:[{t:3}],s:"咖啡色"}},{t:0,b:{t:2,i:[{t:3}],s:"青铜色"}},{t:0,b:{t:2,i:[{t:3}],s:"金色"}},{t:0,b:{t:2,i:[{t:3}],s:"芥末色"}},{t:0,b:{t:2,i:[{t:3}],s:"琥珀色"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"传统日本色彩调色板"}},title:{t:0,b:{t:2,i:[{t:3}],s:"日本颜色"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"北欧蓝"}},{t:0,b:{t:2,i:[{t:3}],s:"冰色"}},{t:0,b:{t:2,i:[{t:3}],s:"峡湾色"}},{t:0,b:{t:2,i:[{t:3}],s:"钢铁色"}},{t:0,b:{t:2,i:[{t:3}],s:"冰川色"}},{t:0,b:{t:2,i:[{t:3}],s:"板岩色"}},{t:0,b:{t:2,i:[{t:3}],s:"云色"}},{t:0,b:{t:2,i:[{t:3}],s:"石头色"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"北欧极简主义配色方案"}},title:{t:0,b:{t:2,i:[{t:3}],s:"北欧颜色"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"霞光红"}},{t:0,b:{t:2,i:[{t:3}],s:"枣红"}},{t:0,b:{t:2,i:[{t:3}],s:"黄栌"}},{t:0,b:{t:2,i:[{t:3}],s:"竹青"}},{t:0,b:{t:2,i:[{t:3}],s:"乌梅紫"}},{t:0,b:{t:2,i:[{t:3}],s:"缃色"}},{t:0,b:{t:2,i:[{t:3}],s:"青冥"}},{t:0,b:{t:2,i:[{t:3}],s:"赭石"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"中国传统色彩,源自古代纺织品、瓷器和绘画"}},title:{t:0,b:{t:2,i:[{t:3}],s:"中国传统颜色"}}}],title:{t:0,b:{t:2,i:[{t:3}],s:"预设"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"外观"}}}},sections:{section:{general:{title:{t:0,b:{t:2,i:[{t:3}],s:"通用"}}}}},theme:{t:0,b:{t:2,i:[{t:3}],s:"主题"}},title:{t:0,b:{t:2,i:[{t:3}],s:"设置"}},voices:{t:0,b:{t:2,i:[{t:3}],s:"声线"}}},stage:{chat:{message:{"character-name":{airi:{t:0,b:{t:2,i:[{t:3}],s:"Airi"}},"core-system":{t:0,b:{t:2,i:[{t:3}],s:"核心系统"}},you:{t:0,b:{t:2,i:[{t:3}],s:"你"}}}},tabs:{chat:{t:0,b:{t:2,i:[{t:3}],s:"聊天"}},clothes:{t:0,b:{t:2,i:[{t:3}],s:"换装"}},custom:{t:0,b:{t:2,i:[{t:3}],s:"自定义"}}}},message:{t:0,b:{t:2,i:[{t:3}],s:"消息"}},operations:{"load-models":{t:0,b:{t:2,i:[{t:3}],s:"加载推理模型"}},"load-models-status":{loading:{t:0,b:{t:2,i:[{t:3}],s:"加载中"}},ready:{t:0,b:{t:2,i:[{t:3}],s:"已就绪"}}}},"select-a-audio-input":{t:0,b:{t:2,i:[{t:3}],s:"选择一个音频输入设备"}},"select-a-model":{t:0,b:{t:2,i:[{t:3}],s:"选择一个模型"}},"select-a-voice":{t:0,b:{t:2,i:[{t:3}],s:"选择一个声线"}},viewers:{"debug-menu":{emotions:{t:0,b:{t:2,i:[{t:3}],s:"表情"}},"emotions-btn":{angry:{t:0,b:{t:2,i:[{t:3}],s:"生气"}},awkward:{t:0,b:{t:2,i:[{t:3}],s:"尴尬"}},happy:{t:0,b:{t:2,i:[{t:3}],s:"开心"}},neutral:{t:0,b:{t:2,i:[{t:3}],s:"日常"}},question:{t:0,b:{t:2,i:[{t:3}],s:"疑问"}},sad:{t:0,b:{t:2,i:[{t:3}],s:"难过"}},surprised:{t:0,b:{t:2,i:[{t:3}],s:"惊喜"}},think:{t:0,b:{t:2,i:[{t:3}],s:"思考"}}},vrm:{camera:{t:0,b:{t:2,i:[{t:3}],s:"摄像机"}},model:{title:{t:0,b:{t:2,i:[{t:3}],s:"模型"}}}}}},waiting:{t:0,b:{t:2,i:[{t:3}],s:"等待中"}}}}}),W9=L9({locale:X9(),fallbackLocale:"en",messages:$A});function X9(){const n=localStorage.getItem("settings/language"),e=Object.keys($A);return n&&e.includes(n)?n:"en"}const $9=Cz(),q9=Uz(VV);let Qc;Qc=kV({routes:q9,history:pV()});Qc.beforeEach((n,e)=>{n.path!==e.path&&ww.start()});Qc.afterEach(()=>{ww.done()});Qc.isReady().then(async()=>{}).catch(()=>{});DR(G9).use(Sz).use(QR).use(Qc).use($9).use(W9).use(hB).mount("#app");export{ki as $,Z9 as A,TR as B,Cv as C,gC as D,oS as E,yT as F,De as G,ns as H,rs as I,de as J,Fa as K,or as L,e3 as M,mt as N,Dh as O,Kt as P,Jn as Q,Ww as R,uL as S,t3 as T,Md as U,B as V,Ce as W,ct as X,_h as Y,pG as Z,So as _,sr as a,LI as a$,zn as a0,tE as a1,jn as a2,li as a3,Ye as a4,Vn as a5,gt as a6,hL as a7,Tn as a8,K0 as a9,lg as aA,dL as aB,b_ as aC,Ef as aD,F0 as aE,ra as aF,en as aG,Ml as aH,ji as aI,nc as aJ,ic as aK,CL as aL,c3 as aM,f3 as aN,u3 as aO,ei as aP,vg as aQ,Fs as aR,wE as aS,Mo as aT,Nn as aU,zE as aV,VE as aW,HE as aX,lE as aY,wa as aZ,ht as a_,Ba as aa,A0 as ab,iG as ac,Pt as ad,dG as ae,Rc as af,Ii as ag,Xd as ah,_0 as ai,Dc as aj,$t as ak,Ao as al,ss as am,Ua as an,Zi as ao,yh as ap,Wt as aq,Bn as ar,Ct as as,sc as at,gh as au,zs as av,Ji as aw,gn as ax,gi as ay,TE as az,pn as b,Ds as b$,kI as b0,t_ as b1,An as b2,Gn as b3,c_ as b4,aE as b5,os as b6,vr as b7,uE as b8,fE as b9,wR as bA,lG as bB,FB as bC,gs as bD,jv as bE,vG as bF,zV as bG,AR as bH,H2 as bI,uG as bJ,rG as bK,aG as bL,bG as bM,MG as bN,$w as bO,PT as bP,mG as bQ,e0 as bR,K9 as bS,j9 as bT,V2 as bU,W2 as bV,J9 as bW,wn as bX,pf as bY,ai as bZ,En as b_,aa as ba,vh as bb,gc as bc,e_ as bd,mc as be,pc as bf,Wc as bg,ft as bh,Os as bi,Gc as bj,iL as bk,dB as bl,Ez as bm,Do as bn,OV as bo,ET as bp,Ig as bq,aS as br,Va as bs,EG as bt,xG as bu,Er as bv,tG as bw,jt as bx,u2 as by,kB as bz,vi as c,nG as c0,c2 as c1,Fn as c2,pr as c3,xi as c4,Q9 as c5,g0 as c6,wS as c7,bi as c8,sG as c9,oG as ca,S0 as cb,dr as cc,Di as cd,hn as ce,hG as cf,fG as cg,wG as ch,_c as ci,Tr as cj,we as ck,nt as cl,C3 as cm,cL as cn,AL as co,st as cp,AG as cq,cG as cr,fn as d,Ot as e,Oz as f,et as g,Ee as h,_G as i,TG as j,yG as k,Hn as l,f2 as m,Si as n,mn as o,gG as p,sp as q,eG as r,Nz as s,ut as t,SG as u,AH as v,$e as w,Yl as x,pS as y,Oa as z}; diff --git a/assets/index-DZJqd2YN.js b/assets/index-tRUa3_xN.js similarity index 99% rename from assets/index-DZJqd2YN.js rename to assets/index-tRUa3_xN.js index 34db7903d0f1ceff9eeaadb6804d47820e2969fc..99083391088d257c2447b3075bcced6963af7ece 100644 --- a/assets/index-DZJqd2YN.js +++ b/assets/index-tRUa3_xN.js @@ -1,4 +1,4 @@ -import{V as vs,a as bs,c as ws,r as ks,b as Cr,d as Ts,E as Ei,e as _s,f as As,g as Es,s as Ms,h as Ss,i as Is}from"./live2d-zip-loader-dDw0Wbbr.js";import{f as $n,g as W,h as Ue,s as qe,t as Rs,d as ze,i as Cs,j as Ns,k as Qr,w as je,l as pn,c as re,o as Q,m as gn,p as Ls,q as Qt,v as Wt,x as Xt,y as Fe,b as ke,a as O,z as st,A as At,B as Zr,C as it,D as he,e as H,M as yt,T as _t,E as Jr,F as Yn,G as Yo,Z as On,H as Ot,I as Ps,V as ae,S as Mi,Q as zn,O as Gt,J as Pe,P as Et,K as Ds,L as qo,N as hn,U as ei,W as Be,X as Ko,Y as Wo,_ as ti,$ as yn,a0 as Os,a1 as ni,a2 as zs,a3 as Xo,a4 as xt,a5 as ri,a6 as Mt,a7 as Bs,a8 as Qo,a9 as Dt,aa as Zo,ab as Fs,ac as Us,ad as js,ae as Vs,af as Jo,ag as qn,ah as Hs,ai as Gs,aj as $s,ak as Pt,al as Ys,am as qs,an as Ks,ao as Ws,ap as er,aq as Bn,ar as Nr,as as Nt,at as ea,au as Lr,av as Vt,aw as Si,ax as Lt,ay as Ht,az as tr,aA as Xs,aB as Qs,aC as Zs,aD as Js,aE as ta,aF as na,aG as Fn,aH as ra,aI as ii,aJ as Un,aK as ia,aL as el,n as Pr,aM as tl,aN as Dr,aO as oa,aP as nl,aQ as cn,aR as aa,aS as ft,aT as vt,aU as mn,aV as rl,aW as il,aX as ol,aY as al,aZ as sl,a_ as oi,a$ as ll,b0 as ul,b1 as cl,b2 as nr,b3 as fl,b4 as sa,b5 as dl,b6 as pl,b7 as hl,b8 as ml,b9 as gl,ba as rr,bb as yl,bc as xl,bd as vl,be as Ii,bf as Ri,bg as Ci,bh as Ni,bi as bl,bj as wl,bk as kl,bl as Tl,bm as _l,bn as Kn,bo as Al,bp as la,bq as El,br as Ml,bs as Sl,bt as Il,bu as ua,bv as jn,bw as ca,bx as ai,by as si,bz as Rl,bA as ir,bB as Cl,bC as Nl}from"./index-7-fr_lhT.js";import{getImportUrlBundles as Ll}from"./import-url-browser-CPN8ipMD.js";import{s as $t,c as Li,u as Pl,g as Dl}from"./speech-DK9my_xu.js";import{u as or}from"./queue-B4R0QEYc.js";import{u as Ol,a as zl,b as Bl,l as Fl,_ as fa}from"./queues-BATLkujj.js";import{l as Ul,u as li}from"./providers-B7zWTIWF.js";import{s as jl}from"./index-D975M2PQ.js";import{u as Vl}from"./airi-card-DAWA4eQ5.js";import{_ as Hl,a as Gl,r as on}from"./Model.vue_vue_type_script_setup_true_lang-B7ZOwTMx.js";import{_ as ui}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-BNzPx9yx.js";import{_ as Pi}from"./Collapsable.vue_vue_type_script_setup_true_lang-D5rspuJc.js";import{H as $l}from"./HeaderLink-C7jWLVVD.js";import{u as da}from"./consciousness-C4xyvmr3.js";import{d as Di}from"./index-CJycCKU5.js";import{b as Oi}from"./route-block-B_A1xBdJ.js";import"./duckdb-mvp-CaaD-olE.js";import"./index-Be1NqeGb.js";async function*Yl(t,e){const n=t.getReader();try{for(;;){const{done:r,value:i}=await n.read();if(r)return;yield e(i)}}finally{n.releaseLock()}}function ql(t){const e=new Uint8Array(t.frequencyBinCount);t.getByteFrequencyData(e);const n=[];for(let i=0;i<700;i+=80)n.push(e[i]);return e.map(i=>i**1.2).map(i=>i*1.2).reduce((i,o)=>i+o,0)/e.length/100}function Kl(t){const e=new Uint8Array(t.frequencyBinCount);t.getByteFrequencyData(e);const n=[];for(let u=0;u<700;u+=80)n.push(e[u]);const r=e.map(u=>u**1.5),i=Math.min(...r),a=Math.max(...r)-i;let s;return a===0?s=r.map(()=>0):s=r.map(u=>(u-i)/a),s.reduce((u,c)=>u+c,0)/e.length}function Wl(t,e="linear"){switch(e){case"linear":return ql(t);case"minmax":return Kl(t)}}const pa=$n("AudioContext",()=>({audioContext:new AudioContext,calculateVolume:Wl})),Xl=$n("SpeakingStore",()=>{const n=W(0),r=W(!1),i=Ue(()=>r.value?(30+70*n.value)/100:30);return{mouthOpenSize:n,nowSpeaking:r,nowSpeakingAvatarBorderOpacity:i}});function _n(t,e,n){return e+n<0||e+n>=t.length-1?"":t[e+n]}function Ql(t){let e="literal",n="";return{async consume(r){var i,o,a;for(let s=0;s"?(l+=_n(r,s,1),u="literal",s++):l==="<"?u="special":l===">"&&(u="literal"),e==="literal"&&u==="special"?n!==""&&(await((i=t.onLiteral)==null?void 0:i.call(t,n)),n=""):e==="special"&&u==="literal"&&n!==""&&(n+=l,await((o=t.onSpecial)==null?void 0:o.call(t,n)),n=""),e==="literal"&&u==="literal"?(await((a=t.onLiteral)==null?void 0:a.call(t,l)),n=""):e==="special"&&u==="literal"?n="":n+=l,e=u}},async end(){var r,i;n!==""&&(e==="literal"?await((r=t.onLiteral)==null?void 0:r.call(t,n)):n.endsWith("|>")&&await((i=t.onSpecial)==null?void 0:i.call(t,n)))}}}const Zl=$n("llm",()=>{async function t(n,r,i,o){const a=o==null?void 0:o.headers;return await jl({...r.chat(n),messages:i,headers:a})}async function e(n,r){if(n==="")return[];try{return await Ul({baseURL:n.endsWith("/")?n:`${n}/`,apiKey:r})}catch(i){if(String(i).includes("Failed to construct 'URL': Invalid URL"))return[];throw i}}return{models:e,stream:t}}),St=$n("chat",()=>{const{stream:t}=Zl(),{systemPrompt:e}=qe(Vl()),n=W(!1),r=W([]),i=W([]),o=W([]),a=W([]),s=W([]),l=W([]),u=W([]),c=W([]);function f(h){r.value.push(h)}function p(h){i.value.push(h)}function d(h){o.value.push(h)}function b(h){a.value.push(h)}function y(h){s.value.push(h)}function x(h){l.value.push(h)}function k(h){u.value.push(h)}function S(h){c.value.push(h)}const A=W([{role:"system",content:e.value}]),C=W({role:"assistant",content:""});async function P(h,I){var v;try{if(n.value=!0,!h)return;for(const D of r.value)await D(h);C.value={role:"assistant",content:""},A.value.push({role:"user",content:h}),A.value.push(C.value);const g=A.value.slice(0,A.value.length-1).map(D=>Rs(D));for(const D of i.value)await D(h);for(const D of o.value)await D(h);const m=(v=I.providerConfig)==null?void 0:v.headers,T=m==null?void 0:m.filter(D=>D.key&&D.value).reduce((D,F)=>(D[F.key]=F.value,D),{}),E=await t(I.model,I.chatProvider,g,{headers:T});for(const D of a.value)await D(h);let z="";const U=Ql({onLiteral:async D=>{for(const F of s.value)await F(D);C.value.content+=D},onSpecial:async D=>{for(const F of l.value)await F(D)}});for await(const D of Yl(E.textStream,async F=>F))z+=D,await U.consume(D);await U.end();for(const D of u.value)await D();for(const D of c.value)await D(z);console.debug("LLM output:",z)}finally{n.value=!1}}return{sending:n,messages:A,streamingMessage:C,send:P,onBeforeMessageComposed:f,onAfterMessageComposed:p,onBeforeSend:d,onAfterSend:b,onTokenLiteral:y,onTokenSpecial:x,onStreamEnd:k,onAssistantResponseEnd:S}}),ha=ze({__name:"Screen",setup(t){const e=W(),n=Cs(Ls),{width:r,height:i}=Ns(),o=Qr(e,{immediate:!0,windowResize:!0,reset:!0}),a=Ue(()=>n.between("sm","md").value||n.smaller("sm").value),s=Ue(()=>n.between("md","lg").value),l=Ue(()=>n.greaterOrEqual("lg").value),u=Ue(()=>l.value?o.width.value:a.value||s.value?r.value-16:o.width.value),c=W(0);return je([r,i,e],()=>{var p,d;const f=(d=(p=e.value)==null?void 0:p.parentElement)==null?void 0:d.getBoundingClientRect();l.value||a.value||s.value?c.value=(f==null?void 0:f.height)||0:c.value=600}),je([o.width,o.height],()=>{l.value||a.value||s.value?c.value=o.height.value:c.value=600}),pn(async()=>{e.value&&o.update()}),(f,p)=>(Q(),re("div",{ref_key:"containerRef",ref:e,"h-full":"","w-full":""},[gn(f.$slots,"default",{width:u.value,height:c.value})],512))}}),Jl={absolute:"",bottom:"3",right:"3"},eu={flex:"~ row","cursor-pointer":""},tu=["checked","aria-checked"],nu={key:0,"min-w":"50vw",z:"(Q(),Xt(ha,{relative:""},{default:Fe(({width:a,height:s})=>[ke(Gl,{width:a,height:s},{default:Fe(({app:l})=>[ke(Hl,{app:l,"mouth-open-size":t.mouthOpenSize,width:a,height:s,paused:t.paused},null,8,["app","mouth-open-size","width","height","paused"])]),_:2},1032,["width","height"]),O("div",Jl,[O("div",eu,[O("label",{class:st([n.value?"bg-zinc-300 dark:bg-zinc-200":"bg-zinc-100 dark:bg-zinc-700"]),transition:"all ease-in-out duration-500",text:"lg zinc-500 dark:zinc-400","m-1":"","h-fit":"","w-fit":"","cursor-pointer":"","appearance-none":"","gap-1":"","rounded-lg":"","rounded-md":"","border-none":"","p-2":"","outline-none":""},[At(O("input",{"onUpdate:modelValue":o[0]||(o[0]=l=>n.value=l),checked:n.value,"aria-checked":n.value,name:"showLive2DViewerInspector",type:"checkbox",hidden:"","appearance-none":"","outline-none":""},null,8,tu),[[Zr,n.value]]),o[8]||(o[8]=O("div",{"select-none":""},[O("div",{"i-solar:bug-bold-duotone":""})],-1))],2)]),ke(ui,null,{default:Fe(()=>[n.value?(Q(),re("div",nu,[O("div",ru,[O("div",iu,[O("span",null,he(H(e)("stage.viewers.debug-menu.emotions")),1)]),O("div",ou,[O("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[1]||(o[1]=l=>r.value={group:"Surprise",index:0})},he(H(e)("stage.viewers.debug-menu.emotions-btn.surprised")),1),O("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[2]||(o[2]=l=>r.value={group:"Sad",index:0})},he(H(e)("stage.viewers.debug-menu.emotions-btn.sad")),1),O("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[3]||(o[3]=l=>r.value={group:"Angry",index:0})},he(H(e)("stage.viewers.debug-menu.emotions-btn.angry")),1),O("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[4]||(o[4]=l=>r.value={group:"Happy",index:0})},he(H(e)("stage.viewers.debug-menu.emotions-btn.happy")),1),O("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[5]||(o[5]=l=>r.value={group:"Awkward",index:0})},he(H(e)("stage.viewers.debug-menu.emotions-btn.awkward")),1),O("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[6]||(o[6]=l=>r.value={group:"Question",index:0})},he(H(e)("stage.viewers.debug-menu.emotions-btn.question")),1),O("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[7]||(o[7]=l=>r.value={group:"Think",index:0})},he(H(e)("stage.viewers.debug-menu.emotions-btn.think")),1)])])])):it("",!0)]),_:1})])]),_:1}))}});var su=Object.defineProperty,lu=(t,e,n)=>e in t?su(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,uu=(t,e,n)=>lu(t,e+"",n);function cu(t){return Hs()?(Gs(t),!0):!1}function ma(t){return typeof t=="function"?t():H(t)}const fu=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const du=Object.prototype.toString,pu=t=>du.call(t)==="[object Object]",hu=()=>{},mu=fu?window:void 0;function gu(t){var e;const n=ma(t);return(e=n==null?void 0:n.$el)!=null?e:n}function ar(...t){let e,n,r,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,r,i]=t,e=mu):[e,n,r,i]=t,!e)return hu;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],a=()=>{o.forEach(c=>c()),o.length=0},s=(c,f,p,d)=>(c.addEventListener(f,p,d),()=>c.removeEventListener(f,p,d)),l=je(()=>[gu(e),ma(i)],([c,f])=>{if(a(),!c)return;const p=pu(f)?{...f}:f;o.push(...n.flatMap(d=>r.map(b=>s(c,d,b,p))))},{immediate:!0,flush:"post"}),u=()=>{l(),a()};return cu(u),u}function ga(t,e,n,r){const i=class extends yn{constructor(o={}){const a=Object.entries(t);super({uniforms:a.reduce((s,[l,u])=>{const c=ni.clone({[l]:{value:u}});return{...s,...c}},{}),vertexShader:e,fragmentShader:n}),uu(this,"key",""),a.forEach(([s])=>Object.defineProperty(this,s,{get:()=>this.uniforms[s].value,set:l=>this.uniforms[s].value=l})),Object.assign(this,o)}};return i.key=Dt.generateUUID(),i}ga({color:new Be("white"),scale:new Pe(1,1),imageBounds:new Pe(1,1),resolution:1024,map:null,zoom:1,radius:0,grayscale:0,opacity:1},` +import{V as vs,a as bs,c as ws,r as ks,b as Cr,d as Ts,E as Ei,e as _s,f as As,g as Es,s as Ms,h as Ss,i as Is}from"./live2d-zip-loader--bTGFeQd.js";import{f as $n,g as W,h as Ue,s as qe,t as Rs,d as ze,i as Cs,j as Ns,k as Qr,w as je,l as pn,c as re,o as Q,m as gn,p as Ls,q as Qt,v as Wt,x as Xt,y as Fe,b as ke,a as O,z as st,A as At,B as Zr,C as it,D as he,e as H,M as yt,T as _t,E as Jr,F as Yn,G as Yo,Z as On,H as Ot,I as Ps,V as ae,S as Mi,Q as zn,O as Gt,J as Pe,P as Et,K as Ds,L as qo,N as hn,U as ei,W as Be,X as Ko,Y as Wo,_ as ti,$ as yn,a0 as Os,a1 as ni,a2 as zs,a3 as Xo,a4 as xt,a5 as ri,a6 as Mt,a7 as Bs,a8 as Qo,a9 as Dt,aa as Zo,ab as Fs,ac as Us,ad as js,ae as Vs,af as Jo,ag as qn,ah as Hs,ai as Gs,aj as $s,ak as Pt,al as Ys,am as qs,an as Ks,ao as Ws,ap as er,aq as Bn,ar as Nr,as as Nt,at as ea,au as Lr,av as Vt,aw as Si,ax as Lt,ay as Ht,az as tr,aA as Xs,aB as Qs,aC as Zs,aD as Js,aE as ta,aF as na,aG as Fn,aH as ra,aI as ii,aJ as Un,aK as ia,aL as el,n as Pr,aM as tl,aN as Dr,aO as oa,aP as nl,aQ as cn,aR as aa,aS as ft,aT as vt,aU as mn,aV as rl,aW as il,aX as ol,aY as al,aZ as sl,a_ as oi,a$ as ll,b0 as ul,b1 as cl,b2 as nr,b3 as fl,b4 as sa,b5 as dl,b6 as pl,b7 as hl,b8 as ml,b9 as gl,ba as rr,bb as yl,bc as xl,bd as vl,be as Ii,bf as Ri,bg as Ci,bh as Ni,bi as bl,bj as wl,bk as kl,bl as Tl,bm as _l,bn as Kn,bo as Al,bp as la,bq as El,br as Ml,bs as Sl,bt as Il,bu as ua,bv as jn,bw as ca,bx as ai,by as si,bz as Rl,bA as ir,bB as Cl,bC as Nl}from"./index-hDb1Lsb8.js";import{getImportUrlBundles as Ll}from"./import-url-browser-CPN8ipMD.js";import{s as $t,c as Li,u as Pl,g as Dl}from"./speech-D3H5B80W.js";import{u as or}from"./queue-c563jmhe.js";import{u as Ol,a as zl,b as Bl,l as Fl,_ as fa}from"./queues-DEhcWTMJ.js";import{l as Ul,u as li}from"./providers-adQ6cb75.js";import{s as jl}from"./index-D975M2PQ.js";import{u as Vl}from"./airi-card-CbqBsbSf.js";import{_ as Hl,a as Gl,r as on}from"./Model.vue_vue_type_script_setup_true_lang-Wfrg8fps.js";import{_ as ui}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import{_ as Pi}from"./Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js";import{H as $l}from"./HeaderLink-DavtcSnn.js";import{u as da}from"./consciousness-BRdkM-c-.js";import{d as Di}from"./index-BNcJmkAi.js";import{b as Oi}from"./route-block-B_A1xBdJ.js";import"./duckdb-mvp-CaaD-olE.js";import"./index-Be1NqeGb.js";async function*Yl(t,e){const n=t.getReader();try{for(;;){const{done:r,value:i}=await n.read();if(r)return;yield e(i)}}finally{n.releaseLock()}}function ql(t){const e=new Uint8Array(t.frequencyBinCount);t.getByteFrequencyData(e);const n=[];for(let i=0;i<700;i+=80)n.push(e[i]);return e.map(i=>i**1.2).map(i=>i*1.2).reduce((i,o)=>i+o,0)/e.length/100}function Kl(t){const e=new Uint8Array(t.frequencyBinCount);t.getByteFrequencyData(e);const n=[];for(let u=0;u<700;u+=80)n.push(e[u]);const r=e.map(u=>u**1.5),i=Math.min(...r),a=Math.max(...r)-i;let s;return a===0?s=r.map(()=>0):s=r.map(u=>(u-i)/a),s.reduce((u,c)=>u+c,0)/e.length}function Wl(t,e="linear"){switch(e){case"linear":return ql(t);case"minmax":return Kl(t)}}const pa=$n("AudioContext",()=>({audioContext:new AudioContext,calculateVolume:Wl})),Xl=$n("SpeakingStore",()=>{const n=W(0),r=W(!1),i=Ue(()=>r.value?(30+70*n.value)/100:30);return{mouthOpenSize:n,nowSpeaking:r,nowSpeakingAvatarBorderOpacity:i}});function _n(t,e,n){return e+n<0||e+n>=t.length-1?"":t[e+n]}function Ql(t){let e="literal",n="";return{async consume(r){var i,o,a;for(let s=0;s"?(l+=_n(r,s,1),u="literal",s++):l==="<"?u="special":l===">"&&(u="literal"),e==="literal"&&u==="special"?n!==""&&(await((i=t.onLiteral)==null?void 0:i.call(t,n)),n=""):e==="special"&&u==="literal"&&n!==""&&(n+=l,await((o=t.onSpecial)==null?void 0:o.call(t,n)),n=""),e==="literal"&&u==="literal"?(await((a=t.onLiteral)==null?void 0:a.call(t,l)),n=""):e==="special"&&u==="literal"?n="":n+=l,e=u}},async end(){var r,i;n!==""&&(e==="literal"?await((r=t.onLiteral)==null?void 0:r.call(t,n)):n.endsWith("|>")&&await((i=t.onSpecial)==null?void 0:i.call(t,n)))}}}const Zl=$n("llm",()=>{async function t(n,r,i,o){const a=o==null?void 0:o.headers;return await jl({...r.chat(n),messages:i,headers:a})}async function e(n,r){if(n==="")return[];try{return await Ul({baseURL:n.endsWith("/")?n:`${n}/`,apiKey:r})}catch(i){if(String(i).includes("Failed to construct 'URL': Invalid URL"))return[];throw i}}return{models:e,stream:t}}),St=$n("chat",()=>{const{stream:t}=Zl(),{systemPrompt:e}=qe(Vl()),n=W(!1),r=W([]),i=W([]),o=W([]),a=W([]),s=W([]),l=W([]),u=W([]),c=W([]);function f(h){r.value.push(h)}function p(h){i.value.push(h)}function d(h){o.value.push(h)}function b(h){a.value.push(h)}function y(h){s.value.push(h)}function x(h){l.value.push(h)}function k(h){u.value.push(h)}function S(h){c.value.push(h)}const A=W([{role:"system",content:e.value}]),C=W({role:"assistant",content:""});async function P(h,I){var v;try{if(n.value=!0,!h)return;for(const D of r.value)await D(h);C.value={role:"assistant",content:""},A.value.push({role:"user",content:h}),A.value.push(C.value);const g=A.value.slice(0,A.value.length-1).map(D=>Rs(D));for(const D of i.value)await D(h);for(const D of o.value)await D(h);const m=(v=I.providerConfig)==null?void 0:v.headers,T=m==null?void 0:m.filter(D=>D.key&&D.value).reduce((D,F)=>(D[F.key]=F.value,D),{}),E=await t(I.model,I.chatProvider,g,{headers:T});for(const D of a.value)await D(h);let z="";const U=Ql({onLiteral:async D=>{for(const F of s.value)await F(D);C.value.content+=D},onSpecial:async D=>{for(const F of l.value)await F(D)}});for await(const D of Yl(E.textStream,async F=>F))z+=D,await U.consume(D);await U.end();for(const D of u.value)await D();for(const D of c.value)await D(z);console.debug("LLM output:",z)}finally{n.value=!1}}return{sending:n,messages:A,streamingMessage:C,send:P,onBeforeMessageComposed:f,onAfterMessageComposed:p,onBeforeSend:d,onAfterSend:b,onTokenLiteral:y,onTokenSpecial:x,onStreamEnd:k,onAssistantResponseEnd:S}}),ha=ze({__name:"Screen",setup(t){const e=W(),n=Cs(Ls),{width:r,height:i}=Ns(),o=Qr(e,{immediate:!0,windowResize:!0,reset:!0}),a=Ue(()=>n.between("sm","md").value||n.smaller("sm").value),s=Ue(()=>n.between("md","lg").value),l=Ue(()=>n.greaterOrEqual("lg").value),u=Ue(()=>l.value?o.width.value:a.value||s.value?r.value-16:o.width.value),c=W(0);return je([r,i,e],()=>{var p,d;const f=(d=(p=e.value)==null?void 0:p.parentElement)==null?void 0:d.getBoundingClientRect();l.value||a.value||s.value?c.value=(f==null?void 0:f.height)||0:c.value=600}),je([o.width,o.height],()=>{l.value||a.value||s.value?c.value=o.height.value:c.value=600}),pn(async()=>{e.value&&o.update()}),(f,p)=>(Q(),re("div",{ref_key:"containerRef",ref:e,"h-full":"","w-full":""},[gn(f.$slots,"default",{width:u.value,height:c.value})],512))}}),Jl={absolute:"",bottom:"3",right:"3"},eu={flex:"~ row","cursor-pointer":""},tu=["checked","aria-checked"],nu={key:0,"min-w":"50vw",z:"(Q(),Xt(ha,{relative:""},{default:Fe(({width:a,height:s})=>[ke(Gl,{width:a,height:s},{default:Fe(({app:l})=>[ke(Hl,{app:l,"mouth-open-size":t.mouthOpenSize,width:a,height:s,paused:t.paused},null,8,["app","mouth-open-size","width","height","paused"])]),_:2},1032,["width","height"]),O("div",Jl,[O("div",eu,[O("label",{class:st([n.value?"bg-zinc-300 dark:bg-zinc-200":"bg-zinc-100 dark:bg-zinc-700"]),transition:"all ease-in-out duration-500",text:"lg zinc-500 dark:zinc-400","m-1":"","h-fit":"","w-fit":"","cursor-pointer":"","appearance-none":"","gap-1":"","rounded-lg":"","rounded-md":"","border-none":"","p-2":"","outline-none":""},[At(O("input",{"onUpdate:modelValue":o[0]||(o[0]=l=>n.value=l),checked:n.value,"aria-checked":n.value,name:"showLive2DViewerInspector",type:"checkbox",hidden:"","appearance-none":"","outline-none":""},null,8,tu),[[Zr,n.value]]),o[8]||(o[8]=O("div",{"select-none":""},[O("div",{"i-solar:bug-bold-duotone":""})],-1))],2)]),ke(ui,null,{default:Fe(()=>[n.value?(Q(),re("div",nu,[O("div",ru,[O("div",iu,[O("span",null,he(H(e)("stage.viewers.debug-menu.emotions")),1)]),O("div",ou,[O("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[1]||(o[1]=l=>r.value={group:"Surprise",index:0})},he(H(e)("stage.viewers.debug-menu.emotions-btn.surprised")),1),O("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[2]||(o[2]=l=>r.value={group:"Sad",index:0})},he(H(e)("stage.viewers.debug-menu.emotions-btn.sad")),1),O("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[3]||(o[3]=l=>r.value={group:"Angry",index:0})},he(H(e)("stage.viewers.debug-menu.emotions-btn.angry")),1),O("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[4]||(o[4]=l=>r.value={group:"Happy",index:0})},he(H(e)("stage.viewers.debug-menu.emotions-btn.happy")),1),O("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[5]||(o[5]=l=>r.value={group:"Awkward",index:0})},he(H(e)("stage.viewers.debug-menu.emotions-btn.awkward")),1),O("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[6]||(o[6]=l=>r.value={group:"Question",index:0})},he(H(e)("stage.viewers.debug-menu.emotions-btn.question")),1),O("button",{"rounded-lg":"",bg:"zinc-100/70 dark:zinc-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[7]||(o[7]=l=>r.value={group:"Think",index:0})},he(H(e)("stage.viewers.debug-menu.emotions-btn.think")),1)])])])):it("",!0)]),_:1})])]),_:1}))}});var su=Object.defineProperty,lu=(t,e,n)=>e in t?su(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,uu=(t,e,n)=>lu(t,e+"",n);function cu(t){return Hs()?(Gs(t),!0):!1}function ma(t){return typeof t=="function"?t():H(t)}const fu=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const du=Object.prototype.toString,pu=t=>du.call(t)==="[object Object]",hu=()=>{},mu=fu?window:void 0;function gu(t){var e;const n=ma(t);return(e=n==null?void 0:n.$el)!=null?e:n}function ar(...t){let e,n,r,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,r,i]=t,e=mu):[e,n,r,i]=t,!e)return hu;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],a=()=>{o.forEach(c=>c()),o.length=0},s=(c,f,p,d)=>(c.addEventListener(f,p,d),()=>c.removeEventListener(f,p,d)),l=je(()=>[gu(e),ma(i)],([c,f])=>{if(a(),!c)return;const p=pu(f)?{...f}:f;o.push(...n.flatMap(d=>r.map(b=>s(c,d,b,p))))},{immediate:!0,flush:"post"}),u=()=>{l(),a()};return cu(u),u}function ga(t,e,n,r){const i=class extends yn{constructor(o={}){const a=Object.entries(t);super({uniforms:a.reduce((s,[l,u])=>{const c=ni.clone({[l]:{value:u}});return{...s,...c}},{}),vertexShader:e,fragmentShader:n}),uu(this,"key",""),a.forEach(([s])=>Object.defineProperty(this,s,{get:()=>this.uniforms[s].value,set:l=>this.uniforms[s].value=l})),Object.assign(this,o)}};return i.key=Dt.generateUUID(),i}ga({color:new Be("white"),scale:new Pe(1,1),imageBounds:new Pe(1,1),resolution:1024,map:null,zoom:1,radius:0,grayscale:0,opacity:1},` varying vec2 vUv; varying vec2 vPos; void main() { diff --git a/assets/live2d-zip-loader-dDw0Wbbr.js b/assets/live2d-zip-loader--bTGFeQd.js similarity index 99% rename from assets/live2d-zip-loader-dDw0Wbbr.js rename to assets/live2d-zip-loader--bTGFeQd.js index f67a872851d66db29184ba44e3804d61e745e966..667c1aad403455bdb9986a7a0479cc0eb2e8667b 100644 --- a/assets/live2d-zip-loader-dDw0Wbbr.js +++ b/assets/live2d-zip-loader--bTGFeQd.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-node-DzW5muPs.js","assets/index-7-fr_lhT.js","assets/index-CTJI80_d.css","assets/import-url-browser-CPN8ipMD.js","assets/duckdb-mvp-CaaD-olE.js","assets/import-url-node-BfNoxhRr.js"])))=>i.map(i=>d[i]); -var f1=Object.defineProperty;var p1=(r,t,e)=>t in r?f1(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var W=(r,t,e)=>p1(r,typeof t!="symbol"?t+"":t,e);import{bm as Ef,ch as Dn,b2 as m1,a0 as g1,a9 as Fe,V as mt,Q as ne,a3 as Ps,ba as No,av as Xp,ag as Yp,ak as qp,b3 as ec,b6 as Af,ci as y1,$ as v1,cj as _1,a1 as b1,ck as Ho,cl as xn,W as qr,a4 as Wn,a_ as Ca,as as nr,cm as w1,X as Ui,b7 as x1,b5 as S1,cn as Qp,bb as Mf,co as T1,aj as Jl,J as co,bc as I1,bf as E1,bg as A1,bp as M1,cp as Ei}from"./index-7-fr_lhT.js";/*! +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-node-BGL82aP-.js","assets/index-hDb1Lsb8.js","assets/index-CTJI80_d.css","assets/import-url-browser-CPN8ipMD.js","assets/duckdb-mvp-CaaD-olE.js","assets/import-url-node-BfNoxhRr.js"])))=>i.map(i=>d[i]); +var f1=Object.defineProperty;var p1=(r,t,e)=>t in r?f1(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var W=(r,t,e)=>p1(r,typeof t!="symbol"?t+"":t,e);import{bm as Ef,ch as Dn,b2 as m1,a0 as g1,a9 as Fe,V as mt,Q as ne,a3 as Ps,ba as No,av as Xp,ag as Yp,ak as qp,b3 as ec,b6 as Af,ci as y1,$ as v1,cj as _1,a1 as b1,ck as Ho,cl as xn,W as qr,a4 as Wn,a_ as Ca,as as nr,cm as w1,X as Ui,b7 as x1,b5 as S1,cn as Qp,bb as Mf,co as T1,aj as Jl,J as co,bc as I1,bf as E1,bg as A1,bp as M1,cp as Ei}from"./index-hDb1Lsb8.js";/*! * @pixi/constants - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * @@ -4069,13 +4069,13 @@ void main() { */function Jt(r,t,e,n){function i(s){return s instanceof e?s:new e(function(o){o(s)})}return new(e||(e=Promise))(function(s,o){function a(c){try{u(n.next(c))}catch(h){o(h)}}function l(c){try{u(n.throw(c))}catch(h){o(h)}}function u(c){c.done?s(c.value):i(c.value).then(a,l)}u((n=n.apply(r,t||[])).next())})}function Zg(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Rt(r){return this instanceof Rt?(this.v=r,this):new Rt(r)}function br(r,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=e.apply(r,t||[]),i,s=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(d){return function(m){return Promise.resolve(m).then(d,h)}}function a(d,m){n[d]&&(i[d]=function(g){return new Promise(function(p,y){s.push([d,g,p,y])>1||l(d,g)})},m&&(i[d]=m(i[d])))}function l(d,m){try{u(n[d](m))}catch(g){f(s[0][3],g)}}function u(d){d.value instanceof Rt?Promise.resolve(d.value.v).then(c,h):f(s[0][2],d)}function c(d){l("next",d)}function h(d){l("throw",d)}function f(d,m){d(m),s.shift(),s.length&&l(s[0][0],s[0][1])}}function Ss(r){var t,e;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,s){t[i]=r[i]?function(o){return(e=!e)?{value:Rt(r[i](o)),done:!1}:s?s(o):o}:s}}function Bn(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=r[Symbol.asyncIterator],e;return t?t.call(r):(r=typeof Zg=="function"?Zg(r):r[Symbol.iterator](),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(s){e[s]=r[s]&&function(o){return new Promise(function(a,l){o=r[s](o),i(a,l,o.done,o.value)})}}function i(s,o,a,l){Promise.resolve(l).then(function(u){s({value:u,done:a})},o)}}const VR=new TextDecoder("utf-8"),Wd=r=>VR.decode(r),jR=new TextEncoder,Zf=r=>jR.encode(r),$R=r=>typeof r=="number",Rb=r=>typeof r=="boolean",Ye=r=>typeof r=="function",wr=r=>r!=null&&Object(r)===r,Is=r=>wr(r)&&Ye(r.then),Qa=r=>wr(r)&&Ye(r[Symbol.iterator]),Uo=r=>wr(r)&&Ye(r[Symbol.asyncIterator]),Hd=r=>wr(r)&&wr(r.schema),Fb=r=>wr(r)&&"done"in r&&"value"in r,Db=r=>wr(r)&&Ye(r.stat)&&$R(r.fd),Lb=r=>wr(r)&&Kf(r.body),oc=r=>"_getDOMStream"in r&&"_getNodeStream"in r,GR=r=>wr(r)&&Ye(r.abort)&&Ye(r.getWriter)&&!oc(r),Kf=r=>wr(r)&&Ye(r.cancel)&&Ye(r.getReader)&&!oc(r),WR=r=>wr(r)&&Ye(r.end)&&Ye(r.write)&&Rb(r.writable)&&!oc(r),Nb=r=>wr(r)&&Ye(r.read)&&Ye(r.pipe)&&Rb(r.readable)&&!oc(r),HR=r=>wr(r)&&Ye(r.clear)&&Ye(r.bytes)&&Ye(r.position)&&Ye(r.setPosition)&&Ye(r.capacity)&&Ye(r.getBufferIdentifier)&&Ye(r.createLong),Jf=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:ArrayBuffer;function XR(r){const t=r[0]?[r[0]]:[];let e,n,i,s;for(let o,a,l=0,u=0,c=r.length;++lc+h.byteLength,0);let i,s,o,a=0,l=-1;const u=Math.min(t||Number.POSITIVE_INFINITY,n);for(const c=e.length;++lxe(Int32Array,r),Jg=r=>xe(BigInt64Array,r),ce=r=>xe(Uint8Array,r),Xd=r=>(r.next(),r);function*YR(r,t){const e=function*(i){yield i},n=typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof Jf?e(t):Qa(t)?t:e(t);return yield*Xd(function*(i){let s=null;do s=i.next(yield xe(r,s));while(!s.done)}(n[Symbol.iterator]())),new r}const qR=r=>YR(Uint8Array,r);function Bb(r,t){return br(this,arguments,function*(){if(Is(t))return yield Rt(yield Rt(yield*Ss(Bn(Bb(r,yield Rt(t))))));const n=function(o){return br(this,arguments,function*(){yield yield Rt(yield Rt(o))})},i=function(o){return br(this,arguments,function*(){yield Rt(yield*Ss(Bn(Xd(function*(a){let l=null;do l=a.next(yield l==null?void 0:l.value);while(!l.done)}(o[Symbol.iterator]())))))})},s=typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof Jf?n(t):Qa(t)?i(t):Uo(t)?t:n(t);return yield Rt(yield*Ss(Bn(Xd(function(o){return br(this,arguments,function*(){let a=null;do a=yield Rt(o.next(yield yield Rt(xe(r,a))));while(!a.done)})}(s[Symbol.asyncIterator]()))))),yield Rt(new r)})}const QR=r=>Bb(Uint8Array,r);function Ub(r,t,e){if(r!==0){e=e.slice(0,t);for(let n=-1,i=e.length;++n0)do if(r[e]!==t[e])return!1;while(++e(r.next(),r);function*KR(r){let t,e=!1,n=[],i,s,o,a=0;function l(){return s==="peek"?kn(n,o)[0]:([i,n,a]=kn(n,o),i)}({cmd:s,size:o}=(yield null)||{cmd:"read",size:0});const u=qR(r)[Symbol.iterator]();try{do if({done:t,value:i}=Number.isNaN(o-a)?u.next():u.next(o-a),!t&&i.byteLength>0&&(n.push(i),a+=i.byteLength),t||o<=a)do({cmd:s,size:o}=yield l());while(o0&&(i.push(s),l+=s.byteLength),e||a<=l)do({cmd:o,size:a}=yield yield Rt(u()));while(a0&&(i.push(ce(s)),l+=s.byteLength),e||a<=l)do({cmd:o,size:a}=yield yield Rt(u()));while(a{})}get closed(){return this.reader?this.reader.closed.catch(()=>{}):Promise.resolve()}releaseLock(){this.reader&&this.reader.releaseLock(),this.reader=null}cancel(t){return Jt(this,void 0,void 0,function*(){const{reader:e,source:n}=this;e&&(yield e.cancel(t).catch(()=>{})),n&&n.locked&&this.releaseLock()})}read(t){return Jt(this,void 0,void 0,function*(){if(t===0)return{done:this.reader==null,value:new Uint8Array(0)};const e=yield this.reader.read();return!e.done&&(e.value=ce(e)),e})}}const Ah=(r,t)=>{const e=i=>n([t,i]);let n;return[t,e,new Promise(i=>(n=i)&&r.once(t,e))]};function rF(r){return br(this,arguments,function*(){const e=[];let n="error",i=!1,s=null,o,a,l=0,u=[],c;function h(){return o==="peek"?kn(u,a)[0]:([c,u,l]=kn(u,a),c)}if({cmd:o,size:a}=(yield yield Rt(null))||{cmd:"read",size:0},r.isTTY)return yield yield Rt(new Uint8Array(0)),yield Rt(null);try{e[0]=Ah(r,"end"),e[1]=Ah(r,"error");do{if(e[2]=Ah(r,"readable"),[n,s]=yield Rt(Promise.race(e.map(d=>d[2]))),n==="error")break;if((i=n==="end")||(Number.isFinite(a-l)?(c=ce(r.read(a-l)),c.byteLength0&&(u.push(c),l+=c.byteLength)),i||a<=l)do({cmd:o,size:a}=yield yield Rt(h()));while(a{for(const[y,_]of d)r.off(y,_);try{const y=r.destroy;y&&y.call(r,m),m=void 0}catch(y){m=y||m}finally{m!=null?p(m):g()}})}})}var je;(function(r){r[r.V1=0]="V1",r[r.V2=1]="V2",r[r.V3=2]="V3",r[r.V4=3]="V4",r[r.V5=4]="V5"})(je||(je={}));var lr;(function(r){r[r.Sparse=0]="Sparse",r[r.Dense=1]="Dense"})(lr||(lr={}));var ar;(function(r){r[r.HALF=0]="HALF",r[r.SINGLE=1]="SINGLE",r[r.DOUBLE=2]="DOUBLE"})(ar||(ar={}));var nn;(function(r){r[r.DAY=0]="DAY",r[r.MILLISECOND=1]="MILLISECOND"})(nn||(nn={}));var Vt;(function(r){r[r.SECOND=0]="SECOND",r[r.MILLISECOND=1]="MILLISECOND",r[r.MICROSECOND=2]="MICROSECOND",r[r.NANOSECOND=3]="NANOSECOND"})(Vt||(Vt={}));var zn;(function(r){r[r.YEAR_MONTH=0]="YEAR_MONTH",r[r.DAY_TIME=1]="DAY_TIME",r[r.MONTH_DAY_NANO=2]="MONTH_DAY_NANO"})(zn||(zn={}));const Mh=2,Pn=4,oi=4,_e=4,Ti=new Int32Array(2),ty=new Float32Array(Ti.buffer),ey=new Float64Array(Ti.buffer),Dl=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;var Yd;(function(r){r[r.UTF8_BYTES=1]="UTF8_BYTES",r[r.UTF16_STRING=2]="UTF16_STRING"})(Yd||(Yd={}));let Mo=class kb{constructor(t){this.bytes_=t,this.position_=0,this.text_decoder_=new TextDecoder}static allocate(t){return new kb(new Uint8Array(t))}clear(){this.position_=0}bytes(){return this.bytes_}position(){return this.position_}setPosition(t){this.position_=t}capacity(){return this.bytes_.length}readInt8(t){return this.readUint8(t)<<24>>24}readUint8(t){return this.bytes_[t]}readInt16(t){return this.readUint16(t)<<16>>16}readUint16(t){return this.bytes_[t]|this.bytes_[t+1]<<8}readInt32(t){return this.bytes_[t]|this.bytes_[t+1]<<8|this.bytes_[t+2]<<16|this.bytes_[t+3]<<24}readUint32(t){return this.readInt32(t)>>>0}readInt64(t){return BigInt.asIntN(64,BigInt(this.readUint32(t))+(BigInt(this.readUint32(t+4))<>8}writeUint16(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8}writeInt32(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8,this.bytes_[t+2]=e>>16,this.bytes_[t+3]=e>>24}writeUint32(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8,this.bytes_[t+2]=e>>16,this.bytes_[t+3]=e>>24}writeInt64(t,e){this.writeInt32(t,Number(BigInt.asIntN(32,e))),this.writeInt32(t+4,Number(BigInt.asIntN(32,e>>BigInt(32))))}writeUint64(t,e){this.writeUint32(t,Number(BigInt.asUintN(32,e))),this.writeUint32(t+4,Number(BigInt.asUintN(32,e>>BigInt(32))))}writeFloat32(t,e){ty[0]=e,this.writeInt32(t,Ti[0])}writeFloat64(t,e){ey[0]=e,this.writeInt32(t,Ti[Dl?0:1]),this.writeInt32(t+4,Ti[Dl?1:0])}getBufferIdentifier(){if(this.bytes_.lengththis.minalign&&(this.minalign=t);const n=~(this.bb.capacity()-this.space+e)+1&t-1;for(;this.space=0&&this.vtable[e]==0;e--);const n=e+1;for(;e>=0;e--)this.addInt16(this.vtable[e]!=0?t-this.vtable[e]:0);const i=2;this.addInt16(t-this.object_start);const s=(n+i)*Mh;this.addInt16(s);let o=0;const a=this.space;t:for(e=0;e=0;o--)this.writeInt8(s.charCodeAt(o))}this.prep(this.minalign,Pn+i),this.addOffset(t),i&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)}finishSizePrefixed(t,e){this.finish(t,e,!0)}requiredField(t,e){const n=this.bb.capacity()-t,i=n-this.bb.readInt32(n);if(!(e=0;n--)t.addInt32(e[n]);return t.endVector()}static startTypeIdsVector(t,e){t.startVector(4,e,4)}static endUnion(t){return t.endObject()}static createUnion(t,e,n){return vr.startUnion(t),vr.addMode(t,e),vr.addTypeIds(t,n),vr.endUnion(t)}}let ly=class _a{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsUtf8(t,e){return(e||new _a).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsUtf8(t,e){return t.setPosition(t.position()+_e),(e||new _a).__init(t.readInt32(t.position())+t.position(),t)}static startUtf8(t){t.startObject(0)}static endUtf8(t){return t.endObject()}static createUtf8(t){return _a.startUtf8(t),_a.endUtf8(t)}};var Ee;(function(r){r[r.NONE=0]="NONE",r[r.Null=1]="Null",r[r.Int=2]="Int",r[r.FloatingPoint=3]="FloatingPoint",r[r.Binary=4]="Binary",r[r.Utf8=5]="Utf8",r[r.Bool=6]="Bool",r[r.Decimal=7]="Decimal",r[r.Date=8]="Date",r[r.Time=9]="Time",r[r.Timestamp=10]="Timestamp",r[r.Interval=11]="Interval",r[r.List=12]="List",r[r.Struct_=13]="Struct_",r[r.Union=14]="Union",r[r.FixedSizeBinary=15]="FixedSizeBinary",r[r.FixedSizeList=16]="FixedSizeList",r[r.Map=17]="Map",r[r.Duration=18]="Duration",r[r.LargeBinary=19]="LargeBinary",r[r.LargeUtf8=20]="LargeUtf8",r[r.LargeList=21]="LargeList",r[r.RunEndEncoded=22]="RunEndEncoded"})(Ee||(Ee={}));let Wr=class Hl{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsField(t,e){return(e||new Hl).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsField(t,e){return t.setPosition(t.position()+_e),(e||new Hl).__init(t.readInt32(t.position())+t.position(),t)}name(t){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.__string(this.bb_pos+e,t):null}nullable(){const t=this.bb.__offset(this.bb_pos,6);return t?!!this.bb.readInt8(this.bb_pos+t):!1}typeType(){const t=this.bb.__offset(this.bb_pos,8);return t?this.bb.readUint8(this.bb_pos+t):Ee.NONE}type(t){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__union(t,this.bb_pos+e):null}dictionary(t){const e=this.bb.__offset(this.bb_pos,12);return e?(t||new ai).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}children(t,e){const n=this.bb.__offset(this.bb_pos,14);return n?(e||new Hl).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+t*4),this.bb):null}childrenLength(){const t=this.bb.__offset(this.bb_pos,14);return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,e){const n=this.bb.__offset(this.bb_pos,16);return n?(e||new qe).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+t*4),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,16);return t?this.bb.__vector_len(this.bb_pos+t):0}static startField(t){t.startObject(7)}static addName(t,e){t.addFieldOffset(0,e,0)}static addNullable(t,e){t.addFieldInt8(1,+e,0)}static addTypeType(t,e){t.addFieldInt8(2,e,Ee.NONE)}static addType(t,e){t.addFieldOffset(3,e,0)}static addDictionary(t,e){t.addFieldOffset(4,e,0)}static addChildren(t,e){t.addFieldOffset(5,e,0)}static createChildrenVector(t,e){t.startVector(4,e.length,4);for(let n=e.length-1;n>=0;n--)t.addOffset(e[n]);return t.endVector()}static startChildrenVector(t,e){t.startVector(4,e,4)}static addCustomMetadata(t,e){t.addFieldOffset(6,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4);for(let n=e.length-1;n>=0;n--)t.addOffset(e[n]);return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endField(t){return t.endObject()}},In=class Zn{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsSchema(t,e){return(e||new Zn).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsSchema(t,e){return t.setPosition(t.position()+_e),(e||new Zn).__init(t.readInt32(t.position())+t.position(),t)}endianness(){const t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):Co.Little}fields(t,e){const n=this.bb.__offset(this.bb_pos,6);return n?(e||new Wr).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+t*4),this.bb):null}fieldsLength(){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,e){const n=this.bb.__offset(this.bb_pos,8);return n?(e||new qe).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+t*4),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__vector_len(this.bb_pos+t):0}features(t){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt64(this.bb.__vector(this.bb_pos+e)+t*8):BigInt(0)}featuresLength(){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__vector_len(this.bb_pos+t):0}static startSchema(t){t.startObject(4)}static addEndianness(t,e){t.addFieldInt16(0,e,Co.Little)}static addFields(t,e){t.addFieldOffset(1,e,0)}static createFieldsVector(t,e){t.startVector(4,e.length,4);for(let n=e.length-1;n>=0;n--)t.addOffset(e[n]);return t.endVector()}static startFieldsVector(t,e){t.startVector(4,e,4)}static addCustomMetadata(t,e){t.addFieldOffset(2,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4);for(let n=e.length-1;n>=0;n--)t.addOffset(e[n]);return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static addFeatures(t,e){t.addFieldOffset(3,e,0)}static createFeaturesVector(t,e){t.startVector(8,e.length,8);for(let n=e.length-1;n>=0;n--)t.addInt64(e[n]);return t.endVector()}static startFeaturesVector(t,e){t.startVector(8,e,8)}static endSchema(t){return t.endObject()}static finishSchemaBuffer(t,e){t.finish(e)}static finishSizePrefixedSchemaBuffer(t,e){t.finish(e,void 0,!0)}static createSchema(t,e,n,i,s){return Zn.startSchema(t),Zn.addEndianness(t,e),Zn.addFields(t,n),Zn.addCustomMetadata(t,i),Zn.addFeatures(t,s),Zn.endSchema(t)}};var me;(function(r){r[r.NONE=0]="NONE",r[r.Schema=1]="Schema",r[r.DictionaryBatch=2]="DictionaryBatch",r[r.RecordBatch=3]="RecordBatch",r[r.Tensor=4]="Tensor",r[r.SparseTensor=5]="SparseTensor"})(me||(me={}));var k;(function(r){r[r.NONE=0]="NONE",r[r.Null=1]="Null",r[r.Int=2]="Int",r[r.Float=3]="Float",r[r.Binary=4]="Binary",r[r.Utf8=5]="Utf8",r[r.Bool=6]="Bool",r[r.Decimal=7]="Decimal",r[r.Date=8]="Date",r[r.Time=9]="Time",r[r.Timestamp=10]="Timestamp",r[r.Interval=11]="Interval",r[r.List=12]="List",r[r.Struct=13]="Struct",r[r.Union=14]="Union",r[r.FixedSizeBinary=15]="FixedSizeBinary",r[r.FixedSizeList=16]="FixedSizeList",r[r.Map=17]="Map",r[r.Duration=18]="Duration",r[r.LargeBinary=19]="LargeBinary",r[r.LargeUtf8=20]="LargeUtf8",r[r.Dictionary=-1]="Dictionary",r[r.Int8=-2]="Int8",r[r.Int16=-3]="Int16",r[r.Int32=-4]="Int32",r[r.Int64=-5]="Int64",r[r.Uint8=-6]="Uint8",r[r.Uint16=-7]="Uint16",r[r.Uint32=-8]="Uint32",r[r.Uint64=-9]="Uint64",r[r.Float16=-10]="Float16",r[r.Float32=-11]="Float32",r[r.Float64=-12]="Float64",r[r.DateDay=-13]="DateDay",r[r.DateMillisecond=-14]="DateMillisecond",r[r.TimestampSecond=-15]="TimestampSecond",r[r.TimestampMillisecond=-16]="TimestampMillisecond",r[r.TimestampMicrosecond=-17]="TimestampMicrosecond",r[r.TimestampNanosecond=-18]="TimestampNanosecond",r[r.TimeSecond=-19]="TimeSecond",r[r.TimeMillisecond=-20]="TimeMillisecond",r[r.TimeMicrosecond=-21]="TimeMicrosecond",r[r.TimeNanosecond=-22]="TimeNanosecond",r[r.DenseUnion=-23]="DenseUnion",r[r.SparseUnion=-24]="SparseUnion",r[r.IntervalDayTime=-25]="IntervalDayTime",r[r.IntervalYearMonth=-26]="IntervalYearMonth",r[r.DurationSecond=-27]="DurationSecond",r[r.DurationMillisecond=-28]="DurationMillisecond",r[r.DurationMicrosecond=-29]="DurationMicrosecond",r[r.DurationNanosecond=-30]="DurationNanosecond"})(k||(k={}));var ni;(function(r){r[r.OFFSET=0]="OFFSET",r[r.DATA=1]="DATA",r[r.VALIDITY=2]="VALIDITY",r[r.TYPE=3]="TYPE"})(ni||(ni={}));const nF=void 0;function Ba(r){if(r===null)return"null";if(r===nF)return"undefined";switch(typeof r){case"number":return`${r}`;case"bigint":return`${r}`;case"string":return`"${r}"`}return typeof r[Symbol.toPrimitive]=="function"?r[Symbol.toPrimitive]("string"):ArrayBuffer.isView(r)?r instanceof BigInt64Array||r instanceof BigUint64Array?`[${[...r].map(t=>Ba(t))}]`:`[${r}]`:ArrayBuffer.isView(r)?`[${r}]`:JSON.stringify(r,(t,e)=>typeof e=="bigint"?`${e}`:e)}function Te(r){if(typeof r=="bigint"&&(rNumber.MAX_SAFE_INTEGER))throw new TypeError(`${r} is not safe to convert to a number.`);return Number(r)}function Gb(r,t){return Te(r/t)+Te(r%t)/Te(t)}const iF=Symbol.for("isArrowBigNum");function pn(r,...t){return t.length===0?Object.setPrototypeOf(xe(this.TypedArray,r),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(r,...t),this.constructor.prototype)}pn.prototype[iF]=!0;pn.prototype.toJSON=function(){return`"${ka(this)}"`};pn.prototype.valueOf=function(r){return Wb(this,r)};pn.prototype.toString=function(){return ka(this)};pn.prototype[Symbol.toPrimitive]=function(r="default"){switch(r){case"number":return Wb(this);case"string":return ka(this);case"default":return aF(this)}return ka(this)};function vo(...r){return pn.apply(this,r)}function _o(...r){return pn.apply(this,r)}function Ua(...r){return pn.apply(this,r)}Object.setPrototypeOf(vo.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(_o.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(Ua.prototype,Object.create(Uint32Array.prototype));Object.assign(vo.prototype,pn.prototype,{constructor:vo,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array});Object.assign(_o.prototype,pn.prototype,{constructor:_o,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array});Object.assign(Ua.prototype,pn.prototype,{constructor:Ua,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const sF=BigInt(4294967296)*BigInt(4294967296),oF=sF-BigInt(1);function Wb(r,t){const{buffer:e,byteOffset:n,byteLength:i,signed:s}=r,o=new BigUint64Array(e,n,i/8),a=s&&o.at(-1)&BigInt(1)<=0)return Ch(r);t=t.slice();let n=1;for(let s=0;s(r.children=null,r.ArrayType=Array,r.OffsetArrayType=Int32Array,r[Symbol.toStringTag]="DataType"))(Ot.prototype);let Ri=class extends Ot{constructor(){super(k.Null)}toString(){return"Null"}};Yb=Symbol.toStringTag;Ri[Yb]=(r=>r[Symbol.toStringTag]="Null")(Ri.prototype);let Es=class extends Ot{constructor(t,e){super(k.Int),this.isSigned=t,this.bitWidth=e}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:return this.isSigned?Int32Array:Uint32Array;case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}};qb=Symbol.toStringTag;Es[qb]=(r=>(r.isSigned=null,r.bitWidth=null,r[Symbol.toStringTag]="Int"))(Es.prototype);class za extends Es{constructor(){super(!0,32)}get ArrayType(){return Int32Array}}Object.defineProperty(za.prototype,"ArrayType",{value:Int32Array});let mu=class extends Ot{constructor(t){super(k.Float),this.precision=t}get ArrayType(){switch(this.precision){case ar.HALF:return Uint16Array;case ar.SINGLE:return Float32Array;case ar.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};Qb=Symbol.toStringTag;mu[Qb]=(r=>(r.precision=null,r[Symbol.toStringTag]="Float"))(mu.prototype);let gu=class extends Ot{constructor(){super(k.Binary)}toString(){return"Binary"}};Zb=Symbol.toStringTag;gu[Zb]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Binary"))(gu.prototype);let yu=class extends Ot{constructor(){super(k.LargeBinary)}toString(){return"LargeBinary"}};Kb=Symbol.toStringTag;yu[Kb]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeBinary"))(yu.prototype);let vu=class extends Ot{constructor(){super(k.Utf8)}toString(){return"Utf8"}};Jb=Symbol.toStringTag;vu[Jb]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Utf8"))(vu.prototype);let _u=class extends Ot{constructor(){super(k.LargeUtf8)}toString(){return"LargeUtf8"}};tw=Symbol.toStringTag;_u[tw]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeUtf8"))(_u.prototype);let bu=class extends Ot{constructor(){super(k.Bool)}toString(){return"Bool"}};ew=Symbol.toStringTag;bu[ew]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Bool"))(bu.prototype);let wu=class extends Ot{constructor(t,e,n=128){super(k.Decimal),this.scale=t,this.precision=e,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}};rw=Symbol.toStringTag;wu[rw]=(r=>(r.scale=null,r.precision=null,r.ArrayType=Uint32Array,r[Symbol.toStringTag]="Decimal"))(wu.prototype);let xu=class extends Ot{constructor(t){super(k.Date),this.unit=t}toString(){return`Date${(this.unit+1)*32}<${nn[this.unit]}>`}get ArrayType(){return this.unit===nn.DAY?Int32Array:BigInt64Array}};nw=Symbol.toStringTag;xu[nw]=(r=>(r.unit=null,r[Symbol.toStringTag]="Date"))(xu.prototype);let Su=class extends Ot{constructor(t,e){super(k.Time),this.unit=t,this.bitWidth=e}toString(){return`Time${this.bitWidth}<${Vt[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}};iw=Symbol.toStringTag;Su[iw]=(r=>(r.unit=null,r.bitWidth=null,r[Symbol.toStringTag]="Time"))(Su.prototype);let Tu=class extends Ot{constructor(t,e){super(k.Timestamp),this.unit=t,this.timezone=e}toString(){return`Timestamp<${Vt[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}};sw=Symbol.toStringTag;Tu[sw]=(r=>(r.unit=null,r.timezone=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Timestamp"))(Tu.prototype);let Iu=class extends Ot{constructor(t){super(k.Interval),this.unit=t}toString(){return`Interval<${zn[this.unit]}>`}};ow=Symbol.toStringTag;Iu[ow]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Interval"))(Iu.prototype);let Eu=class extends Ot{constructor(t){super(k.Duration),this.unit=t}toString(){return`Duration<${Vt[this.unit]}>`}};aw=Symbol.toStringTag;Eu[aw]=(r=>(r.unit=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Duration"))(Eu.prototype);let Au=class extends Ot{constructor(t){super(k.List),this.children=[t]}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}};lw=Symbol.toStringTag;Au[lw]=(r=>(r.children=null,r[Symbol.toStringTag]="List"))(Au.prototype);let dr=class extends Ot{constructor(t){super(k.Struct),this.children=t}toString(){return`Struct<{${this.children.map(t=>`${t.name}:${t.type}`).join(", ")}}>`}};uw=Symbol.toStringTag;dr[uw]=(r=>(r.children=null,r[Symbol.toStringTag]="Struct"))(dr.prototype);let Mu=class extends Ot{constructor(t,e,n){super(k.Union),this.mode=t,this.children=n,this.typeIds=e=Int32Array.from(e),this.typeIdToChildIndex=e.reduce((i,s,o)=>(i[s]=o)&&i||i,Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(t=>`${t.type}`).join(" | ")}>`}};cw=Symbol.toStringTag;Mu[cw]=(r=>(r.mode=null,r.typeIds=null,r.children=null,r.typeIdToChildIndex=null,r.ArrayType=Int8Array,r[Symbol.toStringTag]="Union"))(Mu.prototype);let Cu=class extends Ot{constructor(t){super(k.FixedSizeBinary),this.byteWidth=t}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};hw=Symbol.toStringTag;Cu[hw]=(r=>(r.byteWidth=null,r.ArrayType=Uint8Array,r[Symbol.toStringTag]="FixedSizeBinary"))(Cu.prototype);let Ou=class extends Ot{constructor(t,e){super(k.FixedSizeList),this.listSize=t,this.children=[e]}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}};dw=Symbol.toStringTag;Ou[dw]=(r=>(r.children=null,r.listSize=null,r[Symbol.toStringTag]="FixedSizeList"))(Ou.prototype);let Pu=class extends Ot{constructor(t,e=!1){var n,i,s;if(super(k.Map),this.children=[t],this.keysSorted=e,t&&(t.name="entries",!((n=t==null?void 0:t.type)===null||n===void 0)&&n.children)){const o=(i=t==null?void 0:t.type)===null||i===void 0?void 0:i.children[0];o&&(o.name="key");const a=(s=t==null?void 0:t.type)===null||s===void 0?void 0:s.children[1];a&&(a.name="value")}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map(t=>`${t.name}:${t.type}`).join(", ")}}>`}};fw=Symbol.toStringTag;Pu[fw]=(r=>(r.children=null,r.keysSorted=null,r[Symbol.toStringTag]="Map_"))(Pu.prototype);const uF=(r=>()=>++r)(-1);let Oo=class extends Ot{constructor(t,e,n,i){super(k.Dictionary),this.indices=e,this.dictionary=t,this.isOrdered=i||!1,this.id=n==null?uF():Te(n)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}};pw=Symbol.toStringTag;Oo[pw]=(r=>(r.id=null,r.indices=null,r.isOrdered=null,r.dictionary=null,r[Symbol.toStringTag]="Dictionary"))(Oo.prototype);function ii(r){const t=r;switch(r.typeId){case k.Decimal:return r.bitWidth/32;case k.Interval:return 1+t.unit;case k.FixedSizeList:return t.listSize;case k.FixedSizeBinary:return t.byteWidth;default:return 1}}let se=class{visitMany(t,...e){return t.map((n,i)=>this.visit(n,...e.map(s=>s[i])))}visit(...t){return this.getVisitFn(t[0],!1).apply(this,t)}getVisitFn(t,e=!0){return cF(this,t,e)}getVisitFnByTypeId(t,e=!0){return io(this,t,e)}visitNull(t,...e){return null}visitBool(t,...e){return null}visitInt(t,...e){return null}visitFloat(t,...e){return null}visitUtf8(t,...e){return null}visitLargeUtf8(t,...e){return null}visitBinary(t,...e){return null}visitLargeBinary(t,...e){return null}visitFixedSizeBinary(t,...e){return null}visitDate(t,...e){return null}visitTimestamp(t,...e){return null}visitTime(t,...e){return null}visitDecimal(t,...e){return null}visitList(t,...e){return null}visitStruct(t,...e){return null}visitUnion(t,...e){return null}visitDictionary(t,...e){return null}visitInterval(t,...e){return null}visitDuration(t,...e){return null}visitFixedSizeList(t,...e){return null}visitMap(t,...e){return null}};function cF(r,t,e=!0){return typeof t=="number"?io(r,t,e):typeof t=="string"&&t in k?io(r,k[t],e):t&&t instanceof Ot?io(r,uy(t),e):t!=null&&t.type&&t.type instanceof Ot?io(r,uy(t.type),e):io(r,k.NONE,e)}function io(r,t,e=!0){let n=null;switch(t){case k.Null:n=r.visitNull;break;case k.Bool:n=r.visitBool;break;case k.Int:n=r.visitInt;break;case k.Int8:n=r.visitInt8||r.visitInt;break;case k.Int16:n=r.visitInt16||r.visitInt;break;case k.Int32:n=r.visitInt32||r.visitInt;break;case k.Int64:n=r.visitInt64||r.visitInt;break;case k.Uint8:n=r.visitUint8||r.visitInt;break;case k.Uint16:n=r.visitUint16||r.visitInt;break;case k.Uint32:n=r.visitUint32||r.visitInt;break;case k.Uint64:n=r.visitUint64||r.visitInt;break;case k.Float:n=r.visitFloat;break;case k.Float16:n=r.visitFloat16||r.visitFloat;break;case k.Float32:n=r.visitFloat32||r.visitFloat;break;case k.Float64:n=r.visitFloat64||r.visitFloat;break;case k.Utf8:n=r.visitUtf8;break;case k.LargeUtf8:n=r.visitLargeUtf8;break;case k.Binary:n=r.visitBinary;break;case k.LargeBinary:n=r.visitLargeBinary;break;case k.FixedSizeBinary:n=r.visitFixedSizeBinary;break;case k.Date:n=r.visitDate;break;case k.DateDay:n=r.visitDateDay||r.visitDate;break;case k.DateMillisecond:n=r.visitDateMillisecond||r.visitDate;break;case k.Timestamp:n=r.visitTimestamp;break;case k.TimestampSecond:n=r.visitTimestampSecond||r.visitTimestamp;break;case k.TimestampMillisecond:n=r.visitTimestampMillisecond||r.visitTimestamp;break;case k.TimestampMicrosecond:n=r.visitTimestampMicrosecond||r.visitTimestamp;break;case k.TimestampNanosecond:n=r.visitTimestampNanosecond||r.visitTimestamp;break;case k.Time:n=r.visitTime;break;case k.TimeSecond:n=r.visitTimeSecond||r.visitTime;break;case k.TimeMillisecond:n=r.visitTimeMillisecond||r.visitTime;break;case k.TimeMicrosecond:n=r.visitTimeMicrosecond||r.visitTime;break;case k.TimeNanosecond:n=r.visitTimeNanosecond||r.visitTime;break;case k.Decimal:n=r.visitDecimal;break;case k.List:n=r.visitList;break;case k.Struct:n=r.visitStruct;break;case k.Union:n=r.visitUnion;break;case k.DenseUnion:n=r.visitDenseUnion||r.visitUnion;break;case k.SparseUnion:n=r.visitSparseUnion||r.visitUnion;break;case k.Dictionary:n=r.visitDictionary;break;case k.Interval:n=r.visitInterval;break;case k.IntervalDayTime:n=r.visitIntervalDayTime||r.visitInterval;break;case k.IntervalYearMonth:n=r.visitIntervalYearMonth||r.visitInterval;break;case k.Duration:n=r.visitDuration;break;case k.DurationSecond:n=r.visitDurationSecond||r.visitDuration;break;case k.DurationMillisecond:n=r.visitDurationMillisecond||r.visitDuration;break;case k.DurationMicrosecond:n=r.visitDurationMicrosecond||r.visitDuration;break;case k.DurationNanosecond:n=r.visitDurationNanosecond||r.visitDuration;break;case k.FixedSizeList:n=r.visitFixedSizeList;break;case k.Map:n=r.visitMap;break}if(typeof n=="function")return n;if(!e)return()=>null;throw new Error(`Unrecognized type '${k[t]}'`)}function uy(r){switch(r.typeId){case k.Null:return k.Null;case k.Int:{const{bitWidth:t,isSigned:e}=r;switch(t){case 8:return e?k.Int8:k.Uint8;case 16:return e?k.Int16:k.Uint16;case 32:return e?k.Int32:k.Uint32;case 64:return e?k.Int64:k.Uint64}return k.Int}case k.Float:switch(r.precision){case ar.HALF:return k.Float16;case ar.SINGLE:return k.Float32;case ar.DOUBLE:return k.Float64}return k.Float;case k.Binary:return k.Binary;case k.LargeBinary:return k.LargeBinary;case k.Utf8:return k.Utf8;case k.LargeUtf8:return k.LargeUtf8;case k.Bool:return k.Bool;case k.Decimal:return k.Decimal;case k.Time:switch(r.unit){case Vt.SECOND:return k.TimeSecond;case Vt.MILLISECOND:return k.TimeMillisecond;case Vt.MICROSECOND:return k.TimeMicrosecond;case Vt.NANOSECOND:return k.TimeNanosecond}return k.Time;case k.Timestamp:switch(r.unit){case Vt.SECOND:return k.TimestampSecond;case Vt.MILLISECOND:return k.TimestampMillisecond;case Vt.MICROSECOND:return k.TimestampMicrosecond;case Vt.NANOSECOND:return k.TimestampNanosecond}return k.Timestamp;case k.Date:switch(r.unit){case nn.DAY:return k.DateDay;case nn.MILLISECOND:return k.DateMillisecond}return k.Date;case k.Interval:switch(r.unit){case zn.DAY_TIME:return k.IntervalDayTime;case zn.YEAR_MONTH:return k.IntervalYearMonth}return k.Interval;case k.Duration:switch(r.unit){case Vt.SECOND:return k.DurationSecond;case Vt.MILLISECOND:return k.DurationMillisecond;case Vt.MICROSECOND:return k.DurationMicrosecond;case Vt.NANOSECOND:return k.DurationNanosecond}return k.Duration;case k.Map:return k.Map;case k.List:return k.List;case k.Struct:return k.Struct;case k.Union:switch(r.mode){case lr.Dense:return k.DenseUnion;case lr.Sparse:return k.SparseUnion}return k.Union;case k.FixedSizeBinary:return k.FixedSizeBinary;case k.FixedSizeList:return k.FixedSizeList;case k.Dictionary:return k.Dictionary}throw new Error(`Unrecognized type '${k[r.typeId]}'`)}se.prototype.visitInt8=null;se.prototype.visitInt16=null;se.prototype.visitInt32=null;se.prototype.visitInt64=null;se.prototype.visitUint8=null;se.prototype.visitUint16=null;se.prototype.visitUint32=null;se.prototype.visitUint64=null;se.prototype.visitFloat16=null;se.prototype.visitFloat32=null;se.prototype.visitFloat64=null;se.prototype.visitDateDay=null;se.prototype.visitDateMillisecond=null;se.prototype.visitTimestampSecond=null;se.prototype.visitTimestampMillisecond=null;se.prototype.visitTimestampMicrosecond=null;se.prototype.visitTimestampNanosecond=null;se.prototype.visitTimeSecond=null;se.prototype.visitTimeMillisecond=null;se.prototype.visitTimeMicrosecond=null;se.prototype.visitTimeNanosecond=null;se.prototype.visitDenseUnion=null;se.prototype.visitSparseUnion=null;se.prototype.visitIntervalDayTime=null;se.prototype.visitIntervalYearMonth=null;se.prototype.visitDuration=null;se.prototype.visitDurationSecond=null;se.prototype.visitDurationMillisecond=null;se.prototype.visitDurationMicrosecond=null;se.prototype.visitDurationNanosecond=null;const mw=new Float64Array(1),Ws=new Uint32Array(mw.buffer);function gw(r){const t=(r&31744)>>10,e=(r&1023)/1024,n=Math.pow(-1,(r&32768)>>15);switch(t){case 31:return n*(e?Number.NaN:1/0);case 0:return n*(e?6103515625e-14*e:0)}return n*Math.pow(2,t-15)*(1+e)}function hF(r){if(r!==r)return 32256;mw[0]=r;const t=(Ws[1]&2147483648)>>16&65535;let e=Ws[1]&2146435072,n=0;return e>=1089470464?Ws[0]>0?e=31744:(e=(e&2080374784)>>16,n=(Ws[1]&1048575)>>10):e<=1056964608?(n=1048576+(Ws[1]&1048575),n=1048576+(n<<(e>>20)-998)>>21,e=0):(e=e-1056964608>>10,n=(Ws[1]&1048575)+512>>10),t|e|n&65535}let jt=class extends se{};function Yt(r){return(t,e,n)=>{if(t.setValid(e,n!=null))return r(t,e,n)}}const dF=(r,t,e)=>{r[t]=Math.floor(e/864e5)},yw=(r,t,e,n)=>{if(e+1{const i=r+e;n?t[i>>3]|=1<>3]&=~(1<{r[t]=e},tp=({values:r},t,e)=>{r[t]=e},vw=({values:r},t,e)=>{r[t]=hF(e)},pF=(r,t,e)=>{switch(r.type.precision){case ar.HALF:return vw(r,t,e);case ar.SINGLE:case ar.DOUBLE:return tp(r,t,e)}},_w=({values:r},t,e)=>{dF(r,t,e.valueOf())},bw=({values:r},t,e)=>{r[t]=BigInt(e)},mF=({stride:r,values:t},e,n)=>{t.set(n.subarray(0,r),r*e)},ww=({values:r,valueOffsets:t},e,n)=>yw(r,t,e,n),xw=({values:r,valueOffsets:t},e,n)=>yw(r,t,e,Zf(n)),gF=(r,t,e)=>{r.type.unit===nn.DAY?_w(r,t,e):bw(r,t,e)},Sw=({values:r},t,e)=>{r[t]=BigInt(e/1e3)},Tw=({values:r},t,e)=>{r[t]=BigInt(e)},Iw=({values:r},t,e)=>{r[t]=BigInt(e*1e3)},Ew=({values:r},t,e)=>{r[t]=BigInt(e*1e6)},yF=(r,t,e)=>{switch(r.type.unit){case Vt.SECOND:return Sw(r,t,e);case Vt.MILLISECOND:return Tw(r,t,e);case Vt.MICROSECOND:return Iw(r,t,e);case Vt.NANOSECOND:return Ew(r,t,e)}},Aw=({values:r},t,e)=>{r[t]=e},Mw=({values:r},t,e)=>{r[t]=e},Cw=({values:r},t,e)=>{r[t]=e},Ow=({values:r},t,e)=>{r[t]=e},vF=(r,t,e)=>{switch(r.type.unit){case Vt.SECOND:return Aw(r,t,e);case Vt.MILLISECOND:return Mw(r,t,e);case Vt.MICROSECOND:return Cw(r,t,e);case Vt.NANOSECOND:return Ow(r,t,e)}},_F=({values:r,stride:t},e,n)=>{r.set(n.subarray(0,t),t*e)},bF=(r,t,e)=>{const n=r.children[0],i=r.valueOffsets,s=sn.getVisitFn(n);if(Array.isArray(e))for(let o=-1,a=i[t],l=i[t+1];a{const n=r.children[0],{valueOffsets:i}=r,s=sn.getVisitFn(n);let{[t]:o,[t+1]:a}=i;const l=e instanceof Map?e.entries():Object.entries(e);for(const u of l)if(s(n,o,u),++o>=a)break},xF=(r,t)=>(e,n,i,s)=>n&&e(n,r,t[s]),SF=(r,t)=>(e,n,i,s)=>n&&e(n,r,t.get(s)),TF=(r,t)=>(e,n,i,s)=>n&&e(n,r,t.get(i.name)),IF=(r,t)=>(e,n,i,s)=>n&&e(n,r,t[i.name]),EF=(r,t,e)=>{const n=r.type.children.map(s=>sn.getVisitFn(s.type)),i=e instanceof Map?TF(t,e):e instanceof Ne?SF(t,e):Array.isArray(e)?xF(t,e):IF(t,e);r.type.children.forEach((s,o)=>i(n[o],r.children[o],s,o))},AF=(r,t,e)=>{r.type.mode===lr.Dense?Pw(r,t,e):Rw(r,t,e)},Pw=(r,t,e)=>{const n=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[n];sn.visit(i,r.valueOffsets[t],e)},Rw=(r,t,e)=>{const n=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[n];sn.visit(i,t,e)},MF=(r,t,e)=>{var n;(n=r.dictionary)===null||n===void 0||n.set(r.values[t],e)},CF=(r,t,e)=>{r.type.unit===zn.DAY_TIME?Fw(r,t,e):Dw(r,t,e)},Fw=({values:r},t,e)=>{r.set(e.subarray(0,2),2*t)},Dw=({values:r},t,e)=>{r[t]=e[0]*12+e[1]%12},Lw=({values:r},t,e)=>{r[t]=e},Nw=({values:r},t,e)=>{r[t]=e},Bw=({values:r},t,e)=>{r[t]=e},Uw=({values:r},t,e)=>{r[t]=e},OF=(r,t,e)=>{switch(r.type.unit){case Vt.SECOND:return Lw(r,t,e);case Vt.MILLISECOND:return Nw(r,t,e);case Vt.MICROSECOND:return Bw(r,t,e);case Vt.NANOSECOND:return Uw(r,t,e)}},PF=(r,t,e)=>{const{stride:n}=r,i=r.children[0],s=sn.getVisitFn(i);if(Array.isArray(e))for(let o=-1,a=t*n;++o`${Ba(t)}: ${Ba(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new RF(this[un],this[bo])}},RF=class{constructor(t,e){this.childIndex=0,this.children=t.children,this.rowIndex=e,this.childFields=t.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){const t=this.childIndex;return te.name)}has(t,e){return t[un].type.children.findIndex(n=>n.name===e)!==-1}getOwnPropertyDescriptor(t,e){if(t[un].type.children.findIndex(n=>n.name===e)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e];const n=t[un].type.children.findIndex(i=>i.name===e);if(n!==-1){const i=xr.visit(t[un].children[n],t[bo]);return Reflect.set(t,e,i),i}}set(t,e,n){const i=t[un].type.children.findIndex(s=>s.name===e);return i!==-1?(sn.visit(t[un].children[i],t[bo],n),Reflect.set(t,e,n)):Reflect.has(t,e)||typeof e=="symbol"?Reflect.set(t,e,n):!1}},Ft=class extends se{};function $t(r){return(t,e)=>t.getValid(e)?r(t,e):null}const DF=(r,t)=>864e5*r[t],LF=(r,t)=>null,kw=(r,t,e)=>{if(e+1>=t.length)return null;const n=Te(t[e]),i=Te(t[e+1]);return r.subarray(n,i)},NF=({offset:r,values:t},e)=>{const n=r+e;return(t[n>>3]&1<DF(r,t),Vw=({values:r},t)=>Te(r[t]),zi=({stride:r,values:t},e)=>t[r*e],BF=({stride:r,values:t},e)=>gw(t[r*e]),jw=({values:r},t)=>r[t],UF=({stride:r,values:t},e)=>t.subarray(r*e,r*(e+1)),$w=({values:r,valueOffsets:t},e)=>kw(r,t,e),Gw=({values:r,valueOffsets:t},e)=>{const n=kw(r,t,e);return n!==null?Wd(n):null},kF=({values:r},t)=>r[t],zF=({type:r,values:t},e)=>r.precision!==ar.HALF?t[e]:gw(t[e]),VF=(r,t)=>r.type.unit===nn.DAY?zw(r,t):Vw(r,t),Ww=({values:r},t)=>1e3*Te(r[t]),Hw=({values:r},t)=>Te(r[t]),Xw=({values:r},t)=>Gb(r[t],BigInt(1e3)),Yw=({values:r},t)=>Gb(r[t],BigInt(1e6)),jF=(r,t)=>{switch(r.type.unit){case Vt.SECOND:return Ww(r,t);case Vt.MILLISECOND:return Hw(r,t);case Vt.MICROSECOND:return Xw(r,t);case Vt.NANOSECOND:return Yw(r,t)}},qw=({values:r},t)=>r[t],Qw=({values:r},t)=>r[t],Zw=({values:r},t)=>r[t],Kw=({values:r},t)=>r[t],$F=(r,t)=>{switch(r.type.unit){case Vt.SECOND:return qw(r,t);case Vt.MILLISECOND:return Qw(r,t);case Vt.MICROSECOND:return Zw(r,t);case Vt.NANOSECOND:return Kw(r,t)}},GF=({values:r,stride:t},e)=>lF.decimal(r.subarray(t*e,t*(e+1))),WF=(r,t)=>{const{valueOffsets:e,stride:n,children:i}=r,{[t*n]:s,[t*n+1]:o}=e,l=i[0].slice(s,o-s);return new Ne([l])},HF=(r,t)=>{const{valueOffsets:e,children:n}=r,{[t]:i,[t+1]:s}=e,o=n[0];return new rp(o.slice(i,s-i))},XF=(r,t)=>new ep(r,t),YF=(r,t)=>r.type.mode===lr.Dense?Jw(r,t):tx(r,t),Jw=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[e];return xr.visit(n,r.valueOffsets[t])},tx=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[e];return xr.visit(n,t)},qF=(r,t)=>{var e;return(e=r.dictionary)===null||e===void 0?void 0:e.get(r.values[t])},QF=(r,t)=>r.type.unit===zn.DAY_TIME?ex(r,t):rx(r,t),ex=({values:r},t)=>r.subarray(2*t,2*(t+1)),rx=({values:r},t)=>{const e=r[t],n=new Int32Array(2);return n[0]=Math.trunc(e/12),n[1]=Math.trunc(e%12),n},nx=({values:r},t)=>r[t],ix=({values:r},t)=>r[t],sx=({values:r},t)=>r[t],ox=({values:r},t)=>r[t],ZF=(r,t)=>{switch(r.type.unit){case Vt.SECOND:return nx(r,t);case Vt.MILLISECOND:return ix(r,t);case Vt.MICROSECOND:return sx(r,t);case Vt.NANOSECOND:return ox(r,t)}},KF=(r,t)=>{const{stride:e,children:n}=r,s=n[0].slice(t*e,e);return new Ne([s])};Ft.prototype.visitNull=$t(LF);Ft.prototype.visitBool=$t(NF);Ft.prototype.visitInt=$t(kF);Ft.prototype.visitInt8=$t(zi);Ft.prototype.visitInt16=$t(zi);Ft.prototype.visitInt32=$t(zi);Ft.prototype.visitInt64=$t(jw);Ft.prototype.visitUint8=$t(zi);Ft.prototype.visitUint16=$t(zi);Ft.prototype.visitUint32=$t(zi);Ft.prototype.visitUint64=$t(jw);Ft.prototype.visitFloat=$t(zF);Ft.prototype.visitFloat16=$t(BF);Ft.prototype.visitFloat32=$t(zi);Ft.prototype.visitFloat64=$t(zi);Ft.prototype.visitUtf8=$t(Gw);Ft.prototype.visitLargeUtf8=$t(Gw);Ft.prototype.visitBinary=$t($w);Ft.prototype.visitLargeBinary=$t($w);Ft.prototype.visitFixedSizeBinary=$t(UF);Ft.prototype.visitDate=$t(VF);Ft.prototype.visitDateDay=$t(zw);Ft.prototype.visitDateMillisecond=$t(Vw);Ft.prototype.visitTimestamp=$t(jF);Ft.prototype.visitTimestampSecond=$t(Ww);Ft.prototype.visitTimestampMillisecond=$t(Hw);Ft.prototype.visitTimestampMicrosecond=$t(Xw);Ft.prototype.visitTimestampNanosecond=$t(Yw);Ft.prototype.visitTime=$t($F);Ft.prototype.visitTimeSecond=$t(qw);Ft.prototype.visitTimeMillisecond=$t(Qw);Ft.prototype.visitTimeMicrosecond=$t(Zw);Ft.prototype.visitTimeNanosecond=$t(Kw);Ft.prototype.visitDecimal=$t(GF);Ft.prototype.visitList=$t(WF);Ft.prototype.visitStruct=$t(XF);Ft.prototype.visitUnion=$t(YF);Ft.prototype.visitDenseUnion=$t(Jw);Ft.prototype.visitSparseUnion=$t(tx);Ft.prototype.visitDictionary=$t(qF);Ft.prototype.visitInterval=$t(QF);Ft.prototype.visitIntervalDayTime=$t(ex);Ft.prototype.visitIntervalYearMonth=$t(rx);Ft.prototype.visitDuration=$t(ZF);Ft.prototype.visitDurationSecond=$t(nx);Ft.prototype.visitDurationMillisecond=$t(ix);Ft.prototype.visitDurationMicrosecond=$t(sx);Ft.prototype.visitDurationNanosecond=$t(ox);Ft.prototype.visitFixedSizeList=$t(KF);Ft.prototype.visitMap=$t(HF);const xr=new Ft,so=Symbol.for("keys"),wo=Symbol.for("vals"),oo=Symbol.for("kKeysAsStrings"),Kd=Symbol.for("_kKeysAsStrings");let rp=class{constructor(t){return this[so]=new Ne([t.children[0]]).memoize(),this[wo]=t.children[1],new Proxy(this,new t2)}get[oo](){return this[Kd]||(this[Kd]=Array.from(this[so].toArray(),String))}[Symbol.iterator](){return new JF(this[so],this[wo])}get size(){return this[so].length}toArray(){return Object.values(this.toJSON())}toJSON(){const t=this[so],e=this[wo],n={};for(let i=-1,s=t.length;++i`${Ba(t)}: ${Ba(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}},JF=class{constructor(t,e){this.keys=t,this.vals=e,this.keyIndex=0,this.numKeys=t.length}[Symbol.iterator](){return this}next(){const t=this.keyIndex;return t===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(t),xr.visit(this.vals,t)]})}},t2=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(t){return t[oo]}has(t,e){return t[oo].includes(e)}getOwnPropertyDescriptor(t,e){if(t[oo].indexOf(e)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e];const n=t[oo].indexOf(e);if(n!==-1){const i=xr.visit(Reflect.get(t,wo),n);return Reflect.set(t,e,i),i}}set(t,e,n){const i=t[oo].indexOf(e);return i!==-1?(sn.visit(Reflect.get(t,wo),i,n),Reflect.set(t,e,n)):Reflect.has(t,e)?Reflect.set(t,e,n):!1}};Object.defineProperties(rp.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[so]:{writable:!0,enumerable:!1,configurable:!1,value:null},[wo]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Kd]:{writable:!0,enumerable:!1,configurable:!1,value:null}});let cy;function ax(r,t,e,n){const{length:i=0}=r;let s=typeof t!="number"?0:t,o=typeof e!="number"?i:e;return s<0&&(s=(s%i+i)%i),o<0&&(o=(o%i+i)%i),oi&&(o=i),n?n(r,s,o):[s,o]}const np=(r,t)=>r<0?t+r:r,hy=r=>r!==r;function ko(r){if(typeof r!=="object"||r===null)return hy(r)?hy:e=>e===r;if(r instanceof Date){const e=r.valueOf();return n=>n instanceof Date?n.valueOf()===e:!1}return ArrayBuffer.isView(r)?e=>e?ZR(r,e):!1:r instanceof Map?r2(r):Array.isArray(r)?e2(r):r instanceof Ne?n2(r):i2(r,!0)}function e2(r){const t=[];for(let e=-1,n=r.length;++e!1;const n=[];for(let i=-1,s=e.length;++i{if(!e||typeof e!="object")return!1;switch(e.constructor){case Array:return s2(r,e);case Map:return dy(r,e,e.keys());case rp:case ep:case Object:case void 0:return dy(r,e,t||Object.keys(e))}return e instanceof Ne?o2(r,e):!1}}function s2(r,t){const e=r.length;if(t.length!==e)return!1;for(let n=-1;++n>n}function Ru(r,t,e){const n=e.byteLength+7&-8;if(r>0||e.byteLength>3):Fu(new ip(e,r,t,null,lx)).subarray(0,n)),i}return e}function Fu(r){const t=[];let e=0,n=0,i=0;for(const o of r)o&&(i|=1<0)&&(t[e++]=i);const s=new Uint8Array(t.length+7&-8);return s.set(t),s}let ip=class{constructor(t,e,n,i,s){this.bytes=t,this.length=n,this.context=i,this.get=s,this.bit=e%8,this.byteIndex=e>>3,this.byte=t[this.byteIndex++],this.index=0}next(){return this.index>3<<3,i=t+(t%8===0?0:8-t%8);return Jd(r,t,i)+Jd(r,n,e)+l2(r,i>>3,n-i>>3)}function l2(r,t,e){let n=0,i=Math.trunc(t);const s=new DataView(r.buffer,r.byteOffset,r.byteLength),o=e===void 0?r.byteLength:i+e;for(;o-i>=4;)n+=Oh(s.getUint32(i)),i+=4;for(;o-i>=2;)n+=Oh(s.getUint16(i)),i+=2;for(;o-i>=1;)n+=Oh(s.getUint8(i)),i+=1;return n}function Oh(r){let t=Math.trunc(r);return t=t-(t>>>1&1431655765),t=(t&858993459)+(t>>>2&858993459),(t+(t>>>4)&252645135)*16843009>>>24}const u2=-1;let Ae=class tf{get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get nullable(){if(this._nullCount!==0){const{type:t}=this;return Ot.isSparseUnion(t)?this.children.some(e=>e.nullable):Ot.isDenseUnion(t)?this.children.some(e=>e.nullable):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let t=0;const{valueOffsets:e,values:n,nullBitmap:i,typeIds:s}=this;return e&&(t+=e.byteLength),n&&(t+=n.byteLength),i&&(t+=i.byteLength),s&&(t+=s.byteLength),this.children.reduce((o,a)=>o+a.byteLength,t)}get nullCount(){if(Ot.isUnion(this.type))return this.children.reduce((n,i)=>n+i.nullCount,0);let t=this._nullCount,e;return t<=u2&&(e=this.nullBitmap)&&(this._nullCount=t=e.length===0?0:this.length-Jd(e,this.offset,this.offset+this.length)),t}constructor(t,e,n,i,s,o=[],a){this.type=t,this.children=o,this.dictionary=a,this.offset=Math.floor(Math.max(e||0,0)),this.length=Math.floor(Math.max(n||0,0)),this._nullCount=Math.floor(Math.max(i||0,-1));let l;s instanceof tf?(this.stride=s.stride,this.values=s.values,this.typeIds=s.typeIds,this.nullBitmap=s.nullBitmap,this.valueOffsets=s.valueOffsets):(this.stride=ii(t),s&&((l=s[0])&&(this.valueOffsets=l),(l=s[1])&&(this.values=l),(l=s[2])&&(this.nullBitmap=l),(l=s[3])&&(this.typeIds=l)))}getValid(t){const{type:e}=this;if(Ot.isUnion(e)){const n=e,i=this.children[n.typeIdToChildIndex[this.typeIds[t]]],s=n.mode===lr.Dense?this.valueOffsets[t]:t;return i.getValid(s)}if(this.nullable&&this.nullCount>0){const n=this.offset+t;return(this.nullBitmap[n>>3]&1<>3;(!s||s.byteLength<=c)&&(s=new Uint8Array((o+a+63&-64)>>3).fill(255),this.nullCount>0?(s.set(Ru(o,a,this.nullBitmap),0),Object.assign(this,{nullBitmap:s})):Object.assign(this,{nullBitmap:s,_nullCount:0}));const h=s[c];n=(h&u)!==0,s[c]=e?h|u:h&~u}return n!==!!e&&(this._nullCount=this.nullCount+(e?-1:1)),e}clone(t=this.type,e=this.offset,n=this.length,i=this._nullCount,s=this,o=this.children){return new tf(t,e,n,i,s,o,this.dictionary)}slice(t,e){const{stride:n,typeId:i,children:s}=this,o=+(this._nullCount===0)-1,a=i===16?n:1,l=this._sliceBuffers(t,e,n,i);return this.clone(this.type,this.offset+t,e,o,l,s.length===0||this.valueOffsets?s:this._sliceChildren(s,a*t,a*e))}_changeLengthAndBackfillNullBitmap(t){if(this.typeId===k.Null)return this.clone(this.type,0,t,0);const{length:e,nullCount:n}=this,i=new Uint8Array((t+63&-64)>>3).fill(255,0,e>>3);i[e>>3]=(1<0&&i.set(Ru(this.offset,e,this.nullBitmap),0);const s=this.buffers;return s[ni.VALIDITY]=i,this.clone(this.type,0,t,n+(t-e),s)}_sliceBuffers(t,e,n,i){let s;const{buffers:o}=this;return(s=o[ni.TYPE])&&(o[ni.TYPE]=s.subarray(t,t+e)),(s=o[ni.OFFSET])&&(o[ni.OFFSET]=s.subarray(t,t+e+1))||(s=o[ni.DATA])&&(o[ni.DATA]=i===6?s:s.subarray(n*t,n*(t+e))),o}_sliceChildren(t,e,n){return t.map(i=>i.slice(e,n))}};Ae.prototype.children=Object.freeze([]);class Sa extends se{visit(t){return this.getVisitFn(t.type).call(this,t)}visitNull(t){const{["type"]:e,["offset"]:n=0,["length"]:i=0}=t;return new Ae(e,n,i,i)}visitBool(t){const{["type"]:e,["offset"]:n=0}=t,i=ce(t.nullBitmap),s=xe(e.ArrayType,t.data),{["length"]:o=s.length>>3,["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Ae(e,n,o,a,[void 0,s,i])}visitInt(t){const{["type"]:e,["offset"]:n=0}=t,i=ce(t.nullBitmap),s=xe(e.ArrayType,t.data),{["length"]:o=s.length,["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Ae(e,n,o,a,[void 0,s,i])}visitFloat(t){const{["type"]:e,["offset"]:n=0}=t,i=ce(t.nullBitmap),s=xe(e.ArrayType,t.data),{["length"]:o=s.length,["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Ae(e,n,o,a,[void 0,s,i])}visitUtf8(t){const{["type"]:e,["offset"]:n=0}=t,i=ce(t.data),s=ce(t.nullBitmap),o=ia(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Ae(e,n,a,l,[o,i,s])}visitLargeUtf8(t){const{["type"]:e,["offset"]:n=0}=t,i=ce(t.data),s=ce(t.nullBitmap),o=Jg(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Ae(e,n,a,l,[o,i,s])}visitBinary(t){const{["type"]:e,["offset"]:n=0}=t,i=ce(t.data),s=ce(t.nullBitmap),o=ia(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Ae(e,n,a,l,[o,i,s])}visitLargeBinary(t){const{["type"]:e,["offset"]:n=0}=t,i=ce(t.data),s=ce(t.nullBitmap),o=Jg(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Ae(e,n,a,l,[o,i,s])}visitFixedSizeBinary(t){const{["type"]:e,["offset"]:n=0}=t,i=ce(t.nullBitmap),s=xe(e.ArrayType,t.data),{["length"]:o=s.length/ii(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Ae(e,n,o,a,[void 0,s,i])}visitDate(t){const{["type"]:e,["offset"]:n=0}=t,i=ce(t.nullBitmap),s=xe(e.ArrayType,t.data),{["length"]:o=s.length/ii(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Ae(e,n,o,a,[void 0,s,i])}visitTimestamp(t){const{["type"]:e,["offset"]:n=0}=t,i=ce(t.nullBitmap),s=xe(e.ArrayType,t.data),{["length"]:o=s.length/ii(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Ae(e,n,o,a,[void 0,s,i])}visitTime(t){const{["type"]:e,["offset"]:n=0}=t,i=ce(t.nullBitmap),s=xe(e.ArrayType,t.data),{["length"]:o=s.length/ii(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Ae(e,n,o,a,[void 0,s,i])}visitDecimal(t){const{["type"]:e,["offset"]:n=0}=t,i=ce(t.nullBitmap),s=xe(e.ArrayType,t.data),{["length"]:o=s.length/ii(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Ae(e,n,o,a,[void 0,s,i])}visitList(t){const{["type"]:e,["offset"]:n=0,["child"]:i}=t,s=ce(t.nullBitmap),o=ia(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Ae(e,n,a,l,[o,void 0,s],[i])}visitStruct(t){const{["type"]:e,["offset"]:n=0,["children"]:i=[]}=t,s=ce(t.nullBitmap),{length:o=i.reduce((l,{length:u})=>Math.max(l,u),0),nullCount:a=t.nullBitmap?-1:0}=t;return new Ae(e,n,o,a,[void 0,void 0,s],i)}visitUnion(t){const{["type"]:e,["offset"]:n=0,["children"]:i=[]}=t,s=xe(e.ArrayType,t.typeIds),{["length"]:o=s.length,["nullCount"]:a=-1}=t;if(Ot.isSparseUnion(e))return new Ae(e,n,o,a,[void 0,void 0,void 0,s],i);const l=ia(t.valueOffsets);return new Ae(e,n,o,a,[l,void 0,void 0,s],i)}visitDictionary(t){const{["type"]:e,["offset"]:n=0}=t,i=ce(t.nullBitmap),s=xe(e.indices.ArrayType,t.data),{["dictionary"]:o=new Ne([new Sa().visit({type:e.dictionary})])}=t,{["length"]:a=s.length,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Ae(e,n,a,l,[void 0,s,i],[],o)}visitInterval(t){const{["type"]:e,["offset"]:n=0}=t,i=ce(t.nullBitmap),s=xe(e.ArrayType,t.data),{["length"]:o=s.length/ii(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Ae(e,n,o,a,[void 0,s,i])}visitDuration(t){const{["type"]:e,["offset"]:n=0}=t,i=ce(t.nullBitmap),s=xe(e.ArrayType,t.data),{["length"]:o=s.length,["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Ae(e,n,o,a,[void 0,s,i])}visitFixedSizeList(t){const{["type"]:e,["offset"]:n=0,["child"]:i=new Sa().visit({type:e.valueType})}=t,s=ce(t.nullBitmap),{["length"]:o=i.length/ii(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Ae(e,n,o,a,[void 0,void 0,s],[i])}visitMap(t){const{["type"]:e,["offset"]:n=0,["child"]:i=new Sa().visit({type:e.childType})}=t,s=ce(t.nullBitmap),o=ia(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Ae(e,n,a,l,[o,void 0,s],[i])}}const c2=new Sa;function le(r){return c2.visit(r)}let fy=class{constructor(t=0,e){this.numChunks=t,this.getChunkIterator=e,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndext.nullable)}function ux(r){return r.reduce((t,e)=>t+e.nullCount,0)}function cx(r){return r.reduce((t,e,n)=>(t[n+1]=t[n]+e.length,t),new Uint32Array(r.length+1))}function hx(r,t,e,n){const i=[];for(let s=-1,o=r.length;++s=n)break;if(e>=l+u)continue;if(l>=e&&l+u<=n){i.push(a);continue}const c=Math.max(0,e-l),h=Math.min(n-l,u);i.push(a.slice(c,h-c))}return i.length===0&&i.push(r[0].slice(0,0)),i}function sp(r,t,e,n){let i=0,s=0,o=t.length-1;do{if(i>=o-1)return e0?0:-1}function f2(r,t){const{nullBitmap:e}=r;if(!e||r.nullCount<=0)return-1;let n=0;for(const i of new ip(e,r.offset+(t||0),r.length,e,lx)){if(!i)return n;++n}return-1}function Zt(r,t,e){if(t===void 0)return-1;if(t===null)switch(r.typeId){case k.Union:break;case k.Dictionary:break;default:return f2(r,e)}const n=xr.getVisitFn(r),i=ko(t);for(let s=(e||0)-1,o=r.length;++s{const i=r.data[n];return i.values.subarray(0,i.length)[Symbol.iterator]()});let e=0;return new fy(r.data.length,n=>{const s=r.data[n].length,o=r.slice(e,e+s);return e+=s,new p2(o)})}let p2=class{constructor(t){this.vector=t,this.index=0}next(){return this.indexa.data):t;if(s.length===0||s.some(a=>!(a instanceof Ae)))throw new TypeError("Vector constructor expects an Array of Data instances.");const o=(e=s[0])===null||e===void 0?void 0:e.type;switch(s.length){case 0:this._offsets=[0];break;case 1:{const{get:a,set:l,indexOf:u}=gx[o.typeId],c=s[0];this.isValid=h=>op(c,h),this.get=h=>a(c,h),this.set=(h,f)=>l(c,h,f),this.indexOf=h=>u(c,h),this._offsets=[0,c.length];break}default:Object.setPrototypeOf(this,yx[o.typeId]),this._offsets=cx(s);break}this.data=s,this.type=o,this.stride=ii(o),this.numChildren=(i=(n=o.children)===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce((t,e)=>t+e.byteLength,0)}get nullable(){return h2(this.data)}get nullCount(){return ux(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${k[this.type.typeId]}Vector`}isValid(t){return!1}get(t){return null}at(t){return this.get(np(t,this.length))}set(t,e){}indexOf(t,e){return-1}includes(t,e){return this.indexOf(t,e)>-1}[Symbol.iterator](){return ap.visit(this)}concat(...t){return new ls(this.data.concat(t.flatMap(e=>e.data).flat(Number.POSITIVE_INFINITY)))}slice(t,e){return new ls(ax(this,t,e,({data:n,_offsets:i},s,o)=>hx(n,i,s,o)))}toJSON(){return[...this]}toArray(){const{type:t,data:e,length:n,stride:i,ArrayType:s}=this;switch(t.typeId){case k.Int:case k.Float:case k.Decimal:case k.Time:case k.Timestamp:switch(e.length){case 0:return new s;case 1:return e[0].values.subarray(0,n*i);default:return e.reduce((o,{values:a,length:l})=>(o.array.set(a.subarray(0,l*i),o.offset),o.offset+=l*i,o),{array:new s(n*i),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(",")}]`}getChild(t){var e;return this.getChildAt((e=this.type.children)===null||e===void 0?void 0:e.findIndex(n=>n.name===t))}getChildAt(t){return t>-1&&te[t])):null}get isMemoized(){return Ot.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(Ot.isDictionary(this.type)){const t=new py(this.data[0].dictionary),e=this.data.map(n=>{const i=n.clone();return i.dictionary=t,i});return new ls(e)}return new py(this)}unmemoize(){if(Ot.isDictionary(this.type)&&this.isMemoized){const t=this.data[0].dictionary.unmemoize(),e=this.data.map(n=>{const i=n.clone();return i.dictionary=t,i});return new ls(e)}return this}};mx=Symbol.toStringTag;Ne[mx]=(r=>{r.type=Ot.prototype,r.data=[],r.length=0,r.stride=1,r.numChildren=0,r._offsets=new Uint32Array([0]),r[Symbol.isConcatSpreadable]=!0;const t=Object.keys(k).map(e=>k[e]).filter(e=>typeof e=="number"&&e!==k.NONE);for(const e of t){const n=xr.getVisitFnByTypeId(e),i=sn.getVisitFnByTypeId(e),s=Lu.getVisitFnByTypeId(e);gx[e]={get:n,set:i,indexOf:s},yx[e]=Object.create(r,{isValid:{value:Du(op)},get:{value:Du(xr.getVisitFnByTypeId(e))},set:{value:dx(sn.getVisitFnByTypeId(e))},indexOf:{value:fx(Lu.getVisitFnByTypeId(e))}})}return"Vector"})(Ne.prototype);let py=class vx extends Ne{constructor(t){super(t.data);const e=this.get,n=this.set,i=this.slice,s=new Array(this.length);Object.defineProperty(this,"get",{value(o){const a=s[o];if(a!==void 0)return a;const l=e.call(this,o);return s[o]=l,l}}),Object.defineProperty(this,"set",{value(o,a){n.call(this,o,a),s[o]=a}}),Object.defineProperty(this,"slice",{value:(o,a)=>new vx(i.call(this,o,a))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new Ne(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}};class ef{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}offset(){return this.bb.readInt64(this.bb_pos)}metaDataLength(){return this.bb.readInt32(this.bb_pos+8)}bodyLength(){return this.bb.readInt64(this.bb_pos+16)}static sizeOf(){return 24}static createBlock(t,e,n,i){return t.prep(8,24),t.writeInt64(BigInt(i??0)),t.pad(4),t.writeInt32(n),t.writeInt64(BigInt(e??0)),t.offset()}}class Er{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsFooter(t,e){return(e||new Er).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsFooter(t,e){return t.setPosition(t.position()+_e),(e||new Er).__init(t.readInt32(t.position())+t.position(),t)}version(){const t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):je.V1}schema(t){const e=this.bb.__offset(this.bb_pos,6);return e?(t||new In).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}dictionaries(t,e){const n=this.bb.__offset(this.bb_pos,8);return n?(e||new ef).__init(this.bb.__vector(this.bb_pos+n)+t*24,this.bb):null}dictionariesLength(){const t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__vector_len(this.bb_pos+t):0}recordBatches(t,e){const n=this.bb.__offset(this.bb_pos,10);return n?(e||new ef).__init(this.bb.__vector(this.bb_pos+n)+t*24,this.bb):null}recordBatchesLength(){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,e){const n=this.bb.__offset(this.bb_pos,12);return n?(e||new qe).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+t*4),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,12);return t?this.bb.__vector_len(this.bb_pos+t):0}static startFooter(t){t.startObject(5)}static addVersion(t,e){t.addFieldInt16(0,e,je.V1)}static addSchema(t,e){t.addFieldOffset(1,e,0)}static addDictionaries(t,e){t.addFieldOffset(2,e,0)}static startDictionariesVector(t,e){t.startVector(24,e,8)}static addRecordBatches(t,e){t.addFieldOffset(3,e,0)}static startRecordBatchesVector(t,e){t.startVector(24,e,8)}static addCustomMetadata(t,e){t.addFieldOffset(4,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4);for(let n=e.length-1;n>=0;n--)t.addOffset(e[n]);return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endFooter(t){return t.endObject()}static finishFooterBuffer(t,e){t.finish(e)}static finishSizePrefixedFooterBuffer(t,e){t.finish(e,void 0,!0)}}let Le=class us{constructor(t=[],e,n,i=je.V5){this.fields=t||[],this.metadata=e||new Map,n||(n=rf(this.fields)),this.dictionaries=n,this.metadataVersion=i}get[Symbol.toStringTag](){return"Schema"}get names(){return this.fields.map(t=>t.name)}toString(){return`Schema<{ ${this.fields.map((t,e)=>`${e}: ${t}`).join(", ")} }>`}select(t){const e=new Set(t),n=this.fields.filter(i=>e.has(i.name));return new us(n,this.metadata)}selectAt(t){const e=t.map(n=>this.fields[n]).filter(Boolean);return new us(e,this.metadata)}assign(...t){const e=t[0]instanceof us?t[0]:Array.isArray(t[0])?new us(t[0]):new us(t),n=[...this.fields],i=Ll(Ll(new Map,this.metadata),e.metadata),s=e.fields.filter(a=>{const l=n.findIndex(u=>u.name===a.name);return~l?(n[l]=a.clone({metadata:Ll(Ll(new Map,n[l].metadata),a.metadata)}))&&!1:!0}),o=rf(s,new Map);return new us([...n,...s],i,new Map([...this.dictionaries,...o]))}};Le.prototype.fields=null;Le.prototype.metadata=null;Le.prototype.dictionaries=null;class Pe{static new(...t){let[e,n,i,s]=t;return t[0]&&typeof t[0]=="object"&&({name:e}=t[0],n===void 0&&(n=t[0].type),i===void 0&&(i=t[0].nullable),s===void 0&&(s=t[0].metadata)),new Pe(`${e}`,n,i,s)}constructor(t,e,n=!1,i){this.name=t,this.type=e,this.nullable=n,this.metadata=i||new Map}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}clone(...t){let[e,n,i,s]=t;return!t[0]||typeof t[0]!="object"?[e=this.name,n=this.type,i=this.nullable,s=this.metadata]=t:{name:e=this.name,type:n=this.type,nullable:i=this.nullable,metadata:s=this.metadata}=t[0],Pe.new(e,n,i,s)}}Pe.prototype.type=null;Pe.prototype.name=null;Pe.prototype.nullable=null;Pe.prototype.metadata=null;function Ll(r,t){return new Map([...r||new Map,...t||new Map])}function rf(r,t=new Map){for(let e=-1,n=r.length;++e0&&rf(s.children,t)}return t}var m2=zb,g2=Mo;class Va{static decode(t){t=new g2(ce(t));const e=Er.getRootAsFooter(t),n=Le.decode(e.schema(),new Map,e.version());return new y2(n,e)}static encode(t){const e=new m2,n=Le.encode(e,t.schema);Er.startRecordBatchesVector(e,t.numRecordBatches);for(const o of[...t.recordBatches()].slice().reverse())Fi.encode(e,o);const i=e.endVector();Er.startDictionariesVector(e,t.numDictionaries);for(const o of[...t.dictionaryBatches()].slice().reverse())Fi.encode(e,o);const s=e.endVector();return Er.startFooter(e),Er.addSchema(e,n),Er.addVersion(e,je.V5),Er.addRecordBatches(e,i),Er.addDictionaries(e,s),Er.finishFooterBuffer(e,Er.endFooter(e)),e.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}constructor(t,e=je.V5,n,i){this.schema=t,this.version=e,n&&(this._recordBatches=n),i&&(this._dictionaryBatches=i)}*recordBatches(){for(let t,e=-1,n=this.numRecordBatches;++e=0&&t=0&&t=0&&t=0&&tthis._closedPromiseResolve=t)}get closed(){return this._closedPromise}cancel(t){return Jt(this,void 0,void 0,function*(){yield this.return(t)})}write(t){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(t):this.resolvers.shift().resolve({done:!1,value:t}))}abort(t){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:t}:this.resolvers.shift().reject({done:!0,value:t}))}close(){if(this._closedPromiseResolve){const{resolvers:t}=this;for(;t.length>0;)t.shift().resolve(Be);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(t){return Yr.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,t)}toNodeStream(t){return Yr.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,t)}throw(t){return Jt(this,void 0,void 0,function*(){return yield this.abort(t),Be})}return(t){return Jt(this,void 0,void 0,function*(){return yield this.close(),Be})}read(t){return Jt(this,void 0,void 0,function*(){return(yield this.next(t,"read")).value})}peek(t){return Jt(this,void 0,void 0,function*(){return(yield this.next(t,"peek")).value})}next(...t){return this._values.length>0?Promise.resolve({done:!1,value:this._values.shift()}):this._error?Promise.reject({done:!0,value:this._error.error}):this._closedPromiseResolve?new Promise((e,n)=>{this.resolvers.push({resolve:e,reject:n})}):Promise.resolve(Be)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw new Error("AsyncQueue is closed")}}class Xl extends v2{write(t){if((t=ce(t)).byteLength>0)return super.write(t)}toString(t=!1){return t?Wd(this.toUint8Array(!0)):this.toUint8Array(!1).then(Wd)}toUint8Array(t=!1){return t?kn(this._values)[0]:Jt(this,void 0,void 0,function*(){var e,n,i,s;const o=[];let a=0;try{for(var l=!0,u=Bn(this),c;c=yield u.next(),e=c.done,!e;l=!0){s=c.value,l=!1;const h=s;o.push(h),a+=h.byteLength}}catch(h){n={error:h}}finally{try{!l&&!e&&(i=u.return)&&(yield i.call(u))}finally{if(n)throw n.error}}return kn(o,a)[0]})}}class Nu{constructor(t){t&&(this.source=new _2(Yr.fromIterable(t)))}[Symbol.iterator](){return this}next(t){return this.source.next(t)}throw(t){return this.source.throw(t)}return(t){return this.source.return(t)}peek(t){return this.source.peek(t)}read(t){return this.source.read(t)}}class Po{constructor(t){t instanceof Po?this.source=t.source:t instanceof Xl?this.source=new ts(Yr.fromAsyncIterable(t)):Nb(t)?this.source=new ts(Yr.fromNodeStream(t)):Kf(t)?this.source=new ts(Yr.fromDOMStream(t)):Lb(t)?this.source=new ts(Yr.fromDOMStream(t.body)):Qa(t)?this.source=new ts(Yr.fromIterable(t)):Is(t)?this.source=new ts(Yr.fromAsyncIterable(t)):Uo(t)&&(this.source=new ts(Yr.fromAsyncIterable(t)))}[Symbol.asyncIterator](){return this}next(t){return this.source.next(t)}throw(t){return this.source.throw(t)}return(t){return this.source.return(t)}get closed(){return this.source.closed}cancel(t){return this.source.cancel(t)}peek(t){return this.source.peek(t)}read(t){return this.source.read(t)}}class _2{constructor(t){this.source=t}cancel(t){this.return(t)}peek(t){return this.next(t,"peek").value}read(t){return this.next(t,"read").value}next(t,e="read"){return this.source.next({cmd:e,size:t})}throw(t){return Object.create(this.source.throw&&this.source.throw(t)||Be)}return(t){return Object.create(this.source.return&&this.source.return(t)||Be)}}class ts{constructor(t){this.source=t,this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}cancel(t){return Jt(this,void 0,void 0,function*(){yield this.return(t)})}get closed(){return this._closedPromise}read(t){return Jt(this,void 0,void 0,function*(){return(yield this.next(t,"read")).value})}peek(t){return Jt(this,void 0,void 0,function*(){return(yield this.next(t,"peek")).value})}next(t){return Jt(this,arguments,void 0,function*(e,n="read"){return yield this.source.next({cmd:n,size:e})})}throw(t){return Jt(this,void 0,void 0,function*(){const e=this.source.throw&&(yield this.source.throw(t))||Be;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(e)})}return(t){return Jt(this,void 0,void 0,function*(){const e=this.source.return&&(yield this.source.return(t))||Be;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(e)})}}class gy extends Nu{constructor(t,e){super(),this.position=0,this.buffer=ce(t),this.size=e===void 0?this.buffer.byteLength:e}readInt32(t){const{buffer:e,byteOffset:n}=this.readAt(t,4);return new DataView(e,n).getInt32(0,!0)}seek(t){return this.position=Math.min(t,this.size),t>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),n=new Uint32Array([t.buffer[1]>>>16,t.buffer[1]&65535,t.buffer[0]>>>16,t.buffer[0]&65535]);let i=e[3]*n[3];this.buffer[0]=i&65535;let s=i>>>16;return i=e[2]*n[3],s+=i,i=e[3]*n[2]>>>0,s+=i,this.buffer[0]+=s<<16,this.buffer[1]=s>>>0>>16,this.buffer[1]+=e[1]*n[3]+e[2]*n[2]+e[3]*n[1],this.buffer[1]+=e[0]*n[3]+e[1]*n[2]+e[2]*n[1]+e[3]*n[0]<<16,this}_plus(t){const e=this.buffer[0]+t.buffer[0]>>>0;this.buffer[1]+=t.buffer[1],e>>0&&++this.buffer[1],this.buffer[0]=e}lessThan(t){return this.buffer[1]>>0,e[2]=this.buffer[2]+t.buffer[2]>>>0,e[1]=this.buffer[1]+t.buffer[1]>>>0,e[0]=this.buffer[0]+t.buffer[0]>>>0,e[0]>>0&&++e[1],e[1]>>0&&++e[2],e[2]>>0&&++e[3],this.buffer[3]=e[3],this.buffer[2]=e[2],this.buffer[1]=e[1],this.buffer[0]=e[0],this}hex(){return`${fo(this.buffer[3])} ${fo(this.buffer[2])} ${fo(this.buffer[1])} ${fo(this.buffer[0])}`}static multiply(t,e){return new ti(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new ti(new Uint32Array(t.buffer)).plus(e)}static from(t,e=new Uint32Array(4)){return ti.fromString(typeof t=="string"?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(4)){return ti.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(4)){const n=t.startsWith("-"),i=t.length,s=new ti(e);for(let o=n?1:0;o0&&this.readData(t,n)||new Uint8Array(0)}readOffsets(t,e){return this.readData(t,e)}readTypeIds(t,e){return this.readData(t,e)}readData(t,{length:e,offset:n}=this.nextBufferRange()){return this.bytes.subarray(n,n+e)}readDictionary(t){return this.dictionaries.get(t.id)}}class x2 extends bx{constructor(t,e,n,i,s){super(new Uint8Array(0),e,n,i,s),this.sources=t}readNullBitmap(t,e,{offset:n}=this.nextBufferRange()){return e<=0?new Uint8Array(0):Fu(this.sources[n])}readOffsets(t,{offset:e}=this.nextBufferRange()){return xe(Uint8Array,xe(t.OffsetArrayType,this.sources[e]))}readTypeIds(t,{offset:e}=this.nextBufferRange()){return xe(Uint8Array,xe(t.ArrayType,this.sources[e]))}readData(t,{offset:e}=this.nextBufferRange()){const{sources:n}=this;return Ot.isTimestamp(t)||(Ot.isInt(t)||Ot.isTime(t))&&t.bitWidth===64||Ot.isDuration(t)||Ot.isDate(t)&&t.unit===nn.MILLISECOND?xe(Uint8Array,Ta.convertArray(n[e])):Ot.isDecimal(t)?xe(Uint8Array,w2.convertArray(n[e])):Ot.isBinary(t)||Ot.isLargeBinary(t)||Ot.isFixedSizeBinary(t)?S2(n[e]):Ot.isBool(t)?Fu(n[e]):Ot.isUtf8(t)||Ot.isLargeUtf8(t)?Zf(n[e].join("")):xe(Uint8Array,xe(t.ArrayType,n[e].map(i=>+i)))}}function S2(r){const t=r.join(""),e=new Uint8Array(t.length/2);for(let n=0;n>1]=Number.parseInt(t.slice(n,n+2),16);return e}let Nt=class extends se{compareSchemas(t,e){return t===e||e instanceof t.constructor&&this.compareManyFields(t.fields,e.fields)}compareManyFields(t,e){return t===e||Array.isArray(t)&&Array.isArray(e)&&t.length===e.length&&t.every((n,i)=>this.compareFields(n,e[i]))}compareFields(t,e){return t===e||e instanceof t.constructor&&t.name===e.name&&t.nullable===e.nullable&&this.visit(t.type,e.type)}};function mr(r,t){return t instanceof r.constructor}function Fs(r,t){return r===t||mr(r,t)}function di(r,t){return r===t||mr(r,t)&&r.bitWidth===t.bitWidth&&r.isSigned===t.isSigned}function lc(r,t){return r===t||mr(r,t)&&r.precision===t.precision}function T2(r,t){return r===t||mr(r,t)&&r.byteWidth===t.byteWidth}function cp(r,t){return r===t||mr(r,t)&&r.unit===t.unit}function Za(r,t){return r===t||mr(r,t)&&r.unit===t.unit&&r.timezone===t.timezone}function Ka(r,t){return r===t||mr(r,t)&&r.unit===t.unit&&r.bitWidth===t.bitWidth}function I2(r,t){return r===t||mr(r,t)&&r.children.length===t.children.length&&Di.compareManyFields(r.children,t.children)}function E2(r,t){return r===t||mr(r,t)&&r.children.length===t.children.length&&Di.compareManyFields(r.children,t.children)}function hp(r,t){return r===t||mr(r,t)&&r.mode===t.mode&&r.typeIds.every((e,n)=>e===t.typeIds[n])&&Di.compareManyFields(r.children,t.children)}function A2(r,t){return r===t||mr(r,t)&&r.id===t.id&&r.isOrdered===t.isOrdered&&Di.visit(r.indices,t.indices)&&Di.visit(r.dictionary,t.dictionary)}function dp(r,t){return r===t||mr(r,t)&&r.unit===t.unit}function Ja(r,t){return r===t||mr(r,t)&&r.unit===t.unit}function M2(r,t){return r===t||mr(r,t)&&r.listSize===t.listSize&&r.children.length===t.children.length&&Di.compareManyFields(r.children,t.children)}function C2(r,t){return r===t||mr(r,t)&&r.keysSorted===t.keysSorted&&r.children.length===t.children.length&&Di.compareManyFields(r.children,t.children)}Nt.prototype.visitNull=Fs;Nt.prototype.visitBool=Fs;Nt.prototype.visitInt=di;Nt.prototype.visitInt8=di;Nt.prototype.visitInt16=di;Nt.prototype.visitInt32=di;Nt.prototype.visitInt64=di;Nt.prototype.visitUint8=di;Nt.prototype.visitUint16=di;Nt.prototype.visitUint32=di;Nt.prototype.visitUint64=di;Nt.prototype.visitFloat=lc;Nt.prototype.visitFloat16=lc;Nt.prototype.visitFloat32=lc;Nt.prototype.visitFloat64=lc;Nt.prototype.visitUtf8=Fs;Nt.prototype.visitLargeUtf8=Fs;Nt.prototype.visitBinary=Fs;Nt.prototype.visitLargeBinary=Fs;Nt.prototype.visitFixedSizeBinary=T2;Nt.prototype.visitDate=cp;Nt.prototype.visitDateDay=cp;Nt.prototype.visitDateMillisecond=cp;Nt.prototype.visitTimestamp=Za;Nt.prototype.visitTimestampSecond=Za;Nt.prototype.visitTimestampMillisecond=Za;Nt.prototype.visitTimestampMicrosecond=Za;Nt.prototype.visitTimestampNanosecond=Za;Nt.prototype.visitTime=Ka;Nt.prototype.visitTimeSecond=Ka;Nt.prototype.visitTimeMillisecond=Ka;Nt.prototype.visitTimeMicrosecond=Ka;Nt.prototype.visitTimeNanosecond=Ka;Nt.prototype.visitDecimal=Fs;Nt.prototype.visitList=I2;Nt.prototype.visitStruct=E2;Nt.prototype.visitUnion=hp;Nt.prototype.visitDenseUnion=hp;Nt.prototype.visitSparseUnion=hp;Nt.prototype.visitDictionary=A2;Nt.prototype.visitInterval=dp;Nt.prototype.visitIntervalDayTime=dp;Nt.prototype.visitIntervalYearMonth=dp;Nt.prototype.visitDuration=Ja;Nt.prototype.visitDurationSecond=Ja;Nt.prototype.visitDurationMillisecond=Ja;Nt.prototype.visitDurationMicrosecond=Ja;Nt.prototype.visitDurationNanosecond=Ja;Nt.prototype.visitFixedSizeList=M2;Nt.prototype.visitMap=C2;const Di=new Nt;function nf(r,t){return Di.compareSchemas(r,t)}function Ph(r,t){return O2(r,t.map(e=>e.data.concat()))}function O2(r,t){const e=[...r.fields],n=[],i={numBatches:t.reduce((h,f)=>Math.max(h,f.length),0)};let s=0,o=0,a=-1;const l=t.length;let u,c=[];for(;i.numBatches-- >0;){for(o=Number.POSITIVE_INFINITY,a=-1;++a0&&(n[s++]=le({type:new dr(e),length:o,nullCount:0,children:c.slice()})))}return[r=r.assign(e),n.map(h=>new _r(r,h))]}function P2(r,t,e,n,i){var s;const o=(t+63&-64)>>3;for(let a=-1,l=n.length;++a=t)c===t?e[a]=u:(e[a]=u.slice(0,t),i.numBatches=Math.max(i.numBatches,n[a].unshift(u.slice(t,c-t))));else{const h=r[a];r[a]=h.clone({nullable:!0}),e[a]=(s=u==null?void 0:u._changeLengthAndBackfillNullBitmap(t))!==null&&s!==void 0?s:le({type:h.type,length:t,nullCount:t,nullBitmap:new Uint8Array(o)})}}return e}var wx;let Li=class cs{constructor(...t){var e,n;if(t.length===0)return this.batches=[],this.schema=new Le([]),this._offsets=[0],this;let i,s;t[0]instanceof Le&&(i=t.shift()),t.at(-1)instanceof Uint32Array&&(s=t.pop());const o=l=>{if(l){if(l instanceof _r)return[l];if(l instanceof cs)return l.batches;if(l instanceof Ae){if(l.type instanceof dr)return[new _r(new Le(l.type.children),l)]}else{if(Array.isArray(l))return l.flatMap(u=>o(u));if(typeof l[Symbol.iterator]=="function")return[...l].flatMap(u=>o(u));if(typeof l=="object"){const u=Object.keys(l),c=u.map(d=>new Ne([l[d]])),h=i??new Le(u.map((d,m)=>new Pe(String(d),c[m].type,c[m].nullable))),[,f]=Ph(h,c);return f.length===0?[new _r(l)]:f}}}return[]},a=t.flatMap(l=>o(l));if(i=(n=i??((e=a[0])===null||e===void 0?void 0:e.schema))!==null&&n!==void 0?n:new Le([]),!(i instanceof Le))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");for(const l of a){if(!(l instanceof _r))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");if(!nf(i,l.schema))throw new TypeError("Table and inner RecordBatch schemas must be equivalent.")}this.schema=i,this.batches=a,this._offsets=s??cx(this.data)}get data(){return this.batches.map(({data:t})=>t)}get numCols(){return this.schema.fields.length}get numRows(){return this.data.reduce((t,e)=>t+e.length,0)}get nullCount(){return this._nullCount===-1&&(this._nullCount=ux(this.data)),this._nullCount}isValid(t){return!1}get(t){return null}at(t){return this.get(np(t,this.numRows))}set(t,e){}indexOf(t,e){return-1}[Symbol.iterator](){return this.batches.length>0?ap.visit(new Ne(this.data)):new Array(0)[Symbol.iterator]()}toArray(){return[...this]}toString(){return`[ ${this.toArray().join(`, `)} -]`}concat(...t){const e=this.schema,n=this.data.concat(t.flatMap(({data:i})=>i));return new cs(e,n.map(i=>new _r(e,i)))}slice(t,e){const n=this.schema;[t,e]=ax({length:this.numRows},t,e);const i=hx(this.data,this._offsets,t,e);return new cs(n,i.map(s=>new _r(n,s)))}getChild(t){return this.getChildAt(this.schema.fields.findIndex(e=>e.name===t))}getChildAt(t){if(t>-1&&tn.children[t]);if(e.length===0){const{type:n}=this.schema.fields[t],i=le({type:n,length:0,nullCount:0});e.push(i._changeLengthAndBackfillNullBitmap(this.numRows))}return new Ne(e)}return null}setChild(t,e){var n;return this.setChildAt((n=this.schema.fields)===null||n===void 0?void 0:n.findIndex(i=>i.name===t),e)}setChildAt(t,e){let n=this.schema,i=[...this.batches];if(t>-1&&tthis.getChildAt(u));[s[t],a[t]]=[o,e],[n,i]=Ph(n,a)}return new cs(n,i)}select(t){const e=this.schema.fields.reduce((n,i,s)=>n.set(i.name,s),new Map);return this.selectAt(t.map(n=>e.get(n)).filter(n=>n>-1))}selectAt(t){const e=this.schema.selectAt(t),n=this.batches.map(i=>i.selectAt(t));return new cs(e,n)}assign(t){const e=this.schema.fields,[n,i]=t.schema.fields.reduce((a,l,u)=>{const[c,h]=a,f=e.findIndex(d=>d.name===l.name);return~f?h[f]=u:c.push(u),a},[[],[]]),s=this.schema.assign(t.schema),o=[...e.map((a,l)=>[l,i[l]]).map(([a,l])=>l===void 0?this.getChildAt(a):t.getChildAt(l)),...n.map(a=>t.getChildAt(a))].filter(Boolean);return new cs(...Ph(s,o))}};wx=Symbol.toStringTag;Li[wx]=(r=>(r.schema=null,r.batches=[],r._offsets=new Uint32Array([0]),r._nullCount=-1,r[Symbol.isConcatSpreadable]=!0,r.isValid=Du(op),r.get=Du(xr.getVisitFn(k.Struct)),r.set=dx(sn.getVisitFn(k.Struct)),r.indexOf=fx(Lu.getVisitFn(k.Struct)),"Table"))(Li.prototype);var xx;let _r=class ba{constructor(...t){switch(t.length){case 2:{if([this.schema]=t,!(this.schema instanceof Le))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");if([,this.data=le({nullCount:0,type:new dr(this.schema.fields),children:this.schema.fields.map(e=>le({type:e.type,nullCount:0}))})]=t,!(this.data instanceof Ae))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");[this.schema,this.data]=yy(this.schema,this.data.children);break}case 1:{const[e]=t,{fields:n,children:i,length:s}=Object.keys(e).reduce((l,u,c)=>(l.children[c]=e[u],l.length=Math.max(l.length,e[u].length),l.fields[c]=Pe.new({name:u,type:e[u].type,nullable:!0}),l),{length:0,fields:new Array,children:new Array}),o=new Le(n),a=le({type:new dr(n),length:s,children:i,nullCount:0});[this.schema,this.data]=yy(o,a.children,s);break}default:throw new TypeError("RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.")}}get dictionaries(){return this._dictionaries||(this._dictionaries=Sx(this.schema.fields,this.data.children))}get numCols(){return this.schema.fields.length}get numRows(){return this.data.length}get nullCount(){return this.data.nullCount}isValid(t){return this.data.getValid(t)}get(t){return xr.visit(this.data,t)}at(t){return this.get(np(t,this.numRows))}set(t,e){return sn.visit(this.data,t,e)}indexOf(t,e){return Lu.visit(this.data,t,e)}[Symbol.iterator](){return ap.visit(new Ne([this.data]))}toArray(){return[...this]}concat(...t){return new Li(this.schema,[this,...t])}slice(t,e){const[n]=new Ne([this.data]).slice(t,e).data;return new ba(this.schema,n)}getChild(t){var e;return this.getChildAt((e=this.schema.fields)===null||e===void 0?void 0:e.findIndex(n=>n.name===t))}getChildAt(t){return t>-1&&ti.name===t),e)}setChildAt(t,e){let n=this.schema,i=this.data;if(t>-1&&ta.name===s);~o&&(i[o]=this.data.children[o])}return new ba(e,le({type:n,length:this.numRows,children:i}))}selectAt(t){const e=this.schema.selectAt(t),n=t.map(s=>this.data.children[s]).filter(Boolean),i=le({type:new dr(e.fields),length:this.numRows,children:n});return new ba(e,i)}};xx=Symbol.toStringTag;_r[xx]=(r=>(r._nullCount=-1,r[Symbol.isConcatSpreadable]=!0,"RecordBatch"))(_r.prototype);function yy(r,t,e=t.reduce((n,i)=>Math.max(n,i.length),0)){var n;const i=[...r.fields],s=[...t],o=(e+63&-64)>>3;for(const[a,l]of r.fields.entries()){const u=t[a];(!u||u.length!==e)&&(i[a]=l.clone({nullable:!0}),s[a]=(n=u==null?void 0:u._changeLengthAndBackfillNullBitmap(e))!==null&&n!==void 0?n:le({type:l.type,length:e,nullCount:e,nullBitmap:new Uint8Array(o)}))}return[r.assign(i),le({type:new dr(i),length:e,children:s})]}function Sx(r,t,e=new Map){var n,i;if(((n=r==null?void 0:r.length)!==null&&n!==void 0?n:0)>0&&(r==null?void 0:r.length)===(t==null?void 0:t.length))for(let s=-1,o=r.length;++sle({type:i.type})),n=le({type:new dr(t.fields),nullCount:0,children:e});super(t,n)}}let bi=class Sn{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsMessage(t,e){return(e||new Sn).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsMessage(t,e){return t.setPosition(t.position()+_e),(e||new Sn).__init(t.readInt32(t.position())+t.position(),t)}version(){const t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):je.V1}headerType(){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readUint8(this.bb_pos+t):me.NONE}header(t){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__union(t,this.bb_pos+e):null}bodyLength(){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt64(this.bb_pos+t):BigInt("0")}customMetadata(t,e){const n=this.bb.__offset(this.bb_pos,12);return n?(e||new qe).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+t*4),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,12);return t?this.bb.__vector_len(this.bb_pos+t):0}static startMessage(t){t.startObject(5)}static addVersion(t,e){t.addFieldInt16(0,e,je.V1)}static addHeaderType(t,e){t.addFieldInt8(1,e,me.NONE)}static addHeader(t,e){t.addFieldOffset(2,e,0)}static addBodyLength(t,e){t.addFieldInt64(3,e,BigInt("0"))}static addCustomMetadata(t,e){t.addFieldOffset(4,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4);for(let n=e.length-1;n>=0;n--)t.addOffset(e[n]);return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endMessage(t){return t.endObject()}static finishMessageBuffer(t,e){t.finish(e)}static finishSizePrefixedMessageBuffer(t,e){t.finish(e,void 0,!0)}static createMessage(t,e,n,i,s,o){return Sn.startMessage(t),Sn.addVersion(t,e),Sn.addHeaderType(t,n),Sn.addHeader(t,i),Sn.addBodyLength(t,s),Sn.addCustomMetadata(t,o),Sn.endMessage(t)}};class R2 extends se{visit(t,e){return t==null||e==null?void 0:super.visit(t,e)}visitNull(t,e){return ay.startNull(e),ay.endNull(e)}visitInt(t,e){return Cr.startInt(e),Cr.addBitWidth(e,t.bitWidth),Cr.addIsSigned(e,t.isSigned),Cr.endInt(e)}visitFloat(t,e){return Rn.startFloatingPoint(e),Rn.addPrecision(e,t.precision),Rn.endFloatingPoint(e)}visitBinary(t,e){return ry.startBinary(e),ry.endBinary(e)}visitLargeBinary(t,e){return iy.startLargeBinary(e),iy.endLargeBinary(e)}visitBool(t,e){return ny.startBool(e),ny.endBool(e)}visitUtf8(t,e){return ly.startUtf8(e),ly.endUtf8(e)}visitLargeUtf8(t,e){return sy.startLargeUtf8(e),sy.endLargeUtf8(e)}visitDecimal(t,e){return Js.startDecimal(e),Js.addScale(e,t.scale),Js.addPrecision(e,t.precision),Js.addBitWidth(e,t.bitWidth),Js.endDecimal(e)}visitDate(t,e){return Vl.startDate(e),Vl.addUnit(e,t.unit),Vl.endDate(e)}visitTime(t,e){return Zr.startTime(e),Zr.addUnit(e,t.unit),Zr.addBitWidth(e,t.bitWidth),Zr.endTime(e)}visitTimestamp(t,e){const n=t.timezone&&e.createString(t.timezone)||void 0;return Kr.startTimestamp(e),Kr.addUnit(e,t.unit),n!==void 0&&Kr.addTimezone(e,n),Kr.endTimestamp(e)}visitInterval(t,e){return Fn.startInterval(e),Fn.addUnit(e,t.unit),Fn.endInterval(e)}visitDuration(t,e){return jl.startDuration(e),jl.addUnit(e,t.unit),jl.endDuration(e)}visitList(t,e){return oy.startList(e),oy.endList(e)}visitStruct(t,e){return ys.startStruct_(e),ys.endStruct_(e)}visitUnion(t,e){vr.startTypeIdsVector(e,t.typeIds.length);const n=vr.createTypeIdsVector(e,t.typeIds);return vr.startUnion(e),vr.addMode(e,t.mode),vr.addTypeIds(e,n),vr.endUnion(e)}visitDictionary(t,e){const n=this.visit(t.indices,e);return ai.startDictionaryEncoding(e),ai.addId(e,BigInt(t.id)),ai.addIsOrdered(e,t.isOrdered),n!==void 0&&ai.addIndexType(e,n),ai.endDictionaryEncoding(e)}visitFixedSizeBinary(t,e){return $l.startFixedSizeBinary(e),$l.addByteWidth(e,t.byteWidth),$l.endFixedSizeBinary(e)}visitFixedSizeList(t,e){return Gl.startFixedSizeList(e),Gl.addListSize(e,t.listSize),Gl.endFixedSizeList(e)}visitMap(t,e){return Wl.startMap(e),Wl.addKeysSorted(e,t.keysSorted),Wl.endMap(e)}}const Rh=new R2;function F2(r,t=new Map){return new Le(L2(r,t),Yl(r.metadata),t)}function Tx(r){return new Br(r.count,Ix(r.columns),Ex(r.columns))}function D2(r){return new Vn(Tx(r.data),r.id,r.isDelta)}function L2(r,t){return(r.fields||[]).filter(Boolean).map(e=>Pe.fromJSON(e,t))}function vy(r,t){return(r.children||[]).filter(Boolean).map(e=>Pe.fromJSON(e,t))}function Ix(r){return(r||[]).reduce((t,e)=>[...t,new Ni(e.count,N2(e.VALIDITY)),...Ix(e.children)],[])}function Ex(r,t=[]){for(let e=-1,n=(r||[]).length;++et+ +(e===0),0)}function B2(r,t){let e,n,i,s,o,a;return!t||!(s=r.dictionary)?(o=by(r,vy(r,t)),i=new Pe(r.name,o,r.nullable,Yl(r.metadata))):t.has(e=s.id)?(n=(n=s.indexType)?_y(n):new za,a=new Oo(t.get(e),n,e,s.isOrdered),i=new Pe(r.name,a,r.nullable,Yl(r.metadata))):(n=(n=s.indexType)?_y(n):new za,t.set(e,o=by(r,vy(r,t))),a=new Oo(o,n,e,s.isOrdered),i=new Pe(r.name,a,r.nullable,Yl(r.metadata))),i||null}function Yl(r=[]){return new Map(r.map(({key:t,value:e})=>[t,e]))}function _y(r){return new Es(r.isSigned,r.bitWidth)}function by(r,t){const e=r.type.name;switch(e){case"NONE":return new Ri;case"null":return new Ri;case"binary":return new gu;case"largebinary":return new yu;case"utf8":return new vu;case"largeutf8":return new _u;case"bool":return new bu;case"list":return new Au((t||[])[0]);case"struct":return new dr(t||[]);case"struct_":return new dr(t||[])}switch(e){case"int":{const n=r.type;return new Es(n.isSigned,n.bitWidth)}case"floatingpoint":{const n=r.type;return new mu(ar[n.precision])}case"decimal":{const n=r.type;return new wu(n.scale,n.precision,n.bitWidth)}case"date":{const n=r.type;return new xu(nn[n.unit])}case"time":{const n=r.type;return new Su(Vt[n.unit],n.bitWidth)}case"timestamp":{const n=r.type;return new Tu(Vt[n.unit],n.timezone)}case"interval":{const n=r.type;return new Iu(zn[n.unit])}case"duration":{const n=r.type;return new Eu(Vt[n.unit])}case"union":{const n=r.type,[i,...s]=(n.mode+"").toLowerCase(),o=i.toUpperCase()+s.join("");return new Mu(lr[o],n.typeIds||[],t||[])}case"fixedsizebinary":{const n=r.type;return new Cu(n.byteWidth)}case"fixedsizelist":{const n=r.type;return new Ou(n.listSize,(t||[])[0])}case"map":{const n=r.type;return new Pu((t||[])[0],n.keysSorted)}}throw new Error(`Unrecognized type: "${e}"`)}var U2=zb,k2=Mo;class fr{static fromJSON(t,e){const n=new fr(0,je.V5,e);return n._createHeader=z2(t,e),n}static decode(t){t=new k2(ce(t));const e=bi.getRootAsMessage(t),n=e.bodyLength(),i=e.version(),s=e.headerType(),o=new fr(n,i,s);return o._createHeader=V2(e,s),o}static encode(t){const e=new U2;let n=-1;return t.isSchema()?n=Le.encode(e,t.header()):t.isRecordBatch()?n=Br.encode(e,t.header()):t.isDictionaryBatch()&&(n=Vn.encode(e,t.header())),bi.startMessage(e),bi.addVersion(e,je.V5),bi.addHeader(e,n),bi.addHeaderType(e,t.headerType),bi.addBodyLength(e,BigInt(t.bodyLength)),bi.finishMessageBuffer(e,bi.endMessage(e)),e.asUint8Array()}static from(t,e=0){if(t instanceof Le)return new fr(0,je.V5,me.Schema,t);if(t instanceof Br)return new fr(e,je.V5,me.RecordBatch,t);if(t instanceof Vn)return new fr(e,je.V5,me.DictionaryBatch,t);throw new Error(`Unrecognized Message header: ${t}`)}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get bodyLength(){return this._bodyLength}header(){return this._createHeader()}isSchema(){return this.headerType===me.Schema}isRecordBatch(){return this.headerType===me.RecordBatch}isDictionaryBatch(){return this.headerType===me.DictionaryBatch}constructor(t,e,n,i){this._version=e,this._headerType=n,this.body=new Uint8Array(0),i&&(this._createHeader=()=>i),this._bodyLength=Te(t)}}class Br{get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}constructor(t,e,n){this._nodes=e,this._buffers=n,this._length=Te(t)}}class Vn{get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}constructor(t,e,n=!1){this._data=t,this._isDelta=n,this._id=Te(e)}}class Ln{constructor(t,e){this.offset=Te(t),this.length=Te(e)}}class Ni{constructor(t,e){this.length=Te(t),this.nullCount=Te(e)}}function z2(r,t){return()=>{switch(t){case me.Schema:return Le.fromJSON(r);case me.RecordBatch:return Br.fromJSON(r);case me.DictionaryBatch:return Vn.fromJSON(r)}throw new Error(`Unrecognized Message type: { name: ${me[t]}, type: ${t} }`)}}function V2(r,t){return()=>{switch(t){case me.Schema:return Le.decode(r.header(new In),new Map,r.version());case me.RecordBatch:return Br.decode(r.header(new ri),r.version());case me.DictionaryBatch:return Vn.decode(r.header(new Zs),r.version())}throw new Error(`Unrecognized Message type: { name: ${me[t]}, type: ${t} }`)}}Pe.encode=K2;Pe.decode=Q2;Pe.fromJSON=B2;Le.encode=Z2;Le.decode=j2;Le.fromJSON=F2;Br.encode=J2;Br.decode=$2;Br.fromJSON=Tx;Vn.encode=tD;Vn.decode=G2;Vn.fromJSON=D2;Ni.encode=eD;Ni.decode=H2;Ln.encode=rD;Ln.decode=W2;function j2(r,t=new Map,e=je.V5){const n=q2(r,t);return new Le(n,ql(r),t,e)}function $2(r,t=je.V5){if(r.compression()!==null)throw new Error("Record batch compression not implemented");return new Br(r.length(),X2(r),Y2(r,t))}function G2(r,t=je.V5){return new Vn(Br.decode(r.data(),t),r.id(),r.isDelta())}function W2(r){return new Ln(r.offset(),r.length())}function H2(r){return new Ni(r.length(),r.nullCount())}function X2(r){const t=[];for(let e,n=-1,i=-1,s=r.nodesLength();++nPe.encode(r,s));In.startFieldsVector(r,e.length);const n=In.createFieldsVector(r,e),i=t.metadata&&t.metadata.size>0?In.createCustomMetadataVector(r,[...t.metadata].map(([s,o])=>{const a=r.createString(`${s}`),l=r.createString(`${o}`);return qe.startKeyValue(r),qe.addKey(r,a),qe.addValue(r,l),qe.endKeyValue(r)})):-1;return In.startSchema(r),In.addFields(r,n),In.addEndianness(r,nD?Co.Little:Co.Big),i!==-1&&In.addCustomMetadata(r,i),In.endSchema(r)}function K2(r,t){let e=-1,n=-1,i=-1;const s=t.type;let o=t.typeId;Ot.isDictionary(s)?(o=s.dictionary.typeId,i=Rh.visit(s,r),n=Rh.visit(s.dictionary,r)):n=Rh.visit(s,r);const a=(s.children||[]).map(c=>Pe.encode(r,c)),l=Wr.createChildrenVector(r,a),u=t.metadata&&t.metadata.size>0?Wr.createCustomMetadataVector(r,[...t.metadata].map(([c,h])=>{const f=r.createString(`${c}`),d=r.createString(`${h}`);return qe.startKeyValue(r),qe.addKey(r,f),qe.addValue(r,d),qe.endKeyValue(r)})):-1;return t.name&&(e=r.createString(t.name)),Wr.startField(r),Wr.addType(r,n),Wr.addTypeType(r,o),Wr.addChildren(r,l),Wr.addNullable(r,!!t.nullable),e!==-1&&Wr.addName(r,e),i!==-1&&Wr.addDictionary(r,i),u!==-1&&Wr.addCustomMetadata(r,u),Wr.endField(r)}function J2(r,t){const e=t.nodes||[],n=t.buffers||[];ri.startNodesVector(r,e.length);for(const o of e.slice().reverse())Ni.encode(r,o);const i=r.endVector();ri.startBuffersVector(r,n.length);for(const o of n.slice().reverse())Ln.encode(r,o);const s=r.endVector();return ri.startRecordBatch(r),ri.addLength(r,BigInt(t.length)),ri.addNodes(r,i),ri.addBuffers(r,s),ri.endRecordBatch(r)}function tD(r,t){const e=Br.encode(r,t.data);return Zs.startDictionaryBatch(r),Zs.addId(r,BigInt(t.id)),Zs.addIsDelta(r,t.isDelta),Zs.addData(r,e),Zs.endDictionaryBatch(r)}function eD(r,t){return $b.createFieldNode(r,BigInt(t.length),BigInt(t.nullCount))}function rD(r,t){return jb.createBuffer(r,BigInt(t.offset),BigInt(t.length))}const nD=(()=>{const r=new ArrayBuffer(2);return new DataView(r).setInt16(0,256,!0),new Int16Array(r)[0]===256})(),pp=r=>`Expected ${me[r]} Message in stream, but was null or length 0.`,mp=r=>`Header pointer of flatbuffer-encoded ${me[r]} Message is null or length 0.`,Ax=(r,t)=>`Expected to read ${r} metadata bytes, but only read ${t}.`,Mx=(r,t)=>`Expected to read ${r} bytes for message body, but only read ${t}.`;class Cx{constructor(t){this.source=t instanceof Nu?t:new Nu(t)}[Symbol.iterator](){return this}next(){let t;return(t=this.readMetadataLength()).done||t.value===-1&&(t=this.readMetadataLength()).done||(t=this.readMetadata(t.value)).done?Be:t}throw(t){return this.source.throw(t)}return(t){return this.source.return(t)}readMessage(t){let e;if((e=this.next()).done)return null;if(t!=null&&e.value.headerType!==t)throw new Error(pp(t));return e.value}readMessageBody(t){if(t<=0)return new Uint8Array(0);const e=ce(this.source.read(t));if(e.byteLength[...i,...s.VALIDITY&&[s.VALIDITY]||[],...s.TYPE_ID&&[s.TYPE_ID]||[],...s.OFFSET&&[s.OFFSET]||[],...s.DATA&&[s.DATA]||[],...e(s.children)],[])}}readMessage(t){let e;if((e=this.next()).done)return null;if(t!=null&&e.value.headerType!==t)throw new Error(pp(t));return e.value}readSchema(){const t=me.Schema,e=this.readMessage(t),n=e==null?void 0:e.header();if(!e||!n)throw new Error(mp(t));return n}}const uc=4,sf="ARROW1",ja=new Uint8Array(sf.length);for(let r=0;rthis):this}readRecordBatch(t){return this._impl.isFile()?this._impl.readRecordBatch(t):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return Yr.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return Yr.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(t){throw new Error('"throughNode" not available in this environment')}static throughDOM(t,e){throw new Error('"throughDOM" not available in this environment')}static from(t){return t instanceof tn?t:Hd(t)?cD(t):Db(t)?fD(t):Is(t)?Jt(this,void 0,void 0,function*(){return yield tn.from(yield t)}):Lb(t)||Kf(t)||Nb(t)||Uo(t)?dD(new Po(t)):hD(new Nu(t))}static readAll(t){return t instanceof tn?t.isSync()?Ty(t):Iy(t):Hd(t)||ArrayBuffer.isView(t)||Qa(t)||Fb(t)?Ty(t):Iy(t)}}class Uu extends tn{constructor(t){super(t),this._impl=t}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return br(this,arguments,function*(){yield Rt(yield*Ss(Bn(this[Symbol.iterator]())))})}}class ku extends tn{constructor(t){super(t),this._impl=t}readAll(){return Jt(this,void 0,void 0,function*(){var t,e,n,i;const s=new Array;try{for(var o=!0,a=Bn(this),l;l=yield a.next(),t=l.done,!t;o=!0){i=l.value,o=!1;const u=i;s.push(u)}}catch(u){e={error:u}}finally{try{!o&&!t&&(n=a.return)&&(yield n.call(a))}finally{if(e)throw e.error}}return s})}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}}class Px extends Uu{constructor(t){super(t),this._impl=t}}class aD extends ku{constructor(t){super(t),this._impl=t}}class Rx{get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}constructor(t=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=t}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(t){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=t,this.dictionaries=new Map,this}_loadRecordBatch(t,e){const n=this._loadVectors(t,e,this.schema.fields),i=le({type:new dr(this.schema.fields),length:t.length,children:n});return new _r(this.schema,i)}_loadDictionaryBatch(t,e){const{id:n,isDelta:i}=t,{dictionaries:s,schema:o}=this,a=s.get(n),l=o.dictionaries.get(n),u=this._loadVectors(t.data,e,[l]);return(a&&i?a.concat(new Ne(u)):new Ne(u)).memoize()}_loadVectors(t,e,n){return new bx(e,t.nodes,t.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(n)}}class zu extends Rx{constructor(t,e){super(e),this._reader=Hd(t)?new sD(this._handle=t):new Cx(this._handle=t)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(t){return this.closed||(this.autoDestroy=Dx(this,t),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(t):Be}return(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(t):Be}next(){if(this.closed)return Be;let t;const{_reader:e}=this;for(;t=this._readNextMessageAndValidate();)if(t.isSchema())this.reset(t.header());else if(t.isRecordBatch()){this._recordBatchIndex++;const n=t.header(),i=e.readMessageBody(t.bodyLength);return{done:!1,value:this._loadRecordBatch(n,i)}}else if(t.isDictionaryBatch()){this._dictionaryIndex++;const n=t.header(),i=e.readMessageBody(t.bodyLength),s=this._loadDictionaryBatch(n,i);this.dictionaries.set(n.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new fp(this.schema)}):this.return()}_readNextMessageAndValidate(t){return this._reader.readMessage(t)}}class Vu extends Rx{constructor(t,e){super(e),this._reader=new iD(this._handle=t)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return Jt(this,void 0,void 0,function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)})}open(t){return Jt(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=Dx(this,t),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(t){return Jt(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(t):Be})}return(t){return Jt(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(t):Be})}next(){return Jt(this,void 0,void 0,function*(){if(this.closed)return Be;let t;const{_reader:e}=this;for(;t=yield this._readNextMessageAndValidate();)if(t.isSchema())yield this.reset(t.header());else if(t.isRecordBatch()){this._recordBatchIndex++;const n=t.header(),i=yield e.readMessageBody(t.bodyLength);return{done:!1,value:this._loadRecordBatch(n,i)}}else if(t.isDictionaryBatch()){this._dictionaryIndex++;const n=t.header(),i=yield e.readMessageBody(t.bodyLength),s=this._loadDictionaryBatch(n,i);this.dictionaries.set(n.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new fp(this.schema)}):yield this.return()})}_readNextMessageAndValidate(t){return Jt(this,void 0,void 0,function*(){return yield this._reader.readMessage(t)})}}class Fx extends zu{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(t,e){super(t instanceof gy?t:new gy(t),e)}isSync(){return!0}isFile(){return!0}open(t){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(const e of this._footer.dictionaryBatches())e&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(t)}readRecordBatch(t){var e;if(this.closed)return null;this._footer||this.open();const n=(e=this._footer)===null||e===void 0?void 0:e.getRecordBatch(t);if(n&&this._handle.seek(n.offset)){const i=this._reader.readMessage(me.RecordBatch);if(i!=null&&i.isRecordBatch()){const s=i.header(),o=this._reader.readMessageBody(i.bodyLength);return this._loadRecordBatch(s,o)}}return null}_readDictionaryBatch(t){var e;const n=(e=this._footer)===null||e===void 0?void 0:e.getDictionaryBatch(t);if(n&&this._handle.seek(n.offset)){const i=this._reader.readMessage(me.DictionaryBatch);if(i!=null&&i.isDictionaryBatch()){const s=i.header(),o=this._reader.readMessageBody(i.bodyLength),a=this._loadDictionaryBatch(s,o);this.dictionaries.set(s.id,a)}}}_readFooter(){const{_handle:t}=this,e=t.size-Ox,n=t.readInt32(e),i=t.readAt(e-n,n);return Va.decode(i)}_readNextMessageAndValidate(t){var e;if(this._footer||this.open(),this._footer&&this._recordBatchIndexsuper.open}});return Jt(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(const n of this._footer.dictionaryBatches())n&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield e.open.call(this,t)})}readRecordBatch(t){return Jt(this,void 0,void 0,function*(){var e;if(this.closed)return null;this._footer||(yield this.open());const n=(e=this._footer)===null||e===void 0?void 0:e.getRecordBatch(t);if(n&&(yield this._handle.seek(n.offset))){const i=yield this._reader.readMessage(me.RecordBatch);if(i!=null&&i.isRecordBatch()){const s=i.header(),o=yield this._reader.readMessageBody(i.bodyLength);return this._loadRecordBatch(s,o)}}return null})}_readDictionaryBatch(t){return Jt(this,void 0,void 0,function*(){var e;const n=(e=this._footer)===null||e===void 0?void 0:e.getDictionaryBatch(t);if(n&&(yield this._handle.seek(n.offset))){const i=yield this._reader.readMessage(me.DictionaryBatch);if(i!=null&&i.isDictionaryBatch()){const s=i.header(),o=yield this._reader.readMessageBody(i.bodyLength),a=this._loadDictionaryBatch(s,o);this.dictionaries.set(s.id,a)}}})}_readFooter(){return Jt(this,void 0,void 0,function*(){const{_handle:t}=this;t._pending&&(yield t._pending);const e=t.size-Ox,n=yield t.readInt32(e),i=yield t.readAt(e-n,n);return Va.decode(i)})}_readNextMessageAndValidate(t){return Jt(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex=4?gp(t)?new Px(new Fx(r.read())):new Uu(new zu(r)):new Uu(new zu(function*(){}()))}function dD(r){return Jt(this,void 0,void 0,function*(){const t=yield r.peek(tl+7&-8);return t&&t.byteLength>=4?gp(t)?new Px(new Fx(yield r.read())):new ku(new Vu(r)):new ku(new Vu(function(){return br(this,arguments,function*(){})}()))})}function fD(r){return Jt(this,void 0,void 0,function*(){const{size:t}=yield r.stat(),e=new Bu(r,t);return t>=oD&&gp(yield e.readAt(0,tl+7&-8))?new aD(new lD(e)):new ku(new Vu(e))})}class ke extends se{static assemble(...t){const e=i=>i.flatMap(s=>Array.isArray(s)?e(s):s instanceof _r?s.data.children:s.data),n=new ke;return n.visitMany(e(t)),n}constructor(){super(),this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}visit(t){if(t instanceof Ne)return this.visitMany(t.data),this;const{type:e}=t;if(!Ot.isDictionary(e)){const{length:n}=t;if(n>2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");if(Ot.isUnion(e))this.nodes.push(new Ni(n,0));else{const{nullCount:i}=t;Ot.isNull(e)||dn.call(this,i<=0?new Uint8Array(0):Ru(t.offset,n,t.nullBitmap)),this.nodes.push(new Ni(n,i))}}return super.visit(t)}visitNull(t){return this}visitDictionary(t){return this.visit(t.clone(t.type.indices))}get nodes(){return this._nodes}get buffers(){return this._buffers}get byteLength(){return this._byteLength}get bufferRegions(){return this._bufferRegions}}function dn(r){const t=r.byteLength+7&-8;return this.buffers.push(r),this.bufferRegions.push(new Ln(this._byteLength,t)),this._byteLength+=t,this}function pD(r){var t;const{type:e,length:n,typeIds:i,valueOffsets:s}=r;if(dn.call(this,i),e.mode===lr.Sparse)return of.call(this,r);if(e.mode===lr.Dense){if(r.offset<=0)return dn.call(this,s),of.call(this,r);{const o=new Int32Array(n),a=Object.create(null),l=Object.create(null);for(let u,c,h=-1;++h{const h=e.typeIds[c],f=a[h],d=l[h];return u.slice(f,Math.min(n,d))}))}}return this}function mD(r){let t;return r.nullCount>=r.length?dn.call(this,new Uint8Array(0)):(t=r.values)instanceof Uint8Array?dn.call(this,Ru(r.offset,r.length,t)):dn.call(this,Fu(r.values))}function fi(r){return dn.call(this,r.values.subarray(0,r.length*r.stride))}function cc(r){const{length:t,values:e,valueOffsets:n}=r,i=Te(n[0]),s=Te(n[t]),o=Math.min(s-i,e.byteLength-i);return dn.call(this,Ub(-i,t+1,n)),dn.call(this,e.subarray(i,i+o)),this}function yp(r){const{length:t,valueOffsets:e}=r;if(e){const{[0]:n,[t]:i}=e;return dn.call(this,Ub(-n,t+1,e)),this.visit(r.children[0].slice(n,i-n))}return this.visit(r.children[0])}function of(r){return this.visitMany(r.type.children.map((t,e)=>r.children[e]).filter(Boolean))[0]}ke.prototype.visitBool=mD;ke.prototype.visitInt=fi;ke.prototype.visitFloat=fi;ke.prototype.visitUtf8=cc;ke.prototype.visitLargeUtf8=cc;ke.prototype.visitBinary=cc;ke.prototype.visitLargeBinary=cc;ke.prototype.visitFixedSizeBinary=fi;ke.prototype.visitDate=fi;ke.prototype.visitTimestamp=fi;ke.prototype.visitTime=fi;ke.prototype.visitDecimal=fi;ke.prototype.visitList=yp;ke.prototype.visitStruct=of;ke.prototype.visitUnion=pD;ke.prototype.visitInterval=fi;ke.prototype.visitDuration=fi;ke.prototype.visitFixedSizeList=yp;ke.prototype.visitMap=yp;class Lx extends lp{static throughNode(t){throw new Error('"throughNode" not available in this environment')}static throughDOM(t,e){throw new Error('"throughDOM" not available in this environment')}constructor(t){super(),this._position=0,this._started=!1,this._sink=new Xl,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,wr(t)||(t={autoDestroy:!0,writeLegacyIpcFormat:!1}),this._autoDestroy=typeof t.autoDestroy=="boolean"?t.autoDestroy:!0,this._writeLegacyIpcFormat=typeof t.writeLegacyIpcFormat=="boolean"?t.writeLegacyIpcFormat:!1}toString(t=!1){return this._sink.toString(t)}toUint8Array(t=!1){return this._sink.toUint8Array(t)}writeAll(t){return Is(t)?t.then(e=>this.writeAll(e)):Uo(t)?wp(this,t):bp(this,t)}get closed(){return this._sink.closed}[Symbol.asyncIterator](){return this._sink[Symbol.asyncIterator]()}toDOMStream(t){return this._sink.toDOMStream(t)}toNodeStream(t){return this._sink.toNodeStream(t)}close(){return this.reset()._sink.close()}abort(t){return this.reset()._sink.abort(t)}finish(){return this._autoDestroy?this.close():this.reset(this._sink,this._schema),this}reset(t=this._sink,e=null){return t===this._sink||t instanceof Xl?this._sink=t:(this._sink=new Xl,t&&GR(t)?this.toDOMStream({type:"bytes"}).pipeTo(t):t&&WR(t)&&this.toNodeStream({objectMode:!1}).pipe(t)),this._started&&this._schema&&this._writeFooter(this._schema),this._started=!1,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,(!e||!nf(e,this._schema))&&(e==null?(this._position=0,this._schema=null):(this._started=!0,this._schema=e,this._writeSchema(e))),this}write(t){let e=null;if(this._sink){if(t==null)return this.finish()&&void 0;if(t instanceof Li&&!(e=t.schema))return this.finish()&&void 0;if(t instanceof _r&&!(e=t.schema))return this.finish()&&void 0}else throw new Error("RecordBatchWriter is closed");if(e&&!nf(e,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,e)}t instanceof _r?t instanceof fp||this._writeRecordBatch(t):t instanceof Li?this.writeAll(t.batches):Qa(t)&&this.writeAll(t)}_writeMessage(t,e=8){const n=e-1,i=fr.encode(t),s=i.byteLength,o=this._writeLegacyIpcFormat?4:8,a=s+o+n&~n,l=a-s-o;return t.headerType===me.RecordBatch?this._recordBatchBlocks.push(new Fi(a,t.bodyLength,this._position)):t.headerType===me.DictionaryBatch&&this._dictionaryBlocks.push(new Fi(a,t.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(a-o)),s>0&&this._write(i),this._writePadding(l)}_write(t){if(this._started){const e=ce(t);e&&e.byteLength>0&&(this._sink.write(e),this._position+=e.byteLength)}return this}_writeSchema(t){return this._writeMessage(fr.from(t))}_writeFooter(t){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(ja)}_writePadding(t){return t>0?this._write(new Uint8Array(t)):this}_writeRecordBatch(t){const{byteLength:e,nodes:n,bufferRegions:i,buffers:s}=ke.assemble(t),o=new Br(t.numRows,n,i),a=fr.from(o,e);return this._writeDictionaries(t)._writeMessage(a)._writeBodyBuffers(s)}_writeDictionaryBatch(t,e,n=!1){const{byteLength:i,nodes:s,bufferRegions:o,buffers:a}=ke.assemble(new Ne([t])),l=new Br(t.length,s,o),u=new Vn(l,e,n),c=fr.from(u,i);return this._writeMessage(c)._writeBodyBuffers(a)}_writeBodyBuffers(t){let e,n,i;for(let s=-1,o=t.length;++s0&&(this._write(e),(i=(n+7&-8)-n)>0&&this._writePadding(i));return this}_writeDictionaries(t){var e,n;for(const[i,s]of t.dictionaries){const o=(e=s==null?void 0:s.data)!==null&&e!==void 0?e:[],a=this._seenDictionaries.get(i),l=(n=this._dictionaryDeltaOffsets.get(i))!==null&&n!==void 0?n:0;if(!a||a.data[0]!==o[0])for(const[u,c]of o.entries())this._writeDictionaryBatch(c,i,u>0);else if(ln.writeAll(i)):Uo(t)?wp(n,t):bp(n,t)}}class _p extends Lx{static writeAll(t){const e=new _p;return Is(t)?t.then(n=>e.writeAll(n)):Uo(t)?wp(e,t):bp(e,t)}constructor(){super(),this._autoDestroy=!0}_writeSchema(t){return this._writeMagic()._writePadding(2)}_writeDictionaryBatch(t,e,n=!1){if(!n&&this._seenDictionaries.has(e))throw new Error("The Arrow File format does not support replacement dictionaries. ");return super._writeDictionaryBatch(t,e,n)}_writeFooter(t){const e=Va.encode(new Va(t,je.V5,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(t)._write(e)._write(Int32Array.of(e.byteLength))._writeMagic()}}function bp(r,t){let e=t;t instanceof Li&&(e=t.batches,r.reset(void 0,t.schema));for(const n of e)r.write(n);return r.finish()}function wp(r,t){return Jt(this,void 0,void 0,function*(){var e,n,i,s,o,a,l;try{for(e=!0,n=Bn(t);i=yield n.next(),s=i.done,!s;e=!0){l=i.value,e=!1;const u=l;r.write(u)}}catch(u){o={error:u}}finally{try{!e&&!s&&(a=n.return)&&(yield a.call(n))}finally{if(o)throw o.error}}return r.finish()})}function gD(r,t="stream"){return(t==="stream"?vp:_p).writeAll(r).toUint8Array(!0)}var yD=Object.create,Nx=Object.defineProperty,vD=Object.getOwnPropertyDescriptor,_D=Object.getOwnPropertyNames,bD=Object.getPrototypeOf,wD=Object.prototype.hasOwnProperty,xD=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),SD=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of _D(t))!wD.call(r,i)&&i!==e&&Nx(r,i,{get:()=>t[i],enumerable:!(n=vD(t,i))||n.enumerable});return r},TD=(r,t,e)=>(e=r!=null?yD(bD(r)):{},SD(!r||!r.__esModule?Nx(e,"default",{value:r,enumerable:!0}):e,r)),ID=xD((r,t)=>{t.exports=Worker}),Bx=(r=>(r[r.UNDEFINED=0]="UNDEFINED",r[r.AUTOMATIC=1]="AUTOMATIC",r[r.READ_ONLY=2]="READ_ONLY",r[r.READ_WRITE=3]="READ_WRITE",r))(Bx||{}),ED=(r=>(r[r.IDENTIFIER=0]="IDENTIFIER",r[r.NUMERIC_CONSTANT=1]="NUMERIC_CONSTANT",r[r.STRING_CONSTANT=2]="STRING_CONSTANT",r[r.OPERATOR=3]="OPERATOR",r[r.KEYWORD=4]="KEYWORD",r[r.COMMENT=5]="COMMENT",r))(ED||{}),AD=(r=>(r[r.NONE=0]="NONE",r[r.DEBUG=1]="DEBUG",r[r.INFO=2]="INFO",r[r.WARNING=3]="WARNING",r[r.ERROR=4]="ERROR",r))(AD||{}),MD=(r=>(r[r.NONE=0]="NONE",r[r.CONNECT=1]="CONNECT",r[r.DISCONNECT=2]="DISCONNECT",r[r.OPEN=3]="OPEN",r[r.QUERY=4]="QUERY",r[r.INSTANTIATE=5]="INSTANTIATE",r))(MD||{}),CD=(r=>(r[r.NONE=0]="NONE",r[r.OK=1]="OK",r[r.ERROR=2]="ERROR",r[r.START=3]="START",r[r.RUN=4]="RUN",r[r.CAPTURE=5]="CAPTURE",r))(CD||{}),OD=(r=>(r[r.NONE=0]="NONE",r[r.WEB_WORKER=1]="WEB_WORKER",r[r.NODE_WORKER=2]="NODE_WORKER",r[r.BINDINGS=3]="BINDINGS",r[r.ASYNC_DUCKDB=4]="ASYNC_DUCKDB",r))(OD||{}),PD=class{log(r){}},Ux=class{constructor(r=2){this.level=r}log(r){r.level>=this.level&&console.log(r)}},RD=(r=>(r[r.SUCCESS=0]="SUCCESS",r))(RD||{}),FD=class{constructor(r,t){this._bindings=r,this._conn=t}get bindings(){return this._bindings}async close(){return this._bindings.disconnect(this._conn)}useUnsafe(r){return r(this._bindings,this._conn)}async query(r){this._bindings.logger.log({timestamp:new Date,level:2,origin:4,topic:4,event:4,value:r});let t=await this._bindings.runQuery(this._conn,r),e=tn.from(t);return console.assert(e.isSync(),"Reader is not sync"),console.assert(e.isFile(),"Reader is not file"),new Li(e)}async send(r,t=!1){this._bindings.logger.log({timestamp:new Date,level:2,origin:4,topic:4,event:4,value:r});let e=await this._bindings.startPendingQuery(this._conn,r,t);for(;e==null;)e=await this._bindings.pollPendingQuery(this._conn);let n=new kx(this._bindings,this._conn,e),i=await tn.from(n);return console.assert(i.isAsync()),console.assert(i.isStream()),i}async cancelSent(){return await this._bindings.cancelPendingQuery(this._conn)}async getTableNames(r){return await this._bindings.getTableNames(this._conn,r)}async prepare(r){let t=await this._bindings.createPrepared(this._conn,r);return new DD(this._bindings,this._conn,t)}async insertArrowTable(r,t){let e=gD(r,"stream");await this.insertArrowFromIPCStream(e,t)}async insertArrowFromIPCStream(r,t){await this._bindings.insertArrowFromIPCStream(this._conn,r,t)}async insertCSVFromPath(r,t){await this._bindings.insertCSVFromPath(this._conn,r,t)}async insertJSONFromPath(r,t){await this._bindings.insertJSONFromPath(this._conn,r,t)}},kx=class{constructor(r,t,e){this.db=r,this.conn=t,this.header=e,this._first=!0,this._depleted=!1,this._inFlight=null}async next(){if(this._first)return this._first=!1,{done:!1,value:this.header};if(this._depleted)return{done:!0,value:null};let r;return this._inFlight!=null?(r=await this._inFlight,this._inFlight=null):r=await this.db.fetchQueryResults(this.conn),this._depleted=r.length==0,this._depleted||(this._inFlight=this.db.fetchQueryResults(this.conn)),{done:this._depleted,value:r}}[Symbol.asyncIterator](){return this}},DD=class{constructor(r,t,e){this.bindings=r,this.connectionId=t,this.statementId=e}async close(){await this.bindings.closePrepared(this.connectionId,this.statementId)}async query(...r){let t=await this.bindings.runPrepared(this.connectionId,this.statementId,r),e=tn.from(t);return console.assert(e.isSync()),console.assert(e.isFile()),new Li(e)}async send(...r){let t=await this.bindings.sendPrepared(this.connectionId,this.statementId,r),e=new kx(this.bindings,this.connectionId,t),n=await tn.from(e);return console.assert(n.isAsync()),console.assert(n.isStream()),n}},LD=(r=>(r.CANCEL_PENDING_QUERY="CANCEL_PENDING_QUERY",r.CLOSE_PREPARED="CLOSE_PREPARED",r.COLLECT_FILE_STATISTICS="COLLECT_FILE_STATISTICS",r.REGISTER_OPFS_FILE_NAME="REGISTER_OPFS_FILE_NAME",r.CONNECT="CONNECT",r.COPY_FILE_TO_BUFFER="COPY_FILE_TO_BUFFER",r.COPY_FILE_TO_PATH="COPY_FILE_TO_PATH",r.CREATE_PREPARED="CREATE_PREPARED",r.DISCONNECT="DISCONNECT",r.DROP_FILE="DROP_FILE",r.DROP_FILES="DROP_FILES",r.EXPORT_FILE_STATISTICS="EXPORT_FILE_STATISTICS",r.FETCH_QUERY_RESULTS="FETCH_QUERY_RESULTS",r.FLUSH_FILES="FLUSH_FILES",r.GET_FEATURE_FLAGS="GET_FEATURE_FLAGS",r.GET_TABLE_NAMES="GET_TABLE_NAMES",r.GET_VERSION="GET_VERSION",r.GLOB_FILE_INFOS="GLOB_FILE_INFOS",r.INSERT_ARROW_FROM_IPC_STREAM="INSERT_ARROW_FROM_IPC_STREAM",r.INSERT_CSV_FROM_PATH="IMPORT_CSV_FROM_PATH",r.INSERT_JSON_FROM_PATH="IMPORT_JSON_FROM_PATH",r.INSTANTIATE="INSTANTIATE",r.OPEN="OPEN",r.PING="PING",r.POLL_PENDING_QUERY="POLL_PENDING_QUERY",r.REGISTER_FILE_BUFFER="REGISTER_FILE_BUFFER",r.REGISTER_FILE_HANDLE="REGISTER_FILE_HANDLE",r.REGISTER_FILE_URL="REGISTER_FILE_URL",r.RESET="RESET",r.RUN_PREPARED="RUN_PREPARED",r.RUN_QUERY="RUN_QUERY",r.SEND_PREPARED="SEND_PREPARED",r.START_PENDING_QUERY="START_PENDING_QUERY",r.TOKENIZE="TOKENIZE",r))(LD||{}),ND=(r=>(r.CONNECTION_INFO="CONNECTION_INFO",r.ERROR="ERROR",r.FEATURE_FLAGS="FEATURE_FLAGS",r.FILE_BUFFER="FILE_BUFFER",r.FILE_INFOS="FILE_INFOS",r.FILE_SIZE="FILE_SIZE",r.FILE_STATISTICS="FILE_STATISTICS",r.INSTANTIATE_PROGRESS="INSTANTIATE_PROGRESS",r.LOG="LOG",r.OK="OK",r.PREPARED_STATEMENT_ID="PREPARED_STATEMENT_ID",r.QUERY_PLAN="QUERY_PLAN",r.QUERY_RESULT="QUERY_RESULT",r.QUERY_RESULT_CHUNK="QUERY_RESULT_CHUNK",r.QUERY_RESULT_HEADER="QUERY_RESULT_HEADER",r.QUERY_RESULT_HEADER_OR_NULL="QUERY_RESULT_HEADER_OR_NULL",r.REGISTERED_FILE="REGISTERED_FILE",r.SCRIPT_TOKENS="SCRIPT_TOKENS",r.SUCCESS="SUCCESS",r.TABLE_NAMES="TABLE_NAMES",r.VERSION_STRING="VERSION_STRING",r))(ND||{}),de=class{constructor(r,t){this.promiseResolver=()=>{},this.promiseRejecter=()=>{},this.type=r,this.data=t,this.promise=new Promise((e,n)=>{this.promiseResolver=e,this.promiseRejecter=n})}};function Ql(r){switch(r.typeId){case k.Binary:return{sqlType:"binary"};case k.Bool:return{sqlType:"bool"};case k.Date:return{sqlType:"date"};case k.DateDay:return{sqlType:"date32[d]"};case k.DateMillisecond:return{sqlType:"date64[ms]"};case k.Decimal:{let t=r;return{sqlType:"decimal",precision:t.precision,scale:t.scale}}case k.Float:return{sqlType:"float"};case k.Float16:return{sqlType:"float16"};case k.Float32:return{sqlType:"float32"};case k.Float64:return{sqlType:"float64"};case k.Int:return{sqlType:"int32"};case k.Int16:return{sqlType:"int16"};case k.Int32:return{sqlType:"int32"};case k.Int64:return{sqlType:"int64"};case k.Uint16:return{sqlType:"uint16"};case k.Uint32:return{sqlType:"uint32"};case k.Uint64:return{sqlType:"uint64"};case k.Uint8:return{sqlType:"uint8"};case k.IntervalDayTime:return{sqlType:"interval[dt]"};case k.IntervalYearMonth:return{sqlType:"interval[m]"};case k.List:return{sqlType:"list",valueType:Ql(r.valueType)};case k.FixedSizeBinary:return{sqlType:"fixedsizebinary",byteWidth:r.byteWidth};case k.Null:return{sqlType:"null"};case k.Utf8:return{sqlType:"utf8"};case k.Struct:return{sqlType:"struct",fields:r.children.map(t=>af(t.name,t.type))};case k.Map:{let t=r;return{sqlType:"map",keyType:Ql(t.keyType),valueType:Ql(t.valueType)}}case k.Time:return{sqlType:"time[s]"};case k.TimeMicrosecond:return{sqlType:"time[us]"};case k.TimeMillisecond:return{sqlType:"time[ms]"};case k.TimeNanosecond:return{sqlType:"time[ns]"};case k.TimeSecond:return{sqlType:"time[s]"};case k.Timestamp:return{sqlType:"timestamp",timezone:r.timezone||void 0};case k.TimestampSecond:return{sqlType:"timestamp[s]",timezone:r.timezone||void 0};case k.TimestampMicrosecond:return{sqlType:"timestamp[us]",timezone:r.timezone||void 0};case k.TimestampNanosecond:return{sqlType:"timestamp[ns]",timezone:r.timezone||void 0};case k.TimestampMillisecond:return{sqlType:"timestamp[ms]",timezone:r.timezone||void 0}}throw new Error("unsupported arrow type: ".concat(r.toString()))}function af(r,t){let e=Ql(t);return e.name=r,e}var BD=new TextEncoder,UD=class{constructor(r,t=null){this._onInstantiationProgress=[],this._worker=null,this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{},this._nextMessageId=0,this._pendingRequests=new Map,this._logger=r,this._onMessageHandler=this.onMessage.bind(this),this._onErrorHandler=this.onError.bind(this),this._onCloseHandler=this.onClose.bind(this),t!=null&&this.attach(t)}get logger(){return this._logger}attach(r){this._worker=r,this._worker.addEventListener("message",this._onMessageHandler),this._worker.addEventListener("error",this._onErrorHandler),this._worker.addEventListener("close",this._onCloseHandler),this._workerShutdownPromise=new Promise((t,e)=>{this._workerShutdownResolver=t})}detach(){this._worker&&(this._worker.removeEventListener("message",this._onMessageHandler),this._worker.removeEventListener("error",this._onErrorHandler),this._worker.removeEventListener("close",this._onCloseHandler),this._worker=null,this._workerShutdownResolver(null),this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{})}async terminate(){this._worker&&(this._worker.terminate(),this._worker=null,this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{})}async postTask(r,t=[]){if(!this._worker){console.error("cannot send a message since the worker is not set!");return}let e=this._nextMessageId++;return this._pendingRequests.set(e,r),this._worker.postMessage({messageId:e,type:r.type,data:r.data},t),await r.promise}onMessage(r){var t;let e=r.data;switch(e.type){case"LOG":{this._logger.log(e.data);return}case"INSTANTIATE_PROGRESS":{for(let i of this._onInstantiationProgress)i(e.data);return}}let n=this._pendingRequests.get(e.requestId);if(!n){console.warn("unassociated response: [".concat(e.requestId,", ").concat(e.type.toString(),"]"));return}if(this._pendingRequests.delete(e.requestId),e.type=="ERROR"){let i=new Error(e.data.message);i.name=e.data.name,(t=Object.getOwnPropertyDescriptor(i,"stack"))!=null&&t.writable&&(i.stack=e.data.stack),n.promiseRejecter(i);return}switch(n.type){case"CLOSE_PREPARED":case"COLLECT_FILE_STATISTICS":case"REGISTER_OPFS_FILE_NAME":case"COPY_FILE_TO_PATH":case"DISCONNECT":case"DROP_FILE":case"DROP_FILES":case"FLUSH_FILES":case"INSERT_ARROW_FROM_IPC_STREAM":case"IMPORT_CSV_FROM_PATH":case"IMPORT_JSON_FROM_PATH":case"OPEN":case"PING":case"REGISTER_FILE_BUFFER":case"REGISTER_FILE_HANDLE":case"REGISTER_FILE_URL":case"RESET":if(e.type=="OK"){n.promiseResolver(e.data);return}break;case"INSTANTIATE":if(this._onInstantiationProgress=[],e.type=="OK"){n.promiseResolver(e.data);return}break;case"GLOB_FILE_INFOS":if(e.type=="FILE_INFOS"){n.promiseResolver(e.data);return}break;case"GET_VERSION":if(e.type=="VERSION_STRING"){n.promiseResolver(e.data);return}break;case"GET_FEATURE_FLAGS":if(e.type=="FEATURE_FLAGS"){n.promiseResolver(e.data);return}break;case"GET_TABLE_NAMES":if(e.type=="TABLE_NAMES"){n.promiseResolver(e.data);return}break;case"TOKENIZE":if(e.type=="SCRIPT_TOKENS"){n.promiseResolver(e.data);return}break;case"COPY_FILE_TO_BUFFER":if(e.type=="FILE_BUFFER"){n.promiseResolver(e.data);return}break;case"EXPORT_FILE_STATISTICS":if(e.type=="FILE_STATISTICS"){n.promiseResolver(e.data);return}break;case"CONNECT":if(e.type=="CONNECTION_INFO"){n.promiseResolver(e.data);return}break;case"RUN_PREPARED":case"RUN_QUERY":if(e.type=="QUERY_RESULT"){n.promiseResolver(e.data);return}break;case"SEND_PREPARED":if(e.type=="QUERY_RESULT_HEADER"){n.promiseResolver(e.data);return}break;case"START_PENDING_QUERY":if(e.type=="QUERY_RESULT_HEADER_OR_NULL"){n.promiseResolver(e.data);return}break;case"POLL_PENDING_QUERY":if(e.type=="QUERY_RESULT_HEADER_OR_NULL"){n.promiseResolver(e.data);return}break;case"CANCEL_PENDING_QUERY":if(this._onInstantiationProgress=[],e.type=="SUCCESS"){n.promiseResolver(e.data);return}break;case"FETCH_QUERY_RESULTS":if(e.type=="QUERY_RESULT_CHUNK"){n.promiseResolver(e.data);return}break;case"CREATE_PREPARED":if(e.type=="PREPARED_STATEMENT_ID"){n.promiseResolver(e.data);return}break}n.promiseRejecter(new Error("unexpected response type: ".concat(e.type.toString())))}onError(r){console.error(r),console.error("error in duckdb worker: ".concat(r.message)),this._pendingRequests.clear()}onClose(){if(this._workerShutdownResolver(null),this._pendingRequests.size!=0){console.warn("worker terminated with ".concat(this._pendingRequests.size," pending requests"));return}this._pendingRequests.clear()}async reset(){let r=new de("RESET",null);return await this.postTask(r)}async ping(){let r=new de("PING",null);await this.postTask(r)}async dropFile(r){let t=new de("DROP_FILE",r);return await this.postTask(t)}async dropFiles(){let r=new de("DROP_FILES",null);return await this.postTask(r)}async flushFiles(){let r=new de("FLUSH_FILES",null);return await this.postTask(r)}async instantiate(r,t=null,e=n=>{}){this._onInstantiationProgress.push(e);let n=new de("INSTANTIATE",[r,t]);return await this.postTask(n)}async getVersion(){let r=new de("GET_VERSION",null);return await this.postTask(r)}async getFeatureFlags(){let r=new de("GET_FEATURE_FLAGS",null);return await this.postTask(r)}async open(r){let t=new de("OPEN",r);await this.postTask(t)}async tokenize(r){let t=new de("TOKENIZE",r);return await this.postTask(t)}async connectInternal(){let r=new de("CONNECT",null);return await this.postTask(r)}async connect(){let r=await this.connectInternal();return new FD(this,r)}async disconnect(r){let t=new de("DISCONNECT",r);await this.postTask(t)}async runQuery(r,t){let e=new de("RUN_QUERY",[r,t]);return await this.postTask(e)}async startPendingQuery(r,t,e=!1){let n=new de("START_PENDING_QUERY",[r,t,e]);return await this.postTask(n)}async pollPendingQuery(r){let t=new de("POLL_PENDING_QUERY",r);return await this.postTask(t)}async cancelPendingQuery(r){let t=new de("CANCEL_PENDING_QUERY",r);return await this.postTask(t)}async fetchQueryResults(r){let t=new de("FETCH_QUERY_RESULTS",r);return await this.postTask(t)}async getTableNames(r,t){let e=new de("GET_TABLE_NAMES",[r,t]);return await this.postTask(e)}async createPrepared(r,t){let e=new de("CREATE_PREPARED",[r,t]);return await this.postTask(e)}async closePrepared(r,t){let e=new de("CLOSE_PREPARED",[r,t]);await this.postTask(e)}async runPrepared(r,t,e){let n=new de("RUN_PREPARED",[r,t,e]);return await this.postTask(n)}async sendPrepared(r,t,e){let n=new de("SEND_PREPARED",[r,t,e]);return await this.postTask(n)}async globFiles(r){let t=new de("GLOB_FILE_INFOS",r);return await this.postTask(t)}async registerFileText(r,t){let e=BD.encode(t);await this.registerFileBuffer(r,e)}async registerFileURL(r,t,e,n){t===void 0&&(t=r);let i=new de("REGISTER_FILE_URL",[r,t,e,n]);await this.postTask(i)}async registerEmptyFileBuffer(r){}async registerFileBuffer(r,t){let e=new de("REGISTER_FILE_BUFFER",[r,t]);await this.postTask(e,[t.buffer])}async registerFileHandle(r,t,e,n){let i=new de("REGISTER_FILE_HANDLE",[r,t,e,n]);await this.postTask(i,[])}async registerOPFSFileName(r){let t=new de("REGISTER_OPFS_FILE_NAME",[r]);await this.postTask(t,[])}async collectFileStatistics(r,t){let e=new de("COLLECT_FILE_STATISTICS",[r,t]);await this.postTask(e,[])}async exportFileStatistics(r){let t=new de("EXPORT_FILE_STATISTICS",r);return await this.postTask(t,[])}async copyFileToBuffer(r){let t=new de("COPY_FILE_TO_BUFFER",r);return await this.postTask(t)}async copyFileToPath(r,t){let e=new de("COPY_FILE_TO_PATH",[r,t]);await this.postTask(e)}async insertArrowFromIPCStream(r,t,e){if(t.length==0)return;let n=new de("INSERT_ARROW_FROM_IPC_STREAM",[r,t,e]);await this.postTask(n,[t.buffer])}async insertCSVFromPath(r,t,e){if(e.columns!==void 0){let i=[];for(let s in e.columns){let o=e.columns[s];i.push(af(s,o))}e.columnsFlat=i,delete e.columns}let n=new de("IMPORT_CSV_FROM_PATH",[r,t,e]);await this.postTask(n)}async insertJSONFromPath(r,t,e){if(e.columns!==void 0){let i=[];for(let s in e.columns){let o=e.columns[s];i.push(af(s,o))}e.columnsFlat=i,delete e.columns}let n=new de("IMPORT_JSON_FROM_PATH",[r,t,e]);await this.postTask(n)}};function kD(){let r=new TextDecoder;return t=>(typeof SharedArrayBuffer<"u"&&t.buffer instanceof SharedArrayBuffer&&(t=new Uint8Array(t)),r.decode(t))}kD();var zD=(r=>(r[r.BUFFER=0]="BUFFER",r[r.NODE_FS=1]="NODE_FS",r[r.BROWSER_FILEREADER=2]="BROWSER_FILEREADER",r[r.BROWSER_FSACCESS=3]="BROWSER_FSACCESS",r[r.HTTP=4]="HTTP",r[r.S3=5]="S3",r))(zD||{}),VD=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11])),jD=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,6,64,25,11,11])),$D=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),GD=()=>(async r=>{try{return typeof MessageChannel<"u"&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(r)}catch{return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11])),WD={version:"1.29.1-dev68.0"},xp=WD.version.split(".");xp[0];xp[1];xp[2];var HD=()=>typeof navigator>"u",Fh=null,Dh=null,Lh=null,Nh=null,Bh=null;async function XD(){return Fh==null&&(Fh=typeof BigInt64Array<"u"),Dh==null&&(Dh=await jD()),Lh==null&&(Lh=await GD()),Nh==null&&(Nh=await $D()),Bh==null&&(Bh=await VD()),{bigInt64Array:Fh,crossOriginIsolated:HD()||globalThis.crossOriginIsolated||!1,wasmExceptions:Dh,wasmSIMD:Nh,wasmThreads:Lh,wasmBulkMemory:Bh}}async function Ey(r){let t=await XD();if(t.wasmExceptions){if(t.wasmSIMD&&t.wasmThreads&&t.crossOriginIsolated&&r.coi)return{mainModule:r.coi.mainModule,mainWorker:r.coi.mainWorker,pthreadWorker:r.coi.pthreadWorker};if(r.eh)return{mainModule:r.eh.mainModule,mainWorker:r.eh.mainWorker,pthreadWorker:null}}return{mainModule:r.mvp.mainModule,mainWorker:r.mvp.mainWorker,pthreadWorker:null}}TD(ID());const Uh={},wa={};function Ia(r,t){try{const n=(Uh[r]||(Uh[r]=new Intl.DateTimeFormat("en-GB",{timeZone:r,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return n in wa?wa[n]:Ay(n,n.split(":"))}catch{if(r in wa)return wa[r];const e=r==null?void 0:r.match(YD);return e?Ay(r,e.slice(1)):NaN}}const YD=/([+-]\d\d):?(\d\d)?/;function Ay(r,t){const e=+t[0],n=+(t[1]||0);return wa[r]=e>0?e*60+n:e*60-n}class Fr extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Ia(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),zx(this),lf(this)):this.setTime(Date.now())}static tz(t,...e){return e.length?new Fr(...e,t):new Fr(Date.now(),t)}withTimeZone(t){return new Fr(+this,t)}getTimezoneOffset(){return-Ia(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),lf(this),+this}[Symbol.for("constructDateFrom")](t){return new Fr(+new Date(t),this.timeZone)}}const My=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(r=>{if(!My.test(r))return;const t=r.replace(My,"$1UTC");Fr.prototype[t]&&(r.startsWith("get")?Fr.prototype[r]=function(){return this.internal[t]()}:(Fr.prototype[r]=function(){return Date.prototype[t].apply(this.internal,arguments),qD(this),+this},Fr.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),lf(this),+this}))});function lf(r){r.internal.setTime(+r),r.internal.setUTCMinutes(r.internal.getUTCMinutes()-r.getTimezoneOffset())}function qD(r){Date.prototype.setFullYear.call(r,r.internal.getUTCFullYear(),r.internal.getUTCMonth(),r.internal.getUTCDate()),Date.prototype.setHours.call(r,r.internal.getUTCHours(),r.internal.getUTCMinutes(),r.internal.getUTCSeconds(),r.internal.getUTCMilliseconds()),zx(r)}function zx(r){const t=Ia(r.timeZone,r),e=new Date(+r);e.setUTCHours(e.getUTCHours()-1);const n=-new Date(+r).getTimezoneOffset(),i=-new Date(+e).getTimezoneOffset(),s=n-i,o=Date.prototype.getHours.apply(r)!==r.internal.getUTCHours();s&&o&&r.internal.setUTCMinutes(r.internal.getUTCMinutes()+s);const a=n-t;a&&Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+a);const l=Ia(r.timeZone,r),c=-new Date(+r).getTimezoneOffset()-l,h=l!==t,f=c-a;if(h&&f){Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+f);const d=Ia(r.timeZone,r),m=l-d;m&&(r.internal.setUTCMinutes(r.internal.getUTCMinutes()+m),Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+m))}}const QD=new TextDecoder("utf-8"),ZD=r=>QD.decode(r),KD=new TextEncoder,Vx=r=>KD.encode(r),An=r=>typeof r=="function",el=r=>r!=null&&Object(r)===r,JD=r=>el(r)&&An(r.then),jx=r=>el(r)&&An(r[Symbol.iterator]),tL=r=>el(r)&&An(r[Symbol.asyncIterator]),eL=r=>el(r)&&"done"in r&&"value"in r,rL=r=>el(r)&&An(r.clear)&&An(r.bytes)&&An(r.position)&&An(r.setPosition)&&An(r.capacity)&&An(r.getBufferIdentifier)&&An(r.createLong),Sp=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:ArrayBuffer;function nL(r){const t=r[0]?[r[0]]:[];let e,n,i,s;for(let o,a,l=0,u=0,c=r.length;++lc+h.byteLength,0);let i,s,o,a=0,l=-1;const u=Math.min(t||Number.POSITIVE_INFINITY,n);for(const c=e.length;++lur(Int8Array,r),oL=r=>ur(Int16Array,r),aL=r=>ur(Int32Array,r),lL=r=>ur(BigInt64Array,r),uL=r=>ur(Uint8Array,r),cL=r=>ur(Uint16Array,r),hL=r=>ur(Uint32Array,r),dL=r=>ur(BigUint64Array,r),fL=r=>ur(Float32Array,r),pL=r=>ur(Float64Array,r),mL=r=>ur(Uint8ClampedArray,r),cf=r=>(r.next(),r);function*Xn(r,t){const e=function*(i){yield i},n=typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof Sp?e(t):jx(t)?t:e(t);return yield*cf(function*(i){let s=null;do s=i.next(yield ur(r,s));while(!s.done)}(n[Symbol.iterator]())),new r}const gL=r=>Xn(Int8Array,r),yL=r=>Xn(Int16Array,r),vL=r=>Xn(Int32Array,r),_L=r=>Xn(Uint8Array,r),bL=r=>Xn(Uint16Array,r),wL=r=>Xn(Uint32Array,r),xL=r=>Xn(Float32Array,r),SL=r=>Xn(Float64Array,r),TL=r=>Xn(Uint8ClampedArray,r);function mn(r,t){return br(this,arguments,function*(){if(JD(t))return yield Rt(yield Rt(yield*Ss(Bn(mn(r,yield Rt(t))))));const n=function(o){return br(this,arguments,function*(){yield yield Rt(yield Rt(o))})},i=function(o){return br(this,arguments,function*(){yield Rt(yield*Ss(Bn(cf(function*(a){let l=null;do l=a.next(yield l==null?void 0:l.value);while(!l.done)}(o[Symbol.iterator]())))))})},s=typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof Sp?n(t):jx(t)?i(t):tL(t)?t:n(t);return yield Rt(yield*Ss(Bn(cf(function(o){return br(this,arguments,function*(){let a=null;do a=yield Rt(o.next(yield yield Rt(ur(r,a))));while(!a.done)})}(s[Symbol.asyncIterator]()))))),yield Rt(new r)})}const IL=r=>mn(Int8Array,r),EL=r=>mn(Int16Array,r),AL=r=>mn(Int32Array,r),ML=r=>mn(Uint8Array,r),CL=r=>mn(Uint16Array,r),OL=r=>mn(Uint32Array,r),PL=r=>mn(Float32Array,r),RL=r=>mn(Float64Array,r),FL=r=>mn(Uint8ClampedArray,r);function DL(r,t,e){if(r!==0){e=e.slice(0,t);for(let n=-1,i=e.length;++n0)do if(r[e]!==t[e])return!1;while(++eFo(t))}]`:`[${r}]`:ArrayBuffer.isView(r)?`[${r}]`:JSON.stringify(r,(t,e)=>typeof e=="bigint"?`${e}`:e)}const BL=Object.freeze(Object.defineProperty({__proto__:null,valueToString:Fo},Symbol.toStringTag,{value:"Module"}));function pr(r){if(typeof r=="bigint"&&(rNumber.MAX_SAFE_INTEGER))throw new TypeError(`${r} is not safe to convert to a number.`);return Number(r)}function Gx(r,t){return pr(r/t)+pr(r%t)/pr(t)}const Wx=Symbol.for("isArrowBigNum");function gn(r,...t){return t.length===0?Object.setPrototypeOf(ur(this.TypedArray,r),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(r,...t),this.constructor.prototype)}gn.prototype[Wx]=!0;gn.prototype.toJSON=function(){return`"${Do(this)}"`};gn.prototype.valueOf=function(r){return Tp(this,r)};gn.prototype.toString=function(){return Do(this)};gn.prototype[Symbol.toPrimitive]=function(r="default"){switch(r){case"number":return Tp(this);case"string":return Do(this);case"default":return Hx(this)}return Do(this)};function xo(...r){return gn.apply(this,r)}function So(...r){return gn.apply(this,r)}function $a(...r){return gn.apply(this,r)}Object.setPrototypeOf(xo.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(So.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf($a.prototype,Object.create(Uint32Array.prototype));Object.assign(xo.prototype,gn.prototype,{constructor:xo,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array});Object.assign(So.prototype,gn.prototype,{constructor:So,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array});Object.assign($a.prototype,gn.prototype,{constructor:$a,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const UL=BigInt(4294967296)*BigInt(4294967296),kL=UL-BigInt(1);function Tp(r,t){const{buffer:e,byteOffset:n,byteLength:i,signed:s}=r,o=new BigUint64Array(e,n,i/8),a=s&&o.at(-1)&BigInt(1)<=0)return kh(r);t=t.slice();let n=1;for(let s=0;s(r.children=null,r.ArrayType=Array,r.OffsetArrayType=Int32Array,r[Symbol.toStringTag]="DataType"))(Ct.prototype);class Cy extends Ct{constructor(){super(H.Null)}toString(){return"Null"}}Yx=Symbol.toStringTag;Cy[Yx]=(r=>r[Symbol.toStringTag]="Null")(Cy.prototype);class Oy extends Ct{constructor(t,e){super(H.Int),this.isSigned=t,this.bitWidth=e}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:return this.isSigned?Int32Array:Uint32Array;case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}qx=Symbol.toStringTag;Oy[qx]=(r=>(r.isSigned=null,r.bitWidth=null,r[Symbol.toStringTag]="Int"))(Oy.prototype);class Py extends Ct{constructor(t){super(H.Float),this.precision=t}get ArrayType(){switch(this.precision){case Dr.HALF:return Uint16Array;case Dr.SINGLE:return Float32Array;case Dr.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}}Qx=Symbol.toStringTag;Py[Qx]=(r=>(r.precision=null,r[Symbol.toStringTag]="Float"))(Py.prototype);class Ry extends Ct{constructor(){super(H.Binary)}toString(){return"Binary"}}Zx=Symbol.toStringTag;Ry[Zx]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Binary"))(Ry.prototype);class Fy extends Ct{constructor(){super(H.LargeBinary)}toString(){return"LargeBinary"}}Kx=Symbol.toStringTag;Fy[Kx]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeBinary"))(Fy.prototype);class Dy extends Ct{constructor(){super(H.Utf8)}toString(){return"Utf8"}}Jx=Symbol.toStringTag;Dy[Jx]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Utf8"))(Dy.prototype);class Ly extends Ct{constructor(){super(H.LargeUtf8)}toString(){return"LargeUtf8"}}tS=Symbol.toStringTag;Ly[tS]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeUtf8"))(Ly.prototype);class Ny extends Ct{constructor(){super(H.Bool)}toString(){return"Bool"}}eS=Symbol.toStringTag;Ny[eS]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Bool"))(Ny.prototype);class By extends Ct{constructor(t,e,n=128){super(H.Decimal),this.scale=t,this.precision=e,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}}rS=Symbol.toStringTag;By[rS]=(r=>(r.scale=null,r.precision=null,r.ArrayType=Uint32Array,r[Symbol.toStringTag]="Decimal"))(By.prototype);class Uy extends Ct{constructor(t){super(H.Date),this.unit=t}toString(){return`Date${(this.unit+1)*32}<${Bi[this.unit]}>`}get ArrayType(){return this.unit===Bi.DAY?Int32Array:BigInt64Array}}nS=Symbol.toStringTag;Uy[nS]=(r=>(r.unit=null,r[Symbol.toStringTag]="Date"))(Uy.prototype);class ky extends Ct{constructor(t,e){super(H.Time),this.unit=t,this.bitWidth=e}toString(){return`Time${this.bitWidth}<${te[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}}iS=Symbol.toStringTag;ky[iS]=(r=>(r.unit=null,r.bitWidth=null,r[Symbol.toStringTag]="Time"))(ky.prototype);class zy extends Ct{constructor(t,e){super(H.Timestamp),this.unit=t,this.timezone=e}toString(){return`Timestamp<${te[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}}sS=Symbol.toStringTag;zy[sS]=(r=>(r.unit=null,r.timezone=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Timestamp"))(zy.prototype);class Vy extends Ct{constructor(t){super(H.Interval),this.unit=t}toString(){return`Interval<${As[this.unit]}>`}}oS=Symbol.toStringTag;Vy[oS]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Interval"))(Vy.prototype);class jy extends Ct{constructor(t){super(H.Duration),this.unit=t}toString(){return`Duration<${te[this.unit]}>`}}aS=Symbol.toStringTag;jy[aS]=(r=>(r.unit=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Duration"))(jy.prototype);class $y extends Ct{constructor(t){super(H.List),this.children=[t]}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}}lS=Symbol.toStringTag;$y[lS]=(r=>(r.children=null,r[Symbol.toStringTag]="List"))($y.prototype);class hf extends Ct{constructor(t){super(H.Struct),this.children=t}toString(){return`Struct<{${this.children.map(t=>`${t.name}:${t.type}`).join(", ")}}>`}}uS=Symbol.toStringTag;hf[uS]=(r=>(r.children=null,r[Symbol.toStringTag]="Struct"))(hf.prototype);class Gy extends Ct{constructor(t,e,n){super(H.Union),this.mode=t,this.children=n,this.typeIds=e=Int32Array.from(e),this.typeIdToChildIndex=e.reduce((i,s,o)=>(i[s]=o)&&i||i,Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(t=>`${t.type}`).join(" | ")}>`}}cS=Symbol.toStringTag;Gy[cS]=(r=>(r.mode=null,r.typeIds=null,r.children=null,r.typeIdToChildIndex=null,r.ArrayType=Int8Array,r[Symbol.toStringTag]="Union"))(Gy.prototype);class Wy extends Ct{constructor(t){super(H.FixedSizeBinary),this.byteWidth=t}toString(){return`FixedSizeBinary[${this.byteWidth}]`}}hS=Symbol.toStringTag;Wy[hS]=(r=>(r.byteWidth=null,r.ArrayType=Uint8Array,r[Symbol.toStringTag]="FixedSizeBinary"))(Wy.prototype);class Hy extends Ct{constructor(t,e){super(H.FixedSizeList),this.listSize=t,this.children=[e]}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}dS=Symbol.toStringTag;Hy[dS]=(r=>(r.children=null,r.listSize=null,r[Symbol.toStringTag]="FixedSizeList"))(Hy.prototype);class Xy extends Ct{constructor(t,e=!1){var n,i,s;if(super(H.Map),this.children=[t],this.keysSorted=e,t&&(t.name="entries",!((n=t==null?void 0:t.type)===null||n===void 0)&&n.children)){const o=(i=t==null?void 0:t.type)===null||i===void 0?void 0:i.children[0];o&&(o.name="key");const a=(s=t==null?void 0:t.type)===null||s===void 0?void 0:s.children[1];a&&(a.name="value")}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map(t=>`${t.name}:${t.type}`).join(", ")}}>`}}fS=Symbol.toStringTag;Xy[fS]=(r=>(r.children=null,r.keysSorted=null,r[Symbol.toStringTag]="Map_"))(Xy.prototype);const VL=(r=>()=>++r)(-1);class Yy extends Ct{constructor(t,e,n,i){super(H.Dictionary),this.indices=e,this.dictionary=t,this.isOrdered=i||!1,this.id=n==null?VL():pr(n)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}}pS=Symbol.toStringTag;Yy[pS]=(r=>(r.id=null,r.indices=null,r.isOrdered=null,r.dictionary=null,r[Symbol.toStringTag]="Dictionary"))(Yy.prototype);function mS(r){const t=r;switch(r.typeId){case H.Decimal:return r.bitWidth/32;case H.Interval:return 1+t.unit;case H.FixedSizeList:return t.listSize;case H.FixedSizeBinary:return t.byteWidth;default:return 1}}class he{visitMany(t,...e){return t.map((n,i)=>this.visit(n,...e.map(s=>s[i])))}visit(...t){return this.getVisitFn(t[0],!1).apply(this,t)}getVisitFn(t,e=!0){return jL(this,t,e)}getVisitFnByTypeId(t,e=!0){return ao(this,t,e)}visitNull(t,...e){return null}visitBool(t,...e){return null}visitInt(t,...e){return null}visitFloat(t,...e){return null}visitUtf8(t,...e){return null}visitLargeUtf8(t,...e){return null}visitBinary(t,...e){return null}visitLargeBinary(t,...e){return null}visitFixedSizeBinary(t,...e){return null}visitDate(t,...e){return null}visitTimestamp(t,...e){return null}visitTime(t,...e){return null}visitDecimal(t,...e){return null}visitList(t,...e){return null}visitStruct(t,...e){return null}visitUnion(t,...e){return null}visitDictionary(t,...e){return null}visitInterval(t,...e){return null}visitDuration(t,...e){return null}visitFixedSizeList(t,...e){return null}visitMap(t,...e){return null}}function jL(r,t,e=!0){return typeof t=="number"?ao(r,t,e):typeof t=="string"&&t in H?ao(r,H[t],e):t&&t instanceof Ct?ao(r,qy(t),e):t!=null&&t.type&&t.type instanceof Ct?ao(r,qy(t.type),e):ao(r,H.NONE,e)}function ao(r,t,e=!0){let n=null;switch(t){case H.Null:n=r.visitNull;break;case H.Bool:n=r.visitBool;break;case H.Int:n=r.visitInt;break;case H.Int8:n=r.visitInt8||r.visitInt;break;case H.Int16:n=r.visitInt16||r.visitInt;break;case H.Int32:n=r.visitInt32||r.visitInt;break;case H.Int64:n=r.visitInt64||r.visitInt;break;case H.Uint8:n=r.visitUint8||r.visitInt;break;case H.Uint16:n=r.visitUint16||r.visitInt;break;case H.Uint32:n=r.visitUint32||r.visitInt;break;case H.Uint64:n=r.visitUint64||r.visitInt;break;case H.Float:n=r.visitFloat;break;case H.Float16:n=r.visitFloat16||r.visitFloat;break;case H.Float32:n=r.visitFloat32||r.visitFloat;break;case H.Float64:n=r.visitFloat64||r.visitFloat;break;case H.Utf8:n=r.visitUtf8;break;case H.LargeUtf8:n=r.visitLargeUtf8;break;case H.Binary:n=r.visitBinary;break;case H.LargeBinary:n=r.visitLargeBinary;break;case H.FixedSizeBinary:n=r.visitFixedSizeBinary;break;case H.Date:n=r.visitDate;break;case H.DateDay:n=r.visitDateDay||r.visitDate;break;case H.DateMillisecond:n=r.visitDateMillisecond||r.visitDate;break;case H.Timestamp:n=r.visitTimestamp;break;case H.TimestampSecond:n=r.visitTimestampSecond||r.visitTimestamp;break;case H.TimestampMillisecond:n=r.visitTimestampMillisecond||r.visitTimestamp;break;case H.TimestampMicrosecond:n=r.visitTimestampMicrosecond||r.visitTimestamp;break;case H.TimestampNanosecond:n=r.visitTimestampNanosecond||r.visitTimestamp;break;case H.Time:n=r.visitTime;break;case H.TimeSecond:n=r.visitTimeSecond||r.visitTime;break;case H.TimeMillisecond:n=r.visitTimeMillisecond||r.visitTime;break;case H.TimeMicrosecond:n=r.visitTimeMicrosecond||r.visitTime;break;case H.TimeNanosecond:n=r.visitTimeNanosecond||r.visitTime;break;case H.Decimal:n=r.visitDecimal;break;case H.List:n=r.visitList;break;case H.Struct:n=r.visitStruct;break;case H.Union:n=r.visitUnion;break;case H.DenseUnion:n=r.visitDenseUnion||r.visitUnion;break;case H.SparseUnion:n=r.visitSparseUnion||r.visitUnion;break;case H.Dictionary:n=r.visitDictionary;break;case H.Interval:n=r.visitInterval;break;case H.IntervalDayTime:n=r.visitIntervalDayTime||r.visitInterval;break;case H.IntervalYearMonth:n=r.visitIntervalYearMonth||r.visitInterval;break;case H.Duration:n=r.visitDuration;break;case H.DurationSecond:n=r.visitDurationSecond||r.visitDuration;break;case H.DurationMillisecond:n=r.visitDurationMillisecond||r.visitDuration;break;case H.DurationMicrosecond:n=r.visitDurationMicrosecond||r.visitDuration;break;case H.DurationNanosecond:n=r.visitDurationNanosecond||r.visitDuration;break;case H.FixedSizeList:n=r.visitFixedSizeList;break;case H.Map:n=r.visitMap;break}if(typeof n=="function")return n;if(!e)return()=>null;throw new Error(`Unrecognized type '${H[t]}'`)}function qy(r){switch(r.typeId){case H.Null:return H.Null;case H.Int:{const{bitWidth:t,isSigned:e}=r;switch(t){case 8:return e?H.Int8:H.Uint8;case 16:return e?H.Int16:H.Uint16;case 32:return e?H.Int32:H.Uint32;case 64:return e?H.Int64:H.Uint64}return H.Int}case H.Float:switch(r.precision){case Dr.HALF:return H.Float16;case Dr.SINGLE:return H.Float32;case Dr.DOUBLE:return H.Float64}return H.Float;case H.Binary:return H.Binary;case H.LargeBinary:return H.LargeBinary;case H.Utf8:return H.Utf8;case H.LargeUtf8:return H.LargeUtf8;case H.Bool:return H.Bool;case H.Decimal:return H.Decimal;case H.Time:switch(r.unit){case te.SECOND:return H.TimeSecond;case te.MILLISECOND:return H.TimeMillisecond;case te.MICROSECOND:return H.TimeMicrosecond;case te.NANOSECOND:return H.TimeNanosecond}return H.Time;case H.Timestamp:switch(r.unit){case te.SECOND:return H.TimestampSecond;case te.MILLISECOND:return H.TimestampMillisecond;case te.MICROSECOND:return H.TimestampMicrosecond;case te.NANOSECOND:return H.TimestampNanosecond}return H.Timestamp;case H.Date:switch(r.unit){case Bi.DAY:return H.DateDay;case Bi.MILLISECOND:return H.DateMillisecond}return H.Date;case H.Interval:switch(r.unit){case As.DAY_TIME:return H.IntervalDayTime;case As.YEAR_MONTH:return H.IntervalYearMonth}return H.Interval;case H.Duration:switch(r.unit){case te.SECOND:return H.DurationSecond;case te.MILLISECOND:return H.DurationMillisecond;case te.MICROSECOND:return H.DurationMicrosecond;case te.NANOSECOND:return H.DurationNanosecond}return H.Duration;case H.Map:return H.Map;case H.List:return H.List;case H.Struct:return H.Struct;case H.Union:switch(r.mode){case jn.Dense:return H.DenseUnion;case jn.Sparse:return H.SparseUnion}return H.Union;case H.FixedSizeBinary:return H.FixedSizeBinary;case H.FixedSizeList:return H.FixedSizeList;case H.Dictionary:return H.Dictionary}throw new Error(`Unrecognized type '${H[r.typeId]}'`)}he.prototype.visitInt8=null;he.prototype.visitInt16=null;he.prototype.visitInt32=null;he.prototype.visitInt64=null;he.prototype.visitUint8=null;he.prototype.visitUint16=null;he.prototype.visitUint32=null;he.prototype.visitUint64=null;he.prototype.visitFloat16=null;he.prototype.visitFloat32=null;he.prototype.visitFloat64=null;he.prototype.visitDateDay=null;he.prototype.visitDateMillisecond=null;he.prototype.visitTimestampSecond=null;he.prototype.visitTimestampMillisecond=null;he.prototype.visitTimestampMicrosecond=null;he.prototype.visitTimestampNanosecond=null;he.prototype.visitTimeSecond=null;he.prototype.visitTimeMillisecond=null;he.prototype.visitTimeMicrosecond=null;he.prototype.visitTimeNanosecond=null;he.prototype.visitDenseUnion=null;he.prototype.visitSparseUnion=null;he.prototype.visitIntervalDayTime=null;he.prototype.visitIntervalYearMonth=null;he.prototype.visitDuration=null;he.prototype.visitDurationSecond=null;he.prototype.visitDurationMillisecond=null;he.prototype.visitDurationMicrosecond=null;he.prototype.visitDurationNanosecond=null;const gS=new Float64Array(1),Hs=new Uint32Array(gS.buffer);function Ip(r){const t=(r&31744)>>10,e=(r&1023)/1024,n=Math.pow(-1,(r&32768)>>15);switch(t){case 31:return n*(e?Number.NaN:1/0);case 0:return n*(e?6103515625e-14*e:0)}return n*Math.pow(2,t-15)*(1+e)}function yS(r){if(r!==r)return 32256;gS[0]=r;const t=(Hs[1]&2147483648)>>16&65535;let e=Hs[1]&2146435072,n=0;return e>=1089470464?Hs[0]>0?e=31744:(e=(e&2080374784)>>16,n=(Hs[1]&1048575)>>10):e<=1056964608?(n=1048576+(Hs[1]&1048575),n=1048576+(n<<(e>>20)-998)>>21,e=0):(e=e-1056964608>>10,n=(Hs[1]&1048575)+512>>10),t|e|n&65535}const $L=Object.freeze(Object.defineProperty({__proto__:null,float64ToUint16:yS,uint16ToFloat64:Ip},Symbol.toStringTag,{value:"Module"}));class Wt extends he{}function qt(r){return(t,e,n)=>{if(t.setValid(e,n!=null))return r(t,e,n)}}const GL=(r,t,e)=>{r[t]=Math.floor(e/864e5)},vS=(r,t,e,n)=>{if(e+1{const i=r+e;n?t[i>>3]|=1<>3]&=~(1<{r[t]=e},Ep=({values:r},t,e)=>{r[t]=e},_S=({values:r},t,e)=>{r[t]=yS(e)},HL=(r,t,e)=>{switch(r.type.precision){case Dr.HALF:return _S(r,t,e);case Dr.SINGLE:case Dr.DOUBLE:return Ep(r,t,e)}},bS=({values:r},t,e)=>{GL(r,t,e.valueOf())},wS=({values:r},t,e)=>{r[t]=BigInt(e)},XL=({stride:r,values:t},e,n)=>{t.set(n.subarray(0,r),r*e)},xS=({values:r,valueOffsets:t},e,n)=>vS(r,t,e,n),SS=({values:r,valueOffsets:t},e,n)=>vS(r,t,e,Vx(n)),YL=(r,t,e)=>{r.type.unit===Bi.DAY?bS(r,t,e):wS(r,t,e)},TS=({values:r},t,e)=>{r[t]=BigInt(e/1e3)},IS=({values:r},t,e)=>{r[t]=BigInt(e)},ES=({values:r},t,e)=>{r[t]=BigInt(e*1e3)},AS=({values:r},t,e)=>{r[t]=BigInt(e*1e6)},qL=(r,t,e)=>{switch(r.type.unit){case te.SECOND:return TS(r,t,e);case te.MILLISECOND:return IS(r,t,e);case te.MICROSECOND:return ES(r,t,e);case te.NANOSECOND:return AS(r,t,e)}},MS=({values:r},t,e)=>{r[t]=e},CS=({values:r},t,e)=>{r[t]=e},OS=({values:r},t,e)=>{r[t]=e},PS=({values:r},t,e)=>{r[t]=e},QL=(r,t,e)=>{switch(r.type.unit){case te.SECOND:return MS(r,t,e);case te.MILLISECOND:return CS(r,t,e);case te.MICROSECOND:return OS(r,t,e);case te.NANOSECOND:return PS(r,t,e)}},ZL=({values:r,stride:t},e,n)=>{r.set(n.subarray(0,t),t*e)},KL=(r,t,e)=>{const n=r.children[0],i=r.valueOffsets,s=$n.getVisitFn(n);if(Array.isArray(e))for(let o=-1,a=i[t],l=i[t+1];a{const n=r.children[0],{valueOffsets:i}=r,s=$n.getVisitFn(n);let{[t]:o,[t+1]:a}=i;const l=e instanceof Map?e.entries():Object.entries(e);for(const u of l)if(s(n,o,u),++o>=a)break},tN=(r,t)=>(e,n,i,s)=>n&&e(n,r,t[s]),eN=(r,t)=>(e,n,i,s)=>n&&e(n,r,t.get(s)),rN=(r,t)=>(e,n,i,s)=>n&&e(n,r,t.get(i.name)),nN=(r,t)=>(e,n,i,s)=>n&&e(n,r,t[i.name]),iN=(r,t,e)=>{const n=r.type.children.map(s=>$n.getVisitFn(s.type)),i=e instanceof Map?rN(t,e):e instanceof er?eN(t,e):Array.isArray(e)?tN(t,e):nN(t,e);r.type.children.forEach((s,o)=>i(n[o],r.children[o],s,o))},sN=(r,t,e)=>{r.type.mode===jn.Dense?RS(r,t,e):FS(r,t,e)},RS=(r,t,e)=>{const n=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[n];$n.visit(i,r.valueOffsets[t],e)},FS=(r,t,e)=>{const n=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[n];$n.visit(i,t,e)},oN=(r,t,e)=>{var n;(n=r.dictionary)===null||n===void 0||n.set(r.values[t],e)},aN=(r,t,e)=>{r.type.unit===As.DAY_TIME?DS(r,t,e):LS(r,t,e)},DS=({values:r},t,e)=>{r.set(e.subarray(0,2),2*t)},LS=({values:r},t,e)=>{r[t]=e[0]*12+e[1]%12},NS=({values:r},t,e)=>{r[t]=e},BS=({values:r},t,e)=>{r[t]=e},US=({values:r},t,e)=>{r[t]=e},kS=({values:r},t,e)=>{r[t]=e},lN=(r,t,e)=>{switch(r.type.unit){case te.SECOND:return NS(r,t,e);case te.MILLISECOND:return BS(r,t,e);case te.MICROSECOND:return US(r,t,e);case te.NANOSECOND:return kS(r,t,e)}},uN=(r,t,e)=>{const{stride:n}=r,i=r.children[0],s=$n.getVisitFn(i);if(Array.isArray(e))for(let o=-1,a=t*n;++o`${Fo(t)}: ${Fo(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new cN(this[cn],this[To])}}class cN{constructor(t,e){this.childIndex=0,this.children=t.children,this.rowIndex=e,this.childFields=t.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){const t=this.childIndex;return te.name)}has(t,e){return t[cn].type.children.some(n=>n.name===e)}getOwnPropertyDescriptor(t,e){if(t[cn].type.children.some(n=>n.name===e))return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e];const n=t[cn].type.children.findIndex(i=>i.name===e);if(n!==-1){const i=on.visit(t[cn].children[n],t[To]);return Reflect.set(t,e,i),i}}set(t,e,n){const i=t[cn].type.children.findIndex(s=>s.name===e);return i!==-1?($n.visit(t[cn].children[i],t[To],n),Reflect.set(t,e,n)):Reflect.has(t,e)||typeof e=="symbol"?Reflect.set(t,e,n):!1}}const dN=new hN;class Bt extends he{}function Ht(r){return(t,e)=>t.getValid(e)?r(t,e):null}const fN=(r,t)=>864e5*r[t],pN=(r,t)=>null,zS=(r,t,e)=>{if(e+1>=t.length)return null;const n=pr(t[e]),i=pr(t[e+1]);return r.subarray(n,i)},mN=({offset:r,values:t},e)=>{const n=r+e;return(t[n>>3]&1<fN(r,t),jS=({values:r},t)=>pr(r[t]),Vi=({stride:r,values:t},e)=>t[r*e],gN=({stride:r,values:t},e)=>Ip(t[r*e]),$S=({values:r},t)=>r[t],yN=({stride:r,values:t},e)=>t.subarray(r*e,r*(e+1)),GS=({values:r,valueOffsets:t},e)=>zS(r,t,e),WS=({values:r,valueOffsets:t},e)=>{const n=zS(r,t,e);return n!==null?ZD(n):null},vN=({values:r},t)=>r[t],_N=({type:r,values:t},e)=>r.precision!==Dr.HALF?t[e]:Ip(t[e]),bN=(r,t)=>r.type.unit===Bi.DAY?VS(r,t):jS(r,t),HS=({values:r},t)=>1e3*pr(r[t]),XS=({values:r},t)=>pr(r[t]),YS=({values:r},t)=>Gx(r[t],BigInt(1e3)),qS=({values:r},t)=>Gx(r[t],BigInt(1e6)),wN=(r,t)=>{switch(r.type.unit){case te.SECOND:return HS(r,t);case te.MILLISECOND:return XS(r,t);case te.MICROSECOND:return YS(r,t);case te.NANOSECOND:return qS(r,t)}},QS=({values:r},t)=>r[t],ZS=({values:r},t)=>r[t],KS=({values:r},t)=>r[t],JS=({values:r},t)=>r[t],xN=(r,t)=>{switch(r.type.unit){case te.SECOND:return QS(r,t);case te.MILLISECOND:return ZS(r,t);case te.MICROSECOND:return KS(r,t);case te.NANOSECOND:return JS(r,t)}},SN=({values:r,stride:t},e)=>hc.decimal(r.subarray(t*e,t*(e+1))),TN=(r,t)=>{const{valueOffsets:e,stride:n,children:i}=r,{[t*n]:s,[t*n+1]:o}=e,l=i[0].slice(s,o-s);return new er([l])},IN=(r,t)=>{const{valueOffsets:e,children:n}=r,{[t]:i,[t+1]:s}=e,o=n[0];return new Mp(o.slice(i,s-i))},EN=(r,t)=>new Ap(r,t),AN=(r,t)=>r.type.mode===jn.Dense?tT(r,t):eT(r,t),tT=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[e];return on.visit(n,r.valueOffsets[t])},eT=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[e];return on.visit(n,t)},MN=(r,t)=>{var e;return(e=r.dictionary)===null||e===void 0?void 0:e.get(r.values[t])},CN=(r,t)=>r.type.unit===As.DAY_TIME?rT(r,t):nT(r,t),rT=({values:r},t)=>r.subarray(2*t,2*(t+1)),nT=({values:r},t)=>{const e=r[t],n=new Int32Array(2);return n[0]=Math.trunc(e/12),n[1]=Math.trunc(e%12),n},iT=({values:r},t)=>r[t],sT=({values:r},t)=>r[t],oT=({values:r},t)=>r[t],aT=({values:r},t)=>r[t],ON=(r,t)=>{switch(r.type.unit){case te.SECOND:return iT(r,t);case te.MILLISECOND:return sT(r,t);case te.MICROSECOND:return oT(r,t);case te.NANOSECOND:return aT(r,t)}},PN=(r,t)=>{const{stride:e,children:n}=r,s=n[0].slice(t*e,e);return new er([s])};Bt.prototype.visitNull=Ht(pN);Bt.prototype.visitBool=Ht(mN);Bt.prototype.visitInt=Ht(vN);Bt.prototype.visitInt8=Ht(Vi);Bt.prototype.visitInt16=Ht(Vi);Bt.prototype.visitInt32=Ht(Vi);Bt.prototype.visitInt64=Ht($S);Bt.prototype.visitUint8=Ht(Vi);Bt.prototype.visitUint16=Ht(Vi);Bt.prototype.visitUint32=Ht(Vi);Bt.prototype.visitUint64=Ht($S);Bt.prototype.visitFloat=Ht(_N);Bt.prototype.visitFloat16=Ht(gN);Bt.prototype.visitFloat32=Ht(Vi);Bt.prototype.visitFloat64=Ht(Vi);Bt.prototype.visitUtf8=Ht(WS);Bt.prototype.visitLargeUtf8=Ht(WS);Bt.prototype.visitBinary=Ht(GS);Bt.prototype.visitLargeBinary=Ht(GS);Bt.prototype.visitFixedSizeBinary=Ht(yN);Bt.prototype.visitDate=Ht(bN);Bt.prototype.visitDateDay=Ht(VS);Bt.prototype.visitDateMillisecond=Ht(jS);Bt.prototype.visitTimestamp=Ht(wN);Bt.prototype.visitTimestampSecond=Ht(HS);Bt.prototype.visitTimestampMillisecond=Ht(XS);Bt.prototype.visitTimestampMicrosecond=Ht(YS);Bt.prototype.visitTimestampNanosecond=Ht(qS);Bt.prototype.visitTime=Ht(xN);Bt.prototype.visitTimeSecond=Ht(QS);Bt.prototype.visitTimeMillisecond=Ht(ZS);Bt.prototype.visitTimeMicrosecond=Ht(KS);Bt.prototype.visitTimeNanosecond=Ht(JS);Bt.prototype.visitDecimal=Ht(SN);Bt.prototype.visitList=Ht(TN);Bt.prototype.visitStruct=Ht(EN);Bt.prototype.visitUnion=Ht(AN);Bt.prototype.visitDenseUnion=Ht(tT);Bt.prototype.visitSparseUnion=Ht(eT);Bt.prototype.visitDictionary=Ht(MN);Bt.prototype.visitInterval=Ht(CN);Bt.prototype.visitIntervalDayTime=Ht(rT);Bt.prototype.visitIntervalYearMonth=Ht(nT);Bt.prototype.visitDuration=Ht(ON);Bt.prototype.visitDurationSecond=Ht(iT);Bt.prototype.visitDurationMillisecond=Ht(sT);Bt.prototype.visitDurationMicrosecond=Ht(oT);Bt.prototype.visitDurationNanosecond=Ht(aT);Bt.prototype.visitFixedSizeList=Ht(PN);Bt.prototype.visitMap=Ht(IN);const on=new Bt,lo=Symbol.for("keys"),Io=Symbol.for("vals"),uo=Symbol.for("kKeysAsStrings"),df=Symbol.for("_kKeysAsStrings");class Mp{constructor(t){return this[lo]=new er([t.children[0]]).memoize(),this[Io]=t.children[1],new Proxy(this,new FN)}get[uo](){return this[df]||(this[df]=Array.from(this[lo].toArray(),String))}[Symbol.iterator](){return new RN(this[lo],this[Io])}get size(){return this[lo].length}toArray(){return Object.values(this.toJSON())}toJSON(){const t=this[lo],e=this[Io],n={};for(let i=-1,s=t.length;++i`${Fo(t)}: ${Fo(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}}class RN{constructor(t,e){this.keys=t,this.vals=e,this.keyIndex=0,this.numKeys=t.length}[Symbol.iterator](){return this}next(){const t=this.keyIndex;return t===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(t),on.visit(this.vals,t)]})}}class FN{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(t){return t[uo]}has(t,e){return t[uo].includes(e)}getOwnPropertyDescriptor(t,e){if(t[uo].indexOf(e)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e];const n=t[uo].indexOf(e);if(n!==-1){const i=on.visit(Reflect.get(t,Io),n);return Reflect.set(t,e,i),i}}set(t,e,n){const i=t[uo].indexOf(e);return i!==-1?($n.visit(Reflect.get(t,Io),i,n),Reflect.set(t,e,n)):Reflect.has(t,e)?Reflect.set(t,e,n):!1}}Object.defineProperties(Mp.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[lo]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Io]:{writable:!0,enumerable:!1,configurable:!1,value:null},[df]:{writable:!0,enumerable:!1,configurable:!1,value:null}});let Qy;function lT(r,t,e,n){const{length:i=0}=r;let s=typeof t!="number"?0:t,o=typeof e!="number"?i:e;return s<0&&(s=(s%i+i)%i),o<0&&(o=(o%i+i)%i),oi&&(o=i),n?n(r,s,o):[s,o]}const uT=(r,t)=>r<0?t+r:r,Zy=r=>r!==r;function Ds(r){if(typeof r!=="object"||r===null)return Zy(r)?Zy:e=>e===r;if(r instanceof Date){const e=r.valueOf();return n=>n instanceof Date?n.valueOf()===e:!1}return ArrayBuffer.isView(r)?e=>e?$x(r,e):!1:r instanceof Map?LN(r):Array.isArray(r)?DN(r):r instanceof er?NN(r):BN(r,!0)}function DN(r){const t=[];for(let e=-1,n=r.length;++e!1;const n=[];for(let i=-1,s=e.length;++i{if(!e||typeof e!="object")return!1;switch(e.constructor){case Array:return UN(r,e);case Map:return Ky(r,e,e.keys());case Mp:case Ap:case Object:case void 0:return Ky(r,e,t||Object.keys(e))}return e instanceof er?kN(r,e):!1}}function UN(r,t){const e=r.length;if(t.length!==e)return!1;for(let n=-1;++n>n}function VN(r,t,e){return e?!!(r[t>>3]|=1<>3]&=~(1<0||e.byteLength>3):hT(new fc(e,r,t,null,Cp)).subarray(0,n)),i}return e}function hT(r){const t=[];let e=0,n=0,i=0;for(const o of r)o&&(i|=1<0)&&(t[e++]=i);const s=new Uint8Array(t.length+7&-8);return s.set(t),s}class fc{constructor(t,e,n,i,s){this.bytes=t,this.length=n,this.context=i,this.get=s,this.bit=e%8,this.byteIndex=e>>3,this.byte=t[this.byteIndex++],this.index=0}next(){return this.index>3<<3,i=t+(t%8===0?0:8-t%8);return ju(r,t,i)+ju(r,n,e)+dT(r,i>>3,n-i>>3)}function dT(r,t,e){let n=0,i=Math.trunc(t);const s=new DataView(r.buffer,r.byteOffset,r.byteLength),o=e===void 0?r.byteLength:i+e;for(;o-i>=4;)n+=Zl(s.getUint32(i)),i+=4;for(;o-i>=2;)n+=Zl(s.getUint16(i)),i+=2;for(;o-i>=1;)n+=Zl(s.getUint8(i)),i+=1;return n}function Zl(r){let t=Math.trunc(r);return t=t-(t>>>1&1431655765),t=(t&858993459)+(t>>>2&858993459),(t+(t>>>4)&252645135)*16843009>>>24}const jN=Object.freeze(Object.defineProperty({__proto__:null,BitIterator:fc,getBit:cT,getBool:Cp,packBools:hT,popcnt_array:dT,popcnt_bit_range:ju,popcnt_uint32:Zl,setBool:VN,truncateBitmap:ff},Symbol.toStringTag,{value:"Module"})),$N=-1;class Ga{get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get nullable(){if(this._nullCount!==0){const{type:t}=this;return Ct.isSparseUnion(t)?this.children.some(e=>e.nullable):Ct.isDenseUnion(t)?this.children.some(e=>e.nullable):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let t=0;const{valueOffsets:e,values:n,nullBitmap:i,typeIds:s}=this;return e&&(t+=e.byteLength),n&&(t+=n.byteLength),i&&(t+=i.byteLength),s&&(t+=s.byteLength),this.children.reduce((o,a)=>o+a.byteLength,t)}get nullCount(){if(Ct.isUnion(this.type))return this.children.reduce((n,i)=>n+i.nullCount,0);let t=this._nullCount,e;return t<=$N&&(e=this.nullBitmap)&&(this._nullCount=t=e.length===0?0:this.length-ju(e,this.offset,this.offset+this.length)),t}constructor(t,e,n,i,s,o=[],a){this.type=t,this.children=o,this.dictionary=a,this.offset=Math.floor(Math.max(e||0,0)),this.length=Math.floor(Math.max(n||0,0)),this._nullCount=Math.floor(Math.max(i||0,-1));let l;s instanceof Ga?(this.stride=s.stride,this.values=s.values,this.typeIds=s.typeIds,this.nullBitmap=s.nullBitmap,this.valueOffsets=s.valueOffsets):(this.stride=mS(t),s&&((l=s[0])&&(this.valueOffsets=l),(l=s[1])&&(this.values=l),(l=s[2])&&(this.nullBitmap=l),(l=s[3])&&(this.typeIds=l)))}getValid(t){const{type:e}=this;if(Ct.isUnion(e)){const n=e,i=this.children[n.typeIdToChildIndex[this.typeIds[t]]],s=n.mode===jn.Dense?this.valueOffsets[t]:t;return i.getValid(s)}if(this.nullable&&this.nullCount>0){const n=this.offset+t;return(this.nullBitmap[n>>3]&1<>3;(!s||s.byteLength<=c)&&(s=new Uint8Array((o+a+63&-64)>>3).fill(255),this.nullCount>0?(s.set(ff(o,a,this.nullBitmap),0),Object.assign(this,{nullBitmap:s})):Object.assign(this,{nullBitmap:s,_nullCount:0}));const h=s[c];n=(h&u)!==0,s[c]=e?h|u:h&~u}return n!==!!e&&(this._nullCount=this.nullCount+(e?-1:1)),e}clone(t=this.type,e=this.offset,n=this.length,i=this._nullCount,s=this,o=this.children){return new Ga(t,e,n,i,s,o,this.dictionary)}slice(t,e){const{stride:n,typeId:i,children:s}=this,o=+(this._nullCount===0)-1,a=i===16?n:1,l=this._sliceBuffers(t,e,n,i);return this.clone(this.type,this.offset+t,e,o,l,s.length===0||this.valueOffsets?s:this._sliceChildren(s,a*t,a*e))}_changeLengthAndBackfillNullBitmap(t){if(this.typeId===H.Null)return this.clone(this.type,0,t,0);const{length:e,nullCount:n}=this,i=new Uint8Array((t+63&-64)>>3).fill(255,0,e>>3);i[e>>3]=(1<0&&i.set(ff(this.offset,e,this.nullBitmap),0);const s=this.buffers;return s[si.VALIDITY]=i,this.clone(this.type,0,t,n+(t-e),s)}_sliceBuffers(t,e,n,i){let s;const{buffers:o}=this;return(s=o[si.TYPE])&&(o[si.TYPE]=s.subarray(t,t+e)),(s=o[si.OFFSET])&&(o[si.OFFSET]=s.subarray(t,t+e+1))||(s=o[si.DATA])&&(o[si.DATA]=i===6?s:s.subarray(n*t,n*(t+e))),o}_sliceChildren(t,e,n){return t.map(i=>i.slice(e,n))}}Ga.prototype.children=Object.freeze([]);class Jy{constructor(t=0,e){this.numChunks=t,this.getChunkIterator=e,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndext.nullable)}function WN(r){return r.reduce((t,e)=>t+e.nullCount,0)}function HN(r){return r.reduce((t,e,n)=>(t[n+1]=t[n]+e.length,t),new Uint32Array(r.length+1))}function XN(r,t,e,n){const i=[];for(let s=-1,o=r.length;++s=n)break;if(e>=l+u)continue;if(l>=e&&l+u<=n){i.push(a);continue}const c=Math.max(0,e-l),h=Math.min(n-l,u);i.push(a.slice(c,h-c))}return i.length===0&&i.push(r[0].slice(0,0)),i}function Op(r,t,e,n){let i=0,s=0,o=t.length-1;do{if(i>=o-1)return e0?0:-1}function ZN(r,t){const{nullBitmap:e}=r;if(!e||r.nullCount<=0)return-1;let n=0;for(const i of new fc(e,r.offset+(t||0),r.length,e,Cp)){if(!i)return n;++n}return-1}function Kt(r,t,e){if(t===void 0)return-1;if(t===null)switch(r.typeId){case H.Union:break;case H.Dictionary:break;default:return ZN(r,e)}const n=on.getVisitFn(r),i=Ds(t);for(let s=(e||0)-1,o=r.length;++s{const i=r.data[n];return i.values.subarray(0,i.length)[Symbol.iterator]()});let e=0;return new Jy(r.data.length,n=>{const s=r.data[n].length,o=r.slice(e,e+s);return e+=s,new KN(o)})}class KN{constructor(t){this.vector=t,this.index=0}next(){return this.indexa.data):t;if(s.length===0||s.some(a=>!(a instanceof Ga)))throw new TypeError("Vector constructor expects an Array of Data instances.");const o=(e=s[0])===null||e===void 0?void 0:e.type;switch(s.length){case 0:this._offsets=[0];break;case 1:{const{get:a,set:l,indexOf:u}=gT[o.typeId],c=s[0];this.isValid=h=>fT(c,h),this.get=h=>a(c,h),this.set=(h,f)=>l(c,h,f),this.indexOf=h=>u(c,h),this._offsets=[0,c.length];break}default:Object.setPrototypeOf(this,yT[o.typeId]),this._offsets=HN(s);break}this.data=s,this.type=o,this.stride=mS(o),this.numChildren=(i=(n=o.children)===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce((t,e)=>t+e.byteLength,0)}get nullable(){return GN(this.data)}get nullCount(){return WN(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${H[this.type.typeId]}Vector`}isValid(t){return!1}get(t){return null}at(t){return this.get(uT(t,this.length))}set(t,e){}indexOf(t,e){return-1}includes(t,e){return this.indexOf(t,e)>-1}[Symbol.iterator](){return JN.visit(this)}concat(...t){return new er(this.data.concat(t.flatMap(e=>e.data).flat(Number.POSITIVE_INFINITY)))}slice(t,e){return new er(lT(this,t,e,({data:n,_offsets:i},s,o)=>XN(n,i,s,o)))}toJSON(){return[...this]}toArray(){const{type:t,data:e,length:n,stride:i,ArrayType:s}=this;switch(t.typeId){case H.Int:case H.Float:case H.Decimal:case H.Time:case H.Timestamp:switch(e.length){case 0:return new s;case 1:return e[0].values.subarray(0,n*i);default:return e.reduce((o,{values:a,length:l})=>(o.array.set(a.subarray(0,l*i),o.offset),o.offset+=l*i,o),{array:new s(n*i),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(",")}]`}getChild(t){var e;return this.getChildAt((e=this.type.children)===null||e===void 0?void 0:e.findIndex(n=>n.name===t))}getChildAt(t){return t>-1&&te[t])):null}get isMemoized(){return Ct.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(Ct.isDictionary(this.type)){const t=new $u(this.data[0].dictionary),e=this.data.map(n=>{const i=n.clone();return i.dictionary=t,i});return new er(e)}return new $u(this)}unmemoize(){if(Ct.isDictionary(this.type)&&this.isMemoized){const t=this.data[0].dictionary.unmemoize(),e=this.data.map(n=>{const i=n.clone();return i.dictionary=t,i});return new er(e)}return this}}mT=Symbol.toStringTag;er[mT]=(r=>{r.type=Ct.prototype,r.data=[],r.length=0,r.stride=1,r.numChildren=0,r._offsets=new Uint32Array([0]),r[Symbol.isConcatSpreadable]=!0;const t=Object.keys(H).map(e=>H[e]).filter(e=>typeof e=="number"&&e!==H.NONE);for(const e of t){const n=on.getVisitFnByTypeId(e),i=$n.getVisitFnByTypeId(e),s=ev.getVisitFnByTypeId(e);gT[e]={get:n,set:i,indexOf:s},yT[e]=Object.create(r,{isValid:{value:tv(fT)},get:{value:tv(on.getVisitFnByTypeId(e))},set:{value:YN($n.getVisitFnByTypeId(e))},indexOf:{value:qN(ev.getVisitFnByTypeId(e))}})}return"Vector"})(er.prototype);class $u extends er{constructor(t){super(t.data);const e=this.get,n=this.set,i=this.slice,s=new Array(this.length);Object.defineProperty(this,"get",{value(o){const a=s[o];if(a!==void 0)return a;const l=e.call(this,o);return s[o]=l,l}}),Object.defineProperty(this,"set",{value(o,a){n.call(this,o,a),s[o]=a}}),Object.defineProperty(this,"slice",{value:(o,a)=>new $u(i.call(this,o,a))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new er(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}}const tB=65536;function po(r){return r<0&&(r=4294967295+r+1),`0x${r.toString(16)}`}const Lo=8,Pp=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8];class Rp{constructor(t){this.buffer=t}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(t){const e=new Uint32Array([this.buffer[1]>>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),n=new Uint32Array([t.buffer[1]>>>16,t.buffer[1]&65535,t.buffer[0]>>>16,t.buffer[0]&65535]);let i=e[3]*n[3];this.buffer[0]=i&65535;let s=i>>>16;return i=e[2]*n[3],s+=i,i=e[3]*n[2]>>>0,s+=i,this.buffer[0]+=s<<16,this.buffer[1]=s>>>0>>16,this.buffer[1]+=e[1]*n[3]+e[2]*n[2]+e[3]*n[1],this.buffer[1]+=e[0]*n[3]+e[1]*n[2]+e[2]*n[1]+e[3]*n[0]<<16,this}_plus(t){const e=this.buffer[0]+t.buffer[0]>>>0;this.buffer[1]+=t.buffer[1],e>>0&&++this.buffer[1],this.buffer[0]=e}lessThan(t){return this.buffer[1]>>0,e[2]=this.buffer[2]+t.buffer[2]>>>0,e[1]=this.buffer[1]+t.buffer[1]>>>0,e[0]=this.buffer[0]+t.buffer[0]>>>0,e[0]>>0&&++e[1],e[1]>>0&&++e[2],e[2]>>0&&++e[3],this.buffer[3]=e[3],this.buffer[2]=e[2],this.buffer[1]=e[1],this.buffer[0]=e[0],this}hex(){return`${po(this.buffer[3])} ${po(this.buffer[2])} ${po(this.buffer[1])} ${po(this.buffer[0])}`}static multiply(t,e){return new En(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new En(new Uint32Array(t.buffer)).plus(e)}static from(t,e=new Uint32Array(4)){return En.fromString(typeof t=="string"?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(4)){return En.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(4)){const n=t.startsWith("-"),i=t.length,s=new En(e);for(let o=n?1:0;othis.compareFields(n,e[i]))}compareFields(t,e){return t===e||e instanceof t.constructor&&t.name===e.name&&t.nullable===e.nullable&&this.visit(t.type,e.type)}}function gr(r,t){return t instanceof r.constructor}function Ls(r,t){return r===t||gr(r,t)}function mi(r,t){return r===t||gr(r,t)&&r.bitWidth===t.bitWidth&&r.isSigned===t.isSigned}function pc(r,t){return r===t||gr(r,t)&&r.precision===t.precision}function rB(r,t){return r===t||gr(r,t)&&r.byteWidth===t.byteWidth}function Fp(r,t){return r===t||gr(r,t)&&r.unit===t.unit}function rl(r,t){return r===t||gr(r,t)&&r.unit===t.unit&&r.timezone===t.timezone}function nl(r,t){return r===t||gr(r,t)&&r.unit===t.unit&&r.bitWidth===t.bitWidth}function nB(r,t){return r===t||gr(r,t)&&r.children.length===t.children.length&&Gn.compareManyFields(r.children,t.children)}function iB(r,t){return r===t||gr(r,t)&&r.children.length===t.children.length&&Gn.compareManyFields(r.children,t.children)}function Dp(r,t){return r===t||gr(r,t)&&r.mode===t.mode&&r.typeIds.every((e,n)=>e===t.typeIds[n])&&Gn.compareManyFields(r.children,t.children)}function sB(r,t){return r===t||gr(r,t)&&r.id===t.id&&r.isOrdered===t.isOrdered&&Gn.visit(r.indices,t.indices)&&Gn.visit(r.dictionary,t.dictionary)}function Lp(r,t){return r===t||gr(r,t)&&r.unit===t.unit}function il(r,t){return r===t||gr(r,t)&&r.unit===t.unit}function oB(r,t){return r===t||gr(r,t)&&r.listSize===t.listSize&&r.children.length===t.children.length&&Gn.compareManyFields(r.children,t.children)}function aB(r,t){return r===t||gr(r,t)&&r.keysSorted===t.keysSorted&&r.children.length===t.children.length&&Gn.compareManyFields(r.children,t.children)}zt.prototype.visitNull=Ls;zt.prototype.visitBool=Ls;zt.prototype.visitInt=mi;zt.prototype.visitInt8=mi;zt.prototype.visitInt16=mi;zt.prototype.visitInt32=mi;zt.prototype.visitInt64=mi;zt.prototype.visitUint8=mi;zt.prototype.visitUint16=mi;zt.prototype.visitUint32=mi;zt.prototype.visitUint64=mi;zt.prototype.visitFloat=pc;zt.prototype.visitFloat16=pc;zt.prototype.visitFloat32=pc;zt.prototype.visitFloat64=pc;zt.prototype.visitUtf8=Ls;zt.prototype.visitLargeUtf8=Ls;zt.prototype.visitBinary=Ls;zt.prototype.visitLargeBinary=Ls;zt.prototype.visitFixedSizeBinary=rB;zt.prototype.visitDate=Fp;zt.prototype.visitDateDay=Fp;zt.prototype.visitDateMillisecond=Fp;zt.prototype.visitTimestamp=rl;zt.prototype.visitTimestampSecond=rl;zt.prototype.visitTimestampMillisecond=rl;zt.prototype.visitTimestampMicrosecond=rl;zt.prototype.visitTimestampNanosecond=rl;zt.prototype.visitTime=nl;zt.prototype.visitTimeSecond=nl;zt.prototype.visitTimeMillisecond=nl;zt.prototype.visitTimeMicrosecond=nl;zt.prototype.visitTimeNanosecond=nl;zt.prototype.visitDecimal=Ls;zt.prototype.visitList=nB;zt.prototype.visitStruct=iB;zt.prototype.visitUnion=Dp;zt.prototype.visitDenseUnion=Dp;zt.prototype.visitSparseUnion=Dp;zt.prototype.visitDictionary=sB;zt.prototype.visitInterval=Lp;zt.prototype.visitIntervalDayTime=Lp;zt.prototype.visitIntervalYearMonth=Lp;zt.prototype.visitDuration=il;zt.prototype.visitDurationSecond=il;zt.prototype.visitDurationMillisecond=il;zt.prototype.visitDurationMicrosecond=il;zt.prototype.visitDurationNanosecond=il;zt.prototype.visitFixedSizeList=oB;zt.prototype.visitMap=aB;const Gn=new zt;function lB(r,t){return Gn.compareSchemas(r,t)}function uB(r,t){return Gn.compareFields(r,t)}function cB(r,t){return Gn.visit(r,t)}const rv=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},zL),eB),jN),$L),LL),zN),BL),{compareSchemas:lB,compareFields:uB,compareTypes:cB}),vT=6048e5,hB=864e5,nv=Symbol.for("constructDateFrom");function ui(r,t){return typeof r=="function"?r(t):r&&typeof r=="object"&&nv in r?r[nv](t):r instanceof Date?new r.constructor(t):new Date(t)}function an(r,t){return ui(t||r,r)}let dB={};function mc(){return dB}function Wa(r,t){var a,l,u,c;const e=mc(),n=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??e.weekStartsOn??((c=(u=e.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,i=an(r,t==null?void 0:t.in),s=i.getDay(),o=(s=s.getTime()?n+1:e.getTime()>=a.getTime()?n:n-1}function iv(r){const t=an(r),e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+r-+e}function fB(r,...t){const e=ui.bind(null,t.find(n=>typeof n=="object"));return t.map(e)}function sv(r,t){const e=an(r,t==null?void 0:t.in);return e.setHours(0,0,0,0),e}function pB(r,t,e){const[n,i]=fB(e==null?void 0:e.in,r,t),s=sv(n),o=sv(i),a=+s-iv(s),l=+o-iv(o);return Math.round((a-l)/hB)}function mB(r,t){const e=_T(r,t),n=ui(r,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),Gu(n)}function gB(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function yB(r){return!(!gB(r)&&typeof r!="number"||isNaN(+an(r)))}function vB(r,t){const e=an(r,t==null?void 0:t.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const _B={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},bB=(r,t,e)=>{let n;const i=_B[r];return typeof i=="string"?n=i:t===1?n=i.one:n=i.other.replace("{{count}}",t.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+n:n+" ago":n};function zh(r){return(t={})=>{const e=t.width?String(t.width):r.defaultWidth;return r.formats[e]||r.formats[r.defaultWidth]}}const wB={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},xB={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},SB={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},TB={date:zh({formats:wB,defaultWidth:"full"}),time:zh({formats:xB,defaultWidth:"full"}),dateTime:zh({formats:SB,defaultWidth:"full"})},IB={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},EB=(r,t,e,n)=>IB[r];function sa(r){return(t,e)=>{const n=e!=null&&e.context?String(e.context):"standalone";let i;if(n==="formatting"&&r.formattingValues){const o=r.defaultFormattingWidth||r.defaultWidth,a=e!=null&&e.width?String(e.width):o;i=r.formattingValues[a]||r.formattingValues[o]}else{const o=r.defaultWidth,a=e!=null&&e.width?String(e.width):r.defaultWidth;i=r.values[a]||r.values[o]}const s=r.argumentCallback?r.argumentCallback(t):t;return i[s]}}const AB={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},MB={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},CB={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},OB={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},PB={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},RB={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},FB=(r,t)=>{const e=Number(r),n=e%100;if(n>20||n<10)switch(n%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},DB={ordinalNumber:FB,era:sa({values:AB,defaultWidth:"wide"}),quarter:sa({values:MB,defaultWidth:"wide",argumentCallback:r=>r-1}),month:sa({values:CB,defaultWidth:"wide"}),day:sa({values:OB,defaultWidth:"wide"}),dayPeriod:sa({values:PB,defaultWidth:"wide",formattingValues:RB,defaultFormattingWidth:"wide"})};function oa(r){return(t,e={})=>{const n=e.width,i=n&&r.matchPatterns[n]||r.matchPatterns[r.defaultMatchWidth],s=t.match(i);if(!s)return null;const o=s[0],a=n&&r.parsePatterns[n]||r.parsePatterns[r.defaultParseWidth],l=Array.isArray(a)?NB(a,h=>h.test(o)):LB(a,h=>h.test(o));let u;u=r.valueCallback?r.valueCallback(l):l,u=e.valueCallback?e.valueCallback(u):u;const c=t.slice(o.length);return{value:u,rest:c}}}function LB(r,t){for(const e in r)if(Object.prototype.hasOwnProperty.call(r,e)&&t(r[e]))return e}function NB(r,t){for(let e=0;e{const n=t.match(r.matchPattern);if(!n)return null;const i=n[0],s=t.match(r.parsePattern);if(!s)return null;let o=r.valueCallback?r.valueCallback(s[0]):s[0];o=e.valueCallback?e.valueCallback(o):o;const a=t.slice(i.length);return{value:o,rest:a}}}const UB=/^(\d+)(th|st|nd|rd)?/i,kB=/\d+/i,zB={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},VB={any:[/^b/i,/^(a|c)/i]},jB={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},$B={any:[/1/i,/2/i,/3/i,/4/i]},GB={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},WB={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},HB={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},XB={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},YB={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},qB={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},QB={ordinalNumber:BB({matchPattern:UB,parsePattern:kB,valueCallback:r=>parseInt(r,10)}),era:oa({matchPatterns:zB,defaultMatchWidth:"wide",parsePatterns:VB,defaultParseWidth:"any"}),quarter:oa({matchPatterns:jB,defaultMatchWidth:"wide",parsePatterns:$B,defaultParseWidth:"any",valueCallback:r=>r+1}),month:oa({matchPatterns:GB,defaultMatchWidth:"wide",parsePatterns:WB,defaultParseWidth:"any"}),day:oa({matchPatterns:HB,defaultMatchWidth:"wide",parsePatterns:XB,defaultParseWidth:"any"}),dayPeriod:oa({matchPatterns:YB,defaultMatchWidth:"any",parsePatterns:qB,defaultParseWidth:"any"})},ZB={code:"en-US",formatDistance:bB,formatLong:TB,formatRelative:EB,localize:DB,match:QB,options:{weekStartsOn:0,firstWeekContainsDate:1}};function KB(r,t){const e=an(r,t==null?void 0:t.in);return pB(e,vB(e))+1}function JB(r,t){const e=an(r,t==null?void 0:t.in),n=+Gu(e)-+mB(e);return Math.round(n/vT)+1}function bT(r,t){var c,h,f,d;const e=an(r,t==null?void 0:t.in),n=e.getFullYear(),i=mc(),s=(t==null?void 0:t.firstWeekContainsDate)??((h=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:h.firstWeekContainsDate)??i.firstWeekContainsDate??((d=(f=i.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??1,o=ui((t==null?void 0:t.in)||r,0);o.setFullYear(n+1,0,s),o.setHours(0,0,0,0);const a=Wa(o,t),l=ui((t==null?void 0:t.in)||r,0);l.setFullYear(n,0,s),l.setHours(0,0,0,0);const u=Wa(l,t);return+e>=+a?n+1:+e>=+u?n:n-1}function tU(r,t){var a,l,u,c;const e=mc(),n=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??e.firstWeekContainsDate??((c=(u=e.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,i=bT(r,t),s=ui((t==null?void 0:t.in)||r,0);return s.setFullYear(i,0,n),s.setHours(0,0,0,0),Wa(s,t)}function eU(r,t){const e=an(r,t==null?void 0:t.in),n=+Wa(e,t)-+tU(e,t);return Math.round(n/vT)+1}function we(r,t){const e=r<0?"-":"",n=Math.abs(r).toString().padStart(t,"0");return e+n}const wi={y(r,t){const e=r.getFullYear(),n=e>0?e:1-e;return we(t==="yy"?n%100:n,t.length)},M(r,t){const e=r.getMonth();return t==="M"?String(e+1):we(e+1,2)},d(r,t){return we(r.getDate(),t.length)},a(r,t){const e=r.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(r,t){return we(r.getHours()%12||12,t.length)},H(r,t){return we(r.getHours(),t.length)},m(r,t){return we(r.getMinutes(),t.length)},s(r,t){return we(r.getSeconds(),t.length)},S(r,t){const e=t.length,n=r.getMilliseconds(),i=Math.trunc(n*Math.pow(10,e-3));return we(i,t.length)}},Xs={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ov={G:function(r,t,e){const n=r.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(n,{width:"abbreviated"});case"GGGGG":return e.era(n,{width:"narrow"});case"GGGG":default:return e.era(n,{width:"wide"})}},y:function(r,t,e){if(t==="yo"){const n=r.getFullYear(),i=n>0?n:1-n;return e.ordinalNumber(i,{unit:"year"})}return wi.y(r,t)},Y:function(r,t,e,n){const i=bT(r,n),s=i>0?i:1-i;if(t==="YY"){const o=s%100;return we(o,2)}return t==="Yo"?e.ordinalNumber(s,{unit:"year"}):we(s,t.length)},R:function(r,t){const e=_T(r);return we(e,t.length)},u:function(r,t){const e=r.getFullYear();return we(e,t.length)},Q:function(r,t,e){const n=Math.ceil((r.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return we(n,2);case"Qo":return e.ordinalNumber(n,{unit:"quarter"});case"QQQ":return e.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(n,{width:"wide",context:"formatting"})}},q:function(r,t,e){const n=Math.ceil((r.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return we(n,2);case"qo":return e.ordinalNumber(n,{unit:"quarter"});case"qqq":return e.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(n,{width:"wide",context:"standalone"})}},M:function(r,t,e){const n=r.getMonth();switch(t){case"M":case"MM":return wi.M(r,t);case"Mo":return e.ordinalNumber(n+1,{unit:"month"});case"MMM":return e.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(n,{width:"wide",context:"formatting"})}},L:function(r,t,e){const n=r.getMonth();switch(t){case"L":return String(n+1);case"LL":return we(n+1,2);case"Lo":return e.ordinalNumber(n+1,{unit:"month"});case"LLL":return e.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(n,{width:"wide",context:"standalone"})}},w:function(r,t,e,n){const i=eU(r,n);return t==="wo"?e.ordinalNumber(i,{unit:"week"}):we(i,t.length)},I:function(r,t,e){const n=JB(r);return t==="Io"?e.ordinalNumber(n,{unit:"week"}):we(n,t.length)},d:function(r,t,e){return t==="do"?e.ordinalNumber(r.getDate(),{unit:"date"}):wi.d(r,t)},D:function(r,t,e){const n=KB(r);return t==="Do"?e.ordinalNumber(n,{unit:"dayOfYear"}):we(n,t.length)},E:function(r,t,e){const n=r.getDay();switch(t){case"E":case"EE":case"EEE":return e.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(n,{width:"short",context:"formatting"});case"EEEE":default:return e.day(n,{width:"wide",context:"formatting"})}},e:function(r,t,e,n){const i=r.getDay(),s=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return we(s,2);case"eo":return e.ordinalNumber(s,{unit:"day"});case"eee":return e.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(i,{width:"short",context:"formatting"});case"eeee":default:return e.day(i,{width:"wide",context:"formatting"})}},c:function(r,t,e,n){const i=r.getDay(),s=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return we(s,t.length);case"co":return e.ordinalNumber(s,{unit:"day"});case"ccc":return e.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(i,{width:"narrow",context:"standalone"});case"cccccc":return e.day(i,{width:"short",context:"standalone"});case"cccc":default:return e.day(i,{width:"wide",context:"standalone"})}},i:function(r,t,e){const n=r.getDay(),i=n===0?7:n;switch(t){case"i":return String(i);case"ii":return we(i,t.length);case"io":return e.ordinalNumber(i,{unit:"day"});case"iii":return e.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(n,{width:"short",context:"formatting"});case"iiii":default:return e.day(n,{width:"wide",context:"formatting"})}},a:function(r,t,e){const i=r.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(r,t,e){const n=r.getHours();let i;switch(n===12?i=Xs.noon:n===0?i=Xs.midnight:i=n/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(r,t,e){const n=r.getHours();let i;switch(n>=17?i=Xs.evening:n>=12?i=Xs.afternoon:n>=4?i=Xs.morning:i=Xs.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(r,t,e){if(t==="ho"){let n=r.getHours()%12;return n===0&&(n=12),e.ordinalNumber(n,{unit:"hour"})}return wi.h(r,t)},H:function(r,t,e){return t==="Ho"?e.ordinalNumber(r.getHours(),{unit:"hour"}):wi.H(r,t)},K:function(r,t,e){const n=r.getHours()%12;return t==="Ko"?e.ordinalNumber(n,{unit:"hour"}):we(n,t.length)},k:function(r,t,e){let n=r.getHours();return n===0&&(n=24),t==="ko"?e.ordinalNumber(n,{unit:"hour"}):we(n,t.length)},m:function(r,t,e){return t==="mo"?e.ordinalNumber(r.getMinutes(),{unit:"minute"}):wi.m(r,t)},s:function(r,t,e){return t==="so"?e.ordinalNumber(r.getSeconds(),{unit:"second"}):wi.s(r,t)},S:function(r,t){return wi.S(r,t)},X:function(r,t,e){const n=r.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return lv(n);case"XXXX":case"XX":return hs(n);case"XXXXX":case"XXX":default:return hs(n,":")}},x:function(r,t,e){const n=r.getTimezoneOffset();switch(t){case"x":return lv(n);case"xxxx":case"xx":return hs(n);case"xxxxx":case"xxx":default:return hs(n,":")}},O:function(r,t,e){const n=r.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+av(n,":");case"OOOO":default:return"GMT"+hs(n,":")}},z:function(r,t,e){const n=r.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+av(n,":");case"zzzz":default:return"GMT"+hs(n,":")}},t:function(r,t,e){const n=Math.trunc(+r/1e3);return we(n,t.length)},T:function(r,t,e){return we(+r,t.length)}};function av(r,t=""){const e=r>0?"-":"+",n=Math.abs(r),i=Math.trunc(n/60),s=n%60;return s===0?e+String(i):e+String(i)+t+we(s,2)}function lv(r,t){return r%60===0?(r>0?"-":"+")+we(Math.abs(r)/60,2):hs(r,t)}function hs(r,t=""){const e=r>0?"-":"+",n=Math.abs(r),i=we(Math.trunc(n/60),2),s=we(n%60,2);return e+i+t+s}const uv=(r,t)=>{switch(r){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},wT=(r,t)=>{switch(r){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},rU=(r,t)=>{const e=r.match(/(P+)(p+)?/)||[],n=e[1],i=e[2];if(!i)return uv(r,t);let s;switch(n){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",uv(n,t)).replace("{{time}}",wT(i,t))},nU={p:wT,P:rU},iU=/^D+$/,sU=/^Y+$/,oU=["D","DD","YY","YYYY"];function aU(r){return iU.test(r)}function lU(r){return sU.test(r)}function uU(r,t,e){const n=cU(r,t,e);if(console.warn(n),oU.includes(r))throw new RangeError(n)}function cU(r,t,e){const n=r[0]==="Y"?"years":"days of the month";return`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${t}\`) for formatting ${n} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const hU=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,dU=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,fU=/^'([^]*?)'?$/,pU=/''/g,mU=/[a-zA-Z]/;function xT(r,t,e){var c,h,f,d;const n=mc(),i=n.locale??ZB,s=n.firstWeekContainsDate??((h=(c=n.locale)==null?void 0:c.options)==null?void 0:h.firstWeekContainsDate)??1,o=n.weekStartsOn??((d=(f=n.locale)==null?void 0:f.options)==null?void 0:d.weekStartsOn)??0,a=an(r,e==null?void 0:e.in);if(!yB(a))throw new RangeError("Invalid time value");let l=t.match(dU).map(m=>{const g=m[0];if(g==="p"||g==="P"){const p=nU[g];return p(m,i.formatLong)}return m}).join("").match(hU).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const g=m[0];if(g==="'")return{isToken:!1,value:gU(m)};if(ov[g])return{isToken:!0,value:m};if(g.match(mU))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:m}});i.localize.preprocessor&&(l=i.localize.preprocessor(a,l));const u={firstWeekContainsDate:s,weekStartsOn:o,locale:i};return l.map(m=>{if(!m.isToken)return m.value;const g=m.value;(lU(g)||aU(g))&&uU(g,t,String(r));const p=ov[g[0]];return p(a,g,i.localize,u)}).join("")}function gU(r){const t=r.match(fU);return t?t[1].replace(pU,"'"):r}function yU(r,t){return an(r*1e3,t==null?void 0:t.in)}function vU(r,t){const e=_U(t)?new t(0):ui(t,0);return e.setFullYear(r.getFullYear(),r.getMonth(),r.getDate()),e.setHours(r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()),e}function _U(r){var t;return typeof r=="function"&&((t=r.prototype)==null?void 0:t.constructor)===r}function bU(r,t){let e=r.length;switch("string"){case"string":{for(;e>0&&r[e-1]===t;)e--;break}}return r.substring(0,e)}function Tr(r){return r==null}function wU(r){return r!=null}async function pf(){if(typeof window<"u"&&window!==null)return"browser";try{const r=await Ei(()=>import("./__vite-browser-external-FmFgRqLi.js"),[]);return typeof r<"u"&&r.versions!=null&&r.versions.node!=null?"node":"unknown"}catch{return"unknown"}}function xU(r){return Tr(r)?!1:Ct.isInt(r.type)&&!ST(r)||SU(r)}function SU(r){return Tr(r)?!1:Ct.isInt(r.type)&&r.type.isSigned===!1}function TU(r){return Tr(r)?!1:Ct.isFloat(r.type)??!1}function IU(r){return Tr(r)?!1:Ct.isDecimal(r.type)}function EU(r){return Tr(r)?!1:Ct.isBool(r.type)}function AU(r){return Tr(r)?!1:Ct.isDuration(r.type)}function ST(r){return Tr(r)?!1:Ct.isInt(r.type)&&r.metadata.get("ARROW:extension:name")==="period"}function MU(r){return Tr(r)?!1:Ct.isTimestamp(r.type)}function CU(r){return Tr(r)?!1:Ct.isDate(r.type)}function OU(r){return Tr(r)?!1:Ct.isTime(r.type)}function PU(r){return Tr(r)?!1:Ct.isList(r.type)||Ct.isFixedSizeList(r.type)}function RU(r){return Tr(r)?!1:Ct.isStruct(r.type)||Ct.isMap(r.type)}function FU(r){return Tr(r)?!1:Ct.isStruct(r.type)&&r.metadata.get("ARROW:extension:name")==="interval"||Ct.isInterval(r.type)}function DU(r,t){let e;if(t===te.MILLISECOND)e=1e3;else if(t===te.MICROSECOND)e=1e3*1e3;else if(t===te.NANOSECOND)e=1e3*1e3*1e3;else return Number(r);return typeof r=="bigint"&&!Number.isSafeInteger(Number(r))?Number(r/BigInt(e)):Number(r)/e}function LU(r,t){var n;const e=DU(r,((n=t==null?void 0:t.type)==null?void 0:n.unit)??te.SECOND);return yU(e)}function NU(r,t){const e=LU(r,t);return xT(e,e.getMilliseconds()===0?"HH:mm:ss":"HH:mm:ss.SSS")}function BU(r){const t="yyyy-MM-dd";return r instanceof Date||typeof r=="number"&&Number.isFinite(r)?xT(r,t):(console.warn(`Unsupported date value: ${r}`),String(r))}function UU(r,t){var i;if(!(r instanceof Date||typeof r=="number"&&Number.isFinite(r)))return console.warn(`Unsupported datetime value: ${r}`),null;let e;const n=(i=t==null?void 0:t.type)==null?void 0:i.timezone;return typeof r=="number"?n?e=new Fr(r,n):e=new Fr(r):n?e=new Fr(r,n):e=new Fr(r),vU(e,Date)}function kU(r,t){var a;const e=((a=t==null?void 0:t.type)==null?void 0:a.scale)||0;let n=rv.bigNumToString(new rv.BN(r)).padStart(e,"0");if(e===0)return n;let i="";n.startsWith("-")&&(i="-",n=n.slice(1));const s=n.slice(0,-e)||"0",o=bU(n.slice(-e),"0")||"";return`${i}${s}${o?`.${o}`:""}`}function zU(r){const t=r[0],e=r[1],n=[];return t!==0&&n.push(`${t} year${t>1?"s":""}`),e!==0&&n.push(`${e} month${e>1?"s":""}`),n.length?n.join(" "):"0 months"}function VU(r,t){var n,i,s,o;if(Ct.isInterval(t==null?void 0:t.type))return zU(r);const e=t&&t.metadata.get("ARROW:extension:name");if(e&&e==="pandas.interval"){const a=JSON.parse(t.metadata.get("ARROW:extension:metadata")),{closed:l}=a,u=r.toJSON(),c=l==="both"||l==="left"?"[":"(",h=l==="both"||l==="right"?"]":")",f=mf(u.left,(i=(n=t.type)==null?void 0:n.children)==null?void 0:i[0]),d=mf(u.right,(o=(s=t.type)==null?void 0:s.children)==null?void 0:o[1]);return`${c+f}, ${d+h}`}return String(r)}function jU(r,t){return(t==null?void 0:t.type)instanceof hf?JSON.parse(JSON.stringify(r,(e,n)=>{if(wU(n))return typeof n=="bigint"?Number(n):n})):JSON.parse(JSON.stringify(r,(e,n)=>typeof n=="bigint"?Number(n):n))}function mf(r,t){if(Tr(r))return null;const e=r instanceof Date||Number.isFinite(r);if(e&&CU(t))return BU(r);if(typeof r=="bigint"&&OU(t))return NU(Number(r),t);if(e&&MU(t))return UU(r,t);if(ST(t))throw new Error("Period type is not supported yet");if(FU(t))return VU(r,t);if(AU(t))throw new Error("Duration type is not supported yet");return IU(t)?kU(r,t):TU(t)&&Number.isFinite(r)||xU(t)?r:RU(t)||PU(t)?jU(r,t):EU(t)?!!r:String(r)}function cv(r){return((r.toArray()||[]).map(n=>n.toJSON())||[]).map(n=>(r.schema.fields.forEach(i=>n[i.name]=mf(n[i.name],i)),n))}var Ha=(r=>(r.ORIGIN_PRIVATE_FS="origin-private-fs",r.NODE_FS="node-fs",r))(Ha||{});async function TT(r){const t=M1(r,{logger:!1});let e,n;const i=await pf();if(i==="browser"){if(typeof t.bundles>"u"){const{getBundles:l}=await Ei(async()=>{const{getBundles:u}=await import("./default-browser-BrgSDbLD.js");return{getBundles:u}},[]);t.bundles=await l()}n=await Ey(await t.bundles),e=new Worker(n.mainWorker)}else if(i==="node"){if(typeof t.bundles>"u"){const{getBundles:c}=await Ei(async()=>{const{getBundles:h}=await import("./default-node-DzW5muPs.js");return{getBundles:h}},__vite__mapDeps([0,1,2]));t.bundles=await c()}n=await Ey(await t.bundles);let l=n.mainWorker;l.startsWith("/@fs/")&&(l=l.replace("/@fs/","file://"));const u=await Ei(()=>import("./index-Cp8iQ_hy.js"),[]);e=new u.default(l,{type:"module"})}else throw new Error(`Unsupported environment: ${i}`);let s;t.logger===!0?s=new Ux:t.logger===!1?s=new PD:s=t.logger;const o=new UD(s,e);if(await o.instantiate(n.mainModule,n.pthreadWorker),t.storage)switch(t.storage.type){case Ha.ORIGIN_PRIVATE_FS:{try{let l=t.storage.path;l.startsWith("/")&&(l=l.slice(1)),await o.open({path:`opfs://${l}`,accessMode:t.storage.accessMode})}catch(l){throw await o.terminate(),await e.terminate(),l}break}case Ha.NODE_FS:{try{await o.open({path:t.storage.path,accessMode:t.storage.accessMode,useDirectIO:!0})}catch(l){throw await o.terminate(),await e.terminate(),l}break}}const a=await o.connect();return{worker:e,db:o,conn:a,query:async(l,u=[])=>{if(!u||u.length===0){const d=await a.query(l);return cv(d)}const c=await a.prepare(l),h=await c.query(...u),f=cv(h);return c.close(),f},close:async()=>{await a.close(),await o.terminate(),await e.terminate()}}}async function $U(r,t){await(await r).conn.send("BEGIN TRANSACTION");try{const e=await t(r);return await(await r).conn.send("COMMIT"),e}catch(e){throw await(await r).conn.send("ROLLBACK"),e}}async function GU(r,t,e){await(await r).conn.send(`SAVEPOINT ${t}`);try{const n=await e(r);return await(await r).conn.send(`RELEASE SAVEPOINT ${t}`),n}catch(n){throw await(await r).conn.send(`ROLLBACK TO SAVEPOINT ${t}`),n}}const St=Symbol.for("drizzle:entityKind");function lt(r,t){if(!r||typeof r!="object")return!1;if(r instanceof t)return!0;if(!Object.prototype.hasOwnProperty.call(t,St))throw new Error(`Class "${t.name??""}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`);let e=Object.getPrototypeOf(r).constructor;if(e)for(;e;){if(St in e&&e[St]===t[St])return!0;e=Object.getPrototypeOf(e)}return!1}var wv;wv=St;class rr{constructor(t,e){W(this,"name");W(this,"keyAsName");W(this,"primary");W(this,"notNull");W(this,"default");W(this,"defaultFn");W(this,"onUpdateFn");W(this,"hasDefault");W(this,"isUnique");W(this,"uniqueName");W(this,"uniqueType");W(this,"dataType");W(this,"columnType");W(this,"enumValues");W(this,"generated");W(this,"generatedIdentity");W(this,"config");this.table=t,this.config=e,this.name=e.name,this.keyAsName=e.keyAsName,this.notNull=e.notNull,this.default=e.default,this.defaultFn=e.defaultFn,this.onUpdateFn=e.onUpdateFn,this.hasDefault=e.hasDefault,this.primary=e.primaryKey,this.isUnique=e.isUnique,this.uniqueName=e.uniqueName,this.uniqueType=e.uniqueType,this.dataType=e.dataType,this.columnType=e.columnType,this.generated=e.generated,this.generatedIdentity=e.generatedIdentity}mapFromDriverValue(t){return t}mapToDriverValue(t){return t}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!=="byDefault"}}W(rr,wv,"Column");const Eo=Symbol.for("drizzle:Name");function WU(r,t){return`${r[Eo]}_${t.join("_")}_unique`}var xv,Sv;class Lr extends(Sv=rr,xv=St,Sv){constructor(t,e){e.uniqueName||(e.uniqueName=WU(t,[e.name])),super(t,e),this.table=t}}W(Lr,xv,"PgColumn");const hv=Symbol.for("drizzle:isPgEnum");function HU(r){return!!r&&typeof r=="function"&&hv in r&&r[hv]===!0}var Tv;Tv=St;class Nr{constructor(t,e,n,i=!1){this._={brand:"Subquery",sql:t,selectedFields:e,alias:n,isWith:i}}}W(Nr,Tv,"Subquery");var Iv,Ev;class Np extends(Ev=Nr,Iv=St,Ev){}W(Np,Iv,"WithSubquery");const Ur={startActiveSpan(r,t){return t()}},Qe=Symbol.for("drizzle:ViewBaseConfig"),Kl=Symbol.for("drizzle:Schema"),gf=Symbol.for("drizzle:Columns"),dv=Symbol.for("drizzle:ExtraConfigColumns"),Vh=Symbol.for("drizzle:OriginalName"),jh=Symbol.for("drizzle:BaseName"),Wu=Symbol.for("drizzle:IsAlias"),fv=Symbol.for("drizzle:ExtraConfigBuilder"),XU=Symbol.for("drizzle:IsDrizzleTable");var Av,Mv,Cv,Ov,Pv,Rv,Fv,Dv,Lv,Nv;Nv=St,Lv=Eo,Dv=Vh,Fv=Kl,Rv=gf,Pv=dv,Ov=jh,Cv=Wu,Mv=XU,Av=fv;class It{constructor(t,e,n){W(this,Lv);W(this,Dv);W(this,Fv);W(this,Rv);W(this,Pv);W(this,Ov);W(this,Cv,!1);W(this,Mv,!0);W(this,Av);this[Eo]=this[Vh]=t,this[Kl]=e,this[jh]=n}}W(It,Nv,"Table"),W(It,"Symbol",{Name:Eo,Schema:Kl,OriginalName:Vh,Columns:gf,ExtraConfigColumns:dv,BaseName:jh,IsAlias:Wu,ExtraConfigBuilder:fv});function vs(r){return r[Eo]}function Xa(r){return`${r[Kl]??"public"}.${r[Eo]}`}function IT(r){return r!=null&&typeof r.getSQL=="function"}function YU(r){var e;const t={sql:"",params:[]};for(const n of r)t.sql+=n.sql,t.params.push(...n.params),(e=n.typings)!=null&&e.length&&(t.typings||(t.typings=[]),t.typings.push(...n.typings));return t}var Bv;Bv=St;class Ze{constructor(t){W(this,"value");this.value=Array.isArray(t)?t:[t]}getSQL(){return new Pt([this])}}W(Ze,Bv,"StringChunk");var Uv;Uv=St;const ps=class ps{constructor(t){W(this,"decoder",ET);W(this,"shouldInlineParams",!1);this.queryChunks=t}append(t){return this.queryChunks.push(...t.queryChunks),this}toQuery(t){return Ur.startActiveSpan("drizzle.buildSQL",e=>{const n=this.buildQueryFromSourceParams(this.queryChunks,t);return e==null||e.setAttributes({"drizzle.query.text":n.sql,"drizzle.query.params":JSON.stringify(n.params)}),n})}buildQueryFromSourceParams(t,e){const n=Object.assign({},e,{inlineParams:e.inlineParams||this.shouldInlineParams,paramStartIndex:e.paramStartIndex||{value:0}}),{casing:i,escapeName:s,escapeParam:o,prepareTyping:a,inlineParams:l,paramStartIndex:u}=n;return YU(t.map(c=>{var h;if(lt(c,Ze))return{sql:c.value.join(""),params:[]};if(lt(c,Hu))return{sql:s(c.value),params:[]};if(c===void 0)return{sql:"",params:[]};if(Array.isArray(c)){const f=[new Ze("(")];for(const[d,m]of c.entries())f.push(m),dr},AT={mapToDriverValue:r=>r};({...ET,...AT});var zv;zv=St;class ci{constructor(t,e=AT){W(this,"brand");this.value=t,this.encoder=e}getSQL(){return new Pt([this])}}W(ci,zv,"Param");function Y(r,...t){const e=[];(t.length>0||r.length>0&&r[0]!=="")&&e.push(new Ze(r[0]));for(const[n,i]of t.entries())e.push(i,new Ze(r[n+1]));return new Pt(e)}(r=>{function t(){return new Pt([])}r.empty=t;function e(l){return new Pt(l)}r.fromList=e;function n(l){return new Pt([new Ze(l)])}r.raw=n;function i(l,u){const c=[];for(const[h,f]of l.entries())h>0&&u!==void 0&&c.push(u),c.push(f);return new Pt(c)}r.join=i;function s(l){return new Hu(l)}r.identifier=s;function o(l){return new Ms(l)}r.placeholder=o;function a(l,u){return new ci(l,u)}r.param=a})(Y||(Y={}));(r=>{var e;e=St;const n=class n{constructor(s,o){W(this,"isSelectionField",!1);this.sql=s,this.fieldAlias=o}getSQL(){return this.sql}clone(){return new n(this.sql,this.fieldAlias)}};W(n,e,"SQL.Aliased");let t=n;r.Aliased=t})(Pt||(Pt={}));var Vv;Vv=St;class Ms{constructor(t){this.name=t}getSQL(){return new Pt([this])}}W(Ms,Vv,"Placeholder");function pv(r,t){return r.map(e=>{if(lt(e,Ms)){if(!(e.name in t))throw new Error(`No value for placeholder "${e.name}" was provided`);return t[e.name]}if(lt(e,ci)&<(e.value,Ms)){if(!(e.value.name in t))throw new Error(`No value for placeholder "${e.value.name}" was provided`);return e.encoder.mapToDriverValue(t[e.value.name])}return e})}const QU=Symbol.for("drizzle:IsDrizzleView");var jv,$v,Gv;Gv=St,$v=Qe,jv=QU;class ji{constructor({name:t,schema:e,selectedFields:n,query:i}){W(this,$v);W(this,jv,!0);this[Qe]={name:t,originalName:t,schema:e,selectedFields:n,query:i,isExisting:!i,isAlias:!1}}getSQL(){return new Pt([this])}}W(ji,Gv,"View");rr.prototype.getSQL=function(){return new Pt([this])};It.prototype.getSQL=function(){return new Pt([this])};Nr.prototype.getSQL=function(){return new Pt([this])};var Wv;Wv=St;class Ya{constructor(t){this.table=t}get(t,e){return e==="table"?this.table:t[e]}}W(Ya,Wv,"ColumnAliasProxyHandler");var Hv;Hv=St;class gc{constructor(t,e){this.alias=t,this.replaceOriginalName=e}get(t,e){if(e===It.Symbol.IsAlias)return!0;if(e===It.Symbol.Name)return this.alias;if(this.replaceOriginalName&&e===It.Symbol.OriginalName)return this.alias;if(e===Qe)return{...t[Qe],name:this.alias,isAlias:!0};if(e===It.Symbol.Columns){const i=t[It.Symbol.Columns];if(!i)return i;const s={};return Object.keys(i).map(o=>{s[o]=new Proxy(i[o],new Ya(new Proxy(t,this)))}),s}const n=t[e];return lt(n,rr)?new Proxy(n,new Ya(new Proxy(t,this))):n}}W(gc,Hv,"TableAliasProxyHandler");function $h(r,t){return new Proxy(r,new gc(t,!1))}function ei(r,t){return new Proxy(r,new Ya(new Proxy(r.table,new gc(t,!1))))}function MT(r,t){return new Pt.Aliased(Xu(r.sql,t),r.fieldAlias)}function Xu(r,t){return Y.join(r.queryChunks.map(e=>lt(e,rr)?ei(e,t):lt(e,Pt)?Xu(e,t):lt(e,Pt.Aliased)?MT(e,t):e))}var Xv,Yv;class Bp extends(Yv=Error,Xv=St,Yv){constructor({message:t,cause:e}){super(t),this.name="DrizzleError",this.cause=e}}W(Bp,Xv,"DrizzleError");var qv,Qv;class CT extends(Qv=Bp,qv=St,Qv){constructor(){super({message:"Rollback"})}}W(CT,qv,"TransactionRollbackError");function Sr(r,t){return qU(t)&&!IT(r)&&!lt(r,ci)&&!lt(r,Ms)&&!lt(r,rr)&&!lt(r,It)&&!lt(r,ji)?new ci(r,t):r}const OT=(r,t)=>Y`${r} = ${Sr(t,r)}`,ZU=(r,t)=>Y`${r} <> ${Sr(t,r)}`;function yf(...r){const t=r.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new Pt(t):new Pt([new Ze("("),Y.join(t,new Ze(" and ")),new Ze(")")])}function KU(...r){const t=r.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new Pt(t):new Pt([new Ze("("),Y.join(t,new Ze(" or ")),new Ze(")")])}function JU(r){return Y`not ${r}`}const tk=(r,t)=>Y`${r} > ${Sr(t,r)}`,ek=(r,t)=>Y`${r} >= ${Sr(t,r)}`,rk=(r,t)=>Y`${r} < ${Sr(t,r)}`,nk=(r,t)=>Y`${r} <= ${Sr(t,r)}`;function ik(r,t){return Array.isArray(t)?t.length===0?Y`false`:Y`${r} in ${t.map(e=>Sr(e,r))}`:Y`${r} in ${Sr(t,r)}`}function sk(r,t){return Array.isArray(t)?t.length===0?Y`true`:Y`${r} not in ${t.map(e=>Sr(e,r))}`:Y`${r} not in ${Sr(t,r)}`}function ok(r){return Y`${r} is null`}function ak(r){return Y`${r} is not null`}function lk(r){return Y`exists ${r}`}function uk(r){return Y`not exists ${r}`}function ck(r,t,e){return Y`${r} between ${Sr(t,r)} and ${Sr(e,r)}`}function hk(r,t,e){return Y`${r} not between ${Sr(t,r)} and ${Sr(e,r)}`}function dk(r,t){return Y`${r} like ${t}`}function fk(r,t){return Y`${r} not like ${t}`}function pk(r,t){return Y`${r} ilike ${t}`}function mk(r,t){return Y`${r} not ilike ${t}`}function gk(r){return Y`${r} asc`}function yk(r){return Y`${r} desc`}var Zv;Zv=St;class PT{write(t){console.log(t)}}W(PT,Zv,"ConsoleLogWriter");var Kv;Kv=St;class RT{constructor(t){W(this,"writer");this.writer=(t==null?void 0:t.writer)??new PT}logQuery(t,e){const n=e.map(s=>{try{return JSON.stringify(s)}catch{return String(s)}}),i=n.length?` -- params: [${n.join(", ")}]`:"";this.writer.write(`Query: ${t}${i}`)}}W(RT,Kv,"DefaultLogger");var Jv;Jv=St;class FT{logQuery(){}}W(FT,Jv,"NoopLogger");var t_,e_;e_=St,t_=Symbol.toStringTag;class $i{constructor(){W(this,t_,"QueryPromise")}catch(t){return this.then(void 0,t)}finally(t){return this.then(e=>(t==null||t(),e),e=>{throw t==null||t(),e})}then(t,e){return this.execute().then(t,e)}}W($i,e_,"QueryPromise");function Cs(r,t){return Object.entries(r).reduce((e,[n,i])=>{if(typeof n!="string")return e;const s=t?[...t,n]:[n];return lt(i,rr)||lt(i,Pt)||lt(i,Pt.Aliased)?e.push({path:s,field:i}):lt(i,It)?e.push(...Cs(i[It.Symbol.Columns],s)):e.push(...Cs(i,s)),e},[])}function Up(r,t){const e=Object.keys(r),n=Object.keys(t);if(e.length!==n.length)return!1;for(const[i,s]of e.entries())if(s!==n[i])return!1;return!0}function DT(r,t){const e=Object.entries(t).filter(([,n])=>n!==void 0).map(([n,i])=>lt(i,Pt)||lt(i,rr)?[n,i]:[n,new ci(i,r[It.Symbol.Columns][n])]);if(e.length===0)throw new Error("No values to set");return Object.fromEntries(e)}function vk(r,t){for(const e of t)for(const n of Object.getOwnPropertyNames(e.prototype))n!=="constructor"&&Object.defineProperty(r.prototype,n,Object.getOwnPropertyDescriptor(e.prototype,n)||Object.create(null))}function _k(r){return r[It.Symbol.Columns]}function fs(r){return lt(r,Nr)?r._.alias:lt(r,ji)?r[Qe].name:lt(r,Pt)?void 0:r[It.Symbol.IsAlias]?r[It.Symbol.Name]:r[It.Symbol.BaseName]}function bk(r){if(typeof r!="object"||r===null||r.constructor.name!=="Object")return!1;if("logger"in r){const t=typeof r.logger;return!(t!=="boolean"&&(t!=="object"||typeof r.logger.logQuery!="function")&&t!=="undefined")}if("schema"in r){const t=typeof r.schema;return!(t!=="object"&&t!=="undefined")}if("casing"in r){const t=typeof r.casing;return!(t!=="string"&&t!=="undefined")}if("mode"in r)return!(r.mode!=="default"||r.mode!=="planetscale"||r.mode!==void 0);if("connection"in r){const t=typeof r.connection;return!(t!=="string"&&t!=="object"&&t!=="undefined")}if("client"in r){const t=typeof r.client;return!(t!=="object"&&t!=="function"&&t!=="undefined")}return Object.keys(r).length===0}var r_,n_;class LT extends(n_=Lr,r_=St,n_){getSQLType(){return"date"}mapFromDriverValue(t){return new Date(t)}mapToDriverValue(t){return t.toISOString()}}W(LT,r_,"PgDate");var i_,s_;class NT extends(s_=Lr,i_=St,s_){getSQLType(){return"date"}}W(NT,i_,"PgDateString");var o_,a_;class BT extends(a_=Lr,o_=St,a_){constructor(t,e){super(t,e)}getSQLType(){return"json"}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t}}W(BT,o_,"PgJson");var l_,u_;class UT extends(u_=Lr,l_=St,u_){constructor(t,e){super(t,e)}getSQLType(){return"jsonb"}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t}}W(UT,l_,"PgJsonb");var c_,h_;class kT extends(h_=Lr,c_=St,h_){constructor(e,n){super(e,n);W(this,"precision");W(this,"scale");this.precision=n.precision,this.scale=n.scale}mapFromDriverValue(e){return typeof e=="string"?e:String(e)}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}}W(kT,c_,"PgNumeric");var d_,f_;class zT extends(f_=Lr,d_=St,f_){constructor(e,n){super(e,n);W(this,"withTimezone");W(this,"precision");this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`time${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}}W(zT,d_,"PgTime");var p_,m_;class VT extends(m_=Lr,p_=St,m_){constructor(e,n){super(e,n);W(this,"withTimezone");W(this,"precision");W(this,"mapFromDriverValue",e=>new Date(this.withTimezone?e:e+"+0000"));W(this,"mapToDriverValue",e=>e.toISOString());this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`timestamp${this.precision===void 0?"":` (${this.precision})`}${this.withTimezone?" with time zone":""}`}}W(VT,p_,"PgTimestamp");var g_,y_;class jT extends(y_=Lr,g_=St,y_){constructor(e,n){super(e,n);W(this,"withTimezone");W(this,"precision");this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`timestamp${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}}W(jT,g_,"PgTimestampString");var v_,__;class $T extends(__=Lr,v_=St,__){getSQLType(){return"uuid"}}W($T,v_,"PgUUID");const mv=Symbol.for("drizzle:PgInlineForeignKeys"),gv=Symbol.for("drizzle:EnableRLS");var b_,w_,x_,S_,T_,I_;class Xr extends(I_=It,T_=St,S_=mv,x_=gv,w_=It.Symbol.ExtraConfigBuilder,b_=It.Symbol.ExtraConfigColumns,I_){constructor(){super(...arguments);W(this,S_,[]);W(this,x_,!1);W(this,w_);W(this,b_,{})}}W(Xr,T_,"PgTable"),W(Xr,"Symbol",Object.assign({},It.Symbol,{InlineForeignKeys:mv,EnableRLS:gv}));var E_;E_=St;class GT{constructor(t,e){W(this,"columns");W(this,"name");this.columns=t,this.name=e}build(t){return new WT(t,this.columns,this.name)}}W(GT,E_,"PgPrimaryKeyBuilder");var A_;A_=St;class WT{constructor(t,e,n){W(this,"columns");W(this,"name");this.table=t,this.columns=e,this.name=n}getName(){return this.name??`${this.table[Xr.Symbol.Name]}_${this.columns.map(t=>t.name).join("_")}_pk`}}W(WT,A_,"PgPrimaryKey");var M_;M_=St;class kp{constructor(t,e,n){W(this,"referencedTableName");W(this,"fieldName");this.sourceTable=t,this.referencedTable=e,this.relationName=n,this.referencedTableName=e[It.Symbol.Name]}}W(kp,M_,"Relation");var C_;C_=St;class HT{constructor(t,e){this.table=t,this.config=e}}W(HT,C_,"Relations");var O_,P_;const Qu=class Qu extends(P_=kp,O_=St,P_){constructor(t,e,n,i){super(t,e,n==null?void 0:n.relationName),this.config=n,this.isNullable=i}withFieldName(t){const e=new Qu(this.sourceTable,this.referencedTable,this.config,this.isNullable);return e.fieldName=t,e}};W(Qu,O_,"One");let Os=Qu;var R_,F_;const Zu=class Zu extends(F_=kp,R_=St,F_){constructor(t,e,n){super(t,e,n==null?void 0:n.relationName),this.config=n}withFieldName(t){const e=new Zu(this.sourceTable,this.referencedTable,this.config);return e.fieldName=t,e}};W(Zu,R_,"Many");let Yu=Zu;function wk(){return{and:yf,between:ck,eq:OT,exists:lk,gt:tk,gte:ek,ilike:pk,inArray:ik,isNull:ok,isNotNull:ak,like:dk,lt:rk,lte:nk,ne:ZU,not:JU,notBetween:hk,notExists:uk,notLike:fk,notIlike:mk,notInArray:sk,or:KU,sql:Y}}function xk(){return{sql:Y,asc:gk,desc:yk}}function Sk(r,t){var s;Object.keys(r).length===1&&"default"in r&&!lt(r.default,It)&&(r=r.default);const e={},n={},i={};for(const[o,a]of Object.entries(r))if(lt(a,It)){const l=Xa(a),u=n[l];e[l]=o,i[o]={tsName:o,dbName:a[It.Symbol.Name],schema:a[It.Symbol.Schema],columns:a[It.Symbol.Columns],relations:(u==null?void 0:u.relations)??{},primaryKey:(u==null?void 0:u.primaryKey)??[]};for(const h of Object.values(a[It.Symbol.Columns]))h.primary&&i[o].primaryKey.push(h);const c=(s=a[It.Symbol.ExtraConfigBuilder])==null?void 0:s.call(a,a[It.Symbol.ExtraConfigColumns]);if(c)for(const h of Object.values(c))lt(h,GT)&&i[o].primaryKey.push(...h.columns)}else if(lt(a,HT)){const l=Xa(a.table),u=e[l],c=a.config(t(a.table));let h;for(const[f,d]of Object.entries(c))if(u){const m=i[u];m.relations[f]=d}else l in n||(n[l]={relations:{},primaryKey:h}),n[l].relations[f]=d}return{tables:i,tableNamesMap:e}}function Tk(r){return function(e,n){return new Os(r,e,n,(n==null?void 0:n.fields.reduce((i,s)=>i&&s.notNull,!0))??!1)}}function Ik(r){return function(e,n){return new Yu(r,e,n)}}function Ek(r,t,e){if(lt(e,Os)&&e.config)return{fields:e.config.fields,references:e.config.references};const n=t[Xa(e.referencedTable)];if(!n)throw new Error(`Table "${e.referencedTable[It.Symbol.Name]}" not found in schema`);const i=r[n];if(!i)throw new Error(`Table "${n}" not found in schema`);const s=e.sourceTable,o=t[Xa(s)];if(!o)throw new Error(`Table "${s[It.Symbol.Name]}" not found in schema`);const a=[];for(const l of Object.values(i.relations))(e.relationName&&e!==l&&l.relationName===e.relationName||!e.relationName&&l.referencedTable===e.sourceTable)&&a.push(l);if(a.length>1)throw e.relationName?new Error(`There are multiple relations with name "${e.relationName}" in table "${n}"`):new Error(`There are multiple relations between "${n}" and "${e.sourceTable[It.Symbol.Name]}". Please specify relation name`);if(a[0]&<(a[0],Os)&&a[0].config)return{fields:a[0].config.references,references:a[0].config.fields};throw new Error(`There is not enough information to infer relation "${o}.${e.fieldName}"`)}function Ak(r){return{one:Tk(r),many:Ik(r)}}function vf(r,t,e,n,i=s=>s){const s={};for(const[o,a]of n.entries())if(a.isJson){const l=t.relations[a.tsKey],u=e[o],c=typeof u=="string"?JSON.parse(u):u;s[a.tsKey]=lt(l,Os)?c&&vf(r,r[a.relationTableTsKey],c,a.selection,i):c.map(h=>vf(r,r[a.relationTableTsKey],h,a.selection,i))}else{const l=i(e[o]),u=a.field;let c;lt(u,rr)?c=u:lt(u,Pt)?c=u.decoder:c=u.sql.decoder,s[a.tsKey]=l===null?null:c.mapFromDriverValue(l)}return s}var D_;D_=St;const Ku=class Ku{constructor(t){W(this,"config");this.config={...t}}get(t,e){if(e==="_")return{...t._,selectedFields:new Proxy(t._.selectedFields,this)};if(e===Qe)return{...t[Qe],selectedFields:new Proxy(t[Qe].selectedFields,this)};if(typeof e=="symbol")return t[e];const i=(lt(t,Nr)?t._.selectedFields:lt(t,ji)?t[Qe].selectedFields:t)[e];if(lt(i,Pt.Aliased)){if(this.config.sqlAliasedBehavior==="sql"&&!i.isSelectionField)return i.sql;const s=i.clone();return s.isSelectionField=!0,s}if(lt(i,Pt)){if(this.config.sqlBehavior==="sql")return i;throw new Error(`You tried to reference "${e}" field from a subquery, which is a raw SQL field, but it doesn't have an alias declared. Please add an alias to the field using ".as('alias')" method.`)}return lt(i,rr)?this.config.alias?new Proxy(i,new Ya(new Proxy(i.table,new gc(this.config.alias,this.config.replaceOriginalName??!1)))):i:typeof i!="object"||i===null?i:new Proxy(i,new Ku(this.config))}};W(Ku,D_,"SelectionProxyHandler");let or=Ku;var L_,N_;class _f extends(N_=$i,L_=St,N_){constructor(e,n,i,s){super();W(this,"config");W(this,"authToken");W(this,"execute",e=>Ur.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken)));this.session=n,this.dialect=i,this.config={table:e,withList:s}}where(e){return this.config.where=e,this}returning(e=this.config.table[It.Symbol.Columns]){return this.config.returningFields=e,this.config.returning=Cs(e),this}getSQL(){return this.dialect.buildDeleteQuery(this.config)}toSQL(){const{typings:e,...n}=this.dialect.sqlToQuery(this.getSQL());return n}_prepare(e){return Ur.startActiveSpan("drizzle.prepareQuery",()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0))}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new or({alias:vs(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}W(_f,L_,"PgDelete");function Mk(r){return(r.replace(/['\u2019]/g,"").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[]).map(e=>e.toLowerCase()).join("_")}function Ck(r){return(r.replace(/['\u2019]/g,"").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[]).reduce((e,n,i)=>{const s=i===0?n.toLowerCase():`${n[0].toUpperCase()}${n.slice(1)}`;return e+s},"")}function Ok(r){return r}var B_;B_=St;class XT{constructor(t){W(this,"cache",{});W(this,"cachedTables",{});W(this,"convert");this.convert=t==="snake_case"?Mk:t==="camelCase"?Ck:Ok}getColumnCasing(t){if(!t.keyAsName)return t.name;const e=t.table[It.Symbol.Schema]??"public",n=t.table[It.Symbol.OriginalName],i=`${e}.${n}.${t.name}`;return this.cache[i]||this.cacheTable(t.table),this.cache[i]}cacheTable(t){const e=t[It.Symbol.Schema]??"public",n=t[It.Symbol.OriginalName],i=`${e}.${n}`;if(!this.cachedTables[i]){for(const s of Object.values(t[It.Symbol.Columns])){const o=`${i}.${s.name}`;this.cache[o]=this.convert(s.name)}this.cachedTables[i]=!0}}clearCache(){this.cache={},this.cachedTables={}}}W(XT,B_,"CasingCache");var U_,k_;class zp extends(k_=ji,U_=St,k_){}W(zp,U_,"PgViewBase");var z_;z_=St;class Ea{constructor(t){W(this,"casing");this.casing=new XT(t==null?void 0:t.casing)}async migrate(t,e,n){const i=typeof n=="string"?"__drizzle_migrations":n.migrationsTable??"__drizzle_migrations",s=typeof n=="string"?"drizzle":n.migrationsSchema??"drizzle",o=Y` +]`}concat(...t){const e=this.schema,n=this.data.concat(t.flatMap(({data:i})=>i));return new cs(e,n.map(i=>new _r(e,i)))}slice(t,e){const n=this.schema;[t,e]=ax({length:this.numRows},t,e);const i=hx(this.data,this._offsets,t,e);return new cs(n,i.map(s=>new _r(n,s)))}getChild(t){return this.getChildAt(this.schema.fields.findIndex(e=>e.name===t))}getChildAt(t){if(t>-1&&tn.children[t]);if(e.length===0){const{type:n}=this.schema.fields[t],i=le({type:n,length:0,nullCount:0});e.push(i._changeLengthAndBackfillNullBitmap(this.numRows))}return new Ne(e)}return null}setChild(t,e){var n;return this.setChildAt((n=this.schema.fields)===null||n===void 0?void 0:n.findIndex(i=>i.name===t),e)}setChildAt(t,e){let n=this.schema,i=[...this.batches];if(t>-1&&tthis.getChildAt(u));[s[t],a[t]]=[o,e],[n,i]=Ph(n,a)}return new cs(n,i)}select(t){const e=this.schema.fields.reduce((n,i,s)=>n.set(i.name,s),new Map);return this.selectAt(t.map(n=>e.get(n)).filter(n=>n>-1))}selectAt(t){const e=this.schema.selectAt(t),n=this.batches.map(i=>i.selectAt(t));return new cs(e,n)}assign(t){const e=this.schema.fields,[n,i]=t.schema.fields.reduce((a,l,u)=>{const[c,h]=a,f=e.findIndex(d=>d.name===l.name);return~f?h[f]=u:c.push(u),a},[[],[]]),s=this.schema.assign(t.schema),o=[...e.map((a,l)=>[l,i[l]]).map(([a,l])=>l===void 0?this.getChildAt(a):t.getChildAt(l)),...n.map(a=>t.getChildAt(a))].filter(Boolean);return new cs(...Ph(s,o))}};wx=Symbol.toStringTag;Li[wx]=(r=>(r.schema=null,r.batches=[],r._offsets=new Uint32Array([0]),r._nullCount=-1,r[Symbol.isConcatSpreadable]=!0,r.isValid=Du(op),r.get=Du(xr.getVisitFn(k.Struct)),r.set=dx(sn.getVisitFn(k.Struct)),r.indexOf=fx(Lu.getVisitFn(k.Struct)),"Table"))(Li.prototype);var xx;let _r=class ba{constructor(...t){switch(t.length){case 2:{if([this.schema]=t,!(this.schema instanceof Le))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");if([,this.data=le({nullCount:0,type:new dr(this.schema.fields),children:this.schema.fields.map(e=>le({type:e.type,nullCount:0}))})]=t,!(this.data instanceof Ae))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");[this.schema,this.data]=yy(this.schema,this.data.children);break}case 1:{const[e]=t,{fields:n,children:i,length:s}=Object.keys(e).reduce((l,u,c)=>(l.children[c]=e[u],l.length=Math.max(l.length,e[u].length),l.fields[c]=Pe.new({name:u,type:e[u].type,nullable:!0}),l),{length:0,fields:new Array,children:new Array}),o=new Le(n),a=le({type:new dr(n),length:s,children:i,nullCount:0});[this.schema,this.data]=yy(o,a.children,s);break}default:throw new TypeError("RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.")}}get dictionaries(){return this._dictionaries||(this._dictionaries=Sx(this.schema.fields,this.data.children))}get numCols(){return this.schema.fields.length}get numRows(){return this.data.length}get nullCount(){return this.data.nullCount}isValid(t){return this.data.getValid(t)}get(t){return xr.visit(this.data,t)}at(t){return this.get(np(t,this.numRows))}set(t,e){return sn.visit(this.data,t,e)}indexOf(t,e){return Lu.visit(this.data,t,e)}[Symbol.iterator](){return ap.visit(new Ne([this.data]))}toArray(){return[...this]}concat(...t){return new Li(this.schema,[this,...t])}slice(t,e){const[n]=new Ne([this.data]).slice(t,e).data;return new ba(this.schema,n)}getChild(t){var e;return this.getChildAt((e=this.schema.fields)===null||e===void 0?void 0:e.findIndex(n=>n.name===t))}getChildAt(t){return t>-1&&ti.name===t),e)}setChildAt(t,e){let n=this.schema,i=this.data;if(t>-1&&ta.name===s);~o&&(i[o]=this.data.children[o])}return new ba(e,le({type:n,length:this.numRows,children:i}))}selectAt(t){const e=this.schema.selectAt(t),n=t.map(s=>this.data.children[s]).filter(Boolean),i=le({type:new dr(e.fields),length:this.numRows,children:n});return new ba(e,i)}};xx=Symbol.toStringTag;_r[xx]=(r=>(r._nullCount=-1,r[Symbol.isConcatSpreadable]=!0,"RecordBatch"))(_r.prototype);function yy(r,t,e=t.reduce((n,i)=>Math.max(n,i.length),0)){var n;const i=[...r.fields],s=[...t],o=(e+63&-64)>>3;for(const[a,l]of r.fields.entries()){const u=t[a];(!u||u.length!==e)&&(i[a]=l.clone({nullable:!0}),s[a]=(n=u==null?void 0:u._changeLengthAndBackfillNullBitmap(e))!==null&&n!==void 0?n:le({type:l.type,length:e,nullCount:e,nullBitmap:new Uint8Array(o)}))}return[r.assign(i),le({type:new dr(i),length:e,children:s})]}function Sx(r,t,e=new Map){var n,i;if(((n=r==null?void 0:r.length)!==null&&n!==void 0?n:0)>0&&(r==null?void 0:r.length)===(t==null?void 0:t.length))for(let s=-1,o=r.length;++sle({type:i.type})),n=le({type:new dr(t.fields),nullCount:0,children:e});super(t,n)}}let bi=class Sn{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsMessage(t,e){return(e||new Sn).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsMessage(t,e){return t.setPosition(t.position()+_e),(e||new Sn).__init(t.readInt32(t.position())+t.position(),t)}version(){const t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):je.V1}headerType(){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readUint8(this.bb_pos+t):me.NONE}header(t){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__union(t,this.bb_pos+e):null}bodyLength(){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt64(this.bb_pos+t):BigInt("0")}customMetadata(t,e){const n=this.bb.__offset(this.bb_pos,12);return n?(e||new qe).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+t*4),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,12);return t?this.bb.__vector_len(this.bb_pos+t):0}static startMessage(t){t.startObject(5)}static addVersion(t,e){t.addFieldInt16(0,e,je.V1)}static addHeaderType(t,e){t.addFieldInt8(1,e,me.NONE)}static addHeader(t,e){t.addFieldOffset(2,e,0)}static addBodyLength(t,e){t.addFieldInt64(3,e,BigInt("0"))}static addCustomMetadata(t,e){t.addFieldOffset(4,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4);for(let n=e.length-1;n>=0;n--)t.addOffset(e[n]);return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endMessage(t){return t.endObject()}static finishMessageBuffer(t,e){t.finish(e)}static finishSizePrefixedMessageBuffer(t,e){t.finish(e,void 0,!0)}static createMessage(t,e,n,i,s,o){return Sn.startMessage(t),Sn.addVersion(t,e),Sn.addHeaderType(t,n),Sn.addHeader(t,i),Sn.addBodyLength(t,s),Sn.addCustomMetadata(t,o),Sn.endMessage(t)}};class R2 extends se{visit(t,e){return t==null||e==null?void 0:super.visit(t,e)}visitNull(t,e){return ay.startNull(e),ay.endNull(e)}visitInt(t,e){return Cr.startInt(e),Cr.addBitWidth(e,t.bitWidth),Cr.addIsSigned(e,t.isSigned),Cr.endInt(e)}visitFloat(t,e){return Rn.startFloatingPoint(e),Rn.addPrecision(e,t.precision),Rn.endFloatingPoint(e)}visitBinary(t,e){return ry.startBinary(e),ry.endBinary(e)}visitLargeBinary(t,e){return iy.startLargeBinary(e),iy.endLargeBinary(e)}visitBool(t,e){return ny.startBool(e),ny.endBool(e)}visitUtf8(t,e){return ly.startUtf8(e),ly.endUtf8(e)}visitLargeUtf8(t,e){return sy.startLargeUtf8(e),sy.endLargeUtf8(e)}visitDecimal(t,e){return Js.startDecimal(e),Js.addScale(e,t.scale),Js.addPrecision(e,t.precision),Js.addBitWidth(e,t.bitWidth),Js.endDecimal(e)}visitDate(t,e){return Vl.startDate(e),Vl.addUnit(e,t.unit),Vl.endDate(e)}visitTime(t,e){return Zr.startTime(e),Zr.addUnit(e,t.unit),Zr.addBitWidth(e,t.bitWidth),Zr.endTime(e)}visitTimestamp(t,e){const n=t.timezone&&e.createString(t.timezone)||void 0;return Kr.startTimestamp(e),Kr.addUnit(e,t.unit),n!==void 0&&Kr.addTimezone(e,n),Kr.endTimestamp(e)}visitInterval(t,e){return Fn.startInterval(e),Fn.addUnit(e,t.unit),Fn.endInterval(e)}visitDuration(t,e){return jl.startDuration(e),jl.addUnit(e,t.unit),jl.endDuration(e)}visitList(t,e){return oy.startList(e),oy.endList(e)}visitStruct(t,e){return ys.startStruct_(e),ys.endStruct_(e)}visitUnion(t,e){vr.startTypeIdsVector(e,t.typeIds.length);const n=vr.createTypeIdsVector(e,t.typeIds);return vr.startUnion(e),vr.addMode(e,t.mode),vr.addTypeIds(e,n),vr.endUnion(e)}visitDictionary(t,e){const n=this.visit(t.indices,e);return ai.startDictionaryEncoding(e),ai.addId(e,BigInt(t.id)),ai.addIsOrdered(e,t.isOrdered),n!==void 0&&ai.addIndexType(e,n),ai.endDictionaryEncoding(e)}visitFixedSizeBinary(t,e){return $l.startFixedSizeBinary(e),$l.addByteWidth(e,t.byteWidth),$l.endFixedSizeBinary(e)}visitFixedSizeList(t,e){return Gl.startFixedSizeList(e),Gl.addListSize(e,t.listSize),Gl.endFixedSizeList(e)}visitMap(t,e){return Wl.startMap(e),Wl.addKeysSorted(e,t.keysSorted),Wl.endMap(e)}}const Rh=new R2;function F2(r,t=new Map){return new Le(L2(r,t),Yl(r.metadata),t)}function Tx(r){return new Br(r.count,Ix(r.columns),Ex(r.columns))}function D2(r){return new Vn(Tx(r.data),r.id,r.isDelta)}function L2(r,t){return(r.fields||[]).filter(Boolean).map(e=>Pe.fromJSON(e,t))}function vy(r,t){return(r.children||[]).filter(Boolean).map(e=>Pe.fromJSON(e,t))}function Ix(r){return(r||[]).reduce((t,e)=>[...t,new Ni(e.count,N2(e.VALIDITY)),...Ix(e.children)],[])}function Ex(r,t=[]){for(let e=-1,n=(r||[]).length;++et+ +(e===0),0)}function B2(r,t){let e,n,i,s,o,a;return!t||!(s=r.dictionary)?(o=by(r,vy(r,t)),i=new Pe(r.name,o,r.nullable,Yl(r.metadata))):t.has(e=s.id)?(n=(n=s.indexType)?_y(n):new za,a=new Oo(t.get(e),n,e,s.isOrdered),i=new Pe(r.name,a,r.nullable,Yl(r.metadata))):(n=(n=s.indexType)?_y(n):new za,t.set(e,o=by(r,vy(r,t))),a=new Oo(o,n,e,s.isOrdered),i=new Pe(r.name,a,r.nullable,Yl(r.metadata))),i||null}function Yl(r=[]){return new Map(r.map(({key:t,value:e})=>[t,e]))}function _y(r){return new Es(r.isSigned,r.bitWidth)}function by(r,t){const e=r.type.name;switch(e){case"NONE":return new Ri;case"null":return new Ri;case"binary":return new gu;case"largebinary":return new yu;case"utf8":return new vu;case"largeutf8":return new _u;case"bool":return new bu;case"list":return new Au((t||[])[0]);case"struct":return new dr(t||[]);case"struct_":return new dr(t||[])}switch(e){case"int":{const n=r.type;return new Es(n.isSigned,n.bitWidth)}case"floatingpoint":{const n=r.type;return new mu(ar[n.precision])}case"decimal":{const n=r.type;return new wu(n.scale,n.precision,n.bitWidth)}case"date":{const n=r.type;return new xu(nn[n.unit])}case"time":{const n=r.type;return new Su(Vt[n.unit],n.bitWidth)}case"timestamp":{const n=r.type;return new Tu(Vt[n.unit],n.timezone)}case"interval":{const n=r.type;return new Iu(zn[n.unit])}case"duration":{const n=r.type;return new Eu(Vt[n.unit])}case"union":{const n=r.type,[i,...s]=(n.mode+"").toLowerCase(),o=i.toUpperCase()+s.join("");return new Mu(lr[o],n.typeIds||[],t||[])}case"fixedsizebinary":{const n=r.type;return new Cu(n.byteWidth)}case"fixedsizelist":{const n=r.type;return new Ou(n.listSize,(t||[])[0])}case"map":{const n=r.type;return new Pu((t||[])[0],n.keysSorted)}}throw new Error(`Unrecognized type: "${e}"`)}var U2=zb,k2=Mo;class fr{static fromJSON(t,e){const n=new fr(0,je.V5,e);return n._createHeader=z2(t,e),n}static decode(t){t=new k2(ce(t));const e=bi.getRootAsMessage(t),n=e.bodyLength(),i=e.version(),s=e.headerType(),o=new fr(n,i,s);return o._createHeader=V2(e,s),o}static encode(t){const e=new U2;let n=-1;return t.isSchema()?n=Le.encode(e,t.header()):t.isRecordBatch()?n=Br.encode(e,t.header()):t.isDictionaryBatch()&&(n=Vn.encode(e,t.header())),bi.startMessage(e),bi.addVersion(e,je.V5),bi.addHeader(e,n),bi.addHeaderType(e,t.headerType),bi.addBodyLength(e,BigInt(t.bodyLength)),bi.finishMessageBuffer(e,bi.endMessage(e)),e.asUint8Array()}static from(t,e=0){if(t instanceof Le)return new fr(0,je.V5,me.Schema,t);if(t instanceof Br)return new fr(e,je.V5,me.RecordBatch,t);if(t instanceof Vn)return new fr(e,je.V5,me.DictionaryBatch,t);throw new Error(`Unrecognized Message header: ${t}`)}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get bodyLength(){return this._bodyLength}header(){return this._createHeader()}isSchema(){return this.headerType===me.Schema}isRecordBatch(){return this.headerType===me.RecordBatch}isDictionaryBatch(){return this.headerType===me.DictionaryBatch}constructor(t,e,n,i){this._version=e,this._headerType=n,this.body=new Uint8Array(0),i&&(this._createHeader=()=>i),this._bodyLength=Te(t)}}class Br{get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}constructor(t,e,n){this._nodes=e,this._buffers=n,this._length=Te(t)}}class Vn{get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}constructor(t,e,n=!1){this._data=t,this._isDelta=n,this._id=Te(e)}}class Ln{constructor(t,e){this.offset=Te(t),this.length=Te(e)}}class Ni{constructor(t,e){this.length=Te(t),this.nullCount=Te(e)}}function z2(r,t){return()=>{switch(t){case me.Schema:return Le.fromJSON(r);case me.RecordBatch:return Br.fromJSON(r);case me.DictionaryBatch:return Vn.fromJSON(r)}throw new Error(`Unrecognized Message type: { name: ${me[t]}, type: ${t} }`)}}function V2(r,t){return()=>{switch(t){case me.Schema:return Le.decode(r.header(new In),new Map,r.version());case me.RecordBatch:return Br.decode(r.header(new ri),r.version());case me.DictionaryBatch:return Vn.decode(r.header(new Zs),r.version())}throw new Error(`Unrecognized Message type: { name: ${me[t]}, type: ${t} }`)}}Pe.encode=K2;Pe.decode=Q2;Pe.fromJSON=B2;Le.encode=Z2;Le.decode=j2;Le.fromJSON=F2;Br.encode=J2;Br.decode=$2;Br.fromJSON=Tx;Vn.encode=tD;Vn.decode=G2;Vn.fromJSON=D2;Ni.encode=eD;Ni.decode=H2;Ln.encode=rD;Ln.decode=W2;function j2(r,t=new Map,e=je.V5){const n=q2(r,t);return new Le(n,ql(r),t,e)}function $2(r,t=je.V5){if(r.compression()!==null)throw new Error("Record batch compression not implemented");return new Br(r.length(),X2(r),Y2(r,t))}function G2(r,t=je.V5){return new Vn(Br.decode(r.data(),t),r.id(),r.isDelta())}function W2(r){return new Ln(r.offset(),r.length())}function H2(r){return new Ni(r.length(),r.nullCount())}function X2(r){const t=[];for(let e,n=-1,i=-1,s=r.nodesLength();++nPe.encode(r,s));In.startFieldsVector(r,e.length);const n=In.createFieldsVector(r,e),i=t.metadata&&t.metadata.size>0?In.createCustomMetadataVector(r,[...t.metadata].map(([s,o])=>{const a=r.createString(`${s}`),l=r.createString(`${o}`);return qe.startKeyValue(r),qe.addKey(r,a),qe.addValue(r,l),qe.endKeyValue(r)})):-1;return In.startSchema(r),In.addFields(r,n),In.addEndianness(r,nD?Co.Little:Co.Big),i!==-1&&In.addCustomMetadata(r,i),In.endSchema(r)}function K2(r,t){let e=-1,n=-1,i=-1;const s=t.type;let o=t.typeId;Ot.isDictionary(s)?(o=s.dictionary.typeId,i=Rh.visit(s,r),n=Rh.visit(s.dictionary,r)):n=Rh.visit(s,r);const a=(s.children||[]).map(c=>Pe.encode(r,c)),l=Wr.createChildrenVector(r,a),u=t.metadata&&t.metadata.size>0?Wr.createCustomMetadataVector(r,[...t.metadata].map(([c,h])=>{const f=r.createString(`${c}`),d=r.createString(`${h}`);return qe.startKeyValue(r),qe.addKey(r,f),qe.addValue(r,d),qe.endKeyValue(r)})):-1;return t.name&&(e=r.createString(t.name)),Wr.startField(r),Wr.addType(r,n),Wr.addTypeType(r,o),Wr.addChildren(r,l),Wr.addNullable(r,!!t.nullable),e!==-1&&Wr.addName(r,e),i!==-1&&Wr.addDictionary(r,i),u!==-1&&Wr.addCustomMetadata(r,u),Wr.endField(r)}function J2(r,t){const e=t.nodes||[],n=t.buffers||[];ri.startNodesVector(r,e.length);for(const o of e.slice().reverse())Ni.encode(r,o);const i=r.endVector();ri.startBuffersVector(r,n.length);for(const o of n.slice().reverse())Ln.encode(r,o);const s=r.endVector();return ri.startRecordBatch(r),ri.addLength(r,BigInt(t.length)),ri.addNodes(r,i),ri.addBuffers(r,s),ri.endRecordBatch(r)}function tD(r,t){const e=Br.encode(r,t.data);return Zs.startDictionaryBatch(r),Zs.addId(r,BigInt(t.id)),Zs.addIsDelta(r,t.isDelta),Zs.addData(r,e),Zs.endDictionaryBatch(r)}function eD(r,t){return $b.createFieldNode(r,BigInt(t.length),BigInt(t.nullCount))}function rD(r,t){return jb.createBuffer(r,BigInt(t.offset),BigInt(t.length))}const nD=(()=>{const r=new ArrayBuffer(2);return new DataView(r).setInt16(0,256,!0),new Int16Array(r)[0]===256})(),pp=r=>`Expected ${me[r]} Message in stream, but was null or length 0.`,mp=r=>`Header pointer of flatbuffer-encoded ${me[r]} Message is null or length 0.`,Ax=(r,t)=>`Expected to read ${r} metadata bytes, but only read ${t}.`,Mx=(r,t)=>`Expected to read ${r} bytes for message body, but only read ${t}.`;class Cx{constructor(t){this.source=t instanceof Nu?t:new Nu(t)}[Symbol.iterator](){return this}next(){let t;return(t=this.readMetadataLength()).done||t.value===-1&&(t=this.readMetadataLength()).done||(t=this.readMetadata(t.value)).done?Be:t}throw(t){return this.source.throw(t)}return(t){return this.source.return(t)}readMessage(t){let e;if((e=this.next()).done)return null;if(t!=null&&e.value.headerType!==t)throw new Error(pp(t));return e.value}readMessageBody(t){if(t<=0)return new Uint8Array(0);const e=ce(this.source.read(t));if(e.byteLength[...i,...s.VALIDITY&&[s.VALIDITY]||[],...s.TYPE_ID&&[s.TYPE_ID]||[],...s.OFFSET&&[s.OFFSET]||[],...s.DATA&&[s.DATA]||[],...e(s.children)],[])}}readMessage(t){let e;if((e=this.next()).done)return null;if(t!=null&&e.value.headerType!==t)throw new Error(pp(t));return e.value}readSchema(){const t=me.Schema,e=this.readMessage(t),n=e==null?void 0:e.header();if(!e||!n)throw new Error(mp(t));return n}}const uc=4,sf="ARROW1",ja=new Uint8Array(sf.length);for(let r=0;rthis):this}readRecordBatch(t){return this._impl.isFile()?this._impl.readRecordBatch(t):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return Yr.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return Yr.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(t){throw new Error('"throughNode" not available in this environment')}static throughDOM(t,e){throw new Error('"throughDOM" not available in this environment')}static from(t){return t instanceof tn?t:Hd(t)?cD(t):Db(t)?fD(t):Is(t)?Jt(this,void 0,void 0,function*(){return yield tn.from(yield t)}):Lb(t)||Kf(t)||Nb(t)||Uo(t)?dD(new Po(t)):hD(new Nu(t))}static readAll(t){return t instanceof tn?t.isSync()?Ty(t):Iy(t):Hd(t)||ArrayBuffer.isView(t)||Qa(t)||Fb(t)?Ty(t):Iy(t)}}class Uu extends tn{constructor(t){super(t),this._impl=t}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return br(this,arguments,function*(){yield Rt(yield*Ss(Bn(this[Symbol.iterator]())))})}}class ku extends tn{constructor(t){super(t),this._impl=t}readAll(){return Jt(this,void 0,void 0,function*(){var t,e,n,i;const s=new Array;try{for(var o=!0,a=Bn(this),l;l=yield a.next(),t=l.done,!t;o=!0){i=l.value,o=!1;const u=i;s.push(u)}}catch(u){e={error:u}}finally{try{!o&&!t&&(n=a.return)&&(yield n.call(a))}finally{if(e)throw e.error}}return s})}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}}class Px extends Uu{constructor(t){super(t),this._impl=t}}class aD extends ku{constructor(t){super(t),this._impl=t}}class Rx{get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}constructor(t=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=t}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(t){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=t,this.dictionaries=new Map,this}_loadRecordBatch(t,e){const n=this._loadVectors(t,e,this.schema.fields),i=le({type:new dr(this.schema.fields),length:t.length,children:n});return new _r(this.schema,i)}_loadDictionaryBatch(t,e){const{id:n,isDelta:i}=t,{dictionaries:s,schema:o}=this,a=s.get(n),l=o.dictionaries.get(n),u=this._loadVectors(t.data,e,[l]);return(a&&i?a.concat(new Ne(u)):new Ne(u)).memoize()}_loadVectors(t,e,n){return new bx(e,t.nodes,t.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(n)}}class zu extends Rx{constructor(t,e){super(e),this._reader=Hd(t)?new sD(this._handle=t):new Cx(this._handle=t)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(t){return this.closed||(this.autoDestroy=Dx(this,t),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(t):Be}return(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(t):Be}next(){if(this.closed)return Be;let t;const{_reader:e}=this;for(;t=this._readNextMessageAndValidate();)if(t.isSchema())this.reset(t.header());else if(t.isRecordBatch()){this._recordBatchIndex++;const n=t.header(),i=e.readMessageBody(t.bodyLength);return{done:!1,value:this._loadRecordBatch(n,i)}}else if(t.isDictionaryBatch()){this._dictionaryIndex++;const n=t.header(),i=e.readMessageBody(t.bodyLength),s=this._loadDictionaryBatch(n,i);this.dictionaries.set(n.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new fp(this.schema)}):this.return()}_readNextMessageAndValidate(t){return this._reader.readMessage(t)}}class Vu extends Rx{constructor(t,e){super(e),this._reader=new iD(this._handle=t)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return Jt(this,void 0,void 0,function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)})}open(t){return Jt(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=Dx(this,t),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(t){return Jt(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(t):Be})}return(t){return Jt(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(t):Be})}next(){return Jt(this,void 0,void 0,function*(){if(this.closed)return Be;let t;const{_reader:e}=this;for(;t=yield this._readNextMessageAndValidate();)if(t.isSchema())yield this.reset(t.header());else if(t.isRecordBatch()){this._recordBatchIndex++;const n=t.header(),i=yield e.readMessageBody(t.bodyLength);return{done:!1,value:this._loadRecordBatch(n,i)}}else if(t.isDictionaryBatch()){this._dictionaryIndex++;const n=t.header(),i=yield e.readMessageBody(t.bodyLength),s=this._loadDictionaryBatch(n,i);this.dictionaries.set(n.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new fp(this.schema)}):yield this.return()})}_readNextMessageAndValidate(t){return Jt(this,void 0,void 0,function*(){return yield this._reader.readMessage(t)})}}class Fx extends zu{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(t,e){super(t instanceof gy?t:new gy(t),e)}isSync(){return!0}isFile(){return!0}open(t){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(const e of this._footer.dictionaryBatches())e&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(t)}readRecordBatch(t){var e;if(this.closed)return null;this._footer||this.open();const n=(e=this._footer)===null||e===void 0?void 0:e.getRecordBatch(t);if(n&&this._handle.seek(n.offset)){const i=this._reader.readMessage(me.RecordBatch);if(i!=null&&i.isRecordBatch()){const s=i.header(),o=this._reader.readMessageBody(i.bodyLength);return this._loadRecordBatch(s,o)}}return null}_readDictionaryBatch(t){var e;const n=(e=this._footer)===null||e===void 0?void 0:e.getDictionaryBatch(t);if(n&&this._handle.seek(n.offset)){const i=this._reader.readMessage(me.DictionaryBatch);if(i!=null&&i.isDictionaryBatch()){const s=i.header(),o=this._reader.readMessageBody(i.bodyLength),a=this._loadDictionaryBatch(s,o);this.dictionaries.set(s.id,a)}}}_readFooter(){const{_handle:t}=this,e=t.size-Ox,n=t.readInt32(e),i=t.readAt(e-n,n);return Va.decode(i)}_readNextMessageAndValidate(t){var e;if(this._footer||this.open(),this._footer&&this._recordBatchIndexsuper.open}});return Jt(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(const n of this._footer.dictionaryBatches())n&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield e.open.call(this,t)})}readRecordBatch(t){return Jt(this,void 0,void 0,function*(){var e;if(this.closed)return null;this._footer||(yield this.open());const n=(e=this._footer)===null||e===void 0?void 0:e.getRecordBatch(t);if(n&&(yield this._handle.seek(n.offset))){const i=yield this._reader.readMessage(me.RecordBatch);if(i!=null&&i.isRecordBatch()){const s=i.header(),o=yield this._reader.readMessageBody(i.bodyLength);return this._loadRecordBatch(s,o)}}return null})}_readDictionaryBatch(t){return Jt(this,void 0,void 0,function*(){var e;const n=(e=this._footer)===null||e===void 0?void 0:e.getDictionaryBatch(t);if(n&&(yield this._handle.seek(n.offset))){const i=yield this._reader.readMessage(me.DictionaryBatch);if(i!=null&&i.isDictionaryBatch()){const s=i.header(),o=yield this._reader.readMessageBody(i.bodyLength),a=this._loadDictionaryBatch(s,o);this.dictionaries.set(s.id,a)}}})}_readFooter(){return Jt(this,void 0,void 0,function*(){const{_handle:t}=this;t._pending&&(yield t._pending);const e=t.size-Ox,n=yield t.readInt32(e),i=yield t.readAt(e-n,n);return Va.decode(i)})}_readNextMessageAndValidate(t){return Jt(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex=4?gp(t)?new Px(new Fx(r.read())):new Uu(new zu(r)):new Uu(new zu(function*(){}()))}function dD(r){return Jt(this,void 0,void 0,function*(){const t=yield r.peek(tl+7&-8);return t&&t.byteLength>=4?gp(t)?new Px(new Fx(yield r.read())):new ku(new Vu(r)):new ku(new Vu(function(){return br(this,arguments,function*(){})}()))})}function fD(r){return Jt(this,void 0,void 0,function*(){const{size:t}=yield r.stat(),e=new Bu(r,t);return t>=oD&&gp(yield e.readAt(0,tl+7&-8))?new aD(new lD(e)):new ku(new Vu(e))})}class ke extends se{static assemble(...t){const e=i=>i.flatMap(s=>Array.isArray(s)?e(s):s instanceof _r?s.data.children:s.data),n=new ke;return n.visitMany(e(t)),n}constructor(){super(),this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}visit(t){if(t instanceof Ne)return this.visitMany(t.data),this;const{type:e}=t;if(!Ot.isDictionary(e)){const{length:n}=t;if(n>2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");if(Ot.isUnion(e))this.nodes.push(new Ni(n,0));else{const{nullCount:i}=t;Ot.isNull(e)||dn.call(this,i<=0?new Uint8Array(0):Ru(t.offset,n,t.nullBitmap)),this.nodes.push(new Ni(n,i))}}return super.visit(t)}visitNull(t){return this}visitDictionary(t){return this.visit(t.clone(t.type.indices))}get nodes(){return this._nodes}get buffers(){return this._buffers}get byteLength(){return this._byteLength}get bufferRegions(){return this._bufferRegions}}function dn(r){const t=r.byteLength+7&-8;return this.buffers.push(r),this.bufferRegions.push(new Ln(this._byteLength,t)),this._byteLength+=t,this}function pD(r){var t;const{type:e,length:n,typeIds:i,valueOffsets:s}=r;if(dn.call(this,i),e.mode===lr.Sparse)return of.call(this,r);if(e.mode===lr.Dense){if(r.offset<=0)return dn.call(this,s),of.call(this,r);{const o=new Int32Array(n),a=Object.create(null),l=Object.create(null);for(let u,c,h=-1;++h{const h=e.typeIds[c],f=a[h],d=l[h];return u.slice(f,Math.min(n,d))}))}}return this}function mD(r){let t;return r.nullCount>=r.length?dn.call(this,new Uint8Array(0)):(t=r.values)instanceof Uint8Array?dn.call(this,Ru(r.offset,r.length,t)):dn.call(this,Fu(r.values))}function fi(r){return dn.call(this,r.values.subarray(0,r.length*r.stride))}function cc(r){const{length:t,values:e,valueOffsets:n}=r,i=Te(n[0]),s=Te(n[t]),o=Math.min(s-i,e.byteLength-i);return dn.call(this,Ub(-i,t+1,n)),dn.call(this,e.subarray(i,i+o)),this}function yp(r){const{length:t,valueOffsets:e}=r;if(e){const{[0]:n,[t]:i}=e;return dn.call(this,Ub(-n,t+1,e)),this.visit(r.children[0].slice(n,i-n))}return this.visit(r.children[0])}function of(r){return this.visitMany(r.type.children.map((t,e)=>r.children[e]).filter(Boolean))[0]}ke.prototype.visitBool=mD;ke.prototype.visitInt=fi;ke.prototype.visitFloat=fi;ke.prototype.visitUtf8=cc;ke.prototype.visitLargeUtf8=cc;ke.prototype.visitBinary=cc;ke.prototype.visitLargeBinary=cc;ke.prototype.visitFixedSizeBinary=fi;ke.prototype.visitDate=fi;ke.prototype.visitTimestamp=fi;ke.prototype.visitTime=fi;ke.prototype.visitDecimal=fi;ke.prototype.visitList=yp;ke.prototype.visitStruct=of;ke.prototype.visitUnion=pD;ke.prototype.visitInterval=fi;ke.prototype.visitDuration=fi;ke.prototype.visitFixedSizeList=yp;ke.prototype.visitMap=yp;class Lx extends lp{static throughNode(t){throw new Error('"throughNode" not available in this environment')}static throughDOM(t,e){throw new Error('"throughDOM" not available in this environment')}constructor(t){super(),this._position=0,this._started=!1,this._sink=new Xl,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,wr(t)||(t={autoDestroy:!0,writeLegacyIpcFormat:!1}),this._autoDestroy=typeof t.autoDestroy=="boolean"?t.autoDestroy:!0,this._writeLegacyIpcFormat=typeof t.writeLegacyIpcFormat=="boolean"?t.writeLegacyIpcFormat:!1}toString(t=!1){return this._sink.toString(t)}toUint8Array(t=!1){return this._sink.toUint8Array(t)}writeAll(t){return Is(t)?t.then(e=>this.writeAll(e)):Uo(t)?wp(this,t):bp(this,t)}get closed(){return this._sink.closed}[Symbol.asyncIterator](){return this._sink[Symbol.asyncIterator]()}toDOMStream(t){return this._sink.toDOMStream(t)}toNodeStream(t){return this._sink.toNodeStream(t)}close(){return this.reset()._sink.close()}abort(t){return this.reset()._sink.abort(t)}finish(){return this._autoDestroy?this.close():this.reset(this._sink,this._schema),this}reset(t=this._sink,e=null){return t===this._sink||t instanceof Xl?this._sink=t:(this._sink=new Xl,t&&GR(t)?this.toDOMStream({type:"bytes"}).pipeTo(t):t&&WR(t)&&this.toNodeStream({objectMode:!1}).pipe(t)),this._started&&this._schema&&this._writeFooter(this._schema),this._started=!1,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,(!e||!nf(e,this._schema))&&(e==null?(this._position=0,this._schema=null):(this._started=!0,this._schema=e,this._writeSchema(e))),this}write(t){let e=null;if(this._sink){if(t==null)return this.finish()&&void 0;if(t instanceof Li&&!(e=t.schema))return this.finish()&&void 0;if(t instanceof _r&&!(e=t.schema))return this.finish()&&void 0}else throw new Error("RecordBatchWriter is closed");if(e&&!nf(e,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,e)}t instanceof _r?t instanceof fp||this._writeRecordBatch(t):t instanceof Li?this.writeAll(t.batches):Qa(t)&&this.writeAll(t)}_writeMessage(t,e=8){const n=e-1,i=fr.encode(t),s=i.byteLength,o=this._writeLegacyIpcFormat?4:8,a=s+o+n&~n,l=a-s-o;return t.headerType===me.RecordBatch?this._recordBatchBlocks.push(new Fi(a,t.bodyLength,this._position)):t.headerType===me.DictionaryBatch&&this._dictionaryBlocks.push(new Fi(a,t.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(a-o)),s>0&&this._write(i),this._writePadding(l)}_write(t){if(this._started){const e=ce(t);e&&e.byteLength>0&&(this._sink.write(e),this._position+=e.byteLength)}return this}_writeSchema(t){return this._writeMessage(fr.from(t))}_writeFooter(t){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(ja)}_writePadding(t){return t>0?this._write(new Uint8Array(t)):this}_writeRecordBatch(t){const{byteLength:e,nodes:n,bufferRegions:i,buffers:s}=ke.assemble(t),o=new Br(t.numRows,n,i),a=fr.from(o,e);return this._writeDictionaries(t)._writeMessage(a)._writeBodyBuffers(s)}_writeDictionaryBatch(t,e,n=!1){const{byteLength:i,nodes:s,bufferRegions:o,buffers:a}=ke.assemble(new Ne([t])),l=new Br(t.length,s,o),u=new Vn(l,e,n),c=fr.from(u,i);return this._writeMessage(c)._writeBodyBuffers(a)}_writeBodyBuffers(t){let e,n,i;for(let s=-1,o=t.length;++s0&&(this._write(e),(i=(n+7&-8)-n)>0&&this._writePadding(i));return this}_writeDictionaries(t){var e,n;for(const[i,s]of t.dictionaries){const o=(e=s==null?void 0:s.data)!==null&&e!==void 0?e:[],a=this._seenDictionaries.get(i),l=(n=this._dictionaryDeltaOffsets.get(i))!==null&&n!==void 0?n:0;if(!a||a.data[0]!==o[0])for(const[u,c]of o.entries())this._writeDictionaryBatch(c,i,u>0);else if(ln.writeAll(i)):Uo(t)?wp(n,t):bp(n,t)}}class _p extends Lx{static writeAll(t){const e=new _p;return Is(t)?t.then(n=>e.writeAll(n)):Uo(t)?wp(e,t):bp(e,t)}constructor(){super(),this._autoDestroy=!0}_writeSchema(t){return this._writeMagic()._writePadding(2)}_writeDictionaryBatch(t,e,n=!1){if(!n&&this._seenDictionaries.has(e))throw new Error("The Arrow File format does not support replacement dictionaries. ");return super._writeDictionaryBatch(t,e,n)}_writeFooter(t){const e=Va.encode(new Va(t,je.V5,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(t)._write(e)._write(Int32Array.of(e.byteLength))._writeMagic()}}function bp(r,t){let e=t;t instanceof Li&&(e=t.batches,r.reset(void 0,t.schema));for(const n of e)r.write(n);return r.finish()}function wp(r,t){return Jt(this,void 0,void 0,function*(){var e,n,i,s,o,a,l;try{for(e=!0,n=Bn(t);i=yield n.next(),s=i.done,!s;e=!0){l=i.value,e=!1;const u=l;r.write(u)}}catch(u){o={error:u}}finally{try{!e&&!s&&(a=n.return)&&(yield a.call(n))}finally{if(o)throw o.error}}return r.finish()})}function gD(r,t="stream"){return(t==="stream"?vp:_p).writeAll(r).toUint8Array(!0)}var yD=Object.create,Nx=Object.defineProperty,vD=Object.getOwnPropertyDescriptor,_D=Object.getOwnPropertyNames,bD=Object.getPrototypeOf,wD=Object.prototype.hasOwnProperty,xD=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),SD=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of _D(t))!wD.call(r,i)&&i!==e&&Nx(r,i,{get:()=>t[i],enumerable:!(n=vD(t,i))||n.enumerable});return r},TD=(r,t,e)=>(e=r!=null?yD(bD(r)):{},SD(!r||!r.__esModule?Nx(e,"default",{value:r,enumerable:!0}):e,r)),ID=xD((r,t)=>{t.exports=Worker}),Bx=(r=>(r[r.UNDEFINED=0]="UNDEFINED",r[r.AUTOMATIC=1]="AUTOMATIC",r[r.READ_ONLY=2]="READ_ONLY",r[r.READ_WRITE=3]="READ_WRITE",r))(Bx||{}),ED=(r=>(r[r.IDENTIFIER=0]="IDENTIFIER",r[r.NUMERIC_CONSTANT=1]="NUMERIC_CONSTANT",r[r.STRING_CONSTANT=2]="STRING_CONSTANT",r[r.OPERATOR=3]="OPERATOR",r[r.KEYWORD=4]="KEYWORD",r[r.COMMENT=5]="COMMENT",r))(ED||{}),AD=(r=>(r[r.NONE=0]="NONE",r[r.DEBUG=1]="DEBUG",r[r.INFO=2]="INFO",r[r.WARNING=3]="WARNING",r[r.ERROR=4]="ERROR",r))(AD||{}),MD=(r=>(r[r.NONE=0]="NONE",r[r.CONNECT=1]="CONNECT",r[r.DISCONNECT=2]="DISCONNECT",r[r.OPEN=3]="OPEN",r[r.QUERY=4]="QUERY",r[r.INSTANTIATE=5]="INSTANTIATE",r))(MD||{}),CD=(r=>(r[r.NONE=0]="NONE",r[r.OK=1]="OK",r[r.ERROR=2]="ERROR",r[r.START=3]="START",r[r.RUN=4]="RUN",r[r.CAPTURE=5]="CAPTURE",r))(CD||{}),OD=(r=>(r[r.NONE=0]="NONE",r[r.WEB_WORKER=1]="WEB_WORKER",r[r.NODE_WORKER=2]="NODE_WORKER",r[r.BINDINGS=3]="BINDINGS",r[r.ASYNC_DUCKDB=4]="ASYNC_DUCKDB",r))(OD||{}),PD=class{log(r){}},Ux=class{constructor(r=2){this.level=r}log(r){r.level>=this.level&&console.log(r)}},RD=(r=>(r[r.SUCCESS=0]="SUCCESS",r))(RD||{}),FD=class{constructor(r,t){this._bindings=r,this._conn=t}get bindings(){return this._bindings}async close(){return this._bindings.disconnect(this._conn)}useUnsafe(r){return r(this._bindings,this._conn)}async query(r){this._bindings.logger.log({timestamp:new Date,level:2,origin:4,topic:4,event:4,value:r});let t=await this._bindings.runQuery(this._conn,r),e=tn.from(t);return console.assert(e.isSync(),"Reader is not sync"),console.assert(e.isFile(),"Reader is not file"),new Li(e)}async send(r,t=!1){this._bindings.logger.log({timestamp:new Date,level:2,origin:4,topic:4,event:4,value:r});let e=await this._bindings.startPendingQuery(this._conn,r,t);for(;e==null;)e=await this._bindings.pollPendingQuery(this._conn);let n=new kx(this._bindings,this._conn,e),i=await tn.from(n);return console.assert(i.isAsync()),console.assert(i.isStream()),i}async cancelSent(){return await this._bindings.cancelPendingQuery(this._conn)}async getTableNames(r){return await this._bindings.getTableNames(this._conn,r)}async prepare(r){let t=await this._bindings.createPrepared(this._conn,r);return new DD(this._bindings,this._conn,t)}async insertArrowTable(r,t){let e=gD(r,"stream");await this.insertArrowFromIPCStream(e,t)}async insertArrowFromIPCStream(r,t){await this._bindings.insertArrowFromIPCStream(this._conn,r,t)}async insertCSVFromPath(r,t){await this._bindings.insertCSVFromPath(this._conn,r,t)}async insertJSONFromPath(r,t){await this._bindings.insertJSONFromPath(this._conn,r,t)}},kx=class{constructor(r,t,e){this.db=r,this.conn=t,this.header=e,this._first=!0,this._depleted=!1,this._inFlight=null}async next(){if(this._first)return this._first=!1,{done:!1,value:this.header};if(this._depleted)return{done:!0,value:null};let r;return this._inFlight!=null?(r=await this._inFlight,this._inFlight=null):r=await this.db.fetchQueryResults(this.conn),this._depleted=r.length==0,this._depleted||(this._inFlight=this.db.fetchQueryResults(this.conn)),{done:this._depleted,value:r}}[Symbol.asyncIterator](){return this}},DD=class{constructor(r,t,e){this.bindings=r,this.connectionId=t,this.statementId=e}async close(){await this.bindings.closePrepared(this.connectionId,this.statementId)}async query(...r){let t=await this.bindings.runPrepared(this.connectionId,this.statementId,r),e=tn.from(t);return console.assert(e.isSync()),console.assert(e.isFile()),new Li(e)}async send(...r){let t=await this.bindings.sendPrepared(this.connectionId,this.statementId,r),e=new kx(this.bindings,this.connectionId,t),n=await tn.from(e);return console.assert(n.isAsync()),console.assert(n.isStream()),n}},LD=(r=>(r.CANCEL_PENDING_QUERY="CANCEL_PENDING_QUERY",r.CLOSE_PREPARED="CLOSE_PREPARED",r.COLLECT_FILE_STATISTICS="COLLECT_FILE_STATISTICS",r.REGISTER_OPFS_FILE_NAME="REGISTER_OPFS_FILE_NAME",r.CONNECT="CONNECT",r.COPY_FILE_TO_BUFFER="COPY_FILE_TO_BUFFER",r.COPY_FILE_TO_PATH="COPY_FILE_TO_PATH",r.CREATE_PREPARED="CREATE_PREPARED",r.DISCONNECT="DISCONNECT",r.DROP_FILE="DROP_FILE",r.DROP_FILES="DROP_FILES",r.EXPORT_FILE_STATISTICS="EXPORT_FILE_STATISTICS",r.FETCH_QUERY_RESULTS="FETCH_QUERY_RESULTS",r.FLUSH_FILES="FLUSH_FILES",r.GET_FEATURE_FLAGS="GET_FEATURE_FLAGS",r.GET_TABLE_NAMES="GET_TABLE_NAMES",r.GET_VERSION="GET_VERSION",r.GLOB_FILE_INFOS="GLOB_FILE_INFOS",r.INSERT_ARROW_FROM_IPC_STREAM="INSERT_ARROW_FROM_IPC_STREAM",r.INSERT_CSV_FROM_PATH="IMPORT_CSV_FROM_PATH",r.INSERT_JSON_FROM_PATH="IMPORT_JSON_FROM_PATH",r.INSTANTIATE="INSTANTIATE",r.OPEN="OPEN",r.PING="PING",r.POLL_PENDING_QUERY="POLL_PENDING_QUERY",r.REGISTER_FILE_BUFFER="REGISTER_FILE_BUFFER",r.REGISTER_FILE_HANDLE="REGISTER_FILE_HANDLE",r.REGISTER_FILE_URL="REGISTER_FILE_URL",r.RESET="RESET",r.RUN_PREPARED="RUN_PREPARED",r.RUN_QUERY="RUN_QUERY",r.SEND_PREPARED="SEND_PREPARED",r.START_PENDING_QUERY="START_PENDING_QUERY",r.TOKENIZE="TOKENIZE",r))(LD||{}),ND=(r=>(r.CONNECTION_INFO="CONNECTION_INFO",r.ERROR="ERROR",r.FEATURE_FLAGS="FEATURE_FLAGS",r.FILE_BUFFER="FILE_BUFFER",r.FILE_INFOS="FILE_INFOS",r.FILE_SIZE="FILE_SIZE",r.FILE_STATISTICS="FILE_STATISTICS",r.INSTANTIATE_PROGRESS="INSTANTIATE_PROGRESS",r.LOG="LOG",r.OK="OK",r.PREPARED_STATEMENT_ID="PREPARED_STATEMENT_ID",r.QUERY_PLAN="QUERY_PLAN",r.QUERY_RESULT="QUERY_RESULT",r.QUERY_RESULT_CHUNK="QUERY_RESULT_CHUNK",r.QUERY_RESULT_HEADER="QUERY_RESULT_HEADER",r.QUERY_RESULT_HEADER_OR_NULL="QUERY_RESULT_HEADER_OR_NULL",r.REGISTERED_FILE="REGISTERED_FILE",r.SCRIPT_TOKENS="SCRIPT_TOKENS",r.SUCCESS="SUCCESS",r.TABLE_NAMES="TABLE_NAMES",r.VERSION_STRING="VERSION_STRING",r))(ND||{}),de=class{constructor(r,t){this.promiseResolver=()=>{},this.promiseRejecter=()=>{},this.type=r,this.data=t,this.promise=new Promise((e,n)=>{this.promiseResolver=e,this.promiseRejecter=n})}};function Ql(r){switch(r.typeId){case k.Binary:return{sqlType:"binary"};case k.Bool:return{sqlType:"bool"};case k.Date:return{sqlType:"date"};case k.DateDay:return{sqlType:"date32[d]"};case k.DateMillisecond:return{sqlType:"date64[ms]"};case k.Decimal:{let t=r;return{sqlType:"decimal",precision:t.precision,scale:t.scale}}case k.Float:return{sqlType:"float"};case k.Float16:return{sqlType:"float16"};case k.Float32:return{sqlType:"float32"};case k.Float64:return{sqlType:"float64"};case k.Int:return{sqlType:"int32"};case k.Int16:return{sqlType:"int16"};case k.Int32:return{sqlType:"int32"};case k.Int64:return{sqlType:"int64"};case k.Uint16:return{sqlType:"uint16"};case k.Uint32:return{sqlType:"uint32"};case k.Uint64:return{sqlType:"uint64"};case k.Uint8:return{sqlType:"uint8"};case k.IntervalDayTime:return{sqlType:"interval[dt]"};case k.IntervalYearMonth:return{sqlType:"interval[m]"};case k.List:return{sqlType:"list",valueType:Ql(r.valueType)};case k.FixedSizeBinary:return{sqlType:"fixedsizebinary",byteWidth:r.byteWidth};case k.Null:return{sqlType:"null"};case k.Utf8:return{sqlType:"utf8"};case k.Struct:return{sqlType:"struct",fields:r.children.map(t=>af(t.name,t.type))};case k.Map:{let t=r;return{sqlType:"map",keyType:Ql(t.keyType),valueType:Ql(t.valueType)}}case k.Time:return{sqlType:"time[s]"};case k.TimeMicrosecond:return{sqlType:"time[us]"};case k.TimeMillisecond:return{sqlType:"time[ms]"};case k.TimeNanosecond:return{sqlType:"time[ns]"};case k.TimeSecond:return{sqlType:"time[s]"};case k.Timestamp:return{sqlType:"timestamp",timezone:r.timezone||void 0};case k.TimestampSecond:return{sqlType:"timestamp[s]",timezone:r.timezone||void 0};case k.TimestampMicrosecond:return{sqlType:"timestamp[us]",timezone:r.timezone||void 0};case k.TimestampNanosecond:return{sqlType:"timestamp[ns]",timezone:r.timezone||void 0};case k.TimestampMillisecond:return{sqlType:"timestamp[ms]",timezone:r.timezone||void 0}}throw new Error("unsupported arrow type: ".concat(r.toString()))}function af(r,t){let e=Ql(t);return e.name=r,e}var BD=new TextEncoder,UD=class{constructor(r,t=null){this._onInstantiationProgress=[],this._worker=null,this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{},this._nextMessageId=0,this._pendingRequests=new Map,this._logger=r,this._onMessageHandler=this.onMessage.bind(this),this._onErrorHandler=this.onError.bind(this),this._onCloseHandler=this.onClose.bind(this),t!=null&&this.attach(t)}get logger(){return this._logger}attach(r){this._worker=r,this._worker.addEventListener("message",this._onMessageHandler),this._worker.addEventListener("error",this._onErrorHandler),this._worker.addEventListener("close",this._onCloseHandler),this._workerShutdownPromise=new Promise((t,e)=>{this._workerShutdownResolver=t})}detach(){this._worker&&(this._worker.removeEventListener("message",this._onMessageHandler),this._worker.removeEventListener("error",this._onErrorHandler),this._worker.removeEventListener("close",this._onCloseHandler),this._worker=null,this._workerShutdownResolver(null),this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{})}async terminate(){this._worker&&(this._worker.terminate(),this._worker=null,this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{})}async postTask(r,t=[]){if(!this._worker){console.error("cannot send a message since the worker is not set!");return}let e=this._nextMessageId++;return this._pendingRequests.set(e,r),this._worker.postMessage({messageId:e,type:r.type,data:r.data},t),await r.promise}onMessage(r){var t;let e=r.data;switch(e.type){case"LOG":{this._logger.log(e.data);return}case"INSTANTIATE_PROGRESS":{for(let i of this._onInstantiationProgress)i(e.data);return}}let n=this._pendingRequests.get(e.requestId);if(!n){console.warn("unassociated response: [".concat(e.requestId,", ").concat(e.type.toString(),"]"));return}if(this._pendingRequests.delete(e.requestId),e.type=="ERROR"){let i=new Error(e.data.message);i.name=e.data.name,(t=Object.getOwnPropertyDescriptor(i,"stack"))!=null&&t.writable&&(i.stack=e.data.stack),n.promiseRejecter(i);return}switch(n.type){case"CLOSE_PREPARED":case"COLLECT_FILE_STATISTICS":case"REGISTER_OPFS_FILE_NAME":case"COPY_FILE_TO_PATH":case"DISCONNECT":case"DROP_FILE":case"DROP_FILES":case"FLUSH_FILES":case"INSERT_ARROW_FROM_IPC_STREAM":case"IMPORT_CSV_FROM_PATH":case"IMPORT_JSON_FROM_PATH":case"OPEN":case"PING":case"REGISTER_FILE_BUFFER":case"REGISTER_FILE_HANDLE":case"REGISTER_FILE_URL":case"RESET":if(e.type=="OK"){n.promiseResolver(e.data);return}break;case"INSTANTIATE":if(this._onInstantiationProgress=[],e.type=="OK"){n.promiseResolver(e.data);return}break;case"GLOB_FILE_INFOS":if(e.type=="FILE_INFOS"){n.promiseResolver(e.data);return}break;case"GET_VERSION":if(e.type=="VERSION_STRING"){n.promiseResolver(e.data);return}break;case"GET_FEATURE_FLAGS":if(e.type=="FEATURE_FLAGS"){n.promiseResolver(e.data);return}break;case"GET_TABLE_NAMES":if(e.type=="TABLE_NAMES"){n.promiseResolver(e.data);return}break;case"TOKENIZE":if(e.type=="SCRIPT_TOKENS"){n.promiseResolver(e.data);return}break;case"COPY_FILE_TO_BUFFER":if(e.type=="FILE_BUFFER"){n.promiseResolver(e.data);return}break;case"EXPORT_FILE_STATISTICS":if(e.type=="FILE_STATISTICS"){n.promiseResolver(e.data);return}break;case"CONNECT":if(e.type=="CONNECTION_INFO"){n.promiseResolver(e.data);return}break;case"RUN_PREPARED":case"RUN_QUERY":if(e.type=="QUERY_RESULT"){n.promiseResolver(e.data);return}break;case"SEND_PREPARED":if(e.type=="QUERY_RESULT_HEADER"){n.promiseResolver(e.data);return}break;case"START_PENDING_QUERY":if(e.type=="QUERY_RESULT_HEADER_OR_NULL"){n.promiseResolver(e.data);return}break;case"POLL_PENDING_QUERY":if(e.type=="QUERY_RESULT_HEADER_OR_NULL"){n.promiseResolver(e.data);return}break;case"CANCEL_PENDING_QUERY":if(this._onInstantiationProgress=[],e.type=="SUCCESS"){n.promiseResolver(e.data);return}break;case"FETCH_QUERY_RESULTS":if(e.type=="QUERY_RESULT_CHUNK"){n.promiseResolver(e.data);return}break;case"CREATE_PREPARED":if(e.type=="PREPARED_STATEMENT_ID"){n.promiseResolver(e.data);return}break}n.promiseRejecter(new Error("unexpected response type: ".concat(e.type.toString())))}onError(r){console.error(r),console.error("error in duckdb worker: ".concat(r.message)),this._pendingRequests.clear()}onClose(){if(this._workerShutdownResolver(null),this._pendingRequests.size!=0){console.warn("worker terminated with ".concat(this._pendingRequests.size," pending requests"));return}this._pendingRequests.clear()}async reset(){let r=new de("RESET",null);return await this.postTask(r)}async ping(){let r=new de("PING",null);await this.postTask(r)}async dropFile(r){let t=new de("DROP_FILE",r);return await this.postTask(t)}async dropFiles(){let r=new de("DROP_FILES",null);return await this.postTask(r)}async flushFiles(){let r=new de("FLUSH_FILES",null);return await this.postTask(r)}async instantiate(r,t=null,e=n=>{}){this._onInstantiationProgress.push(e);let n=new de("INSTANTIATE",[r,t]);return await this.postTask(n)}async getVersion(){let r=new de("GET_VERSION",null);return await this.postTask(r)}async getFeatureFlags(){let r=new de("GET_FEATURE_FLAGS",null);return await this.postTask(r)}async open(r){let t=new de("OPEN",r);await this.postTask(t)}async tokenize(r){let t=new de("TOKENIZE",r);return await this.postTask(t)}async connectInternal(){let r=new de("CONNECT",null);return await this.postTask(r)}async connect(){let r=await this.connectInternal();return new FD(this,r)}async disconnect(r){let t=new de("DISCONNECT",r);await this.postTask(t)}async runQuery(r,t){let e=new de("RUN_QUERY",[r,t]);return await this.postTask(e)}async startPendingQuery(r,t,e=!1){let n=new de("START_PENDING_QUERY",[r,t,e]);return await this.postTask(n)}async pollPendingQuery(r){let t=new de("POLL_PENDING_QUERY",r);return await this.postTask(t)}async cancelPendingQuery(r){let t=new de("CANCEL_PENDING_QUERY",r);return await this.postTask(t)}async fetchQueryResults(r){let t=new de("FETCH_QUERY_RESULTS",r);return await this.postTask(t)}async getTableNames(r,t){let e=new de("GET_TABLE_NAMES",[r,t]);return await this.postTask(e)}async createPrepared(r,t){let e=new de("CREATE_PREPARED",[r,t]);return await this.postTask(e)}async closePrepared(r,t){let e=new de("CLOSE_PREPARED",[r,t]);await this.postTask(e)}async runPrepared(r,t,e){let n=new de("RUN_PREPARED",[r,t,e]);return await this.postTask(n)}async sendPrepared(r,t,e){let n=new de("SEND_PREPARED",[r,t,e]);return await this.postTask(n)}async globFiles(r){let t=new de("GLOB_FILE_INFOS",r);return await this.postTask(t)}async registerFileText(r,t){let e=BD.encode(t);await this.registerFileBuffer(r,e)}async registerFileURL(r,t,e,n){t===void 0&&(t=r);let i=new de("REGISTER_FILE_URL",[r,t,e,n]);await this.postTask(i)}async registerEmptyFileBuffer(r){}async registerFileBuffer(r,t){let e=new de("REGISTER_FILE_BUFFER",[r,t]);await this.postTask(e,[t.buffer])}async registerFileHandle(r,t,e,n){let i=new de("REGISTER_FILE_HANDLE",[r,t,e,n]);await this.postTask(i,[])}async registerOPFSFileName(r){let t=new de("REGISTER_OPFS_FILE_NAME",[r]);await this.postTask(t,[])}async collectFileStatistics(r,t){let e=new de("COLLECT_FILE_STATISTICS",[r,t]);await this.postTask(e,[])}async exportFileStatistics(r){let t=new de("EXPORT_FILE_STATISTICS",r);return await this.postTask(t,[])}async copyFileToBuffer(r){let t=new de("COPY_FILE_TO_BUFFER",r);return await this.postTask(t)}async copyFileToPath(r,t){let e=new de("COPY_FILE_TO_PATH",[r,t]);await this.postTask(e)}async insertArrowFromIPCStream(r,t,e){if(t.length==0)return;let n=new de("INSERT_ARROW_FROM_IPC_STREAM",[r,t,e]);await this.postTask(n,[t.buffer])}async insertCSVFromPath(r,t,e){if(e.columns!==void 0){let i=[];for(let s in e.columns){let o=e.columns[s];i.push(af(s,o))}e.columnsFlat=i,delete e.columns}let n=new de("IMPORT_CSV_FROM_PATH",[r,t,e]);await this.postTask(n)}async insertJSONFromPath(r,t,e){if(e.columns!==void 0){let i=[];for(let s in e.columns){let o=e.columns[s];i.push(af(s,o))}e.columnsFlat=i,delete e.columns}let n=new de("IMPORT_JSON_FROM_PATH",[r,t,e]);await this.postTask(n)}};function kD(){let r=new TextDecoder;return t=>(typeof SharedArrayBuffer<"u"&&t.buffer instanceof SharedArrayBuffer&&(t=new Uint8Array(t)),r.decode(t))}kD();var zD=(r=>(r[r.BUFFER=0]="BUFFER",r[r.NODE_FS=1]="NODE_FS",r[r.BROWSER_FILEREADER=2]="BROWSER_FILEREADER",r[r.BROWSER_FSACCESS=3]="BROWSER_FSACCESS",r[r.HTTP=4]="HTTP",r[r.S3=5]="S3",r))(zD||{}),VD=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11])),jD=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,6,64,25,11,11])),$D=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),GD=()=>(async r=>{try{return typeof MessageChannel<"u"&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(r)}catch{return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11])),WD={version:"1.29.1-dev68.0"},xp=WD.version.split(".");xp[0];xp[1];xp[2];var HD=()=>typeof navigator>"u",Fh=null,Dh=null,Lh=null,Nh=null,Bh=null;async function XD(){return Fh==null&&(Fh=typeof BigInt64Array<"u"),Dh==null&&(Dh=await jD()),Lh==null&&(Lh=await GD()),Nh==null&&(Nh=await $D()),Bh==null&&(Bh=await VD()),{bigInt64Array:Fh,crossOriginIsolated:HD()||globalThis.crossOriginIsolated||!1,wasmExceptions:Dh,wasmSIMD:Nh,wasmThreads:Lh,wasmBulkMemory:Bh}}async function Ey(r){let t=await XD();if(t.wasmExceptions){if(t.wasmSIMD&&t.wasmThreads&&t.crossOriginIsolated&&r.coi)return{mainModule:r.coi.mainModule,mainWorker:r.coi.mainWorker,pthreadWorker:r.coi.pthreadWorker};if(r.eh)return{mainModule:r.eh.mainModule,mainWorker:r.eh.mainWorker,pthreadWorker:null}}return{mainModule:r.mvp.mainModule,mainWorker:r.mvp.mainWorker,pthreadWorker:null}}TD(ID());const Uh={},wa={};function Ia(r,t){try{const n=(Uh[r]||(Uh[r]=new Intl.DateTimeFormat("en-GB",{timeZone:r,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return n in wa?wa[n]:Ay(n,n.split(":"))}catch{if(r in wa)return wa[r];const e=r==null?void 0:r.match(YD);return e?Ay(r,e.slice(1)):NaN}}const YD=/([+-]\d\d):?(\d\d)?/;function Ay(r,t){const e=+t[0],n=+(t[1]||0);return wa[r]=e>0?e*60+n:e*60-n}class Fr extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Ia(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),zx(this),lf(this)):this.setTime(Date.now())}static tz(t,...e){return e.length?new Fr(...e,t):new Fr(Date.now(),t)}withTimeZone(t){return new Fr(+this,t)}getTimezoneOffset(){return-Ia(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),lf(this),+this}[Symbol.for("constructDateFrom")](t){return new Fr(+new Date(t),this.timeZone)}}const My=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(r=>{if(!My.test(r))return;const t=r.replace(My,"$1UTC");Fr.prototype[t]&&(r.startsWith("get")?Fr.prototype[r]=function(){return this.internal[t]()}:(Fr.prototype[r]=function(){return Date.prototype[t].apply(this.internal,arguments),qD(this),+this},Fr.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),lf(this),+this}))});function lf(r){r.internal.setTime(+r),r.internal.setUTCMinutes(r.internal.getUTCMinutes()-r.getTimezoneOffset())}function qD(r){Date.prototype.setFullYear.call(r,r.internal.getUTCFullYear(),r.internal.getUTCMonth(),r.internal.getUTCDate()),Date.prototype.setHours.call(r,r.internal.getUTCHours(),r.internal.getUTCMinutes(),r.internal.getUTCSeconds(),r.internal.getUTCMilliseconds()),zx(r)}function zx(r){const t=Ia(r.timeZone,r),e=new Date(+r);e.setUTCHours(e.getUTCHours()-1);const n=-new Date(+r).getTimezoneOffset(),i=-new Date(+e).getTimezoneOffset(),s=n-i,o=Date.prototype.getHours.apply(r)!==r.internal.getUTCHours();s&&o&&r.internal.setUTCMinutes(r.internal.getUTCMinutes()+s);const a=n-t;a&&Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+a);const l=Ia(r.timeZone,r),c=-new Date(+r).getTimezoneOffset()-l,h=l!==t,f=c-a;if(h&&f){Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+f);const d=Ia(r.timeZone,r),m=l-d;m&&(r.internal.setUTCMinutes(r.internal.getUTCMinutes()+m),Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+m))}}const QD=new TextDecoder("utf-8"),ZD=r=>QD.decode(r),KD=new TextEncoder,Vx=r=>KD.encode(r),An=r=>typeof r=="function",el=r=>r!=null&&Object(r)===r,JD=r=>el(r)&&An(r.then),jx=r=>el(r)&&An(r[Symbol.iterator]),tL=r=>el(r)&&An(r[Symbol.asyncIterator]),eL=r=>el(r)&&"done"in r&&"value"in r,rL=r=>el(r)&&An(r.clear)&&An(r.bytes)&&An(r.position)&&An(r.setPosition)&&An(r.capacity)&&An(r.getBufferIdentifier)&&An(r.createLong),Sp=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:ArrayBuffer;function nL(r){const t=r[0]?[r[0]]:[];let e,n,i,s;for(let o,a,l=0,u=0,c=r.length;++lc+h.byteLength,0);let i,s,o,a=0,l=-1;const u=Math.min(t||Number.POSITIVE_INFINITY,n);for(const c=e.length;++lur(Int8Array,r),oL=r=>ur(Int16Array,r),aL=r=>ur(Int32Array,r),lL=r=>ur(BigInt64Array,r),uL=r=>ur(Uint8Array,r),cL=r=>ur(Uint16Array,r),hL=r=>ur(Uint32Array,r),dL=r=>ur(BigUint64Array,r),fL=r=>ur(Float32Array,r),pL=r=>ur(Float64Array,r),mL=r=>ur(Uint8ClampedArray,r),cf=r=>(r.next(),r);function*Xn(r,t){const e=function*(i){yield i},n=typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof Sp?e(t):jx(t)?t:e(t);return yield*cf(function*(i){let s=null;do s=i.next(yield ur(r,s));while(!s.done)}(n[Symbol.iterator]())),new r}const gL=r=>Xn(Int8Array,r),yL=r=>Xn(Int16Array,r),vL=r=>Xn(Int32Array,r),_L=r=>Xn(Uint8Array,r),bL=r=>Xn(Uint16Array,r),wL=r=>Xn(Uint32Array,r),xL=r=>Xn(Float32Array,r),SL=r=>Xn(Float64Array,r),TL=r=>Xn(Uint8ClampedArray,r);function mn(r,t){return br(this,arguments,function*(){if(JD(t))return yield Rt(yield Rt(yield*Ss(Bn(mn(r,yield Rt(t))))));const n=function(o){return br(this,arguments,function*(){yield yield Rt(yield Rt(o))})},i=function(o){return br(this,arguments,function*(){yield Rt(yield*Ss(Bn(cf(function*(a){let l=null;do l=a.next(yield l==null?void 0:l.value);while(!l.done)}(o[Symbol.iterator]())))))})},s=typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof Sp?n(t):jx(t)?i(t):tL(t)?t:n(t);return yield Rt(yield*Ss(Bn(cf(function(o){return br(this,arguments,function*(){let a=null;do a=yield Rt(o.next(yield yield Rt(ur(r,a))));while(!a.done)})}(s[Symbol.asyncIterator]()))))),yield Rt(new r)})}const IL=r=>mn(Int8Array,r),EL=r=>mn(Int16Array,r),AL=r=>mn(Int32Array,r),ML=r=>mn(Uint8Array,r),CL=r=>mn(Uint16Array,r),OL=r=>mn(Uint32Array,r),PL=r=>mn(Float32Array,r),RL=r=>mn(Float64Array,r),FL=r=>mn(Uint8ClampedArray,r);function DL(r,t,e){if(r!==0){e=e.slice(0,t);for(let n=-1,i=e.length;++n0)do if(r[e]!==t[e])return!1;while(++eFo(t))}]`:`[${r}]`:ArrayBuffer.isView(r)?`[${r}]`:JSON.stringify(r,(t,e)=>typeof e=="bigint"?`${e}`:e)}const BL=Object.freeze(Object.defineProperty({__proto__:null,valueToString:Fo},Symbol.toStringTag,{value:"Module"}));function pr(r){if(typeof r=="bigint"&&(rNumber.MAX_SAFE_INTEGER))throw new TypeError(`${r} is not safe to convert to a number.`);return Number(r)}function Gx(r,t){return pr(r/t)+pr(r%t)/pr(t)}const Wx=Symbol.for("isArrowBigNum");function gn(r,...t){return t.length===0?Object.setPrototypeOf(ur(this.TypedArray,r),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(r,...t),this.constructor.prototype)}gn.prototype[Wx]=!0;gn.prototype.toJSON=function(){return`"${Do(this)}"`};gn.prototype.valueOf=function(r){return Tp(this,r)};gn.prototype.toString=function(){return Do(this)};gn.prototype[Symbol.toPrimitive]=function(r="default"){switch(r){case"number":return Tp(this);case"string":return Do(this);case"default":return Hx(this)}return Do(this)};function xo(...r){return gn.apply(this,r)}function So(...r){return gn.apply(this,r)}function $a(...r){return gn.apply(this,r)}Object.setPrototypeOf(xo.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(So.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf($a.prototype,Object.create(Uint32Array.prototype));Object.assign(xo.prototype,gn.prototype,{constructor:xo,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array});Object.assign(So.prototype,gn.prototype,{constructor:So,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array});Object.assign($a.prototype,gn.prototype,{constructor:$a,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const UL=BigInt(4294967296)*BigInt(4294967296),kL=UL-BigInt(1);function Tp(r,t){const{buffer:e,byteOffset:n,byteLength:i,signed:s}=r,o=new BigUint64Array(e,n,i/8),a=s&&o.at(-1)&BigInt(1)<=0)return kh(r);t=t.slice();let n=1;for(let s=0;s(r.children=null,r.ArrayType=Array,r.OffsetArrayType=Int32Array,r[Symbol.toStringTag]="DataType"))(Ct.prototype);class Cy extends Ct{constructor(){super(H.Null)}toString(){return"Null"}}Yx=Symbol.toStringTag;Cy[Yx]=(r=>r[Symbol.toStringTag]="Null")(Cy.prototype);class Oy extends Ct{constructor(t,e){super(H.Int),this.isSigned=t,this.bitWidth=e}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:return this.isSigned?Int32Array:Uint32Array;case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}qx=Symbol.toStringTag;Oy[qx]=(r=>(r.isSigned=null,r.bitWidth=null,r[Symbol.toStringTag]="Int"))(Oy.prototype);class Py extends Ct{constructor(t){super(H.Float),this.precision=t}get ArrayType(){switch(this.precision){case Dr.HALF:return Uint16Array;case Dr.SINGLE:return Float32Array;case Dr.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}}Qx=Symbol.toStringTag;Py[Qx]=(r=>(r.precision=null,r[Symbol.toStringTag]="Float"))(Py.prototype);class Ry extends Ct{constructor(){super(H.Binary)}toString(){return"Binary"}}Zx=Symbol.toStringTag;Ry[Zx]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Binary"))(Ry.prototype);class Fy extends Ct{constructor(){super(H.LargeBinary)}toString(){return"LargeBinary"}}Kx=Symbol.toStringTag;Fy[Kx]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeBinary"))(Fy.prototype);class Dy extends Ct{constructor(){super(H.Utf8)}toString(){return"Utf8"}}Jx=Symbol.toStringTag;Dy[Jx]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Utf8"))(Dy.prototype);class Ly extends Ct{constructor(){super(H.LargeUtf8)}toString(){return"LargeUtf8"}}tS=Symbol.toStringTag;Ly[tS]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeUtf8"))(Ly.prototype);class Ny extends Ct{constructor(){super(H.Bool)}toString(){return"Bool"}}eS=Symbol.toStringTag;Ny[eS]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Bool"))(Ny.prototype);class By extends Ct{constructor(t,e,n=128){super(H.Decimal),this.scale=t,this.precision=e,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}}rS=Symbol.toStringTag;By[rS]=(r=>(r.scale=null,r.precision=null,r.ArrayType=Uint32Array,r[Symbol.toStringTag]="Decimal"))(By.prototype);class Uy extends Ct{constructor(t){super(H.Date),this.unit=t}toString(){return`Date${(this.unit+1)*32}<${Bi[this.unit]}>`}get ArrayType(){return this.unit===Bi.DAY?Int32Array:BigInt64Array}}nS=Symbol.toStringTag;Uy[nS]=(r=>(r.unit=null,r[Symbol.toStringTag]="Date"))(Uy.prototype);class ky extends Ct{constructor(t,e){super(H.Time),this.unit=t,this.bitWidth=e}toString(){return`Time${this.bitWidth}<${te[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}}iS=Symbol.toStringTag;ky[iS]=(r=>(r.unit=null,r.bitWidth=null,r[Symbol.toStringTag]="Time"))(ky.prototype);class zy extends Ct{constructor(t,e){super(H.Timestamp),this.unit=t,this.timezone=e}toString(){return`Timestamp<${te[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}}sS=Symbol.toStringTag;zy[sS]=(r=>(r.unit=null,r.timezone=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Timestamp"))(zy.prototype);class Vy extends Ct{constructor(t){super(H.Interval),this.unit=t}toString(){return`Interval<${As[this.unit]}>`}}oS=Symbol.toStringTag;Vy[oS]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Interval"))(Vy.prototype);class jy extends Ct{constructor(t){super(H.Duration),this.unit=t}toString(){return`Duration<${te[this.unit]}>`}}aS=Symbol.toStringTag;jy[aS]=(r=>(r.unit=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Duration"))(jy.prototype);class $y extends Ct{constructor(t){super(H.List),this.children=[t]}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}}lS=Symbol.toStringTag;$y[lS]=(r=>(r.children=null,r[Symbol.toStringTag]="List"))($y.prototype);class hf extends Ct{constructor(t){super(H.Struct),this.children=t}toString(){return`Struct<{${this.children.map(t=>`${t.name}:${t.type}`).join(", ")}}>`}}uS=Symbol.toStringTag;hf[uS]=(r=>(r.children=null,r[Symbol.toStringTag]="Struct"))(hf.prototype);class Gy extends Ct{constructor(t,e,n){super(H.Union),this.mode=t,this.children=n,this.typeIds=e=Int32Array.from(e),this.typeIdToChildIndex=e.reduce((i,s,o)=>(i[s]=o)&&i||i,Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(t=>`${t.type}`).join(" | ")}>`}}cS=Symbol.toStringTag;Gy[cS]=(r=>(r.mode=null,r.typeIds=null,r.children=null,r.typeIdToChildIndex=null,r.ArrayType=Int8Array,r[Symbol.toStringTag]="Union"))(Gy.prototype);class Wy extends Ct{constructor(t){super(H.FixedSizeBinary),this.byteWidth=t}toString(){return`FixedSizeBinary[${this.byteWidth}]`}}hS=Symbol.toStringTag;Wy[hS]=(r=>(r.byteWidth=null,r.ArrayType=Uint8Array,r[Symbol.toStringTag]="FixedSizeBinary"))(Wy.prototype);class Hy extends Ct{constructor(t,e){super(H.FixedSizeList),this.listSize=t,this.children=[e]}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}dS=Symbol.toStringTag;Hy[dS]=(r=>(r.children=null,r.listSize=null,r[Symbol.toStringTag]="FixedSizeList"))(Hy.prototype);class Xy extends Ct{constructor(t,e=!1){var n,i,s;if(super(H.Map),this.children=[t],this.keysSorted=e,t&&(t.name="entries",!((n=t==null?void 0:t.type)===null||n===void 0)&&n.children)){const o=(i=t==null?void 0:t.type)===null||i===void 0?void 0:i.children[0];o&&(o.name="key");const a=(s=t==null?void 0:t.type)===null||s===void 0?void 0:s.children[1];a&&(a.name="value")}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map(t=>`${t.name}:${t.type}`).join(", ")}}>`}}fS=Symbol.toStringTag;Xy[fS]=(r=>(r.children=null,r.keysSorted=null,r[Symbol.toStringTag]="Map_"))(Xy.prototype);const VL=(r=>()=>++r)(-1);class Yy extends Ct{constructor(t,e,n,i){super(H.Dictionary),this.indices=e,this.dictionary=t,this.isOrdered=i||!1,this.id=n==null?VL():pr(n)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}}pS=Symbol.toStringTag;Yy[pS]=(r=>(r.id=null,r.indices=null,r.isOrdered=null,r.dictionary=null,r[Symbol.toStringTag]="Dictionary"))(Yy.prototype);function mS(r){const t=r;switch(r.typeId){case H.Decimal:return r.bitWidth/32;case H.Interval:return 1+t.unit;case H.FixedSizeList:return t.listSize;case H.FixedSizeBinary:return t.byteWidth;default:return 1}}class he{visitMany(t,...e){return t.map((n,i)=>this.visit(n,...e.map(s=>s[i])))}visit(...t){return this.getVisitFn(t[0],!1).apply(this,t)}getVisitFn(t,e=!0){return jL(this,t,e)}getVisitFnByTypeId(t,e=!0){return ao(this,t,e)}visitNull(t,...e){return null}visitBool(t,...e){return null}visitInt(t,...e){return null}visitFloat(t,...e){return null}visitUtf8(t,...e){return null}visitLargeUtf8(t,...e){return null}visitBinary(t,...e){return null}visitLargeBinary(t,...e){return null}visitFixedSizeBinary(t,...e){return null}visitDate(t,...e){return null}visitTimestamp(t,...e){return null}visitTime(t,...e){return null}visitDecimal(t,...e){return null}visitList(t,...e){return null}visitStruct(t,...e){return null}visitUnion(t,...e){return null}visitDictionary(t,...e){return null}visitInterval(t,...e){return null}visitDuration(t,...e){return null}visitFixedSizeList(t,...e){return null}visitMap(t,...e){return null}}function jL(r,t,e=!0){return typeof t=="number"?ao(r,t,e):typeof t=="string"&&t in H?ao(r,H[t],e):t&&t instanceof Ct?ao(r,qy(t),e):t!=null&&t.type&&t.type instanceof Ct?ao(r,qy(t.type),e):ao(r,H.NONE,e)}function ao(r,t,e=!0){let n=null;switch(t){case H.Null:n=r.visitNull;break;case H.Bool:n=r.visitBool;break;case H.Int:n=r.visitInt;break;case H.Int8:n=r.visitInt8||r.visitInt;break;case H.Int16:n=r.visitInt16||r.visitInt;break;case H.Int32:n=r.visitInt32||r.visitInt;break;case H.Int64:n=r.visitInt64||r.visitInt;break;case H.Uint8:n=r.visitUint8||r.visitInt;break;case H.Uint16:n=r.visitUint16||r.visitInt;break;case H.Uint32:n=r.visitUint32||r.visitInt;break;case H.Uint64:n=r.visitUint64||r.visitInt;break;case H.Float:n=r.visitFloat;break;case H.Float16:n=r.visitFloat16||r.visitFloat;break;case H.Float32:n=r.visitFloat32||r.visitFloat;break;case H.Float64:n=r.visitFloat64||r.visitFloat;break;case H.Utf8:n=r.visitUtf8;break;case H.LargeUtf8:n=r.visitLargeUtf8;break;case H.Binary:n=r.visitBinary;break;case H.LargeBinary:n=r.visitLargeBinary;break;case H.FixedSizeBinary:n=r.visitFixedSizeBinary;break;case H.Date:n=r.visitDate;break;case H.DateDay:n=r.visitDateDay||r.visitDate;break;case H.DateMillisecond:n=r.visitDateMillisecond||r.visitDate;break;case H.Timestamp:n=r.visitTimestamp;break;case H.TimestampSecond:n=r.visitTimestampSecond||r.visitTimestamp;break;case H.TimestampMillisecond:n=r.visitTimestampMillisecond||r.visitTimestamp;break;case H.TimestampMicrosecond:n=r.visitTimestampMicrosecond||r.visitTimestamp;break;case H.TimestampNanosecond:n=r.visitTimestampNanosecond||r.visitTimestamp;break;case H.Time:n=r.visitTime;break;case H.TimeSecond:n=r.visitTimeSecond||r.visitTime;break;case H.TimeMillisecond:n=r.visitTimeMillisecond||r.visitTime;break;case H.TimeMicrosecond:n=r.visitTimeMicrosecond||r.visitTime;break;case H.TimeNanosecond:n=r.visitTimeNanosecond||r.visitTime;break;case H.Decimal:n=r.visitDecimal;break;case H.List:n=r.visitList;break;case H.Struct:n=r.visitStruct;break;case H.Union:n=r.visitUnion;break;case H.DenseUnion:n=r.visitDenseUnion||r.visitUnion;break;case H.SparseUnion:n=r.visitSparseUnion||r.visitUnion;break;case H.Dictionary:n=r.visitDictionary;break;case H.Interval:n=r.visitInterval;break;case H.IntervalDayTime:n=r.visitIntervalDayTime||r.visitInterval;break;case H.IntervalYearMonth:n=r.visitIntervalYearMonth||r.visitInterval;break;case H.Duration:n=r.visitDuration;break;case H.DurationSecond:n=r.visitDurationSecond||r.visitDuration;break;case H.DurationMillisecond:n=r.visitDurationMillisecond||r.visitDuration;break;case H.DurationMicrosecond:n=r.visitDurationMicrosecond||r.visitDuration;break;case H.DurationNanosecond:n=r.visitDurationNanosecond||r.visitDuration;break;case H.FixedSizeList:n=r.visitFixedSizeList;break;case H.Map:n=r.visitMap;break}if(typeof n=="function")return n;if(!e)return()=>null;throw new Error(`Unrecognized type '${H[t]}'`)}function qy(r){switch(r.typeId){case H.Null:return H.Null;case H.Int:{const{bitWidth:t,isSigned:e}=r;switch(t){case 8:return e?H.Int8:H.Uint8;case 16:return e?H.Int16:H.Uint16;case 32:return e?H.Int32:H.Uint32;case 64:return e?H.Int64:H.Uint64}return H.Int}case H.Float:switch(r.precision){case Dr.HALF:return H.Float16;case Dr.SINGLE:return H.Float32;case Dr.DOUBLE:return H.Float64}return H.Float;case H.Binary:return H.Binary;case H.LargeBinary:return H.LargeBinary;case H.Utf8:return H.Utf8;case H.LargeUtf8:return H.LargeUtf8;case H.Bool:return H.Bool;case H.Decimal:return H.Decimal;case H.Time:switch(r.unit){case te.SECOND:return H.TimeSecond;case te.MILLISECOND:return H.TimeMillisecond;case te.MICROSECOND:return H.TimeMicrosecond;case te.NANOSECOND:return H.TimeNanosecond}return H.Time;case H.Timestamp:switch(r.unit){case te.SECOND:return H.TimestampSecond;case te.MILLISECOND:return H.TimestampMillisecond;case te.MICROSECOND:return H.TimestampMicrosecond;case te.NANOSECOND:return H.TimestampNanosecond}return H.Timestamp;case H.Date:switch(r.unit){case Bi.DAY:return H.DateDay;case Bi.MILLISECOND:return H.DateMillisecond}return H.Date;case H.Interval:switch(r.unit){case As.DAY_TIME:return H.IntervalDayTime;case As.YEAR_MONTH:return H.IntervalYearMonth}return H.Interval;case H.Duration:switch(r.unit){case te.SECOND:return H.DurationSecond;case te.MILLISECOND:return H.DurationMillisecond;case te.MICROSECOND:return H.DurationMicrosecond;case te.NANOSECOND:return H.DurationNanosecond}return H.Duration;case H.Map:return H.Map;case H.List:return H.List;case H.Struct:return H.Struct;case H.Union:switch(r.mode){case jn.Dense:return H.DenseUnion;case jn.Sparse:return H.SparseUnion}return H.Union;case H.FixedSizeBinary:return H.FixedSizeBinary;case H.FixedSizeList:return H.FixedSizeList;case H.Dictionary:return H.Dictionary}throw new Error(`Unrecognized type '${H[r.typeId]}'`)}he.prototype.visitInt8=null;he.prototype.visitInt16=null;he.prototype.visitInt32=null;he.prototype.visitInt64=null;he.prototype.visitUint8=null;he.prototype.visitUint16=null;he.prototype.visitUint32=null;he.prototype.visitUint64=null;he.prototype.visitFloat16=null;he.prototype.visitFloat32=null;he.prototype.visitFloat64=null;he.prototype.visitDateDay=null;he.prototype.visitDateMillisecond=null;he.prototype.visitTimestampSecond=null;he.prototype.visitTimestampMillisecond=null;he.prototype.visitTimestampMicrosecond=null;he.prototype.visitTimestampNanosecond=null;he.prototype.visitTimeSecond=null;he.prototype.visitTimeMillisecond=null;he.prototype.visitTimeMicrosecond=null;he.prototype.visitTimeNanosecond=null;he.prototype.visitDenseUnion=null;he.prototype.visitSparseUnion=null;he.prototype.visitIntervalDayTime=null;he.prototype.visitIntervalYearMonth=null;he.prototype.visitDuration=null;he.prototype.visitDurationSecond=null;he.prototype.visitDurationMillisecond=null;he.prototype.visitDurationMicrosecond=null;he.prototype.visitDurationNanosecond=null;const gS=new Float64Array(1),Hs=new Uint32Array(gS.buffer);function Ip(r){const t=(r&31744)>>10,e=(r&1023)/1024,n=Math.pow(-1,(r&32768)>>15);switch(t){case 31:return n*(e?Number.NaN:1/0);case 0:return n*(e?6103515625e-14*e:0)}return n*Math.pow(2,t-15)*(1+e)}function yS(r){if(r!==r)return 32256;gS[0]=r;const t=(Hs[1]&2147483648)>>16&65535;let e=Hs[1]&2146435072,n=0;return e>=1089470464?Hs[0]>0?e=31744:(e=(e&2080374784)>>16,n=(Hs[1]&1048575)>>10):e<=1056964608?(n=1048576+(Hs[1]&1048575),n=1048576+(n<<(e>>20)-998)>>21,e=0):(e=e-1056964608>>10,n=(Hs[1]&1048575)+512>>10),t|e|n&65535}const $L=Object.freeze(Object.defineProperty({__proto__:null,float64ToUint16:yS,uint16ToFloat64:Ip},Symbol.toStringTag,{value:"Module"}));class Wt extends he{}function qt(r){return(t,e,n)=>{if(t.setValid(e,n!=null))return r(t,e,n)}}const GL=(r,t,e)=>{r[t]=Math.floor(e/864e5)},vS=(r,t,e,n)=>{if(e+1{const i=r+e;n?t[i>>3]|=1<>3]&=~(1<{r[t]=e},Ep=({values:r},t,e)=>{r[t]=e},_S=({values:r},t,e)=>{r[t]=yS(e)},HL=(r,t,e)=>{switch(r.type.precision){case Dr.HALF:return _S(r,t,e);case Dr.SINGLE:case Dr.DOUBLE:return Ep(r,t,e)}},bS=({values:r},t,e)=>{GL(r,t,e.valueOf())},wS=({values:r},t,e)=>{r[t]=BigInt(e)},XL=({stride:r,values:t},e,n)=>{t.set(n.subarray(0,r),r*e)},xS=({values:r,valueOffsets:t},e,n)=>vS(r,t,e,n),SS=({values:r,valueOffsets:t},e,n)=>vS(r,t,e,Vx(n)),YL=(r,t,e)=>{r.type.unit===Bi.DAY?bS(r,t,e):wS(r,t,e)},TS=({values:r},t,e)=>{r[t]=BigInt(e/1e3)},IS=({values:r},t,e)=>{r[t]=BigInt(e)},ES=({values:r},t,e)=>{r[t]=BigInt(e*1e3)},AS=({values:r},t,e)=>{r[t]=BigInt(e*1e6)},qL=(r,t,e)=>{switch(r.type.unit){case te.SECOND:return TS(r,t,e);case te.MILLISECOND:return IS(r,t,e);case te.MICROSECOND:return ES(r,t,e);case te.NANOSECOND:return AS(r,t,e)}},MS=({values:r},t,e)=>{r[t]=e},CS=({values:r},t,e)=>{r[t]=e},OS=({values:r},t,e)=>{r[t]=e},PS=({values:r},t,e)=>{r[t]=e},QL=(r,t,e)=>{switch(r.type.unit){case te.SECOND:return MS(r,t,e);case te.MILLISECOND:return CS(r,t,e);case te.MICROSECOND:return OS(r,t,e);case te.NANOSECOND:return PS(r,t,e)}},ZL=({values:r,stride:t},e,n)=>{r.set(n.subarray(0,t),t*e)},KL=(r,t,e)=>{const n=r.children[0],i=r.valueOffsets,s=$n.getVisitFn(n);if(Array.isArray(e))for(let o=-1,a=i[t],l=i[t+1];a{const n=r.children[0],{valueOffsets:i}=r,s=$n.getVisitFn(n);let{[t]:o,[t+1]:a}=i;const l=e instanceof Map?e.entries():Object.entries(e);for(const u of l)if(s(n,o,u),++o>=a)break},tN=(r,t)=>(e,n,i,s)=>n&&e(n,r,t[s]),eN=(r,t)=>(e,n,i,s)=>n&&e(n,r,t.get(s)),rN=(r,t)=>(e,n,i,s)=>n&&e(n,r,t.get(i.name)),nN=(r,t)=>(e,n,i,s)=>n&&e(n,r,t[i.name]),iN=(r,t,e)=>{const n=r.type.children.map(s=>$n.getVisitFn(s.type)),i=e instanceof Map?rN(t,e):e instanceof er?eN(t,e):Array.isArray(e)?tN(t,e):nN(t,e);r.type.children.forEach((s,o)=>i(n[o],r.children[o],s,o))},sN=(r,t,e)=>{r.type.mode===jn.Dense?RS(r,t,e):FS(r,t,e)},RS=(r,t,e)=>{const n=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[n];$n.visit(i,r.valueOffsets[t],e)},FS=(r,t,e)=>{const n=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[n];$n.visit(i,t,e)},oN=(r,t,e)=>{var n;(n=r.dictionary)===null||n===void 0||n.set(r.values[t],e)},aN=(r,t,e)=>{r.type.unit===As.DAY_TIME?DS(r,t,e):LS(r,t,e)},DS=({values:r},t,e)=>{r.set(e.subarray(0,2),2*t)},LS=({values:r},t,e)=>{r[t]=e[0]*12+e[1]%12},NS=({values:r},t,e)=>{r[t]=e},BS=({values:r},t,e)=>{r[t]=e},US=({values:r},t,e)=>{r[t]=e},kS=({values:r},t,e)=>{r[t]=e},lN=(r,t,e)=>{switch(r.type.unit){case te.SECOND:return NS(r,t,e);case te.MILLISECOND:return BS(r,t,e);case te.MICROSECOND:return US(r,t,e);case te.NANOSECOND:return kS(r,t,e)}},uN=(r,t,e)=>{const{stride:n}=r,i=r.children[0],s=$n.getVisitFn(i);if(Array.isArray(e))for(let o=-1,a=t*n;++o`${Fo(t)}: ${Fo(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new cN(this[cn],this[To])}}class cN{constructor(t,e){this.childIndex=0,this.children=t.children,this.rowIndex=e,this.childFields=t.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){const t=this.childIndex;return te.name)}has(t,e){return t[cn].type.children.some(n=>n.name===e)}getOwnPropertyDescriptor(t,e){if(t[cn].type.children.some(n=>n.name===e))return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e];const n=t[cn].type.children.findIndex(i=>i.name===e);if(n!==-1){const i=on.visit(t[cn].children[n],t[To]);return Reflect.set(t,e,i),i}}set(t,e,n){const i=t[cn].type.children.findIndex(s=>s.name===e);return i!==-1?($n.visit(t[cn].children[i],t[To],n),Reflect.set(t,e,n)):Reflect.has(t,e)||typeof e=="symbol"?Reflect.set(t,e,n):!1}}const dN=new hN;class Bt extends he{}function Ht(r){return(t,e)=>t.getValid(e)?r(t,e):null}const fN=(r,t)=>864e5*r[t],pN=(r,t)=>null,zS=(r,t,e)=>{if(e+1>=t.length)return null;const n=pr(t[e]),i=pr(t[e+1]);return r.subarray(n,i)},mN=({offset:r,values:t},e)=>{const n=r+e;return(t[n>>3]&1<fN(r,t),jS=({values:r},t)=>pr(r[t]),Vi=({stride:r,values:t},e)=>t[r*e],gN=({stride:r,values:t},e)=>Ip(t[r*e]),$S=({values:r},t)=>r[t],yN=({stride:r,values:t},e)=>t.subarray(r*e,r*(e+1)),GS=({values:r,valueOffsets:t},e)=>zS(r,t,e),WS=({values:r,valueOffsets:t},e)=>{const n=zS(r,t,e);return n!==null?ZD(n):null},vN=({values:r},t)=>r[t],_N=({type:r,values:t},e)=>r.precision!==Dr.HALF?t[e]:Ip(t[e]),bN=(r,t)=>r.type.unit===Bi.DAY?VS(r,t):jS(r,t),HS=({values:r},t)=>1e3*pr(r[t]),XS=({values:r},t)=>pr(r[t]),YS=({values:r},t)=>Gx(r[t],BigInt(1e3)),qS=({values:r},t)=>Gx(r[t],BigInt(1e6)),wN=(r,t)=>{switch(r.type.unit){case te.SECOND:return HS(r,t);case te.MILLISECOND:return XS(r,t);case te.MICROSECOND:return YS(r,t);case te.NANOSECOND:return qS(r,t)}},QS=({values:r},t)=>r[t],ZS=({values:r},t)=>r[t],KS=({values:r},t)=>r[t],JS=({values:r},t)=>r[t],xN=(r,t)=>{switch(r.type.unit){case te.SECOND:return QS(r,t);case te.MILLISECOND:return ZS(r,t);case te.MICROSECOND:return KS(r,t);case te.NANOSECOND:return JS(r,t)}},SN=({values:r,stride:t},e)=>hc.decimal(r.subarray(t*e,t*(e+1))),TN=(r,t)=>{const{valueOffsets:e,stride:n,children:i}=r,{[t*n]:s,[t*n+1]:o}=e,l=i[0].slice(s,o-s);return new er([l])},IN=(r,t)=>{const{valueOffsets:e,children:n}=r,{[t]:i,[t+1]:s}=e,o=n[0];return new Mp(o.slice(i,s-i))},EN=(r,t)=>new Ap(r,t),AN=(r,t)=>r.type.mode===jn.Dense?tT(r,t):eT(r,t),tT=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[e];return on.visit(n,r.valueOffsets[t])},eT=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[e];return on.visit(n,t)},MN=(r,t)=>{var e;return(e=r.dictionary)===null||e===void 0?void 0:e.get(r.values[t])},CN=(r,t)=>r.type.unit===As.DAY_TIME?rT(r,t):nT(r,t),rT=({values:r},t)=>r.subarray(2*t,2*(t+1)),nT=({values:r},t)=>{const e=r[t],n=new Int32Array(2);return n[0]=Math.trunc(e/12),n[1]=Math.trunc(e%12),n},iT=({values:r},t)=>r[t],sT=({values:r},t)=>r[t],oT=({values:r},t)=>r[t],aT=({values:r},t)=>r[t],ON=(r,t)=>{switch(r.type.unit){case te.SECOND:return iT(r,t);case te.MILLISECOND:return sT(r,t);case te.MICROSECOND:return oT(r,t);case te.NANOSECOND:return aT(r,t)}},PN=(r,t)=>{const{stride:e,children:n}=r,s=n[0].slice(t*e,e);return new er([s])};Bt.prototype.visitNull=Ht(pN);Bt.prototype.visitBool=Ht(mN);Bt.prototype.visitInt=Ht(vN);Bt.prototype.visitInt8=Ht(Vi);Bt.prototype.visitInt16=Ht(Vi);Bt.prototype.visitInt32=Ht(Vi);Bt.prototype.visitInt64=Ht($S);Bt.prototype.visitUint8=Ht(Vi);Bt.prototype.visitUint16=Ht(Vi);Bt.prototype.visitUint32=Ht(Vi);Bt.prototype.visitUint64=Ht($S);Bt.prototype.visitFloat=Ht(_N);Bt.prototype.visitFloat16=Ht(gN);Bt.prototype.visitFloat32=Ht(Vi);Bt.prototype.visitFloat64=Ht(Vi);Bt.prototype.visitUtf8=Ht(WS);Bt.prototype.visitLargeUtf8=Ht(WS);Bt.prototype.visitBinary=Ht(GS);Bt.prototype.visitLargeBinary=Ht(GS);Bt.prototype.visitFixedSizeBinary=Ht(yN);Bt.prototype.visitDate=Ht(bN);Bt.prototype.visitDateDay=Ht(VS);Bt.prototype.visitDateMillisecond=Ht(jS);Bt.prototype.visitTimestamp=Ht(wN);Bt.prototype.visitTimestampSecond=Ht(HS);Bt.prototype.visitTimestampMillisecond=Ht(XS);Bt.prototype.visitTimestampMicrosecond=Ht(YS);Bt.prototype.visitTimestampNanosecond=Ht(qS);Bt.prototype.visitTime=Ht(xN);Bt.prototype.visitTimeSecond=Ht(QS);Bt.prototype.visitTimeMillisecond=Ht(ZS);Bt.prototype.visitTimeMicrosecond=Ht(KS);Bt.prototype.visitTimeNanosecond=Ht(JS);Bt.prototype.visitDecimal=Ht(SN);Bt.prototype.visitList=Ht(TN);Bt.prototype.visitStruct=Ht(EN);Bt.prototype.visitUnion=Ht(AN);Bt.prototype.visitDenseUnion=Ht(tT);Bt.prototype.visitSparseUnion=Ht(eT);Bt.prototype.visitDictionary=Ht(MN);Bt.prototype.visitInterval=Ht(CN);Bt.prototype.visitIntervalDayTime=Ht(rT);Bt.prototype.visitIntervalYearMonth=Ht(nT);Bt.prototype.visitDuration=Ht(ON);Bt.prototype.visitDurationSecond=Ht(iT);Bt.prototype.visitDurationMillisecond=Ht(sT);Bt.prototype.visitDurationMicrosecond=Ht(oT);Bt.prototype.visitDurationNanosecond=Ht(aT);Bt.prototype.visitFixedSizeList=Ht(PN);Bt.prototype.visitMap=Ht(IN);const on=new Bt,lo=Symbol.for("keys"),Io=Symbol.for("vals"),uo=Symbol.for("kKeysAsStrings"),df=Symbol.for("_kKeysAsStrings");class Mp{constructor(t){return this[lo]=new er([t.children[0]]).memoize(),this[Io]=t.children[1],new Proxy(this,new FN)}get[uo](){return this[df]||(this[df]=Array.from(this[lo].toArray(),String))}[Symbol.iterator](){return new RN(this[lo],this[Io])}get size(){return this[lo].length}toArray(){return Object.values(this.toJSON())}toJSON(){const t=this[lo],e=this[Io],n={};for(let i=-1,s=t.length;++i`${Fo(t)}: ${Fo(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}}class RN{constructor(t,e){this.keys=t,this.vals=e,this.keyIndex=0,this.numKeys=t.length}[Symbol.iterator](){return this}next(){const t=this.keyIndex;return t===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(t),on.visit(this.vals,t)]})}}class FN{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(t){return t[uo]}has(t,e){return t[uo].includes(e)}getOwnPropertyDescriptor(t,e){if(t[uo].indexOf(e)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e];const n=t[uo].indexOf(e);if(n!==-1){const i=on.visit(Reflect.get(t,Io),n);return Reflect.set(t,e,i),i}}set(t,e,n){const i=t[uo].indexOf(e);return i!==-1?($n.visit(Reflect.get(t,Io),i,n),Reflect.set(t,e,n)):Reflect.has(t,e)?Reflect.set(t,e,n):!1}}Object.defineProperties(Mp.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[lo]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Io]:{writable:!0,enumerable:!1,configurable:!1,value:null},[df]:{writable:!0,enumerable:!1,configurable:!1,value:null}});let Qy;function lT(r,t,e,n){const{length:i=0}=r;let s=typeof t!="number"?0:t,o=typeof e!="number"?i:e;return s<0&&(s=(s%i+i)%i),o<0&&(o=(o%i+i)%i),oi&&(o=i),n?n(r,s,o):[s,o]}const uT=(r,t)=>r<0?t+r:r,Zy=r=>r!==r;function Ds(r){if(typeof r!=="object"||r===null)return Zy(r)?Zy:e=>e===r;if(r instanceof Date){const e=r.valueOf();return n=>n instanceof Date?n.valueOf()===e:!1}return ArrayBuffer.isView(r)?e=>e?$x(r,e):!1:r instanceof Map?LN(r):Array.isArray(r)?DN(r):r instanceof er?NN(r):BN(r,!0)}function DN(r){const t=[];for(let e=-1,n=r.length;++e!1;const n=[];for(let i=-1,s=e.length;++i{if(!e||typeof e!="object")return!1;switch(e.constructor){case Array:return UN(r,e);case Map:return Ky(r,e,e.keys());case Mp:case Ap:case Object:case void 0:return Ky(r,e,t||Object.keys(e))}return e instanceof er?kN(r,e):!1}}function UN(r,t){const e=r.length;if(t.length!==e)return!1;for(let n=-1;++n>n}function VN(r,t,e){return e?!!(r[t>>3]|=1<>3]&=~(1<0||e.byteLength>3):hT(new fc(e,r,t,null,Cp)).subarray(0,n)),i}return e}function hT(r){const t=[];let e=0,n=0,i=0;for(const o of r)o&&(i|=1<0)&&(t[e++]=i);const s=new Uint8Array(t.length+7&-8);return s.set(t),s}class fc{constructor(t,e,n,i,s){this.bytes=t,this.length=n,this.context=i,this.get=s,this.bit=e%8,this.byteIndex=e>>3,this.byte=t[this.byteIndex++],this.index=0}next(){return this.index>3<<3,i=t+(t%8===0?0:8-t%8);return ju(r,t,i)+ju(r,n,e)+dT(r,i>>3,n-i>>3)}function dT(r,t,e){let n=0,i=Math.trunc(t);const s=new DataView(r.buffer,r.byteOffset,r.byteLength),o=e===void 0?r.byteLength:i+e;for(;o-i>=4;)n+=Zl(s.getUint32(i)),i+=4;for(;o-i>=2;)n+=Zl(s.getUint16(i)),i+=2;for(;o-i>=1;)n+=Zl(s.getUint8(i)),i+=1;return n}function Zl(r){let t=Math.trunc(r);return t=t-(t>>>1&1431655765),t=(t&858993459)+(t>>>2&858993459),(t+(t>>>4)&252645135)*16843009>>>24}const jN=Object.freeze(Object.defineProperty({__proto__:null,BitIterator:fc,getBit:cT,getBool:Cp,packBools:hT,popcnt_array:dT,popcnt_bit_range:ju,popcnt_uint32:Zl,setBool:VN,truncateBitmap:ff},Symbol.toStringTag,{value:"Module"})),$N=-1;class Ga{get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get nullable(){if(this._nullCount!==0){const{type:t}=this;return Ct.isSparseUnion(t)?this.children.some(e=>e.nullable):Ct.isDenseUnion(t)?this.children.some(e=>e.nullable):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let t=0;const{valueOffsets:e,values:n,nullBitmap:i,typeIds:s}=this;return e&&(t+=e.byteLength),n&&(t+=n.byteLength),i&&(t+=i.byteLength),s&&(t+=s.byteLength),this.children.reduce((o,a)=>o+a.byteLength,t)}get nullCount(){if(Ct.isUnion(this.type))return this.children.reduce((n,i)=>n+i.nullCount,0);let t=this._nullCount,e;return t<=$N&&(e=this.nullBitmap)&&(this._nullCount=t=e.length===0?0:this.length-ju(e,this.offset,this.offset+this.length)),t}constructor(t,e,n,i,s,o=[],a){this.type=t,this.children=o,this.dictionary=a,this.offset=Math.floor(Math.max(e||0,0)),this.length=Math.floor(Math.max(n||0,0)),this._nullCount=Math.floor(Math.max(i||0,-1));let l;s instanceof Ga?(this.stride=s.stride,this.values=s.values,this.typeIds=s.typeIds,this.nullBitmap=s.nullBitmap,this.valueOffsets=s.valueOffsets):(this.stride=mS(t),s&&((l=s[0])&&(this.valueOffsets=l),(l=s[1])&&(this.values=l),(l=s[2])&&(this.nullBitmap=l),(l=s[3])&&(this.typeIds=l)))}getValid(t){const{type:e}=this;if(Ct.isUnion(e)){const n=e,i=this.children[n.typeIdToChildIndex[this.typeIds[t]]],s=n.mode===jn.Dense?this.valueOffsets[t]:t;return i.getValid(s)}if(this.nullable&&this.nullCount>0){const n=this.offset+t;return(this.nullBitmap[n>>3]&1<>3;(!s||s.byteLength<=c)&&(s=new Uint8Array((o+a+63&-64)>>3).fill(255),this.nullCount>0?(s.set(ff(o,a,this.nullBitmap),0),Object.assign(this,{nullBitmap:s})):Object.assign(this,{nullBitmap:s,_nullCount:0}));const h=s[c];n=(h&u)!==0,s[c]=e?h|u:h&~u}return n!==!!e&&(this._nullCount=this.nullCount+(e?-1:1)),e}clone(t=this.type,e=this.offset,n=this.length,i=this._nullCount,s=this,o=this.children){return new Ga(t,e,n,i,s,o,this.dictionary)}slice(t,e){const{stride:n,typeId:i,children:s}=this,o=+(this._nullCount===0)-1,a=i===16?n:1,l=this._sliceBuffers(t,e,n,i);return this.clone(this.type,this.offset+t,e,o,l,s.length===0||this.valueOffsets?s:this._sliceChildren(s,a*t,a*e))}_changeLengthAndBackfillNullBitmap(t){if(this.typeId===H.Null)return this.clone(this.type,0,t,0);const{length:e,nullCount:n}=this,i=new Uint8Array((t+63&-64)>>3).fill(255,0,e>>3);i[e>>3]=(1<0&&i.set(ff(this.offset,e,this.nullBitmap),0);const s=this.buffers;return s[si.VALIDITY]=i,this.clone(this.type,0,t,n+(t-e),s)}_sliceBuffers(t,e,n,i){let s;const{buffers:o}=this;return(s=o[si.TYPE])&&(o[si.TYPE]=s.subarray(t,t+e)),(s=o[si.OFFSET])&&(o[si.OFFSET]=s.subarray(t,t+e+1))||(s=o[si.DATA])&&(o[si.DATA]=i===6?s:s.subarray(n*t,n*(t+e))),o}_sliceChildren(t,e,n){return t.map(i=>i.slice(e,n))}}Ga.prototype.children=Object.freeze([]);class Jy{constructor(t=0,e){this.numChunks=t,this.getChunkIterator=e,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndext.nullable)}function WN(r){return r.reduce((t,e)=>t+e.nullCount,0)}function HN(r){return r.reduce((t,e,n)=>(t[n+1]=t[n]+e.length,t),new Uint32Array(r.length+1))}function XN(r,t,e,n){const i=[];for(let s=-1,o=r.length;++s=n)break;if(e>=l+u)continue;if(l>=e&&l+u<=n){i.push(a);continue}const c=Math.max(0,e-l),h=Math.min(n-l,u);i.push(a.slice(c,h-c))}return i.length===0&&i.push(r[0].slice(0,0)),i}function Op(r,t,e,n){let i=0,s=0,o=t.length-1;do{if(i>=o-1)return e0?0:-1}function ZN(r,t){const{nullBitmap:e}=r;if(!e||r.nullCount<=0)return-1;let n=0;for(const i of new fc(e,r.offset+(t||0),r.length,e,Cp)){if(!i)return n;++n}return-1}function Kt(r,t,e){if(t===void 0)return-1;if(t===null)switch(r.typeId){case H.Union:break;case H.Dictionary:break;default:return ZN(r,e)}const n=on.getVisitFn(r),i=Ds(t);for(let s=(e||0)-1,o=r.length;++s{const i=r.data[n];return i.values.subarray(0,i.length)[Symbol.iterator]()});let e=0;return new Jy(r.data.length,n=>{const s=r.data[n].length,o=r.slice(e,e+s);return e+=s,new KN(o)})}class KN{constructor(t){this.vector=t,this.index=0}next(){return this.indexa.data):t;if(s.length===0||s.some(a=>!(a instanceof Ga)))throw new TypeError("Vector constructor expects an Array of Data instances.");const o=(e=s[0])===null||e===void 0?void 0:e.type;switch(s.length){case 0:this._offsets=[0];break;case 1:{const{get:a,set:l,indexOf:u}=gT[o.typeId],c=s[0];this.isValid=h=>fT(c,h),this.get=h=>a(c,h),this.set=(h,f)=>l(c,h,f),this.indexOf=h=>u(c,h),this._offsets=[0,c.length];break}default:Object.setPrototypeOf(this,yT[o.typeId]),this._offsets=HN(s);break}this.data=s,this.type=o,this.stride=mS(o),this.numChildren=(i=(n=o.children)===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce((t,e)=>t+e.byteLength,0)}get nullable(){return GN(this.data)}get nullCount(){return WN(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${H[this.type.typeId]}Vector`}isValid(t){return!1}get(t){return null}at(t){return this.get(uT(t,this.length))}set(t,e){}indexOf(t,e){return-1}includes(t,e){return this.indexOf(t,e)>-1}[Symbol.iterator](){return JN.visit(this)}concat(...t){return new er(this.data.concat(t.flatMap(e=>e.data).flat(Number.POSITIVE_INFINITY)))}slice(t,e){return new er(lT(this,t,e,({data:n,_offsets:i},s,o)=>XN(n,i,s,o)))}toJSON(){return[...this]}toArray(){const{type:t,data:e,length:n,stride:i,ArrayType:s}=this;switch(t.typeId){case H.Int:case H.Float:case H.Decimal:case H.Time:case H.Timestamp:switch(e.length){case 0:return new s;case 1:return e[0].values.subarray(0,n*i);default:return e.reduce((o,{values:a,length:l})=>(o.array.set(a.subarray(0,l*i),o.offset),o.offset+=l*i,o),{array:new s(n*i),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(",")}]`}getChild(t){var e;return this.getChildAt((e=this.type.children)===null||e===void 0?void 0:e.findIndex(n=>n.name===t))}getChildAt(t){return t>-1&&te[t])):null}get isMemoized(){return Ct.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(Ct.isDictionary(this.type)){const t=new $u(this.data[0].dictionary),e=this.data.map(n=>{const i=n.clone();return i.dictionary=t,i});return new er(e)}return new $u(this)}unmemoize(){if(Ct.isDictionary(this.type)&&this.isMemoized){const t=this.data[0].dictionary.unmemoize(),e=this.data.map(n=>{const i=n.clone();return i.dictionary=t,i});return new er(e)}return this}}mT=Symbol.toStringTag;er[mT]=(r=>{r.type=Ct.prototype,r.data=[],r.length=0,r.stride=1,r.numChildren=0,r._offsets=new Uint32Array([0]),r[Symbol.isConcatSpreadable]=!0;const t=Object.keys(H).map(e=>H[e]).filter(e=>typeof e=="number"&&e!==H.NONE);for(const e of t){const n=on.getVisitFnByTypeId(e),i=$n.getVisitFnByTypeId(e),s=ev.getVisitFnByTypeId(e);gT[e]={get:n,set:i,indexOf:s},yT[e]=Object.create(r,{isValid:{value:tv(fT)},get:{value:tv(on.getVisitFnByTypeId(e))},set:{value:YN($n.getVisitFnByTypeId(e))},indexOf:{value:qN(ev.getVisitFnByTypeId(e))}})}return"Vector"})(er.prototype);class $u extends er{constructor(t){super(t.data);const e=this.get,n=this.set,i=this.slice,s=new Array(this.length);Object.defineProperty(this,"get",{value(o){const a=s[o];if(a!==void 0)return a;const l=e.call(this,o);return s[o]=l,l}}),Object.defineProperty(this,"set",{value(o,a){n.call(this,o,a),s[o]=a}}),Object.defineProperty(this,"slice",{value:(o,a)=>new $u(i.call(this,o,a))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new er(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}}const tB=65536;function po(r){return r<0&&(r=4294967295+r+1),`0x${r.toString(16)}`}const Lo=8,Pp=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8];class Rp{constructor(t){this.buffer=t}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(t){const e=new Uint32Array([this.buffer[1]>>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),n=new Uint32Array([t.buffer[1]>>>16,t.buffer[1]&65535,t.buffer[0]>>>16,t.buffer[0]&65535]);let i=e[3]*n[3];this.buffer[0]=i&65535;let s=i>>>16;return i=e[2]*n[3],s+=i,i=e[3]*n[2]>>>0,s+=i,this.buffer[0]+=s<<16,this.buffer[1]=s>>>0>>16,this.buffer[1]+=e[1]*n[3]+e[2]*n[2]+e[3]*n[1],this.buffer[1]+=e[0]*n[3]+e[1]*n[2]+e[2]*n[1]+e[3]*n[0]<<16,this}_plus(t){const e=this.buffer[0]+t.buffer[0]>>>0;this.buffer[1]+=t.buffer[1],e>>0&&++this.buffer[1],this.buffer[0]=e}lessThan(t){return this.buffer[1]>>0,e[2]=this.buffer[2]+t.buffer[2]>>>0,e[1]=this.buffer[1]+t.buffer[1]>>>0,e[0]=this.buffer[0]+t.buffer[0]>>>0,e[0]>>0&&++e[1],e[1]>>0&&++e[2],e[2]>>0&&++e[3],this.buffer[3]=e[3],this.buffer[2]=e[2],this.buffer[1]=e[1],this.buffer[0]=e[0],this}hex(){return`${po(this.buffer[3])} ${po(this.buffer[2])} ${po(this.buffer[1])} ${po(this.buffer[0])}`}static multiply(t,e){return new En(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new En(new Uint32Array(t.buffer)).plus(e)}static from(t,e=new Uint32Array(4)){return En.fromString(typeof t=="string"?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(4)){return En.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(4)){const n=t.startsWith("-"),i=t.length,s=new En(e);for(let o=n?1:0;othis.compareFields(n,e[i]))}compareFields(t,e){return t===e||e instanceof t.constructor&&t.name===e.name&&t.nullable===e.nullable&&this.visit(t.type,e.type)}}function gr(r,t){return t instanceof r.constructor}function Ls(r,t){return r===t||gr(r,t)}function mi(r,t){return r===t||gr(r,t)&&r.bitWidth===t.bitWidth&&r.isSigned===t.isSigned}function pc(r,t){return r===t||gr(r,t)&&r.precision===t.precision}function rB(r,t){return r===t||gr(r,t)&&r.byteWidth===t.byteWidth}function Fp(r,t){return r===t||gr(r,t)&&r.unit===t.unit}function rl(r,t){return r===t||gr(r,t)&&r.unit===t.unit&&r.timezone===t.timezone}function nl(r,t){return r===t||gr(r,t)&&r.unit===t.unit&&r.bitWidth===t.bitWidth}function nB(r,t){return r===t||gr(r,t)&&r.children.length===t.children.length&&Gn.compareManyFields(r.children,t.children)}function iB(r,t){return r===t||gr(r,t)&&r.children.length===t.children.length&&Gn.compareManyFields(r.children,t.children)}function Dp(r,t){return r===t||gr(r,t)&&r.mode===t.mode&&r.typeIds.every((e,n)=>e===t.typeIds[n])&&Gn.compareManyFields(r.children,t.children)}function sB(r,t){return r===t||gr(r,t)&&r.id===t.id&&r.isOrdered===t.isOrdered&&Gn.visit(r.indices,t.indices)&&Gn.visit(r.dictionary,t.dictionary)}function Lp(r,t){return r===t||gr(r,t)&&r.unit===t.unit}function il(r,t){return r===t||gr(r,t)&&r.unit===t.unit}function oB(r,t){return r===t||gr(r,t)&&r.listSize===t.listSize&&r.children.length===t.children.length&&Gn.compareManyFields(r.children,t.children)}function aB(r,t){return r===t||gr(r,t)&&r.keysSorted===t.keysSorted&&r.children.length===t.children.length&&Gn.compareManyFields(r.children,t.children)}zt.prototype.visitNull=Ls;zt.prototype.visitBool=Ls;zt.prototype.visitInt=mi;zt.prototype.visitInt8=mi;zt.prototype.visitInt16=mi;zt.prototype.visitInt32=mi;zt.prototype.visitInt64=mi;zt.prototype.visitUint8=mi;zt.prototype.visitUint16=mi;zt.prototype.visitUint32=mi;zt.prototype.visitUint64=mi;zt.prototype.visitFloat=pc;zt.prototype.visitFloat16=pc;zt.prototype.visitFloat32=pc;zt.prototype.visitFloat64=pc;zt.prototype.visitUtf8=Ls;zt.prototype.visitLargeUtf8=Ls;zt.prototype.visitBinary=Ls;zt.prototype.visitLargeBinary=Ls;zt.prototype.visitFixedSizeBinary=rB;zt.prototype.visitDate=Fp;zt.prototype.visitDateDay=Fp;zt.prototype.visitDateMillisecond=Fp;zt.prototype.visitTimestamp=rl;zt.prototype.visitTimestampSecond=rl;zt.prototype.visitTimestampMillisecond=rl;zt.prototype.visitTimestampMicrosecond=rl;zt.prototype.visitTimestampNanosecond=rl;zt.prototype.visitTime=nl;zt.prototype.visitTimeSecond=nl;zt.prototype.visitTimeMillisecond=nl;zt.prototype.visitTimeMicrosecond=nl;zt.prototype.visitTimeNanosecond=nl;zt.prototype.visitDecimal=Ls;zt.prototype.visitList=nB;zt.prototype.visitStruct=iB;zt.prototype.visitUnion=Dp;zt.prototype.visitDenseUnion=Dp;zt.prototype.visitSparseUnion=Dp;zt.prototype.visitDictionary=sB;zt.prototype.visitInterval=Lp;zt.prototype.visitIntervalDayTime=Lp;zt.prototype.visitIntervalYearMonth=Lp;zt.prototype.visitDuration=il;zt.prototype.visitDurationSecond=il;zt.prototype.visitDurationMillisecond=il;zt.prototype.visitDurationMicrosecond=il;zt.prototype.visitDurationNanosecond=il;zt.prototype.visitFixedSizeList=oB;zt.prototype.visitMap=aB;const Gn=new zt;function lB(r,t){return Gn.compareSchemas(r,t)}function uB(r,t){return Gn.compareFields(r,t)}function cB(r,t){return Gn.visit(r,t)}const rv=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},zL),eB),jN),$L),LL),zN),BL),{compareSchemas:lB,compareFields:uB,compareTypes:cB}),vT=6048e5,hB=864e5,nv=Symbol.for("constructDateFrom");function ui(r,t){return typeof r=="function"?r(t):r&&typeof r=="object"&&nv in r?r[nv](t):r instanceof Date?new r.constructor(t):new Date(t)}function an(r,t){return ui(t||r,r)}let dB={};function mc(){return dB}function Wa(r,t){var a,l,u,c;const e=mc(),n=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??e.weekStartsOn??((c=(u=e.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,i=an(r,t==null?void 0:t.in),s=i.getDay(),o=(s=s.getTime()?n+1:e.getTime()>=a.getTime()?n:n-1}function iv(r){const t=an(r),e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+r-+e}function fB(r,...t){const e=ui.bind(null,t.find(n=>typeof n=="object"));return t.map(e)}function sv(r,t){const e=an(r,t==null?void 0:t.in);return e.setHours(0,0,0,0),e}function pB(r,t,e){const[n,i]=fB(e==null?void 0:e.in,r,t),s=sv(n),o=sv(i),a=+s-iv(s),l=+o-iv(o);return Math.round((a-l)/hB)}function mB(r,t){const e=_T(r,t),n=ui(r,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),Gu(n)}function gB(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function yB(r){return!(!gB(r)&&typeof r!="number"||isNaN(+an(r)))}function vB(r,t){const e=an(r,t==null?void 0:t.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const _B={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},bB=(r,t,e)=>{let n;const i=_B[r];return typeof i=="string"?n=i:t===1?n=i.one:n=i.other.replace("{{count}}",t.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+n:n+" ago":n};function zh(r){return(t={})=>{const e=t.width?String(t.width):r.defaultWidth;return r.formats[e]||r.formats[r.defaultWidth]}}const wB={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},xB={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},SB={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},TB={date:zh({formats:wB,defaultWidth:"full"}),time:zh({formats:xB,defaultWidth:"full"}),dateTime:zh({formats:SB,defaultWidth:"full"})},IB={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},EB=(r,t,e,n)=>IB[r];function sa(r){return(t,e)=>{const n=e!=null&&e.context?String(e.context):"standalone";let i;if(n==="formatting"&&r.formattingValues){const o=r.defaultFormattingWidth||r.defaultWidth,a=e!=null&&e.width?String(e.width):o;i=r.formattingValues[a]||r.formattingValues[o]}else{const o=r.defaultWidth,a=e!=null&&e.width?String(e.width):r.defaultWidth;i=r.values[a]||r.values[o]}const s=r.argumentCallback?r.argumentCallback(t):t;return i[s]}}const AB={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},MB={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},CB={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},OB={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},PB={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},RB={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},FB=(r,t)=>{const e=Number(r),n=e%100;if(n>20||n<10)switch(n%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},DB={ordinalNumber:FB,era:sa({values:AB,defaultWidth:"wide"}),quarter:sa({values:MB,defaultWidth:"wide",argumentCallback:r=>r-1}),month:sa({values:CB,defaultWidth:"wide"}),day:sa({values:OB,defaultWidth:"wide"}),dayPeriod:sa({values:PB,defaultWidth:"wide",formattingValues:RB,defaultFormattingWidth:"wide"})};function oa(r){return(t,e={})=>{const n=e.width,i=n&&r.matchPatterns[n]||r.matchPatterns[r.defaultMatchWidth],s=t.match(i);if(!s)return null;const o=s[0],a=n&&r.parsePatterns[n]||r.parsePatterns[r.defaultParseWidth],l=Array.isArray(a)?NB(a,h=>h.test(o)):LB(a,h=>h.test(o));let u;u=r.valueCallback?r.valueCallback(l):l,u=e.valueCallback?e.valueCallback(u):u;const c=t.slice(o.length);return{value:u,rest:c}}}function LB(r,t){for(const e in r)if(Object.prototype.hasOwnProperty.call(r,e)&&t(r[e]))return e}function NB(r,t){for(let e=0;e{const n=t.match(r.matchPattern);if(!n)return null;const i=n[0],s=t.match(r.parsePattern);if(!s)return null;let o=r.valueCallback?r.valueCallback(s[0]):s[0];o=e.valueCallback?e.valueCallback(o):o;const a=t.slice(i.length);return{value:o,rest:a}}}const UB=/^(\d+)(th|st|nd|rd)?/i,kB=/\d+/i,zB={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},VB={any:[/^b/i,/^(a|c)/i]},jB={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},$B={any:[/1/i,/2/i,/3/i,/4/i]},GB={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},WB={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},HB={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},XB={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},YB={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},qB={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},QB={ordinalNumber:BB({matchPattern:UB,parsePattern:kB,valueCallback:r=>parseInt(r,10)}),era:oa({matchPatterns:zB,defaultMatchWidth:"wide",parsePatterns:VB,defaultParseWidth:"any"}),quarter:oa({matchPatterns:jB,defaultMatchWidth:"wide",parsePatterns:$B,defaultParseWidth:"any",valueCallback:r=>r+1}),month:oa({matchPatterns:GB,defaultMatchWidth:"wide",parsePatterns:WB,defaultParseWidth:"any"}),day:oa({matchPatterns:HB,defaultMatchWidth:"wide",parsePatterns:XB,defaultParseWidth:"any"}),dayPeriod:oa({matchPatterns:YB,defaultMatchWidth:"any",parsePatterns:qB,defaultParseWidth:"any"})},ZB={code:"en-US",formatDistance:bB,formatLong:TB,formatRelative:EB,localize:DB,match:QB,options:{weekStartsOn:0,firstWeekContainsDate:1}};function KB(r,t){const e=an(r,t==null?void 0:t.in);return pB(e,vB(e))+1}function JB(r,t){const e=an(r,t==null?void 0:t.in),n=+Gu(e)-+mB(e);return Math.round(n/vT)+1}function bT(r,t){var c,h,f,d;const e=an(r,t==null?void 0:t.in),n=e.getFullYear(),i=mc(),s=(t==null?void 0:t.firstWeekContainsDate)??((h=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:h.firstWeekContainsDate)??i.firstWeekContainsDate??((d=(f=i.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??1,o=ui((t==null?void 0:t.in)||r,0);o.setFullYear(n+1,0,s),o.setHours(0,0,0,0);const a=Wa(o,t),l=ui((t==null?void 0:t.in)||r,0);l.setFullYear(n,0,s),l.setHours(0,0,0,0);const u=Wa(l,t);return+e>=+a?n+1:+e>=+u?n:n-1}function tU(r,t){var a,l,u,c;const e=mc(),n=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??e.firstWeekContainsDate??((c=(u=e.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,i=bT(r,t),s=ui((t==null?void 0:t.in)||r,0);return s.setFullYear(i,0,n),s.setHours(0,0,0,0),Wa(s,t)}function eU(r,t){const e=an(r,t==null?void 0:t.in),n=+Wa(e,t)-+tU(e,t);return Math.round(n/vT)+1}function we(r,t){const e=r<0?"-":"",n=Math.abs(r).toString().padStart(t,"0");return e+n}const wi={y(r,t){const e=r.getFullYear(),n=e>0?e:1-e;return we(t==="yy"?n%100:n,t.length)},M(r,t){const e=r.getMonth();return t==="M"?String(e+1):we(e+1,2)},d(r,t){return we(r.getDate(),t.length)},a(r,t){const e=r.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(r,t){return we(r.getHours()%12||12,t.length)},H(r,t){return we(r.getHours(),t.length)},m(r,t){return we(r.getMinutes(),t.length)},s(r,t){return we(r.getSeconds(),t.length)},S(r,t){const e=t.length,n=r.getMilliseconds(),i=Math.trunc(n*Math.pow(10,e-3));return we(i,t.length)}},Xs={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ov={G:function(r,t,e){const n=r.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(n,{width:"abbreviated"});case"GGGGG":return e.era(n,{width:"narrow"});case"GGGG":default:return e.era(n,{width:"wide"})}},y:function(r,t,e){if(t==="yo"){const n=r.getFullYear(),i=n>0?n:1-n;return e.ordinalNumber(i,{unit:"year"})}return wi.y(r,t)},Y:function(r,t,e,n){const i=bT(r,n),s=i>0?i:1-i;if(t==="YY"){const o=s%100;return we(o,2)}return t==="Yo"?e.ordinalNumber(s,{unit:"year"}):we(s,t.length)},R:function(r,t){const e=_T(r);return we(e,t.length)},u:function(r,t){const e=r.getFullYear();return we(e,t.length)},Q:function(r,t,e){const n=Math.ceil((r.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return we(n,2);case"Qo":return e.ordinalNumber(n,{unit:"quarter"});case"QQQ":return e.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(n,{width:"wide",context:"formatting"})}},q:function(r,t,e){const n=Math.ceil((r.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return we(n,2);case"qo":return e.ordinalNumber(n,{unit:"quarter"});case"qqq":return e.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(n,{width:"wide",context:"standalone"})}},M:function(r,t,e){const n=r.getMonth();switch(t){case"M":case"MM":return wi.M(r,t);case"Mo":return e.ordinalNumber(n+1,{unit:"month"});case"MMM":return e.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(n,{width:"wide",context:"formatting"})}},L:function(r,t,e){const n=r.getMonth();switch(t){case"L":return String(n+1);case"LL":return we(n+1,2);case"Lo":return e.ordinalNumber(n+1,{unit:"month"});case"LLL":return e.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(n,{width:"wide",context:"standalone"})}},w:function(r,t,e,n){const i=eU(r,n);return t==="wo"?e.ordinalNumber(i,{unit:"week"}):we(i,t.length)},I:function(r,t,e){const n=JB(r);return t==="Io"?e.ordinalNumber(n,{unit:"week"}):we(n,t.length)},d:function(r,t,e){return t==="do"?e.ordinalNumber(r.getDate(),{unit:"date"}):wi.d(r,t)},D:function(r,t,e){const n=KB(r);return t==="Do"?e.ordinalNumber(n,{unit:"dayOfYear"}):we(n,t.length)},E:function(r,t,e){const n=r.getDay();switch(t){case"E":case"EE":case"EEE":return e.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(n,{width:"short",context:"formatting"});case"EEEE":default:return e.day(n,{width:"wide",context:"formatting"})}},e:function(r,t,e,n){const i=r.getDay(),s=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return we(s,2);case"eo":return e.ordinalNumber(s,{unit:"day"});case"eee":return e.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(i,{width:"short",context:"formatting"});case"eeee":default:return e.day(i,{width:"wide",context:"formatting"})}},c:function(r,t,e,n){const i=r.getDay(),s=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return we(s,t.length);case"co":return e.ordinalNumber(s,{unit:"day"});case"ccc":return e.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(i,{width:"narrow",context:"standalone"});case"cccccc":return e.day(i,{width:"short",context:"standalone"});case"cccc":default:return e.day(i,{width:"wide",context:"standalone"})}},i:function(r,t,e){const n=r.getDay(),i=n===0?7:n;switch(t){case"i":return String(i);case"ii":return we(i,t.length);case"io":return e.ordinalNumber(i,{unit:"day"});case"iii":return e.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(n,{width:"short",context:"formatting"});case"iiii":default:return e.day(n,{width:"wide",context:"formatting"})}},a:function(r,t,e){const i=r.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(r,t,e){const n=r.getHours();let i;switch(n===12?i=Xs.noon:n===0?i=Xs.midnight:i=n/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(r,t,e){const n=r.getHours();let i;switch(n>=17?i=Xs.evening:n>=12?i=Xs.afternoon:n>=4?i=Xs.morning:i=Xs.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(r,t,e){if(t==="ho"){let n=r.getHours()%12;return n===0&&(n=12),e.ordinalNumber(n,{unit:"hour"})}return wi.h(r,t)},H:function(r,t,e){return t==="Ho"?e.ordinalNumber(r.getHours(),{unit:"hour"}):wi.H(r,t)},K:function(r,t,e){const n=r.getHours()%12;return t==="Ko"?e.ordinalNumber(n,{unit:"hour"}):we(n,t.length)},k:function(r,t,e){let n=r.getHours();return n===0&&(n=24),t==="ko"?e.ordinalNumber(n,{unit:"hour"}):we(n,t.length)},m:function(r,t,e){return t==="mo"?e.ordinalNumber(r.getMinutes(),{unit:"minute"}):wi.m(r,t)},s:function(r,t,e){return t==="so"?e.ordinalNumber(r.getSeconds(),{unit:"second"}):wi.s(r,t)},S:function(r,t){return wi.S(r,t)},X:function(r,t,e){const n=r.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return lv(n);case"XXXX":case"XX":return hs(n);case"XXXXX":case"XXX":default:return hs(n,":")}},x:function(r,t,e){const n=r.getTimezoneOffset();switch(t){case"x":return lv(n);case"xxxx":case"xx":return hs(n);case"xxxxx":case"xxx":default:return hs(n,":")}},O:function(r,t,e){const n=r.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+av(n,":");case"OOOO":default:return"GMT"+hs(n,":")}},z:function(r,t,e){const n=r.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+av(n,":");case"zzzz":default:return"GMT"+hs(n,":")}},t:function(r,t,e){const n=Math.trunc(+r/1e3);return we(n,t.length)},T:function(r,t,e){return we(+r,t.length)}};function av(r,t=""){const e=r>0?"-":"+",n=Math.abs(r),i=Math.trunc(n/60),s=n%60;return s===0?e+String(i):e+String(i)+t+we(s,2)}function lv(r,t){return r%60===0?(r>0?"-":"+")+we(Math.abs(r)/60,2):hs(r,t)}function hs(r,t=""){const e=r>0?"-":"+",n=Math.abs(r),i=we(Math.trunc(n/60),2),s=we(n%60,2);return e+i+t+s}const uv=(r,t)=>{switch(r){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},wT=(r,t)=>{switch(r){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},rU=(r,t)=>{const e=r.match(/(P+)(p+)?/)||[],n=e[1],i=e[2];if(!i)return uv(r,t);let s;switch(n){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",uv(n,t)).replace("{{time}}",wT(i,t))},nU={p:wT,P:rU},iU=/^D+$/,sU=/^Y+$/,oU=["D","DD","YY","YYYY"];function aU(r){return iU.test(r)}function lU(r){return sU.test(r)}function uU(r,t,e){const n=cU(r,t,e);if(console.warn(n),oU.includes(r))throw new RangeError(n)}function cU(r,t,e){const n=r[0]==="Y"?"years":"days of the month";return`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${t}\`) for formatting ${n} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const hU=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,dU=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,fU=/^'([^]*?)'?$/,pU=/''/g,mU=/[a-zA-Z]/;function xT(r,t,e){var c,h,f,d;const n=mc(),i=n.locale??ZB,s=n.firstWeekContainsDate??((h=(c=n.locale)==null?void 0:c.options)==null?void 0:h.firstWeekContainsDate)??1,o=n.weekStartsOn??((d=(f=n.locale)==null?void 0:f.options)==null?void 0:d.weekStartsOn)??0,a=an(r,e==null?void 0:e.in);if(!yB(a))throw new RangeError("Invalid time value");let l=t.match(dU).map(m=>{const g=m[0];if(g==="p"||g==="P"){const p=nU[g];return p(m,i.formatLong)}return m}).join("").match(hU).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const g=m[0];if(g==="'")return{isToken:!1,value:gU(m)};if(ov[g])return{isToken:!0,value:m};if(g.match(mU))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:m}});i.localize.preprocessor&&(l=i.localize.preprocessor(a,l));const u={firstWeekContainsDate:s,weekStartsOn:o,locale:i};return l.map(m=>{if(!m.isToken)return m.value;const g=m.value;(lU(g)||aU(g))&&uU(g,t,String(r));const p=ov[g[0]];return p(a,g,i.localize,u)}).join("")}function gU(r){const t=r.match(fU);return t?t[1].replace(pU,"'"):r}function yU(r,t){return an(r*1e3,t==null?void 0:t.in)}function vU(r,t){const e=_U(t)?new t(0):ui(t,0);return e.setFullYear(r.getFullYear(),r.getMonth(),r.getDate()),e.setHours(r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()),e}function _U(r){var t;return typeof r=="function"&&((t=r.prototype)==null?void 0:t.constructor)===r}function bU(r,t){let e=r.length;switch("string"){case"string":{for(;e>0&&r[e-1]===t;)e--;break}}return r.substring(0,e)}function Tr(r){return r==null}function wU(r){return r!=null}async function pf(){if(typeof window<"u"&&window!==null)return"browser";try{const r=await Ei(()=>import("./__vite-browser-external-FmFgRqLi.js"),[]);return typeof r<"u"&&r.versions!=null&&r.versions.node!=null?"node":"unknown"}catch{return"unknown"}}function xU(r){return Tr(r)?!1:Ct.isInt(r.type)&&!ST(r)||SU(r)}function SU(r){return Tr(r)?!1:Ct.isInt(r.type)&&r.type.isSigned===!1}function TU(r){return Tr(r)?!1:Ct.isFloat(r.type)??!1}function IU(r){return Tr(r)?!1:Ct.isDecimal(r.type)}function EU(r){return Tr(r)?!1:Ct.isBool(r.type)}function AU(r){return Tr(r)?!1:Ct.isDuration(r.type)}function ST(r){return Tr(r)?!1:Ct.isInt(r.type)&&r.metadata.get("ARROW:extension:name")==="period"}function MU(r){return Tr(r)?!1:Ct.isTimestamp(r.type)}function CU(r){return Tr(r)?!1:Ct.isDate(r.type)}function OU(r){return Tr(r)?!1:Ct.isTime(r.type)}function PU(r){return Tr(r)?!1:Ct.isList(r.type)||Ct.isFixedSizeList(r.type)}function RU(r){return Tr(r)?!1:Ct.isStruct(r.type)||Ct.isMap(r.type)}function FU(r){return Tr(r)?!1:Ct.isStruct(r.type)&&r.metadata.get("ARROW:extension:name")==="interval"||Ct.isInterval(r.type)}function DU(r,t){let e;if(t===te.MILLISECOND)e=1e3;else if(t===te.MICROSECOND)e=1e3*1e3;else if(t===te.NANOSECOND)e=1e3*1e3*1e3;else return Number(r);return typeof r=="bigint"&&!Number.isSafeInteger(Number(r))?Number(r/BigInt(e)):Number(r)/e}function LU(r,t){var n;const e=DU(r,((n=t==null?void 0:t.type)==null?void 0:n.unit)??te.SECOND);return yU(e)}function NU(r,t){const e=LU(r,t);return xT(e,e.getMilliseconds()===0?"HH:mm:ss":"HH:mm:ss.SSS")}function BU(r){const t="yyyy-MM-dd";return r instanceof Date||typeof r=="number"&&Number.isFinite(r)?xT(r,t):(console.warn(`Unsupported date value: ${r}`),String(r))}function UU(r,t){var i;if(!(r instanceof Date||typeof r=="number"&&Number.isFinite(r)))return console.warn(`Unsupported datetime value: ${r}`),null;let e;const n=(i=t==null?void 0:t.type)==null?void 0:i.timezone;return typeof r=="number"?n?e=new Fr(r,n):e=new Fr(r):n?e=new Fr(r,n):e=new Fr(r),vU(e,Date)}function kU(r,t){var a;const e=((a=t==null?void 0:t.type)==null?void 0:a.scale)||0;let n=rv.bigNumToString(new rv.BN(r)).padStart(e,"0");if(e===0)return n;let i="";n.startsWith("-")&&(i="-",n=n.slice(1));const s=n.slice(0,-e)||"0",o=bU(n.slice(-e),"0")||"";return`${i}${s}${o?`.${o}`:""}`}function zU(r){const t=r[0],e=r[1],n=[];return t!==0&&n.push(`${t} year${t>1?"s":""}`),e!==0&&n.push(`${e} month${e>1?"s":""}`),n.length?n.join(" "):"0 months"}function VU(r,t){var n,i,s,o;if(Ct.isInterval(t==null?void 0:t.type))return zU(r);const e=t&&t.metadata.get("ARROW:extension:name");if(e&&e==="pandas.interval"){const a=JSON.parse(t.metadata.get("ARROW:extension:metadata")),{closed:l}=a,u=r.toJSON(),c=l==="both"||l==="left"?"[":"(",h=l==="both"||l==="right"?"]":")",f=mf(u.left,(i=(n=t.type)==null?void 0:n.children)==null?void 0:i[0]),d=mf(u.right,(o=(s=t.type)==null?void 0:s.children)==null?void 0:o[1]);return`${c+f}, ${d+h}`}return String(r)}function jU(r,t){return(t==null?void 0:t.type)instanceof hf?JSON.parse(JSON.stringify(r,(e,n)=>{if(wU(n))return typeof n=="bigint"?Number(n):n})):JSON.parse(JSON.stringify(r,(e,n)=>typeof n=="bigint"?Number(n):n))}function mf(r,t){if(Tr(r))return null;const e=r instanceof Date||Number.isFinite(r);if(e&&CU(t))return BU(r);if(typeof r=="bigint"&&OU(t))return NU(Number(r),t);if(e&&MU(t))return UU(r,t);if(ST(t))throw new Error("Period type is not supported yet");if(FU(t))return VU(r,t);if(AU(t))throw new Error("Duration type is not supported yet");return IU(t)?kU(r,t):TU(t)&&Number.isFinite(r)||xU(t)?r:RU(t)||PU(t)?jU(r,t):EU(t)?!!r:String(r)}function cv(r){return((r.toArray()||[]).map(n=>n.toJSON())||[]).map(n=>(r.schema.fields.forEach(i=>n[i.name]=mf(n[i.name],i)),n))}var Ha=(r=>(r.ORIGIN_PRIVATE_FS="origin-private-fs",r.NODE_FS="node-fs",r))(Ha||{});async function TT(r){const t=M1(r,{logger:!1});let e,n;const i=await pf();if(i==="browser"){if(typeof t.bundles>"u"){const{getBundles:l}=await Ei(async()=>{const{getBundles:u}=await import("./default-browser-BrgSDbLD.js");return{getBundles:u}},[]);t.bundles=await l()}n=await Ey(await t.bundles),e=new Worker(n.mainWorker)}else if(i==="node"){if(typeof t.bundles>"u"){const{getBundles:c}=await Ei(async()=>{const{getBundles:h}=await import("./default-node-BGL82aP-.js");return{getBundles:h}},__vite__mapDeps([0,1,2]));t.bundles=await c()}n=await Ey(await t.bundles);let l=n.mainWorker;l.startsWith("/@fs/")&&(l=l.replace("/@fs/","file://"));const u=await Ei(()=>import("./index-Cp8iQ_hy.js"),[]);e=new u.default(l,{type:"module"})}else throw new Error(`Unsupported environment: ${i}`);let s;t.logger===!0?s=new Ux:t.logger===!1?s=new PD:s=t.logger;const o=new UD(s,e);if(await o.instantiate(n.mainModule,n.pthreadWorker),t.storage)switch(t.storage.type){case Ha.ORIGIN_PRIVATE_FS:{try{let l=t.storage.path;l.startsWith("/")&&(l=l.slice(1)),await o.open({path:`opfs://${l}`,accessMode:t.storage.accessMode})}catch(l){throw await o.terminate(),await e.terminate(),l}break}case Ha.NODE_FS:{try{await o.open({path:t.storage.path,accessMode:t.storage.accessMode,useDirectIO:!0})}catch(l){throw await o.terminate(),await e.terminate(),l}break}}const a=await o.connect();return{worker:e,db:o,conn:a,query:async(l,u=[])=>{if(!u||u.length===0){const d=await a.query(l);return cv(d)}const c=await a.prepare(l),h=await c.query(...u),f=cv(h);return c.close(),f},close:async()=>{await a.close(),await o.terminate(),await e.terminate()}}}async function $U(r,t){await(await r).conn.send("BEGIN TRANSACTION");try{const e=await t(r);return await(await r).conn.send("COMMIT"),e}catch(e){throw await(await r).conn.send("ROLLBACK"),e}}async function GU(r,t,e){await(await r).conn.send(`SAVEPOINT ${t}`);try{const n=await e(r);return await(await r).conn.send(`RELEASE SAVEPOINT ${t}`),n}catch(n){throw await(await r).conn.send(`ROLLBACK TO SAVEPOINT ${t}`),n}}const St=Symbol.for("drizzle:entityKind");function lt(r,t){if(!r||typeof r!="object")return!1;if(r instanceof t)return!0;if(!Object.prototype.hasOwnProperty.call(t,St))throw new Error(`Class "${t.name??""}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`);let e=Object.getPrototypeOf(r).constructor;if(e)for(;e;){if(St in e&&e[St]===t[St])return!0;e=Object.getPrototypeOf(e)}return!1}var wv;wv=St;class rr{constructor(t,e){W(this,"name");W(this,"keyAsName");W(this,"primary");W(this,"notNull");W(this,"default");W(this,"defaultFn");W(this,"onUpdateFn");W(this,"hasDefault");W(this,"isUnique");W(this,"uniqueName");W(this,"uniqueType");W(this,"dataType");W(this,"columnType");W(this,"enumValues");W(this,"generated");W(this,"generatedIdentity");W(this,"config");this.table=t,this.config=e,this.name=e.name,this.keyAsName=e.keyAsName,this.notNull=e.notNull,this.default=e.default,this.defaultFn=e.defaultFn,this.onUpdateFn=e.onUpdateFn,this.hasDefault=e.hasDefault,this.primary=e.primaryKey,this.isUnique=e.isUnique,this.uniqueName=e.uniqueName,this.uniqueType=e.uniqueType,this.dataType=e.dataType,this.columnType=e.columnType,this.generated=e.generated,this.generatedIdentity=e.generatedIdentity}mapFromDriverValue(t){return t}mapToDriverValue(t){return t}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!=="byDefault"}}W(rr,wv,"Column");const Eo=Symbol.for("drizzle:Name");function WU(r,t){return`${r[Eo]}_${t.join("_")}_unique`}var xv,Sv;class Lr extends(Sv=rr,xv=St,Sv){constructor(t,e){e.uniqueName||(e.uniqueName=WU(t,[e.name])),super(t,e),this.table=t}}W(Lr,xv,"PgColumn");const hv=Symbol.for("drizzle:isPgEnum");function HU(r){return!!r&&typeof r=="function"&&hv in r&&r[hv]===!0}var Tv;Tv=St;class Nr{constructor(t,e,n,i=!1){this._={brand:"Subquery",sql:t,selectedFields:e,alias:n,isWith:i}}}W(Nr,Tv,"Subquery");var Iv,Ev;class Np extends(Ev=Nr,Iv=St,Ev){}W(Np,Iv,"WithSubquery");const Ur={startActiveSpan(r,t){return t()}},Qe=Symbol.for("drizzle:ViewBaseConfig"),Kl=Symbol.for("drizzle:Schema"),gf=Symbol.for("drizzle:Columns"),dv=Symbol.for("drizzle:ExtraConfigColumns"),Vh=Symbol.for("drizzle:OriginalName"),jh=Symbol.for("drizzle:BaseName"),Wu=Symbol.for("drizzle:IsAlias"),fv=Symbol.for("drizzle:ExtraConfigBuilder"),XU=Symbol.for("drizzle:IsDrizzleTable");var Av,Mv,Cv,Ov,Pv,Rv,Fv,Dv,Lv,Nv;Nv=St,Lv=Eo,Dv=Vh,Fv=Kl,Rv=gf,Pv=dv,Ov=jh,Cv=Wu,Mv=XU,Av=fv;class It{constructor(t,e,n){W(this,Lv);W(this,Dv);W(this,Fv);W(this,Rv);W(this,Pv);W(this,Ov);W(this,Cv,!1);W(this,Mv,!0);W(this,Av);this[Eo]=this[Vh]=t,this[Kl]=e,this[jh]=n}}W(It,Nv,"Table"),W(It,"Symbol",{Name:Eo,Schema:Kl,OriginalName:Vh,Columns:gf,ExtraConfigColumns:dv,BaseName:jh,IsAlias:Wu,ExtraConfigBuilder:fv});function vs(r){return r[Eo]}function Xa(r){return`${r[Kl]??"public"}.${r[Eo]}`}function IT(r){return r!=null&&typeof r.getSQL=="function"}function YU(r){var e;const t={sql:"",params:[]};for(const n of r)t.sql+=n.sql,t.params.push(...n.params),(e=n.typings)!=null&&e.length&&(t.typings||(t.typings=[]),t.typings.push(...n.typings));return t}var Bv;Bv=St;class Ze{constructor(t){W(this,"value");this.value=Array.isArray(t)?t:[t]}getSQL(){return new Pt([this])}}W(Ze,Bv,"StringChunk");var Uv;Uv=St;const ps=class ps{constructor(t){W(this,"decoder",ET);W(this,"shouldInlineParams",!1);this.queryChunks=t}append(t){return this.queryChunks.push(...t.queryChunks),this}toQuery(t){return Ur.startActiveSpan("drizzle.buildSQL",e=>{const n=this.buildQueryFromSourceParams(this.queryChunks,t);return e==null||e.setAttributes({"drizzle.query.text":n.sql,"drizzle.query.params":JSON.stringify(n.params)}),n})}buildQueryFromSourceParams(t,e){const n=Object.assign({},e,{inlineParams:e.inlineParams||this.shouldInlineParams,paramStartIndex:e.paramStartIndex||{value:0}}),{casing:i,escapeName:s,escapeParam:o,prepareTyping:a,inlineParams:l,paramStartIndex:u}=n;return YU(t.map(c=>{var h;if(lt(c,Ze))return{sql:c.value.join(""),params:[]};if(lt(c,Hu))return{sql:s(c.value),params:[]};if(c===void 0)return{sql:"",params:[]};if(Array.isArray(c)){const f=[new Ze("(")];for(const[d,m]of c.entries())f.push(m),dr},AT={mapToDriverValue:r=>r};({...ET,...AT});var zv;zv=St;class ci{constructor(t,e=AT){W(this,"brand");this.value=t,this.encoder=e}getSQL(){return new Pt([this])}}W(ci,zv,"Param");function Y(r,...t){const e=[];(t.length>0||r.length>0&&r[0]!=="")&&e.push(new Ze(r[0]));for(const[n,i]of t.entries())e.push(i,new Ze(r[n+1]));return new Pt(e)}(r=>{function t(){return new Pt([])}r.empty=t;function e(l){return new Pt(l)}r.fromList=e;function n(l){return new Pt([new Ze(l)])}r.raw=n;function i(l,u){const c=[];for(const[h,f]of l.entries())h>0&&u!==void 0&&c.push(u),c.push(f);return new Pt(c)}r.join=i;function s(l){return new Hu(l)}r.identifier=s;function o(l){return new Ms(l)}r.placeholder=o;function a(l,u){return new ci(l,u)}r.param=a})(Y||(Y={}));(r=>{var e;e=St;const n=class n{constructor(s,o){W(this,"isSelectionField",!1);this.sql=s,this.fieldAlias=o}getSQL(){return this.sql}clone(){return new n(this.sql,this.fieldAlias)}};W(n,e,"SQL.Aliased");let t=n;r.Aliased=t})(Pt||(Pt={}));var Vv;Vv=St;class Ms{constructor(t){this.name=t}getSQL(){return new Pt([this])}}W(Ms,Vv,"Placeholder");function pv(r,t){return r.map(e=>{if(lt(e,Ms)){if(!(e.name in t))throw new Error(`No value for placeholder "${e.name}" was provided`);return t[e.name]}if(lt(e,ci)&<(e.value,Ms)){if(!(e.value.name in t))throw new Error(`No value for placeholder "${e.value.name}" was provided`);return e.encoder.mapToDriverValue(t[e.value.name])}return e})}const QU=Symbol.for("drizzle:IsDrizzleView");var jv,$v,Gv;Gv=St,$v=Qe,jv=QU;class ji{constructor({name:t,schema:e,selectedFields:n,query:i}){W(this,$v);W(this,jv,!0);this[Qe]={name:t,originalName:t,schema:e,selectedFields:n,query:i,isExisting:!i,isAlias:!1}}getSQL(){return new Pt([this])}}W(ji,Gv,"View");rr.prototype.getSQL=function(){return new Pt([this])};It.prototype.getSQL=function(){return new Pt([this])};Nr.prototype.getSQL=function(){return new Pt([this])};var Wv;Wv=St;class Ya{constructor(t){this.table=t}get(t,e){return e==="table"?this.table:t[e]}}W(Ya,Wv,"ColumnAliasProxyHandler");var Hv;Hv=St;class gc{constructor(t,e){this.alias=t,this.replaceOriginalName=e}get(t,e){if(e===It.Symbol.IsAlias)return!0;if(e===It.Symbol.Name)return this.alias;if(this.replaceOriginalName&&e===It.Symbol.OriginalName)return this.alias;if(e===Qe)return{...t[Qe],name:this.alias,isAlias:!0};if(e===It.Symbol.Columns){const i=t[It.Symbol.Columns];if(!i)return i;const s={};return Object.keys(i).map(o=>{s[o]=new Proxy(i[o],new Ya(new Proxy(t,this)))}),s}const n=t[e];return lt(n,rr)?new Proxy(n,new Ya(new Proxy(t,this))):n}}W(gc,Hv,"TableAliasProxyHandler");function $h(r,t){return new Proxy(r,new gc(t,!1))}function ei(r,t){return new Proxy(r,new Ya(new Proxy(r.table,new gc(t,!1))))}function MT(r,t){return new Pt.Aliased(Xu(r.sql,t),r.fieldAlias)}function Xu(r,t){return Y.join(r.queryChunks.map(e=>lt(e,rr)?ei(e,t):lt(e,Pt)?Xu(e,t):lt(e,Pt.Aliased)?MT(e,t):e))}var Xv,Yv;class Bp extends(Yv=Error,Xv=St,Yv){constructor({message:t,cause:e}){super(t),this.name="DrizzleError",this.cause=e}}W(Bp,Xv,"DrizzleError");var qv,Qv;class CT extends(Qv=Bp,qv=St,Qv){constructor(){super({message:"Rollback"})}}W(CT,qv,"TransactionRollbackError");function Sr(r,t){return qU(t)&&!IT(r)&&!lt(r,ci)&&!lt(r,Ms)&&!lt(r,rr)&&!lt(r,It)&&!lt(r,ji)?new ci(r,t):r}const OT=(r,t)=>Y`${r} = ${Sr(t,r)}`,ZU=(r,t)=>Y`${r} <> ${Sr(t,r)}`;function yf(...r){const t=r.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new Pt(t):new Pt([new Ze("("),Y.join(t,new Ze(" and ")),new Ze(")")])}function KU(...r){const t=r.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new Pt(t):new Pt([new Ze("("),Y.join(t,new Ze(" or ")),new Ze(")")])}function JU(r){return Y`not ${r}`}const tk=(r,t)=>Y`${r} > ${Sr(t,r)}`,ek=(r,t)=>Y`${r} >= ${Sr(t,r)}`,rk=(r,t)=>Y`${r} < ${Sr(t,r)}`,nk=(r,t)=>Y`${r} <= ${Sr(t,r)}`;function ik(r,t){return Array.isArray(t)?t.length===0?Y`false`:Y`${r} in ${t.map(e=>Sr(e,r))}`:Y`${r} in ${Sr(t,r)}`}function sk(r,t){return Array.isArray(t)?t.length===0?Y`true`:Y`${r} not in ${t.map(e=>Sr(e,r))}`:Y`${r} not in ${Sr(t,r)}`}function ok(r){return Y`${r} is null`}function ak(r){return Y`${r} is not null`}function lk(r){return Y`exists ${r}`}function uk(r){return Y`not exists ${r}`}function ck(r,t,e){return Y`${r} between ${Sr(t,r)} and ${Sr(e,r)}`}function hk(r,t,e){return Y`${r} not between ${Sr(t,r)} and ${Sr(e,r)}`}function dk(r,t){return Y`${r} like ${t}`}function fk(r,t){return Y`${r} not like ${t}`}function pk(r,t){return Y`${r} ilike ${t}`}function mk(r,t){return Y`${r} not ilike ${t}`}function gk(r){return Y`${r} asc`}function yk(r){return Y`${r} desc`}var Zv;Zv=St;class PT{write(t){console.log(t)}}W(PT,Zv,"ConsoleLogWriter");var Kv;Kv=St;class RT{constructor(t){W(this,"writer");this.writer=(t==null?void 0:t.writer)??new PT}logQuery(t,e){const n=e.map(s=>{try{return JSON.stringify(s)}catch{return String(s)}}),i=n.length?` -- params: [${n.join(", ")}]`:"";this.writer.write(`Query: ${t}${i}`)}}W(RT,Kv,"DefaultLogger");var Jv;Jv=St;class FT{logQuery(){}}W(FT,Jv,"NoopLogger");var t_,e_;e_=St,t_=Symbol.toStringTag;class $i{constructor(){W(this,t_,"QueryPromise")}catch(t){return this.then(void 0,t)}finally(t){return this.then(e=>(t==null||t(),e),e=>{throw t==null||t(),e})}then(t,e){return this.execute().then(t,e)}}W($i,e_,"QueryPromise");function Cs(r,t){return Object.entries(r).reduce((e,[n,i])=>{if(typeof n!="string")return e;const s=t?[...t,n]:[n];return lt(i,rr)||lt(i,Pt)||lt(i,Pt.Aliased)?e.push({path:s,field:i}):lt(i,It)?e.push(...Cs(i[It.Symbol.Columns],s)):e.push(...Cs(i,s)),e},[])}function Up(r,t){const e=Object.keys(r),n=Object.keys(t);if(e.length!==n.length)return!1;for(const[i,s]of e.entries())if(s!==n[i])return!1;return!0}function DT(r,t){const e=Object.entries(t).filter(([,n])=>n!==void 0).map(([n,i])=>lt(i,Pt)||lt(i,rr)?[n,i]:[n,new ci(i,r[It.Symbol.Columns][n])]);if(e.length===0)throw new Error("No values to set");return Object.fromEntries(e)}function vk(r,t){for(const e of t)for(const n of Object.getOwnPropertyNames(e.prototype))n!=="constructor"&&Object.defineProperty(r.prototype,n,Object.getOwnPropertyDescriptor(e.prototype,n)||Object.create(null))}function _k(r){return r[It.Symbol.Columns]}function fs(r){return lt(r,Nr)?r._.alias:lt(r,ji)?r[Qe].name:lt(r,Pt)?void 0:r[It.Symbol.IsAlias]?r[It.Symbol.Name]:r[It.Symbol.BaseName]}function bk(r){if(typeof r!="object"||r===null||r.constructor.name!=="Object")return!1;if("logger"in r){const t=typeof r.logger;return!(t!=="boolean"&&(t!=="object"||typeof r.logger.logQuery!="function")&&t!=="undefined")}if("schema"in r){const t=typeof r.schema;return!(t!=="object"&&t!=="undefined")}if("casing"in r){const t=typeof r.casing;return!(t!=="string"&&t!=="undefined")}if("mode"in r)return!(r.mode!=="default"||r.mode!=="planetscale"||r.mode!==void 0);if("connection"in r){const t=typeof r.connection;return!(t!=="string"&&t!=="object"&&t!=="undefined")}if("client"in r){const t=typeof r.client;return!(t!=="object"&&t!=="function"&&t!=="undefined")}return Object.keys(r).length===0}var r_,n_;class LT extends(n_=Lr,r_=St,n_){getSQLType(){return"date"}mapFromDriverValue(t){return new Date(t)}mapToDriverValue(t){return t.toISOString()}}W(LT,r_,"PgDate");var i_,s_;class NT extends(s_=Lr,i_=St,s_){getSQLType(){return"date"}}W(NT,i_,"PgDateString");var o_,a_;class BT extends(a_=Lr,o_=St,a_){constructor(t,e){super(t,e)}getSQLType(){return"json"}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t}}W(BT,o_,"PgJson");var l_,u_;class UT extends(u_=Lr,l_=St,u_){constructor(t,e){super(t,e)}getSQLType(){return"jsonb"}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t}}W(UT,l_,"PgJsonb");var c_,h_;class kT extends(h_=Lr,c_=St,h_){constructor(e,n){super(e,n);W(this,"precision");W(this,"scale");this.precision=n.precision,this.scale=n.scale}mapFromDriverValue(e){return typeof e=="string"?e:String(e)}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}}W(kT,c_,"PgNumeric");var d_,f_;class zT extends(f_=Lr,d_=St,f_){constructor(e,n){super(e,n);W(this,"withTimezone");W(this,"precision");this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`time${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}}W(zT,d_,"PgTime");var p_,m_;class VT extends(m_=Lr,p_=St,m_){constructor(e,n){super(e,n);W(this,"withTimezone");W(this,"precision");W(this,"mapFromDriverValue",e=>new Date(this.withTimezone?e:e+"+0000"));W(this,"mapToDriverValue",e=>e.toISOString());this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`timestamp${this.precision===void 0?"":` (${this.precision})`}${this.withTimezone?" with time zone":""}`}}W(VT,p_,"PgTimestamp");var g_,y_;class jT extends(y_=Lr,g_=St,y_){constructor(e,n){super(e,n);W(this,"withTimezone");W(this,"precision");this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`timestamp${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}}W(jT,g_,"PgTimestampString");var v_,__;class $T extends(__=Lr,v_=St,__){getSQLType(){return"uuid"}}W($T,v_,"PgUUID");const mv=Symbol.for("drizzle:PgInlineForeignKeys"),gv=Symbol.for("drizzle:EnableRLS");var b_,w_,x_,S_,T_,I_;class Xr extends(I_=It,T_=St,S_=mv,x_=gv,w_=It.Symbol.ExtraConfigBuilder,b_=It.Symbol.ExtraConfigColumns,I_){constructor(){super(...arguments);W(this,S_,[]);W(this,x_,!1);W(this,w_);W(this,b_,{})}}W(Xr,T_,"PgTable"),W(Xr,"Symbol",Object.assign({},It.Symbol,{InlineForeignKeys:mv,EnableRLS:gv}));var E_;E_=St;class GT{constructor(t,e){W(this,"columns");W(this,"name");this.columns=t,this.name=e}build(t){return new WT(t,this.columns,this.name)}}W(GT,E_,"PgPrimaryKeyBuilder");var A_;A_=St;class WT{constructor(t,e,n){W(this,"columns");W(this,"name");this.table=t,this.columns=e,this.name=n}getName(){return this.name??`${this.table[Xr.Symbol.Name]}_${this.columns.map(t=>t.name).join("_")}_pk`}}W(WT,A_,"PgPrimaryKey");var M_;M_=St;class kp{constructor(t,e,n){W(this,"referencedTableName");W(this,"fieldName");this.sourceTable=t,this.referencedTable=e,this.relationName=n,this.referencedTableName=e[It.Symbol.Name]}}W(kp,M_,"Relation");var C_;C_=St;class HT{constructor(t,e){this.table=t,this.config=e}}W(HT,C_,"Relations");var O_,P_;const Qu=class Qu extends(P_=kp,O_=St,P_){constructor(t,e,n,i){super(t,e,n==null?void 0:n.relationName),this.config=n,this.isNullable=i}withFieldName(t){const e=new Qu(this.sourceTable,this.referencedTable,this.config,this.isNullable);return e.fieldName=t,e}};W(Qu,O_,"One");let Os=Qu;var R_,F_;const Zu=class Zu extends(F_=kp,R_=St,F_){constructor(t,e,n){super(t,e,n==null?void 0:n.relationName),this.config=n}withFieldName(t){const e=new Zu(this.sourceTable,this.referencedTable,this.config);return e.fieldName=t,e}};W(Zu,R_,"Many");let Yu=Zu;function wk(){return{and:yf,between:ck,eq:OT,exists:lk,gt:tk,gte:ek,ilike:pk,inArray:ik,isNull:ok,isNotNull:ak,like:dk,lt:rk,lte:nk,ne:ZU,not:JU,notBetween:hk,notExists:uk,notLike:fk,notIlike:mk,notInArray:sk,or:KU,sql:Y}}function xk(){return{sql:Y,asc:gk,desc:yk}}function Sk(r,t){var s;Object.keys(r).length===1&&"default"in r&&!lt(r.default,It)&&(r=r.default);const e={},n={},i={};for(const[o,a]of Object.entries(r))if(lt(a,It)){const l=Xa(a),u=n[l];e[l]=o,i[o]={tsName:o,dbName:a[It.Symbol.Name],schema:a[It.Symbol.Schema],columns:a[It.Symbol.Columns],relations:(u==null?void 0:u.relations)??{},primaryKey:(u==null?void 0:u.primaryKey)??[]};for(const h of Object.values(a[It.Symbol.Columns]))h.primary&&i[o].primaryKey.push(h);const c=(s=a[It.Symbol.ExtraConfigBuilder])==null?void 0:s.call(a,a[It.Symbol.ExtraConfigColumns]);if(c)for(const h of Object.values(c))lt(h,GT)&&i[o].primaryKey.push(...h.columns)}else if(lt(a,HT)){const l=Xa(a.table),u=e[l],c=a.config(t(a.table));let h;for(const[f,d]of Object.entries(c))if(u){const m=i[u];m.relations[f]=d}else l in n||(n[l]={relations:{},primaryKey:h}),n[l].relations[f]=d}return{tables:i,tableNamesMap:e}}function Tk(r){return function(e,n){return new Os(r,e,n,(n==null?void 0:n.fields.reduce((i,s)=>i&&s.notNull,!0))??!1)}}function Ik(r){return function(e,n){return new Yu(r,e,n)}}function Ek(r,t,e){if(lt(e,Os)&&e.config)return{fields:e.config.fields,references:e.config.references};const n=t[Xa(e.referencedTable)];if(!n)throw new Error(`Table "${e.referencedTable[It.Symbol.Name]}" not found in schema`);const i=r[n];if(!i)throw new Error(`Table "${n}" not found in schema`);const s=e.sourceTable,o=t[Xa(s)];if(!o)throw new Error(`Table "${s[It.Symbol.Name]}" not found in schema`);const a=[];for(const l of Object.values(i.relations))(e.relationName&&e!==l&&l.relationName===e.relationName||!e.relationName&&l.referencedTable===e.sourceTable)&&a.push(l);if(a.length>1)throw e.relationName?new Error(`There are multiple relations with name "${e.relationName}" in table "${n}"`):new Error(`There are multiple relations between "${n}" and "${e.sourceTable[It.Symbol.Name]}". Please specify relation name`);if(a[0]&<(a[0],Os)&&a[0].config)return{fields:a[0].config.references,references:a[0].config.fields};throw new Error(`There is not enough information to infer relation "${o}.${e.fieldName}"`)}function Ak(r){return{one:Tk(r),many:Ik(r)}}function vf(r,t,e,n,i=s=>s){const s={};for(const[o,a]of n.entries())if(a.isJson){const l=t.relations[a.tsKey],u=e[o],c=typeof u=="string"?JSON.parse(u):u;s[a.tsKey]=lt(l,Os)?c&&vf(r,r[a.relationTableTsKey],c,a.selection,i):c.map(h=>vf(r,r[a.relationTableTsKey],h,a.selection,i))}else{const l=i(e[o]),u=a.field;let c;lt(u,rr)?c=u:lt(u,Pt)?c=u.decoder:c=u.sql.decoder,s[a.tsKey]=l===null?null:c.mapFromDriverValue(l)}return s}var D_;D_=St;const Ku=class Ku{constructor(t){W(this,"config");this.config={...t}}get(t,e){if(e==="_")return{...t._,selectedFields:new Proxy(t._.selectedFields,this)};if(e===Qe)return{...t[Qe],selectedFields:new Proxy(t[Qe].selectedFields,this)};if(typeof e=="symbol")return t[e];const i=(lt(t,Nr)?t._.selectedFields:lt(t,ji)?t[Qe].selectedFields:t)[e];if(lt(i,Pt.Aliased)){if(this.config.sqlAliasedBehavior==="sql"&&!i.isSelectionField)return i.sql;const s=i.clone();return s.isSelectionField=!0,s}if(lt(i,Pt)){if(this.config.sqlBehavior==="sql")return i;throw new Error(`You tried to reference "${e}" field from a subquery, which is a raw SQL field, but it doesn't have an alias declared. Please add an alias to the field using ".as('alias')" method.`)}return lt(i,rr)?this.config.alias?new Proxy(i,new Ya(new Proxy(i.table,new gc(this.config.alias,this.config.replaceOriginalName??!1)))):i:typeof i!="object"||i===null?i:new Proxy(i,new Ku(this.config))}};W(Ku,D_,"SelectionProxyHandler");let or=Ku;var L_,N_;class _f extends(N_=$i,L_=St,N_){constructor(e,n,i,s){super();W(this,"config");W(this,"authToken");W(this,"execute",e=>Ur.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken)));this.session=n,this.dialect=i,this.config={table:e,withList:s}}where(e){return this.config.where=e,this}returning(e=this.config.table[It.Symbol.Columns]){return this.config.returningFields=e,this.config.returning=Cs(e),this}getSQL(){return this.dialect.buildDeleteQuery(this.config)}toSQL(){const{typings:e,...n}=this.dialect.sqlToQuery(this.getSQL());return n}_prepare(e){return Ur.startActiveSpan("drizzle.prepareQuery",()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0))}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new or({alias:vs(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}W(_f,L_,"PgDelete");function Mk(r){return(r.replace(/['\u2019]/g,"").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[]).map(e=>e.toLowerCase()).join("_")}function Ck(r){return(r.replace(/['\u2019]/g,"").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[]).reduce((e,n,i)=>{const s=i===0?n.toLowerCase():`${n[0].toUpperCase()}${n.slice(1)}`;return e+s},"")}function Ok(r){return r}var B_;B_=St;class XT{constructor(t){W(this,"cache",{});W(this,"cachedTables",{});W(this,"convert");this.convert=t==="snake_case"?Mk:t==="camelCase"?Ck:Ok}getColumnCasing(t){if(!t.keyAsName)return t.name;const e=t.table[It.Symbol.Schema]??"public",n=t.table[It.Symbol.OriginalName],i=`${e}.${n}.${t.name}`;return this.cache[i]||this.cacheTable(t.table),this.cache[i]}cacheTable(t){const e=t[It.Symbol.Schema]??"public",n=t[It.Symbol.OriginalName],i=`${e}.${n}`;if(!this.cachedTables[i]){for(const s of Object.values(t[It.Symbol.Columns])){const o=`${i}.${s.name}`;this.cache[o]=this.convert(s.name)}this.cachedTables[i]=!0}}clearCache(){this.cache={},this.cachedTables={}}}W(XT,B_,"CasingCache");var U_,k_;class zp extends(k_=ji,U_=St,k_){}W(zp,U_,"PgViewBase");var z_;z_=St;class Ea{constructor(t){W(this,"casing");this.casing=new XT(t==null?void 0:t.casing)}async migrate(t,e,n){const i=typeof n=="string"?"__drizzle_migrations":n.migrationsTable??"__drizzle_migrations",s=typeof n=="string"?"drizzle":n.migrationsSchema??"drizzle",o=Y` CREATE TABLE IF NOT EXISTS ${Y.identifier(s)}.${Y.identifier(i)} ( id SERIAL PRIMARY KEY, hash text NOT NULL, created_at bigint ) - `;await e.execute(Y`CREATE SCHEMA IF NOT EXISTS ${Y.identifier(s)}`),await e.execute(o);const l=(await e.all(Y`select id, hash, created_at from ${Y.identifier(s)}.${Y.identifier(i)} order by created_at desc limit 1`))[0];await e.transaction(async u=>{for await(const c of t)if(!l||Number(l.created_at){var a;return e[o]!==void 0||((a=n[o])==null?void 0:a.onUpdateFn)!==void 0}),s=i.length;return Y.join(i.flatMap((o,a)=>{const l=n[o],u=e[o]??Y.param(l.onUpdateFn(),l),c=Y`${Y.identifier(this.casing.getColumnCasing(l))} = ${u}`;return a{const a=[];if(lt(s,Pt.Aliased)&&s.isSelectionField)a.push(Y.identifier(s.fieldAlias));else if(lt(s,Pt.Aliased)||lt(s,Pt)){const l=lt(s,Pt.Aliased)?s.sql:s;e?a.push(new Pt(l.queryChunks.map(u=>lt(u,Lr)?Y.identifier(this.casing.getColumnCasing(u)):u))):a.push(l),lt(s,Pt.Aliased)&&a.push(Y` as ${Y.identifier(s.fieldAlias)}`)}else lt(s,rr)&&(e?a.push(Y.identifier(this.casing.getColumnCasing(s))):a.push(s));return oa==null?void 0:a.some(({alias:P})=>P===(nt[It.Symbol.IsAlias]?vs(nt):nt[It.Symbol.BaseName])))(x.field.table)){const nt=vs(x.field.table);throw new Error(`Your "${x.path.join("->")}" field references a column "${nt}"."${x.field.name}", but the table "${nt}" is not part of the query! Did you forget to join it?`)}const p=!a||a.length===0,y=this.buildWithCTE(t);let _;d&&(_=d===!0?Y` distinct`:Y` distinct on (${Y.join(d.on,Y`, `)})`);const S=this.buildSelection(g,{isSingleTable:p}),T=this.buildFromTable(o),v=this.buildJoins(a),E=i?Y` where ${i}`:void 0,w=s?Y` having ${s}`:void 0;let B;l&&l.length>0&&(B=Y` order by ${Y.join(l,Y`, `)}`);let N;u&&u.length>0&&(N=Y` group by ${Y.join(u,Y`, `)}`);const $=typeof c=="object"||typeof c=="number"&&c>=0?Y` limit ${c}`:void 0,it=h?Y` offset ${h}`:void 0,I=Y.empty();if(f){const x=Y` for ${Y.raw(f.strength)}`;f.config.of&&x.append(Y` of ${Y.join(Array.isArray(f.config.of)?f.config.of:[f.config.of],Y`, `)}`),f.config.noWait?x.append(Y` no wait`):f.config.skipLocked&&x.append(Y` skip locked`),I.append(x)}const Z=Y`${y}select${_} ${S} from ${T}${v}${E}${N}${w}${B}${$}${it}${I}`;return m.length>0?this.buildSetOperations(Z,m):Z}buildSetOperations(t,e){const[n,...i]=e;if(!n)throw new Error("Cannot pass undefined values to any set operator");return i.length===0?this.buildSetOperationQuery({leftSelect:t,setOperator:n}):this.buildSetOperations(this.buildSetOperationQuery({leftSelect:t,setOperator:n}),i)}buildSetOperationQuery({leftSelect:t,setOperator:{type:e,isAll:n,rightSelect:i,limit:s,orderBy:o,offset:a}}){const l=Y`(${t.getSQL()}) `,u=Y`(${i.getSQL()})`;let c;if(o&&o.length>0){const m=[];for(const g of o)if(lt(g,Lr))m.push(Y.identifier(g.name));else if(lt(g,Pt)){for(let p=0;p=0?Y` limit ${s}`:void 0,f=Y.raw(`${e} ${n?"all ":""}`),d=a?Y` offset ${a}`:void 0;return Y`${l}${f}${u}${c}${h}${d}`}buildInsertQuery({table:t,values:e,onConflict:n,returning:i,withList:s,select:o,overridingSystemValue_:a}){const l=[],u=t[It.Symbol.Columns],c=Object.entries(u).filter(([y,_])=>!_.shouldDisableInsert()),h=c.map(([,y])=>Y.identifier(this.casing.getColumnCasing(y)));if(o){const y=e;lt(y,Pt)?l.push(y):l.push(y.getSQL())}else{const y=e;l.push(Y.raw("values "));for(const[_,S]of y.entries()){const T=[];for(const[v,E]of c){const w=S[v];if(w===void 0||lt(w,ci)&&w.value===void 0)if(E.defaultFn!==void 0){const B=E.defaultFn(),N=lt(B,Pt)?B:Y.param(B,E);T.push(N)}else if(!E.default&&E.onUpdateFn!==void 0){const B=E.onUpdateFn(),N=lt(B,Pt)?B:Y.param(B,E);T.push(N)}else T.push(Y`default`);else T.push(w)}l.push(T),_({dbKey:S.name,tsKey:_,field:ei(S,a),relationTableTsKey:void 0,isJson:!1,selection:[]}));else{const y=Object.fromEntries(Object.entries(s.columns).map(([w,B])=>[w,ei(B,a)]));if(o.where){const w=typeof o.where=="function"?o.where(y,wk()):o.where;m=w&&Xu(w,a)}const _=[];let S=[];if(o.columns){let w=!1;for(const[B,N]of Object.entries(o.columns))N!==void 0&&B in s.columns&&(!w&&N===!0&&(w=!0),S.push(B));S.length>0&&(S=w?S.filter(B=>{var N;return((N=o.columns)==null?void 0:N[B])===!0}):Object.keys(s.columns).filter(B=>!S.includes(B)))}else S=Object.keys(s.columns);for(const w of S){const B=s.columns[w];_.push({tsKey:w,value:B})}let T=[];o.with&&(T=Object.entries(o.with).filter(w=>!!w[1]).map(([w,B])=>({tsKey:w,queryConfig:B,relation:s.relations[w]})));let v;if(o.extras){v=typeof o.extras=="function"?o.extras(y,{sql:Y}):o.extras;for(const[w,B]of Object.entries(v))_.push({tsKey:w,value:MT(B,a)})}for(const{tsKey:w,value:B}of _)c.push({dbKey:lt(B,Pt.Aliased)?B.fieldAlias:s.columns[w].name,tsKey:w,field:lt(B,rr)?ei(B,a):B,relationTableTsKey:void 0,isJson:!1,selection:[]});let E=typeof o.orderBy=="function"?o.orderBy(y,xk()):o.orderBy??[];Array.isArray(E)||(E=[E]),d=E.map(w=>lt(w,rr)?ei(w,a):Xu(w,a)),h=o.limit,f=o.offset;for(const{tsKey:w,queryConfig:B,relation:N}of T){const $=Ek(e,n,N),it=Xa(N.referencedTable),I=n[it],Z=`${a}_${w}`,x=yf(...$.fields.map((C,R)=>OT(ei($.references[R],Z),ei(C,a)))),nt=this.buildRelationalQueryWithoutPK({fullSchema:t,schema:e,tableNamesMap:n,table:t[I],tableConfig:e[I],queryConfig:lt(N,Os)?B===!0?{limit:1}:{...B,limit:1}:B,tableAlias:Z,joinOn:x,nestedQueryRelation:N}),P=Y`${Y.identifier(Z)}.${Y.identifier("data")}`.as(w);g.push({on:Y`true`,table:new Nr(nt.sql,{},Z),alias:Z,joinType:"left",lateral:!0}),c.push({dbKey:w,tsKey:w,field:P,relationTableTsKey:I,isJson:!0,selection:nt.selection})}}if(c.length===0)throw new Bp({message:`No fields selected for table "${s.tsName}" ("${a}")`});let p;if(m=yf(u,m),l){let y=Y`json_build_array(${Y.join(c.map(({field:T,tsKey:v,isJson:E})=>E?Y`${Y.identifier(`${a}_${v}`)}.${Y.identifier("data")}`:lt(T,Pt.Aliased)?T.sql:T),Y`, `)})`;lt(l,Yu)&&(y=Y`coalesce(json_agg(${y}${d.length>0?Y` order by ${Y.join(d,Y`, `)}`:void 0}), '[]'::json)`);const _=[{dbKey:"data",tsKey:"data",field:y.as("data"),isJson:!0,relationTableTsKey:s.tsName,selection:c}];h!==void 0||f!==void 0||d.length>0?(p=this.buildSelectQuery({table:$h(i,a),fields:{},fieldsFlat:[{path:[],field:Y.raw("*")}],where:m,limit:h,offset:f,orderBy:d,setOperators:[]}),m=void 0,h=void 0,f=void 0,d=[]):p=$h(i,a),p=this.buildSelectQuery({table:lt(p,Xr)?p:new Nr(p,{},a),fields:{},fieldsFlat:_.map(({field:T})=>({path:[],field:lt(T,rr)?ei(T,a):T})),joins:g,where:m,limit:h,offset:f,orderBy:d,setOperators:[]})}else p=this.buildSelectQuery({table:$h(i,a),fields:{},fieldsFlat:c.map(({field:y})=>({path:[],field:lt(y,rr)?ei(y,a):y})),joins:g,where:m,limit:h,offset:f,orderBy:d,setOperators:[]});return{tableTsKey:s.tsName,sql:p,selection:c}}}W(Ea,z_,"PgDialect");var V_;V_=St;class YT{getSelectedFields(){return this._.selectedFields}}W(YT,V_,"TypedQueryBuilder");var j_;j_=St;class Or{constructor(t){W(this,"fields");W(this,"session");W(this,"dialect");W(this,"withList",[]);W(this,"distinct");W(this,"authToken");this.fields=t.fields,this.session=t.session,this.dialect=t.dialect,t.withList&&(this.withList=t.withList),this.distinct=t.distinct}setToken(t){return this.authToken=t,this}from(t){const e=!!this.fields,n=t;let i;return this.fields?i=this.fields:lt(n,Nr)?i=Object.fromEntries(Object.keys(n._.selectedFields).map(s=>[s,n[s]])):lt(n,zp)?i=n[Qe].selectedFields:lt(n,Pt)?i={}:i=_k(n),new Vp({table:n,fields:i,isPartialSelect:e,session:this.session,dialect:this.dialect,withList:this.withList,distinct:this.distinct}).setToken(this.authToken)}}W(Or,j_,"PgSelectBuilder");var $_,G_;class qT extends(G_=YT,$_=St,G_){constructor({table:e,fields:n,isPartialSelect:i,session:s,dialect:o,withList:a,distinct:l}){super();W(this,"_");W(this,"config");W(this,"joinsNotNullableMap");W(this,"tableName");W(this,"isPartialSelect");W(this,"session");W(this,"dialect");W(this,"leftJoin",this.createJoin("left"));W(this,"rightJoin",this.createJoin("right"));W(this,"innerJoin",this.createJoin("inner"));W(this,"fullJoin",this.createJoin("full"));W(this,"union",this.createSetOperator("union",!1));W(this,"unionAll",this.createSetOperator("union",!0));W(this,"intersect",this.createSetOperator("intersect",!1));W(this,"intersectAll",this.createSetOperator("intersect",!0));W(this,"except",this.createSetOperator("except",!1));W(this,"exceptAll",this.createSetOperator("except",!0));this.config={withList:a,table:e,fields:{...n},distinct:l,setOperators:[]},this.isPartialSelect=i,this.session=s,this.dialect=o,this._={selectedFields:n},this.tableName=fs(e),this.joinsNotNullableMap=typeof this.tableName=="string"?{[this.tableName]:!0}:{}}createJoin(e){return(n,i)=>{var a;const s=this.tableName,o=fs(n);if(typeof o=="string"&&((a=this.config.joins)!=null&&a.some(l=>l.alias===o)))throw new Error(`Alias "${o}" is already used in this query`);if(!this.isPartialSelect&&(Object.keys(this.joinsNotNullableMap).length===1&&typeof s=="string"&&(this.config.fields={[s]:this.config.fields}),typeof o=="string"&&!lt(n,Pt))){const l=lt(n,Nr)?n._.selectedFields:lt(n,ji)?n[Qe].selectedFields:n[It.Symbol.Columns];this.config.fields[o]=l}if(typeof i=="function"&&(i=i(new Proxy(this.config.fields,new or({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.joins||(this.config.joins=[]),this.config.joins.push({on:i,table:n,joinType:e,alias:o}),typeof o=="string")switch(e){case"left":{this.joinsNotNullableMap[o]=!1;break}case"right":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([l])=>[l,!1])),this.joinsNotNullableMap[o]=!0;break}case"inner":{this.joinsNotNullableMap[o]=!0;break}case"full":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([l])=>[l,!1])),this.joinsNotNullableMap[o]=!1;break}}return this}}createSetOperator(e,n){return i=>{const s=typeof i=="function"?i(Pk()):i;if(!Up(this.getSelectedFields(),s.getSelectedFields()))throw new Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return this.config.setOperators.push({type:e,isAll:n,rightSelect:s}),this}}addSetOperators(e){return this.config.setOperators.push(...e),this}where(e){return typeof e=="function"&&(e=e(new Proxy(this.config.fields,new or({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.where=e,this}having(e){return typeof e=="function"&&(e=e(new Proxy(this.config.fields,new or({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.having=e,this}groupBy(...e){if(typeof e[0]=="function"){const n=e[0](new Proxy(this.config.fields,new or({sqlAliasedBehavior:"alias",sqlBehavior:"sql"})));this.config.groupBy=Array.isArray(n)?n:[n]}else this.config.groupBy=e;return this}orderBy(...e){if(typeof e[0]=="function"){const n=e[0](new Proxy(this.config.fields,new or({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),i=Array.isArray(n)?n:[n];this.config.setOperators.length>0?this.config.setOperators.at(-1).orderBy=i:this.config.orderBy=i}else{const n=e;this.config.setOperators.length>0?this.config.setOperators.at(-1).orderBy=n:this.config.orderBy=n}return this}limit(e){return this.config.setOperators.length>0?this.config.setOperators.at(-1).limit=e:this.config.limit=e,this}offset(e){return this.config.setOperators.length>0?this.config.setOperators.at(-1).offset=e:this.config.offset=e,this}for(e,n={}){return this.config.lockingClause={strength:e,config:n},this}getSQL(){return this.dialect.buildSelectQuery(this.config)}toSQL(){const{typings:e,...n}=this.dialect.sqlToQuery(this.getSQL());return n}as(e){return new Proxy(new Nr(this.getSQL(),this.config.fields,e),new or({alias:e,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}getSelectedFields(){return new Proxy(this.config.fields,new or({alias:this.tableName,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}$dynamic(){return this}}W(qT,$_,"PgSelectQueryBuilder");var W_,H_;class Vp extends(H_=qT,W_=St,H_){constructor(){super(...arguments);W(this,"authToken");W(this,"execute",e=>Ur.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken)))}_prepare(e){const{session:n,config:i,dialect:s,joinsNotNullableMap:o,authToken:a}=this;if(!n)throw new Error("Cannot execute a query on a query builder. Please use a database instance instead.");return Ur.startActiveSpan("drizzle.prepareQuery",()=>{const l=Cs(i.fields),u=n.prepareQuery(s.sqlToQuery(this.getSQL()),l,e,!0);return u.joinsNotNullableMap=o,u.setToken(a)})}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}}W(Vp,W_,"PgSelect");vk(Vp,[$i]);function zo(r,t){return(e,n,...i)=>{const s=[n,...i].map(o=>({type:r,isAll:t,rightSelect:o}));for(const o of s)if(!Up(e.getSelectedFields(),o.rightSelect.getSelectedFields()))throw new Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return e.addSetOperators(s)}}const Pk=()=>({union:Rk,unionAll:Fk,intersect:Dk,intersectAll:Lk,except:Nk,exceptAll:Bk}),Rk=zo("union",!1),Fk=zo("union",!0),Dk=zo("intersect",!1),Lk=zo("intersect",!0),Nk=zo("except",!1),Bk=zo("except",!0);var X_;X_=St;class jp{constructor(t){W(this,"dialect");W(this,"dialectConfig");W(this,"$with",(t,e)=>{const n=this;return{as:s=>(typeof s=="function"&&(s=s(n)),new Proxy(new Np(s.getSQL(),e??("getSelectedFields"in s?s.getSelectedFields()??{}:{}),t,!0),new or({alias:t,sqlAliasedBehavior:"alias",sqlBehavior:"error"})))}});this.dialect=lt(t,Ea)?t:void 0,this.dialectConfig=lt(t,Ea)?void 0:t}with(...t){const e=this;function n(o){return new Or({fields:o??void 0,session:void 0,dialect:e.getDialect(),withList:t})}function i(o){return new Or({fields:o??void 0,session:void 0,dialect:e.getDialect(),distinct:!0})}function s(o,a){return new Or({fields:a??void 0,session:void 0,dialect:e.getDialect(),distinct:{on:o}})}return{select:n,selectDistinct:i,selectDistinctOn:s}}select(t){return new Or({fields:t??void 0,session:void 0,dialect:this.getDialect()})}selectDistinct(t){return new Or({fields:t??void 0,session:void 0,dialect:this.getDialect(),distinct:!0})}selectDistinctOn(t,e){return new Or({fields:e??void 0,session:void 0,dialect:this.getDialect(),distinct:{on:t}})}getDialect(){return this.dialect||(this.dialect=new Ea(this.dialectConfig)),this.dialect}}W(jp,X_,"PgQueryBuilder");var Y_;Y_=St;class bf{constructor(t,e,n,i,s){W(this,"authToken");this.table=t,this.session=e,this.dialect=n,this.withList=i,this.overridingSystemValue_=s}setToken(t){return this.authToken=t,this}overridingSystemValue(){return this.overridingSystemValue_=!0,this}values(t){if(t=Array.isArray(t)?t:[t],t.length===0)throw new Error("values() must be called with at least one value");const e=t.map(n=>{const i={},s=this.table[It.Symbol.Columns];for(const o of Object.keys(n)){const a=n[o];i[o]=lt(a,Pt)?a:new ci(a,s[o])}return i});return new wf(this.table,e,this.session,this.dialect,this.withList,!1,this.overridingSystemValue_).setToken(this.authToken)}select(t){const e=typeof t=="function"?t(new jp):t;if(!lt(e,Pt)&&!Up(this.table[gf],e._.selectedFields))throw new Error("Insert select error: selected fields are not the same or are in a different order compared to the table definition");return new wf(this.table,e,this.session,this.dialect,this.withList,!0)}}W(bf,Y_,"PgInsertBuilder");var q_,Q_;class wf extends(Q_=$i,q_=St,Q_){constructor(e,n,i,s,o,a,l){super();W(this,"config");W(this,"authToken");W(this,"execute",e=>Ur.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken)));this.session=i,this.dialect=s,this.config={table:e,values:n,withList:o,select:a,overridingSystemValue_:l}}returning(e=this.config.table[It.Symbol.Columns]){return this.config.returningFields=e,this.config.returning=Cs(e),this}onConflictDoNothing(e={}){if(e.target===void 0)this.config.onConflict=Y`do nothing`;else{let n="";n=Array.isArray(e.target)?e.target.map(s=>this.dialect.escapeName(this.dialect.casing.getColumnCasing(s))).join(","):this.dialect.escapeName(this.dialect.casing.getColumnCasing(e.target));const i=e.where?Y` where ${e.where}`:void 0;this.config.onConflict=Y`(${Y.raw(n)})${i} do nothing`}return this}onConflictDoUpdate(e){if(e.where&&(e.targetWhere||e.setWhere))throw new Error('You cannot use both "where" and "targetWhere"/"setWhere" at the same time - "where" is deprecated, use "targetWhere" or "setWhere" instead.');const n=e.where?Y` where ${e.where}`:void 0,i=e.targetWhere?Y` where ${e.targetWhere}`:void 0,s=e.setWhere?Y` where ${e.setWhere}`:void 0,o=this.dialect.buildUpdateSet(this.config.table,DT(this.config.table,e.set));let a="";return a=Array.isArray(e.target)?e.target.map(l=>this.dialect.escapeName(this.dialect.casing.getColumnCasing(l))).join(","):this.dialect.escapeName(this.dialect.casing.getColumnCasing(e.target)),this.config.onConflict=Y`(${Y.raw(a)})${i} do update set ${o}${n}${s}`,this}getSQL(){return this.dialect.buildInsertQuery(this.config)}toSQL(){const{typings:e,...n}=this.dialect.sqlToQuery(this.getSQL());return n}_prepare(e){return Ur.startActiveSpan("drizzle.prepareQuery",()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0))}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new or({alias:vs(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}W(wf,q_,"PgInsert");var Z_,K_;class QT extends(K_=$i,Z_=St,K_){constructor(e,n,i){super();W(this,"config");W(this,"authToken");W(this,"execute",e=>Ur.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken)));this.session=n,this.dialect=i,this.config={view:e}}concurrently(){if(this.config.withNoData!==void 0)throw new Error("Cannot use concurrently and withNoData together");return this.config.concurrently=!0,this}withNoData(){if(this.config.concurrently!==void 0)throw new Error("Cannot use concurrently and withNoData together");return this.config.withNoData=!0,this}getSQL(){return this.dialect.buildRefreshMaterializedViewQuery(this.config)}toSQL(){const{typings:e,...n}=this.dialect.sqlToQuery(this.getSQL());return n}_prepare(e){return Ur.startActiveSpan("drizzle.prepareQuery",()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),void 0,e,!0))}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}}W(QT,Z_,"PgRefreshMaterializedView");var J_;J_=St;class xf{constructor(t,e,n,i){W(this,"authToken");this.table=t,this.session=e,this.dialect=n,this.withList=i}setToken(t){return this.authToken=t,this}set(t){return new ZT(this.table,DT(this.table,t),this.session,this.dialect,this.withList).setToken(this.authToken)}}W(xf,J_,"PgUpdateBuilder");var t0,e0;class ZT extends(e0=$i,t0=St,e0){constructor(e,n,i,s,o){super();W(this,"config");W(this,"tableName");W(this,"joinsNotNullableMap");W(this,"leftJoin",this.createJoin("left"));W(this,"rightJoin",this.createJoin("right"));W(this,"innerJoin",this.createJoin("inner"));W(this,"fullJoin",this.createJoin("full"));W(this,"authToken");W(this,"execute",e=>this._prepare().execute(e,this.authToken));this.session=i,this.dialect=s,this.config={set:n,table:e,withList:o,joins:[]},this.tableName=fs(e),this.joinsNotNullableMap=typeof this.tableName=="string"?{[this.tableName]:!0}:{}}from(e){const n=e,i=fs(n);return typeof i=="string"&&(this.joinsNotNullableMap[i]=!0),this.config.from=n,this}getTableLikeFields(e){return lt(e,Xr)?e[It.Symbol.Columns]:lt(e,Nr)?e._.selectedFields:e[Qe].selectedFields}createJoin(e){return(n,i)=>{const s=fs(n);if(typeof s=="string"&&this.config.joins.some(o=>o.alias===s))throw new Error(`Alias "${s}" is already used in this query`);if(typeof i=="function"){const o=this.config.from&&!lt(this.config.from,Pt)?this.getTableLikeFields(this.config.from):void 0;i=i(new Proxy(this.config.table[It.Symbol.Columns],new or({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})),o&&new Proxy(o,new or({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))}if(this.config.joins.push({on:i,table:n,joinType:e,alias:s}),typeof s=="string")switch(e){case"left":{this.joinsNotNullableMap[s]=!1;break}case"right":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([o])=>[o,!1])),this.joinsNotNullableMap[s]=!0;break}case"inner":{this.joinsNotNullableMap[s]=!0;break}case"full":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([o])=>[o,!1])),this.joinsNotNullableMap[s]=!1;break}}return this}}where(e){return this.config.where=e,this}returning(e){if(!e&&(e=Object.assign({},this.config.table[It.Symbol.Columns]),this.config.from)){const n=fs(this.config.from);if(typeof n=="string"&&this.config.from&&!lt(this.config.from,Pt)){const i=this.getTableLikeFields(this.config.from);e[n]=i}for(const i of this.config.joins){const s=fs(i.table);if(typeof s=="string"&&!lt(i.table,Pt)){const o=this.getTableLikeFields(i.table);e[s]=o}}}return this.config.returningFields=e,this.config.returning=Cs(e),this}getSQL(){return this.dialect.buildUpdateQuery(this.config)}toSQL(){const{typings:e,...n}=this.dialect.sqlToQuery(this.getSQL());return n}_prepare(e){const n=this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0);return n.joinsNotNullableMap=this.joinsNotNullableMap,n}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new or({alias:vs(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}W(ZT,t0,"PgUpdate");var r0,n0,i0;const Ma=class Ma extends(i0=Pt,n0=St,r0=Symbol.toStringTag,i0){constructor(e){super(Ma.buildEmbeddedCount(e.source,e.filters).queryChunks);W(this,"sql");W(this,"token");W(this,r0,"PgCountBuilder");W(this,"session");this.params=e,this.mapWith(Number),this.session=e.session,this.sql=Ma.buildCount(e.source,e.filters)}static buildEmbeddedCount(e,n){return Y`(select count(*) from ${e}${Y.raw(" where ").if(n)}${n})`}static buildCount(e,n){return Y`select count(*) as count from ${e}${Y.raw(" where ").if(n)}${n};`}setToken(e){return this.token=e,this}then(e,n){return Promise.resolve(this.session.count(this.sql,this.token)).then(e,n)}catch(e){return this.then(void 0,e)}finally(e){return this.then(n=>(e==null||e(),n),n=>{throw e==null||e(),n})}};W(Ma,n0,"PgCountBuilder");let Sf=Ma;var s0;s0=St;class KT{constructor(t,e,n,i,s,o,a){this.fullSchema=t,this.schema=e,this.tableNamesMap=n,this.table=i,this.tableConfig=s,this.dialect=o,this.session=a}findMany(t){return new Tf(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,t||{},"many")}findFirst(t){return new Tf(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,t?{...t,limit:1}:{limit:1},"first")}}W(KT,s0,"PgRelationalQueryBuilder");var o0,a0;class Tf extends(a0=$i,o0=St,a0){constructor(e,n,i,s,o,a,l,u,c){super();W(this,"authToken");this.fullSchema=e,this.schema=n,this.tableNamesMap=i,this.table=s,this.tableConfig=o,this.dialect=a,this.session=l,this.config=u,this.mode=c}_prepare(e){return Ur.startActiveSpan("drizzle.prepareQuery",()=>{const{query:n,builtQuery:i}=this._toSQL();return this.session.prepareQuery(i,void 0,e,!0,(s,o)=>{const a=s.map(l=>vf(this.schema,this.tableConfig,l,n.selection,o));return this.mode==="first"?a[0]:a})})}prepare(e){return this._prepare(e)}_getQuery(){return this.dialect.buildRelationalQueryWithoutPK({fullSchema:this.fullSchema,schema:this.schema,tableNamesMap:this.tableNamesMap,table:this.table,tableConfig:this.tableConfig,queryConfig:this.config,tableAlias:this.tableConfig.tsName})}getSQL(){return this._getQuery().sql}_toSQL(){const e=this._getQuery(),n=this.dialect.sqlToQuery(e.sql);return{query:e,builtQuery:n}}toSQL(){return this._toSQL().builtQuery}setToken(e){return this.authToken=e,this}execute(){return Ur.startActiveSpan("drizzle.operation",()=>this._prepare().execute(void 0,this.authToken))}}W(Tf,o0,"PgRelationalQuery");var l0,u0;class JT extends(u0=$i,l0=St,u0){constructor(t,e,n,i){super(),this.execute=t,this.sql=e,this.query=n,this.mapBatchResult=i}getSQL(){return this.sql}getQuery(){return this.query}mapResult(t,e){return e?this.mapBatchResult(t):t}_prepare(){return this}isResponseInArrayMode(){return!1}}W(JT,l0,"PgRaw");var c0;c0=St;class $p{constructor(t,e,n){W(this,"query");W(this,"$with",(t,e)=>{const n=this;return{as:s=>(typeof s=="function"&&(s=s(new jp(n.dialect))),new Proxy(new Np(s.getSQL(),e??("getSelectedFields"in s?s.getSelectedFields()??{}:{}),t,!0),new or({alias:t,sqlAliasedBehavior:"alias",sqlBehavior:"error"})))}});W(this,"authToken");if(this.dialect=t,this.session=e,this._=n?{schema:n.schema,fullSchema:n.fullSchema,tableNamesMap:n.tableNamesMap,session:e}:{schema:void 0,fullSchema:{},tableNamesMap:{},session:e},this.query={},this._.schema)for(const[i,s]of Object.entries(this._.schema))this.query[i]=new KT(n.fullSchema,this._.schema,this._.tableNamesMap,n.fullSchema[i],s,t,e)}$count(t,e){return new Sf({source:t,filters:e,session:this.session})}with(...t){const e=this;function n(u){return new Or({fields:u??void 0,session:e.session,dialect:e.dialect,withList:t})}function i(u){return new Or({fields:u??void 0,session:e.session,dialect:e.dialect,withList:t,distinct:!0})}function s(u,c){return new Or({fields:c??void 0,session:e.session,dialect:e.dialect,withList:t,distinct:{on:u}})}function o(u){return new xf(u,e.session,e.dialect,t)}function a(u){return new bf(u,e.session,e.dialect,t)}function l(u){return new _f(u,e.session,e.dialect,t)}return{select:n,selectDistinct:i,selectDistinctOn:s,update:o,insert:a,delete:l}}select(t){return new Or({fields:t??void 0,session:this.session,dialect:this.dialect})}selectDistinct(t){return new Or({fields:t??void 0,session:this.session,dialect:this.dialect,distinct:!0})}selectDistinctOn(t,e){return new Or({fields:e??void 0,session:this.session,dialect:this.dialect,distinct:{on:t}})}update(t){return new xf(t,this.session,this.dialect)}insert(t){return new bf(t,this.session,this.dialect)}delete(t){return new _f(t,this.session,this.dialect)}refreshMaterializedView(t){return new QT(t,this.session,this.dialect)}execute(t){const e=typeof t=="string"?Y.raw(t):t.getSQL(),n=this.dialect.sqlToQuery(e),i=this.session.prepareQuery(n,void 0,void 0,!1);return new JT(()=>i.execute(void 0,this.authToken),e,n,s=>i.mapResult(s,!0))}transaction(t,e){return this.session.transaction(t,e)}}W($p,c0,"PgDatabase");var h0;h0=St;class t1{constructor(t){W(this,"authToken");W(this,"joinsNotNullableMap");this.query=t}getQuery(){return this.query}mapResult(t,e){return t}setToken(t){return this.authToken=t,this}}W(t1,h0,"PgPreparedQuery");var d0;d0=St;class e1{constructor(t){this.dialect=t}execute(t,e){return Ur.startActiveSpan("drizzle.operation",()=>Ur.startActiveSpan("drizzle.prepareQuery",()=>this.prepareQuery(this.dialect.sqlToQuery(t),void 0,void 0,!1)).setToken(e).execute(void 0,e))}all(t){return this.prepareQuery(this.dialect.sqlToQuery(t),void 0,void 0,!1).all()}async count(t,e){const n=await this.execute(t,e);return Number(n[0].count)}}W(e1,d0,"PgSession");var f0,p0;class r1 extends(p0=$p,f0=St,p0){constructor(t,e,n,i=0){super(t,e,n),this.schema=n,this.nestedIndex=i}rollback(){throw new CT}getTransactionConfigSQL(t){const e=[];return t.isolationLevel&&e.push(`isolation level ${t.isolationLevel}`),t.accessMode&&e.push(t.accessMode),typeof t.deferrable=="boolean"&&e.push(t.deferrable?"deferrable":"not deferrable"),Y.raw(e.join(" "))}setTransaction(t){return this.session.execute(Y`set transaction ${this.getTransactionConfigSQL(t)}`)}}W(r1,f0,"PgTransaction");function yv(r){return typeof r=="string"&&/^true$/i.test(r)}function Uk(r){const t={scheme:"duckdb-wasm:"},e=new URL(r);if(!e.protocol.startsWith("duckdb-wasm:"))throw new Error(`Expected scheme to be "duckdb-wasm:" but got "${e.protocol}"`);e.searchParams.get("bundles")==="import-url"&&(t.bundles="import-url");const n=e.searchParams.get("logger");n&&yv(n)&&(t.logger=!0);const i=e.searchParams.get("storage");switch(i){case Ha.ORIGIN_PRIVATE_FS:{e.host.length>0&&console.warn(`Host "${e.host}" will be ignored while using Origin Private FS`);const s=e.searchParams.get("write");t.storage={type:Ha.ORIGIN_PRIVATE_FS,path:e.pathname.startsWith("/")?e.pathname.slice(1):e.pathname,...s&&yv(s)&&{accessMode:Bx.READ_WRITE}};break}case null:break;default:console.warn(`Unknown storage type "${i}"`);break}return t}var m0,g0;class n1 extends(g0=t1,m0=St,g0){constructor(t,e,n,i,s,o){super({sql:e,params:n}),this.client=t,this.queryString=e,this.params=n,this.logger=i,this.fields=s,this.customResultMapper=o}async execute(t={}){const e=pv(this.params,t);this.logger.logQuery(this.queryString,e);const{fields:n,queryString:i,client:s,customResultMapper:o}=this,a=await s;return a.query(i,e)}async all(t={}){const e=pv(this.params,t);return this.logger.logQuery(this.queryString,e),(await this.client).query(this.queryString,e)}}W(n1,m0,"DuckDBWasmPreparedQuery");var y0,v0;const Ju=class Ju extends(v0=e1,y0=St,v0){constructor(e,n,i,s={}){super(n);W(this,"logger");this.client=e,this.schema=i,this.options=s,this.logger=s.logger??new FT}prepareQuery(e,n,i,s,o){return new n1(this.client,e.sql,e.params,this.logger,n,o)}async query(e,n){return this.logger.logQuery(e,n),(await this.client).query(e,n)}async queryObjects(e,n){return this.logger.logQuery(e,n),(await this.client).query(e,n)}transaction(e,n){return $U(this.client,async i=>{const s=new Ju(i,this.dialect,this.schema,this.options),o=new If(this.dialect,s,this.schema);return n&&await o.setTransaction(n),e(o)})}};W(Ju,y0,"DuckDBWasmSession");let qu=Ju;var _0,b0;const tc=class tc extends(b0=r1,_0=St,b0){constructor(e,n,i,s=0){super(e,n,i,s);W(this,"dialect");W(this,"session");this.dialect=e,this.session=n}async transaction(e){return GU(this.session.client,"",async n=>{const i=new qu(n,this.dialect,this.schema,this.session.options),s=new tc(this.dialect,i,this.schema);return e(s)})}};W(tc,_0,"DuckDBWasmTransaction");let If=tc;var w0,x0;class i1 extends(x0=$p,w0=St,x0){}W(i1,w0,"DuckDBWasmDatabase");function Aa(r,t={}){const e=new Ea({casing:t.casing});let n;t.logger===!0?n=new RT:t.logger!==!1&&(n=t.logger);let i;if(t.schema){const a=Sk(t.schema,Ak);i={fullSchema:t.schema,schema:a.tables,tableNamesMap:a.tableNamesMap}}const s=new qu(r,e,i,{logger:n}),o=new i1(e,s,i);return o.$client=r,o}function vv(r,t){const e=Uk(r);let n;return e.bundles==="import-url"?n=(async()=>{const s=await pf();switch(s){case"browser":return(await Ei(async()=>{const{getImportUrlBundles:o}=await import("./import-url-browser-CPN8ipMD.js");return{getImportUrlBundles:o}},__vite__mapDeps([3,4]))).getImportUrlBundles();case"node":return await(await Ei(async()=>{const{getImportUrlBundles:o}=await import("./import-url-node-BfNoxhRr.js");return{getImportUrlBundles:o}},__vite__mapDeps([5,4]))).getImportUrlBundles();default:throw new Error(`Unsupported environment: "${s}"`)}})():n=(async()=>{const s=await pf();switch(s){case"browser":return(await Ei(async()=>{const{getBundles:o}=await import("./default-browser-BrgSDbLD.js");return{getBundles:o}},[])).getBundles();case"node":return await(await Ei(async()=>{const{getBundles:o}=await import("./default-node-DzW5muPs.js");return{getBundles:o}},__vite__mapDeps([0,1,2]))).getBundles();default:throw new Error(`Unsupported environment: "${s}"`)}})(),Aa(TT({bundles:n,logger:e.logger?new Ux:void 0,storage:e.storage}),t)}function _v(...r){if(typeof r[0]=="string")return vv(r[0],r[1]);if(bk(r[0])){const{connection:t,client:e,...n}=r[0];if(e)return Aa(e,n);if(typeof t=="string")return vv(t,n);if(typeof t>"u")throw new Error("connection option is required");return Aa(TT({bundles:t.bundles,logger:t.logger,storage:t.storage}),n)}return Aa(r[0],r[1])}(r=>{function t(e){return Aa({options:{parsers:{},serializers:{}}},e)}r.mock=t})(_v||(_v={}));var Gh={exports:{}};/*! + `;await e.execute(Y`CREATE SCHEMA IF NOT EXISTS ${Y.identifier(s)}`),await e.execute(o);const l=(await e.all(Y`select id, hash, created_at from ${Y.identifier(s)}.${Y.identifier(i)} order by created_at desc limit 1`))[0];await e.transaction(async u=>{for await(const c of t)if(!l||Number(l.created_at){var a;return e[o]!==void 0||((a=n[o])==null?void 0:a.onUpdateFn)!==void 0}),s=i.length;return Y.join(i.flatMap((o,a)=>{const l=n[o],u=e[o]??Y.param(l.onUpdateFn(),l),c=Y`${Y.identifier(this.casing.getColumnCasing(l))} = ${u}`;return a{const a=[];if(lt(s,Pt.Aliased)&&s.isSelectionField)a.push(Y.identifier(s.fieldAlias));else if(lt(s,Pt.Aliased)||lt(s,Pt)){const l=lt(s,Pt.Aliased)?s.sql:s;e?a.push(new Pt(l.queryChunks.map(u=>lt(u,Lr)?Y.identifier(this.casing.getColumnCasing(u)):u))):a.push(l),lt(s,Pt.Aliased)&&a.push(Y` as ${Y.identifier(s.fieldAlias)}`)}else lt(s,rr)&&(e?a.push(Y.identifier(this.casing.getColumnCasing(s))):a.push(s));return oa==null?void 0:a.some(({alias:P})=>P===(nt[It.Symbol.IsAlias]?vs(nt):nt[It.Symbol.BaseName])))(x.field.table)){const nt=vs(x.field.table);throw new Error(`Your "${x.path.join("->")}" field references a column "${nt}"."${x.field.name}", but the table "${nt}" is not part of the query! Did you forget to join it?`)}const p=!a||a.length===0,y=this.buildWithCTE(t);let _;d&&(_=d===!0?Y` distinct`:Y` distinct on (${Y.join(d.on,Y`, `)})`);const S=this.buildSelection(g,{isSingleTable:p}),T=this.buildFromTable(o),v=this.buildJoins(a),E=i?Y` where ${i}`:void 0,w=s?Y` having ${s}`:void 0;let B;l&&l.length>0&&(B=Y` order by ${Y.join(l,Y`, `)}`);let N;u&&u.length>0&&(N=Y` group by ${Y.join(u,Y`, `)}`);const $=typeof c=="object"||typeof c=="number"&&c>=0?Y` limit ${c}`:void 0,it=h?Y` offset ${h}`:void 0,I=Y.empty();if(f){const x=Y` for ${Y.raw(f.strength)}`;f.config.of&&x.append(Y` of ${Y.join(Array.isArray(f.config.of)?f.config.of:[f.config.of],Y`, `)}`),f.config.noWait?x.append(Y` no wait`):f.config.skipLocked&&x.append(Y` skip locked`),I.append(x)}const Z=Y`${y}select${_} ${S} from ${T}${v}${E}${N}${w}${B}${$}${it}${I}`;return m.length>0?this.buildSetOperations(Z,m):Z}buildSetOperations(t,e){const[n,...i]=e;if(!n)throw new Error("Cannot pass undefined values to any set operator");return i.length===0?this.buildSetOperationQuery({leftSelect:t,setOperator:n}):this.buildSetOperations(this.buildSetOperationQuery({leftSelect:t,setOperator:n}),i)}buildSetOperationQuery({leftSelect:t,setOperator:{type:e,isAll:n,rightSelect:i,limit:s,orderBy:o,offset:a}}){const l=Y`(${t.getSQL()}) `,u=Y`(${i.getSQL()})`;let c;if(o&&o.length>0){const m=[];for(const g of o)if(lt(g,Lr))m.push(Y.identifier(g.name));else if(lt(g,Pt)){for(let p=0;p=0?Y` limit ${s}`:void 0,f=Y.raw(`${e} ${n?"all ":""}`),d=a?Y` offset ${a}`:void 0;return Y`${l}${f}${u}${c}${h}${d}`}buildInsertQuery({table:t,values:e,onConflict:n,returning:i,withList:s,select:o,overridingSystemValue_:a}){const l=[],u=t[It.Symbol.Columns],c=Object.entries(u).filter(([y,_])=>!_.shouldDisableInsert()),h=c.map(([,y])=>Y.identifier(this.casing.getColumnCasing(y)));if(o){const y=e;lt(y,Pt)?l.push(y):l.push(y.getSQL())}else{const y=e;l.push(Y.raw("values "));for(const[_,S]of y.entries()){const T=[];for(const[v,E]of c){const w=S[v];if(w===void 0||lt(w,ci)&&w.value===void 0)if(E.defaultFn!==void 0){const B=E.defaultFn(),N=lt(B,Pt)?B:Y.param(B,E);T.push(N)}else if(!E.default&&E.onUpdateFn!==void 0){const B=E.onUpdateFn(),N=lt(B,Pt)?B:Y.param(B,E);T.push(N)}else T.push(Y`default`);else T.push(w)}l.push(T),_({dbKey:S.name,tsKey:_,field:ei(S,a),relationTableTsKey:void 0,isJson:!1,selection:[]}));else{const y=Object.fromEntries(Object.entries(s.columns).map(([w,B])=>[w,ei(B,a)]));if(o.where){const w=typeof o.where=="function"?o.where(y,wk()):o.where;m=w&&Xu(w,a)}const _=[];let S=[];if(o.columns){let w=!1;for(const[B,N]of Object.entries(o.columns))N!==void 0&&B in s.columns&&(!w&&N===!0&&(w=!0),S.push(B));S.length>0&&(S=w?S.filter(B=>{var N;return((N=o.columns)==null?void 0:N[B])===!0}):Object.keys(s.columns).filter(B=>!S.includes(B)))}else S=Object.keys(s.columns);for(const w of S){const B=s.columns[w];_.push({tsKey:w,value:B})}let T=[];o.with&&(T=Object.entries(o.with).filter(w=>!!w[1]).map(([w,B])=>({tsKey:w,queryConfig:B,relation:s.relations[w]})));let v;if(o.extras){v=typeof o.extras=="function"?o.extras(y,{sql:Y}):o.extras;for(const[w,B]of Object.entries(v))_.push({tsKey:w,value:MT(B,a)})}for(const{tsKey:w,value:B}of _)c.push({dbKey:lt(B,Pt.Aliased)?B.fieldAlias:s.columns[w].name,tsKey:w,field:lt(B,rr)?ei(B,a):B,relationTableTsKey:void 0,isJson:!1,selection:[]});let E=typeof o.orderBy=="function"?o.orderBy(y,xk()):o.orderBy??[];Array.isArray(E)||(E=[E]),d=E.map(w=>lt(w,rr)?ei(w,a):Xu(w,a)),h=o.limit,f=o.offset;for(const{tsKey:w,queryConfig:B,relation:N}of T){const $=Ek(e,n,N),it=Xa(N.referencedTable),I=n[it],Z=`${a}_${w}`,x=yf(...$.fields.map((C,R)=>OT(ei($.references[R],Z),ei(C,a)))),nt=this.buildRelationalQueryWithoutPK({fullSchema:t,schema:e,tableNamesMap:n,table:t[I],tableConfig:e[I],queryConfig:lt(N,Os)?B===!0?{limit:1}:{...B,limit:1}:B,tableAlias:Z,joinOn:x,nestedQueryRelation:N}),P=Y`${Y.identifier(Z)}.${Y.identifier("data")}`.as(w);g.push({on:Y`true`,table:new Nr(nt.sql,{},Z),alias:Z,joinType:"left",lateral:!0}),c.push({dbKey:w,tsKey:w,field:P,relationTableTsKey:I,isJson:!0,selection:nt.selection})}}if(c.length===0)throw new Bp({message:`No fields selected for table "${s.tsName}" ("${a}")`});let p;if(m=yf(u,m),l){let y=Y`json_build_array(${Y.join(c.map(({field:T,tsKey:v,isJson:E})=>E?Y`${Y.identifier(`${a}_${v}`)}.${Y.identifier("data")}`:lt(T,Pt.Aliased)?T.sql:T),Y`, `)})`;lt(l,Yu)&&(y=Y`coalesce(json_agg(${y}${d.length>0?Y` order by ${Y.join(d,Y`, `)}`:void 0}), '[]'::json)`);const _=[{dbKey:"data",tsKey:"data",field:y.as("data"),isJson:!0,relationTableTsKey:s.tsName,selection:c}];h!==void 0||f!==void 0||d.length>0?(p=this.buildSelectQuery({table:$h(i,a),fields:{},fieldsFlat:[{path:[],field:Y.raw("*")}],where:m,limit:h,offset:f,orderBy:d,setOperators:[]}),m=void 0,h=void 0,f=void 0,d=[]):p=$h(i,a),p=this.buildSelectQuery({table:lt(p,Xr)?p:new Nr(p,{},a),fields:{},fieldsFlat:_.map(({field:T})=>({path:[],field:lt(T,rr)?ei(T,a):T})),joins:g,where:m,limit:h,offset:f,orderBy:d,setOperators:[]})}else p=this.buildSelectQuery({table:$h(i,a),fields:{},fieldsFlat:c.map(({field:y})=>({path:[],field:lt(y,rr)?ei(y,a):y})),joins:g,where:m,limit:h,offset:f,orderBy:d,setOperators:[]});return{tableTsKey:s.tsName,sql:p,selection:c}}}W(Ea,z_,"PgDialect");var V_;V_=St;class YT{getSelectedFields(){return this._.selectedFields}}W(YT,V_,"TypedQueryBuilder");var j_;j_=St;class Or{constructor(t){W(this,"fields");W(this,"session");W(this,"dialect");W(this,"withList",[]);W(this,"distinct");W(this,"authToken");this.fields=t.fields,this.session=t.session,this.dialect=t.dialect,t.withList&&(this.withList=t.withList),this.distinct=t.distinct}setToken(t){return this.authToken=t,this}from(t){const e=!!this.fields,n=t;let i;return this.fields?i=this.fields:lt(n,Nr)?i=Object.fromEntries(Object.keys(n._.selectedFields).map(s=>[s,n[s]])):lt(n,zp)?i=n[Qe].selectedFields:lt(n,Pt)?i={}:i=_k(n),new Vp({table:n,fields:i,isPartialSelect:e,session:this.session,dialect:this.dialect,withList:this.withList,distinct:this.distinct}).setToken(this.authToken)}}W(Or,j_,"PgSelectBuilder");var $_,G_;class qT extends(G_=YT,$_=St,G_){constructor({table:e,fields:n,isPartialSelect:i,session:s,dialect:o,withList:a,distinct:l}){super();W(this,"_");W(this,"config");W(this,"joinsNotNullableMap");W(this,"tableName");W(this,"isPartialSelect");W(this,"session");W(this,"dialect");W(this,"leftJoin",this.createJoin("left"));W(this,"rightJoin",this.createJoin("right"));W(this,"innerJoin",this.createJoin("inner"));W(this,"fullJoin",this.createJoin("full"));W(this,"union",this.createSetOperator("union",!1));W(this,"unionAll",this.createSetOperator("union",!0));W(this,"intersect",this.createSetOperator("intersect",!1));W(this,"intersectAll",this.createSetOperator("intersect",!0));W(this,"except",this.createSetOperator("except",!1));W(this,"exceptAll",this.createSetOperator("except",!0));this.config={withList:a,table:e,fields:{...n},distinct:l,setOperators:[]},this.isPartialSelect=i,this.session=s,this.dialect=o,this._={selectedFields:n},this.tableName=fs(e),this.joinsNotNullableMap=typeof this.tableName=="string"?{[this.tableName]:!0}:{}}createJoin(e){return(n,i)=>{var a;const s=this.tableName,o=fs(n);if(typeof o=="string"&&((a=this.config.joins)!=null&&a.some(l=>l.alias===o)))throw new Error(`Alias "${o}" is already used in this query`);if(!this.isPartialSelect&&(Object.keys(this.joinsNotNullableMap).length===1&&typeof s=="string"&&(this.config.fields={[s]:this.config.fields}),typeof o=="string"&&!lt(n,Pt))){const l=lt(n,Nr)?n._.selectedFields:lt(n,ji)?n[Qe].selectedFields:n[It.Symbol.Columns];this.config.fields[o]=l}if(typeof i=="function"&&(i=i(new Proxy(this.config.fields,new or({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.joins||(this.config.joins=[]),this.config.joins.push({on:i,table:n,joinType:e,alias:o}),typeof o=="string")switch(e){case"left":{this.joinsNotNullableMap[o]=!1;break}case"right":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([l])=>[l,!1])),this.joinsNotNullableMap[o]=!0;break}case"inner":{this.joinsNotNullableMap[o]=!0;break}case"full":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([l])=>[l,!1])),this.joinsNotNullableMap[o]=!1;break}}return this}}createSetOperator(e,n){return i=>{const s=typeof i=="function"?i(Pk()):i;if(!Up(this.getSelectedFields(),s.getSelectedFields()))throw new Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return this.config.setOperators.push({type:e,isAll:n,rightSelect:s}),this}}addSetOperators(e){return this.config.setOperators.push(...e),this}where(e){return typeof e=="function"&&(e=e(new Proxy(this.config.fields,new or({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.where=e,this}having(e){return typeof e=="function"&&(e=e(new Proxy(this.config.fields,new or({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.having=e,this}groupBy(...e){if(typeof e[0]=="function"){const n=e[0](new Proxy(this.config.fields,new or({sqlAliasedBehavior:"alias",sqlBehavior:"sql"})));this.config.groupBy=Array.isArray(n)?n:[n]}else this.config.groupBy=e;return this}orderBy(...e){if(typeof e[0]=="function"){const n=e[0](new Proxy(this.config.fields,new or({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),i=Array.isArray(n)?n:[n];this.config.setOperators.length>0?this.config.setOperators.at(-1).orderBy=i:this.config.orderBy=i}else{const n=e;this.config.setOperators.length>0?this.config.setOperators.at(-1).orderBy=n:this.config.orderBy=n}return this}limit(e){return this.config.setOperators.length>0?this.config.setOperators.at(-1).limit=e:this.config.limit=e,this}offset(e){return this.config.setOperators.length>0?this.config.setOperators.at(-1).offset=e:this.config.offset=e,this}for(e,n={}){return this.config.lockingClause={strength:e,config:n},this}getSQL(){return this.dialect.buildSelectQuery(this.config)}toSQL(){const{typings:e,...n}=this.dialect.sqlToQuery(this.getSQL());return n}as(e){return new Proxy(new Nr(this.getSQL(),this.config.fields,e),new or({alias:e,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}getSelectedFields(){return new Proxy(this.config.fields,new or({alias:this.tableName,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}$dynamic(){return this}}W(qT,$_,"PgSelectQueryBuilder");var W_,H_;class Vp extends(H_=qT,W_=St,H_){constructor(){super(...arguments);W(this,"authToken");W(this,"execute",e=>Ur.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken)))}_prepare(e){const{session:n,config:i,dialect:s,joinsNotNullableMap:o,authToken:a}=this;if(!n)throw new Error("Cannot execute a query on a query builder. Please use a database instance instead.");return Ur.startActiveSpan("drizzle.prepareQuery",()=>{const l=Cs(i.fields),u=n.prepareQuery(s.sqlToQuery(this.getSQL()),l,e,!0);return u.joinsNotNullableMap=o,u.setToken(a)})}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}}W(Vp,W_,"PgSelect");vk(Vp,[$i]);function zo(r,t){return(e,n,...i)=>{const s=[n,...i].map(o=>({type:r,isAll:t,rightSelect:o}));for(const o of s)if(!Up(e.getSelectedFields(),o.rightSelect.getSelectedFields()))throw new Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return e.addSetOperators(s)}}const Pk=()=>({union:Rk,unionAll:Fk,intersect:Dk,intersectAll:Lk,except:Nk,exceptAll:Bk}),Rk=zo("union",!1),Fk=zo("union",!0),Dk=zo("intersect",!1),Lk=zo("intersect",!0),Nk=zo("except",!1),Bk=zo("except",!0);var X_;X_=St;class jp{constructor(t){W(this,"dialect");W(this,"dialectConfig");W(this,"$with",(t,e)=>{const n=this;return{as:s=>(typeof s=="function"&&(s=s(n)),new Proxy(new Np(s.getSQL(),e??("getSelectedFields"in s?s.getSelectedFields()??{}:{}),t,!0),new or({alias:t,sqlAliasedBehavior:"alias",sqlBehavior:"error"})))}});this.dialect=lt(t,Ea)?t:void 0,this.dialectConfig=lt(t,Ea)?void 0:t}with(...t){const e=this;function n(o){return new Or({fields:o??void 0,session:void 0,dialect:e.getDialect(),withList:t})}function i(o){return new Or({fields:o??void 0,session:void 0,dialect:e.getDialect(),distinct:!0})}function s(o,a){return new Or({fields:a??void 0,session:void 0,dialect:e.getDialect(),distinct:{on:o}})}return{select:n,selectDistinct:i,selectDistinctOn:s}}select(t){return new Or({fields:t??void 0,session:void 0,dialect:this.getDialect()})}selectDistinct(t){return new Or({fields:t??void 0,session:void 0,dialect:this.getDialect(),distinct:!0})}selectDistinctOn(t,e){return new Or({fields:e??void 0,session:void 0,dialect:this.getDialect(),distinct:{on:t}})}getDialect(){return this.dialect||(this.dialect=new Ea(this.dialectConfig)),this.dialect}}W(jp,X_,"PgQueryBuilder");var Y_;Y_=St;class bf{constructor(t,e,n,i,s){W(this,"authToken");this.table=t,this.session=e,this.dialect=n,this.withList=i,this.overridingSystemValue_=s}setToken(t){return this.authToken=t,this}overridingSystemValue(){return this.overridingSystemValue_=!0,this}values(t){if(t=Array.isArray(t)?t:[t],t.length===0)throw new Error("values() must be called with at least one value");const e=t.map(n=>{const i={},s=this.table[It.Symbol.Columns];for(const o of Object.keys(n)){const a=n[o];i[o]=lt(a,Pt)?a:new ci(a,s[o])}return i});return new wf(this.table,e,this.session,this.dialect,this.withList,!1,this.overridingSystemValue_).setToken(this.authToken)}select(t){const e=typeof t=="function"?t(new jp):t;if(!lt(e,Pt)&&!Up(this.table[gf],e._.selectedFields))throw new Error("Insert select error: selected fields are not the same or are in a different order compared to the table definition");return new wf(this.table,e,this.session,this.dialect,this.withList,!0)}}W(bf,Y_,"PgInsertBuilder");var q_,Q_;class wf extends(Q_=$i,q_=St,Q_){constructor(e,n,i,s,o,a,l){super();W(this,"config");W(this,"authToken");W(this,"execute",e=>Ur.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken)));this.session=i,this.dialect=s,this.config={table:e,values:n,withList:o,select:a,overridingSystemValue_:l}}returning(e=this.config.table[It.Symbol.Columns]){return this.config.returningFields=e,this.config.returning=Cs(e),this}onConflictDoNothing(e={}){if(e.target===void 0)this.config.onConflict=Y`do nothing`;else{let n="";n=Array.isArray(e.target)?e.target.map(s=>this.dialect.escapeName(this.dialect.casing.getColumnCasing(s))).join(","):this.dialect.escapeName(this.dialect.casing.getColumnCasing(e.target));const i=e.where?Y` where ${e.where}`:void 0;this.config.onConflict=Y`(${Y.raw(n)})${i} do nothing`}return this}onConflictDoUpdate(e){if(e.where&&(e.targetWhere||e.setWhere))throw new Error('You cannot use both "where" and "targetWhere"/"setWhere" at the same time - "where" is deprecated, use "targetWhere" or "setWhere" instead.');const n=e.where?Y` where ${e.where}`:void 0,i=e.targetWhere?Y` where ${e.targetWhere}`:void 0,s=e.setWhere?Y` where ${e.setWhere}`:void 0,o=this.dialect.buildUpdateSet(this.config.table,DT(this.config.table,e.set));let a="";return a=Array.isArray(e.target)?e.target.map(l=>this.dialect.escapeName(this.dialect.casing.getColumnCasing(l))).join(","):this.dialect.escapeName(this.dialect.casing.getColumnCasing(e.target)),this.config.onConflict=Y`(${Y.raw(a)})${i} do update set ${o}${n}${s}`,this}getSQL(){return this.dialect.buildInsertQuery(this.config)}toSQL(){const{typings:e,...n}=this.dialect.sqlToQuery(this.getSQL());return n}_prepare(e){return Ur.startActiveSpan("drizzle.prepareQuery",()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0))}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new or({alias:vs(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}W(wf,q_,"PgInsert");var Z_,K_;class QT extends(K_=$i,Z_=St,K_){constructor(e,n,i){super();W(this,"config");W(this,"authToken");W(this,"execute",e=>Ur.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken)));this.session=n,this.dialect=i,this.config={view:e}}concurrently(){if(this.config.withNoData!==void 0)throw new Error("Cannot use concurrently and withNoData together");return this.config.concurrently=!0,this}withNoData(){if(this.config.concurrently!==void 0)throw new Error("Cannot use concurrently and withNoData together");return this.config.withNoData=!0,this}getSQL(){return this.dialect.buildRefreshMaterializedViewQuery(this.config)}toSQL(){const{typings:e,...n}=this.dialect.sqlToQuery(this.getSQL());return n}_prepare(e){return Ur.startActiveSpan("drizzle.prepareQuery",()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),void 0,e,!0))}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}}W(QT,Z_,"PgRefreshMaterializedView");var J_;J_=St;class xf{constructor(t,e,n,i){W(this,"authToken");this.table=t,this.session=e,this.dialect=n,this.withList=i}setToken(t){return this.authToken=t,this}set(t){return new ZT(this.table,DT(this.table,t),this.session,this.dialect,this.withList).setToken(this.authToken)}}W(xf,J_,"PgUpdateBuilder");var t0,e0;class ZT extends(e0=$i,t0=St,e0){constructor(e,n,i,s,o){super();W(this,"config");W(this,"tableName");W(this,"joinsNotNullableMap");W(this,"leftJoin",this.createJoin("left"));W(this,"rightJoin",this.createJoin("right"));W(this,"innerJoin",this.createJoin("inner"));W(this,"fullJoin",this.createJoin("full"));W(this,"authToken");W(this,"execute",e=>this._prepare().execute(e,this.authToken));this.session=i,this.dialect=s,this.config={set:n,table:e,withList:o,joins:[]},this.tableName=fs(e),this.joinsNotNullableMap=typeof this.tableName=="string"?{[this.tableName]:!0}:{}}from(e){const n=e,i=fs(n);return typeof i=="string"&&(this.joinsNotNullableMap[i]=!0),this.config.from=n,this}getTableLikeFields(e){return lt(e,Xr)?e[It.Symbol.Columns]:lt(e,Nr)?e._.selectedFields:e[Qe].selectedFields}createJoin(e){return(n,i)=>{const s=fs(n);if(typeof s=="string"&&this.config.joins.some(o=>o.alias===s))throw new Error(`Alias "${s}" is already used in this query`);if(typeof i=="function"){const o=this.config.from&&!lt(this.config.from,Pt)?this.getTableLikeFields(this.config.from):void 0;i=i(new Proxy(this.config.table[It.Symbol.Columns],new or({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})),o&&new Proxy(o,new or({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))}if(this.config.joins.push({on:i,table:n,joinType:e,alias:s}),typeof s=="string")switch(e){case"left":{this.joinsNotNullableMap[s]=!1;break}case"right":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([o])=>[o,!1])),this.joinsNotNullableMap[s]=!0;break}case"inner":{this.joinsNotNullableMap[s]=!0;break}case"full":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([o])=>[o,!1])),this.joinsNotNullableMap[s]=!1;break}}return this}}where(e){return this.config.where=e,this}returning(e){if(!e&&(e=Object.assign({},this.config.table[It.Symbol.Columns]),this.config.from)){const n=fs(this.config.from);if(typeof n=="string"&&this.config.from&&!lt(this.config.from,Pt)){const i=this.getTableLikeFields(this.config.from);e[n]=i}for(const i of this.config.joins){const s=fs(i.table);if(typeof s=="string"&&!lt(i.table,Pt)){const o=this.getTableLikeFields(i.table);e[s]=o}}}return this.config.returningFields=e,this.config.returning=Cs(e),this}getSQL(){return this.dialect.buildUpdateQuery(this.config)}toSQL(){const{typings:e,...n}=this.dialect.sqlToQuery(this.getSQL());return n}_prepare(e){const n=this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0);return n.joinsNotNullableMap=this.joinsNotNullableMap,n}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new or({alias:vs(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}W(ZT,t0,"PgUpdate");var r0,n0,i0;const Ma=class Ma extends(i0=Pt,n0=St,r0=Symbol.toStringTag,i0){constructor(e){super(Ma.buildEmbeddedCount(e.source,e.filters).queryChunks);W(this,"sql");W(this,"token");W(this,r0,"PgCountBuilder");W(this,"session");this.params=e,this.mapWith(Number),this.session=e.session,this.sql=Ma.buildCount(e.source,e.filters)}static buildEmbeddedCount(e,n){return Y`(select count(*) from ${e}${Y.raw(" where ").if(n)}${n})`}static buildCount(e,n){return Y`select count(*) as count from ${e}${Y.raw(" where ").if(n)}${n};`}setToken(e){return this.token=e,this}then(e,n){return Promise.resolve(this.session.count(this.sql,this.token)).then(e,n)}catch(e){return this.then(void 0,e)}finally(e){return this.then(n=>(e==null||e(),n),n=>{throw e==null||e(),n})}};W(Ma,n0,"PgCountBuilder");let Sf=Ma;var s0;s0=St;class KT{constructor(t,e,n,i,s,o,a){this.fullSchema=t,this.schema=e,this.tableNamesMap=n,this.table=i,this.tableConfig=s,this.dialect=o,this.session=a}findMany(t){return new Tf(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,t||{},"many")}findFirst(t){return new Tf(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,t?{...t,limit:1}:{limit:1},"first")}}W(KT,s0,"PgRelationalQueryBuilder");var o0,a0;class Tf extends(a0=$i,o0=St,a0){constructor(e,n,i,s,o,a,l,u,c){super();W(this,"authToken");this.fullSchema=e,this.schema=n,this.tableNamesMap=i,this.table=s,this.tableConfig=o,this.dialect=a,this.session=l,this.config=u,this.mode=c}_prepare(e){return Ur.startActiveSpan("drizzle.prepareQuery",()=>{const{query:n,builtQuery:i}=this._toSQL();return this.session.prepareQuery(i,void 0,e,!0,(s,o)=>{const a=s.map(l=>vf(this.schema,this.tableConfig,l,n.selection,o));return this.mode==="first"?a[0]:a})})}prepare(e){return this._prepare(e)}_getQuery(){return this.dialect.buildRelationalQueryWithoutPK({fullSchema:this.fullSchema,schema:this.schema,tableNamesMap:this.tableNamesMap,table:this.table,tableConfig:this.tableConfig,queryConfig:this.config,tableAlias:this.tableConfig.tsName})}getSQL(){return this._getQuery().sql}_toSQL(){const e=this._getQuery(),n=this.dialect.sqlToQuery(e.sql);return{query:e,builtQuery:n}}toSQL(){return this._toSQL().builtQuery}setToken(e){return this.authToken=e,this}execute(){return Ur.startActiveSpan("drizzle.operation",()=>this._prepare().execute(void 0,this.authToken))}}W(Tf,o0,"PgRelationalQuery");var l0,u0;class JT extends(u0=$i,l0=St,u0){constructor(t,e,n,i){super(),this.execute=t,this.sql=e,this.query=n,this.mapBatchResult=i}getSQL(){return this.sql}getQuery(){return this.query}mapResult(t,e){return e?this.mapBatchResult(t):t}_prepare(){return this}isResponseInArrayMode(){return!1}}W(JT,l0,"PgRaw");var c0;c0=St;class $p{constructor(t,e,n){W(this,"query");W(this,"$with",(t,e)=>{const n=this;return{as:s=>(typeof s=="function"&&(s=s(new jp(n.dialect))),new Proxy(new Np(s.getSQL(),e??("getSelectedFields"in s?s.getSelectedFields()??{}:{}),t,!0),new or({alias:t,sqlAliasedBehavior:"alias",sqlBehavior:"error"})))}});W(this,"authToken");if(this.dialect=t,this.session=e,this._=n?{schema:n.schema,fullSchema:n.fullSchema,tableNamesMap:n.tableNamesMap,session:e}:{schema:void 0,fullSchema:{},tableNamesMap:{},session:e},this.query={},this._.schema)for(const[i,s]of Object.entries(this._.schema))this.query[i]=new KT(n.fullSchema,this._.schema,this._.tableNamesMap,n.fullSchema[i],s,t,e)}$count(t,e){return new Sf({source:t,filters:e,session:this.session})}with(...t){const e=this;function n(u){return new Or({fields:u??void 0,session:e.session,dialect:e.dialect,withList:t})}function i(u){return new Or({fields:u??void 0,session:e.session,dialect:e.dialect,withList:t,distinct:!0})}function s(u,c){return new Or({fields:c??void 0,session:e.session,dialect:e.dialect,withList:t,distinct:{on:u}})}function o(u){return new xf(u,e.session,e.dialect,t)}function a(u){return new bf(u,e.session,e.dialect,t)}function l(u){return new _f(u,e.session,e.dialect,t)}return{select:n,selectDistinct:i,selectDistinctOn:s,update:o,insert:a,delete:l}}select(t){return new Or({fields:t??void 0,session:this.session,dialect:this.dialect})}selectDistinct(t){return new Or({fields:t??void 0,session:this.session,dialect:this.dialect,distinct:!0})}selectDistinctOn(t,e){return new Or({fields:e??void 0,session:this.session,dialect:this.dialect,distinct:{on:t}})}update(t){return new xf(t,this.session,this.dialect)}insert(t){return new bf(t,this.session,this.dialect)}delete(t){return new _f(t,this.session,this.dialect)}refreshMaterializedView(t){return new QT(t,this.session,this.dialect)}execute(t){const e=typeof t=="string"?Y.raw(t):t.getSQL(),n=this.dialect.sqlToQuery(e),i=this.session.prepareQuery(n,void 0,void 0,!1);return new JT(()=>i.execute(void 0,this.authToken),e,n,s=>i.mapResult(s,!0))}transaction(t,e){return this.session.transaction(t,e)}}W($p,c0,"PgDatabase");var h0;h0=St;class t1{constructor(t){W(this,"authToken");W(this,"joinsNotNullableMap");this.query=t}getQuery(){return this.query}mapResult(t,e){return t}setToken(t){return this.authToken=t,this}}W(t1,h0,"PgPreparedQuery");var d0;d0=St;class e1{constructor(t){this.dialect=t}execute(t,e){return Ur.startActiveSpan("drizzle.operation",()=>Ur.startActiveSpan("drizzle.prepareQuery",()=>this.prepareQuery(this.dialect.sqlToQuery(t),void 0,void 0,!1)).setToken(e).execute(void 0,e))}all(t){return this.prepareQuery(this.dialect.sqlToQuery(t),void 0,void 0,!1).all()}async count(t,e){const n=await this.execute(t,e);return Number(n[0].count)}}W(e1,d0,"PgSession");var f0,p0;class r1 extends(p0=$p,f0=St,p0){constructor(t,e,n,i=0){super(t,e,n),this.schema=n,this.nestedIndex=i}rollback(){throw new CT}getTransactionConfigSQL(t){const e=[];return t.isolationLevel&&e.push(`isolation level ${t.isolationLevel}`),t.accessMode&&e.push(t.accessMode),typeof t.deferrable=="boolean"&&e.push(t.deferrable?"deferrable":"not deferrable"),Y.raw(e.join(" "))}setTransaction(t){return this.session.execute(Y`set transaction ${this.getTransactionConfigSQL(t)}`)}}W(r1,f0,"PgTransaction");function yv(r){return typeof r=="string"&&/^true$/i.test(r)}function Uk(r){const t={scheme:"duckdb-wasm:"},e=new URL(r);if(!e.protocol.startsWith("duckdb-wasm:"))throw new Error(`Expected scheme to be "duckdb-wasm:" but got "${e.protocol}"`);e.searchParams.get("bundles")==="import-url"&&(t.bundles="import-url");const n=e.searchParams.get("logger");n&&yv(n)&&(t.logger=!0);const i=e.searchParams.get("storage");switch(i){case Ha.ORIGIN_PRIVATE_FS:{e.host.length>0&&console.warn(`Host "${e.host}" will be ignored while using Origin Private FS`);const s=e.searchParams.get("write");t.storage={type:Ha.ORIGIN_PRIVATE_FS,path:e.pathname.startsWith("/")?e.pathname.slice(1):e.pathname,...s&&yv(s)&&{accessMode:Bx.READ_WRITE}};break}case null:break;default:console.warn(`Unknown storage type "${i}"`);break}return t}var m0,g0;class n1 extends(g0=t1,m0=St,g0){constructor(t,e,n,i,s,o){super({sql:e,params:n}),this.client=t,this.queryString=e,this.params=n,this.logger=i,this.fields=s,this.customResultMapper=o}async execute(t={}){const e=pv(this.params,t);this.logger.logQuery(this.queryString,e);const{fields:n,queryString:i,client:s,customResultMapper:o}=this,a=await s;return a.query(i,e)}async all(t={}){const e=pv(this.params,t);return this.logger.logQuery(this.queryString,e),(await this.client).query(this.queryString,e)}}W(n1,m0,"DuckDBWasmPreparedQuery");var y0,v0;const Ju=class Ju extends(v0=e1,y0=St,v0){constructor(e,n,i,s={}){super(n);W(this,"logger");this.client=e,this.schema=i,this.options=s,this.logger=s.logger??new FT}prepareQuery(e,n,i,s,o){return new n1(this.client,e.sql,e.params,this.logger,n,o)}async query(e,n){return this.logger.logQuery(e,n),(await this.client).query(e,n)}async queryObjects(e,n){return this.logger.logQuery(e,n),(await this.client).query(e,n)}transaction(e,n){return $U(this.client,async i=>{const s=new Ju(i,this.dialect,this.schema,this.options),o=new If(this.dialect,s,this.schema);return n&&await o.setTransaction(n),e(o)})}};W(Ju,y0,"DuckDBWasmSession");let qu=Ju;var _0,b0;const tc=class tc extends(b0=r1,_0=St,b0){constructor(e,n,i,s=0){super(e,n,i,s);W(this,"dialect");W(this,"session");this.dialect=e,this.session=n}async transaction(e){return GU(this.session.client,"",async n=>{const i=new qu(n,this.dialect,this.schema,this.session.options),s=new tc(this.dialect,i,this.schema);return e(s)})}};W(tc,_0,"DuckDBWasmTransaction");let If=tc;var w0,x0;class i1 extends(x0=$p,w0=St,x0){}W(i1,w0,"DuckDBWasmDatabase");function Aa(r,t={}){const e=new Ea({casing:t.casing});let n;t.logger===!0?n=new RT:t.logger!==!1&&(n=t.logger);let i;if(t.schema){const a=Sk(t.schema,Ak);i={fullSchema:t.schema,schema:a.tables,tableNamesMap:a.tableNamesMap}}const s=new qu(r,e,i,{logger:n}),o=new i1(e,s,i);return o.$client=r,o}function vv(r,t){const e=Uk(r);let n;return e.bundles==="import-url"?n=(async()=>{const s=await pf();switch(s){case"browser":return(await Ei(async()=>{const{getImportUrlBundles:o}=await import("./import-url-browser-CPN8ipMD.js");return{getImportUrlBundles:o}},__vite__mapDeps([3,4]))).getImportUrlBundles();case"node":return await(await Ei(async()=>{const{getImportUrlBundles:o}=await import("./import-url-node-BfNoxhRr.js");return{getImportUrlBundles:o}},__vite__mapDeps([5,4]))).getImportUrlBundles();default:throw new Error(`Unsupported environment: "${s}"`)}})():n=(async()=>{const s=await pf();switch(s){case"browser":return(await Ei(async()=>{const{getBundles:o}=await import("./default-browser-BrgSDbLD.js");return{getBundles:o}},[])).getBundles();case"node":return await(await Ei(async()=>{const{getBundles:o}=await import("./default-node-BGL82aP-.js");return{getBundles:o}},__vite__mapDeps([0,1,2]))).getBundles();default:throw new Error(`Unsupported environment: "${s}"`)}})(),Aa(TT({bundles:n,logger:e.logger?new Ux:void 0,storage:e.storage}),t)}function _v(...r){if(typeof r[0]=="string")return vv(r[0],r[1]);if(bk(r[0])){const{connection:t,client:e,...n}=r[0];if(e)return Aa(e,n);if(typeof t=="string")return vv(t,n);if(typeof t>"u")throw new Error("connection option is required");return Aa(TT({bundles:t.bundles,logger:t.logger,storage:t.storage}),n)}return Aa(r[0],r[1])}(r=>{function t(e){return Aa({options:{parsers:{},serializers:{}}},e)}r.mock=t})(_v||(_v={}));var Gh={exports:{}};/*! JSZip v3.10.1 - A JavaScript class for generating and reading zip files diff --git a/assets/memory-long-term-IlxAN4z1.js b/assets/memory-long-term-CAn9tYrg.js similarity index 92% rename from assets/memory-long-term-IlxAN4z1.js rename to assets/memory-long-term-CAn9tYrg.js index 1d6b691d887840f535e67cc3ae304b271e4a0d05..185338354eb11cfa9d4a22ce74c7ddeecc02af84 100644 --- a/assets/memory-long-term-IlxAN4z1.js +++ b/assets/memory-long-term-CAn9tYrg.js @@ -1 +1 @@ -import{d as r,bG as l,q as c,bw as d,A as m,o as p,c as u,a as t,e as o,D as n}from"./index-7-fr_lhT.js";const _={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},x={relative:""},v={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},f={text:"neutral-300 dark:neutral-500","text-nowrap":""},g={"text-nowrap":"","text-3xl":"","font-semibold":""},h=r({__name:"memory-long-term",setup(y){const i=l(),{t:s}=c();return(b,e)=>{const a=d("motion");return m((p(),u("div",_,[t("button",{onClick:e[0]||(e[0]=w=>o(i).back())},e[1]||(e[1]=[t("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),t("h1",x,[t("div",v,[t("span",f,n(o(s)("settings.title")),1)]),t("div",g,n(o(s)("settings.pages.modules.memory-long-term.title")),1)])])),[[a]])}}});export{h as default}; +import{d as r,bG as l,q as c,bw as d,A as m,o as p,c as u,a as t,e as o,D as n}from"./index-hDb1Lsb8.js";const _={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},x={relative:""},v={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},f={text:"neutral-300 dark:neutral-500","text-nowrap":""},g={"text-nowrap":"","text-3xl":"","font-semibold":""},h=r({__name:"memory-long-term",setup(y){const i=l(),{t:s}=c();return(b,e)=>{const a=d("motion");return m((p(),u("div",_,[t("button",{onClick:e[0]||(e[0]=w=>o(i).back())},e[1]||(e[1]=[t("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),t("h1",x,[t("div",v,[t("span",f,n(o(s)("settings.title")),1)]),t("div",g,n(o(s)("settings.pages.modules.memory-long-term.title")),1)])])),[[a]])}}});export{h as default}; diff --git a/assets/memory-short-term-B90Jb-nv.js b/assets/memory-short-term-D1c0-nne.js similarity index 92% rename from assets/memory-short-term-B90Jb-nv.js rename to assets/memory-short-term-D1c0-nne.js index 7e8b0b4fe27768680b9e06f7de651de6f7d4e481..d0321e32245e5024ff4eee9e02c3213346023631 100644 --- a/assets/memory-short-term-B90Jb-nv.js +++ b/assets/memory-short-term-D1c0-nne.js @@ -1 +1 @@ -import{d as a,bG as l,q as c,bw as d,A as m,o as p,c as u,a as t,e as o,D as n}from"./index-7-fr_lhT.js";const _={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},x={relative:""},v={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},f={text:"neutral-300 dark:neutral-500","text-nowrap":""},y={"text-nowrap":"","text-3xl":"","font-semibold":""},k=a({__name:"memory-short-term",setup(b){const i=l(),{t:s}=c();return(h,e)=>{const r=d("motion");return m((p(),u("div",_,[t("button",{onClick:e[0]||(e[0]=w=>o(i).back())},e[1]||(e[1]=[t("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),t("h1",x,[t("div",v,[t("span",f,n(o(s)("settings.title")),1)]),t("div",y,n(o(s)("settings.pages.modules.memory-short-term.title")),1)])])),[[r]])}}});export{k as default}; +import{d as a,bG as l,q as c,bw as d,A as m,o as p,c as u,a as t,e as o,D as n}from"./index-hDb1Lsb8.js";const _={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},x={relative:""},v={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},f={text:"neutral-300 dark:neutral-500","text-nowrap":""},y={"text-nowrap":"","text-3xl":"","font-semibold":""},k=a({__name:"memory-short-term",setup(b){const i=l(),{t:s}=c();return(h,e)=>{const r=d("motion");return m((p(),u("div",_,[t("button",{onClick:e[0]||(e[0]=w=>o(i).back())},e[1]||(e[1]=[t("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),t("h1",x,[t("div",v,[t("span",f,n(o(s)("settings.title")),1)]),t("div",y,n(o(s)("settings.pages.modules.memory-short-term.title")),1)])])),[[r]])}}});export{k as default}; diff --git a/assets/messages-DWFXV8un.js b/assets/messages-CfNsB1Jl.js similarity index 78% rename from assets/messages-DWFXV8un.js rename to assets/messages-CfNsB1Jl.js index 177a8acb7d07072d9a04a2b8124171bb582b5e98..8ff4bff3b8e5627e65dfcbdb502c3df48e5e9fb5 100644 --- a/assets/messages-DWFXV8un.js +++ b/assets/messages-CfNsB1Jl.js @@ -1 +1 @@ -import{u as m,_ as g,l as _}from"./queues-BATLkujj.js";import"./live2d-zip-loader-dDw0Wbbr.js";import{d as v,g as t,c as l,o as u,a as e,b,e as x,D as c,bx as k,by as h}from"./index-7-fr_lhT.js";import{u as z}from"./queue-B4R0QEYc.js";const w={flex:"","flex-col":"","gap-2":"","p-2":""},y={flex:"","flex-row":"","gap-2":""},S={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},V={"w-full":"",flex:"","flex-row":"","gap-4":""},M={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},E=v({__name:"messages",setup(Q){const s=t(""),d=t([]),a=t(!1),f=z({handlers:[async i=>{d.value.push(i.data)}]}),r=m(f);async function p(){a.value=!0,r.add(s.value),r.add(_),s.value="",a.value=!1}return(i,n)=>(u(),l("div",w,[e("div",y,[b(x(g),{modelValue:s.value,"onUpdate:modelValue":n[0]||(n[0]=o=>s.value=o),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:p},null,8,["modelValue"]),e("button",S,c(a.value?"Processing...":"Send"),1)]),e("div",V,[e("div",M,[n[1]||(n[1]=e("h3",{"font-semibold":""}," TTS Message ",-1)),(u(!0),l(k,null,h(d.value,o=>(u(),l("div",{key:o},[e("div",null,c(o),1)]))),128))])])]))}});export{E as default}; +import{u as m,_ as g,l as _}from"./queues-DEhcWTMJ.js";import"./live2d-zip-loader--bTGFeQd.js";import{d as v,g as t,c as l,o as u,a as e,b,e as x,D as c,bx as k,by as h}from"./index-hDb1Lsb8.js";import{u as z}from"./queue-c563jmhe.js";const w={flex:"","flex-col":"","gap-2":"","p-2":""},y={flex:"","flex-row":"","gap-2":""},S={"rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-4":""},V={"w-full":"",flex:"","flex-row":"","gap-4":""},M={"w-full":"","rounded-lg":"",bg:"zinc-100 dark:zinc-700","p-2":""},E=v({__name:"messages",setup(Q){const s=t(""),d=t([]),a=t(!1),f=z({handlers:[async i=>{d.value.push(i.data)}]}),r=m(f);async function p(){a.value=!0,r.add(s.value),r.add(_),s.value="",a.value=!1}return(i,n)=>(u(),l("div",w,[e("div",y,[b(x(g),{modelValue:s.value,"onUpdate:modelValue":n[0]||(n[0]=o=>s.value=o),placeholder:"Message",p:"2",bg:"zinc-100 dark:zinc-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:p},null,8,["modelValue"]),e("button",S,c(a.value?"Processing...":"Send"),1)]),e("div",V,[e("div",M,[n[1]||(n[1]=e("h3",{"font-semibold":""}," TTS Message ",-1)),(u(!0),l(k,null,h(d.value,o=>(u(),l("div",{key:o},[e("div",null,c(o),1)]))),128))])])]))}});export{E as default}; diff --git a/assets/microsoft-speech-BNSZ5Owh.js b/assets/microsoft-speech-YPGP1I4-.js similarity index 73% rename from assets/microsoft-speech-BNSZ5Owh.js rename to assets/microsoft-speech-YPGP1I4-.js index 615498135cd5586d29032e0a7c4c9e082f22c81c..c6174a1529486581908aa67d0a40e1c2dc263cb6 100644 --- a/assets/microsoft-speech-BNSZ5Owh.js +++ b/assets/microsoft-speech-YPGP1I4-.js @@ -1 +1 @@ -import{_ as P}from"./FieldInput.vue_vue_type_script_setup_true_lang-BhtqkEkU.js";import"./live2d-zip-loader-dDw0Wbbr.js";import{d as q,q as B,s as K,g as m,h as p,x as L,o as M,y as f,b as g,e as i}from"./index-7-fr_lhT.js";import{u as T}from"./providers-B7zWTIWF.js";import{u as z}from"./speech-DK9my_xu.js";import{_ as E,a as F,b as G}from"./SpeechVoiceSettings.vue_vue_type_script_setup_true_lang-DW1qhqmX.js";import"./Input.vue_vue_type_script_setup_true_lang-58p3G1RX.js";import"./index-Be1NqeGb.js";import"./TestDummyMarker.vue_vue_type_script_setup_true_lang-OSsy22LU.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CUVIcbSL.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-D5rspuJc.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BNzPx9yx.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C3sxqbyi.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BCwQg86s.js";const t="microsoft-speech",x="v1",oe=q({__name:"microsoft-speech",setup(H){const{t:h}=B(),U={pitch:0,speed:1,volume:0},r=z(),d=T(),{providers:n}=K(d),u=m(0),b=m(1),_=m(0),c=p({get:()=>{var o;return((o=n.value[t])==null?void 0:o.region)||"eastasia"},set:o=>{n.value[t]||(n.value[t]={}),n.value[t].region=o}}),C=p(()=>{var o;return!!((o=n.value[t])!=null&&o.apiKey)}),y=p(()=>r.availableVoices[t]||[]),k=p(()=>r.availableLanguages);async function $(o,e,a){const l=d.getProviderInstance(t);if(!l)throw new Error("Failed to initialize speech provider");const s=d.getProviderConfig(t),S=s.model||x,w={...s,region:c.value,disableSsml:!a};if(!a&&e){const V=y.value.find(v=>v.id===e);if(V){const v=r.generateSSML(o,V,{...s,pitch:u.value});return await r.speech(l,S,v,e,w)}}return await r.speech(l,S,o,e,w)}return(o,e)=>(M(),L(i(G),{"provider-id":t,"default-model":x,"additional-settings":U},{"basic-settings":f(()=>[g(i(P),{modelValue:c.value,"onUpdate:modelValue":e[0]||(e[0]=a=>c.value=a),label:i(h)("settings.pages.providers.provider.microsoft-speech.fields.field.region.label"),description:i(h)("settings.pages.providers.provider.microsoft-speech.fields.field.region.description"),placeholder:"eastasia",required:"",type:"text"},null,8,["modelValue","label","description"])]),"voice-settings":f(({voiceSettings:a,updateVoiceSettings:l})=>[g(i(F),{pitch:u.value,"onUpdate:pitch":e[1]||(e[1]=s=>u.value=s),speed:b.value,"onUpdate:speed":e[2]||(e[2]=s=>b.value=s),volume:_.value,"onUpdate:volume":e[3]||(e[3]=s=>_.value=s),settings:a,"show-pitch":!0,"show-speed":!0,"show-volume":!0,onUpdate:l},null,8,["pitch","speed","volume","settings","onUpdate"])]),playground:f(()=>[g(i(E),{"available-voices":y.value,"available-languages":k.value,"generate-speech":$,"api-key-configured":C.value,"default-text":"Hello! This is a test of the Microsoft Speech synthesis."},null,8,["available-voices","available-languages","api-key-configured"])]),_:1}))}});export{oe as default}; +import{_ as P}from"./FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js";import"./live2d-zip-loader--bTGFeQd.js";import{d as q,q as B,s as K,g as m,h as p,x as L,o as M,y as f,b as g,e as i}from"./index-hDb1Lsb8.js";import{u as T}from"./providers-adQ6cb75.js";import{u as z}from"./speech-D3H5B80W.js";import{_ as E,a as F,b as G}from"./SpeechVoiceSettings.vue_vue_type_script_setup_true_lang-D0Yiu-Ma.js";import"./Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js";import"./index-Be1NqeGb.js";import"./TestDummyMarker.vue_vue_type_script_setup_true_lang-DvXVr5Qy.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-UCuivhvU.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-CHpN3yiY.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CYv3qJbi.js";const t="microsoft-speech",x="v1",oe=q({__name:"microsoft-speech",setup(H){const{t:h}=B(),U={pitch:0,speed:1,volume:0},r=z(),d=T(),{providers:n}=K(d),u=m(0),b=m(1),_=m(0),c=p({get:()=>{var o;return((o=n.value[t])==null?void 0:o.region)||"eastasia"},set:o=>{n.value[t]||(n.value[t]={}),n.value[t].region=o}}),C=p(()=>{var o;return!!((o=n.value[t])!=null&&o.apiKey)}),y=p(()=>r.availableVoices[t]||[]),k=p(()=>r.availableLanguages);async function $(o,e,a){const l=d.getProviderInstance(t);if(!l)throw new Error("Failed to initialize speech provider");const s=d.getProviderConfig(t),S=s.model||x,w={...s,region:c.value,disableSsml:!a};if(!a&&e){const V=y.value.find(v=>v.id===e);if(V){const v=r.generateSSML(o,V,{...s,pitch:u.value});return await r.speech(l,S,v,e,w)}}return await r.speech(l,S,o,e,w)}return(o,e)=>(M(),L(i(G),{"provider-id":t,"default-model":x,"additional-settings":U},{"basic-settings":f(()=>[g(i(P),{modelValue:c.value,"onUpdate:modelValue":e[0]||(e[0]=a=>c.value=a),label:i(h)("settings.pages.providers.provider.microsoft-speech.fields.field.region.label"),description:i(h)("settings.pages.providers.provider.microsoft-speech.fields.field.region.description"),placeholder:"eastasia",required:"",type:"text"},null,8,["modelValue","label","description"])]),"voice-settings":f(({voiceSettings:a,updateVoiceSettings:l})=>[g(i(F),{pitch:u.value,"onUpdate:pitch":e[1]||(e[1]=s=>u.value=s),speed:b.value,"onUpdate:speed":e[2]||(e[2]=s=>b.value=s),volume:_.value,"onUpdate:volume":e[3]||(e[3]=s=>_.value=s),settings:a,"show-pitch":!0,"show-speed":!0,"show-volume":!0,onUpdate:l},null,8,["pitch","speed","volume","settings","onUpdate"])]),playground:f(()=>[g(i(E),{"available-voices":y.value,"available-languages":k.value,"generate-speech":$,"api-key-configured":C.value,"default-text":"Hello! This is a test of the Microsoft Speech synthesis."},null,8,["available-voices","available-languages","api-key-configured"])]),_:1}))}});export{oe as default}; diff --git a/assets/mistral-ai-CKRmqHIA.js b/assets/mistral-ai-BthqZXAX.js similarity index 67% rename from assets/mistral-ai-CKRmqHIA.js rename to assets/mistral-ai-BthqZXAX.js index 0d83acf498bad2354761042d6026616a58aa003b..150f5b0fb9456effee84ff65510f832f1fd68ae3 100644 --- a/assets/mistral-ai-CKRmqHIA.js +++ b/assets/mistral-ai-BthqZXAX.js @@ -1 +1 @@ -import"./live2d-zip-loader-dDw0Wbbr.js";import{d as U,q as V,bG as y,s as $,h as v,l as k,w as K,x as h,o as x,y as m,b as l,e as t}from"./index-7-fr_lhT.js";import{u as w}from"./providers-B7zWTIWF.js";import{_ as z,a as C}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CUVIcbSL.js";import{_ as M}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C3sxqbyi.js";import{_ as N,a as P}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BCwQg86s.js";import{_ as R}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BxRDV7Dm.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-D5rspuJc.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BNzPx9yx.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BhtqkEkU.js";import"./Input.vue_vue_type_script_setup_true_lang-58p3G1RX.js";const a="mistral-ai",J=U({__name:"mistral-ai",setup(S){const{t:p}=V(),_=y(),d=w(),{providers:o}=$(d),n=v(()=>d.getProviderMetadata(a)),s=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),r=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});k(()=>{var e,i;d.initializeProvider(a),s.value=((e=o.value[a])==null?void 0:e.apiKey)||"",r.value=((i=o.value[a])==null?void 0:i.baseUrl)||""}),K([s,r],()=>{o.value[a]={...o.value[a],apiKey:s.value,baseUrl:r.value||""}});function b(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var c,f;return x(),h(t(R),{"provider-name":(c=n.value)==null?void 0:c.localizedName,"provider-icon-color":(f=n.value)==null?void 0:f.iconColor,"on-back":()=>t(_).back()},{default:m(()=>[l(t(N),null,{default:m(()=>[l(t(P),{title:t(p)("settings.pages.providers.common.section.basic.title"),description:t(p)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:m(()=>{var u;return[l(t(M),{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=g=>s.value=g),"provider-name":(u=n.value)==null?void 0:u.localizedName,placeholder:"mis-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(z),{title:t(p)("settings.pages.providers.common.section.advanced.title")},{default:m(()=>[l(t(C),{modelValue:r.value,"onUpdate:modelValue":i[1]||(i[1]=u=>r.value=u),placeholder:"https://api.mistral.ai/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});export{J as default}; +import"./live2d-zip-loader--bTGFeQd.js";import{d as U,q as V,bG as y,s as $,h as v,l as k,w as K,x as h,o as x,y as m,b as l,e as t}from"./index-hDb1Lsb8.js";import{u as w}from"./providers-adQ6cb75.js";import{_ as z,a as C}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-UCuivhvU.js";import{_ as M}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-CHpN3yiY.js";import{_ as N,a as P}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CYv3qJbi.js";import{_ as R}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTOfxlwP.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js";import"./Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js";const a="mistral-ai",J=U({__name:"mistral-ai",setup(S){const{t:p}=V(),_=y(),d=w(),{providers:o}=$(d),n=v(()=>d.getProviderMetadata(a)),s=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),r=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});k(()=>{var e,i;d.initializeProvider(a),s.value=((e=o.value[a])==null?void 0:e.apiKey)||"",r.value=((i=o.value[a])==null?void 0:i.baseUrl)||""}),K([s,r],()=>{o.value[a]={...o.value[a],apiKey:s.value,baseUrl:r.value||""}});function b(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var c,f;return x(),h(t(R),{"provider-name":(c=n.value)==null?void 0:c.localizedName,"provider-icon-color":(f=n.value)==null?void 0:f.iconColor,"on-back":()=>t(_).back()},{default:m(()=>[l(t(N),null,{default:m(()=>[l(t(P),{title:t(p)("settings.pages.providers.common.section.basic.title"),description:t(p)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:m(()=>{var u;return[l(t(M),{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=g=>s.value=g),"provider-name":(u=n.value)==null?void 0:u.localizedName,placeholder:"mis-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(z),{title:t(p)("settings.pages.providers.common.section.advanced.title")},{default:m(()=>[l(t(C),{modelValue:r.value,"onUpdate:modelValue":i[1]||(i[1]=u=>r.value=u),placeholder:"https://api.mistral.ai/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});export{J as default}; diff --git a/assets/moonshot-ai-CX56TEso.js b/assets/moonshot-ai-Dx7AV_cz.js similarity index 67% rename from assets/moonshot-ai-CX56TEso.js rename to assets/moonshot-ai-Dx7AV_cz.js index 6bef89d19d676727492cebe07178d87e7cc5f960..f477e43d90dafa5317cefab8eedce13ffc9d6d00 100644 --- a/assets/moonshot-ai-CX56TEso.js +++ b/assets/moonshot-ai-Dx7AV_cz.js @@ -1 +1 @@ -import"./live2d-zip-loader-dDw0Wbbr.js";import{d as h,q as U,bG as V,s as y,h as v,l as $,w as k,x as K,o as x,y as m,b as l,e as t}from"./index-7-fr_lhT.js";import{u as w}from"./providers-B7zWTIWF.js";import{_ as z,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CUVIcbSL.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C3sxqbyi.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BCwQg86s.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BxRDV7Dm.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-D5rspuJc.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BNzPx9yx.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BhtqkEkU.js";import"./Input.vue_vue_type_script_setup_true_lang-58p3G1RX.js";const a="moonshot-ai",J=h({__name:"moonshot-ai",setup(B){const{t:p}=U(),_=V(),d=w(),{providers:o}=y(d),n=v(()=>d.getProviderMetadata(a)),i=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),r=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});$(()=>{var e,s;d.initializeProvider(a),i.value=((e=o.value[a])==null?void 0:e.apiKey)||"",r.value=((s=o.value[a])==null?void 0:s.baseUrl)||""}),k([i,r],()=>{o.value[a]={...o.value[a],apiKey:i.value,baseUrl:r.value||""}});function b(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,s)=>{var c,f;return x(),K(t(S),{"provider-name":(c=n.value)==null?void 0:c.localizedName,"provider-icon":(f=n.value)==null?void 0:f.icon,"on-back":()=>t(_).back()},{default:m(()=>[l(t(P),null,{default:m(()=>[l(t(R),{title:t(p)("settings.pages.providers.common.section.basic.title"),description:t(p)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:m(()=>{var u;return[l(t(N),{modelValue:i.value,"onUpdate:modelValue":s[0]||(s[0]=g=>i.value=g),"provider-name":(u=n.value)==null?void 0:u.localizedName,placeholder:"ms-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(z),{title:t(p)("settings.pages.providers.common.section.advanced.title")},{default:m(()=>[l(t(M),{modelValue:r.value,"onUpdate:modelValue":s[1]||(s[1]=u=>r.value=u),placeholder:"https://api.moonshot.cn/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});export{J as default}; +import"./live2d-zip-loader--bTGFeQd.js";import{d as h,q as U,bG as V,s as y,h as v,l as $,w as k,x as K,o as x,y as m,b as l,e as t}from"./index-hDb1Lsb8.js";import{u as w}from"./providers-adQ6cb75.js";import{_ as z,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-UCuivhvU.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-CHpN3yiY.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CYv3qJbi.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTOfxlwP.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js";import"./Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js";const a="moonshot-ai",J=h({__name:"moonshot-ai",setup(B){const{t:p}=U(),_=V(),d=w(),{providers:o}=y(d),n=v(()=>d.getProviderMetadata(a)),i=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),r=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});$(()=>{var e,s;d.initializeProvider(a),i.value=((e=o.value[a])==null?void 0:e.apiKey)||"",r.value=((s=o.value[a])==null?void 0:s.baseUrl)||""}),k([i,r],()=>{o.value[a]={...o.value[a],apiKey:i.value,baseUrl:r.value||""}});function b(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,s)=>{var c,f;return x(),K(t(S),{"provider-name":(c=n.value)==null?void 0:c.localizedName,"provider-icon":(f=n.value)==null?void 0:f.icon,"on-back":()=>t(_).back()},{default:m(()=>[l(t(P),null,{default:m(()=>[l(t(R),{title:t(p)("settings.pages.providers.common.section.basic.title"),description:t(p)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:m(()=>{var u;return[l(t(N),{modelValue:i.value,"onUpdate:modelValue":s[0]||(s[0]=g=>i.value=g),"provider-name":(u=n.value)==null?void 0:u.localizedName,placeholder:"ms-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(z),{title:t(p)("settings.pages.providers.common.section.advanced.title")},{default:m(()=>[l(t(M),{modelValue:r.value,"onUpdate:modelValue":s[1]||(s[1]=u=>r.value=u),placeholder:"https://api.moonshot.cn/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});export{J as default}; diff --git a/assets/novita-ai-8wPkVedi.js b/assets/novita-ai-adUHAUPJ.js similarity index 67% rename from assets/novita-ai-8wPkVedi.js rename to assets/novita-ai-adUHAUPJ.js index 89d96d3a0e027d762a12ce474e95d62faf3d21f5..e7d711f8eb38e747d929a648d34cdd5ea4eb3eb5 100644 --- a/assets/novita-ai-8wPkVedi.js +++ b/assets/novita-ai-adUHAUPJ.js @@ -1 +1 @@ -import"./live2d-zip-loader-dDw0Wbbr.js";import{d as U,q as V,bG as y,s as $,h as m,l as k,w as K,x as h,o as x,y as p,b as l,e as t}from"./index-7-fr_lhT.js";import{u as w}from"./providers-B7zWTIWF.js";import{_ as z,a as C}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CUVIcbSL.js";import{_ as M}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C3sxqbyi.js";import{_ as N,a as P}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BCwQg86s.js";import{_ as R}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BxRDV7Dm.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-D5rspuJc.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BNzPx9yx.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BhtqkEkU.js";import"./Input.vue_vue_type_script_setup_true_lang-58p3G1RX.js";const a="novita-ai",J=U({__name:"novita-ai",setup(S){const{t:d}=V(),_=y(),v=w(),{providers:o}=$(v),n=m(()=>v.getProviderMetadata(a)),r=m({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),s=m({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});k(()=>{var e,i;v.initializeProvider(a),r.value=((e=o.value[a])==null?void 0:e.apiKey)||"",s.value=((i=o.value[a])==null?void 0:i.baseUrl)||""}),K([r,s],()=>{o.value[a]={...o.value[a],apiKey:r.value,baseUrl:s.value||""}});function b(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var c,f;return x(),h(t(R),{"provider-name":(c=n.value)==null?void 0:c.localizedName,"provider-icon-color":(f=n.value)==null?void 0:f.iconColor,"on-back":()=>t(_).back()},{default:p(()=>[l(t(N),null,{default:p(()=>[l(t(P),{title:t(d)("settings.pages.providers.common.section.basic.title"),description:t(d)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:p(()=>{var u;return[l(t(M),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=g=>r.value=g),"provider-name":(u=n.value)==null?void 0:u.localizedName,placeholder:"nvt-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(z),{title:t(d)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[l(t(C),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=u=>s.value=u),placeholder:"https://api.novita.ai/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});export{J as default}; +import"./live2d-zip-loader--bTGFeQd.js";import{d as U,q as V,bG as y,s as $,h as m,l as k,w as K,x as h,o as x,y as p,b as l,e as t}from"./index-hDb1Lsb8.js";import{u as w}from"./providers-adQ6cb75.js";import{_ as z,a as C}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-UCuivhvU.js";import{_ as M}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-CHpN3yiY.js";import{_ as N,a as P}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CYv3qJbi.js";import{_ as R}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTOfxlwP.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js";import"./Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js";const a="novita-ai",J=U({__name:"novita-ai",setup(S){const{t:d}=V(),_=y(),v=w(),{providers:o}=$(v),n=m(()=>v.getProviderMetadata(a)),r=m({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),s=m({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});k(()=>{var e,i;v.initializeProvider(a),r.value=((e=o.value[a])==null?void 0:e.apiKey)||"",s.value=((i=o.value[a])==null?void 0:i.baseUrl)||""}),K([r,s],()=>{o.value[a]={...o.value[a],apiKey:r.value,baseUrl:s.value||""}});function b(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var c,f;return x(),h(t(R),{"provider-name":(c=n.value)==null?void 0:c.localizedName,"provider-icon-color":(f=n.value)==null?void 0:f.iconColor,"on-back":()=>t(_).back()},{default:p(()=>[l(t(N),null,{default:p(()=>[l(t(P),{title:t(d)("settings.pages.providers.common.section.basic.title"),description:t(d)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:p(()=>{var u;return[l(t(M),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=g=>r.value=g),"provider-name":(u=n.value)==null?void 0:u.localizedName,placeholder:"nvt-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(z),{title:t(d)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[l(t(C),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=u=>s.value=u),placeholder:"https://api.novita.ai/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});export{J as default}; diff --git a/assets/ollama-uyGva0oA.js b/assets/ollama-BX3zQ6KB.js similarity index 88% rename from assets/ollama-uyGva0oA.js rename to assets/ollama-BX3zQ6KB.js index 139f30a0605d695f18d21efd3fd5195ff2af6b93..4f4bd01c4cbf8cae636873322d702069203add40 100644 --- a/assets/ollama-uyGva0oA.js +++ b/assets/ollama-BX3zQ6KB.js @@ -1 +1 @@ -import{_ as P}from"./Input.vue_vue_type_script_setup_true_lang-58p3G1RX.js";import{d as K,bK as x,bL as U,c as g,o as f,b as m,g as $,w as C,bw as N,a as _,A as D,bI as I,C as O,D as M,bx as R,by as S,q as z,bG as A,s as F,h as q,l as L,c8 as T,x as E,y as b,e as t}from"./index-7-fr_lhT.js";import"./live2d-zip-loader-dDw0Wbbr.js";import{u as G}from"./providers-B7zWTIWF.js";import{a as j,_ as H}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CUVIcbSL.js";import{_ as J,a as Q}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BCwQg86s.js";import{_ as W}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BxRDV7Dm.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-D5rspuJc.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BNzPx9yx.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BhtqkEkU.js";const X={flex:"~ gap-2"},Y=K({__name:"InputKeyValue",props:x({name:null,keyPlaceholder:null,valuePlaceholder:null},{propertyKey:{required:!0},propertyKeyModifiers:{},propertyValue:{required:!0},propertyValueModifiers:{}}),emits:["update:propertyKey","update:propertyValue"],setup(v){const o=v,s=U(v,"propertyKey"),u=U(v,"propertyValue");return(r,a)=>(f(),g("div",X,[m(P,{modelValue:s.value,"onUpdate:modelValue":a[0]||(a[0]=n=>s.value=n),placeholder:o.keyPlaceholder,class:"w-1/2"},null,8,["modelValue","placeholder"]),m(P,{modelValue:u.value,"onUpdate:modelValue":a[1]||(a[1]=n=>u.value=n),placeholder:o.valuePlaceholder,class:"w-1/2"},null,8,["modelValue","placeholder"])]))}}),Z={"max-w-full":""},ee={flex:"~ col gap-2"},le={class:"flex items-center gap-1 text-sm font-medium"},ae={key:0,class:"text-red-500"},te={class:"text-xs text-neutral-500 dark:text-neutral-400","text-nowrap":""},oe={flex:"~ col gap-2"},re=["onClick"],se=K({__name:"FieldKeyValues",props:x({label:null,description:null,name:null,keyPlaceholder:null,valuePlaceholder:null,required:{type:Boolean},inputClass:null},{modelValue:{required:!0},modelModifiers:{}}),emits:x(["remove","add"],["update:modelValue"]),setup(v,{emit:o}){const s=v,u=o,r=U(v,"modelValue"),a=$(""),n=$("");return C([a,n],()=>{u("add",a.value,n.value)}),(w,p)=>{const k=N("auto-animate");return f(),g("div",Z,[_("label",ee,[_("div",null,[_("div",le,[I(M(s.label)+" ",1),s.required!==!1?(f(),g("span",ae,"*")):O("",!0)]),_("div",te,M(s.description),1)]),D((f(),g("div",oe,[(f(!0),g(R,null,S(r.value,(y,l)=>(f(),g("div",{key:l,"w-full":"",flex:"","items-center":"","gap-2":""},[m(Y,{"property-key":y.key,"onUpdate:propertyKey":e=>y.key=e,"property-value":y.value,"onUpdate:propertyValue":e=>y.value=e,"key-placeholder":s.keyPlaceholder,"value-placeholder":s.valuePlaceholder,"w-full":""},null,8,["property-key","onUpdate:propertyKey","property-value","onUpdate:propertyValue","key-placeholder","value-placeholder"]),_("button",{onClick:e=>u("remove",l)},p[0]||(p[0]=[_("div",{"i-solar:minus-circle-line-duotone":"",size:"6"},null,-1)]),8,re)]))),128))])),[[k]])])])}}}),d="ollama",ge=K({__name:"ollama",setup(v){const{t:o}=z(),s=A(),u=G(),{providers:r}=F(u),a=q(()=>u.getProviderMetadata(d)),n=q({get:()=>{var l,e,i;return((l=r.value[d])==null?void 0:l.baseUrl)||((i=(e=a.value)==null?void 0:e.defaultOptions)==null?void 0:i.baseUrl)||""},set:l=>{r.value[d]||(r.value[d]={}),r.value[d].baseUrl=l}});L(()=>{var l,e,i,h;u.initializeProvider(d),n.value=((l=r.value[d])==null?void 0:l.baseUrl)||((i=(e=a.value)==null?void 0:e.defaultOptions)==null?void 0:i.baseUrl)||"",(h=r.value[d])!=null&&h.headers||(r.value[d].headers={})});function w(){var l;r.value[d]={...(l=a.value)==null?void 0:l.defaultOptions}}const p=T([{key:"",value:""}]);function k(l,e,i){l&&l.push({key:e,value:i})}function y(l,e){e&&(e.length===1?(e[0].key="",e[0].value=""):e.splice(l,1))}return C(p,l=>{l.length>0&&(l[l.length-1].key!==""||l[l.length-1].value!=="")&&l.push({key:"",value:""})},{deep:!0,immediate:!0}),(l,e)=>{var i,h;return f(),E(t(W),{"provider-name":(i=a.value)==null?void 0:i.localizedName,"provider-icon":(h=a.value)==null?void 0:h.icon,"on-back":()=>t(s).back()},{default:b(()=>[m(t(J),null,{default:b(()=>[m(t(Q),{title:t(o)("settings.pages.providers.common.section.basic.title"),description:t(o)("settings.pages.providers.common.section.basic.description"),"on-reset":w},{default:b(()=>{var c,V;return[m(t(j),{modelValue:n.value,"onUpdate:modelValue":e[0]||(e[0]=B=>n.value=B),placeholder:((V=(c=a.value)==null?void 0:c.defaultOptions)==null?void 0:V.baseUrl)||"",required:""},null,8,["modelValue","placeholder"])]}),_:1},8,["title","description"]),m(t(H),{title:t(o)("settings.pages.providers.common.section.advanced.title")},{default:b(()=>[m(t(se),{modelValue:p,"onUpdate:modelValue":e[1]||(e[1]=c=>p=c),label:t(o)("settings.pages.providers.common.section.advanced.fields.field.headers.label"),description:t(o)("settings.pages.providers.common.section.advanced.fields.field.headers.description"),"key-placeholder":t(o)("settings.pages.providers.common.section.advanced.fields.field.headers.key.placeholder"),"value-placeholder":t(o)("settings.pages.providers.common.section.advanced.fields.field.headers.value.placeholder"),onAdd:e[2]||(e[2]=(c,V)=>k(p,c,V)),onRemove:e[3]||(e[3]=c=>y(c,p))},null,8,["modelValue","label","description","key-placeholder","value-placeholder"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});export{ge as default}; +import{_ as P}from"./Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js";import{d as K,bK as x,bL as U,c as g,o as f,b as m,g as $,w as C,bw as N,a as _,A as D,bI as I,C as O,D as M,bx as R,by as S,q as z,bG as A,s as F,h as q,l as L,c8 as T,x as E,y as b,e as t}from"./index-hDb1Lsb8.js";import"./live2d-zip-loader--bTGFeQd.js";import{u as G}from"./providers-adQ6cb75.js";import{a as j,_ as H}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-UCuivhvU.js";import{_ as J,a as Q}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CYv3qJbi.js";import{_ as W}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTOfxlwP.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js";const X={flex:"~ gap-2"},Y=K({__name:"InputKeyValue",props:x({name:null,keyPlaceholder:null,valuePlaceholder:null},{propertyKey:{required:!0},propertyKeyModifiers:{},propertyValue:{required:!0},propertyValueModifiers:{}}),emits:["update:propertyKey","update:propertyValue"],setup(v){const o=v,s=U(v,"propertyKey"),u=U(v,"propertyValue");return(r,a)=>(f(),g("div",X,[m(P,{modelValue:s.value,"onUpdate:modelValue":a[0]||(a[0]=n=>s.value=n),placeholder:o.keyPlaceholder,class:"w-1/2"},null,8,["modelValue","placeholder"]),m(P,{modelValue:u.value,"onUpdate:modelValue":a[1]||(a[1]=n=>u.value=n),placeholder:o.valuePlaceholder,class:"w-1/2"},null,8,["modelValue","placeholder"])]))}}),Z={"max-w-full":""},ee={flex:"~ col gap-2"},le={class:"flex items-center gap-1 text-sm font-medium"},ae={key:0,class:"text-red-500"},te={class:"text-xs text-neutral-500 dark:text-neutral-400","text-nowrap":""},oe={flex:"~ col gap-2"},re=["onClick"],se=K({__name:"FieldKeyValues",props:x({label:null,description:null,name:null,keyPlaceholder:null,valuePlaceholder:null,required:{type:Boolean},inputClass:null},{modelValue:{required:!0},modelModifiers:{}}),emits:x(["remove","add"],["update:modelValue"]),setup(v,{emit:o}){const s=v,u=o,r=U(v,"modelValue"),a=$(""),n=$("");return C([a,n],()=>{u("add",a.value,n.value)}),(w,p)=>{const k=N("auto-animate");return f(),g("div",Z,[_("label",ee,[_("div",null,[_("div",le,[I(M(s.label)+" ",1),s.required!==!1?(f(),g("span",ae,"*")):O("",!0)]),_("div",te,M(s.description),1)]),D((f(),g("div",oe,[(f(!0),g(R,null,S(r.value,(y,l)=>(f(),g("div",{key:l,"w-full":"",flex:"","items-center":"","gap-2":""},[m(Y,{"property-key":y.key,"onUpdate:propertyKey":e=>y.key=e,"property-value":y.value,"onUpdate:propertyValue":e=>y.value=e,"key-placeholder":s.keyPlaceholder,"value-placeholder":s.valuePlaceholder,"w-full":""},null,8,["property-key","onUpdate:propertyKey","property-value","onUpdate:propertyValue","key-placeholder","value-placeholder"]),_("button",{onClick:e=>u("remove",l)},p[0]||(p[0]=[_("div",{"i-solar:minus-circle-line-duotone":"",size:"6"},null,-1)]),8,re)]))),128))])),[[k]])])])}}}),d="ollama",ge=K({__name:"ollama",setup(v){const{t:o}=z(),s=A(),u=G(),{providers:r}=F(u),a=q(()=>u.getProviderMetadata(d)),n=q({get:()=>{var l,e,i;return((l=r.value[d])==null?void 0:l.baseUrl)||((i=(e=a.value)==null?void 0:e.defaultOptions)==null?void 0:i.baseUrl)||""},set:l=>{r.value[d]||(r.value[d]={}),r.value[d].baseUrl=l}});L(()=>{var l,e,i,h;u.initializeProvider(d),n.value=((l=r.value[d])==null?void 0:l.baseUrl)||((i=(e=a.value)==null?void 0:e.defaultOptions)==null?void 0:i.baseUrl)||"",(h=r.value[d])!=null&&h.headers||(r.value[d].headers={})});function w(){var l;r.value[d]={...(l=a.value)==null?void 0:l.defaultOptions}}const p=T([{key:"",value:""}]);function k(l,e,i){l&&l.push({key:e,value:i})}function y(l,e){e&&(e.length===1?(e[0].key="",e[0].value=""):e.splice(l,1))}return C(p,l=>{l.length>0&&(l[l.length-1].key!==""||l[l.length-1].value!=="")&&l.push({key:"",value:""})},{deep:!0,immediate:!0}),(l,e)=>{var i,h;return f(),E(t(W),{"provider-name":(i=a.value)==null?void 0:i.localizedName,"provider-icon":(h=a.value)==null?void 0:h.icon,"on-back":()=>t(s).back()},{default:b(()=>[m(t(J),null,{default:b(()=>[m(t(Q),{title:t(o)("settings.pages.providers.common.section.basic.title"),description:t(o)("settings.pages.providers.common.section.basic.description"),"on-reset":w},{default:b(()=>{var c,V;return[m(t(j),{modelValue:n.value,"onUpdate:modelValue":e[0]||(e[0]=B=>n.value=B),placeholder:((V=(c=a.value)==null?void 0:c.defaultOptions)==null?void 0:V.baseUrl)||"",required:""},null,8,["modelValue","placeholder"])]}),_:1},8,["title","description"]),m(t(H),{title:t(o)("settings.pages.providers.common.section.advanced.title")},{default:b(()=>[m(t(se),{modelValue:p,"onUpdate:modelValue":e[1]||(e[1]=c=>p=c),label:t(o)("settings.pages.providers.common.section.advanced.fields.field.headers.label"),description:t(o)("settings.pages.providers.common.section.advanced.fields.field.headers.description"),"key-placeholder":t(o)("settings.pages.providers.common.section.advanced.fields.field.headers.key.placeholder"),"value-placeholder":t(o)("settings.pages.providers.common.section.advanced.fields.field.headers.value.placeholder"),onAdd:e[2]||(e[2]=(c,V)=>k(p,c,V)),onRemove:e[3]||(e[3]=c=>y(c,p))},null,8,["modelValue","label","description","key-placeholder","value-placeholder"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});export{ge as default}; diff --git a/assets/openai-CNZdQq6r.js b/assets/openai-C-ilwKTF.js similarity index 69% rename from assets/openai-CNZdQq6r.js rename to assets/openai-C-ilwKTF.js index db026e85572a388497f6615877bd1894e3cd226d..936181f0d45569fdf890eb68ee007206ef05dd48 100644 --- a/assets/openai-CNZdQq6r.js +++ b/assets/openai-C-ilwKTF.js @@ -1 +1 @@ -import"./live2d-zip-loader-dDw0Wbbr.js";import{d as h,q as U,bG as V,s as k,h as v,l as y,w as $,x as K,o as x,y as p,b as l,e as t}from"./index-7-fr_lhT.js";import{u as I}from"./providers-B7zWTIWF.js";import{_ as w,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CUVIcbSL.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C3sxqbyi.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BCwQg86s.js";import{_ as z}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BxRDV7Dm.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-D5rspuJc.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BNzPx9yx.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BhtqkEkU.js";import"./Input.vue_vue_type_script_setup_true_lang-58p3G1RX.js";const e="openai",J=h({__name:"openai",setup(A){const{t:u}=U(),_=V(),c=I(),{providers:a}=k(c),m=v(()=>c.getProviderMetadata(e)),i=v({get:()=>{var o;return((o=a.value[e])==null?void 0:o.apiKey)||""},set:o=>{a.value[e]||(a.value[e]={}),a.value[e].apiKey=o}}),r=v({get:()=>{var o;return((o=a.value[e])==null?void 0:o.baseUrl)||"https://api.openai.com/v1/"},set:o=>{a.value[e]||(a.value[e]={}),a.value[e].baseUrl=o}});y(()=>{var o,s;a.value[e]||(a.value[e]={baseUrl:"https://api.openai.com/v1/"}),i.value=((o=a.value[e])==null?void 0:o.apiKey)||"",r.value=((s=a.value[e])==null?void 0:s.baseUrl)||"https://api.openai.com/v1/"}),$([i,r],()=>{a.value[e]={...a.value[e],apiKey:i.value,baseUrl:r.value||"https://api.openai.com/v1/"}});function b(){a.value[e]={baseUrl:"https://api.openai.com/v1/"}}return(o,s)=>{var d,f;return x(),K(t(z),{"provider-name":((d=m.value)==null?void 0:d.localizedName)||"OpenAI","provider-icon":(f=m.value)==null?void 0:f.icon,"on-back":()=>t(_).back()},{default:p(()=>[l(t(R),null,{default:p(()=>[l(t(S),{title:t(u)("settings.pages.providers.common.section.basic.title"),description:t(u)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:p(()=>{var n;return[l(t(N),{modelValue:i.value,"onUpdate:modelValue":s[0]||(s[0]=g=>i.value=g),"provider-name":((n=m.value)==null?void 0:n.localizedName)||"OpenAI",placeholder:"sk-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(w),{title:t(u)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[l(t(M),{modelValue:r.value,"onUpdate:modelValue":s[1]||(s[1]=n=>r.value=n),placeholder:"https://api.openai.com/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});export{J as default}; +import"./live2d-zip-loader--bTGFeQd.js";import{d as h,q as U,bG as V,s as k,h as v,l as y,w as $,x as K,o as x,y as p,b as l,e as t}from"./index-hDb1Lsb8.js";import{u as I}from"./providers-adQ6cb75.js";import{_ as w,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-UCuivhvU.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-CHpN3yiY.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CYv3qJbi.js";import{_ as z}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTOfxlwP.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js";import"./Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js";const e="openai",J=h({__name:"openai",setup(A){const{t:u}=U(),_=V(),c=I(),{providers:a}=k(c),m=v(()=>c.getProviderMetadata(e)),i=v({get:()=>{var o;return((o=a.value[e])==null?void 0:o.apiKey)||""},set:o=>{a.value[e]||(a.value[e]={}),a.value[e].apiKey=o}}),r=v({get:()=>{var o;return((o=a.value[e])==null?void 0:o.baseUrl)||"https://api.openai.com/v1/"},set:o=>{a.value[e]||(a.value[e]={}),a.value[e].baseUrl=o}});y(()=>{var o,s;a.value[e]||(a.value[e]={baseUrl:"https://api.openai.com/v1/"}),i.value=((o=a.value[e])==null?void 0:o.apiKey)||"",r.value=((s=a.value[e])==null?void 0:s.baseUrl)||"https://api.openai.com/v1/"}),$([i,r],()=>{a.value[e]={...a.value[e],apiKey:i.value,baseUrl:r.value||"https://api.openai.com/v1/"}});function b(){a.value[e]={baseUrl:"https://api.openai.com/v1/"}}return(o,s)=>{var d,f;return x(),K(t(z),{"provider-name":((d=m.value)==null?void 0:d.localizedName)||"OpenAI","provider-icon":(f=m.value)==null?void 0:f.icon,"on-back":()=>t(_).back()},{default:p(()=>[l(t(R),null,{default:p(()=>[l(t(S),{title:t(u)("settings.pages.providers.common.section.basic.title"),description:t(u)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:p(()=>{var n;return[l(t(N),{modelValue:i.value,"onUpdate:modelValue":s[0]||(s[0]=g=>i.value=g),"provider-name":((n=m.value)==null?void 0:n.localizedName)||"OpenAI",placeholder:"sk-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(w),{title:t(u)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[l(t(M),{modelValue:r.value,"onUpdate:modelValue":s[1]||(s[1]=n=>r.value=n),placeholder:"https://api.openai.com/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});export{J as default}; diff --git a/assets/openrouter-ai-CX1NLDlM.js b/assets/openrouter-ai-DHIXyBwb.js similarity index 71% rename from assets/openrouter-ai-CX1NLDlM.js rename to assets/openrouter-ai-DHIXyBwb.js index 5b87791de0eb791a9074d981aeec19dbf27ca88a..a502fb975bfd473e49b7a50b67653143ac100dab 100644 --- a/assets/openrouter-ai-CX1NLDlM.js +++ b/assets/openrouter-ai-DHIXyBwb.js @@ -1 +1 @@ -import"./live2d-zip-loader-dDw0Wbbr.js";import{d as V,q as k,bG as y,s as $,h as _,l as K,w as O,x as h,o as x,y as v,b as d,e as l}from"./index-7-fr_lhT.js";import{u as w}from"./providers-B7zWTIWF.js";import{_ as z,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CUVIcbSL.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C3sxqbyi.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BCwQg86s.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BxRDV7Dm.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-D5rspuJc.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BNzPx9yx.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BhtqkEkU.js";import"./Input.vue_vue_type_script_setup_true_lang-58p3G1RX.js";const a="openrouter-ai",L=V({__name:"openrouter-ai",setup(B){const{t:c}=k(),b=y(),f=w(),{providers:o}=$(f),s=_(()=>f.getProviderMetadata(a)),i=_({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),n=_({get:()=>{var e,t,r;return((e=o.value[a])==null?void 0:e.baseUrl)||((r=(t=s.value)==null?void 0:t.defaultOptions)==null?void 0:r.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});K(()=>{var e,t,r,u;f.initializeProvider(a),i.value=((e=o.value[a])==null?void 0:e.apiKey)||"",n.value=((t=o.value[a])==null?void 0:t.baseUrl)||((u=(r=s.value)==null?void 0:r.defaultOptions)==null?void 0:u.baseUrl)||""}),O([i,n],()=>{var e,t;o.value[a]={...o.value[a],apiKey:i.value,baseUrl:n.value||((t=(e=s.value)==null?void 0:e.defaultOptions)==null?void 0:t.baseUrl)||""}});function U(){var e;o.value[a]={...(e=s.value)==null?void 0:e.defaultOptions}}return(e,t)=>{var r,u;return x(),h(l(S),{"provider-name":(r=s.value)==null?void 0:r.localizedName,"provider-icon":(u=s.value)==null?void 0:u.icon,"on-back":()=>l(b).back()},{default:v(()=>[d(l(P),null,{default:v(()=>[d(l(R),{title:l(c)("settings.pages.providers.common.section.basic.title"),description:l(c)("settings.pages.providers.common.section.basic.description"),"on-reset":U},{default:v(()=>{var p;return[d(l(N),{modelValue:i.value,"onUpdate:modelValue":t[0]||(t[0]=m=>i.value=m),"provider-name":(p=s.value)==null?void 0:p.localizedName,placeholder:"sk-or-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),d(l(z),{title:l(c)("settings.pages.providers.common.section.advanced.title")},{default:v(()=>{var p,m;return[d(l(M),{modelValue:n.value,"onUpdate:modelValue":t[1]||(t[1]=g=>n.value=g),placeholder:((m=(p=s.value)==null?void 0:p.defaultOptions)==null?void 0:m.baseUrl)||""},null,8,["modelValue","placeholder"])]}),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});export{L as default}; +import"./live2d-zip-loader--bTGFeQd.js";import{d as V,q as k,bG as y,s as $,h as _,l as K,w as O,x as h,o as x,y as v,b as d,e as l}from"./index-hDb1Lsb8.js";import{u as w}from"./providers-adQ6cb75.js";import{_ as z,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-UCuivhvU.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-CHpN3yiY.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CYv3qJbi.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTOfxlwP.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js";import"./Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js";const a="openrouter-ai",L=V({__name:"openrouter-ai",setup(B){const{t:c}=k(),b=y(),f=w(),{providers:o}=$(f),s=_(()=>f.getProviderMetadata(a)),i=_({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),n=_({get:()=>{var e,t,r;return((e=o.value[a])==null?void 0:e.baseUrl)||((r=(t=s.value)==null?void 0:t.defaultOptions)==null?void 0:r.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});K(()=>{var e,t,r,u;f.initializeProvider(a),i.value=((e=o.value[a])==null?void 0:e.apiKey)||"",n.value=((t=o.value[a])==null?void 0:t.baseUrl)||((u=(r=s.value)==null?void 0:r.defaultOptions)==null?void 0:u.baseUrl)||""}),O([i,n],()=>{var e,t;o.value[a]={...o.value[a],apiKey:i.value,baseUrl:n.value||((t=(e=s.value)==null?void 0:e.defaultOptions)==null?void 0:t.baseUrl)||""}});function U(){var e;o.value[a]={...(e=s.value)==null?void 0:e.defaultOptions}}return(e,t)=>{var r,u;return x(),h(l(S),{"provider-name":(r=s.value)==null?void 0:r.localizedName,"provider-icon":(u=s.value)==null?void 0:u.icon,"on-back":()=>l(b).back()},{default:v(()=>[d(l(P),null,{default:v(()=>[d(l(R),{title:l(c)("settings.pages.providers.common.section.basic.title"),description:l(c)("settings.pages.providers.common.section.basic.description"),"on-reset":U},{default:v(()=>{var p;return[d(l(N),{modelValue:i.value,"onUpdate:modelValue":t[0]||(t[0]=m=>i.value=m),"provider-name":(p=s.value)==null?void 0:p.localizedName,placeholder:"sk-or-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),d(l(z),{title:l(c)("settings.pages.providers.common.section.advanced.title")},{default:v(()=>{var p,m;return[d(l(M),{modelValue:n.value,"onUpdate:modelValue":t[1]||(t[1]=g=>n.value=g),placeholder:((m=(p=s.value)==null?void 0:p.defaultOptions)==null?void 0:m.baseUrl)||""},null,8,["modelValue","placeholder"])]}),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});export{L as default}; diff --git a/assets/providers-B7zWTIWF.js b/assets/providers-adQ6cb75.js similarity index 99% rename from assets/providers-B7zWTIWF.js rename to assets/providers-adQ6cb75.js index 38961dc1c2c5f1e97fddcf6f1f4f03ac6dd81e44..a01724408ee3ae9bfaf20f1994b67d3d5480e179 100644 --- a/assets/providers-B7zWTIWF.js +++ b/assets/providers-adQ6cb75.js @@ -1 +1 @@ -import{f as te,bD as se,q as oe,g as E,w as le,h as x}from"./index-7-fr_lhT.js";import{r as Q,a as Y,e as Z,o as K}from"./index-Be1NqeGb.js";const h=async a=>(a.fetch??globalThis.fetch)(Q("models",a.baseURL),{headers:Y(a.headers,a.apiKey),signal:a.abortSignal}).then(Z).then(({data:r})=>r),g=a=>({chat:r=>Object.assign(a,{model:r})}),k=a=>({embed:r=>Object.assign(a,{model:r})}),m=a=>({model:()=>a}),ce=a=>({speech:r=>Object.assign(a,{model:r})}),de=a=>({transcription:r=>Object.assign(a,{model:r})}),p=(a,r)=>({metadata:{id:a,...r}}),c=(...a)=>Object.assign(a[0],...a.slice(1)),ue=(a,r="https://api.anthropic.com/v1/")=>c(p("anthropic"),g({apiKey:a,baseURL:r}),m({apiKey:a,baseURL:r})),I=(a,r="https://api.deepseek.com/")=>c(p("deepseek"),g({apiKey:a,baseURL:r}),m({apiKey:a,baseURL:r})),z=(a,r="https://api.fireworks.ai/inference/v1/")=>c(p("fireworks"),g({apiKey:a,baseURL:r}),k({apiKey:a,baseURL:r}),m({apiKey:a,baseURL:r})),G=(a,r="https://generativelanguage.googleapis.com/v1beta/openai/")=>c(p("google-generative-ai"),g({apiKey:a,baseURL:r}),k({apiKey:a,baseURL:r}),m({apiKey:a,baseURL:r})),D=(a,r="https://api.mistral.ai/v1/")=>c(p("mistral"),g({apiKey:a,baseURL:r}),k({apiKey:a,baseURL:r}),m({apiKey:a,baseURL:r})),$=(a,r="https://api.moonshot.cn/v1/")=>c(p("moonshot"),g({apiKey:a,baseURL:r}),m({apiKey:a,baseURL:r})),N=(a,r="https://api.novita.ai/v3/openai/")=>c(p("novita"),g({apiKey:a,baseURL:r}),m({apiKey:a,baseURL:r})),C=(a,r="https://api.openai.com/v1/")=>c(p("openai"),g({apiKey:a,baseURL:r}),k({apiKey:a,baseURL:r}),m({apiKey:a,baseURL:r}),ce({apiKey:a,baseURL:r}),de({apiKey:a,baseURL:r})),pe=(a,r="")=>c(p("openrouter"),{chat:(u,s)=>{const f={apiKey:a,baseURL:r,model:u};return{...s?(({extraHeaders:d,models:y,provider:_})=>{d!=null&&(f.headers??(f.headers={}),Object.assign(f.headers,d));let l;return _!=null&&(l=K(_)),K({models:y,provider:l})})(s):{},...f}}},m({apiKey:a,baseURL:r})),ge=(a,r="https://api.perplexity.ai/")=>c(p("perplexity"),g({apiKey:a,baseURL:r})),H=(a,r="https://api.together.xyz/v1/")=>c(p("together-ai"),g({apiKey:a,baseURL:r}),k({apiKey:a,baseURL:r}),m({apiKey:a,baseURL:r,fetch:async(...u)=>globalThis.fetch(...u).then(async s=>s.json()).then(s=>Response.json({data:s,object:"list"}))})),me=(a,r)=>{const u=`https://api.cloudflare.com/client/v4/accounts/${r}/ai/v1/`;return c(p("workers-ai"),g({apiKey:a,baseURL:u}),k({apiKey:a,baseURL:u}))},V=(a,r="https://api.x.ai/v1/")=>c(p("xai"),g({apiKey:a,baseURL:r}),m({apiKey:a,baseURL:r})),B=(a="http://localhost:11434/v1/")=>c(p("ollama"),g({baseURL:a}),k({baseURL:a}),m({baseURL:a}));function W(a,r="http://localhost:5933/v1/"){const u=({applyTextNormalization:n,languageCode:d,nextRequestIds:y,nextText:_,previousRequestIds:l,previousText:M,pronunciationDictionaryLocators:w,seed:P,voiceSettings:O})=>({extraBody:K({applyTextNormalization:n,languageCode:d,nextRequestIds:y,nextText:_,previousRequestIds:l,previousText:M,pronunciationDictionaryLocators:w?w.map(A=>K(A)):void 0,seed:P,voiceSettings:O!=null?K(O):{similarityBoost:.75,stability:.5}})});return c({speech:(n,d)=>({...d?u(d):{},apiKey:a,baseURL:r,model:`elevenlabs/${n}`})},{voice:n=>(r.endsWith("v1/")?r=r.slice(0,-3):r.endsWith("v1")&&(r=r.slice(0,-2)),{query:"provider=elevenlabs",...n?u(n):{},apiKey:a,baseURL:r})})}async function J(a){return(a.fetch??globalThis.fetch)(Q(a.query?`api/voices?${a.query}`:"api/voices",a.baseURL),{headers:Y({...a.headers},a.apiKey),method:"GET",signal:a.abortSignal}).then(Z).then(({voices:r})=>r)}function X(a,r="http://localhost:5933/v1/"){const u=n=>{const{deploymentId:d,region:y,sampleRate:_}=n,l={deploymentId:d,region:y,sampleRate:_};return"disableSsml"in n?l.disableSsml=n.disableSsml:"lang"in n&&(l.lang=n.lang,l.gender=n.gender,l.voice=n.voice),{extraBody:K(l)}};return c({speech:(n,d)=>({...d?u(d):{},apiKey:a,baseURL:r,model:`microsoft/${n}`})},{voice:n=>(r.endsWith("v1/")?r=r.slice(0,-3):r.endsWith("v1")&&(r=r.slice(0,-2)),{query:`region=${n==null?void 0:n.region}&provider=microsoft`,...n?u(n):{},apiKey:a,baseURL:r})})}const _e=[{model_id:"eleven_multilingual_v2",name:"Eleven Multilingual v2",can_be_finetuned:!0,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!0,can_use_speaker_boost:!0,serves_pro_voices:!1,token_cost_factor:1,description:"Our most life-like, emotionally rich mode in 29 languages. Best for voice overs, audiobooks, post-production, or any other content creation needs.",requires_alpha_access:!1,max_characters_request_free_user:1e4,max_characters_request_subscribed_user:1e4,maximum_text_length_per_request:1e4,languages:[{language_id:"en",name:"English"},{language_id:"ja",name:"Japanese"},{language_id:"zh",name:"Chinese"},{language_id:"de",name:"German"},{language_id:"hi",name:"Hindi"},{language_id:"fr",name:"French"},{language_id:"ko",name:"Korean"},{language_id:"pt",name:"Portuguese"},{language_id:"it",name:"Italian"},{language_id:"es",name:"Spanish"},{language_id:"id",name:"Indonesian"},{language_id:"nl",name:"Dutch"},{language_id:"tr",name:"Turkish"},{language_id:"fil",name:"Filipino"},{language_id:"pl",name:"Polish"},{language_id:"sv",name:"Swedish"},{language_id:"bg",name:"Bulgarian"},{language_id:"ro",name:"Romanian"},{language_id:"ar",name:"Arabic"},{language_id:"cs",name:"Czech"},{language_id:"el",name:"Greek"},{language_id:"fi",name:"Finnish"},{language_id:"hr",name:"Croatian"},{language_id:"ms",name:"Malay"},{language_id:"sk",name:"Slovak"},{language_id:"da",name:"Danish"},{language_id:"ta",name:"Tamil"},{language_id:"uk",name:"Ukrainian"},{language_id:"ru",name:"Russian"}],model_rates:{character_cost_multiplier:1},concurrency_group:"standard"},{model_id:"eleven_flash_v2_5",name:"Eleven Flash v2.5",can_be_finetuned:!0,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:"Our ultra low latency model in 32 languages. Ideal for conversational use cases.",requires_alpha_access:!1,max_characters_request_free_user:4e4,max_characters_request_subscribed_user:4e4,maximum_text_length_per_request:4e4,languages:[{language_id:"en",name:"English"},{language_id:"ja",name:"Japanese"},{language_id:"zh",name:"Chinese"},{language_id:"de",name:"German"},{language_id:"hi",name:"Hindi"},{language_id:"fr",name:"French"},{language_id:"ko",name:"Korean"},{language_id:"pt",name:"Portuguese"},{language_id:"it",name:"Italian"},{language_id:"es",name:"Spanish"},{language_id:"ru",name:"Russian"},{language_id:"id",name:"Indonesian"},{language_id:"nl",name:"Dutch"},{language_id:"tr",name:"Turkish"},{language_id:"fil",name:"Filipino"},{language_id:"pl",name:"Polish"},{language_id:"sv",name:"Swedish"},{language_id:"bg",name:"Bulgarian"},{language_id:"ro",name:"Romanian"},{language_id:"ar",name:"Arabic"},{language_id:"cs",name:"Czech"},{language_id:"el",name:"Greek"},{language_id:"fi",name:"Finnish"},{language_id:"hr",name:"Croatian"},{language_id:"ms",name:"Malay"},{language_id:"sk",name:"Slovak"},{language_id:"da",name:"Danish"},{language_id:"ta",name:"Tamil"},{language_id:"uk",name:"Ukrainian"},{language_id:"hu",name:"Hungarian"},{language_id:"no",name:"Norwegian"},{language_id:"vi",name:"Vietnamese"}],model_rates:{character_cost_multiplier:.5},concurrency_group:"turbo"},{model_id:"eleven_turbo_v2_5",name:"Eleven Turbo v2.5",can_be_finetuned:!0,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:"Our high quality, low latency model in 32 languages. Best for developer use cases where speed matters and you need non-English languages.",requires_alpha_access:!1,max_characters_request_free_user:4e4,max_characters_request_subscribed_user:4e4,maximum_text_length_per_request:4e4,languages:[{language_id:"en",name:"English"},{language_id:"ja",name:"Japanese"},{language_id:"zh",name:"Chinese"},{language_id:"de",name:"German"},{language_id:"hi",name:"Hindi"},{language_id:"fr",name:"French"},{language_id:"ko",name:"Korean"},{language_id:"pt",name:"Portuguese"},{language_id:"it",name:"Italian"},{language_id:"es",name:"Spanish"},{language_id:"ru",name:"Russian"},{language_id:"id",name:"Indonesian"},{language_id:"nl",name:"Dutch"},{language_id:"tr",name:"Turkish"},{language_id:"fil",name:"Filipino"},{language_id:"pl",name:"Polish"},{language_id:"sv",name:"Swedish"},{language_id:"bg",name:"Bulgarian"},{language_id:"ro",name:"Romanian"},{language_id:"ar",name:"Arabic"},{language_id:"cs",name:"Czech"},{language_id:"el",name:"Greek"},{language_id:"fi",name:"Finnish"},{language_id:"hr",name:"Croatian"},{language_id:"ms",name:"Malay"},{language_id:"sk",name:"Slovak"},{language_id:"da",name:"Danish"},{language_id:"ta",name:"Tamil"},{language_id:"uk",name:"Ukrainian"},{language_id:"vi",name:"Vietnamese"},{language_id:"no",name:"Norwegian"},{language_id:"hu",name:"Hungarian"}],model_rates:{character_cost_multiplier:.5},concurrency_group:"turbo"},{model_id:"eleven_turbo_v2",name:"Eleven Turbo v2",can_be_finetuned:!0,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:"Our English-only, low latency model. Best for developer use cases where speed matters and you only need English. Performance is on par with Turbo v2.5.",requires_alpha_access:!1,max_characters_request_free_user:3e4,max_characters_request_subscribed_user:3e4,maximum_text_length_per_request:3e4,languages:[{language_id:"en",name:"English"}],model_rates:{character_cost_multiplier:.5},concurrency_group:"turbo"},{model_id:"eleven_flash_v2",name:"Eleven Flash v2",can_be_finetuned:!0,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:"Our ultra low latency model in english. Ideal for conversational use cases.",requires_alpha_access:!1,max_characters_request_free_user:3e4,max_characters_request_subscribed_user:3e4,maximum_text_length_per_request:3e4,languages:[{language_id:"en",name:"English"}],model_rates:{character_cost_multiplier:.5},concurrency_group:"turbo"},{model_id:"eleven_english_sts_v2",name:"Eleven English v2",can_be_finetuned:!1,can_do_text_to_speech:!1,can_do_voice_conversion:!0,can_use_style:!0,can_use_speaker_boost:!0,serves_pro_voices:!1,token_cost_factor:1,description:"Our state-of-the-art speech to speech model suitable for scenarios where you need maximum control over the content and prosody of your generations.",requires_alpha_access:!1,max_characters_request_free_user:5e3,max_characters_request_subscribed_user:5e3,maximum_text_length_per_request:5e3,languages:[{language_id:"en",name:"English"}],model_rates:{character_cost_multiplier:1},concurrency_group:"standard"},{model_id:"eleven_multilingual_v1",name:"Eleven Multilingual v1",can_be_finetuned:!1,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:"Our first Multilingual model, capability of generating speech in 10 languages. Now outclassed by Multilingual v2 (for content creation) and Turbo v2.5 (for low latency use cases).",requires_alpha_access:!1,max_characters_request_free_user:1e4,max_characters_request_subscribed_user:1e4,maximum_text_length_per_request:1e4,languages:[{language_id:"en",name:"English"},{language_id:"de",name:"German"},{language_id:"pl",name:"Polish"},{language_id:"es",name:"Spanish"},{language_id:"it",name:"Italian"},{language_id:"fr",name:"French"},{language_id:"pt",name:"Portuguese"},{language_id:"hi",name:"Hindi"},{language_id:"ar",name:"Arabic"}],model_rates:{character_cost_multiplier:1},concurrency_group:"standard"},{model_id:"eleven_multilingual_sts_v2",name:"Eleven Multilingual v2",can_be_finetuned:!0,can_do_text_to_speech:!1,can_do_voice_conversion:!0,can_use_style:!0,can_use_speaker_boost:!0,serves_pro_voices:!1,token_cost_factor:1,description:"Our cutting-edge, multilingual speech-to-speech model is designed for situations that demand unparalleled control over both the content and the prosody of the generated speech across various languages.",requires_alpha_access:!1,max_characters_request_free_user:1e4,max_characters_request_subscribed_user:1e4,maximum_text_length_per_request:1e4,languages:[{language_id:"en",name:"English"},{language_id:"ja",name:"Japanese"},{language_id:"zh",name:"Chinese"},{language_id:"de",name:"German"},{language_id:"hi",name:"Hindi"},{language_id:"fr",name:"French"},{language_id:"ko",name:"Korean"},{language_id:"pt",name:"Portuguese"},{language_id:"it",name:"Italian"},{language_id:"es",name:"Spanish"},{language_id:"ru",name:"Russian"},{language_id:"id",name:"Indonesian"},{language_id:"nl",name:"Dutch"},{language_id:"tr",name:"Turkish"},{language_id:"fil",name:"Filipino"},{language_id:"pl",name:"Polish"},{language_id:"sv",name:"Swedish"},{language_id:"bg",name:"Bulgarian"},{language_id:"ro",name:"Romanian"},{language_id:"ar",name:"Arabic"},{language_id:"cs",name:"Czech"},{language_id:"el",name:"Greek"},{language_id:"fi",name:"Finnish"},{language_id:"hr",name:"Croatian"},{language_id:"ms",name:"Malay"},{language_id:"sk",name:"Slovak"},{language_id:"da",name:"Danish"},{language_id:"ta",name:"Tamil"},{language_id:"uk",name:"Ukrainian"}],model_rates:{character_cost_multiplier:1},concurrency_group:"standard"},{model_id:"eleven_monolingual_v1",name:"Eleven English v1",can_be_finetuned:!1,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:"Our first ever text to speech model. Now outclassed by Multilingual v2 (for content creation) and Turbo v2.5 (for low latency use cases).",requires_alpha_access:!1,max_characters_request_free_user:1e4,max_characters_request_subscribed_user:1e4,maximum_text_length_per_request:1e4,languages:[{language_id:"en",name:"English"}],model_rates:{character_cost_multiplier:1},concurrency_group:"standard"}],ye=te("providers",()=>{const a=se("settings/credentials/providers",{}),{t:r}=oe();async function u(e){try{const i=await fetch("https://openrouter.ai/api/v1/models",{headers:{Authorization:`Bearer ${e.apiKey.trim()}`,"Content-Type":"application/json"}});if(!i.ok)throw new Error(`Failed to fetch OpenRouter models: ${i.statusText}`);return(await i.json()).data.map(t=>({id:t.id,name:t.name||t.id,provider:"openrouter-ai",description:t.description||"",contextLength:t.context_length,deprecated:!1}))}catch(i){throw console.error("Error fetching OpenRouter models:",i),i}}const s={"openrouter-ai":{id:"openrouter-ai",nameKey:"settings.pages.providers.provider.openrouter.title",name:"OpenRouter",descriptionKey:"settings.pages.providers.provider.openrouter.description",description:"openrouter.ai",icon:"i-lobe-icons:openrouter",defaultOptions:{baseUrl:"https://openrouter.ai/api/v1/"},createProvider:e=>pe(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>u(e)}},ollama:{id:"ollama",nameKey:"settings.pages.providers.provider.ollama.title",name:"Ollama",descriptionKey:"settings.pages.providers.provider.ollama.description",description:"ollama.com",icon:"i-lobe-icons:ollama",defaultOptions:{baseUrl:"http://localhost:11434/v1/"},createProvider:e=>B(e.baseUrl.trim()),capabilities:{listModels:async e=>(await h({...B(e.baseUrl.trim()).model()})).map(i=>({id:i.id,name:i.id,provider:"ollama",description:"",contextLength:0,deprecated:!1}))}},vllm:{id:"vllm",nameKey:"settings.pages.providers.provider.vllm.title",name:"vLLM",descriptionKey:"settings.pages.providers.provider.vllm.description",description:"vllm.ai",iconColor:"i-lobe-icons:vllm-color",createProvider:e=>B(e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:"llama-2-7b",name:"Llama 2 (7B)",provider:"vllm",description:"Meta's Llama 2 7B parameter model",contextLength:4096},{id:"llama-2-13b",name:"Llama 2 (13B)",provider:"vllm",description:"Meta's Llama 2 13B parameter model",contextLength:4096},{id:"llama-2-70b",name:"Llama 2 (70B)",provider:"vllm",description:"Meta's Llama 2 70B parameter model",contextLength:4096},{id:"mistral-7b",name:"Mistral (7B)",provider:"vllm",description:"Mistral AI's 7B parameter model",contextLength:8192},{id:"mixtral-8x7b",name:"Mixtral (8x7B)",provider:"vllm",description:"Mistral AI's Mixtral 8x7B MoE model",contextLength:32768},{id:"custom",name:"Custom Model",provider:"vllm",description:"Specify a custom model name",contextLength:0}]}},openai:{id:"openai",nameKey:"settings.pages.providers.provider.openai.title",name:"OpenAI",descriptionKey:"settings.pages.providers.provider.openai.description",description:"openai.com",icon:"i-lobe-icons:openai",defaultOptions:{baseUrl:"https://api.openai.com/v1/"},createProvider:e=>C(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await h({...C(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(i=>({id:i.id,name:i.id,provider:"openai",description:"",contextLength:0,deprecated:!1}))}},anthropic:{id:"anthropic",nameKey:"settings.pages.providers.provider.anthropic.title",name:"Anthropic",descriptionKey:"settings.pages.providers.provider.anthropic.description",description:"anthropic.com",icon:"i-lobe-icons:anthropic",defaultOptions:{baseUrl:"https://api.anthropic.com/v1/"},createProvider:e=>ue(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:"claude-3-7-sonnet-20250219",name:"Claude 3.7 Sonnet",provider:"anthropic",description:"",contextLength:0,deprecated:!1},{id:"claude-3-5-sonnet-20241022",name:"Claude 3.5 Sonnet (New)",provider:"anthropic",description:"",contextLength:0,deprecated:!1},{id:"claude-3-5-haiku-20241022",name:"Claude 3.5 Haiku",provider:"anthropic",description:"",contextLength:0,deprecated:!1},{id:"claude-3-5-sonnet-20240620",name:"Claude 3.5 Sonnet (Old)",provider:"anthropic",description:"",contextLength:0,deprecated:!1},{id:"claude-3-haiku-20240307",name:"Claude 3 Haiku",provider:"anthropic",description:"",contextLength:0,deprecated:!1},{id:"claude-3-opus-20240229",name:"Claude 3 Opus",provider:"anthropic",description:"",contextLength:0,deprecated:!1}]}},"google-generative-ai":{id:"google-generative-ai",nameKey:"settings.pages.providers.provider.google-generative-ai.title",name:"Google Gemini",descriptionKey:"settings.pages.providers.provider.google-generative-ai.description",description:"ai.google.dev",icon:"i-lobe-icons:gemini",defaultOptions:{baseUrl:"https://generativelanguage.googleapis.com/v1beta/openai/"},createProvider:e=>G(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await h({...G(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(i=>({id:i.id,name:i.id,provider:"google-generative-ai",description:"",contextLength:0,deprecated:!1}))}},xai:{id:"xai",nameKey:"settings.pages.providers.provider.xai.title",name:"xAI",descriptionKey:"settings.pages.providers.provider.xai.description",description:"x.ai",icon:"i-lobe-icons:xai",createProvider:e=>V(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await h({...V(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(i=>({id:i.id,name:i.id,provider:"xai",description:"",contextLength:0,deprecated:!1}))}},deepseek:{id:"deepseek",nameKey:"settings.pages.providers.provider.deepseek.title",name:"DeepSeek",descriptionKey:"settings.pages.providers.provider.deepseek.description",description:"deepseek.com",iconColor:"i-lobe-icons:deepseek-color",createProvider:e=>I(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await h({...I(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(i=>({id:i.id,name:i.id,provider:"deepseek",description:"",contextLength:0,deprecated:!1}))}},elevenlabs:{id:"elevenlabs",nameKey:"settings.pages.providers.provider.elevenlabs.title",name:"ElevenLabs",descriptionKey:"settings.pages.providers.provider.elevenlabs.description",description:"elevenlabs.io",icon:"i-simple-icons:elevenlabs",defaultOptions:{baseUrl:"https://unspeech.hyp3r.link/v1/",voiceSettings:{similarityBoost:.75,stability:.5}},createProvider:e=>W(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>_e.map(e=>({id:e.model_id,name:e.name,provider:"elevenlabs",description:e.description,contextLength:0,deprecated:!1})),listVoices:async e=>{const i=W(e.apiKey.trim(),e.baseUrl.trim()),o=await J({...i.voice()}),t=o.findIndex(b=>b.name.includes("Aria")),v=o.findIndex(b=>b.name.includes("Bill")),U=t!==-1?t:0,F=v!==-1?v:o.length-1,j=Math.min(U,F),L=Math.max(U,F);return[...o.slice(0,j),...o.slice(L+1),...o.slice(j,L+1)].map(b=>({id:b.id,name:b.name,provider:"elevenlabs",previewURL:b.preview_audio_url,languages:b.languages}))}}},"microsoft-speech":{id:"microsoft-speech",nameKey:"settings.pages.providers.provider.microsoft-speech.title",name:"Microsoft / Azure Speech",descriptionKey:"settings.pages.providers.provider.microsoft-speech.description",description:"speech.microsoft.com",iconColor:"i-lobe-icons:microsoft-color",defaultOptions:{baseUrl:"https://unspeech.hyp3r.link/v1/"},createProvider:e=>X(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:"v1",name:"v1",provider:"microsoft-speech",description:"",contextLength:0,deprecated:!1}],listVoices:async e=>{const i=X(e.apiKey.trim(),e.baseUrl.trim());return(await J({...i.voice({region:e.region})})).map(t=>{var v;return{id:t.id,name:t.name,provider:"microsoft-speech",previewURL:t.preview_audio_url,languages:t.languages,gender:(v=t.labels)==null?void 0:v.gender}})}}},"together-ai":{id:"together-ai",nameKey:"settings.pages.providers.provider.together.title",name:"Together.ai",descriptionKey:"settings.pages.providers.provider.together.description",description:"together.ai",iconColor:"i-lobe-icons:together-color",createProvider:e=>H(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await h({...H(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(i=>({id:i.id,name:i.id,provider:"together-ai",description:"",contextLength:0,deprecated:!1}))}},"novita-ai":{id:"novita-ai",nameKey:"settings.pages.providers.provider.novita.title",name:"Novita",descriptionKey:"settings.pages.providers.provider.novita.description",description:"novita.ai",iconColor:"i-lobe-icons:novita-color",createProvider:e=>N(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await h({...N(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(i=>({id:i.id,name:i.id,provider:"novita-ai",description:"",contextLength:0,deprecated:!1}))}},"fireworks-ai":{id:"fireworks-ai",nameKey:"settings.pages.providers.provider.fireworks.title",name:"Fireworks.ai",descriptionKey:"settings.pages.providers.provider.fireworks.description",description:"fireworks.ai",icon:"i-lobe-icons:fireworks",createProvider:e=>z(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await h({...z(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(i=>({id:i.id,name:i.id,provider:"fireworks-ai",description:"",contextLength:0,deprecated:!1}))}},"featherless-ai":{id:"featherless-ai",nameKey:"settings.pages.providers.provider.featherless.title",name:"Featherless.ai",descriptionKey:"settings.pages.providers.provider.featherless.description",description:"featherless.ai",icon:"i-lobe-icons:featherless-ai",defaultOptions:{baseUrl:"https://api.featherless.ai/v1/"},createProvider:e=>C(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await h({...C(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(i=>({id:i.id,name:i.id,provider:"featherless-ai",description:"",contextLength:0,deprecated:!1}))}},"cloudflare-workers-ai":{id:"cloudflare-workers-ai",nameKey:"settings.pages.providers.provider.cloudflare-workers-ai.title",name:"Cloudflare Workers AI",descriptionKey:"settings.pages.providers.provider.cloudflare-workers-ai.description",description:"cloudflare.com",iconColor:"i-lobe-icons:cloudflare-color",createProvider:e=>me(e.apiKey.trim(),e.accountId),capabilities:{listModels:async()=>[]}},"perplexity-ai":{id:"perplexity-ai",nameKey:"settings.pages.providers.provider.perplexity.title",name:"Perplexity",descriptionKey:"settings.pages.providers.provider.perplexity.description",description:"perplexity.ai",icon:"i-lobe-icons:perplexity",defaultOptions:{baseUrl:"https://api.perplexity.ai"},createProvider:e=>ge(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:"sonar-small-online",name:"Sonar Small (Online)",provider:"perplexity-ai",description:"Efficient model with online search capabilities",contextLength:12e3},{id:"sonar-medium-online",name:"Sonar Medium (Online)",provider:"perplexity-ai",description:"Balanced model with online search capabilities",contextLength:12e3},{id:"sonar-large-online",name:"Sonar Large (Online)",provider:"perplexity-ai",description:"Powerful model with online search capabilities",contextLength:12e3},{id:"codey-small",name:"Codey Small",provider:"perplexity-ai",description:"Specialized for code generation and understanding",contextLength:12e3},{id:"codey-large",name:"Codey Large",provider:"perplexity-ai",description:"Advanced code generation and understanding",contextLength:12e3}]}},"mistral-ai":{id:"mistral-ai",nameKey:"settings.pages.providers.provider.mistral.title",name:"Mistral",descriptionKey:"settings.pages.providers.provider.mistral.description",description:"mistral.ai",iconColor:"i-lobe-icons:mistral-color",createProvider:e=>D(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await h({...D(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(i=>({id:i.id,name:i.id,provider:"mistral-ai",description:"",contextLength:0,deprecated:!1}))}},"moonshot-ai":{id:"moonshot-ai",nameKey:"settings.pages.providers.provider.moonshot.title",name:"Moonshot AI",descriptionKey:"settings.pages.providers.provider.moonshot.description",description:"moonshot.ai",icon:"i-lobe-icons:moonshot",createProvider:e=>$(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await h({...$(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(i=>({id:i.id,name:i.id,provider:"moonshot-ai",description:"",contextLength:0,deprecated:!1}))}}};function f(e){const i=a.value[e];if(!i)return!1;switch(e){case"openrouter-ai":return!!i.apiKey&&!!i.baseUrl;case"ollama":return!!i.baseUrl;case"vllm":return!!i.baseUrl;case"openai":return!!i.apiKey;case"anthropic":return!!i.apiKey;case"elevenlabs":return!!i.apiKey;case"xai":return!!i.apiKey;case"deepseek":return!!i.apiKey;case"together-ai":return!!i.apiKey;case"novita-ai":return!!i.apiKey;case"fireworks-ai":return!!i.apiKey;case"featherless-ai":return!!i.apiKey;case"microsoft-speech":return!!i.apiKey&&!!i.region;case"cloudflare-workers-ai":return!!i.apiKey;case"mistral-ai":return!!i.apiKey;case"moonshot-ai":return!!i.apiKey;default:return!1}}const n=E({});function d(e){var i;if(!a.value[e]){const o=s[e];a.value[e]={baseUrl:((i=o.defaultOptions)==null?void 0:i.baseUrl)||""}}}Object.keys(s).forEach(d);function y(){Object.keys(s).forEach(e=>{n.value[e]=f(e)})}y(),le(a,y,{deep:!0});const _=x(()=>Object.keys(s).filter(e=>n.value[e])),l=E({}),M=E({}),w=E({});async function P(e){const i=a.value[e];if(!i)return[];const o=s[e];if(!o)return[];M.value[e]=!0,w.value[e]=null;try{const t=o.capabilities.listModels?await o.capabilities.listModels(i):[];return l.value[e]=t.map(v=>({id:v.id,name:v.name,description:v.description,contextLength:v.contextLength,deprecated:v.deprecated,provider:e})),l.value[e]}catch(t){return console.error(`Error fetching models for ${e}:`,t),w.value[e]=t instanceof Error?t.message:"Unknown error",[]}finally{M.value[e]=!1}}function O(e){return l.value[e]||[]}const A=x(()=>{const e=[];for(const i of _.value)e.push(...l.value[i]||[]);return e});async function R(){for(const e of _.value)s[e].capabilities.listModels&&await P(e)}function T(e){const i=s[e];if(!i)throw new Error(`Provider metadata for ${e} not found`);return{...i,localizedName:r(i.nameKey,i.name),localizedDescription:r(i.descriptionKey,i.description)}}const ee=x(()=>Object.values(s).map(e=>({...e,localizedName:r(e.nameKey,e.name),localizedDescription:r(e.descriptionKey,e.description),configured:n.value[e.id]||!1})));function q(e){const i=a.value[e];if(!i)throw new Error(`Provider credentials for ${e} not found`);const o=s[e];if(!o)throw new Error(`Provider metadata for ${e} not found`);try{return o.createProvider(i)}catch(t){throw console.error(`Error creating provider instance for ${e}:`,t),t}}const S=x(()=>_.value.map(e=>T(e))),ae=x(()=>S.value.filter(e=>{const i=q(e.id);return"chat"in i&&typeof i.chat=="function"})),ie=x(()=>S.value.filter(e=>{const i=q(e.id);return"transcription"in i&&typeof i.transcription=="function"})),re=x(()=>S.value.filter(e=>{const i=q(e.id);return"speech"in i&&typeof i.speech=="function"}));function ne(e){return a.value[e]}return{providers:a,getProviderConfig:ne,availableProviders:_,configuredProviders:n,providerMetadata:s,getProviderMetadata:T,allProvidersMetadata:ee,initializeProvider:d,validateProvider:f,availableModels:l,isLoadingModels:M,modelLoadError:w,fetchModelsForProvider:P,getModelsForProvider:O,allAvailableModels:A,loadModelsForConfiguredProviders:R,getProviderInstance:q,availableProvidersMetadata:S,availableTextGenerationsProvidersMetadata:ae,availableAudioSpeechProvidersMetadata:re,availableAudioTranscriptionProvidersMetadata:ie}});export{h as l,ye as u}; +import{f as te,bD as se,q as oe,g as E,w as le,h as x}from"./index-hDb1Lsb8.js";import{r as Q,a as Y,e as Z,o as K}from"./index-Be1NqeGb.js";const h=async a=>(a.fetch??globalThis.fetch)(Q("models",a.baseURL),{headers:Y(a.headers,a.apiKey),signal:a.abortSignal}).then(Z).then(({data:r})=>r),g=a=>({chat:r=>Object.assign(a,{model:r})}),k=a=>({embed:r=>Object.assign(a,{model:r})}),m=a=>({model:()=>a}),ce=a=>({speech:r=>Object.assign(a,{model:r})}),de=a=>({transcription:r=>Object.assign(a,{model:r})}),p=(a,r)=>({metadata:{id:a,...r}}),c=(...a)=>Object.assign(a[0],...a.slice(1)),ue=(a,r="https://api.anthropic.com/v1/")=>c(p("anthropic"),g({apiKey:a,baseURL:r}),m({apiKey:a,baseURL:r})),I=(a,r="https://api.deepseek.com/")=>c(p("deepseek"),g({apiKey:a,baseURL:r}),m({apiKey:a,baseURL:r})),z=(a,r="https://api.fireworks.ai/inference/v1/")=>c(p("fireworks"),g({apiKey:a,baseURL:r}),k({apiKey:a,baseURL:r}),m({apiKey:a,baseURL:r})),G=(a,r="https://generativelanguage.googleapis.com/v1beta/openai/")=>c(p("google-generative-ai"),g({apiKey:a,baseURL:r}),k({apiKey:a,baseURL:r}),m({apiKey:a,baseURL:r})),D=(a,r="https://api.mistral.ai/v1/")=>c(p("mistral"),g({apiKey:a,baseURL:r}),k({apiKey:a,baseURL:r}),m({apiKey:a,baseURL:r})),$=(a,r="https://api.moonshot.cn/v1/")=>c(p("moonshot"),g({apiKey:a,baseURL:r}),m({apiKey:a,baseURL:r})),N=(a,r="https://api.novita.ai/v3/openai/")=>c(p("novita"),g({apiKey:a,baseURL:r}),m({apiKey:a,baseURL:r})),C=(a,r="https://api.openai.com/v1/")=>c(p("openai"),g({apiKey:a,baseURL:r}),k({apiKey:a,baseURL:r}),m({apiKey:a,baseURL:r}),ce({apiKey:a,baseURL:r}),de({apiKey:a,baseURL:r})),pe=(a,r="")=>c(p("openrouter"),{chat:(u,s)=>{const f={apiKey:a,baseURL:r,model:u};return{...s?(({extraHeaders:d,models:y,provider:_})=>{d!=null&&(f.headers??(f.headers={}),Object.assign(f.headers,d));let l;return _!=null&&(l=K(_)),K({models:y,provider:l})})(s):{},...f}}},m({apiKey:a,baseURL:r})),ge=(a,r="https://api.perplexity.ai/")=>c(p("perplexity"),g({apiKey:a,baseURL:r})),H=(a,r="https://api.together.xyz/v1/")=>c(p("together-ai"),g({apiKey:a,baseURL:r}),k({apiKey:a,baseURL:r}),m({apiKey:a,baseURL:r,fetch:async(...u)=>globalThis.fetch(...u).then(async s=>s.json()).then(s=>Response.json({data:s,object:"list"}))})),me=(a,r)=>{const u=`https://api.cloudflare.com/client/v4/accounts/${r}/ai/v1/`;return c(p("workers-ai"),g({apiKey:a,baseURL:u}),k({apiKey:a,baseURL:u}))},V=(a,r="https://api.x.ai/v1/")=>c(p("xai"),g({apiKey:a,baseURL:r}),m({apiKey:a,baseURL:r})),B=(a="http://localhost:11434/v1/")=>c(p("ollama"),g({baseURL:a}),k({baseURL:a}),m({baseURL:a}));function W(a,r="http://localhost:5933/v1/"){const u=({applyTextNormalization:n,languageCode:d,nextRequestIds:y,nextText:_,previousRequestIds:l,previousText:M,pronunciationDictionaryLocators:w,seed:P,voiceSettings:O})=>({extraBody:K({applyTextNormalization:n,languageCode:d,nextRequestIds:y,nextText:_,previousRequestIds:l,previousText:M,pronunciationDictionaryLocators:w?w.map(A=>K(A)):void 0,seed:P,voiceSettings:O!=null?K(O):{similarityBoost:.75,stability:.5}})});return c({speech:(n,d)=>({...d?u(d):{},apiKey:a,baseURL:r,model:`elevenlabs/${n}`})},{voice:n=>(r.endsWith("v1/")?r=r.slice(0,-3):r.endsWith("v1")&&(r=r.slice(0,-2)),{query:"provider=elevenlabs",...n?u(n):{},apiKey:a,baseURL:r})})}async function J(a){return(a.fetch??globalThis.fetch)(Q(a.query?`api/voices?${a.query}`:"api/voices",a.baseURL),{headers:Y({...a.headers},a.apiKey),method:"GET",signal:a.abortSignal}).then(Z).then(({voices:r})=>r)}function X(a,r="http://localhost:5933/v1/"){const u=n=>{const{deploymentId:d,region:y,sampleRate:_}=n,l={deploymentId:d,region:y,sampleRate:_};return"disableSsml"in n?l.disableSsml=n.disableSsml:"lang"in n&&(l.lang=n.lang,l.gender=n.gender,l.voice=n.voice),{extraBody:K(l)}};return c({speech:(n,d)=>({...d?u(d):{},apiKey:a,baseURL:r,model:`microsoft/${n}`})},{voice:n=>(r.endsWith("v1/")?r=r.slice(0,-3):r.endsWith("v1")&&(r=r.slice(0,-2)),{query:`region=${n==null?void 0:n.region}&provider=microsoft`,...n?u(n):{},apiKey:a,baseURL:r})})}const _e=[{model_id:"eleven_multilingual_v2",name:"Eleven Multilingual v2",can_be_finetuned:!0,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!0,can_use_speaker_boost:!0,serves_pro_voices:!1,token_cost_factor:1,description:"Our most life-like, emotionally rich mode in 29 languages. Best for voice overs, audiobooks, post-production, or any other content creation needs.",requires_alpha_access:!1,max_characters_request_free_user:1e4,max_characters_request_subscribed_user:1e4,maximum_text_length_per_request:1e4,languages:[{language_id:"en",name:"English"},{language_id:"ja",name:"Japanese"},{language_id:"zh",name:"Chinese"},{language_id:"de",name:"German"},{language_id:"hi",name:"Hindi"},{language_id:"fr",name:"French"},{language_id:"ko",name:"Korean"},{language_id:"pt",name:"Portuguese"},{language_id:"it",name:"Italian"},{language_id:"es",name:"Spanish"},{language_id:"id",name:"Indonesian"},{language_id:"nl",name:"Dutch"},{language_id:"tr",name:"Turkish"},{language_id:"fil",name:"Filipino"},{language_id:"pl",name:"Polish"},{language_id:"sv",name:"Swedish"},{language_id:"bg",name:"Bulgarian"},{language_id:"ro",name:"Romanian"},{language_id:"ar",name:"Arabic"},{language_id:"cs",name:"Czech"},{language_id:"el",name:"Greek"},{language_id:"fi",name:"Finnish"},{language_id:"hr",name:"Croatian"},{language_id:"ms",name:"Malay"},{language_id:"sk",name:"Slovak"},{language_id:"da",name:"Danish"},{language_id:"ta",name:"Tamil"},{language_id:"uk",name:"Ukrainian"},{language_id:"ru",name:"Russian"}],model_rates:{character_cost_multiplier:1},concurrency_group:"standard"},{model_id:"eleven_flash_v2_5",name:"Eleven Flash v2.5",can_be_finetuned:!0,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:"Our ultra low latency model in 32 languages. Ideal for conversational use cases.",requires_alpha_access:!1,max_characters_request_free_user:4e4,max_characters_request_subscribed_user:4e4,maximum_text_length_per_request:4e4,languages:[{language_id:"en",name:"English"},{language_id:"ja",name:"Japanese"},{language_id:"zh",name:"Chinese"},{language_id:"de",name:"German"},{language_id:"hi",name:"Hindi"},{language_id:"fr",name:"French"},{language_id:"ko",name:"Korean"},{language_id:"pt",name:"Portuguese"},{language_id:"it",name:"Italian"},{language_id:"es",name:"Spanish"},{language_id:"ru",name:"Russian"},{language_id:"id",name:"Indonesian"},{language_id:"nl",name:"Dutch"},{language_id:"tr",name:"Turkish"},{language_id:"fil",name:"Filipino"},{language_id:"pl",name:"Polish"},{language_id:"sv",name:"Swedish"},{language_id:"bg",name:"Bulgarian"},{language_id:"ro",name:"Romanian"},{language_id:"ar",name:"Arabic"},{language_id:"cs",name:"Czech"},{language_id:"el",name:"Greek"},{language_id:"fi",name:"Finnish"},{language_id:"hr",name:"Croatian"},{language_id:"ms",name:"Malay"},{language_id:"sk",name:"Slovak"},{language_id:"da",name:"Danish"},{language_id:"ta",name:"Tamil"},{language_id:"uk",name:"Ukrainian"},{language_id:"hu",name:"Hungarian"},{language_id:"no",name:"Norwegian"},{language_id:"vi",name:"Vietnamese"}],model_rates:{character_cost_multiplier:.5},concurrency_group:"turbo"},{model_id:"eleven_turbo_v2_5",name:"Eleven Turbo v2.5",can_be_finetuned:!0,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:"Our high quality, low latency model in 32 languages. Best for developer use cases where speed matters and you need non-English languages.",requires_alpha_access:!1,max_characters_request_free_user:4e4,max_characters_request_subscribed_user:4e4,maximum_text_length_per_request:4e4,languages:[{language_id:"en",name:"English"},{language_id:"ja",name:"Japanese"},{language_id:"zh",name:"Chinese"},{language_id:"de",name:"German"},{language_id:"hi",name:"Hindi"},{language_id:"fr",name:"French"},{language_id:"ko",name:"Korean"},{language_id:"pt",name:"Portuguese"},{language_id:"it",name:"Italian"},{language_id:"es",name:"Spanish"},{language_id:"ru",name:"Russian"},{language_id:"id",name:"Indonesian"},{language_id:"nl",name:"Dutch"},{language_id:"tr",name:"Turkish"},{language_id:"fil",name:"Filipino"},{language_id:"pl",name:"Polish"},{language_id:"sv",name:"Swedish"},{language_id:"bg",name:"Bulgarian"},{language_id:"ro",name:"Romanian"},{language_id:"ar",name:"Arabic"},{language_id:"cs",name:"Czech"},{language_id:"el",name:"Greek"},{language_id:"fi",name:"Finnish"},{language_id:"hr",name:"Croatian"},{language_id:"ms",name:"Malay"},{language_id:"sk",name:"Slovak"},{language_id:"da",name:"Danish"},{language_id:"ta",name:"Tamil"},{language_id:"uk",name:"Ukrainian"},{language_id:"vi",name:"Vietnamese"},{language_id:"no",name:"Norwegian"},{language_id:"hu",name:"Hungarian"}],model_rates:{character_cost_multiplier:.5},concurrency_group:"turbo"},{model_id:"eleven_turbo_v2",name:"Eleven Turbo v2",can_be_finetuned:!0,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:"Our English-only, low latency model. Best for developer use cases where speed matters and you only need English. Performance is on par with Turbo v2.5.",requires_alpha_access:!1,max_characters_request_free_user:3e4,max_characters_request_subscribed_user:3e4,maximum_text_length_per_request:3e4,languages:[{language_id:"en",name:"English"}],model_rates:{character_cost_multiplier:.5},concurrency_group:"turbo"},{model_id:"eleven_flash_v2",name:"Eleven Flash v2",can_be_finetuned:!0,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:"Our ultra low latency model in english. Ideal for conversational use cases.",requires_alpha_access:!1,max_characters_request_free_user:3e4,max_characters_request_subscribed_user:3e4,maximum_text_length_per_request:3e4,languages:[{language_id:"en",name:"English"}],model_rates:{character_cost_multiplier:.5},concurrency_group:"turbo"},{model_id:"eleven_english_sts_v2",name:"Eleven English v2",can_be_finetuned:!1,can_do_text_to_speech:!1,can_do_voice_conversion:!0,can_use_style:!0,can_use_speaker_boost:!0,serves_pro_voices:!1,token_cost_factor:1,description:"Our state-of-the-art speech to speech model suitable for scenarios where you need maximum control over the content and prosody of your generations.",requires_alpha_access:!1,max_characters_request_free_user:5e3,max_characters_request_subscribed_user:5e3,maximum_text_length_per_request:5e3,languages:[{language_id:"en",name:"English"}],model_rates:{character_cost_multiplier:1},concurrency_group:"standard"},{model_id:"eleven_multilingual_v1",name:"Eleven Multilingual v1",can_be_finetuned:!1,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:"Our first Multilingual model, capability of generating speech in 10 languages. Now outclassed by Multilingual v2 (for content creation) and Turbo v2.5 (for low latency use cases).",requires_alpha_access:!1,max_characters_request_free_user:1e4,max_characters_request_subscribed_user:1e4,maximum_text_length_per_request:1e4,languages:[{language_id:"en",name:"English"},{language_id:"de",name:"German"},{language_id:"pl",name:"Polish"},{language_id:"es",name:"Spanish"},{language_id:"it",name:"Italian"},{language_id:"fr",name:"French"},{language_id:"pt",name:"Portuguese"},{language_id:"hi",name:"Hindi"},{language_id:"ar",name:"Arabic"}],model_rates:{character_cost_multiplier:1},concurrency_group:"standard"},{model_id:"eleven_multilingual_sts_v2",name:"Eleven Multilingual v2",can_be_finetuned:!0,can_do_text_to_speech:!1,can_do_voice_conversion:!0,can_use_style:!0,can_use_speaker_boost:!0,serves_pro_voices:!1,token_cost_factor:1,description:"Our cutting-edge, multilingual speech-to-speech model is designed for situations that demand unparalleled control over both the content and the prosody of the generated speech across various languages.",requires_alpha_access:!1,max_characters_request_free_user:1e4,max_characters_request_subscribed_user:1e4,maximum_text_length_per_request:1e4,languages:[{language_id:"en",name:"English"},{language_id:"ja",name:"Japanese"},{language_id:"zh",name:"Chinese"},{language_id:"de",name:"German"},{language_id:"hi",name:"Hindi"},{language_id:"fr",name:"French"},{language_id:"ko",name:"Korean"},{language_id:"pt",name:"Portuguese"},{language_id:"it",name:"Italian"},{language_id:"es",name:"Spanish"},{language_id:"ru",name:"Russian"},{language_id:"id",name:"Indonesian"},{language_id:"nl",name:"Dutch"},{language_id:"tr",name:"Turkish"},{language_id:"fil",name:"Filipino"},{language_id:"pl",name:"Polish"},{language_id:"sv",name:"Swedish"},{language_id:"bg",name:"Bulgarian"},{language_id:"ro",name:"Romanian"},{language_id:"ar",name:"Arabic"},{language_id:"cs",name:"Czech"},{language_id:"el",name:"Greek"},{language_id:"fi",name:"Finnish"},{language_id:"hr",name:"Croatian"},{language_id:"ms",name:"Malay"},{language_id:"sk",name:"Slovak"},{language_id:"da",name:"Danish"},{language_id:"ta",name:"Tamil"},{language_id:"uk",name:"Ukrainian"}],model_rates:{character_cost_multiplier:1},concurrency_group:"standard"},{model_id:"eleven_monolingual_v1",name:"Eleven English v1",can_be_finetuned:!1,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:"Our first ever text to speech model. Now outclassed by Multilingual v2 (for content creation) and Turbo v2.5 (for low latency use cases).",requires_alpha_access:!1,max_characters_request_free_user:1e4,max_characters_request_subscribed_user:1e4,maximum_text_length_per_request:1e4,languages:[{language_id:"en",name:"English"}],model_rates:{character_cost_multiplier:1},concurrency_group:"standard"}],ye=te("providers",()=>{const a=se("settings/credentials/providers",{}),{t:r}=oe();async function u(e){try{const i=await fetch("https://openrouter.ai/api/v1/models",{headers:{Authorization:`Bearer ${e.apiKey.trim()}`,"Content-Type":"application/json"}});if(!i.ok)throw new Error(`Failed to fetch OpenRouter models: ${i.statusText}`);return(await i.json()).data.map(t=>({id:t.id,name:t.name||t.id,provider:"openrouter-ai",description:t.description||"",contextLength:t.context_length,deprecated:!1}))}catch(i){throw console.error("Error fetching OpenRouter models:",i),i}}const s={"openrouter-ai":{id:"openrouter-ai",nameKey:"settings.pages.providers.provider.openrouter.title",name:"OpenRouter",descriptionKey:"settings.pages.providers.provider.openrouter.description",description:"openrouter.ai",icon:"i-lobe-icons:openrouter",defaultOptions:{baseUrl:"https://openrouter.ai/api/v1/"},createProvider:e=>pe(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>u(e)}},ollama:{id:"ollama",nameKey:"settings.pages.providers.provider.ollama.title",name:"Ollama",descriptionKey:"settings.pages.providers.provider.ollama.description",description:"ollama.com",icon:"i-lobe-icons:ollama",defaultOptions:{baseUrl:"http://localhost:11434/v1/"},createProvider:e=>B(e.baseUrl.trim()),capabilities:{listModels:async e=>(await h({...B(e.baseUrl.trim()).model()})).map(i=>({id:i.id,name:i.id,provider:"ollama",description:"",contextLength:0,deprecated:!1}))}},vllm:{id:"vllm",nameKey:"settings.pages.providers.provider.vllm.title",name:"vLLM",descriptionKey:"settings.pages.providers.provider.vllm.description",description:"vllm.ai",iconColor:"i-lobe-icons:vllm-color",createProvider:e=>B(e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:"llama-2-7b",name:"Llama 2 (7B)",provider:"vllm",description:"Meta's Llama 2 7B parameter model",contextLength:4096},{id:"llama-2-13b",name:"Llama 2 (13B)",provider:"vllm",description:"Meta's Llama 2 13B parameter model",contextLength:4096},{id:"llama-2-70b",name:"Llama 2 (70B)",provider:"vllm",description:"Meta's Llama 2 70B parameter model",contextLength:4096},{id:"mistral-7b",name:"Mistral (7B)",provider:"vllm",description:"Mistral AI's 7B parameter model",contextLength:8192},{id:"mixtral-8x7b",name:"Mixtral (8x7B)",provider:"vllm",description:"Mistral AI's Mixtral 8x7B MoE model",contextLength:32768},{id:"custom",name:"Custom Model",provider:"vllm",description:"Specify a custom model name",contextLength:0}]}},openai:{id:"openai",nameKey:"settings.pages.providers.provider.openai.title",name:"OpenAI",descriptionKey:"settings.pages.providers.provider.openai.description",description:"openai.com",icon:"i-lobe-icons:openai",defaultOptions:{baseUrl:"https://api.openai.com/v1/"},createProvider:e=>C(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await h({...C(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(i=>({id:i.id,name:i.id,provider:"openai",description:"",contextLength:0,deprecated:!1}))}},anthropic:{id:"anthropic",nameKey:"settings.pages.providers.provider.anthropic.title",name:"Anthropic",descriptionKey:"settings.pages.providers.provider.anthropic.description",description:"anthropic.com",icon:"i-lobe-icons:anthropic",defaultOptions:{baseUrl:"https://api.anthropic.com/v1/"},createProvider:e=>ue(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:"claude-3-7-sonnet-20250219",name:"Claude 3.7 Sonnet",provider:"anthropic",description:"",contextLength:0,deprecated:!1},{id:"claude-3-5-sonnet-20241022",name:"Claude 3.5 Sonnet (New)",provider:"anthropic",description:"",contextLength:0,deprecated:!1},{id:"claude-3-5-haiku-20241022",name:"Claude 3.5 Haiku",provider:"anthropic",description:"",contextLength:0,deprecated:!1},{id:"claude-3-5-sonnet-20240620",name:"Claude 3.5 Sonnet (Old)",provider:"anthropic",description:"",contextLength:0,deprecated:!1},{id:"claude-3-haiku-20240307",name:"Claude 3 Haiku",provider:"anthropic",description:"",contextLength:0,deprecated:!1},{id:"claude-3-opus-20240229",name:"Claude 3 Opus",provider:"anthropic",description:"",contextLength:0,deprecated:!1}]}},"google-generative-ai":{id:"google-generative-ai",nameKey:"settings.pages.providers.provider.google-generative-ai.title",name:"Google Gemini",descriptionKey:"settings.pages.providers.provider.google-generative-ai.description",description:"ai.google.dev",icon:"i-lobe-icons:gemini",defaultOptions:{baseUrl:"https://generativelanguage.googleapis.com/v1beta/openai/"},createProvider:e=>G(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await h({...G(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(i=>({id:i.id,name:i.id,provider:"google-generative-ai",description:"",contextLength:0,deprecated:!1}))}},xai:{id:"xai",nameKey:"settings.pages.providers.provider.xai.title",name:"xAI",descriptionKey:"settings.pages.providers.provider.xai.description",description:"x.ai",icon:"i-lobe-icons:xai",createProvider:e=>V(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await h({...V(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(i=>({id:i.id,name:i.id,provider:"xai",description:"",contextLength:0,deprecated:!1}))}},deepseek:{id:"deepseek",nameKey:"settings.pages.providers.provider.deepseek.title",name:"DeepSeek",descriptionKey:"settings.pages.providers.provider.deepseek.description",description:"deepseek.com",iconColor:"i-lobe-icons:deepseek-color",createProvider:e=>I(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await h({...I(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(i=>({id:i.id,name:i.id,provider:"deepseek",description:"",contextLength:0,deprecated:!1}))}},elevenlabs:{id:"elevenlabs",nameKey:"settings.pages.providers.provider.elevenlabs.title",name:"ElevenLabs",descriptionKey:"settings.pages.providers.provider.elevenlabs.description",description:"elevenlabs.io",icon:"i-simple-icons:elevenlabs",defaultOptions:{baseUrl:"https://unspeech.hyp3r.link/v1/",voiceSettings:{similarityBoost:.75,stability:.5}},createProvider:e=>W(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>_e.map(e=>({id:e.model_id,name:e.name,provider:"elevenlabs",description:e.description,contextLength:0,deprecated:!1})),listVoices:async e=>{const i=W(e.apiKey.trim(),e.baseUrl.trim()),o=await J({...i.voice()}),t=o.findIndex(b=>b.name.includes("Aria")),v=o.findIndex(b=>b.name.includes("Bill")),U=t!==-1?t:0,F=v!==-1?v:o.length-1,j=Math.min(U,F),L=Math.max(U,F);return[...o.slice(0,j),...o.slice(L+1),...o.slice(j,L+1)].map(b=>({id:b.id,name:b.name,provider:"elevenlabs",previewURL:b.preview_audio_url,languages:b.languages}))}}},"microsoft-speech":{id:"microsoft-speech",nameKey:"settings.pages.providers.provider.microsoft-speech.title",name:"Microsoft / Azure Speech",descriptionKey:"settings.pages.providers.provider.microsoft-speech.description",description:"speech.microsoft.com",iconColor:"i-lobe-icons:microsoft-color",defaultOptions:{baseUrl:"https://unspeech.hyp3r.link/v1/"},createProvider:e=>X(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:"v1",name:"v1",provider:"microsoft-speech",description:"",contextLength:0,deprecated:!1}],listVoices:async e=>{const i=X(e.apiKey.trim(),e.baseUrl.trim());return(await J({...i.voice({region:e.region})})).map(t=>{var v;return{id:t.id,name:t.name,provider:"microsoft-speech",previewURL:t.preview_audio_url,languages:t.languages,gender:(v=t.labels)==null?void 0:v.gender}})}}},"together-ai":{id:"together-ai",nameKey:"settings.pages.providers.provider.together.title",name:"Together.ai",descriptionKey:"settings.pages.providers.provider.together.description",description:"together.ai",iconColor:"i-lobe-icons:together-color",createProvider:e=>H(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await h({...H(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(i=>({id:i.id,name:i.id,provider:"together-ai",description:"",contextLength:0,deprecated:!1}))}},"novita-ai":{id:"novita-ai",nameKey:"settings.pages.providers.provider.novita.title",name:"Novita",descriptionKey:"settings.pages.providers.provider.novita.description",description:"novita.ai",iconColor:"i-lobe-icons:novita-color",createProvider:e=>N(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await h({...N(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(i=>({id:i.id,name:i.id,provider:"novita-ai",description:"",contextLength:0,deprecated:!1}))}},"fireworks-ai":{id:"fireworks-ai",nameKey:"settings.pages.providers.provider.fireworks.title",name:"Fireworks.ai",descriptionKey:"settings.pages.providers.provider.fireworks.description",description:"fireworks.ai",icon:"i-lobe-icons:fireworks",createProvider:e=>z(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await h({...z(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(i=>({id:i.id,name:i.id,provider:"fireworks-ai",description:"",contextLength:0,deprecated:!1}))}},"featherless-ai":{id:"featherless-ai",nameKey:"settings.pages.providers.provider.featherless.title",name:"Featherless.ai",descriptionKey:"settings.pages.providers.provider.featherless.description",description:"featherless.ai",icon:"i-lobe-icons:featherless-ai",defaultOptions:{baseUrl:"https://api.featherless.ai/v1/"},createProvider:e=>C(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await h({...C(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(i=>({id:i.id,name:i.id,provider:"featherless-ai",description:"",contextLength:0,deprecated:!1}))}},"cloudflare-workers-ai":{id:"cloudflare-workers-ai",nameKey:"settings.pages.providers.provider.cloudflare-workers-ai.title",name:"Cloudflare Workers AI",descriptionKey:"settings.pages.providers.provider.cloudflare-workers-ai.description",description:"cloudflare.com",iconColor:"i-lobe-icons:cloudflare-color",createProvider:e=>me(e.apiKey.trim(),e.accountId),capabilities:{listModels:async()=>[]}},"perplexity-ai":{id:"perplexity-ai",nameKey:"settings.pages.providers.provider.perplexity.title",name:"Perplexity",descriptionKey:"settings.pages.providers.provider.perplexity.description",description:"perplexity.ai",icon:"i-lobe-icons:perplexity",defaultOptions:{baseUrl:"https://api.perplexity.ai"},createProvider:e=>ge(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:"sonar-small-online",name:"Sonar Small (Online)",provider:"perplexity-ai",description:"Efficient model with online search capabilities",contextLength:12e3},{id:"sonar-medium-online",name:"Sonar Medium (Online)",provider:"perplexity-ai",description:"Balanced model with online search capabilities",contextLength:12e3},{id:"sonar-large-online",name:"Sonar Large (Online)",provider:"perplexity-ai",description:"Powerful model with online search capabilities",contextLength:12e3},{id:"codey-small",name:"Codey Small",provider:"perplexity-ai",description:"Specialized for code generation and understanding",contextLength:12e3},{id:"codey-large",name:"Codey Large",provider:"perplexity-ai",description:"Advanced code generation and understanding",contextLength:12e3}]}},"mistral-ai":{id:"mistral-ai",nameKey:"settings.pages.providers.provider.mistral.title",name:"Mistral",descriptionKey:"settings.pages.providers.provider.mistral.description",description:"mistral.ai",iconColor:"i-lobe-icons:mistral-color",createProvider:e=>D(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await h({...D(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(i=>({id:i.id,name:i.id,provider:"mistral-ai",description:"",contextLength:0,deprecated:!1}))}},"moonshot-ai":{id:"moonshot-ai",nameKey:"settings.pages.providers.provider.moonshot.title",name:"Moonshot AI",descriptionKey:"settings.pages.providers.provider.moonshot.description",description:"moonshot.ai",icon:"i-lobe-icons:moonshot",createProvider:e=>$(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await h({...$(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(i=>({id:i.id,name:i.id,provider:"moonshot-ai",description:"",contextLength:0,deprecated:!1}))}}};function f(e){const i=a.value[e];if(!i)return!1;switch(e){case"openrouter-ai":return!!i.apiKey&&!!i.baseUrl;case"ollama":return!!i.baseUrl;case"vllm":return!!i.baseUrl;case"openai":return!!i.apiKey;case"anthropic":return!!i.apiKey;case"elevenlabs":return!!i.apiKey;case"xai":return!!i.apiKey;case"deepseek":return!!i.apiKey;case"together-ai":return!!i.apiKey;case"novita-ai":return!!i.apiKey;case"fireworks-ai":return!!i.apiKey;case"featherless-ai":return!!i.apiKey;case"microsoft-speech":return!!i.apiKey&&!!i.region;case"cloudflare-workers-ai":return!!i.apiKey;case"mistral-ai":return!!i.apiKey;case"moonshot-ai":return!!i.apiKey;default:return!1}}const n=E({});function d(e){var i;if(!a.value[e]){const o=s[e];a.value[e]={baseUrl:((i=o.defaultOptions)==null?void 0:i.baseUrl)||""}}}Object.keys(s).forEach(d);function y(){Object.keys(s).forEach(e=>{n.value[e]=f(e)})}y(),le(a,y,{deep:!0});const _=x(()=>Object.keys(s).filter(e=>n.value[e])),l=E({}),M=E({}),w=E({});async function P(e){const i=a.value[e];if(!i)return[];const o=s[e];if(!o)return[];M.value[e]=!0,w.value[e]=null;try{const t=o.capabilities.listModels?await o.capabilities.listModels(i):[];return l.value[e]=t.map(v=>({id:v.id,name:v.name,description:v.description,contextLength:v.contextLength,deprecated:v.deprecated,provider:e})),l.value[e]}catch(t){return console.error(`Error fetching models for ${e}:`,t),w.value[e]=t instanceof Error?t.message:"Unknown error",[]}finally{M.value[e]=!1}}function O(e){return l.value[e]||[]}const A=x(()=>{const e=[];for(const i of _.value)e.push(...l.value[i]||[]);return e});async function R(){for(const e of _.value)s[e].capabilities.listModels&&await P(e)}function T(e){const i=s[e];if(!i)throw new Error(`Provider metadata for ${e} not found`);return{...i,localizedName:r(i.nameKey,i.name),localizedDescription:r(i.descriptionKey,i.description)}}const ee=x(()=>Object.values(s).map(e=>({...e,localizedName:r(e.nameKey,e.name),localizedDescription:r(e.descriptionKey,e.description),configured:n.value[e.id]||!1})));function q(e){const i=a.value[e];if(!i)throw new Error(`Provider credentials for ${e} not found`);const o=s[e];if(!o)throw new Error(`Provider metadata for ${e} not found`);try{return o.createProvider(i)}catch(t){throw console.error(`Error creating provider instance for ${e}:`,t),t}}const S=x(()=>_.value.map(e=>T(e))),ae=x(()=>S.value.filter(e=>{const i=q(e.id);return"chat"in i&&typeof i.chat=="function"})),ie=x(()=>S.value.filter(e=>{const i=q(e.id);return"transcription"in i&&typeof i.transcription=="function"})),re=x(()=>S.value.filter(e=>{const i=q(e.id);return"speech"in i&&typeof i.speech=="function"}));function ne(e){return a.value[e]}return{providers:a,getProviderConfig:ne,availableProviders:_,configuredProviders:n,providerMetadata:s,getProviderMetadata:T,allProvidersMetadata:ee,initializeProvider:d,validateProvider:f,availableModels:l,isLoadingModels:M,modelLoadError:w,fetchModelsForProvider:P,getModelsForProvider:O,allAvailableModels:A,loadModelsForConfiguredProviders:R,getProviderInstance:q,availableProvidersMetadata:S,availableTextGenerationsProvidersMetadata:ae,availableAudioSpeechProvidersMetadata:re,availableAudioTranscriptionProvidersMetadata:ie}});export{h as l,ye as u}; diff --git a/assets/queue-B4R0QEYc.js b/assets/queue-c563jmhe.js similarity index 91% rename from assets/queue-B4R0QEYc.js rename to assets/queue-c563jmhe.js index ea9c9a44b065c90e6d66d458e5812fe7874a3c35..6b9f624e877d765df44023d7280e0e4b3ad78485 100644 --- a/assets/queue-B4R0QEYc.js +++ b/assets/queue-c563jmhe.js @@ -1 +1 @@ -import{g as l}from"./index-7-fr_lhT.js";function m(f){const t=l([]),a=l(!1),d={add:[],pick:[],processing:[],error:[],processed:[],done:[]},s={};function c(n,e){d[n].push(e)}function r(n,...e){d[n].forEach(i=>{i(...e)})}function h(n,e){s[n]=s[n]||[],s[n].push(e)}function p(n,...e){(s[n]||[]).forEach(i=>{i(...e)})}async function v(n){t.value.push(n),r("add",n)}function g(){const n=t.value.shift();if(n)return r("pick",n),n}async function u(){if(a.value)return;const n=g();if(n){a.value=!0;for(const e of f.handlers){r("processing",n,e);try{const o=await e({data:n,itemsToBeProcessed:()=>t.value.length,emit:p});r("processed",n,o,e)}catch(o){r("error",n,o,e);continue}}a.value=!1,r("done",n),t.value.length>0&&u()}}return c("add",u),c("done",u),{add:v,on:c,onHandlerEvent:h,queue:t}}export{m as u}; +import{g as l}from"./index-hDb1Lsb8.js";function m(f){const t=l([]),a=l(!1),d={add:[],pick:[],processing:[],error:[],processed:[],done:[]},s={};function c(n,e){d[n].push(e)}function r(n,...e){d[n].forEach(i=>{i(...e)})}function h(n,e){s[n]=s[n]||[],s[n].push(e)}function p(n,...e){(s[n]||[]).forEach(i=>{i(...e)})}async function v(n){t.value.push(n),r("add",n)}function g(){const n=t.value.shift();if(n)return r("pick",n),n}async function u(){if(a.value)return;const n=g();if(n){a.value=!0;for(const e of f.handlers){r("processing",n,e);try{const o=await e({data:n,itemsToBeProcessed:()=>t.value.length,emit:p});r("processed",n,o,e)}catch(o){r("error",n,o,e);continue}}a.value=!1,r("done",n),t.value.length>0&&u()}}return c("add",u),c("done",u),{add:v,on:c,onHandlerEvent:h,queue:t}}export{m as u}; diff --git a/assets/queue-BwjoE2a-.js b/assets/queue-kEu75MMe.js similarity index 90% rename from assets/queue-BwjoE2a-.js rename to assets/queue-kEu75MMe.js index a5d30721440e91c54fe5090228774a0c6f827c07..a8f01d364d5f0a0b7c66d620281a518c5c224e8d 100644 --- a/assets/queue-BwjoE2a-.js +++ b/assets/queue-kEu75MMe.js @@ -1 +1 @@ -import{u as o}from"./queue-B4R0QEYc.js";import{d as v,g as h,l as g,c as k,o as w,a as I}from"./index-7-fr_lhT.js";const Q=v({__name:"queue",setup(P){function i(e){return new Promise(a=>setTimeout(a,e))}const n=h(""),d=o({handlers:[async e=>{console.log("ready to play speech audio for",e)}]}),u=o({handlers:[async e=>{console.log("ready to stream speech audio for",e),d.add(e.data)}]}),l=o({handlers:[async e=>{const a=[".","?","!"];let s=!1;for(const t of a){if(!e.data.includes(t))continue;const r=e.data.indexOf(t),p=e.data.slice(0,r+1),y=e.data.slice(r+1);n.value+=p,u.add(n.value.trim()),n.value=y,s=!0}s||(n.value+=e.data)}]}),c=["Hello"," N","eko","! I"," am"," an"," AI"," assistant"," trained"," to"," help"," with"," a"," variety"," of"," tasks"," such"," as"," answering"," questions",","," providing"," information",","," giving"," recommendations",","," and"," more",". How"," can"," I"," assist"," you"," today","?","Hello"," N","eko",","," I"," am"," an"," AI"," assistant","."," I"," can"," help"," answer"," questions",","," provide"," information",","," assist"," with"," tasks",","," and"," engage"," in"," conversation","."," How"," can"," I"," assist"," you"," today","?"];async function f(){for(const e of c)await i(100),l.add(e)}async function m(){f()}return g(()=>{m()}),(e,a)=>(w(),k("div",null,a[0]||(a[0]=[I("div",null,null,-1)])))}});export{Q as default}; +import{u as o}from"./queue-c563jmhe.js";import{d as v,g as h,l as g,c as k,o as w,a as I}from"./index-hDb1Lsb8.js";const Q=v({__name:"queue",setup(P){function i(e){return new Promise(a=>setTimeout(a,e))}const n=h(""),d=o({handlers:[async e=>{console.log("ready to play speech audio for",e)}]}),u=o({handlers:[async e=>{console.log("ready to stream speech audio for",e),d.add(e.data)}]}),l=o({handlers:[async e=>{const a=[".","?","!"];let s=!1;for(const t of a){if(!e.data.includes(t))continue;const r=e.data.indexOf(t),p=e.data.slice(0,r+1),y=e.data.slice(r+1);n.value+=p,u.add(n.value.trim()),n.value=y,s=!0}s||(n.value+=e.data)}]}),c=["Hello"," N","eko","! I"," am"," an"," AI"," assistant"," trained"," to"," help"," with"," a"," variety"," of"," tasks"," such"," as"," answering"," questions",","," providing"," information",","," giving"," recommendations",","," and"," more",". How"," can"," I"," assist"," you"," today","?","Hello"," N","eko",","," I"," am"," an"," AI"," assistant","."," I"," can"," help"," answer"," questions",","," provide"," information",","," assist"," with"," tasks",","," and"," engage"," in"," conversation","."," How"," can"," I"," assist"," you"," today","?"];async function f(){for(const e of c)await i(100),l.add(e)}async function m(){f()}return g(()=>{m()}),(e,a)=>(w(),k("div",null,a[0]||(a[0]=[I("div",null,null,-1)])))}});export{Q as default}; diff --git a/assets/queues-BATLkujj.js b/assets/queues-DEhcWTMJ.js similarity index 89% rename from assets/queues-BATLkujj.js rename to assets/queues-DEhcWTMJ.js index 22442e4887c46c86d90e93d3c4a09819fd9bce28..bce5b1a71d080ff5e614eded950e33aba325a270 100644 --- a/assets/queues-BATLkujj.js +++ b/assets/queues-DEhcWTMJ.js @@ -1 +1 @@ -import{d as m,bK as p,bL as v,g as u,w as y,A as k,bE as w,o as b,c as h,n as E}from"./index-7-fr_lhT.js";import{j as f}from"./live2d-zip-loader-dDw0Wbbr.js";import{u as l}from"./queue-B4R0QEYc.js";const D=m({__name:"BasicTextarea",props:{modelValue:{default:""},modelModifiers:{}},emits:p(["submit"],["update:modelValue"]),setup(o,{emit:n}){const e=n,t=v(o,"modelValue"),a=u(),s=u("auto");function i(r){r.code==="Enter"&&!r.shiftKey&&(r.preventDefault(),e("submit",t.value))}return y(t,()=>{s.value="auto",requestAnimationFrame(()=>{a.value&&(s.value=`${a.value.scrollHeight}px`)})},{immediate:!0}),(r,d)=>k((b(),h("textarea",{ref_key:"textareaRef",ref:a,"onUpdate:modelValue":d[0]||(d[0]=c=>t.value=c),style:E({height:s.value}),onKeydown:i},null,36)),[[w,t.value]])}}),M="<|llm_inference_end|>";function A(o){function n(e){for(const t of f)if(e.includes(t))return{ok:!0,emotion:t};return{ok:!1,emotion:""}}return l({handlers:[async e=>{if(f.includes(e.data)){e.emit("emotion",e.data),await o.add(e.data);return}{const{ok:t,emotion:a}=n(e.data);t&&(e.emit("emotion",a),await o.add(a))}}]})}function N(){function o(e){if(!/<\|DELAY:\d+\|>/i.test(e))return{ok:!1,delay:0};const t=/<\|DELAY:(\d+)\|>/i.exec(e),a=t==null?void 0:t[1];if(!a)return{ok:!1,delay:0};const s=Number.parseFloat(a);return s<=0||Number.isNaN(s)?{ok:!0,delay:0}:{ok:!0,delay:s}}function n(e){return new Promise(t=>setTimeout(t,e))}return l({handlers:[async e=>{const{ok:t,delay:a}=o(e.data);t&&(e.emit("delay",a),await n(a*1e3))}]})}function T(o){const n=u("");return l({handlers:[async e=>{if(e.data===M){const a=n.value.trim();a&&await o.add(a),n.value="";return}const t=/[.?!]/;for(n.value+=e.data;n.value;){const a=t.exec(n.value);if(!a||typeof a.index>"u")break;const s=n.value.slice(0,a.index+1),i=n.value.slice(a.index+1);await o.add(s),n.value=i}}]})}export{D as _,A as a,N as b,M as l,T as u}; +import{d as m,bK as p,bL as v,g as u,w as y,A as k,bE as w,o as b,c as h,n as E}from"./index-hDb1Lsb8.js";import{j as f}from"./live2d-zip-loader--bTGFeQd.js";import{u as l}from"./queue-c563jmhe.js";const D=m({__name:"BasicTextarea",props:{modelValue:{default:""},modelModifiers:{}},emits:p(["submit"],["update:modelValue"]),setup(o,{emit:n}){const e=n,t=v(o,"modelValue"),a=u(),s=u("auto");function i(r){r.code==="Enter"&&!r.shiftKey&&(r.preventDefault(),e("submit",t.value))}return y(t,()=>{s.value="auto",requestAnimationFrame(()=>{a.value&&(s.value=`${a.value.scrollHeight}px`)})},{immediate:!0}),(r,d)=>k((b(),h("textarea",{ref_key:"textareaRef",ref:a,"onUpdate:modelValue":d[0]||(d[0]=c=>t.value=c),style:E({height:s.value}),onKeydown:i},null,36)),[[w,t.value]])}}),M="<|llm_inference_end|>";function A(o){function n(e){for(const t of f)if(e.includes(t))return{ok:!0,emotion:t};return{ok:!1,emotion:""}}return l({handlers:[async e=>{if(f.includes(e.data)){e.emit("emotion",e.data),await o.add(e.data);return}{const{ok:t,emotion:a}=n(e.data);t&&(e.emit("emotion",a),await o.add(a))}}]})}function N(){function o(e){if(!/<\|DELAY:\d+\|>/i.test(e))return{ok:!1,delay:0};const t=/<\|DELAY:(\d+)\|>/i.exec(e),a=t==null?void 0:t[1];if(!a)return{ok:!1,delay:0};const s=Number.parseFloat(a);return s<=0||Number.isNaN(s)?{ok:!0,delay:0}:{ok:!0,delay:s}}function n(e){return new Promise(t=>setTimeout(t,e))}return l({handlers:[async e=>{const{ok:t,delay:a}=o(e.data);t&&(e.emit("delay",a),await n(a*1e3))}]})}function T(o){const n=u("");return l({handlers:[async e=>{if(e.data===M){const a=n.value.trim();a&&await o.add(a),n.value="";return}const t=/[.?!]/;for(n.value+=e.data;n.value;){const a=t.exec(n.value);if(!a||typeof a.index>"u")break;const s=n.value.slice(0,a.index+1),i=n.value.slice(a.index+1);await o.add(s),n.value=i}}]})}export{D as _,A as a,N as b,M as l,T as u}; diff --git a/assets/speech-DqZBet28.js b/assets/speech-9nYJ52qB.js similarity index 98% rename from assets/speech-DqZBet28.js rename to assets/speech-9nYJ52qB.js index 3460de18ae35d09fcbaed5d315229fa16185559f..125e9d5751d179d6adbae890f4d1fbc3cae67bbf 100644 --- a/assets/speech-DqZBet28.js +++ b/assets/speech-9nYJ52qB.js @@ -1 +1 @@ -import{d as O,g as V,l as ne,w as Z,m as ie,c as i,o as n,bx as H,by as K,a as e,n as me,z as C,bK as Y,bL as J,A as j,bA as pe,C as $,D as k,b as S,y as I,bn as ee,h as fe,c7 as ge,bE as W,x as X,q as xe,s as le,bG as be,H as he,bw as ye,e as t,bo as ke,ad as N,bH as we}from"./index-7-fr_lhT.js";import{_ as oe,a as ae,b as _e}from"./TestDummyMarker.vue_vue_type_script_setup_true_lang-OSsy22LU.js";import{_ as Se}from"./FieldInput.vue_vue_type_script_setup_true_lang-BhtqkEkU.js";import{R as Ve,a as Me}from"./RadioCardDetailManySelect-Bn9sPp4x.js";import{_ as Ce}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-BNzPx9yx.js";import{_ as $e}from"./Input.vue_vue_type_script_setup_true_lang-58p3G1RX.js";import"./live2d-zip-loader-dDw0Wbbr.js";import{u as Pe}from"./providers-B7zWTIWF.js";import{u as Ue,g as Le}from"./speech-DK9my_xu.js";import{b as re}from"./route-block-B_A1xBdJ.js";import"./index-Be1NqeGb.js";const qe=O({__name:"AudioSpectrum",props:{stream:null,bars:{default:32},minFreq:{default:60},maxFreq:{default:4e3}},setup(o){const l=o,x=V(Array.from({length:l.bars}).fill(0));ne(()=>{p()}),Z(()=>l.stream,()=>{p()});function p(){if(!l.stream)return;const c=new(window.AudioContext||window.webkitAudioContext),g=c.createMediaStreamSource(l.stream),v=c.createAnalyser();v.fftSize=2048,g.connect(v);const b=v.frequencyBinCount,M=new Uint8Array(b),f=c.sampleRate/v.fftSize,w=Math.floor(l.minFreq/f),P=Math.floor(l.maxFreq/f),L=P-w,A=Math.floor(L/l.bars),E=()=>{try{requestAnimationFrame(E),v.getByteFrequencyData(M);const q=Array.from({length:l.bars}).fill(0);for(let T=0;Tie(c.$slots,"default",{frequencies:x.value})}}),Ae={"h-full":"",flex:"","items-center":"","gap-1":""},Re=5,Ee=O({__name:"AudioSpectrumVisualizer",props:{frequencies:null,barsClass:null},setup(o){const l=o;function x(c,g){return .1+(1-.1)*(c/g)}function p(c,g){const v=x(g,l.frequencies.length);return Math.min(100,Math.max(10,c*100*Re*v))}return(c,g)=>(n(),i("div",Ae,[(n(!0),i(H,null,K(o.frequencies,(v,b)=>(n(),i("div",{key:b,"h-full":"",flex:"","flex-1":"","items-end":""},[e("div",{transition:"all 100 ease-in-out","mx-auto":"","my-0":"","w-full":"","rounded-full":"",class:C(o.barsClass),style:me({height:`${p(v,b)}%`})},null,6)]))),128))]))}}),Te={class:"p-3"},ze={class:"flex items-start"},Be=["checked","name","value"],Fe={class:"relative mr-3 mt-0.5 flex-shrink-0"},Ne={key:0,class:"i-solar:pause-circle-bold-duotone text-xl text-neutral-400 dark:text-neutral-500"},Ie={key:1,class:"i-solar:play-circle-bold-duotone text-xl text-neutral-400 dark:text-neutral-500"},De={key:1,class:"mt-auto w-full flex items-center justify-center bg-neutral-50 py-3 text-xs text-neutral-400 italic dark:bg-neutral-800/50 dark:text-neutral-600"},je={class:"flex-1 cursor-pointer"},Oe={class:"flex items-center"},Qe={key:0,class:"mt-1 flex flex-wrap gap-1"},He={key:1,class:"mt-3"},Ge={relative:""},Je={key:0,class:"h-16 px-3 pb-2"},Ke=O({__name:"VoiceCard",props:Y({name:null,voice:null,currentlyPlayingId:null,customInputPlaceholder:{default:"Enter custom voice name"},showVisualizer:{type:Boolean,default:!0},audioStream:{default:null}},{"voice-id":{required:!1,default:""},"voice-idModifiers":{},"custom-voice-name":{required:!1,default:""},"custom-voice-nameModifiers":{}}),emits:Y(["togglePlayback"],["update:voice-id","update:custom-voice-name"]),setup(o,{emit:l}){const x=o,p=l,c=J(o,"voice-id"),g=J(o,"custom-voice-name");function v(h){return h.previewURL||h.preview_audio_url}function b(h){var w,P,L;const f=[];if((w=h.labels)!=null&&w.gender&&f.push(h.labels.gender),(P=h.labels)!=null&&P.age&&f.push(h.labels.age),(L=h.labels)!=null&&L.accent&&f.push(h.labels.accent),h.languages&&h.languages.length>0){const A=h.languages.map(E=>E.name).join(", ");f.push(A)}return f}function M(){p("togglePlayback",x.voice)}return(h,f)=>(n(),i("label",{border:"2px solid",class:C(["scroll-snap-align-start form_voice-card relative flex flex-col overflow-hidden rounded-xl",[c.value===x.voice.id?"bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30":"bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30",c.value===x.voice.id?"form_voice-card-active":""]]),transition:"all duration-200 ease-in-out"},[e("div",Te,[e("div",ze,[j(e("input",{"onUpdate:modelValue":f[0]||(f[0]=w=>c.value=w),checked:c.value===x.voice.id,type:"radio",name:o.name,value:x.voice.id,class:"absolute cursor-pointer opacity-0"},null,8,Be),[[pe,c.value]]),e("div",Fe,[e("div",{class:C(["size-5 border-2 rounded-full transition-colors duration-200",[c.value===x.voice.id?"border-primary-500 dark:border-primary-400":"border-neutral-300 dark:border-neutral-600"]])},[e("div",{class:C(["absolute left-1/2 top-1/2 size-3 rounded-full transition-opacity duration-200 -translate-x-1/2 -translate-y-1/2",[c.value===x.voice.id?"opacity-100 bg-primary-500 dark:bg-primary-400":"opacity-0"]])},null,2)],2)]),v(o.voice)?(n(),i("button",{key:0,absolute:"","right-0":"",top:"0","z-100":"",class:C(["translate-x-[-50%] translate-y-[50%]",[o.currentlyPlayingId===o.voice.id?"text-white dark:text-white":""]]),onClick:M},[o.currentlyPlayingId===o.voice.id?(n(),i("div",Ne)):(n(),i("div",Ie))],2)):(n(),i("div",De," No preview available ")),e("div",je,[e("div",Oe,[e("span",{class:C(["line-clamp-1 font-medium",[c.value===o.voice.id?"text-neutral-700 dark:text-neutral-300":"text-neutral-700 dark:text-neutral-400"]])},k(o.voice.name),3)]),b(o.voice).length>0?(n(),i("div",Qe,[(n(!0),i(H,null,K(b(o.voice),(w,P)=>(n(),i("span",{key:P,class:C(["inline-flex items-center rounded-md px-1.5 py-0.5 text-xs",[c.value===o.voice.id?"bg-primary-100 text-primary-700 dark:bg-primary-900/30 dark:text-primary-400":"bg-neutral-100 text-neutral-700 dark:bg-neutral-800 dark:text-neutral-300"]])},k(w),3))),128))])):$("",!0),o.voice.customizable&&c.value===o.voice.id?(n(),i("div",He,[S($e,{modelValue:g.value,"onUpdate:modelValue":f[1]||(f[1]=w=>g.value=w),type:"text",class:"w-full border border-neutral-300 rounded bg-white px-2 py-1 text-sm dark:border-neutral-700 dark:bg-neutral-900",placeholder:o.customInputPlaceholder},null,8,["modelValue","placeholder"])])):$("",!0),o.voice.description?(n(),i("div",{key:2,class:C(["line-clamp-2 mt-1 text-xs",[c.value===o.voice.id?"text-neutral-600 dark:text-neutral-400":"text-neutral-500 dark:text-neutral-500"]])},k(o.voice.description),3)):$("",!0)])])]),e("div",Ge,[S(Ce,null,{default:I(()=>[o.showVisualizer&&o.currentlyPlayingId===o.voice.id&&o.audioStream?(n(),i("div",Je,[S(qe,{stream:o.audioStream,bars:24,"min-freq":60,"max-freq":4e3},{default:I(({frequencies:w})=>[S(Ee,{frequencies:w,"bars-class":c.value===o.voice.id?"bg-primary-500 dark:bg-primary-400":"bg-neutral-400 dark:bg-neutral-600"},null,8,["frequencies","bars-class"])]),_:1},8,["stream"])])):$("",!0)]),_:1})])],2))}}),Ye=ee(Ke,[["__scopeId","data-v-dbab964e"]]),We={class:"voice-preview-player"},Xe={key:0,class:"relative","inline-flex":"~","w-full":"","items-center":""},Ze=["placeholder"],et={class:"mt-4 space-y-2"},tt={key:0,class:"text-sm text-neutral-500 dark:text-neutral-400"},st={key:1,class:"flex items-center gap-3 border border-2 border-amber-200 rounded-xl bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20"},lt={class:"flex flex-col"},ot={class:"font-medium"},at={class:"text-sm text-amber-600 dark:text-amber-400"},rt={class:"relative"},nt=O({__name:"VoiceCardManySelect",props:Y({voices:null,searchable:{type:Boolean,default:!0},searchPlaceholder:{default:"Search voices..."},searchNoResultsTitle:{default:"No voices found"},searchNoResultsDescription:{default:"Try a different search term"},searchResultsText:{default:"{count} of {total} voices"},customInputPlaceholder:{default:"Enter custom voice name"},expandButtonText:{default:"Show more"},collapseButtonText:{default:"Show less"},playButtonText:{default:"Play sample"},pauseButtonText:{default:"Pause"},showVisualizer:{type:Boolean,default:!0}},{"search-query":{required:!1,default:""},"search-queryModifiers":{},"voice-id":{required:!1,default:""},"voice-idModifiers":{}}),emits:["update:search-query","update:voice-id"],setup(o){const l=o,x=V(!1),p=V(),c=V(new Map),g=V(new Map),v=V(new Map),b=V(new Map),M=V(null);function h(){return M.value||(M.value=new(window.AudioContext||window.webkitAudioContext)),M.value}const f=J(o,"search-query"),w=J(o,"voice-id"),P=fe(()=>{if(!f.value)return l.voices;const a=f.value.toLowerCase();return l.voices.filter(r=>{const d=r.name.toLowerCase().includes(a),m=r.description&&r.description.toLowerCase().includes(a),_=r.tags&&r.tags.some(y=>y.toLowerCase().includes(a)),U=r.labels&&Object.values(r.labels).some(y=>typeof y=="string"&&y.toLowerCase().includes(a)),B=r.languages&&r.languages.some(y=>y.name.toLowerCase().includes(a)||y.code.toLowerCase().includes(a));return d||m||_||U||B})});function L(a){return a.previewURL||a.preview_audio_url}function A(a){const r=L(a);if(!r)return null;if(c.value.has(a.id))return c.value.get(a.id)||null;const d=new Audio(r);return d.crossOrigin="anonymous",d.preload="auto",d.addEventListener("ended",()=>{if(p.value===a.id){p.value=void 0;const m=g.value.get(a.id);m&&(m.getTracks().forEach(_=>_.stop()),g.value.delete(a.id))}}),c.value.set(a.id,d),d}function E(a,r){try{if(g.value.has(r))return g.value.get(r)||null;const d=h();if(b.value.has(r)){const B=b.value.get(r),y=d.createMediaStreamDestination();B.connect(y);const F=y.stream;return g.value.set(r,F),F}const m=d.createMediaElementSource(a);b.value.set(r,m),m.connect(d.destination);const _=d.createMediaStreamDestination();m.connect(_);const U=_.stream;return g.value.set(r,U),U}catch(d){return console.error("Failed to create audio stream for visualizer:",d),null}}function q(a){try{if(!L(a))return;const d=A(a);if(!d)return;if(p.value===a.id){d.pause(),p.value=void 0;const m=g.value.get(a.id);m&&(m.getTracks().forEach(_=>_.stop()),g.value.delete(a.id));return}if(p.value){const m=c.value.get(p.value);m&&m.pause();const _=g.value.get(p.value);_&&(_.getTracks().forEach(U=>U.stop()),g.value.delete(p.value))}l.showVisualizer&&!g.value.has(a.id)&&E(d,a.id),d.currentTime=0,d.play().catch(m=>{console.error("Failed to play audio:",m)}),p.value=a.id}catch(r){console.error(r),p.value=void 0}}function T(){c.value.forEach(a=>{a.pause(),a.src=""}),c.value.clear(),g.value.forEach(a=>{a.getTracks().forEach(r=>r.stop())}),g.value.clear(),v.value.forEach(a=>{a.state!=="closed"&&a.close()}),v.value.clear(),b.value.clear(),p.value=void 0}Z(f,()=>{if(p.value){const a=c.value.get(p.value);a&&a.pause();const r=g.value.get(p.value);r&&(r.getTracks().forEach(d=>d.stop()),g.value.delete(p.value)),p.value=void 0}}),ge(T);const z=V("");return(a,r)=>(n(),i("div",We,[o.searchable?(n(),i("div",Xe,[r[4]||(r[4]=e("div",{class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},[e("div",{"i-solar:magnifer-line-duotone":"",class:"text-neutral-500 dark:text-neutral-400"})],-1)),j(e("input",{"onUpdate:modelValue":r[0]||(r[0]=d=>f.value=d),type:"search",class:"w-full rounded-xl p-2.5 pl-10 text-sm outline-none",border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",bg:"white dark:neutral-900",placeholder:o.searchPlaceholder},null,8,Ze),[[W,f.value]])])):$("",!0),e("div",et,[f.value?(n(),i("div",tt,k(o.searchResultsText.replace("{count}",P.value.length.toString()).replace("{total}",o.voices.length.toString())),1)):$("",!0),f.value&&P.value.length===0?(n(),i("div",st,[r[5]||(r[5]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),e("div",lt,[e("span",ot,k(o.searchNoResultsTitle),1),e("span",at,k(o.searchNoResultsDescription.replace("{query}",f.value)),1)])])):$("",!0),e("div",rt,[e("div",{class:C(["scrollbar-hide grid auto-cols-[350px] grid-flow-col max-h-[calc(100dvh-7lh)] gap-4 overflow-x-auto",[x.value?"grid-cols-1 md:grid-cols-2 grid-flow-row auto-cols-auto":""]]),transition:"all duration-200 ease-in-out",style:{"scroll-snap-type":"x mandatory"}},[(n(!0),i(H,null,K(P.value,d=>(n(),X(Ye,{key:d.id,"voice-id":w.value,"onUpdate:voiceId":r[1]||(r[1]=m=>w.value=m),"custom-voice-name":z.value,"onUpdate:customVoiceName":r[2]||(r[2]=m=>z.value=m),name:"voice",voice:d,"currently-playing-id":p.value,"custom-input-placeholder":o.customInputPlaceholder,"show-visualizer":o.showVisualizer,"audio-stream":g.value.get(d.id),onTogglePlayback:q},null,8,["voice-id","custom-voice-name","voice","currently-playing-id","custom-input-placeholder","show-visualizer","audio-stream"]))),128))],2),e("div",{bg:"neutral-100 dark:[rgba(0,0,0,0.3)]","rounded-xl":"",class:C([x.value?"w-full":"mt-4 w-full rounded-lg"])},[e("button",{"w-full":"",flex:"","items-center":"","justify-center":"","gap-2":"","rounded-lg":"","py-2":"",transition:"all duration-200 ease-in-out",class:C([x.value?"bg-primary-500 hover:bg-primary-600 text-white":"bg-white dark:bg-neutral-900 hover:bg-neutral-100 dark:hover:bg-neutral-800"]),onClick:r[3]||(r[3]=d=>x.value=!x.value)},[e("span",null,k(x.value?o.collapseButtonText:o.expandButtonText),1),e("div",{class:C([x.value?"rotate-180":"","text-lg"]),"i-solar:alt-arrow-down-bold-duotone":"",transition:"transform duration-200 ease-in-out"},null,2)],2)],2)])])]))}}),it=ee(nt,[["__scopeId","data-v-070104a7"]]),ut=O({__name:"Skeleton",props:{animation:{default:"pulse"}},setup(o){const l=o;return(x,p)=>(n(),i("div",{class:C(["skeleton",l.animation!=="none"?`skeleton-${l.animation}`:""]),bg:"neutral-200 dark:neutral-800",overflow:"hidden"},[ie(x.$slots,"default",{},void 0,!0)],2))}}),Q=ee(ut,[["__scopeId","data-v-f404da2a"]]),dt={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},ct={relative:""},vt={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},mt={text:"neutral-300 dark:neutral-500","text-nowrap":""},pt={"text-nowrap":"","text-3xl":"","font-semibold":""},ft={flex:"~ col md:row gap-6"},gt={bg:"neutral-100 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-4",class:"w-full md:w-[40%]"},xt={flex:"~ col gap-4"},bt={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},ht={text:"neutral-400 dark:neutral-500"},yt={"max-w-full":""},kt={key:0,flex:"~ row gap-4",style:{"scrollbar-width":"none"},"min-w-0":"","of-x-scroll":"","scroll-smooth":"",role:"radiogroup"},wt={key:1},_t={key:0},St={flex:"~ col gap-4"},Vt={class:"text-lg md:text-2xl"},Mt={text:"neutral-400 dark:neutral-400"},Ct={key:0,class:"flex items-center justify-center py-4"},$t={key:1,class:"flex items-center gap-3 border border-red-200 rounded-lg bg-red-50 p-4 dark:border-red-800 dark:bg-red-900/20"},Pt={class:"flex flex-col"},Ut={class:"font-medium"},Lt={class:"text-sm text-red-600 dark:text-red-400"},qt={key:2,class:"flex items-center gap-3 border border-amber-200 rounded-lg bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20"},At={class:"flex flex-col"},Rt={class:"font-medium"},Et={class:"text-sm text-amber-600 dark:text-amber-400"},Tt={key:0},zt={flex:"~ col gap-4"},Bt={key:0},Ft={class:"flex flex-col gap-4"},Nt={flex:"~ row gap-4"},It={key:1,class:"space-y-6"},Dt={key:2,class:"flex items-center gap-3 border border-2 border-red-200 rounded-lg bg-red-50 p-4 dark:border-red-800 dark:bg-red-900/20"},jt={class:"flex flex-col"},Ot={class:"text-sm text-red-600 dark:text-red-400"},Qt={key:3,class:"flex items-center gap-3 border border-2 border-amber-200 rounded-lg bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20"},Ht={flex:"~ col gap-4"},Gt={key:4,class:"mt-2 space-y-6"},Jt={key:0},Kt={flex:"~ col gap-4"},Yt={flex:"~ col gap-6",class:"w-full md:w-[60%]"},Wt={"w-full":"","rounded-xl":""},Xt={class:"mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400","w-full":""},Zt={class:"inline-flex items-center gap-4"},es={flex:"~ col gap-4"},ts=["placeholder"],ss={flex:"~ row","gap-4":""},ls=["disabled"],os={flex:"~ row","items-center":"","gap-2":""},as=["src"],rs=O({__name:"speech",setup(o){const{t:l}=xe(),x=Pe(),p=Ue(),{availableProviders:c,availableAudioSpeechProvidersMetadata:g}=le(x),{activeSpeechProvider:v,activeSpeechModel:b,activeSpeechVoice:M,activeSpeechVoiceId:h,pitch:f,isLoadingSpeechProviderVoices:w,supportsModelListing:P,providerModels:L,isLoadingActiveProviderModels:A,activeProviderModelError:E,modelSearchQuery:q,speechProviderError:T,ssmlEnabled:z,availableVoices:a}=le(p),r=be(),d=V(""),m=V(!1),_=V("Hello, my name is AI Assistant"),U=V(""),B=V(!1),y=V(""),F=V(null),te=V("");ne(async()=>{await p.loadVoicesForProvider(v.value),await x.loadModelsForConfiguredProviders()}),Z(v,async()=>{await p.loadVoicesForProvider(v.value),await x.loadModelsForConfiguredProviders()});async function ue(){if(!_.value.trim()&&!m.value||m.value&&!U.value.trim())return;if(!b.value){console.error("No model selected");return}if(!M.value){console.error("No voice selected");return}const R=x.getProviderInstance(v.value);if(!R){console.error("Failed to initialize speech provider");return}const s=x.getProviderConfig(v.value);B.value=!0,te.value="";try{y.value&&se();const D=m.value?U.value:p.generateSSML(_.value,M.value,{...s,pitch:f.value}),G=await Le({...R.speech(b.value,s),input:D,voice:M.value.id});y.value=URL.createObjectURL(new Blob([G])),setTimeout(()=>{F.value&&F.value.play()},100)}catch(D){console.error("Error generating speech:",D),te.value=D instanceof Error?D.message:"An unknown error occurred"}finally{B.value=!1}}function se(){F.value&&(F.value.pause(),F.value.currentTime=0),y.value&&(URL.revokeObjectURL(y.value),y.value="")}he(()=>{y.value&&URL.revokeObjectURL(y.value)});function de(R){M.value={id:R,name:R,description:R,previewURL:R,languages:[{code:"en",title:"English"}],provider:v.value,gender:"male"}}function ce(R){b.value=R}return(R,s)=>{var G;const D=ye("motion");return n(),i(H,null,[j((n(),i("div",dt,[e("button",{onClick:s[0]||(s[0]=u=>t(r).back())},s[14]||(s[14]=[e("div",{"i-solar:alt-arrow-left-line-duotone":"","text-xl":""},null,-1)])),e("h1",ct,[e("div",vt,[e("span",mt,k(t(l)("settings.pages.modules.title")),1)]),e("div",pt,k(t(l)("settings.pages.modules.speech.title")),1)])])),[[D]]),e("div",ft,[e("div",gt,[e("div",null,[e("div",xt,[e("div",null,[e("h2",bt,k(t(l)("settings.pages.modules.speech.sections.section.provider-voice-selection.title")),1),e("div",ht,[e("span",null,k(t(l)("settings.pages.modules.speech.sections.section.provider-voice-selection.description")),1)])]),e("div",yt,[t(c).length>0?(n(),i("fieldset",kt,[(n(!0),i(H,null,K(t(g),u=>(n(),X(t(Me),{id:u.id,key:u.id,modelValue:t(v),"onUpdate:modelValue":s[1]||(s[1]=ve=>N(v)?v.value=ve:null),name:"speech-provider",value:u.id,title:u.localizedName,description:u.localizedDescription},null,8,["id","modelValue","value","title","description"]))),128))])):(n(),i("div",wt,[S(t(ke),{class:"flex items-center gap-3 rounded-lg p-4",border:"2 dashed neutral-200 dark:neutral-800",bg:"neutral-50 dark:neutral-800",transition:"colors duration-200 ease-in-out",to:"/settings/providers"},{default:I(()=>s[15]||(s[15]=[e("div",{"i-solar:warning-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1),e("div",{class:"flex flex-col"},[e("span",{class:"font-medium"},"No Speech Providers Configured"),e("span",{class:"text-sm text-neutral-400 dark:text-neutral-500"},"Click here to set up your speech providers")],-1),e("div",{"i-solar:arrow-right-line-duotone":"",class:"ml-auto text-xl text-neutral-400 dark:text-neutral-500"},null,-1)])),_:1})]))])]),e("div",null,[t(v)&&t(P)?(n(),i("div",_t,[e("div",St,[e("div",null,[e("h2",Vt,k(t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),e("div",Mt,[e("span",null,k(t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),t(A)?(n(),i("div",Ct,[s[16]||(s[16]=e("div",{class:"mr-2 animate-spin"},[e("div",{"i-solar:spinner-line-duotone":"","text-xl":""})],-1)),e("span",null,k(t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.loading")),1)])):t(E)?(n(),i("div",$t,[s[17]||(s[17]=e("div",{"i-solar:close-circle-line-duotone":"",class:"text-2xl text-red-500 dark:text-red-400"},null,-1)),e("div",Pt,[e("span",Ut,k(t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.error")),1),e("span",Lt,k(t(E)),1)])])):t(L).length===0&&!t(A)?(n(),i("div",qt,[s[18]||(s[18]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),e("div",At,[e("span",Rt,k(t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models")),1),e("span",Et,k(t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description")),1)])])):t(L).length>0?(n(),X(t(Ve),{key:3,modelValue:t(b),"onUpdate:modelValue":s[2]||(s[2]=u=>N(b)?b.value=u:null),"search-query":t(q),"onUpdate:searchQuery":s[3]||(s[3]=u=>N(q)?q.value=u:null),items:t(L),searchable:!0,"search-placeholder":t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder"),"search-no-results-title":t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results"),"search-no-results-description":t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description",{query:t(q)}),"search-results-text":t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results",{count:"{count}",total:"{total}"}),"custom-input-placeholder":t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder"),"expand-button-text":t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.expand"),"collapse-button-text":t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse"),"onUpdate:customValue":ce},null,8,["modelValue","search-query","items","search-placeholder","search-no-results-title","search-no-results-description","search-results-text","custom-input-placeholder","expand-button-text","collapse-button-text"])):$("",!0)])])):$("",!0)])]),t(v)?(n(),i("div",Tt,[e("div",zt,[s[29]||(s[29]=e("div",null,[e("h2",{class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"}," Voice Configuration "),e("div",{text:"neutral-400 dark:neutral-500"},[e("span",null,"Customize how your AI assistant speaks")])],-1)),t(w)?(n(),i("div",Bt,[e("div",Ft,[S(t(Q),{class:"w-full rounded-lg p-2.5 text-sm"},{default:I(()=>s[19]||(s[19]=[e("div",{class:"h-1lh"},null,-1)])),_:1}),e("div",Nt,[S(t(Q),{class:"w-full rounded-lg p-4 text-sm"},{default:I(()=>s[20]||(s[20]=[e("div",{class:"h-1lh"},null,-1)])),_:1}),S(t(Q),{class:"w-full rounded-lg p-4 text-sm"},{default:I(()=>s[21]||(s[21]=[e("div",{class:"h-1lh"},null,-1)])),_:1}),S(t(Q),{class:"w-full rounded-lg p-4 text-sm"},{default:I(()=>s[22]||(s[22]=[e("div",{class:"h-1lh"},null,-1)])),_:1})]),S(t(Q),{class:"w-full rounded-lg p-3 text-sm"},{default:I(()=>s[23]||(s[23]=[e("div",{class:"h-1lh"},null,-1)])),_:1})])])):t(a)[t(v)]&&t(a)[t(v)].length>0?(n(),i("div",It,[S(t(it),{"search-query":d.value,"onUpdate:searchQuery":s[4]||(s[4]=u=>d.value=u),"voice-id":t(h),"onUpdate:voiceId":s[5]||(s[5]=u=>N(h)?h.value=u:null),voices:(G=t(a)[t(v)])==null?void 0:G.map(u=>({id:u.id,name:u.name,description:u.description,previewURL:u.previewURL,customizable:!1})),searchable:!0,"search-placeholder":t(l)("settings.pages.modules.speech.sections.section.provider-voice-selection.search_voices_placeholder"),"search-no-results-title":t(l)("settings.pages.modules.speech.sections.section.provider-voice-selection.no_voices"),"search-no-results-description":t(l)("settings.pages.modules.speech.sections.section.provider-voice-selection.no_voices_description"),"search-results-text":t(l)("settings.pages.modules.speech.sections.section.provider-voice-selection.search_voices_results",{count:0,total:0}),"custom-input-placeholder":t(l)("settings.pages.modules.speech.sections.section.provider-voice-selection.custom_voice_placeholder"),"expand-button-text":t(l)("settings.pages.modules.speech.sections.section.provider-voice-selection.show_more"),"collapse-button-text":t(l)("settings.pages.modules.speech.sections.section.provider-voice-selection.show_less"),"play-button-text":t(l)("settings.pages.modules.speech.sections.section.provider-voice-selection.play_sample"),"pause-button-text":t(l)("settings.pages.modules.speech.sections.section.provider-voice-selection.pause"),"onUpdate:customValue":de},null,8,["search-query","voice-id","voices","search-placeholder","search-no-results-title","search-no-results-description","search-results-text","custom-input-placeholder","expand-button-text","collapse-button-text","play-button-text","pause-button-text"])])):t(T)?(n(),i("div",Dt,[s[25]||(s[25]=e("div",{"i-solar:close-circle-line-duotone":"",class:"text-2xl text-red-500 dark:text-red-400"},null,-1)),e("div",jt,[s[24]||(s[24]=e("span",{class:"font-medium"},"Error loading voices",-1)),e("span",Ot,k(t(T)),1)])])):(n(),i("div",Qt,s[26]||(s[26]=[e("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1),e("div",{class:"flex flex-col"},[e("span",{class:"font-medium"},"No voices available"),e("span",{class:"text-sm text-amber-600 dark:text-amber-400"}," No voices were found for this provider. You can enter a custom voice name below. ")],-1)]))),e("div",Ht,[S(t(oe),{modelValue:t(f),"onUpdate:modelValue":s[6]||(s[6]=u=>N(f)?f.value=u:null),label:"Pitch",description:"Tune the pitch of the voice",min:-100,max:100,step:1,"format-value":u=>`${u}%`},null,8,["modelValue","format-value"]),S(t(ae),{modelValue:t(z),"onUpdate:modelValue":s[7]||(s[7]=u=>N(z)?z.value=u:null),label:"Enable SSML",description:"Enable Speech Synthesis Markup Language for more control over speech output"},null,8,["modelValue"])]),!t(a)[t(v)]||t(a)[t(v)].length===0?(n(),i("div",Gt,[S(t(Se),{modelValue:t(h),"onUpdate:modelValue":s[8]||(s[8]=u=>N(h)?h.value=u:null),type:"text",label:"Voice ID",description:"Enter the voice ID for your custom voice",placeholder:"Enter voice name (e.g., 'Rachel', 'Josh')"},null,8,["modelValue"]),t(v)==="elevenlabs"?(n(),i("div",Jt,[s[28]||(s[28]=e("label",{class:"mb-1 block text-sm font-medium"}," Model ",-1)),j(e("select",{"onUpdate:modelValue":s[9]||(s[9]=u=>N(b)?b.value=u:null),class:"w-full border border-neutral-300 rounded bg-white px-3 py-2 dark:border-neutral-700 dark:bg-neutral-900"},s[27]||(s[27]=[e("option",{value:"eleven_monolingual_v1"}," Monolingual v1 ",-1),e("option",{value:"eleven_multilingual_v1"}," Multilingual v1 ",-1),e("option",{value:"eleven_multilingual_v2"}," Multilingual v2 ",-1)]),512),[[we,t(b)]])])):$("",!0),e("div",Kt,[S(t(oe),{modelValue:t(f),"onUpdate:modelValue":s[10]||(s[10]=u=>N(f)?f.value=u:null),label:"Pitch",description:"Tune the pitch of the voice",min:-100,max:100,step:1,"format-value":u=>`${u}%`},null,8,["modelValue","format-value"])])])):$("",!0)])])):$("",!0)]),e("div",Yt,[e("div",Wt,[e("h2",Xt,[e("div",Zt,[S(t(_e)),e("div",null,k(t(l)("settings.pages.providers.provider.elevenlabs.playground.title")),1)])]),e("div",es,[S(t(ae),{modelValue:m.value,"onUpdate:modelValue":s[11]||(s[11]=u=>m.value=u),label:"Use Custom SSML",description:"Enable to input raw SSML instead of plain text"},null,8,["modelValue"]),m.value?j((n(),i("textarea",{key:1,"onUpdate:modelValue":s[13]||(s[13]=u=>U.value=u),placeholder:"Enter SSML text...",border:"neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700",transition:"all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900","h-48":"","w-full":"","rounded-lg":"","px-3":"","py-2":"","text-sm":"","font-mono":"","outline-none":""},null,512)),[[W,U.value]]):j((n(),i("textarea",{key:0,"onUpdate:modelValue":s[12]||(s[12]=u=>_.value=u),placeholder:t(l)("settings.pages.providers.provider.elevenlabs.playground.fields.field.input.placeholder"),border:"neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700",transition:"all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900","h-24":"","w-full":"","rounded-lg":"","px-3":"","py-2":"","text-sm":"","outline-none":""},null,8,ts)),[[W,_.value]]),e("div",ss,[e("button",{border:"neutral-800 dark:neutral-200 solid 2",transition:"border duration-250 ease-in-out","rounded-lg":"","px-4":"",text:"neutral-100 dark:neutral-900","py-2":"","text-sm":"",disabled:B.value||!_.value.trim()&&!m.value||m.value&&!U.value.trim()||!t(M),class:C({"opacity-50 cursor-not-allowed":B.value||!_.value.trim()&&!m.value||m.value&&!U.value.trim()||!t(M)}),bg:"neutral-700 dark:neutral-300",onClick:ue},[e("div",os,[s[30]||(s[30]=e("div",{"i-solar:play-circle-bold-duotone":""},null,-1)),e("span",null,k(B.value?t(l)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating"):t(l)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.label")),1)])],10,ls),y.value?(n(),i("button",{key:0,border:"primary-300 dark:primary-800 solid 2",transition:"border duration-250 ease-in-out","rounded-lg":"","px-4":"","py-2":"","text-sm":"",onClick:se},s[31]||(s[31]=[e("div",{flex:"~ row","items-center":"","gap-2":""},[e("div",{"i-solar:stop-circle-bold-duotone":""}),e("span",null,"Stop")],-1)]))):$("",!0)]),y.value?(n(),i("audio",{key:2,ref_key:"audioPlayer",ref:F,src:y.value,controls:"",class:"mt-2 w-full"},null,8,as)):$("",!0)])])])]),s[32]||(s[32]=e("div",{text:"neutral-200/50 dark:neutral-500/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},[e("div",{text:"40","i-lucide:volume-2":""})],-1))],64)}}});typeof re=="function"&&re(rs);export{rs as default}; +import{d as O,g as V,l as ne,w as Z,m as ie,c as i,o as n,bx as H,by as K,a as e,n as me,z as C,bK as Y,bL as J,A as j,bA as pe,C as $,D as k,b as S,y as I,bn as ee,h as fe,c7 as ge,bE as W,x as X,q as xe,s as le,bG as be,H as he,bw as ye,e as t,bo as ke,ad as N,bH as we}from"./index-hDb1Lsb8.js";import{_ as oe,a as ae,b as _e}from"./TestDummyMarker.vue_vue_type_script_setup_true_lang-DvXVr5Qy.js";import{_ as Se}from"./FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js";import{R as Ve,a as Me}from"./RadioCardDetailManySelect-D3zSF9Ox.js";import{_ as Ce}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import{_ as $e}from"./Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js";import"./live2d-zip-loader--bTGFeQd.js";import{u as Pe}from"./providers-adQ6cb75.js";import{u as Ue,g as Le}from"./speech-D3H5B80W.js";import{b as re}from"./route-block-B_A1xBdJ.js";import"./index-Be1NqeGb.js";const qe=O({__name:"AudioSpectrum",props:{stream:null,bars:{default:32},minFreq:{default:60},maxFreq:{default:4e3}},setup(o){const l=o,x=V(Array.from({length:l.bars}).fill(0));ne(()=>{p()}),Z(()=>l.stream,()=>{p()});function p(){if(!l.stream)return;const c=new(window.AudioContext||window.webkitAudioContext),g=c.createMediaStreamSource(l.stream),v=c.createAnalyser();v.fftSize=2048,g.connect(v);const b=v.frequencyBinCount,M=new Uint8Array(b),f=c.sampleRate/v.fftSize,w=Math.floor(l.minFreq/f),P=Math.floor(l.maxFreq/f),L=P-w,A=Math.floor(L/l.bars),E=()=>{try{requestAnimationFrame(E),v.getByteFrequencyData(M);const q=Array.from({length:l.bars}).fill(0);for(let T=0;Tie(c.$slots,"default",{frequencies:x.value})}}),Ae={"h-full":"",flex:"","items-center":"","gap-1":""},Re=5,Ee=O({__name:"AudioSpectrumVisualizer",props:{frequencies:null,barsClass:null},setup(o){const l=o;function x(c,g){return .1+(1-.1)*(c/g)}function p(c,g){const v=x(g,l.frequencies.length);return Math.min(100,Math.max(10,c*100*Re*v))}return(c,g)=>(n(),i("div",Ae,[(n(!0),i(H,null,K(o.frequencies,(v,b)=>(n(),i("div",{key:b,"h-full":"",flex:"","flex-1":"","items-end":""},[e("div",{transition:"all 100 ease-in-out","mx-auto":"","my-0":"","w-full":"","rounded-full":"",class:C(o.barsClass),style:me({height:`${p(v,b)}%`})},null,6)]))),128))]))}}),Te={class:"p-3"},ze={class:"flex items-start"},Be=["checked","name","value"],Fe={class:"relative mr-3 mt-0.5 flex-shrink-0"},Ne={key:0,class:"i-solar:pause-circle-bold-duotone text-xl text-neutral-400 dark:text-neutral-500"},Ie={key:1,class:"i-solar:play-circle-bold-duotone text-xl text-neutral-400 dark:text-neutral-500"},De={key:1,class:"mt-auto w-full flex items-center justify-center bg-neutral-50 py-3 text-xs text-neutral-400 italic dark:bg-neutral-800/50 dark:text-neutral-600"},je={class:"flex-1 cursor-pointer"},Oe={class:"flex items-center"},Qe={key:0,class:"mt-1 flex flex-wrap gap-1"},He={key:1,class:"mt-3"},Ge={relative:""},Je={key:0,class:"h-16 px-3 pb-2"},Ke=O({__name:"VoiceCard",props:Y({name:null,voice:null,currentlyPlayingId:null,customInputPlaceholder:{default:"Enter custom voice name"},showVisualizer:{type:Boolean,default:!0},audioStream:{default:null}},{"voice-id":{required:!1,default:""},"voice-idModifiers":{},"custom-voice-name":{required:!1,default:""},"custom-voice-nameModifiers":{}}),emits:Y(["togglePlayback"],["update:voice-id","update:custom-voice-name"]),setup(o,{emit:l}){const x=o,p=l,c=J(o,"voice-id"),g=J(o,"custom-voice-name");function v(h){return h.previewURL||h.preview_audio_url}function b(h){var w,P,L;const f=[];if((w=h.labels)!=null&&w.gender&&f.push(h.labels.gender),(P=h.labels)!=null&&P.age&&f.push(h.labels.age),(L=h.labels)!=null&&L.accent&&f.push(h.labels.accent),h.languages&&h.languages.length>0){const A=h.languages.map(E=>E.name).join(", ");f.push(A)}return f}function M(){p("togglePlayback",x.voice)}return(h,f)=>(n(),i("label",{border:"2px solid",class:C(["scroll-snap-align-start form_voice-card relative flex flex-col overflow-hidden rounded-xl",[c.value===x.voice.id?"bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30":"bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30",c.value===x.voice.id?"form_voice-card-active":""]]),transition:"all duration-200 ease-in-out"},[e("div",Te,[e("div",ze,[j(e("input",{"onUpdate:modelValue":f[0]||(f[0]=w=>c.value=w),checked:c.value===x.voice.id,type:"radio",name:o.name,value:x.voice.id,class:"absolute cursor-pointer opacity-0"},null,8,Be),[[pe,c.value]]),e("div",Fe,[e("div",{class:C(["size-5 border-2 rounded-full transition-colors duration-200",[c.value===x.voice.id?"border-primary-500 dark:border-primary-400":"border-neutral-300 dark:border-neutral-600"]])},[e("div",{class:C(["absolute left-1/2 top-1/2 size-3 rounded-full transition-opacity duration-200 -translate-x-1/2 -translate-y-1/2",[c.value===x.voice.id?"opacity-100 bg-primary-500 dark:bg-primary-400":"opacity-0"]])},null,2)],2)]),v(o.voice)?(n(),i("button",{key:0,absolute:"","right-0":"",top:"0","z-100":"",class:C(["translate-x-[-50%] translate-y-[50%]",[o.currentlyPlayingId===o.voice.id?"text-white dark:text-white":""]]),onClick:M},[o.currentlyPlayingId===o.voice.id?(n(),i("div",Ne)):(n(),i("div",Ie))],2)):(n(),i("div",De," No preview available ")),e("div",je,[e("div",Oe,[e("span",{class:C(["line-clamp-1 font-medium",[c.value===o.voice.id?"text-neutral-700 dark:text-neutral-300":"text-neutral-700 dark:text-neutral-400"]])},k(o.voice.name),3)]),b(o.voice).length>0?(n(),i("div",Qe,[(n(!0),i(H,null,K(b(o.voice),(w,P)=>(n(),i("span",{key:P,class:C(["inline-flex items-center rounded-md px-1.5 py-0.5 text-xs",[c.value===o.voice.id?"bg-primary-100 text-primary-700 dark:bg-primary-900/30 dark:text-primary-400":"bg-neutral-100 text-neutral-700 dark:bg-neutral-800 dark:text-neutral-300"]])},k(w),3))),128))])):$("",!0),o.voice.customizable&&c.value===o.voice.id?(n(),i("div",He,[S($e,{modelValue:g.value,"onUpdate:modelValue":f[1]||(f[1]=w=>g.value=w),type:"text",class:"w-full border border-neutral-300 rounded bg-white px-2 py-1 text-sm dark:border-neutral-700 dark:bg-neutral-900",placeholder:o.customInputPlaceholder},null,8,["modelValue","placeholder"])])):$("",!0),o.voice.description?(n(),i("div",{key:2,class:C(["line-clamp-2 mt-1 text-xs",[c.value===o.voice.id?"text-neutral-600 dark:text-neutral-400":"text-neutral-500 dark:text-neutral-500"]])},k(o.voice.description),3)):$("",!0)])])]),e("div",Ge,[S(Ce,null,{default:I(()=>[o.showVisualizer&&o.currentlyPlayingId===o.voice.id&&o.audioStream?(n(),i("div",Je,[S(qe,{stream:o.audioStream,bars:24,"min-freq":60,"max-freq":4e3},{default:I(({frequencies:w})=>[S(Ee,{frequencies:w,"bars-class":c.value===o.voice.id?"bg-primary-500 dark:bg-primary-400":"bg-neutral-400 dark:bg-neutral-600"},null,8,["frequencies","bars-class"])]),_:1},8,["stream"])])):$("",!0)]),_:1})])],2))}}),Ye=ee(Ke,[["__scopeId","data-v-dbab964e"]]),We={class:"voice-preview-player"},Xe={key:0,class:"relative","inline-flex":"~","w-full":"","items-center":""},Ze=["placeholder"],et={class:"mt-4 space-y-2"},tt={key:0,class:"text-sm text-neutral-500 dark:text-neutral-400"},st={key:1,class:"flex items-center gap-3 border border-2 border-amber-200 rounded-xl bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20"},lt={class:"flex flex-col"},ot={class:"font-medium"},at={class:"text-sm text-amber-600 dark:text-amber-400"},rt={class:"relative"},nt=O({__name:"VoiceCardManySelect",props:Y({voices:null,searchable:{type:Boolean,default:!0},searchPlaceholder:{default:"Search voices..."},searchNoResultsTitle:{default:"No voices found"},searchNoResultsDescription:{default:"Try a different search term"},searchResultsText:{default:"{count} of {total} voices"},customInputPlaceholder:{default:"Enter custom voice name"},expandButtonText:{default:"Show more"},collapseButtonText:{default:"Show less"},playButtonText:{default:"Play sample"},pauseButtonText:{default:"Pause"},showVisualizer:{type:Boolean,default:!0}},{"search-query":{required:!1,default:""},"search-queryModifiers":{},"voice-id":{required:!1,default:""},"voice-idModifiers":{}}),emits:["update:search-query","update:voice-id"],setup(o){const l=o,x=V(!1),p=V(),c=V(new Map),g=V(new Map),v=V(new Map),b=V(new Map),M=V(null);function h(){return M.value||(M.value=new(window.AudioContext||window.webkitAudioContext)),M.value}const f=J(o,"search-query"),w=J(o,"voice-id"),P=fe(()=>{if(!f.value)return l.voices;const a=f.value.toLowerCase();return l.voices.filter(r=>{const d=r.name.toLowerCase().includes(a),m=r.description&&r.description.toLowerCase().includes(a),_=r.tags&&r.tags.some(y=>y.toLowerCase().includes(a)),U=r.labels&&Object.values(r.labels).some(y=>typeof y=="string"&&y.toLowerCase().includes(a)),B=r.languages&&r.languages.some(y=>y.name.toLowerCase().includes(a)||y.code.toLowerCase().includes(a));return d||m||_||U||B})});function L(a){return a.previewURL||a.preview_audio_url}function A(a){const r=L(a);if(!r)return null;if(c.value.has(a.id))return c.value.get(a.id)||null;const d=new Audio(r);return d.crossOrigin="anonymous",d.preload="auto",d.addEventListener("ended",()=>{if(p.value===a.id){p.value=void 0;const m=g.value.get(a.id);m&&(m.getTracks().forEach(_=>_.stop()),g.value.delete(a.id))}}),c.value.set(a.id,d),d}function E(a,r){try{if(g.value.has(r))return g.value.get(r)||null;const d=h();if(b.value.has(r)){const B=b.value.get(r),y=d.createMediaStreamDestination();B.connect(y);const F=y.stream;return g.value.set(r,F),F}const m=d.createMediaElementSource(a);b.value.set(r,m),m.connect(d.destination);const _=d.createMediaStreamDestination();m.connect(_);const U=_.stream;return g.value.set(r,U),U}catch(d){return console.error("Failed to create audio stream for visualizer:",d),null}}function q(a){try{if(!L(a))return;const d=A(a);if(!d)return;if(p.value===a.id){d.pause(),p.value=void 0;const m=g.value.get(a.id);m&&(m.getTracks().forEach(_=>_.stop()),g.value.delete(a.id));return}if(p.value){const m=c.value.get(p.value);m&&m.pause();const _=g.value.get(p.value);_&&(_.getTracks().forEach(U=>U.stop()),g.value.delete(p.value))}l.showVisualizer&&!g.value.has(a.id)&&E(d,a.id),d.currentTime=0,d.play().catch(m=>{console.error("Failed to play audio:",m)}),p.value=a.id}catch(r){console.error(r),p.value=void 0}}function T(){c.value.forEach(a=>{a.pause(),a.src=""}),c.value.clear(),g.value.forEach(a=>{a.getTracks().forEach(r=>r.stop())}),g.value.clear(),v.value.forEach(a=>{a.state!=="closed"&&a.close()}),v.value.clear(),b.value.clear(),p.value=void 0}Z(f,()=>{if(p.value){const a=c.value.get(p.value);a&&a.pause();const r=g.value.get(p.value);r&&(r.getTracks().forEach(d=>d.stop()),g.value.delete(p.value)),p.value=void 0}}),ge(T);const z=V("");return(a,r)=>(n(),i("div",We,[o.searchable?(n(),i("div",Xe,[r[4]||(r[4]=e("div",{class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},[e("div",{"i-solar:magnifer-line-duotone":"",class:"text-neutral-500 dark:text-neutral-400"})],-1)),j(e("input",{"onUpdate:modelValue":r[0]||(r[0]=d=>f.value=d),type:"search",class:"w-full rounded-xl p-2.5 pl-10 text-sm outline-none",border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",bg:"white dark:neutral-900",placeholder:o.searchPlaceholder},null,8,Ze),[[W,f.value]])])):$("",!0),e("div",et,[f.value?(n(),i("div",tt,k(o.searchResultsText.replace("{count}",P.value.length.toString()).replace("{total}",o.voices.length.toString())),1)):$("",!0),f.value&&P.value.length===0?(n(),i("div",st,[r[5]||(r[5]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),e("div",lt,[e("span",ot,k(o.searchNoResultsTitle),1),e("span",at,k(o.searchNoResultsDescription.replace("{query}",f.value)),1)])])):$("",!0),e("div",rt,[e("div",{class:C(["scrollbar-hide grid auto-cols-[350px] grid-flow-col max-h-[calc(100dvh-7lh)] gap-4 overflow-x-auto",[x.value?"grid-cols-1 md:grid-cols-2 grid-flow-row auto-cols-auto":""]]),transition:"all duration-200 ease-in-out",style:{"scroll-snap-type":"x mandatory"}},[(n(!0),i(H,null,K(P.value,d=>(n(),X(Ye,{key:d.id,"voice-id":w.value,"onUpdate:voiceId":r[1]||(r[1]=m=>w.value=m),"custom-voice-name":z.value,"onUpdate:customVoiceName":r[2]||(r[2]=m=>z.value=m),name:"voice",voice:d,"currently-playing-id":p.value,"custom-input-placeholder":o.customInputPlaceholder,"show-visualizer":o.showVisualizer,"audio-stream":g.value.get(d.id),onTogglePlayback:q},null,8,["voice-id","custom-voice-name","voice","currently-playing-id","custom-input-placeholder","show-visualizer","audio-stream"]))),128))],2),e("div",{bg:"neutral-100 dark:[rgba(0,0,0,0.3)]","rounded-xl":"",class:C([x.value?"w-full":"mt-4 w-full rounded-lg"])},[e("button",{"w-full":"",flex:"","items-center":"","justify-center":"","gap-2":"","rounded-lg":"","py-2":"",transition:"all duration-200 ease-in-out",class:C([x.value?"bg-primary-500 hover:bg-primary-600 text-white":"bg-white dark:bg-neutral-900 hover:bg-neutral-100 dark:hover:bg-neutral-800"]),onClick:r[3]||(r[3]=d=>x.value=!x.value)},[e("span",null,k(x.value?o.collapseButtonText:o.expandButtonText),1),e("div",{class:C([x.value?"rotate-180":"","text-lg"]),"i-solar:alt-arrow-down-bold-duotone":"",transition:"transform duration-200 ease-in-out"},null,2)],2)],2)])])]))}}),it=ee(nt,[["__scopeId","data-v-070104a7"]]),ut=O({__name:"Skeleton",props:{animation:{default:"pulse"}},setup(o){const l=o;return(x,p)=>(n(),i("div",{class:C(["skeleton",l.animation!=="none"?`skeleton-${l.animation}`:""]),bg:"neutral-200 dark:neutral-800",overflow:"hidden"},[ie(x.$slots,"default",{},void 0,!0)],2))}}),Q=ee(ut,[["__scopeId","data-v-f404da2a"]]),dt={flex:"~ row","items-center":"","gap-2":"",initial:{opacity:0,x:10},enter:{opacity:1,x:0},leave:{opacity:0,x:-10},duration:250},ct={relative:""},vt={absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},mt={text:"neutral-300 dark:neutral-500","text-nowrap":""},pt={"text-nowrap":"","text-3xl":"","font-semibold":""},ft={flex:"~ col md:row gap-6"},gt={bg:"neutral-100 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-4",class:"w-full md:w-[40%]"},xt={flex:"~ col gap-4"},bt={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},ht={text:"neutral-400 dark:neutral-500"},yt={"max-w-full":""},kt={key:0,flex:"~ row gap-4",style:{"scrollbar-width":"none"},"min-w-0":"","of-x-scroll":"","scroll-smooth":"",role:"radiogroup"},wt={key:1},_t={key:0},St={flex:"~ col gap-4"},Vt={class:"text-lg md:text-2xl"},Mt={text:"neutral-400 dark:neutral-400"},Ct={key:0,class:"flex items-center justify-center py-4"},$t={key:1,class:"flex items-center gap-3 border border-red-200 rounded-lg bg-red-50 p-4 dark:border-red-800 dark:bg-red-900/20"},Pt={class:"flex flex-col"},Ut={class:"font-medium"},Lt={class:"text-sm text-red-600 dark:text-red-400"},qt={key:2,class:"flex items-center gap-3 border border-amber-200 rounded-lg bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20"},At={class:"flex flex-col"},Rt={class:"font-medium"},Et={class:"text-sm text-amber-600 dark:text-amber-400"},Tt={key:0},zt={flex:"~ col gap-4"},Bt={key:0},Ft={class:"flex flex-col gap-4"},Nt={flex:"~ row gap-4"},It={key:1,class:"space-y-6"},Dt={key:2,class:"flex items-center gap-3 border border-2 border-red-200 rounded-lg bg-red-50 p-4 dark:border-red-800 dark:bg-red-900/20"},jt={class:"flex flex-col"},Ot={class:"text-sm text-red-600 dark:text-red-400"},Qt={key:3,class:"flex items-center gap-3 border border-2 border-amber-200 rounded-lg bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20"},Ht={flex:"~ col gap-4"},Gt={key:4,class:"mt-2 space-y-6"},Jt={key:0},Kt={flex:"~ col gap-4"},Yt={flex:"~ col gap-6",class:"w-full md:w-[60%]"},Wt={"w-full":"","rounded-xl":""},Xt={class:"mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400","w-full":""},Zt={class:"inline-flex items-center gap-4"},es={flex:"~ col gap-4"},ts=["placeholder"],ss={flex:"~ row","gap-4":""},ls=["disabled"],os={flex:"~ row","items-center":"","gap-2":""},as=["src"],rs=O({__name:"speech",setup(o){const{t:l}=xe(),x=Pe(),p=Ue(),{availableProviders:c,availableAudioSpeechProvidersMetadata:g}=le(x),{activeSpeechProvider:v,activeSpeechModel:b,activeSpeechVoice:M,activeSpeechVoiceId:h,pitch:f,isLoadingSpeechProviderVoices:w,supportsModelListing:P,providerModels:L,isLoadingActiveProviderModels:A,activeProviderModelError:E,modelSearchQuery:q,speechProviderError:T,ssmlEnabled:z,availableVoices:a}=le(p),r=be(),d=V(""),m=V(!1),_=V("Hello, my name is AI Assistant"),U=V(""),B=V(!1),y=V(""),F=V(null),te=V("");ne(async()=>{await p.loadVoicesForProvider(v.value),await x.loadModelsForConfiguredProviders()}),Z(v,async()=>{await p.loadVoicesForProvider(v.value),await x.loadModelsForConfiguredProviders()});async function ue(){if(!_.value.trim()&&!m.value||m.value&&!U.value.trim())return;if(!b.value){console.error("No model selected");return}if(!M.value){console.error("No voice selected");return}const R=x.getProviderInstance(v.value);if(!R){console.error("Failed to initialize speech provider");return}const s=x.getProviderConfig(v.value);B.value=!0,te.value="";try{y.value&&se();const D=m.value?U.value:p.generateSSML(_.value,M.value,{...s,pitch:f.value}),G=await Le({...R.speech(b.value,s),input:D,voice:M.value.id});y.value=URL.createObjectURL(new Blob([G])),setTimeout(()=>{F.value&&F.value.play()},100)}catch(D){console.error("Error generating speech:",D),te.value=D instanceof Error?D.message:"An unknown error occurred"}finally{B.value=!1}}function se(){F.value&&(F.value.pause(),F.value.currentTime=0),y.value&&(URL.revokeObjectURL(y.value),y.value="")}he(()=>{y.value&&URL.revokeObjectURL(y.value)});function de(R){M.value={id:R,name:R,description:R,previewURL:R,languages:[{code:"en",title:"English"}],provider:v.value,gender:"male"}}function ce(R){b.value=R}return(R,s)=>{var G;const D=ye("motion");return n(),i(H,null,[j((n(),i("div",dt,[e("button",{onClick:s[0]||(s[0]=u=>t(r).back())},s[14]||(s[14]=[e("div",{"i-solar:alt-arrow-left-line-duotone":"","text-xl":""},null,-1)])),e("h1",ct,[e("div",vt,[e("span",mt,k(t(l)("settings.pages.modules.title")),1)]),e("div",pt,k(t(l)("settings.pages.modules.speech.title")),1)])])),[[D]]),e("div",ft,[e("div",gt,[e("div",null,[e("div",xt,[e("div",null,[e("h2",bt,k(t(l)("settings.pages.modules.speech.sections.section.provider-voice-selection.title")),1),e("div",ht,[e("span",null,k(t(l)("settings.pages.modules.speech.sections.section.provider-voice-selection.description")),1)])]),e("div",yt,[t(c).length>0?(n(),i("fieldset",kt,[(n(!0),i(H,null,K(t(g),u=>(n(),X(t(Me),{id:u.id,key:u.id,modelValue:t(v),"onUpdate:modelValue":s[1]||(s[1]=ve=>N(v)?v.value=ve:null),name:"speech-provider",value:u.id,title:u.localizedName,description:u.localizedDescription},null,8,["id","modelValue","value","title","description"]))),128))])):(n(),i("div",wt,[S(t(ke),{class:"flex items-center gap-3 rounded-lg p-4",border:"2 dashed neutral-200 dark:neutral-800",bg:"neutral-50 dark:neutral-800",transition:"colors duration-200 ease-in-out",to:"/settings/providers"},{default:I(()=>s[15]||(s[15]=[e("div",{"i-solar:warning-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1),e("div",{class:"flex flex-col"},[e("span",{class:"font-medium"},"No Speech Providers Configured"),e("span",{class:"text-sm text-neutral-400 dark:text-neutral-500"},"Click here to set up your speech providers")],-1),e("div",{"i-solar:arrow-right-line-duotone":"",class:"ml-auto text-xl text-neutral-400 dark:text-neutral-500"},null,-1)])),_:1})]))])]),e("div",null,[t(v)&&t(P)?(n(),i("div",_t,[e("div",St,[e("div",null,[e("h2",Vt,k(t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),e("div",Mt,[e("span",null,k(t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),t(A)?(n(),i("div",Ct,[s[16]||(s[16]=e("div",{class:"mr-2 animate-spin"},[e("div",{"i-solar:spinner-line-duotone":"","text-xl":""})],-1)),e("span",null,k(t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.loading")),1)])):t(E)?(n(),i("div",$t,[s[17]||(s[17]=e("div",{"i-solar:close-circle-line-duotone":"",class:"text-2xl text-red-500 dark:text-red-400"},null,-1)),e("div",Pt,[e("span",Ut,k(t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.error")),1),e("span",Lt,k(t(E)),1)])])):t(L).length===0&&!t(A)?(n(),i("div",qt,[s[18]||(s[18]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),e("div",At,[e("span",Rt,k(t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models")),1),e("span",Et,k(t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description")),1)])])):t(L).length>0?(n(),X(t(Ve),{key:3,modelValue:t(b),"onUpdate:modelValue":s[2]||(s[2]=u=>N(b)?b.value=u:null),"search-query":t(q),"onUpdate:searchQuery":s[3]||(s[3]=u=>N(q)?q.value=u:null),items:t(L),searchable:!0,"search-placeholder":t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder"),"search-no-results-title":t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results"),"search-no-results-description":t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description",{query:t(q)}),"search-results-text":t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results",{count:"{count}",total:"{total}"}),"custom-input-placeholder":t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder"),"expand-button-text":t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.expand"),"collapse-button-text":t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse"),"onUpdate:customValue":ce},null,8,["modelValue","search-query","items","search-placeholder","search-no-results-title","search-no-results-description","search-results-text","custom-input-placeholder","expand-button-text","collapse-button-text"])):$("",!0)])])):$("",!0)])]),t(v)?(n(),i("div",Tt,[e("div",zt,[s[29]||(s[29]=e("div",null,[e("h2",{class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"}," Voice Configuration "),e("div",{text:"neutral-400 dark:neutral-500"},[e("span",null,"Customize how your AI assistant speaks")])],-1)),t(w)?(n(),i("div",Bt,[e("div",Ft,[S(t(Q),{class:"w-full rounded-lg p-2.5 text-sm"},{default:I(()=>s[19]||(s[19]=[e("div",{class:"h-1lh"},null,-1)])),_:1}),e("div",Nt,[S(t(Q),{class:"w-full rounded-lg p-4 text-sm"},{default:I(()=>s[20]||(s[20]=[e("div",{class:"h-1lh"},null,-1)])),_:1}),S(t(Q),{class:"w-full rounded-lg p-4 text-sm"},{default:I(()=>s[21]||(s[21]=[e("div",{class:"h-1lh"},null,-1)])),_:1}),S(t(Q),{class:"w-full rounded-lg p-4 text-sm"},{default:I(()=>s[22]||(s[22]=[e("div",{class:"h-1lh"},null,-1)])),_:1})]),S(t(Q),{class:"w-full rounded-lg p-3 text-sm"},{default:I(()=>s[23]||(s[23]=[e("div",{class:"h-1lh"},null,-1)])),_:1})])])):t(a)[t(v)]&&t(a)[t(v)].length>0?(n(),i("div",It,[S(t(it),{"search-query":d.value,"onUpdate:searchQuery":s[4]||(s[4]=u=>d.value=u),"voice-id":t(h),"onUpdate:voiceId":s[5]||(s[5]=u=>N(h)?h.value=u:null),voices:(G=t(a)[t(v)])==null?void 0:G.map(u=>({id:u.id,name:u.name,description:u.description,previewURL:u.previewURL,customizable:!1})),searchable:!0,"search-placeholder":t(l)("settings.pages.modules.speech.sections.section.provider-voice-selection.search_voices_placeholder"),"search-no-results-title":t(l)("settings.pages.modules.speech.sections.section.provider-voice-selection.no_voices"),"search-no-results-description":t(l)("settings.pages.modules.speech.sections.section.provider-voice-selection.no_voices_description"),"search-results-text":t(l)("settings.pages.modules.speech.sections.section.provider-voice-selection.search_voices_results",{count:0,total:0}),"custom-input-placeholder":t(l)("settings.pages.modules.speech.sections.section.provider-voice-selection.custom_voice_placeholder"),"expand-button-text":t(l)("settings.pages.modules.speech.sections.section.provider-voice-selection.show_more"),"collapse-button-text":t(l)("settings.pages.modules.speech.sections.section.provider-voice-selection.show_less"),"play-button-text":t(l)("settings.pages.modules.speech.sections.section.provider-voice-selection.play_sample"),"pause-button-text":t(l)("settings.pages.modules.speech.sections.section.provider-voice-selection.pause"),"onUpdate:customValue":de},null,8,["search-query","voice-id","voices","search-placeholder","search-no-results-title","search-no-results-description","search-results-text","custom-input-placeholder","expand-button-text","collapse-button-text","play-button-text","pause-button-text"])])):t(T)?(n(),i("div",Dt,[s[25]||(s[25]=e("div",{"i-solar:close-circle-line-duotone":"",class:"text-2xl text-red-500 dark:text-red-400"},null,-1)),e("div",jt,[s[24]||(s[24]=e("span",{class:"font-medium"},"Error loading voices",-1)),e("span",Ot,k(t(T)),1)])])):(n(),i("div",Qt,s[26]||(s[26]=[e("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1),e("div",{class:"flex flex-col"},[e("span",{class:"font-medium"},"No voices available"),e("span",{class:"text-sm text-amber-600 dark:text-amber-400"}," No voices were found for this provider. You can enter a custom voice name below. ")],-1)]))),e("div",Ht,[S(t(oe),{modelValue:t(f),"onUpdate:modelValue":s[6]||(s[6]=u=>N(f)?f.value=u:null),label:"Pitch",description:"Tune the pitch of the voice",min:-100,max:100,step:1,"format-value":u=>`${u}%`},null,8,["modelValue","format-value"]),S(t(ae),{modelValue:t(z),"onUpdate:modelValue":s[7]||(s[7]=u=>N(z)?z.value=u:null),label:"Enable SSML",description:"Enable Speech Synthesis Markup Language for more control over speech output"},null,8,["modelValue"])]),!t(a)[t(v)]||t(a)[t(v)].length===0?(n(),i("div",Gt,[S(t(Se),{modelValue:t(h),"onUpdate:modelValue":s[8]||(s[8]=u=>N(h)?h.value=u:null),type:"text",label:"Voice ID",description:"Enter the voice ID for your custom voice",placeholder:"Enter voice name (e.g., 'Rachel', 'Josh')"},null,8,["modelValue"]),t(v)==="elevenlabs"?(n(),i("div",Jt,[s[28]||(s[28]=e("label",{class:"mb-1 block text-sm font-medium"}," Model ",-1)),j(e("select",{"onUpdate:modelValue":s[9]||(s[9]=u=>N(b)?b.value=u:null),class:"w-full border border-neutral-300 rounded bg-white px-3 py-2 dark:border-neutral-700 dark:bg-neutral-900"},s[27]||(s[27]=[e("option",{value:"eleven_monolingual_v1"}," Monolingual v1 ",-1),e("option",{value:"eleven_multilingual_v1"}," Multilingual v1 ",-1),e("option",{value:"eleven_multilingual_v2"}," Multilingual v2 ",-1)]),512),[[we,t(b)]])])):$("",!0),e("div",Kt,[S(t(oe),{modelValue:t(f),"onUpdate:modelValue":s[10]||(s[10]=u=>N(f)?f.value=u:null),label:"Pitch",description:"Tune the pitch of the voice",min:-100,max:100,step:1,"format-value":u=>`${u}%`},null,8,["modelValue","format-value"])])])):$("",!0)])])):$("",!0)]),e("div",Yt,[e("div",Wt,[e("h2",Xt,[e("div",Zt,[S(t(_e)),e("div",null,k(t(l)("settings.pages.providers.provider.elevenlabs.playground.title")),1)])]),e("div",es,[S(t(ae),{modelValue:m.value,"onUpdate:modelValue":s[11]||(s[11]=u=>m.value=u),label:"Use Custom SSML",description:"Enable to input raw SSML instead of plain text"},null,8,["modelValue"]),m.value?j((n(),i("textarea",{key:1,"onUpdate:modelValue":s[13]||(s[13]=u=>U.value=u),placeholder:"Enter SSML text...",border:"neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700",transition:"all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900","h-48":"","w-full":"","rounded-lg":"","px-3":"","py-2":"","text-sm":"","font-mono":"","outline-none":""},null,512)),[[W,U.value]]):j((n(),i("textarea",{key:0,"onUpdate:modelValue":s[12]||(s[12]=u=>_.value=u),placeholder:t(l)("settings.pages.providers.provider.elevenlabs.playground.fields.field.input.placeholder"),border:"neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700",transition:"all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900","h-24":"","w-full":"","rounded-lg":"","px-3":"","py-2":"","text-sm":"","outline-none":""},null,8,ts)),[[W,_.value]]),e("div",ss,[e("button",{border:"neutral-800 dark:neutral-200 solid 2",transition:"border duration-250 ease-in-out","rounded-lg":"","px-4":"",text:"neutral-100 dark:neutral-900","py-2":"","text-sm":"",disabled:B.value||!_.value.trim()&&!m.value||m.value&&!U.value.trim()||!t(M),class:C({"opacity-50 cursor-not-allowed":B.value||!_.value.trim()&&!m.value||m.value&&!U.value.trim()||!t(M)}),bg:"neutral-700 dark:neutral-300",onClick:ue},[e("div",os,[s[30]||(s[30]=e("div",{"i-solar:play-circle-bold-duotone":""},null,-1)),e("span",null,k(B.value?t(l)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating"):t(l)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.label")),1)])],10,ls),y.value?(n(),i("button",{key:0,border:"primary-300 dark:primary-800 solid 2",transition:"border duration-250 ease-in-out","rounded-lg":"","px-4":"","py-2":"","text-sm":"",onClick:se},s[31]||(s[31]=[e("div",{flex:"~ row","items-center":"","gap-2":""},[e("div",{"i-solar:stop-circle-bold-duotone":""}),e("span",null,"Stop")],-1)]))):$("",!0)]),y.value?(n(),i("audio",{key:2,ref_key:"audioPlayer",ref:F,src:y.value,controls:"",class:"mt-2 w-full"},null,8,as)):$("",!0)])])])]),s[32]||(s[32]=e("div",{text:"neutral-200/50 dark:neutral-500/20","pointer-events-none":"",fixed:"","bottom-0":"","right-0":"","z--1":"","translate-x-10":"","translate-y-10":""},[e("div",{text:"40","i-lucide:volume-2":""})],-1))],64)}}});typeof re=="function"&&re(rs);export{rs as default}; diff --git a/assets/speech-DK9my_xu.js b/assets/speech-D3H5B80W.js similarity index 98% rename from assets/speech-DK9my_xu.js rename to assets/speech-D3H5B80W.js index ae19b696fa868e5351aa2bf0c774b8286d813610..d0c9c751ac938a5648e4264cc2b8b96e9b2d9d2e 100644 --- a/assets/speech-DK9my_xu.js +++ b/assets/speech-D3H5B80W.js @@ -1,2 +1,2 @@ -import{f as oe,bD as h,g as S,h as m,w as q,l as ie}from"./index-7-fr_lhT.js";import{r as ce,a as le,b as ue,d as de}from"./index-Be1NqeGb.js";import{u as me}from"./providers-B7zWTIWF.js";const ge=async e=>(e.fetch??globalThis.fetch)(ce("audio/speech",e.baseURL),{body:ue(e),headers:le({"Content-Type":"application/json",...e.headers},e.apiKey),method:"POST",signal:e.abortSignal}).then(de).then(async t=>t.arrayBuffer()),pe=/["&'<>`]/g,he=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,fe=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,ve=/[|\\{}()[\]^$+*?.]/g,j=new WeakMap;function z(e,t){if(e=e.replace(t.subset?ye(t.subset):pe,n),t.subset||t.escapeOnly)return e;return e.replace(he,r).replace(fe,n);function r(a,o,u){return t.format((a.charCodeAt(0)-55296)*1024+a.charCodeAt(1)-56320+65536,u.charCodeAt(o+2),t)}function n(a,o,u){return t.format(a.charCodeAt(0),u.charCodeAt(o+1),t)}}function ye(e){let t=j.get(e);return t||(t=Se(e),j.set(e,t)),t}function Se(e){const t=[];let r=-1;for(;++r",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Oe=["cent","copy","divide","gt","lt","not","para","times"],B={}.hasOwnProperty,R={};let b;for(b in M)B.call(M,b)&&(R[M[b]]=b);const Pe=/[^\dA-Za-z]/;function qe(e,t,r,n){const a=String.fromCharCode(e);if(B.call(R,a)){const o=R[a],u="&"+o;return r&&Ee.includes(o)&&!Oe.includes(o)&&(!n||t&&t!==61&&Pe.test(String.fromCharCode(t)))?u:u+";"}return""}function Me(e,t,r){let n=Ae(e,t,r.omitOptionalSemicolons),a;if((r.useNamedReferences||r.useShortestReferences)&&(a=qe(e,t,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!a)&&r.useShortestReferences){const o=we(e,t,r.omitOptionalSemicolons);o.length/g,Ue=[">"];function $e(e){return""}function je(e){return""}const Ne=[" ",` +import{f as oe,bD as h,g as S,h as m,w as q,l as ie}from"./index-hDb1Lsb8.js";import{r as ce,a as le,b as ue,d as de}from"./index-Be1NqeGb.js";import{u as me}from"./providers-adQ6cb75.js";const ge=async e=>(e.fetch??globalThis.fetch)(ce("audio/speech",e.baseURL),{body:ue(e),headers:le({"Content-Type":"application/json",...e.headers},e.apiKey),method:"POST",signal:e.abortSignal}).then(de).then(async t=>t.arrayBuffer()),pe=/["&'<>`]/g,he=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,fe=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,ve=/[|\\{}()[\]^$+*?.]/g,j=new WeakMap;function z(e,t){if(e=e.replace(t.subset?ye(t.subset):pe,n),t.subset||t.escapeOnly)return e;return e.replace(he,r).replace(fe,n);function r(a,o,u){return t.format((a.charCodeAt(0)-55296)*1024+a.charCodeAt(1)-56320+65536,u.charCodeAt(o+2),t)}function n(a,o,u){return t.format(a.charCodeAt(0),u.charCodeAt(o+1),t)}}function ye(e){let t=j.get(e);return t||(t=Se(e),j.set(e,t)),t}function Se(e){const t=[];let r=-1;for(;++r",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Oe=["cent","copy","divide","gt","lt","not","para","times"],B={}.hasOwnProperty,R={};let b;for(b in M)B.call(M,b)&&(R[M[b]]=b);const Pe=/[^\dA-Za-z]/;function qe(e,t,r,n){const a=String.fromCharCode(e);if(B.call(R,a)){const o=R[a],u="&"+o;return r&&Ee.includes(o)&&!Oe.includes(o)&&(!n||t&&t!==61&&Pe.test(String.fromCharCode(t)))?u:u+";"}return""}function Me(e,t,r){let n=Ae(e,t,r.omitOptionalSemicolons),a;if((r.useNamedReferences||r.useShortestReferences)&&(a=qe(e,t,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!a)&&r.useShortestReferences){const o=we(e,t,r.omitOptionalSemicolons);o.length/g,Ue=[">"];function $e(e){return""}function je(e){return""}const Ne=[" ",` `," ",'"',"&","'","/","<","=",">"];function A(e){return y(e,Ne)}function N(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,a=r.indexOf(t);for(;a!==-1;)n++,a=r.indexOf(t,a+t.length);return n}function T(e,t){const r=String(e);let n=t.options.quote||'"';if(t.options.quoteSmart){const a=n==='"'?"'":'"';N(r,n)>N(r,a)&&(n=a)}return n+y(r,["<","&",n])+n}function De(e,t){const r=A(e.name),n=e.public,a=e.system;let o=""}const ke={}.hasOwnProperty;function Ie(e,t){const r=A(e.name),n=K(e,t),a=e.attributes||{},o=n?!1:t.options.closeEmptyElements,u=[];let f;for(f in a)if(ke.call(a,f)){const p=a[f];p!=null&&u.push(A(f)+"="+T(p,t))}return"<"+r+(u.length===0?"":" "+u.join(" "))+(o?(t.options.tightClose?"":" ")+"/":"")+">"+n+(o?"":"")}const ze=/\?>/g,Be=[">"];function Ve(e){const t=A(e.name)||"x",r=y(e.value,Be,ze);return""}const He=["&","<"];function V(e){return y(e.value,He)}function Ke(e,t){return t.options.allowDangerousXml?e.value:V(e)}const Ye={}.hasOwnProperty,D={cdata:$e,comment:je,doctype:De,element:Ie,instruction:Ve,raw:Ke,root:K,text:V};function H(e,t){const r=e&&e.type;if(!r)throw new Error("Expected node, not `"+e+"`");if(!Ye.call(D,r))throw new Error("Cannot compile unknown node `"+r+"`");const n=D[r];return n(e,t)}function K(e,t){const r=e&&e.children||[];let n=-1;const a=[];for(;++n{const e=me(),t=h("settings/speech/active-provider",""),r=h("settings/speech/active-model","eleven_multilingual_v2"),n=h("settings/speech/voice",""),a=S(),o=h("settings/speech/pitch",0),u=h("settings/speech/rate",1),f=h("settings/speech/ssml-enabled",!1),p=S(!1),x=S(null),v=S({}),U=h("settings/speech/language","en-US"),w=S(""),Y=m(()=>e.availableProviders.filter(s=>O(s)).map(s=>e.getProviderMetadata(s))),G=m(()=>{var s;return((s=e.getProviderMetadata(t.value))==null?void 0:s.capabilities.listModels)!==void 0}),E=m(()=>e.getModelsForProvider(t.value)),X=m(()=>e.isLoadingModels[t.value]||!1),Z=m(()=>e.modelLoadError[t.value]||null),_=m(()=>{if(!w.value.trim())return E.value;const s=w.value.toLowerCase().trim();return E.value.filter(i=>i.name.toLowerCase().includes(s)||i.id.toLowerCase().includes(s)||i.description&&i.description.toLowerCase().includes(s))}),Q=m(()=>["elevenlabs","microsoft-speech","azure-speech","google"].includes(t.value)),W=m(()=>Object.keys(L)),J=m(()=>{const s=U.value;return!s||!L[s]?[]:L[s].map(i=>({id:Ze[i],name:i,provider:"elevenlabs",language:s}))});function O(s){return["elevenlabs","microsoft-speech","azure-speech","google","amazon"].includes(s)}async function P(s){var i,c;if(!s||!O(s))return[];p.value=!0,x.value=null;try{const l=await((c=(i=e.getProviderMetadata(s).capabilities).listVoices)==null?void 0:c.call(i,e.getProviderConfig(s)))||[];return v.value[s]=l,l}catch(l){return console.error(`Error fetching voices for ${s}:`,l),x.value=l instanceof Error?l.message:"Unknown error",[]}finally{p.value=!1}}function ee(s){return v.value[s]||[]}q(t,async s=>{s&&await P(s)}),ie(()=>{P(t.value).then(()=>{var s;n.value&&(a.value=(s=v.value[t.value])==null?void 0:s.find(i=>i.id===n.value))})}),q(n,s=>{var i;s&&(a.value=(i=v.value[t.value])==null?void 0:i.find(c=>c.id===s))},{immediate:!0}),q(v,s=>{var i;n.value&&(a.value=(i=s[t.value])==null?void 0:i.find(c=>c.id===n.value))},{immediate:!0});async function te(s,i,c,l,g={}){return await ge({...s.speech(i,{...g}),input:c,voice:l})}function re(s,i,c){var $;const l=c==null?void 0:c.pitch,g=c==null?void 0:c.speed,d=c==null?void 0:c.volume,ne={pitch:l!=null?l>0?`+${l}%`:`-${l}%`:void 0,rate:g!=null?g!==1?`${g}`:"1":void 0,volume:d!=null?d>0?`+${d}%`:`${d}%`:void 0},ae=C("speak",{version:"1.0",xmlns:"http://www.w3.org/2001/10/synthesis","xml:lang":(($=i.languages[0])==null?void 0:$.code)||"en-US"},[C("voice",{name:i.id,gender:i.gender||"neutral"},[Object.entries(ne).filter(([_e,se])=>se!=null).length>0?C("prosody",{pitch:l!=null?l>0?`+${l}%`:`-${l}%`:void 0,rate:g!=null?g!==1?`${g}`:"1":void 0,volume:d!=null?d>0?`+${d}%`:`${d}%`:void 0},[s]):s])]);return Ge(ae)}return{activeSpeechProvider:t,activeSpeechModel:r,activeSpeechVoice:a,activeSpeechVoiceId:n,pitch:o,rate:u,ssmlEnabled:f,selectedLanguage:U,isLoadingSpeechProviderVoices:p,speechProviderError:x,availableVoices:v,modelSearchQuery:w,availableSpeechProvidersMetadata:Y,supportsSSML:Q,availableLanguages:W,availableVoicesForLanguage:J,supportsModelListing:G,providerModels:E,isLoadingActiveProviderModels:X,activeProviderModelError:Z,filteredModels:_,speech:te,loadVoicesForProvider:P,getVoicesForProvider:ee,generateSSML:re,isSpeechProvider:O}});export{N as c,ge as g,et as s,tt as u}; diff --git a/assets/stage-BtOYSTbO.js b/assets/stage-BhwJBhbz.js similarity index 84% rename from assets/stage-BtOYSTbO.js rename to assets/stage-BhwJBhbz.js index 3048d834fb3a53a0dacae5c9649cb2f429d1f9e3..d47c9c07b4c7111b0e7ee31d97674ee8dbef839e 100644 --- a/assets/stage-BtOYSTbO.js +++ b/assets/stage-BhwJBhbz.js @@ -1 +1 @@ -import{d as p,u as s,c,b as d,r as i,n as m,e,o as l}from"./index-7-fr_lhT.js";const x=p({__name:"stage",setup(u){const{top:t,right:o,bottom:a,left:n}=s();return(f,_)=>{const r=i("RouterView");return l(),c("main",{text:"gray-700 dark:gray-200","h-full":"","font-cuteen":"",style:m({paddingTop:`${e(t)}px`,paddingRight:`${e(o)}px`,paddingBottom:`${e(a)}px`,paddingLeft:`${e(n)}px`})},[d(r)],4)}}});export{x as default}; +import{d as p,u as s,c,b as d,r as i,n as m,e,o as l}from"./index-hDb1Lsb8.js";const x=p({__name:"stage",setup(u){const{top:t,right:o,bottom:a,left:n}=s();return(f,_)=>{const r=i("RouterView");return l(),c("main",{text:"gray-700 dark:gray-200","h-full":"","font-cuteen":"",style:m({paddingTop:`${e(t)}px`,paddingRight:`${e(o)}px`,paddingBottom:`${e(a)}px`,paddingLeft:`${e(n)}px`})},[d(r)],4)}}});export{x as default}; diff --git a/assets/together-ai-CiiMDjmH.js b/assets/together-ai-D2dNKA3a.js similarity index 75% rename from assets/together-ai-CiiMDjmH.js rename to assets/together-ai-D2dNKA3a.js index 4a189cc732652412e180703f700049564209b565..e94c3abe74b901d726d0c8472dbebbddac869799 100644 --- a/assets/together-ai-CiiMDjmH.js +++ b/assets/together-ai-D2dNKA3a.js @@ -1 +1 @@ -import"./live2d-zip-loader-dDw0Wbbr.js";import{d as h,q as y,bG as U,s as V,h as v,l as $,w as k,x,o as K,y as p,b as l,e as t}from"./index-7-fr_lhT.js";import{u as z}from"./providers-B7zWTIWF.js";import{_ as w,a as C}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CUVIcbSL.js";import{_ as M}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C3sxqbyi.js";import{_ as N,a as P}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BCwQg86s.js";import{_ as R}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BxRDV7Dm.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-D5rspuJc.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BNzPx9yx.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BhtqkEkU.js";import"./Input.vue_vue_type_script_setup_true_lang-58p3G1RX.js";const a="together-ai",J=h({__name:"together-ai",setup(S){const{t:d}=y(),_=U(),m=z(),{providers:o}=V(m),n=v(()=>m.getProviderMetadata(a)),i=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),s=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});$(()=>{var e,r;m.initializeProvider(a),i.value=((e=o.value[a])==null?void 0:e.apiKey)||"",s.value=((r=o.value[a])==null?void 0:r.baseUrl)||""}),k([i,s],()=>{o.value[a]={...o.value[a],apiKey:i.value,baseUrl:s.value||""}});function g(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,r)=>{var c,f;return K(),x(t(R),{"provider-name":(c=n.value)==null?void 0:c.localizedName,"provider-icon-color":(f=n.value)==null?void 0:f.iconColor,"on-back":()=>t(_).back()},{default:p(()=>[l(t(N),null,{default:p(()=>[l(t(P),{title:t(d)("settings.pages.providers.common.section.basic.title"),description:t(d)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:p(()=>{var u;return[l(t(M),{modelValue:i.value,"onUpdate:modelValue":r[0]||(r[0]=b=>i.value=b),"provider-name":(u=n.value)==null?void 0:u.localizedName,placeholder:"togetherapi-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(w),{title:t(d)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[l(t(C),{modelValue:s.value,"onUpdate:modelValue":r[1]||(r[1]=u=>s.value=u),placeholder:"https://api.together.xyz/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});export{J as default}; +import"./live2d-zip-loader--bTGFeQd.js";import{d as h,q as y,bG as U,s as V,h as v,l as $,w as k,x,o as K,y as p,b as l,e as t}from"./index-hDb1Lsb8.js";import{u as z}from"./providers-adQ6cb75.js";import{_ as w,a as C}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-UCuivhvU.js";import{_ as M}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-CHpN3yiY.js";import{_ as N,a as P}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CYv3qJbi.js";import{_ as R}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTOfxlwP.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js";import"./Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js";const a="together-ai",J=h({__name:"together-ai",setup(S){const{t:d}=y(),_=U(),m=z(),{providers:o}=V(m),n=v(()=>m.getProviderMetadata(a)),i=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),s=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});$(()=>{var e,r;m.initializeProvider(a),i.value=((e=o.value[a])==null?void 0:e.apiKey)||"",s.value=((r=o.value[a])==null?void 0:r.baseUrl)||""}),k([i,s],()=>{o.value[a]={...o.value[a],apiKey:i.value,baseUrl:s.value||""}});function g(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,r)=>{var c,f;return K(),x(t(R),{"provider-name":(c=n.value)==null?void 0:c.localizedName,"provider-icon-color":(f=n.value)==null?void 0:f.iconColor,"on-back":()=>t(_).back()},{default:p(()=>[l(t(N),null,{default:p(()=>[l(t(P),{title:t(d)("settings.pages.providers.common.section.basic.title"),description:t(d)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:p(()=>{var u;return[l(t(M),{modelValue:i.value,"onUpdate:modelValue":r[0]||(r[0]=b=>i.value=b),"provider-name":(u=n.value)==null?void 0:u.localizedName,placeholder:"togetherapi-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(w),{title:t(d)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[l(t(C),{modelValue:s.value,"onUpdate:modelValue":r[1]||(r[1]=u=>s.value=u),placeholder:"https://api.together.xyz/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});export{J as default}; diff --git a/assets/useIconAnimation-BqW7zFiT.js b/assets/useIconAnimation-DVKfiTTG.js similarity index 68% rename from assets/useIconAnimation-BqW7zFiT.js rename to assets/useIconAnimation-DVKfiTTG.js index bd8fbcd9f3e14de54bc5c5bd15645275ae8f0059..29b7692c51808a72e1747c7dc878f162b7d80e65 100644 --- a/assets/useIconAnimation-BqW7zFiT.js +++ b/assets/useIconAnimation-DVKfiTTG.js @@ -1 +1 @@ -import"./live2d-zip-loader-dDw0Wbbr.js";import{g as t,v as u,h as r,l as c,H as m}from"./index-7-fr_lhT.js";function p(s){const n=t(!1),o=t(!1),a=t(s),e=u(),i=r(()=>o.value&&!e.disableTransitions&&e.usePageSpecificTransitions);return c(()=>{o.value=!0,requestAnimationFrame(()=>{n.value=!0})}),m(()=>{n.value=!1,o.value=!1}),{iconAnimationStarted:n,showIconAnimation:i,animationIcon:a}}export{p as u}; +import"./live2d-zip-loader--bTGFeQd.js";import{g as t,v as u,h as r,l as c,H as m}from"./index-hDb1Lsb8.js";function p(s){const n=t(!1),o=t(!1),a=t(s),e=u(),i=r(()=>o.value&&!e.disableTransitions&&e.usePageSpecificTransitions);return c(()=>{o.value=!0,requestAnimationFrame(()=>{n.value=!0})}),m(()=>{n.value=!1,o.value=!1}),{iconAnimationStarted:n,showIconAnimation:i,animationIcon:a}}export{p as u}; diff --git a/assets/xai-BUrYAIzO.js b/assets/xai-CS3ttJDb.js similarity index 67% rename from assets/xai-BUrYAIzO.js rename to assets/xai-CS3ttJDb.js index 5fc471fe44241c20a3e27fbfe8d91e3f35f2d1cd..67459c41639df81d8919a3a62fed070d3d6f48b8 100644 --- a/assets/xai-BUrYAIzO.js +++ b/assets/xai-CS3ttJDb.js @@ -1 +1 @@ -import"./live2d-zip-loader-dDw0Wbbr.js";import{d as x,q as U,bG as V,s as y,h as v,l as $,w as k,x as K,o as h,y as p,b as l,e as t}from"./index-7-fr_lhT.js";import{u as w}from"./providers-B7zWTIWF.js";import{_ as z,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CUVIcbSL.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C3sxqbyi.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BCwQg86s.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BxRDV7Dm.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-D5rspuJc.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BNzPx9yx.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BhtqkEkU.js";import"./Input.vue_vue_type_script_setup_true_lang-58p3G1RX.js";const a="xai",J=x({__name:"xai",setup(B){const{t:d}=U(),_=V(),m=w(),{providers:o}=y(m),n=v(()=>m.getProviderMetadata(a)),s=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),r=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});$(()=>{var e,i;m.initializeProvider(a),s.value=((e=o.value[a])==null?void 0:e.apiKey)||"",r.value=((i=o.value[a])==null?void 0:i.baseUrl)||""}),k([s,r],()=>{o.value[a]={...o.value[a],apiKey:s.value,baseUrl:r.value||""}});function b(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var c,f;return h(),K(t(S),{"provider-name":(c=n.value)==null?void 0:c.localizedName,"provider-icon":(f=n.value)==null?void 0:f.icon,"on-back":()=>t(_).back()},{default:p(()=>[l(t(P),null,{default:p(()=>[l(t(R),{title:t(d)("settings.pages.providers.common.section.basic.title"),description:t(d)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:p(()=>{var u;return[l(t(N),{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=g=>s.value=g),"provider-name":(u=n.value)==null?void 0:u.localizedName,placeholder:"xai-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(z),{title:t(d)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[l(t(M),{modelValue:r.value,"onUpdate:modelValue":i[1]||(i[1]=u=>r.value=u),placeholder:"https://api.x.ai/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});export{J as default}; +import"./live2d-zip-loader--bTGFeQd.js";import{d as x,q as U,bG as V,s as y,h as v,l as $,w as k,x as K,o as h,y as p,b as l,e as t}from"./index-hDb1Lsb8.js";import{u as w}from"./providers-adQ6cb75.js";import{_ as z,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-UCuivhvU.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-CHpN3yiY.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-CYv3qJbi.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DTOfxlwP.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-bS5XNUtd.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-BTGItw4h.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-CG42zMAq.js";import"./Input.vue_vue_type_script_setup_true_lang-DGnmLgZc.js";const a="xai",J=x({__name:"xai",setup(B){const{t:d}=U(),_=V(),m=w(),{providers:o}=y(m),n=v(()=>m.getProviderMetadata(a)),s=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),r=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});$(()=>{var e,i;m.initializeProvider(a),s.value=((e=o.value[a])==null?void 0:e.apiKey)||"",r.value=((i=o.value[a])==null?void 0:i.baseUrl)||""}),k([s,r],()=>{o.value[a]={...o.value[a],apiKey:s.value,baseUrl:r.value||""}});function b(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var c,f;return h(),K(t(S),{"provider-name":(c=n.value)==null?void 0:c.localizedName,"provider-icon":(f=n.value)==null?void 0:f.icon,"on-back":()=>t(_).back()},{default:p(()=>[l(t(P),null,{default:p(()=>[l(t(R),{title:t(d)("settings.pages.providers.common.section.basic.title"),description:t(d)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:p(()=>{var u;return[l(t(N),{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=g=>s.value=g),"provider-name":(u=n.value)==null?void 0:u.localizedName,placeholder:"xai-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(z),{title:t(d)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[l(t(M),{modelValue:r.value,"onUpdate:modelValue":i[1]||(i[1]=u=>r.value=u),placeholder:"https://api.x.ai/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});export{J as default}; diff --git a/index.html b/index.html index 04b37ff0e1be1e2b6b1b1524a83b30c1e14d4f96..5cfc4c4b6a9bf41b72291d5225d6415ecac802ef 100644 --- a/index.html +++ b/index.html @@ -23,7 +23,7 @@ src="/remote-assets/page-external-data/js/script.js" > - +