diff --git a/assets/Basic.vue_vue_type_script_setup_true_lang-CrXWH1a1.js b/assets/Basic.vue_vue_type_script_setup_true_lang-C4n90OG-.js similarity index 90% rename from assets/Basic.vue_vue_type_script_setup_true_lang-CrXWH1a1.js rename to assets/Basic.vue_vue_type_script_setup_true_lang-C4n90OG-.js index a84af5b7a9425a737e6c7b0c8cb659555bdaf1b1..bfb9e272587334fbf48d190dab86f9a941b0fce5 100644 --- a/assets/Basic.vue_vue_type_script_setup_true_lang-CrXWH1a1.js +++ b/assets/Basic.vue_vue_type_script_setup_true_lang-C4n90OG-.js @@ -1 +1 @@ -import{d,bI as c,bJ as f,g as s,w as p,A as v,bE as x,o as h,c as y,n as _}from"./index-D8Nm21zW.js";const g=d({__name:"Basic",props:{modelValue:{default:""},modelModifiers:{}},emits:c(["submit"],["update:modelValue"]),setup(n,{emit:u}){const r=u,e=f(n,"modelValue"),a=s(),o=s("auto");function i(t){t.code==="Enter"&&!t.shiftKey&&(t.preventDefault(),r("submit",e.value))}return p(e,()=>{o.value="auto",requestAnimationFrame(()=>{a.value&&(o.value=`${a.value.scrollHeight}px`)})},{immediate:!0}),(t,l)=>v((h(),y("textarea",{ref_key:"textareaRef",ref:a,"onUpdate:modelValue":l[0]||(l[0]=m=>e.value=m),style:_({height:o.value}),onKeydown:i},null,36)),[[x,e.value]])}});export{g as _}; +import{d,bI as c,bJ as f,g as s,w as p,A as v,bE as x,o as h,c as y,n as _}from"./index-_NYoebRU.js";const g=d({__name:"Basic",props:{modelValue:{default:""},modelModifiers:{}},emits:c(["submit"],["update:modelValue"]),setup(n,{emit:u}){const r=u,e=f(n,"modelValue"),a=s(),o=s("auto");function i(t){t.code==="Enter"&&!t.shiftKey&&(t.preventDefault(),r("submit",e.value))}return p(e,()=>{o.value="auto",requestAnimationFrame(()=>{a.value&&(o.value=`${a.value.scrollHeight}px`)})},{immediate:!0}),(t,l)=>v((h(),y("textarea",{ref_key:"textareaRef",ref:a,"onUpdate:modelValue":l[0]||(l[0]=m=>e.value=m),style:_({height:o.value}),onKeydown:i},null,36)),[[x,e.value]])}});export{g as _}; diff --git a/assets/CardDetailDialog-Dxt-FHQW.js b/assets/CardDetailDialog-Dxt-FHQW.js deleted file mode 100644 index acf3f87083d789bd122fcc3c41d72f99a318734d..0000000000000000000000000000000000000000 --- a/assets/CardDetailDialog-Dxt-FHQW.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o}from"./CardDetailDialog.vue_vue_type_script_setup_true_lang-DAwVKIUC.js";import"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-NzJTgSSI.js";import"./index-D8Nm21zW.js";import"./index-BUaUWOtl.js";import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import"./airi-card-DeGSbHPj.js";import"./consciousness-CgTB9b9w.js";import"./providers-DUDq6kdm.js";import"./index-Be1NqeGb.js";import"./speech-B27BwGQ-.js";export{o as default}; diff --git a/assets/CardDetailDialog-KFyFC3hN.js b/assets/CardDetailDialog-KFyFC3hN.js new file mode 100644 index 0000000000000000000000000000000000000000..a5ae68adc09137ad06e0d83d9bed58f4fad75e03 --- /dev/null +++ b/assets/CardDetailDialog-KFyFC3hN.js @@ -0,0 +1 @@ +import{_ as o}from"./CardDetailDialog.vue_vue_type_script_setup_true_lang-BFh-yT1v.js";import"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-BHqygveO.js";import"./index-_NYoebRU.js";import"./index-Bl8tS_1d.js";import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import"./airi-card-BWLSOH_H.js";import"./consciousness-Ch13RX1M.js";import"./providers-Bbs_o2SI.js";import"./index-Be1NqeGb.js";import"./speech-DTX8fpM-.js";export{o as default}; diff --git a/assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-DAwVKIUC.js b/assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-BFh-yT1v.js similarity index 96% rename from assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-DAwVKIUC.js rename to assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-BFh-yT1v.js index 0a6253152dd6f9801852a549c13398503595b9f5..cec675ece03ca7b2e8628ebed62e530dff3bb282 100644 --- a/assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-DAwVKIUC.js +++ b/assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-BFh-yT1v.js @@ -1 +1 @@ -import{a as O,_ as q}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-NzJTgSSI.js";import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.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,u as l,y as k,a as e,C as v,bL as u,D as i,z as $,by as j}from"./index-D8Nm21zW.js";import{u as R}from"./airi-card-DeGSbHPj.js";import{n as G,I as J,$ as K,P as Q,B as W}from"./index-BUaUWOtl.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-BHqygveO.js";import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.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,u as l,y as k,a as e,C as v,bL as u,D as i,z as $,by as j}from"./index-_NYoebRU.js";import{u as R}from"./airi-card-BWLSOH_H.js";import{n as G,I as J,$ as K,P as Q,B as W}from"./index-Bl8tS_1d.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-CmKnCrTs.js b/assets/CardListItem-CmKnCrTs.js deleted file mode 100644 index 43ccfc8b13f474b3104b952e3abbca38f9d89fae..0000000000000000000000000000000000000000 --- a/assets/CardListItem-CmKnCrTs.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o}from"./CardListItem.vue_vue_type_script_setup_true_lang-DG6xnm5K.js";import"./index-D8Nm21zW.js";import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";export{o as default}; diff --git a/assets/CardListItem-D6WoT0h6.js b/assets/CardListItem-D6WoT0h6.js new file mode 100644 index 0000000000000000000000000000000000000000..a9775a8313703d4341ef558f6c3e17aa5774f91e --- /dev/null +++ b/assets/CardListItem-D6WoT0h6.js @@ -0,0 +1 @@ +import{_ as o}from"./CardListItem.vue_vue_type_script_setup_true_lang-CXgQKm7D.js";import"./index-_NYoebRU.js";import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";export{o as default}; diff --git a/assets/CardListItem.vue_vue_type_script_setup_true_lang-DG6xnm5K.js b/assets/CardListItem.vue_vue_type_script_setup_true_lang-CXgQKm7D.js similarity index 97% rename from assets/CardListItem.vue_vue_type_script_setup_true_lang-DG6xnm5K.js rename to assets/CardListItem.vue_vue_type_script_setup_true_lang-CXgQKm7D.js index 4b5dcea0d3c2f29ef30029b52e38e04f653e9b79..e13944b7c6e0ac1c7e0868406b5273a36978d0e2 100644 --- a/assets/CardListItem.vue_vue_type_script_setup_true_lang-DG6xnm5K.js +++ b/assets/CardListItem.vue_vue_type_script_setup_true_lang-CXgQKm7D.js @@ -1 +1 @@ -import{d as M,g as s,l as R,c as p,o as d,m as D,n as F,bn as H,x as I,y as N,a as t,C as v,D as l,bM as k,z as h,u as V}from"./index-D8Nm21zW.js";import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";const W=M({__name:"CursorFloating",props:{intensity:{default:1.5}},setup(r){const n=r,o=s(null),a=s(""),e=s("50% 50%"),i=s("50% 50%"),y=s(.5);function w(c){if(!o.value)return;const u=o.value,b=u.getBoundingClientRect(),C=c.clientX-b.left,_=c.clientY-b.top,z=u.offsetWidth,B=u.offsetHeight,f=Math.abs(Math.floor(100/z*C)-100),m=Math.abs(Math.floor(100/B*_)-100),x=50+(f-50)/1.5,g=50+(m-50)/1.5,P=50+(f-50)/7,S=50+(m-50)/7,X=(x-50)/1.5*.2*n.intensity,Y=(g-50)/2*-1*.2*n.intensity,A=50-f+(50-m),j=.5+Math.abs(A)*.008*n.intensity;a.value=`perspective(1200px) rotateX(${Y}deg) rotateY(${X}deg) scale3d(${1+.015*n.intensity}, ${1+.015*n.intensity}, ${1+.015*n.intensity})`,e.value=`${x}% ${g}%`,i.value=`${P}% ${S}%`,y.value=j}function $(){a.value="perspective(1200px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)",e.value="50% 50%",i.value="50% 50%",y.value=.5}return R(()=>{a.value="perspective(1200px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)"}),(c,u)=>(d(),p("div",{ref_key:"cardRef",ref:o,class:"card-hover-effect",style:F({transform:a.value,"--effect-intensity":r.intensity}),onMousemove:w,onMouseleave:$},[D(c.$slots,"default",{},void 0,!0)],36))}}),E=H(W,[["__scopeId","data-v-895421da"]]),L={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] text-primary-600/80 dark:text-primary-300/80"},O={"z-1":"",flex:"","items-start":"","justify-between":"","gap-2":""},q={"flex-1":"",truncate:"","text-lg":"","font-bold":""},G={key:0,"shrink-0":"","rounded-md":"","p-1":"",bg:"primary-100 dark:primary-900/40",text:"primary-600 dark:primary-400"},J={key:0,"line-clamp-3":"","min-h-40px":"","flex-1":"","text-sm":"",text:"neutral-500 dark:neutral-400"},K={"z-1":"",flex:"","items-center":"","justify-between":"","text-xs":"",text:"neutral-500 dark:neutral-400"},Q={flex:"","items-center":"","gap-1.5":""},T={flex:"","items-center":"","gap-0.5":""},U={flex:"","items-center":"","gap-0.5":""},Z={flex:"","items-center":"","justify-end":"","px-2":"","py-1.5":""},ee=["disabled"],ne=M({__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:n}){const o=n;return(a,e)=>(d(),I(V(E),{relative:"","min-h-120px":"",flex:"~ col","cursor-pointer":"","overflow-hidden":"","rounded-xl":"",class:h([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:e[2]||(e[2]=i=>o("select"))},{default:N(()=>[t("div",L,[t("div",O,[t("h3",q,l(r.name),1),r.isActive?(d(),p("div",G,e[3]||(e[3]=[t("div",{"i-solar:check-circle-bold-duotone":"","text-sm":""},null,-1)]))):v("",!0)]),r.description?(d(),p("p",J,l(r.description),1)):v("",!0),t("div",K,[t("div",null,"v"+l(r.version),1),t("div",Q,[t("div",T,[e[4]||(e[4]=t("div",{"i-lucide:ghost":"","text-xs":""},null,-1)),t("span",null,l(r.consciousnessModel),1)]),t("div",U,[e[5]||(e[5]=t("div",{"i-lucide:mic":"","text-xs":""},null,-1)),t("span",null,l(r.voiceModel),1)])])])]),t("div",Z,[t("button",{"rounded-lg":"","p-1.5":"","transition-colors":"",hover:"bg-neutral-200 dark:bg-neutral-700/50",disabled:r.isActive,onClick:e[0]||(e[0]=k(i=>o("activate"),["stop"]))},[t("div",{class:h([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,ee),r.id!=="default"?(d(),p("button",{key:0,"rounded-lg":"","p-1.5":"","transition-colors":"",hover:"bg-neutral-200 dark:bg-neutral-700/50",onClick:e[1]||(e[1]=k(i=>o("delete"),["stop"]))},e[6]||(e[6]=[t("div",{"i-solar:trash-bin-trash-linear":"",text:"neutral-500 dark:neutral-400"},null,-1)]))):v("",!0)])]),_:1},8,["class"]))}});export{ne as _}; +import{d as M,g as s,l as R,c as p,o as d,m as D,n as F,bn as H,x as I,y as N,a as t,C as v,D as l,bM as k,z as h,u as V}from"./index-_NYoebRU.js";import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";const W=M({__name:"CursorFloating",props:{intensity:{default:1.5}},setup(r){const n=r,o=s(null),a=s(""),e=s("50% 50%"),i=s("50% 50%"),y=s(.5);function w(c){if(!o.value)return;const u=o.value,b=u.getBoundingClientRect(),C=c.clientX-b.left,_=c.clientY-b.top,z=u.offsetWidth,B=u.offsetHeight,f=Math.abs(Math.floor(100/z*C)-100),m=Math.abs(Math.floor(100/B*_)-100),x=50+(f-50)/1.5,g=50+(m-50)/1.5,P=50+(f-50)/7,S=50+(m-50)/7,X=(x-50)/1.5*.2*n.intensity,Y=(g-50)/2*-1*.2*n.intensity,A=50-f+(50-m),j=.5+Math.abs(A)*.008*n.intensity;a.value=`perspective(1200px) rotateX(${Y}deg) rotateY(${X}deg) scale3d(${1+.015*n.intensity}, ${1+.015*n.intensity}, ${1+.015*n.intensity})`,e.value=`${x}% ${g}%`,i.value=`${P}% ${S}%`,y.value=j}function $(){a.value="perspective(1200px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)",e.value="50% 50%",i.value="50% 50%",y.value=.5}return R(()=>{a.value="perspective(1200px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)"}),(c,u)=>(d(),p("div",{ref_key:"cardRef",ref:o,class:"card-hover-effect",style:F({transform:a.value,"--effect-intensity":r.intensity}),onMousemove:w,onMouseleave:$},[D(c.$slots,"default",{},void 0,!0)],36))}}),E=H(W,[["__scopeId","data-v-895421da"]]),L={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] text-primary-600/80 dark:text-primary-300/80"},O={"z-1":"",flex:"","items-start":"","justify-between":"","gap-2":""},q={"flex-1":"",truncate:"","text-lg":"","font-bold":""},G={key:0,"shrink-0":"","rounded-md":"","p-1":"",bg:"primary-100 dark:primary-900/40",text:"primary-600 dark:primary-400"},J={key:0,"line-clamp-3":"","min-h-40px":"","flex-1":"","text-sm":"",text:"neutral-500 dark:neutral-400"},K={"z-1":"",flex:"","items-center":"","justify-between":"","text-xs":"",text:"neutral-500 dark:neutral-400"},Q={flex:"","items-center":"","gap-1.5":""},T={flex:"","items-center":"","gap-0.5":""},U={flex:"","items-center":"","gap-0.5":""},Z={flex:"","items-center":"","justify-end":"","px-2":"","py-1.5":""},ee=["disabled"],ne=M({__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:n}){const o=n;return(a,e)=>(d(),I(V(E),{relative:"","min-h-120px":"",flex:"~ col","cursor-pointer":"","overflow-hidden":"","rounded-xl":"",class:h([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:e[2]||(e[2]=i=>o("select"))},{default:N(()=>[t("div",L,[t("div",O,[t("h3",q,l(r.name),1),r.isActive?(d(),p("div",G,e[3]||(e[3]=[t("div",{"i-solar:check-circle-bold-duotone":"","text-sm":""},null,-1)]))):v("",!0)]),r.description?(d(),p("p",J,l(r.description),1)):v("",!0),t("div",K,[t("div",null,"v"+l(r.version),1),t("div",Q,[t("div",T,[e[4]||(e[4]=t("div",{"i-lucide:ghost":"","text-xs":""},null,-1)),t("span",null,l(r.consciousnessModel),1)]),t("div",U,[e[5]||(e[5]=t("div",{"i-lucide:mic":"","text-xs":""},null,-1)),t("span",null,l(r.voiceModel),1)])])])]),t("div",Z,[t("button",{"rounded-lg":"","p-1.5":"","transition-colors":"",hover:"bg-neutral-200 dark:bg-neutral-700/50",disabled:r.isActive,onClick:e[0]||(e[0]=k(i=>o("activate"),["stop"]))},[t("div",{class:h([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,ee),r.id!=="default"?(d(),p("button",{key:0,"rounded-lg":"","p-1.5":"","transition-colors":"",hover:"bg-neutral-200 dark:bg-neutral-700/50",onClick:e[1]||(e[1]=k(i=>o("delete"),["stop"]))},e[6]||(e[6]=[t("div",{"i-solar:trash-bin-trash-linear":"",text:"neutral-500 dark:neutral-400"},null,-1)]))):v("",!0)])]),_:1},8,["class"]))}});export{ne as _}; diff --git a/assets/Collapsable.vue_vue_type_script_setup_true_lang-CYg3DjVq.js b/assets/Collapsable.vue_vue_type_script_setup_true_lang-Dx_TCyI1.js similarity index 87% rename from assets/Collapsable.vue_vue_type_script_setup_true_lang-CYg3DjVq.js rename to assets/Collapsable.vue_vue_type_script_setup_true_lang-Dx_TCyI1.js index 07ba2131c5611d6e8895ec820119ca79b80c0a5e..ee1b14f9c6580c36df9d7bd524c9ba5b17617ec2 100644 --- a/assets/Collapsable.vue_vue_type_script_setup_true_lang-CYg3DjVq.js +++ b/assets/Collapsable.vue_vue_type_script_setup_true_lang-Dx_TCyI1.js @@ -1 +1 @@ -import{_ as d}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-CL9MLblt.js";import{d as p,bI as m,bJ as f,af as b,c,o as v,m as r,b as V,bU as u,bV as y,y as C,C as g,bW as k,a as s,bL as x,D as i}from"./index-D8Nm21zW.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-Cx39i7VD.js";import{d as p,bI as m,bJ as f,af as b,c,o as v,m as r,b as V,bU as u,bV as y,y as C,C as g,bW as k,a as s,bL as x,D as i}from"./index-_NYoebRU.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-Dh84R3gB.js b/assets/ColorPalette.vue_vue_type_script_setup_true_lang-DQF1MPun.js similarity index 87% rename from assets/ColorPalette.vue_vue_type_script_setup_true_lang-Dh84R3gB.js rename to assets/ColorPalette.vue_vue_type_script_setup_true_lang-DQF1MPun.js index 6980e86d8c3ae691c13ea7df9766356d878081cd..f9b9a599d00fad3d06a18168ea2ab1e43fce5fb3 100644 --- a/assets/ColorPalette.vue_vue_type_script_setup_true_lang-Dh84R3gB.js +++ b/assets/ColorPalette.vue_vue_type_script_setup_true_lang-DQF1MPun.js @@ -1 +1 @@ -import{_ as b}from"./Collapsable.vue_vue_type_script_setup_true_lang-CYg3DjVq.js";import{d as c,x as m,o as i,y as l,a as n,z as u,m as y,bL as f,D as g,v as C,c as d,C as k,bx as v,by as x,b as s,u as e,n as h,bS as w}from"./index-D8Nm21zW.js";import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import{W as S,j as $,q as z,U as B,G as E,H as V}from"./index-BUaUWOtl.js";const F=["onClick"],H={flex:"","gap-1.5":""},q=c({__name:"Section",props:{title:null,icon:null,innerClass:null,expand:{type:Boolean,default:!0}},setup(t){return(r,_)=>(i(),m(b,{default:t.expand},{trigger:l(o=>[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:"neutral-100 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",onClick:a=>o.setVisible(!o.visible)},[n("div",H,[n("div",{class:u(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:u({"rotate-180":o.visible})},null,2)],8,F)]),default:l(()=>[n("div",{grid:"","gap-4":"","p-4":"",class:u(t.innerClass)},[y(r.$slots,"default")],2)]),_:3},8,["default"]))}}),L={key:0,flex:"","gap-2":""},G=c({__name:"ColorPalette",props:{colors:null},setup(t){const r=C();return(_,o)=>t.colors.length?(i(),d("div",L,[(i(!0),d(v,null,x(t.colors,({hex:a,name:p})=>(i(),m(e(V),{key:a||"default"},{default:l(()=>[s(e(S),null,{default:l(()=>[s(e($),{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(w)}),class:u(e(r).isColorSelectedForPrimary(a)?"scale-150 mx-1":"hover:scale-110"),onClick:N=>e(r).applyPrimaryColorFrom(a)},null,8,["style","class","onClick"]),s(e(z),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-Dx_TCyI1.js";import{d as c,x as m,o as i,y as l,a as n,z as u,m as y,bL as f,D as g,v as C,c as d,C as k,bx as v,by as x,b as s,u as e,n as h,bS as w}from"./index-_NYoebRU.js";import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import{W as S,j as $,q as z,U as B,G as E,H as V}from"./index-Bl8tS_1d.js";const F=["onClick"],H={flex:"","gap-1.5":""},q=c({__name:"Section",props:{title:null,icon:null,innerClass:null,expand:{type:Boolean,default:!0}},setup(t){return(r,_)=>(i(),m(b,{default:t.expand},{trigger:l(o=>[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:"neutral-100 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",onClick:a=>o.setVisible(!o.visible)},[n("div",H,[n("div",{class:u(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:u({"rotate-180":o.visible})},null,2)],8,F)]),default:l(()=>[n("div",{grid:"","gap-4":"","p-4":"",class:u(t.innerClass)},[y(r.$slots,"default")],2)]),_:3},8,["default"]))}}),L={key:0,flex:"","gap-2":""},G=c({__name:"ColorPalette",props:{colors:null},setup(t){const r=C();return(_,o)=>t.colors.length?(i(),d("div",L,[(i(!0),d(v,null,x(t.colors,({hex:a,name:p})=>(i(),m(e(V),{key:a||"default"},{default:l(()=>[s(e(S),null,{default:l(()=>[s(e($),{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(w)}),class:u(e(r).isColorSelectedForPrimary(a)?"scale-150 mx-1":"hover:scale-110"),onClick:N=>e(r).applyPrimaryColorFrom(a)},null,8,["style","class","onClick"]),s(e(z),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-BfLGvfow.js b/assets/DeleteCardDialog-BfLGvfow.js deleted file mode 100644 index 1ea0d4b944fbc0fcae2b4c9686071ac6fa3ad384..0000000000000000000000000000000000000000 --- a/assets/DeleteCardDialog-BfLGvfow.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-NzJTgSSI.js";import"./index-D8Nm21zW.js";import"./index-BUaUWOtl.js";export{o as default}; diff --git a/assets/DeleteCardDialog-Cc50HfYA.js b/assets/DeleteCardDialog-Cc50HfYA.js new file mode 100644 index 0000000000000000000000000000000000000000..d123111a41bb6d51234ec3d10fc568a82769d3bf --- /dev/null +++ b/assets/DeleteCardDialog-Cc50HfYA.js @@ -0,0 +1 @@ +import{_ as o}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-BHqygveO.js";import"./index-_NYoebRU.js";import"./index-Bl8tS_1d.js";export{o as default}; diff --git a/assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-NzJTgSSI.js b/assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-BHqygveO.js similarity index 93% rename from assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-NzJTgSSI.js rename to assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-BHqygveO.js index 180b4bbf88567e1ded802800edd67f65b444a3cb..ad7d8514551be7e0e7fc917c60ea8d0b8fb0bc24 100644 --- a/assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-NzJTgSSI.js +++ b/assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-BHqygveO.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,u as e,bL as x}from"./index-D8Nm21zW.js";import{A as V,k as B,O as N,V as z,F as D,M as O,N as S,T}from"./index-BUaUWOtl.js";const $=["disabled"],j={class:"flex flex-row items-center justify-center gap-2"},A={key:0,class:"i-lucide:loader-circle animate-spin"},F={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",j,[a.loading?(d(),r("div",A)):a.icon?(d(),r("div",{key:1,class:g(a.icon)},null,2)):h("",!0),a.label?(d(),r("span",F,i(a.label),1)):_(b.$slots,"default",{key:3})])],10,$))}}),I={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(T),{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",I,[t(e(O),{"as-child":""},{default:n(()=>[t(e(y),{variant:"secondary",label:e(o)("settings.pages.card.cancel"),onClick:c},null,8,["label"])]),_:1}),t(e(S),{"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,u as e,bL as x}from"./index-_NYoebRU.js";import{A as V,k as B,O as N,V as z,F as D,M as O,N as S,T}from"./index-Bl8tS_1d.js";const $=["disabled"],j={class:"flex flex-row items-center justify-center gap-2"},A={key:0,class:"i-lucide:loader-circle animate-spin"},F={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",j,[a.loading?(d(),r("div",A)):a.icon?(d(),r("div",{key:1,class:g(a.icon)},null,2)):h("",!0),a.label?(d(),r("span",F,i(a.label),1)):_(b.$slots,"default",{key:3})])],10,$))}}),I={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(T),{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",I,[t(e(O),{"as-child":""},{default:n(()=>[t(e(y),{variant:"secondary",label:e(o)("settings.pages.card.cancel"),onClick:c},null,8,["label"])]),_:1}),t(e(S),{"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-BNHdvI3g.js b/assets/FieldInput.vue_vue_type_script_setup_true_lang-BHH_IiH5.js similarity index 87% rename from assets/FieldInput.vue_vue_type_script_setup_true_lang-BNHdvI3g.js rename to assets/FieldInput.vue_vue_type_script_setup_true_lang-BHH_IiH5.js index 02dc4ac4b8f8bc44c8d959a6bb6aee05ed19577a..9be20f2b9fafd59cd2edbb173408b91320048482 100644 --- a/assets/FieldInput.vue_vue_type_script_setup_true_lang-BNHdvI3g.js +++ b/assets/FieldInput.vue_vue_type_script_setup_true_lang-BHH_IiH5.js @@ -1 +1 @@ -import{_ as u}from"./Input.vue_vue_type_script_setup_true_lang-DacRzqGb.js";import{d as i,bI as c,bJ as p,c as o,o as d,a as l,b as m,bL as _,C as x,D as n,z as f}from"./index-D8Nm21zW.js";const V={"max-w-full":""},h={flex:"~ col gap-4"},b={class:"flex items-center gap-1 text-sm font-medium"},y={key:0,class:"text-red-500"},v={class:"text-xs text-neutral-500 dark:text-neutral-400","text-nowrap":""},B=i({__name:"FieldInput",props:c({label:null,description:null,placeholder:null,required:{type:Boolean},type:null,inputClass:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,a=p(t,"modelValue");return(C,s)=>(d(),o("div",V,[l("label",h,[l("div",null,[l("div",b,[_(n(e.label)+" ",1),e.required!==!1?(d(),o("span",y,"*")):x("",!0)]),l("div",v,n(e.description),1)]),m(u,{modelValue:a.value,"onUpdate:modelValue":s[0]||(s[0]=r=>a.value=r),type:e.type,placeholder:e.placeholder,class:f(e.inputClass)},null,8,["modelValue","type","placeholder","class"])])]))}});export{B as _}; +import{_ as u}from"./Input.vue_vue_type_script_setup_true_lang-DXXJ9lLc.js";import{d as i,bI as c,bJ as p,c as o,o as d,a as l,b as m,bL as _,C as x,D as n,z as f}from"./index-_NYoebRU.js";const V={"max-w-full":""},h={flex:"~ col gap-4"},b={class:"flex items-center gap-1 text-sm font-medium"},y={key:0,class:"text-red-500"},v={class:"text-xs text-neutral-500 dark:text-neutral-400","text-nowrap":""},B=i({__name:"FieldInput",props:c({label:null,description:null,placeholder:null,required:{type:Boolean},type:null,inputClass:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,a=p(t,"modelValue");return(C,s)=>(d(),o("div",V,[l("label",h,[l("div",null,[l("div",b,[_(n(e.label)+" ",1),e.required!==!1?(d(),o("span",y,"*")):x("",!0)]),l("div",v,n(e.description),1)]),m(u,{modelValue:a.value,"onUpdate:modelValue":s[0]||(s[0]=r=>a.value=r),type:e.type,placeholder:e.placeholder,class:f(e.inputClass)},null,8,["modelValue","type","placeholder","class"])])]))}});export{B as _}; diff --git a/assets/FieldRange.vue_vue_type_script_setup_true_lang-B670Jjy-.js b/assets/FieldRange.vue_vue_type_script_setup_true_lang-BeH9VX4J.js similarity index 91% rename from assets/FieldRange.vue_vue_type_script_setup_true_lang-B670Jjy-.js rename to assets/FieldRange.vue_vue_type_script_setup_true_lang-BeH9VX4J.js index 06042058618ad43c0d07e31c26aefbf7bc4fb274..5488ae2b8c7d71ab005644f1a6c84ac1d10b5b1d 100644 --- a/assets/FieldRange.vue_vue_type_script_setup_true_lang-B670Jjy-.js +++ b/assets/FieldRange.vue_vue_type_script_setup_true_lang-BeH9VX4J.js @@ -1 +1 @@ -import{d as v,bI as x,bJ as g,h as r,g as y,l as b,A as M,bE as h,o as V,c as _,bn as k,a as o,D as i,b as C}from"./index-D8Nm21zW.js";import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";const R=["min","max","step"],w=v({__name:"Range",props:x({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 a=t,l=g(t,"modelValue"),m=r(()=>a.min*1e4),s=r(()=>a.max*1e4),n=r(()=>a.step*1e4),e=y(),c=r({get:()=>l.value*1e4,set:p=>{l.value=p/1e4,f()}});b(()=>{f()});function f(){e.value&&(e.value.style.setProperty("--value",e.value.value),e.value.style.setProperty("--min",e.value.min?e.value.min:a.min.toString()),e.value.style.setProperty("--max",e.value.max?e.value.max:a.max.toString()))}return(p,u)=>M((V(),_("input",{ref_key:"sliderRef",ref:e,"onUpdate:modelValue":u[0]||(u[0]=d=>c.value=d),type:"range",min:m.value,max:s.value,step:n.value,class:"slider-progress form_input-range",onInput:u[1]||(u[1]=d=>{d.target.style.setProperty("--value",d.target.value)})},null,40,R)),[[h,c.value,void 0,{number:!0}]])}}),B=k(w,[["__scopeId","data-v-6ca6d31c"]]),P={flex:"~ col gap-4"},S={flex:"~ row","items-center":"","gap-2":""},D={flex:"1"},I={class:"flex items-center gap-1 text-sm font-medium"},q={class:"text-xs text-neutral-500 dark:text-neutral-400"},E={"font-mono":""},F={flex:"~ row","items-center":"","gap-2":""},U=v({__name:"FieldRange",props:x({min:null,max:null,step:null,label:null,description:null,formatValue:{type:Function}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const a=t,l=g(t,"modelValue");return(m,s)=>{var n;return V(),_("label",P,[o("div",S,[o("div",D,[o("div",I,i(t.label),1),o("div",q,i(t.description),1)]),o("span",E,i(((n=a.formatValue)==null?void 0:n.call(a,l.value))||l.value),1)]),o("div",F,[C(B,{modelValue:l.value,"onUpdate:modelValue":s[0]||(s[0]=e=>l.value=e),min:t.min||0,max:t.max||1,step:t.step||.01,"w-full":""},null,8,["modelValue","min","max","step"])])])}}});export{U as _}; +import{d as v,bI as x,bJ as g,h as r,g as y,l as b,A as M,bE as h,o as V,c as _,bn as k,a as o,D as i,b as C}from"./index-_NYoebRU.js";import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";const R=["min","max","step"],w=v({__name:"Range",props:x({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 a=t,l=g(t,"modelValue"),m=r(()=>a.min*1e4),s=r(()=>a.max*1e4),n=r(()=>a.step*1e4),e=y(),c=r({get:()=>l.value*1e4,set:p=>{l.value=p/1e4,f()}});b(()=>{f()});function f(){e.value&&(e.value.style.setProperty("--value",e.value.value),e.value.style.setProperty("--min",e.value.min?e.value.min:a.min.toString()),e.value.style.setProperty("--max",e.value.max?e.value.max:a.max.toString()))}return(p,u)=>M((V(),_("input",{ref_key:"sliderRef",ref:e,"onUpdate:modelValue":u[0]||(u[0]=d=>c.value=d),type:"range",min:m.value,max:s.value,step:n.value,class:"slider-progress form_input-range",onInput:u[1]||(u[1]=d=>{d.target.style.setProperty("--value",d.target.value)})},null,40,R)),[[h,c.value,void 0,{number:!0}]])}}),B=k(w,[["__scopeId","data-v-6ca6d31c"]]),P={flex:"~ col gap-4"},S={flex:"~ row","items-center":"","gap-2":""},D={flex:"1"},I={class:"flex items-center gap-1 text-sm font-medium"},q={class:"text-xs text-neutral-500 dark:text-neutral-400"},E={"font-mono":""},F={flex:"~ row","items-center":"","gap-2":""},U=v({__name:"FieldRange",props:x({min:null,max:null,step:null,label:null,description:null,formatValue:{type:Function}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const a=t,l=g(t,"modelValue");return(m,s)=>{var n;return V(),_("label",P,[o("div",S,[o("div",D,[o("div",I,i(t.label),1),o("div",q,i(t.description),1)]),o("span",E,i(((n=a.formatValue)==null?void 0:n.call(a,l.value))||l.value),1)]),o("div",F,[C(B,{modelValue:l.value,"onUpdate:modelValue":s[0]||(s[0]=e=>l.value=e),min:t.min||0,max:t.max||1,step:t.step||.01,"w-full":""},null,8,["modelValue","min","max","step"])])])}}});export{U as _}; diff --git a/assets/HeaderLink-yHEt2vbv.js b/assets/HeaderLink-Bo73zIrx.js similarity index 90% rename from assets/HeaderLink-yHEt2vbv.js rename to assets/HeaderLink-Bo73zIrx.js index 7b118a66ef992fe794465cf0b51d5996e5a25077..c080727fd430980056b0606c7e20402d0cf0346e 100644 --- a/assets/HeaderLink-yHEt2vbv.js +++ b/assets/HeaderLink-Bo73zIrx.js @@ -1 +1 @@ -import{d as r,bC as c,x as l,u as e,bo as d,o as s,y as _,c as t,a,bn as i}from"./index-D8Nm21zW.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,u as e,bo as d,o as s,y as _,c as t,a,bn as i}from"./index-_NYoebRU.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-CRr1ZQyH.js b/assets/IconAnimation.vue_vue_type_script_setup_true_lang-BRA-bMih.js similarity index 95% rename from assets/IconAnimation.vue_vue_type_script_setup_true_lang-CRr1ZQyH.js rename to assets/IconAnimation.vue_vue_type_script_setup_true_lang-BRA-bMih.js index e148feea77b56d9fd2d460c1e5a4b3882e82a306..31c016b373a934babecf41ddc9912ea3315a1181 100644 --- a/assets/IconAnimation.vue_vue_type_script_setup_true_lang-CRr1ZQyH.js +++ b/assets/IconAnimation.vue_vue_type_script_setup_true_lang-BRA-bMih.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-D8Nm21zW.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-_NYoebRU.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-BzE_9TF3.js b/assets/IconStatusItem-DEltasic.js similarity index 94% rename from assets/IconStatusItem-BzE_9TF3.js rename to assets/IconStatusItem-DEltasic.js index c844285eec7e460e154547c76cd0909f5e12da77..5a5d57fecbe340cd765c4630c0a72283425154ff 100644 --- a/assets/IconStatusItem-BzE_9TF3.js +++ b/assets/IconStatusItem-DEltasic.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-D8Nm21zW.js";import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";const p={flex:"~ col",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-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))])])}}}),B=_(b,[["__scopeId","data-v-6e5b5c9c"]]);export{B 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-_NYoebRU.js";import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";const p={flex:"~ col",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-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))])])}}}),B=_(b,[["__scopeId","data-v-6e5b5c9c"]]);export{B as I}; diff --git a/assets/Input.vue_vue_type_script_setup_true_lang-DacRzqGb.js b/assets/Input.vue_vue_type_script_setup_true_lang-DXXJ9lLc.js similarity index 91% rename from assets/Input.vue_vue_type_script_setup_true_lang-DacRzqGb.js rename to assets/Input.vue_vue_type_script_setup_true_lang-DXXJ9lLc.js index f1317a32ada0f495677e745006673fb65a3f3197..f6d84ef717cc1dc33bff0fcbfcbb8e3bee9b16dd 100644 --- a/assets/Input.vue_vue_type_script_setup_true_lang-DacRzqGb.js +++ b/assets/Input.vue_vue_type_script_setup_true_lang-DXXJ9lLc.js @@ -1 +1 @@ -import{d as r,bI as n,bJ as u,A as s,co as d,o as i,c as p}from"./index-D8Nm21zW.js";const m=["type"],y=r({__name:"Input",props:n({type:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const o=e,t=u(e,"modelValue");return(c,a)=>s((i(),p("input",{"onUpdate:modelValue":a[0]||(a[0]=l=>t.value=l),type:o.type||"text",border:"focus:primary-300 dark:focus:primary-400/50 2 solid neutral-100 dark:neutral-900",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-50 dark:neutral-950 focus:neutral-50 dark:focus:neutral-900"},null,8,m)),[[d,t.value]])}});export{y as _}; +import{d as r,bI as n,bJ as u,A as s,co as d,o as i,c as p}from"./index-_NYoebRU.js";const m=["type"],y=r({__name:"Input",props:n({type:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const o=e,t=u(e,"modelValue");return(c,a)=>s((i(),p("input",{"onUpdate:modelValue":a[0]||(a[0]=l=>t.value=l),type:o.type||"text",border:"focus:primary-300 dark:focus:primary-400/50 2 solid neutral-100 dark:neutral-900",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-50 dark:neutral-950 focus:neutral-50 dark:focus:neutral-900"},null,8,m)),[[d,t.value]])}});export{y as _}; diff --git a/assets/InputFile.vue_vue_type_script_setup_true_lang-aVfE3xzX.js b/assets/InputFile.vue_vue_type_script_setup_true_lang-UdikYOzo.js similarity index 96% rename from assets/InputFile.vue_vue_type_script_setup_true_lang-aVfE3xzX.js rename to assets/InputFile.vue_vue_type_script_setup_true_lang-UdikYOzo.js index d45f2eb3006424f03f9c72b1301d71c2f64366d0..ec918dfe0da55d3c29791b00e02c5589e22699f2 100644 --- a/assets/InputFile.vue_vue_type_script_setup_true_lang-aVfE3xzX.js +++ b/assets/InputFile.vue_vue_type_script_setup_true_lang-UdikYOzo.js @@ -1 +1 @@ -import{d as g,bI as b,bJ as v,g as p,bK as y,c as i,o as n,z as m,u as t,a as l,m as x}from"./index-D8Nm21zW.js";const k=["accept","multiple"],h={key:0,text:"center","text-sm":""},D={key:1,text:"center","text-sm":""},C=g({__name:"InputFile",props:b({accept:null,multiple:{type:Boolean}},{modelValue:{required:!1,default:()=>[]},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const d=v(o,"modelValue"),u=p(),a=p(!1),r=y(a,150);function f(s){const e=s.target;e.files&&e.files.length>0&&(u.value=e.files[0]),d.value=Array.from(e.files||[]),a.value=!1}return(s,e)=>(n(),i("label",{relative:"",class:m(["min-h-[120px] flex flex-col cursor-pointer items-center justify-center rounded-xl p-6",[t(r)?"border-primary-400 dark:border-primary-600 hover:border-primary-300 dark:hover:border-primary-700":"border-neutral-200 dark:border-neutral-700 hover:border-primary-300 dark:hover:border-primary-700",t(r)?"bg-primary-50/5 dark:bg-primary-900/5":"bg-white/60 dark:bg-black/30 hover:bg-white/80 dark:hover:bg-black/40"]]),border:"dashed 2",transition:"all duration-300","cursor-pointer":"","opacity-95":"",hover:"scale-100 opacity-100 shadow-md dark:shadow-lg",onDragover:e[0]||(e[0]=c=>a.value=!0),onDragleave:e[1]||(e[1]=c=>a.value=!1)},[l("input",{type:"file",accept:o.accept,multiple:o.multiple,"cursor-pointer":"",class:"absolute inset-0 h-full w-full opacity-0",onChange:f},null,40,k),x(s.$slots,"default",{isDragging:t(r),firstFile:u.value,files:d.value},()=>[l("div",{class:m(["flex flex-col items-center",[t(r)?"text-primary-500 dark:text-primary-400":"text-neutral-400 dark:text-neutral-500"]])},[e[2]||(e[2]=l("div",{"i-solar:upload-square-line-duotone":"","mb-2":"","text-5xl":""},null,-1)),e[3]||(e[3]=l("p",{"font-medium":"",text:"center lg"}," Upload ",-1)),t(r)?(n(),i("p",h," Release to upload ")):(n(),i("p",D," Click or drag and drop a file here "))],2)])],34))}});export{C as _}; +import{d as g,bI as b,bJ as v,g as p,bK as y,c as i,o as n,z as m,u as t,a as l,m as x}from"./index-_NYoebRU.js";const k=["accept","multiple"],h={key:0,text:"center","text-sm":""},D={key:1,text:"center","text-sm":""},C=g({__name:"InputFile",props:b({accept:null,multiple:{type:Boolean}},{modelValue:{required:!1,default:()=>[]},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const d=v(o,"modelValue"),u=p(),a=p(!1),r=y(a,150);function f(s){const e=s.target;e.files&&e.files.length>0&&(u.value=e.files[0]),d.value=Array.from(e.files||[]),a.value=!1}return(s,e)=>(n(),i("label",{relative:"",class:m(["min-h-[120px] flex flex-col cursor-pointer items-center justify-center rounded-xl p-6",[t(r)?"border-primary-400 dark:border-primary-600 hover:border-primary-300 dark:hover:border-primary-700":"border-neutral-200 dark:border-neutral-700 hover:border-primary-300 dark:hover:border-primary-700",t(r)?"bg-primary-50/5 dark:bg-primary-900/5":"bg-white/60 dark:bg-black/30 hover:bg-white/80 dark:hover:bg-black/40"]]),border:"dashed 2",transition:"all duration-300","cursor-pointer":"","opacity-95":"",hover:"scale-100 opacity-100 shadow-md dark:shadow-lg",onDragover:e[0]||(e[0]=c=>a.value=!0),onDragleave:e[1]||(e[1]=c=>a.value=!1)},[l("input",{type:"file",accept:o.accept,multiple:o.multiple,"cursor-pointer":"",class:"absolute inset-0 h-full w-full opacity-0",onChange:f},null,40,k),x(s.$slots,"default",{isDragging:t(r),firstFile:u.value,files:d.value},()=>[l("div",{class:m(["flex flex-col items-center",[t(r)?"text-primary-500 dark:text-primary-400":"text-neutral-400 dark:text-neutral-500"]])},[e[2]||(e[2]=l("div",{"i-solar:upload-square-line-duotone":"","mb-2":"","text-5xl":""},null,-1)),e[3]||(e[3]=l("p",{"font-medium":"",text:"center lg"}," Upload ",-1)),t(r)?(n(),i("p",h," Release to upload ")):(n(),i("p",D," Click or drag and drop a file here "))],2)])],34))}});export{C as _}; diff --git a/assets/Model.vue_vue_type_script_setup_true_lang-xbmtXrdQ.js b/assets/Model.vue_vue_type_script_setup_true_lang-BJMG46Vq.js similarity index 97% rename from assets/Model.vue_vue_type_script_setup_true_lang-xbmtXrdQ.js rename to assets/Model.vue_vue_type_script_setup_true_lang-BJMG46Vq.js index 34f446c1eea28bc83c7e06d0d167d0951a21deb7..259074d69a796c1ca3bc29126a176b6861a32193 100644 --- a/assets/Model.vue_vue_type_script_setup_true_lang-xbmtXrdQ.js +++ b/assets/Model.vue_vue_type_script_setup_true_lang-BJMG46Vq.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 R,M as ce,p as T}from"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import{bP 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 z,h as O,bC as pe,i as he,G as fe,s as me,v as ge,bQ as Me,bR as we,bx as ye,a as be,p as Se}from"./index-D8Nm21zW.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=z(()=>l.paused),e=h(),i=h(0),c=h(0),y=O(()=>Math.max(0,Math.min(100,l.mouthOpenSize))),P=pe(),n=he(Se),g=O(()=>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 T.setupLive2DModel(a,[b.value]):S.value==="url"&&await T.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 R.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 R.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 R,M as ce,p as T}from"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import{bP 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 z,h as O,bC as pe,i as he,G as fe,s as me,v as ge,bQ as Me,bR as we,bx as ye,a as be,p as Se}from"./index-_NYoebRU.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=z(()=>l.paused),e=h(),i=h(0),c=h(0),y=O(()=>Math.max(0,Math.min(100,l.mouthOpenSize))),P=pe(),n=he(Se),g=O(()=>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 T.setupLive2DModel(a,[b.value]):S.value==="url"&&await T.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 R.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 R.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/PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js b/assets/PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js similarity index 93% rename from assets/PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js rename to assets/PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js index e6d824b9aa23793caff87c63b50b6bcd0cbc8002..595ce86cfb70fe0a8f685e4dd6d4a5ff9d770001 100644 --- a/assets/PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js +++ b/assets/PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js @@ -1 +1 @@ -import{d as l,bG as u,bw as c,A as d,o as n,c as s,a as t,u as p,C as x,D as i}from"./index-D8Nm21zW.js";const f={initial:{opacity:0,x:10},enter:{opacity:1,x:0},duration:250,style:{top:"env(safe-area-inset-top, 0px)",right:"env(safe-area-inset-right, 0px)",left:"env(safe-area-inset-left, 0px)"},sticky:"","inset-x-0":"","top-0":"","z-99":"","w-full":"","pb-6":"","pt-10":"",flex:"~ row items-center gap-2",bg:"$bg-color"},v={relative:""},b={key:0,absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},m={text:"neutral-300 dark:neutral-500","text-nowrap":""},_={"text-nowrap":"","text-3xl":"","font-semibold":""},y=l({__name:"PageHeader",props:{title:null,subtitle:null},setup(o){const a=u();return(g,e)=>{const r=c("motion");return d((n(),s("div",f,[t("button",{onClick:e[0]||(e[0]=k=>p(a).back())},e[1]||(e[1]=[t("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),t("h1",v,[o.subtitle?(n(),s("div",b,[t("span",m,i(o.subtitle),1)])):x("",!0),t("div",_,i(o.title),1)])])),[[r]])}}});export{y as _}; +import{d as l,bG as u,bw as c,A as d,o as n,c as s,a as t,u as p,C as x,D as i}from"./index-_NYoebRU.js";const f={initial:{opacity:0,x:10},enter:{opacity:1,x:0},duration:250,style:{top:"env(safe-area-inset-top, 0px)",right:"env(safe-area-inset-right, 0px)",left:"env(safe-area-inset-left, 0px)"},sticky:"","inset-x-0":"","top-0":"","z-99":"","w-full":"","pb-6":"","pt-10":"",flex:"~ row items-center gap-2",bg:"$bg-color"},v={relative:""},b={key:0,absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},m={text:"neutral-300 dark:neutral-500","text-nowrap":""},_={"text-nowrap":"","text-3xl":"","font-semibold":""},y=l({__name:"PageHeader",props:{title:null,subtitle:null},setup(o){const a=u();return(g,e)=>{const r=c("motion");return d((n(),s("div",f,[t("button",{onClick:e[0]||(e[0]=k=>p(a).back())},e[1]||(e[1]=[t("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),t("h1",v,[o.subtitle?(n(),s("div",b,[t("span",m,i(o.subtitle),1)])):x("",!0),t("div",_,i(o.title),1)])])),[[r]])}}});export{y as _}; diff --git a/assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DFTTO3aS.js b/assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DEakgvr1.js similarity index 84% rename from assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DFTTO3aS.js rename to assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DEakgvr1.js index b4569b56128153788c7cb62c37b4090e667c9200..211b487a2760c356db8eaa79c66a140b952766d0 100644 --- a/assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DFTTO3aS.js +++ b/assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DEakgvr1.js @@ -1 +1 @@ -import{_ as u}from"./FieldInput.vue_vue_type_script_setup_true_lang-BNHdvI3g.js";import{d as i,bI as n,q as t,bJ as p,h as m,x as c,o as f,u as b}from"./index-D8Nm21zW.js";const y=i({__name:"ProviderApiKeyInput",props:n({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}=t(),o=p(e,"modelValue"),d=m(()=>l.description||`API Key for ${l.providerName}`);return(v,r)=>(f(),c(u,{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 u}from"./FieldInput.vue_vue_type_script_setup_true_lang-BHH_IiH5.js";import{d as i,bI as n,q as t,bJ as p,h as m,x as c,o as f,u as b}from"./index-_NYoebRU.js";const y=i({__name:"ProviderApiKeyInput",props:n({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}=t(),o=p(e,"modelValue"),d=m(()=>l.description||`API Key for ${l.providerName}`);return(v,r)=>(f(),c(u,{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-Blzu2N2U.js b/assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BBijRr4z.js similarity index 88% rename from assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-Blzu2N2U.js rename to assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BBijRr4z.js index 4e5b30b3168339094764df7e605cb7cf023684de..a93024a8cbd013b625283bd299df083a4d536c30 100644 --- a/assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-Blzu2N2U.js +++ b/assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BBijRr4z.js @@ -1 +1 @@ -import{_ as p}from"./Collapsable.vue_vue_type_script_setup_true_lang-CYg3DjVq.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,bI as b,bJ as g}from"./index-D8Nm21zW.js";import{_ as V}from"./FieldInput.vue_vue_type_script_setup_true_lang-BNHdvI3g.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-Dx_TCyI1.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,bI as b,bJ as g}from"./index-_NYoebRU.js";import{_ as V}from"./FieldInput.vue_vue_type_script_setup_true_lang-BHH_IiH5.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-Bq_0Y-1M.js b/assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-8eUb1l9O.js similarity index 94% rename from assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-Bq_0Y-1M.js rename to assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-8eUb1l9O.js index efbe1918d64e76a7a625b9db074239bcbb6aca81..ee166247716ca8876a7d24f7f112029b2ae50d43 100644 --- a/assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-Bq_0Y-1M.js +++ b/assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-8eUb1l9O.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-D8Nm21zW.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-_NYoebRU.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-Ccg-E6bm.js b/assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-7OtTanLQ.js similarity index 85% rename from assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-Ccg-E6bm.js rename to assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-7OtTanLQ.js index 86434b677728face6e8c6b07cfa7faf1fc1e507b..332c412d53ba9d5bd6052aa98a3a9e5b67f9d01e 100644 --- a/assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-Ccg-E6bm.js +++ b/assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-7OtTanLQ.js @@ -1 +1 @@ -import{_ as a}from"./PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js";import{d as s,q as l,bw as c,c as t,o,b as d,m as u,A as m,u as p,a as v,z as _,bx as f}from"./index-D8Nm21zW.js";const x={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":""},I=s({__name:"ProviderSettingsLayout",props:{providerName:null,providerIcon:null,providerIconColor:null,onBack:{type:Function}},setup(e){const{t:r}=l();return(n,b)=>{const i=c("motion");return o(),t(f,null,[d(a,{title:e.providerName,subtitle:p(r)("settings.pages.providers.title")},null,8,["title","subtitle"]),u(n.$slots,"default"),m((o(),t("div",x,[v("div",{text:"60",class:_(e.providerIcon||e.providerIconColor)},null,2)])),[[i]])],64)}}});export{I as _}; +import{_ as a}from"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js";import{d as s,q as l,bw as c,c as t,o,b as d,m as u,A as m,u as p,a as v,z as _,bx as f}from"./index-_NYoebRU.js";const x={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":""},I=s({__name:"ProviderSettingsLayout",props:{providerName:null,providerIcon:null,providerIconColor:null,onBack:{type:Function}},setup(e){const{t:r}=l();return(n,b)=>{const i=c("motion");return o(),t(f,null,[d(a,{title:e.providerName,subtitle:p(r)("settings.pages.providers.title")},null,8,["title","subtitle"]),u(n.$slots,"default"),m((o(),t("div",x,[v("div",{text:"60",class:_(e.providerIcon||e.providerIconColor)},null,2)])),[[i]])],64)}}});export{I as _}; diff --git a/assets/RadioCardDetailManySelect-6Dh1XQsR.js b/assets/RadioCardDetailManySelect-CC_vBTye.js similarity index 96% rename from assets/RadioCardDetailManySelect-6Dh1XQsR.js rename to assets/RadioCardDetailManySelect-CC_vBTye.js index 47fccd7b4f29b7b4bdd3ab2d11b137edeb867f14..70ab11a42dea9095fc622bbfa4c3a6559f946f43 100644 --- a/assets/RadioCardDetailManySelect-6Dh1XQsR.js +++ b/assets/RadioCardDetailManySelect-CC_vBTye.js @@ -1 +1 @@ -import{d as g,bI as f,bJ 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,bM as k,bn as C,h as S,bE as T,bx as z,by as D,x as E}from"./index-D8Nm21zW.js";import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import{_ as N}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-CL9MLblt.js";import{_ as P}from"./Input.vue_vue_type_script_setup_true_lang-DacRzqGb.js";const U=["checked","name","value"],q={class:"relative mr-3 mt-0.5 flex-shrink-0"},L={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"},Q=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,U),[[B,a.value]]),t("div",q,[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",L,[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,[$(P,{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))}}),G=C(Q,[["__scopeId","data-v-c9195151"]]),H=["checked","name","value"],K={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,H),[[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",K,[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))}}),ue=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(G,{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)])])]))}}),ce=C(oe,[["__scopeId","data-v-0c2329bf"]]);export{ce as R,ue as a}; +import{d as g,bI as f,bJ 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,bM as k,bn as C,h as S,bE as T,bx as z,by as D,x as E}from"./index-_NYoebRU.js";import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import{_ as N}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-Cx39i7VD.js";import{_ as P}from"./Input.vue_vue_type_script_setup_true_lang-DXXJ9lLc.js";const U=["checked","name","value"],q={class:"relative mr-3 mt-0.5 flex-shrink-0"},L={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"},Q=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,U),[[B,a.value]]),t("div",q,[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",L,[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,[$(P,{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))}}),G=C(Q,[["__scopeId","data-v-c9195151"]]),H=["checked","name","value"],K={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,H),[[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",K,[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))}}),ue=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(G,{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)])])]))}}),ce=C(oe,[["__scopeId","data-v-0c2329bf"]]);export{ce as R,ue as a}; diff --git a/assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-Cscdqs1L.js b/assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-C9WOvHCP.js similarity index 95% rename from assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-Cscdqs1L.js rename to assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-C9WOvHCP.js index c07645d52c4854168964ffaba69057c468cc8485..9e2a2226a06bb4c58e44c4f3c0618bcf8147f6b0 100644 --- a/assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-Cscdqs1L.js +++ b/assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-C9WOvHCP.js @@ -1 +1 @@ -import{d as B,q as N,bw as ee,c as b,o as f,b as I,m as T,A as O,u as l,a,z as H,bx as q,g as u,w as K,H as Q,D as S,C as R,bE as F,bH as te,by as oe,bG as ae,s as le,h as C,l as se,x as re,y as M,bU as A,bV as G,bQ as ie}from"./index-D8Nm21zW.js";import{a as ne,_ as ue}from"./TestDummyMarker.vue_vue_type_script_setup_true_lang-CG5q9Jpo.js";import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import{u as de,g as ve}from"./speech-B27BwGQ-.js";import{u as ce}from"./providers-DUDq6kdm.js";import{_ as pe,a as me}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-Blzu2N2U.js";import{_ as ge}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DFTTO3aS.js";import{_ as fe,a as be}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-Bq_0Y-1M.js";import{_ as _e}from"./PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js";const he={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":""},xe=B({__name:"ProviderSettingsLayout2",props:{providerName:null,providerIcon:null,providerIconColor:null,onBack:{type:Function}},setup(_){const{t:o}=N();return(y,d)=>{const v=ee("motion");return f(),b(q,null,[I(_e,{title:_.providerName,subtitle:l(o)("settings.pages.providers.title")},null,8,["title","subtitle"]),T(y.$slots,"default"),O((f(),b("div",he,[a("div",{text:"60",class:H(_.providerIcon||_.providerIconColor)},null,2)])),[[v]])],64)}}}),ye={"w-full":"","rounded-xl":""},ke={class:"mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400","w-full":""},Se={class:"inline-flex items-center gap-4"},Ue={flex:"~ col gap-4"},we=["placeholder"],Ie=["placeholder"],Ve={flex:"~ col gap-6"},$e={grid:"~ cols-2 gap-4"},Te={class:"flex items-center gap-1 text-sm font-medium"},Le={class:"text-xs text-neutral-500 dark:text-neutral-400"},Re=["value"],Pe={flex:"~ row","gap-4":""},Ce=["disabled"],Me={flex:"~ row","items-center":"","gap-2":""},Oe={flex:"~ row","items-center":"","gap-2":""},ze={key:2,class:"mt-2 text-sm text-red-500"},Ke={key:3,class:"mt-2 text-sm text-red-500"},Be={key:4,class:"mt-2 text-sm text-red-500"},Ne=["src"],tt=B({__name:"SpeechPlayground",props:{defaultText:null,availableVoices:null,generateSpeech:{type:Function},apiKeyConfigured:{type:Boolean}},setup(_,{expose:o}){const y=_,{t:d}=N(),v=u(y.defaultText||"Hello! This is a test of the voice synthesis."),U=u(!1),t=u(""),p=u(""),g=u(null),i=u(!1),h=u(""),m=u("");K(()=>y.availableVoices,n=>{var r;n.length>0&&!m.value&&(m.value=((r=n[0])==null?void 0:r.id)||"")},{immediate:!0});async function x(){if(!(!v.value.trim()&&!i.value||i.value&&!h.value.trim()||!m.value)){U.value=!0,p.value="";try{t.value&&V();const n=i.value?h.value:v.value,r=await y.generateSpeech(n,m.value,i.value);t.value=URL.createObjectURL(new Blob([r])),setTimeout(()=>{g.value&&g.value.play()},100)}catch(n){console.error("Error generating speech:",n),p.value=n instanceof Error?n.message:"An unknown error occurred"}finally{U.value=!1}}}function V(){g.value&&(g.value.pause(),g.value.currentTime=0),t.value&&(URL.revokeObjectURL(t.value),t.value="")}return Q(()=>{t.value&&URL.revokeObjectURL(t.value)}),o({testText:v,ssmlText:h,useSSML:i,selectedVoice:m,isGenerating:U,audioUrl:t,errorMessage:p,audioPlayer:g,generateTestSpeech:x,stopTestAudio:V}),(n,r)=>(f(),b("div",ye,[a("h2",ke,[a("div",Se,[I(l(ne)),a("div",null,S(l(d)("settings.pages.providers.provider.elevenlabs.playground.title")),1)])]),a("div",Ue,[I(l(ue),{modelValue:i.value,"onUpdate:modelValue":r[0]||(r[0]=c=>i.value=c),label:l(d)("settings.pages.modules.speech.sections.section.voice-settings.use-ssml.label"),description:l(d)("settings.pages.modules.speech.sections.section.voice-settings.use-ssml.description")},null,8,["modelValue","label","description"]),i.value?O((f(),b("textarea",{key:1,"onUpdate:modelValue":r[2]||(r[2]=c=>h.value=c),placeholder:l(d)("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,Ie)),[[F,h.value]]):O((f(),b("textarea",{key:0,"onUpdate:modelValue":r[1]||(r[1]=c=>v.value=c),placeholder:l(d)("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,we)),[[F,v.value]]),a("div",Ve,[a("label",$e,[a("div",null,[a("div",Te,S(l(d)("settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.label")),1),a("div",Le,S(l(d)("settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.description")),1)]),O(a("select",{"onUpdate:modelValue":r[3]||(r[3]=c=>m.value=c),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":""},[(f(!0),b(q,null,oe(_.availableVoices,c=>(f(),b("option",{key:c.id,value:c.id},S(c.name),9,Re))),128))],512),[[te,m.value]])])]),a("div",Pe,[a("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:U.value||!v.value.trim()&&!i.value||i.value&&!h.value.trim()||!m.value||!_.apiKeyConfigured,class:H({"opacity-50 cursor-not-allowed":U.value||!v.value.trim()&&!i.value||i.value&&!h.value.trim()||!m.value||!_.apiKeyConfigured}),bg:"neutral-700 dark:neutral-300",onClick:x},[a("div",Me,[r[4]||(r[4]=a("div",{"i-solar:play-circle-bold-duotone":""},null,-1)),a("span",null,S(U.value?l(d)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating"):l(d)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.label")),1)])],10,Ce),t.value?(f(),b("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:V},[a("div",Oe,[r[5]||(r[5]=a("div",{"i-solar:stop-circle-bold-duotone":""},null,-1)),a("span",null,S(l(d)("settings.pages.modules.speech.sections.section.playground.buttons.stop.label")),1)])])):R("",!0)]),_.apiKeyConfigured?R("",!0):(f(),b("div",ze,S(l(d)("settings.pages.providers.provider.elevenlabs.playground.validation.error-missing-api-key")),1)),m.value?R("",!0):(f(),b("div",Ke,S(l(d)("settings.pages.modules.speech.sections.section.playground.select-voice.required")),1)),p.value?(f(),b("div",Be,S(p.value),1)):R("",!0),t.value?(f(),b("audio",{key:5,ref_key:"audioPlayer",ref:g,src:t.value,controls:"",class:"mt-2 w-full"},null,8,Ne)):R("",!0)]),T(n.$slots,"default")]))}}),je={flex:"~ col md:row gap-6"},De={flex:"~ col gap-6"},Ee={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},Fe={flex:"~ col gap-4"},Ae={flex:"~ col gap-6",class:"w-full md:w-[60%]"},Ge={"w-full":"","rounded-xl":""},ot=B({__name:"SpeechProviderSettings",props:{providerId:null,defaultModel:null,additionalSettings:null},setup(_){const o=_,{t:y}=N(),d=ae(),v=ce(),U=de(),{providers:t}=le(v),p=C(()=>v.getProviderMetadata(o.providerId)),g=C({get:()=>{var e;return((e=t.value[o.providerId])==null?void 0:e.apiKey)||""},set:e=>{t.value[o.providerId]||(t.value[o.providerId]={}),t.value[o.providerId].apiKey=e}}),i=C({get:()=>{var e,s,k;return((e=t.value[o.providerId])==null?void 0:e.baseUrl)||((k=(s=p.value)==null?void 0:s.defaultOptions)==null?void 0:k.baseUrl)||""},set:e=>{t.value[o.providerId]||(t.value[o.providerId]={}),t.value[o.providerId].baseUrl=e}}),h=u("Hello! This is a test of voice synthesis."),m=u(!1),x=u(""),V=u(""),n=u(null),r=u(!1),c=u(""),j=u(""),w=u({});function J(){var e;(e=t.value[o.providerId])!=null&&e.voiceSettings?w.value={...t.value[o.providerId].voiceSettings}:w.value={pitch:0,speed:1,volume:0,...o.additionalSettings}}se(()=>{var e,s,k,$;v.initializeProvider(o.providerId),g.value=((e=t.value[o.providerId])==null?void 0:e.apiKey)||"",i.value=((s=t.value[o.providerId])==null?void 0:s.baseUrl)||(($=(k=p.value)==null?void 0:k.defaultOptions)==null?void 0:$.baseUrl)||"",J(),v.configuredProviders[o.providerId]&&U.loadVoicesForProvider(o.providerId)});const z=ie(()=>{var e,s;t.value[o.providerId]={...t.value[o.providerId],apiKey:g.value,baseUrl:i.value||((s=(e=p.value)==null?void 0:e.defaultOptions)==null?void 0:s.baseUrl)||"",voiceSettings:{...w.value}}},1e3);K([g,i],z),K(w,z,{deep:!0});async function W(){if(!h.value.trim()&&!r.value||r.value&&!c.value.trim())return;const e=v.getProviderInstance(o.providerId);if(!e){console.error("Failed to initialize speech provider");return}if(!j.value){console.error("No active speech voice selected");return}m.value=!0,V.value="";try{x.value&&D();const s=o.defaultModel||"default",k=r.value?c.value:h.value,$=await ve({...e.speech(s,{voiceSettings:w.value}),input:k,voice:j.value});x.value=URL.createObjectURL(new Blob([$])),setTimeout(()=>{n.value&&n.value.play()},100)}catch(s){console.error("Error generating speech:",s),V.value=s instanceof Error?s.message:"An unknown error occurred"}finally{m.value=!1}}function D(){n.value&&(n.value.pause(),n.value.currentTime=0),x.value&&(URL.revokeObjectURL(x.value),x.value="")}Q(()=>{x.value&&URL.revokeObjectURL(x.value)});function X(){var e,s;w.value={...((s=(e=p.value)==null?void 0:e.defaultOptions)==null?void 0:s.voiceSettings)||{}},z()}function Y(e,s){w.value[e]=s}const E=C(()=>({voiceSettings:w.value,updateVoiceSettings:Y,isGenerating:m.value,testText:h.value,useSSML:r.value,ssmlText:c.value,generateTestSpeech:W,stopTestAudio:D,audioUrl:x.value,audioPlayer:n.value,errorMessage:V.value}));return(e,s)=>{var k,$;return f(),re(xe,{"provider-name":(k=p.value)==null?void 0:k.localizedName,"provider-icon":($=p.value)==null?void 0:$.icon,"on-back":()=>l(d).back()},{default:M(()=>[a("div",je,[I(l(fe),{class:"w-full md:w-[40%]"},{default:M(()=>[I(l(be),{title:l(y)("settings.pages.providers.common.section.basic.title"),description:l(y)("settings.pages.providers.common.section.basic.description"),"on-reset":X},{default:M(()=>{var L;return[I(l(ge),{modelValue:g.value,"onUpdate:modelValue":s[0]||(s[0]=P=>g.value=P),"provider-name":(L=p.value)==null?void 0:L.localizedName,placeholder:"sk-"},null,8,["modelValue","provider-name"]),T(e.$slots,"basic-settings")]}),_:3},8,["title","description"]),a("div",De,[a("h2",Ee,S(l(y)("settings.pages.providers.common.section.voice.title")),1),a("div",Fe,[T(e.$slots,"voice-settings",A(G(E.value)))])]),I(l(pe),{title:l(y)("settings.pages.providers.common.section.advanced.title")},{default:M(()=>{var L,P;return[I(l(me),{modelValue:i.value,"onUpdate:modelValue":s[1]||(s[1]=Z=>i.value=Z),placeholder:((P=(L=p.value)==null?void 0:L.defaultOptions)==null?void 0:P.baseUrl)||"",required:""},null,8,["modelValue","placeholder"]),T(e.$slots,"advanced-settings")]}),_:3},8,["title"])]),_:3}),a("div",Ae,[a("div",Ge,[T(e.$slots,"playground",A(G(E.value)))])])])]),_:3},8,["provider-name","provider-icon","on-back"])}}});export{tt as _,ot as a}; +import{d as B,q as N,bw as ee,c as b,o as f,b as I,m as T,A as O,u as l,a,z as H,bx as q,g as u,w as K,H as Q,D as S,C as R,bE as F,bH as te,by as oe,bG as ae,s as le,h as C,l as se,x as re,y as M,bU as A,bV as G,bQ as ie}from"./index-_NYoebRU.js";import{a as ne,_ as ue}from"./TestDummyMarker.vue_vue_type_script_setup_true_lang-7UKgQXIZ.js";import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import{u as de,g as ve}from"./speech-DTX8fpM-.js";import{u as ce}from"./providers-Bbs_o2SI.js";import{_ as pe,a as me}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BBijRr4z.js";import{_ as ge}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DEakgvr1.js";import{_ as fe,a as be}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-8eUb1l9O.js";import{_ as _e}from"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js";const he={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":""},xe=B({__name:"ProviderSettingsLayout2",props:{providerName:null,providerIcon:null,providerIconColor:null,onBack:{type:Function}},setup(_){const{t:o}=N();return(y,d)=>{const v=ee("motion");return f(),b(q,null,[I(_e,{title:_.providerName,subtitle:l(o)("settings.pages.providers.title")},null,8,["title","subtitle"]),T(y.$slots,"default"),O((f(),b("div",he,[a("div",{text:"60",class:H(_.providerIcon||_.providerIconColor)},null,2)])),[[v]])],64)}}}),ye={"w-full":"","rounded-xl":""},ke={class:"mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400","w-full":""},Se={class:"inline-flex items-center gap-4"},Ue={flex:"~ col gap-4"},we=["placeholder"],Ie=["placeholder"],Ve={flex:"~ col gap-6"},$e={grid:"~ cols-2 gap-4"},Te={class:"flex items-center gap-1 text-sm font-medium"},Le={class:"text-xs text-neutral-500 dark:text-neutral-400"},Re=["value"],Pe={flex:"~ row","gap-4":""},Ce=["disabled"],Me={flex:"~ row","items-center":"","gap-2":""},Oe={flex:"~ row","items-center":"","gap-2":""},ze={key:2,class:"mt-2 text-sm text-red-500"},Ke={key:3,class:"mt-2 text-sm text-red-500"},Be={key:4,class:"mt-2 text-sm text-red-500"},Ne=["src"],tt=B({__name:"SpeechPlayground",props:{defaultText:null,availableVoices:null,generateSpeech:{type:Function},apiKeyConfigured:{type:Boolean}},setup(_,{expose:o}){const y=_,{t:d}=N(),v=u(y.defaultText||"Hello! This is a test of the voice synthesis."),U=u(!1),t=u(""),p=u(""),g=u(null),i=u(!1),h=u(""),m=u("");K(()=>y.availableVoices,n=>{var r;n.length>0&&!m.value&&(m.value=((r=n[0])==null?void 0:r.id)||"")},{immediate:!0});async function x(){if(!(!v.value.trim()&&!i.value||i.value&&!h.value.trim()||!m.value)){U.value=!0,p.value="";try{t.value&&V();const n=i.value?h.value:v.value,r=await y.generateSpeech(n,m.value,i.value);t.value=URL.createObjectURL(new Blob([r])),setTimeout(()=>{g.value&&g.value.play()},100)}catch(n){console.error("Error generating speech:",n),p.value=n instanceof Error?n.message:"An unknown error occurred"}finally{U.value=!1}}}function V(){g.value&&(g.value.pause(),g.value.currentTime=0),t.value&&(URL.revokeObjectURL(t.value),t.value="")}return Q(()=>{t.value&&URL.revokeObjectURL(t.value)}),o({testText:v,ssmlText:h,useSSML:i,selectedVoice:m,isGenerating:U,audioUrl:t,errorMessage:p,audioPlayer:g,generateTestSpeech:x,stopTestAudio:V}),(n,r)=>(f(),b("div",ye,[a("h2",ke,[a("div",Se,[I(l(ne)),a("div",null,S(l(d)("settings.pages.providers.provider.elevenlabs.playground.title")),1)])]),a("div",Ue,[I(l(ue),{modelValue:i.value,"onUpdate:modelValue":r[0]||(r[0]=c=>i.value=c),label:l(d)("settings.pages.modules.speech.sections.section.voice-settings.use-ssml.label"),description:l(d)("settings.pages.modules.speech.sections.section.voice-settings.use-ssml.description")},null,8,["modelValue","label","description"]),i.value?O((f(),b("textarea",{key:1,"onUpdate:modelValue":r[2]||(r[2]=c=>h.value=c),placeholder:l(d)("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,Ie)),[[F,h.value]]):O((f(),b("textarea",{key:0,"onUpdate:modelValue":r[1]||(r[1]=c=>v.value=c),placeholder:l(d)("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,we)),[[F,v.value]]),a("div",Ve,[a("label",$e,[a("div",null,[a("div",Te,S(l(d)("settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.label")),1),a("div",Le,S(l(d)("settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.description")),1)]),O(a("select",{"onUpdate:modelValue":r[3]||(r[3]=c=>m.value=c),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":""},[(f(!0),b(q,null,oe(_.availableVoices,c=>(f(),b("option",{key:c.id,value:c.id},S(c.name),9,Re))),128))],512),[[te,m.value]])])]),a("div",Pe,[a("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:U.value||!v.value.trim()&&!i.value||i.value&&!h.value.trim()||!m.value||!_.apiKeyConfigured,class:H({"opacity-50 cursor-not-allowed":U.value||!v.value.trim()&&!i.value||i.value&&!h.value.trim()||!m.value||!_.apiKeyConfigured}),bg:"neutral-700 dark:neutral-300",onClick:x},[a("div",Me,[r[4]||(r[4]=a("div",{"i-solar:play-circle-bold-duotone":""},null,-1)),a("span",null,S(U.value?l(d)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating"):l(d)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.label")),1)])],10,Ce),t.value?(f(),b("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:V},[a("div",Oe,[r[5]||(r[5]=a("div",{"i-solar:stop-circle-bold-duotone":""},null,-1)),a("span",null,S(l(d)("settings.pages.modules.speech.sections.section.playground.buttons.stop.label")),1)])])):R("",!0)]),_.apiKeyConfigured?R("",!0):(f(),b("div",ze,S(l(d)("settings.pages.providers.provider.elevenlabs.playground.validation.error-missing-api-key")),1)),m.value?R("",!0):(f(),b("div",Ke,S(l(d)("settings.pages.modules.speech.sections.section.playground.select-voice.required")),1)),p.value?(f(),b("div",Be,S(p.value),1)):R("",!0),t.value?(f(),b("audio",{key:5,ref_key:"audioPlayer",ref:g,src:t.value,controls:"",class:"mt-2 w-full"},null,8,Ne)):R("",!0)]),T(n.$slots,"default")]))}}),je={flex:"~ col md:row gap-6"},De={flex:"~ col gap-6"},Ee={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},Fe={flex:"~ col gap-4"},Ae={flex:"~ col gap-6",class:"w-full md:w-[60%]"},Ge={"w-full":"","rounded-xl":""},ot=B({__name:"SpeechProviderSettings",props:{providerId:null,defaultModel:null,additionalSettings:null},setup(_){const o=_,{t:y}=N(),d=ae(),v=ce(),U=de(),{providers:t}=le(v),p=C(()=>v.getProviderMetadata(o.providerId)),g=C({get:()=>{var e;return((e=t.value[o.providerId])==null?void 0:e.apiKey)||""},set:e=>{t.value[o.providerId]||(t.value[o.providerId]={}),t.value[o.providerId].apiKey=e}}),i=C({get:()=>{var e,s,k;return((e=t.value[o.providerId])==null?void 0:e.baseUrl)||((k=(s=p.value)==null?void 0:s.defaultOptions)==null?void 0:k.baseUrl)||""},set:e=>{t.value[o.providerId]||(t.value[o.providerId]={}),t.value[o.providerId].baseUrl=e}}),h=u("Hello! This is a test of voice synthesis."),m=u(!1),x=u(""),V=u(""),n=u(null),r=u(!1),c=u(""),j=u(""),w=u({});function J(){var e;(e=t.value[o.providerId])!=null&&e.voiceSettings?w.value={...t.value[o.providerId].voiceSettings}:w.value={pitch:0,speed:1,volume:0,...o.additionalSettings}}se(()=>{var e,s,k,$;v.initializeProvider(o.providerId),g.value=((e=t.value[o.providerId])==null?void 0:e.apiKey)||"",i.value=((s=t.value[o.providerId])==null?void 0:s.baseUrl)||(($=(k=p.value)==null?void 0:k.defaultOptions)==null?void 0:$.baseUrl)||"",J(),v.configuredProviders[o.providerId]&&U.loadVoicesForProvider(o.providerId)});const z=ie(()=>{var e,s;t.value[o.providerId]={...t.value[o.providerId],apiKey:g.value,baseUrl:i.value||((s=(e=p.value)==null?void 0:e.defaultOptions)==null?void 0:s.baseUrl)||"",voiceSettings:{...w.value}}},1e3);K([g,i],z),K(w,z,{deep:!0});async function W(){if(!h.value.trim()&&!r.value||r.value&&!c.value.trim())return;const e=v.getProviderInstance(o.providerId);if(!e){console.error("Failed to initialize speech provider");return}if(!j.value){console.error("No active speech voice selected");return}m.value=!0,V.value="";try{x.value&&D();const s=o.defaultModel||"default",k=r.value?c.value:h.value,$=await ve({...e.speech(s,{voiceSettings:w.value}),input:k,voice:j.value});x.value=URL.createObjectURL(new Blob([$])),setTimeout(()=>{n.value&&n.value.play()},100)}catch(s){console.error("Error generating speech:",s),V.value=s instanceof Error?s.message:"An unknown error occurred"}finally{m.value=!1}}function D(){n.value&&(n.value.pause(),n.value.currentTime=0),x.value&&(URL.revokeObjectURL(x.value),x.value="")}Q(()=>{x.value&&URL.revokeObjectURL(x.value)});function X(){var e,s;w.value={...((s=(e=p.value)==null?void 0:e.defaultOptions)==null?void 0:s.voiceSettings)||{}},z()}function Y(e,s){w.value[e]=s}const E=C(()=>({voiceSettings:w.value,updateVoiceSettings:Y,isGenerating:m.value,testText:h.value,useSSML:r.value,ssmlText:c.value,generateTestSpeech:W,stopTestAudio:D,audioUrl:x.value,audioPlayer:n.value,errorMessage:V.value}));return(e,s)=>{var k,$;return f(),re(xe,{"provider-name":(k=p.value)==null?void 0:k.localizedName,"provider-icon":($=p.value)==null?void 0:$.icon,"on-back":()=>l(d).back()},{default:M(()=>[a("div",je,[I(l(fe),{class:"w-full md:w-[40%]"},{default:M(()=>[I(l(be),{title:l(y)("settings.pages.providers.common.section.basic.title"),description:l(y)("settings.pages.providers.common.section.basic.description"),"on-reset":X},{default:M(()=>{var L;return[I(l(ge),{modelValue:g.value,"onUpdate:modelValue":s[0]||(s[0]=P=>g.value=P),"provider-name":(L=p.value)==null?void 0:L.localizedName,placeholder:"sk-"},null,8,["modelValue","provider-name"]),T(e.$slots,"basic-settings")]}),_:3},8,["title","description"]),a("div",De,[a("h2",Ee,S(l(y)("settings.pages.providers.common.section.voice.title")),1),a("div",Fe,[T(e.$slots,"voice-settings",A(G(E.value)))])]),I(l(pe),{title:l(y)("settings.pages.providers.common.section.advanced.title")},{default:M(()=>{var L,P;return[I(l(me),{modelValue:i.value,"onUpdate:modelValue":s[1]||(s[1]=Z=>i.value=Z),placeholder:((P=(L=p.value)==null?void 0:L.defaultOptions)==null?void 0:P.baseUrl)||"",required:""},null,8,["modelValue","placeholder"]),T(e.$slots,"advanced-settings")]}),_:3},8,["title"])]),_:3}),a("div",Ae,[a("div",Ge,[T(e.$slots,"playground",A(G(E.value)))])])])]),_:3},8,["provider-name","provider-icon","on-back"])}}});export{tt as _,ot as a}; diff --git a/assets/Stage-BMdJCq4V.css b/assets/Stage-BD8JBwgH.css similarity index 99% rename from assets/Stage-BMdJCq4V.css rename to assets/Stage-BD8JBwgH.css index cccb6ea05050dd21b51847a9bf93a475426c1ba7..ffe86684e782ee849a881a2fe9c8e2cef204f50a 100644 --- a/assets/Stage-BMdJCq4V.css +++ b/assets/Stage-BD8JBwgH.css @@ -1 +1 @@ -.form_input-range[data-v-6ca6d31c]{--height: 2em;min-height:var(--height);-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border-radius:4px;transition:background-color .2s ease;--thumb-width: 4px;--thumb-height: var(--height);--thumb-box-shadow: 0 0 0px #e6e6e6;--thumb-border: none;--thumb-border-radius: 999px;--thumb-background: oklch(80% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0));--thumb-background-hover: oklch(90% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0));--thumb-background-active: oklch(70% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0));--track-height: calc(var(--height) - var(--track-value-padding) * 2);--track-box-shadow: none;--track-border: solid 2px rgb(238, 238, 238);--track-border-radius: 6px;--track-background: rgb(238, 238, 238);--track-background-hover: rgb(238, 238, 238);--track-background-active: rgb(238, 238, 238);--track-value-background: rgb(255, 255, 255);--track-value-background-hover: rgb(255, 255, 255);--track-value-background-active: rgb(255, 255, 255);--track-value-padding: 2px}.dark .form_input-range[data-v-6ca6d31c]{--thumb-background: oklch(70% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0));--thumb-background-hover: oklch(90% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0));--thumb-background-active: oklch(80% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0));--track-border: solid 2px rgb(44, 44, 44);--track-background: rgb(44, 44, 44);--track-background-hover: rgb(44, 44, 44);--track-background-active: rgb(44, 44, 44);--track-value-background: rgb(164, 164, 164);--track-value-background-hover: rgb(164, 164, 164);--track-value-background-active: rgb(164, 164, 164)}.form_input-range.slider-progress[data-v-6ca6d31c]{--range: calc(var(--max) - var(--min));--ratio: calc((var(--value) - var(--min)) / var(--range));--sx: calc(.5 * 0em + var(--ratio) * (100% - 0em))}.form_input-range[data-v-6ca6d31c]:focus{outline:none}.form_input-range[data-v-6ca6d31c]::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:var(--thumb-width);height:var(--thumb-height);border-radius:var(--thumb-border-radius);background:var(--thumb-background);border:var(--thumb-border);box-shadow:var(--thumb-box-shadow);margin-top:calc(var(--track-height) * .5 - var(--thumb-height) * .5 - 2px);margin-left:calc(0 - var(--track-value-padding));cursor:col-resize;transition:background .2s ease-in-out,box-shadow .2s ease-in-out,border-color .2s ease-in-out,transform .2s ease-in-out}.form_input-range[data-v-6ca6d31c]::-webkit-slider-runnable-track{height:var(--track-height);border:var(--track-border);border-radius:var(--track-border-radius);background:var(--track-background);box-shadow:var(--track-box-shadow);position:relative;cursor:col-resize;transition:box-shadow .2s ease-in-out,border-color .2s ease-in-out}.form_input-range[data-v-6ca6d31c]::-webkit-slider-thumb:hover{background:var(--thumb-background-hover)}.form_input-range[data-v-6ca6d31c]:hover::-webkit-slider-runnable-track{background:var(--track-background-hover)}.form_input-range[data-v-6ca6d31c]::-webkit-slider-thumb:active{background:var(--thumb-background-active)}.form_input-range[data-v-6ca6d31c]:active::-webkit-slider-runnable-track{background:var(--track-background-active)}.form_input-range.slider-progress[data-v-6ca6d31c]::-webkit-slider-runnable-track{margin-right:calc(0 - var(--track-value-padding));background:linear-gradient(var(--track-value-background),var(--track-value-background)) 0 / var(--sx) 100% no-repeat,var(--track-background)}.form_input-range.slider-progress[data-v-6ca6d31c]:hover::-webkit-slider-runnable-track{background:linear-gradient(var(--track-value-background-hover),var(--track-value-background-hover)) 0 / var(--sx) 100% no-repeat,var(--track-background-hover)}.form_input-range.slider-progress[data-v-6ca6d31c]:active::-webkit-slider-runnable-track{background:linear-gradient(var(--track-value-background-active),var(--track-value-background-active)) 0 / var(--sx) 100% no-repeat,var(--track-background-active)}.form_input-range[data-v-6ca6d31c]::-moz-range-thumb{width:var(--thumb-width);height:var(--thumb-height);border-radius:var(--thumb-border-radius);background:var(--thumb-background);border:none;box-shadow:var(--thumb-box-shadow);cursor:col-resize;margin-left:calc(0 - var(--track-value-padding))}.form_input-range[data-v-6ca6d31c]::-moz-range-track{height:var(--track-height);border:var(--track-border);border-radius:var(--track-border-radius);background:var(--track-background);box-shadow:var(--track-box-shadow);cursor:col-resize;width:calc(100% - var(--track-value-padding) * 2)}.form_input-range[data-v-6ca6d31c]::-moz-range-thumb:hover{background:var(--thumb-background-hover)}.form_input-range[data-v-6ca6d31c]:hover::-moz-range-track{background:var(--track-background-hover)}.form_input-range[data-v-6ca6d31c]::-moz-range-thumb:active{background:var(--thumb-background-active)}.form_input-range[data-v-6ca6d31c]:active::-moz-range-track{background:var(--track-background-active)}.form_input-range.slider-progress[data-v-6ca6d31c]::-moz-range-track{background:linear-gradient(var(--track-value-background),var(--track-value-background)) 0 / var(--sx) 100% no-repeat,var(--track-background)}.form_input-range.slider-progress[data-v-6ca6d31c]:hover::-moz-range-track{background:linear-gradient(var(--track-value-background-hover),var(--track-value-background-hover)) 0 / var(--sx) 100% no-repeat,var(--track-background-hover)}.form_input-range.slider-progress[data-v-6ca6d31c]:active::-moz-range-track{background:linear-gradient(var(--track-value-background-active),var(--track-value-background-active)) 0 / var(--sx) 100% no-repeat,var(--track-background-active)}.form_input-range[data-v-6ca6d31c]::-ms-fill-upper{background:transparent;border-color:transparent}.form_input-range[data-v-6ca6d31c]::-ms-fill-lower{background:transparent;border-color:transparent}.form_input-range[data-v-6ca6d31c]::-ms-thumb{width:var(--thumb-width);height:var(--thumb-height);border-radius:var(--thumb-border-radius);background:var(--thumb-background);border:var(--thumb-border);box-shadow:var(--thumb-box-shadow);margin-top:0;margin-left:calc(0 - var(--track-value-padding));box-sizing:border-box;cursor:col-resize}.form_input-range[data-v-6ca6d31c]::-ms-track{height:var(--track-height);border-radius:var(--track-border-radius);background:var(--track-background);border:var(--track-border);box-shadow:var(--track-box-shadow);box-sizing:border-box;cursor:col-resize}.form_input-range[data-v-6ca6d31c]::-ms-thumb:hover{background:var(--thumb-background-hover)}.form_input-range[data-v-6ca6d31c]:hover::-ms-track{background:var(--track-background-hover)}.form_input-range[data-v-6ca6d31c]::-ms-thumb:active{background:var(--thumb-background-active)}.form_input-range[data-v-6ca6d31c]:active::-ms-track{background:var(--track-background-active)}.form_input-range.slider-progress[data-v-6ca6d31c]::-ms-fill-lower{height:var(--track-height);border-radius:var(--track-border-radius) 0 0 var(--track-border-radius);margin:0;background:var(--track-value-background);border:none;border-right-width:0;margin-left:calc(var(--track-value-padding));margin-right:calc(0 - var(--track-value-padding))}.form_input-range.slider-progress[data-v-6ca6d31c]:hover::-ms-fill-lower{background:var(--track-value-background-hover)}.form_input-range.slider-progress[data-v-6ca6d31c]:active::-ms-fill-lower{background:var(--track-value-background-active)}.form_radio-card-detail[data-v-c9195151]{position:relative;overflow:hidden}.form_radio-card-detail[data-v-c9195151]:before{pointer-events:none;--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;width:25%;height:100%;transition:all .35s ease-in-out;-webkit-mask-image:linear-gradient(120deg,#fff);mask-image:linear-gradient(120deg,#fff);opacity:0}.dark .form_radio-card-detail[data-v-c9195151]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position)}.form_radio-card-detail[data-v-c9195151]:hover:before,.form_radio-card-detail._hover[data-v-c9195151]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:85%;opacity:1}.dark .form_radio-card-detail[data-v-c9195151]:hover:before,.dark .form_radio-card-detail._hover[data-v-c9195151]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.form_radio-card-detail-active[data-v-c9195151]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:85%;opacity:.5}.dark .form_radio-card-detail-active[data-v-c9195151]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.form_radio-card-simple[data-v-dd41bc0b]{position:relative;overflow:hidden}.form_radio-card-simple[data-v-dd41bc0b]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;width:25%;height:100%;transition:all .35s ease-in-out;-webkit-mask-image:linear-gradient(120deg,#fff);mask-image:linear-gradient(120deg,#fff);opacity:0}.dark .form_radio-card-simple[data-v-dd41bc0b]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position)}.form_radio-card-simple[data-v-dd41bc0b]:hover:before,.form_radio-card-simple._hover[data-v-dd41bc0b]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:85%;opacity:1}.dark .form_radio-card-simple[data-v-dd41bc0b]:hover:before,.dark .form_radio-card-simple._hover[data-v-dd41bc0b]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.form_radio-card-simple-active[data-v-dd41bc0b]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:85%;opacity:.5}.dark .form_radio-card-simple-active[data-v-dd41bc0b]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}input[type=search][data-v-0c2329bf]::-webkit-search-cancel-button{display:none}.form_voice-card[data-v-dbab964e]{position:relative;overflow:hidden;display:flex;flex-direction:column}.form_voice-card[data-v-dbab964e]:before{pointer-events:none;--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;width:25%;height:100%;transition:all .35s ease-in-out;-webkit-mask-image:linear-gradient(120deg,#fff);mask-image:linear-gradient(120deg,#fff);opacity:0}.dark .form_voice-card[data-v-dbab964e]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position)}.form_voice-card[data-v-dbab964e]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:85%;opacity:1}.dark .form_voice-card[data-v-dbab964e]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}input[type=search][data-v-070104a7]::-webkit-search-cancel-button{display:none}.voice-card[data-v-070104a7]{position:relative;overflow:hidden;display:flex;flex-direction:column}.voice-card[data-v-070104a7]:before{pointer-events:none;--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;width:25%;height:100%;transition:all .35s ease-in-out;-webkit-mask-image:linear-gradient(120deg,#fff);mask-image:linear-gradient(120deg,#fff);opacity:0}.dark .voice-card[data-v-070104a7]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position)}.voice-card[data-v-070104a7]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:85%;opacity:1}.dark .voice-card[data-v-070104a7]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.volumed[data-v-568551bc]{transform-style:preserve-3d;width:fit-content;height:fit-content}.test-dummy-flat[data-v-b4ef37ac]{display:inline-block;position:relative}.test-dummy-flat .marker[data-v-b4ef37ac]{position:absolute;top:0;right:0;bottom:0;left:0;background:conic-gradient(#ffeb3b,#ffeb3b 90deg,#000 90deg,#000 180deg,#ffeb3b 180deg,#ffeb3b 270deg,#000 270deg,#000 360deg);border-radius:50%;box-shadow:0 4px 12px #b9b9b933}.dark .test-dummy-flat .marker[data-v-b4ef37ac]{box-shadow:0 4px 12px #0003}.menu-icon-item[data-v-656e0116]{position:relative;overflow:hidden}.menu-icon-item[data-v-656e0116]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1;width:25%;height:100%;-webkit-mask-image:linear-gradient(120deg,white 30%,transparent 50%);mask-image:linear-gradient(120deg,white 30%,transparent 50%);opacity:0;transition:all .4s ease-in-out}.dark .menu-icon-item[data-v-656e0116]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position)}.menu-icon-item[data-v-656e0116]:hover:before,.menu-icon-item._hover[data-v-656e0116]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:85%;opacity:1}.dark .menu-icon-item[data-v-656e0116]:hover:before,.dark .menu-icon-item._hover[data-v-656e0116]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.menu-icon-item[data-v-656e0116]:after{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229 / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.6;position:absolute;top:0;right:0;bottom:0;left:0;z-index:-2;width:100%;height:100%;background-size:10px 10px;content:"";-webkit-mask-image:linear-gradient(165deg,white 30%,transparent 50%);mask-image:linear-gradient(165deg,white 30%,transparent 50%);transition:all .4s ease-in-out}.menu-icon-item[data-v-656e0116]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.5}.dark .menu-icon-item[data-v-656e0116]:after{background-image:radial-gradient(circle at 1px 1px,rgb(64 64 64 / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.25}.dark .menu-icon-item[data-v-656e0116]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(90% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0) / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.2}.menu-icon-item-icon[data-v-656e0116]{opacity:.5}.menu-icon-item:hover .menu-icon-item-title[data-v-656e0116],.menu-icon-item._hover .menu-icon-item-title[data-v-656e0116]{--un-text-opacity:1;color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.menu-icon-item:hover .menu-icon-item-description[data-v-656e0116],.menu-icon-item._hover .menu-icon-item-description[data-v-656e0116]{--un-text-opacity:1;color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity));opacity:.8}.menu-icon-item:hover .menu-icon-item-icon[data-v-656e0116],.menu-icon-item._hover .menu-icon-item-icon[data-v-656e0116]{--un-text-opacity:1;color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity));scale:1.2}.dark .menu-icon-item:hover .menu-icon-item-title[data-v-656e0116],.dark .menu-icon-item._hover .menu-icon-item-title[data-v-656e0116]{--un-text-opacity:1;color:oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.dark .menu-icon-item:hover .menu-icon-item-description[data-v-656e0116],.dark .menu-icon-item._hover .menu-icon-item-description[data-v-656e0116]{--un-text-opacity:1;color:oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity));opacity:.8}.dark .menu-icon-item:hover .menu-icon-item-icon[data-v-656e0116],.dark .menu-icon-item._hover .menu-icon-item-icon[data-v-656e0116]{--un-text-opacity:1;color:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.menu-icon-status-item[data-v-6e5b5c9c]{position:relative;overflow:hidden}.menu-icon-status-item[data-v-6e5b5c9c]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;width:25%;height:100%;transition:all .4s ease-in-out;-webkit-mask-image:linear-gradient(120deg,#fff);mask-image:linear-gradient(120deg,#fff);opacity:0}.dark .menu-icon-status-item[data-v-6e5b5c9c]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position)}.menu-icon-status-item[data-v-6e5b5c9c]:hover:before,.menu-icon-status-item._hover[data-v-6e5b5c9c]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:50%;opacity:1}.dark .menu-icon-status-item[data-v-6e5b5c9c]:hover:before,.dark .menu-icon-status-item._hover[data-v-6e5b5c9c]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.menu-icon-status-item-link[data-v-6e5b5c9c]:after{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229 / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.8;position:absolute;top:0;right:0;bottom:0;left:0;z-index:-2;width:100%;height:100%;background-size:10px 10px;content:"";-webkit-mask-image:linear-gradient(165deg,white 30%,transparent 50%);mask-image:linear-gradient(165deg,white 30%,transparent 50%);transition:all .4s ease-in-out}.menu-icon-status-item-link[data-v-6e5b5c9c]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.5}.dark .menu-icon-status-item-link[data-v-6e5b5c9c]:after{background-image:radial-gradient(circle at 1px 1px,rgb(64 64 64 / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.4}.dark .menu-icon-status-item-link[data-v-6e5b5c9c]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(90% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0) / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.2}.menu-icon-status-item-icon-color[data-v-6e5b5c9c]{opacity:.5}.menu-icon-status-item:hover .menu-icon-status-item-title[data-v-6e5b5c9c],.menu-icon-status-item._hover .menu-icon-status-item-title[data-v-6e5b5c9c]{--un-text-opacity:1;color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.menu-icon-status-item:hover .menu-icon-status-item-description[data-v-6e5b5c9c],.menu-icon-status-item._hover .menu-icon-status-item-description[data-v-6e5b5c9c]{--un-text-opacity:1;color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity));opacity:.8}.menu-icon-status-item:hover .menu-icon-status-item-icon[data-v-6e5b5c9c],.menu-icon-status-item._hover .menu-icon-status-item-icon[data-v-6e5b5c9c],.menu-icon-status-item:hover .menu-icon-status-item-icon-color[data-v-6e5b5c9c],.menu-icon-status-item._hover .menu-icon-status-item-icon-color[data-v-6e5b5c9c]{--un-text-opacity:1;color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity));scale:1.2}.dark .menu-icon-status-item:hover .menu-icon-status-item-title[data-v-6e5b5c9c],.dark .menu-icon-status-item._hover .menu-icon-status-item-title[data-v-6e5b5c9c]{--un-text-opacity:1;color:oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.dark .menu-icon-status-item:hover .menu-icon-status-item-description[data-v-6e5b5c9c],.dark .menu-icon-status-item._hover .menu-icon-status-item-description[data-v-6e5b5c9c]{--un-text-opacity:1;color:oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity));opacity:.8}.dark .menu-icon-status-item:hover .menu-icon-status-item-icon[data-v-6e5b5c9c],.dark .menu-icon-status-item._hover .menu-icon-status-item-icon[data-v-6e5b5c9c],.dark .menu-icon-status-item:hover .menu-icon-status-item-icon-color[data-v-6e5b5c9c],.dark .menu-icon-status-item._hover .menu-icon-status-item-icon-color[data-v-6e5b5c9c]{--un-text-opacity:1;color:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.skeleton[data-v-f404da2a]{position:relative;transition:all .2s ease-in-out}.skeleton-pulse[data-v-f404da2a]{animation:skeleton-pulse-f404da2a 1.5s ease-in-out .5s infinite}@keyframes skeleton-pulse-f404da2a{0%{opacity:1}50%{opacity:.5}to{opacity:1}}.skeleton-wave[data-v-f404da2a]:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;transform:translate(-100%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.2),transparent);animation:skeleton-wave-f404da2a 1.5s infinite;border-radius:inherit}.dark .skeleton-wave[data-v-f404da2a]:after{background:linear-gradient(90deg,transparent,rgba(255,255,255,.1),transparent)}@keyframes skeleton-wave-f404da2a{0%{transform:translate(-100%)}60%{transform:translate(100%)}to{transform:translate(100%)}}.card-hover-effect[data-v-895421da]{transform-style:preserve-3d;transform-origin:center;will-change:transform;transition:transform .3s cubic-bezier(.23,1,.32,1)}.card-hover-effect[data-v-895421da]:before,.card-hover-effect[data-v-895421da]:after{content:"";position:absolute;left:0;right:0;bottom:0;top:0;background-repeat:no-repeat;transition:all .33s ease;pointer-events:none}.card-hover-effect[data-v-895421da]:before{background-position:var(--card-position-x) var(--card-position-y);background-size:300% 300%;background-image:linear-gradient(115deg,transparent 0%,rgba(var(--color-primary-500),calc(.3 * var(--effect-intensity))) 25%,transparent 47%,transparent 53%,rgba(var(--color-primary-600),calc(.3 * var(--effect-intensity))) 75%,transparent 100%);opacity:calc(.5 * var(--effect-intensity));filter:brightness(.5) contrast(1);z-index:1;mix-blend-mode:color-dodge}.card-hover-effect[data-v-895421da]:after{background-position:var(--sparkle-position-x) var(--sparkle-position-y);background-size:160%;background-image:linear-gradient(125deg,rgba(var(--color-primary-500),calc(.3 * var(--effect-intensity))) 15%,rgba(var(--color-primary-400),calc(.25 * var(--effect-intensity))) 30%,rgba(var(--color-primary-300),calc(.2 * var(--effect-intensity))) 40%,rgba(var(--color-primary-200),calc(.1 * var(--effect-intensity))) 60%,rgba(var(--color-primary-400),calc(.25 * var(--effect-intensity))) 70%,rgba(var(--color-primary-500),calc(.3 * var(--effect-intensity))) 85%);background-blend-mode:overlay;opacity:calc(var(--sparkle-opacity) * var(--effect-intensity));filter:brightness(1) contrast(1);z-index:2;mix-blend-mode:color-dodge}.card-hover-effect[data-v-895421da]:hover:before{opacity:calc(.88 * var(--effect-intensity));filter:brightness(.66) contrast(1.33)}.card-hover-effect[data-v-895421da]:hover:after{opacity:var(--effect-intensity);filter:brightness(1.1) contrast(1.2)}.animate-stripe[data-v-3380f248]{background-image:repeating-linear-gradient(-45deg,#f472b6,#f472b6 25px,#f9a8d4 25px,#f9a8d4 50px);animation:progress-3380f248 2s linear infinite;background-size:150% 100%}@-webkit-keyframes progress-3380f248{0%{background-position:0 0}to{background-position:-75px 0px}}@-moz-keyframes progress-3380f248{0%{background-position:0 0}to{background-position:-75px 0px}}@-ms-keyframes progress-3380f248{0%{background-position:0 0}to{background-position:-75px 0px}}@keyframes progress-3380f248{0%{background-position:0 0}to{background-position:-70px 0px}} +.form_input-range[data-v-6ca6d31c]{--height: 2em;min-height:var(--height);-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border-radius:4px;transition:background-color .2s ease;--thumb-width: 4px;--thumb-height: var(--height);--thumb-box-shadow: 0 0 0px #e6e6e6;--thumb-border: none;--thumb-border-radius: 999px;--thumb-background: oklch(80% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0));--thumb-background-hover: oklch(90% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0));--thumb-background-active: oklch(70% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0));--track-height: calc(var(--height) - var(--track-value-padding) * 2);--track-box-shadow: none;--track-border: solid 2px rgb(238, 238, 238);--track-border-radius: 6px;--track-background: rgb(238, 238, 238);--track-background-hover: rgb(238, 238, 238);--track-background-active: rgb(238, 238, 238);--track-value-background: rgb(255, 255, 255);--track-value-background-hover: rgb(255, 255, 255);--track-value-background-active: rgb(255, 255, 255);--track-value-padding: 2px}.dark .form_input-range[data-v-6ca6d31c]{--thumb-background: oklch(70% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0));--thumb-background-hover: oklch(90% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0));--thumb-background-active: oklch(80% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0));--track-border: solid 2px rgb(44, 44, 44);--track-background: rgb(44, 44, 44);--track-background-hover: rgb(44, 44, 44);--track-background-active: rgb(44, 44, 44);--track-value-background: rgb(164, 164, 164);--track-value-background-hover: rgb(164, 164, 164);--track-value-background-active: rgb(164, 164, 164)}.form_input-range.slider-progress[data-v-6ca6d31c]{--range: calc(var(--max) - var(--min));--ratio: calc((var(--value) - var(--min)) / var(--range));--sx: calc(.5 * 0em + var(--ratio) * (100% - 0em))}.form_input-range[data-v-6ca6d31c]:focus{outline:none}.form_input-range[data-v-6ca6d31c]::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:var(--thumb-width);height:var(--thumb-height);border-radius:var(--thumb-border-radius);background:var(--thumb-background);border:var(--thumb-border);box-shadow:var(--thumb-box-shadow);margin-top:calc(var(--track-height) * .5 - var(--thumb-height) * .5 - 2px);margin-left:calc(0 - var(--track-value-padding));cursor:col-resize;transition:background .2s ease-in-out,box-shadow .2s ease-in-out,border-color .2s ease-in-out,transform .2s ease-in-out}.form_input-range[data-v-6ca6d31c]::-webkit-slider-runnable-track{height:var(--track-height);border:var(--track-border);border-radius:var(--track-border-radius);background:var(--track-background);box-shadow:var(--track-box-shadow);position:relative;cursor:col-resize;transition:box-shadow .2s ease-in-out,border-color .2s ease-in-out}.form_input-range[data-v-6ca6d31c]::-webkit-slider-thumb:hover{background:var(--thumb-background-hover)}.form_input-range[data-v-6ca6d31c]:hover::-webkit-slider-runnable-track{background:var(--track-background-hover)}.form_input-range[data-v-6ca6d31c]::-webkit-slider-thumb:active{background:var(--thumb-background-active)}.form_input-range[data-v-6ca6d31c]:active::-webkit-slider-runnable-track{background:var(--track-background-active)}.form_input-range.slider-progress[data-v-6ca6d31c]::-webkit-slider-runnable-track{margin-right:calc(0 - var(--track-value-padding));background:linear-gradient(var(--track-value-background),var(--track-value-background)) 0 / var(--sx) 100% no-repeat,var(--track-background)}.form_input-range.slider-progress[data-v-6ca6d31c]:hover::-webkit-slider-runnable-track{background:linear-gradient(var(--track-value-background-hover),var(--track-value-background-hover)) 0 / var(--sx) 100% no-repeat,var(--track-background-hover)}.form_input-range.slider-progress[data-v-6ca6d31c]:active::-webkit-slider-runnable-track{background:linear-gradient(var(--track-value-background-active),var(--track-value-background-active)) 0 / var(--sx) 100% no-repeat,var(--track-background-active)}.form_input-range[data-v-6ca6d31c]::-moz-range-thumb{width:var(--thumb-width);height:var(--thumb-height);border-radius:var(--thumb-border-radius);background:var(--thumb-background);border:none;box-shadow:var(--thumb-box-shadow);cursor:col-resize;margin-left:calc(0 - var(--track-value-padding))}.form_input-range[data-v-6ca6d31c]::-moz-range-track{height:var(--track-height);border:var(--track-border);border-radius:var(--track-border-radius);background:var(--track-background);box-shadow:var(--track-box-shadow);cursor:col-resize;width:calc(100% - var(--track-value-padding) * 2)}.form_input-range[data-v-6ca6d31c]::-moz-range-thumb:hover{background:var(--thumb-background-hover)}.form_input-range[data-v-6ca6d31c]:hover::-moz-range-track{background:var(--track-background-hover)}.form_input-range[data-v-6ca6d31c]::-moz-range-thumb:active{background:var(--thumb-background-active)}.form_input-range[data-v-6ca6d31c]:active::-moz-range-track{background:var(--track-background-active)}.form_input-range.slider-progress[data-v-6ca6d31c]::-moz-range-track{background:linear-gradient(var(--track-value-background),var(--track-value-background)) 0 / var(--sx) 100% no-repeat,var(--track-background)}.form_input-range.slider-progress[data-v-6ca6d31c]:hover::-moz-range-track{background:linear-gradient(var(--track-value-background-hover),var(--track-value-background-hover)) 0 / var(--sx) 100% no-repeat,var(--track-background-hover)}.form_input-range.slider-progress[data-v-6ca6d31c]:active::-moz-range-track{background:linear-gradient(var(--track-value-background-active),var(--track-value-background-active)) 0 / var(--sx) 100% no-repeat,var(--track-background-active)}.form_input-range[data-v-6ca6d31c]::-ms-fill-upper{background:transparent;border-color:transparent}.form_input-range[data-v-6ca6d31c]::-ms-fill-lower{background:transparent;border-color:transparent}.form_input-range[data-v-6ca6d31c]::-ms-thumb{width:var(--thumb-width);height:var(--thumb-height);border-radius:var(--thumb-border-radius);background:var(--thumb-background);border:var(--thumb-border);box-shadow:var(--thumb-box-shadow);margin-top:0;margin-left:calc(0 - var(--track-value-padding));box-sizing:border-box;cursor:col-resize}.form_input-range[data-v-6ca6d31c]::-ms-track{height:var(--track-height);border-radius:var(--track-border-radius);background:var(--track-background);border:var(--track-border);box-shadow:var(--track-box-shadow);box-sizing:border-box;cursor:col-resize}.form_input-range[data-v-6ca6d31c]::-ms-thumb:hover{background:var(--thumb-background-hover)}.form_input-range[data-v-6ca6d31c]:hover::-ms-track{background:var(--track-background-hover)}.form_input-range[data-v-6ca6d31c]::-ms-thumb:active{background:var(--thumb-background-active)}.form_input-range[data-v-6ca6d31c]:active::-ms-track{background:var(--track-background-active)}.form_input-range.slider-progress[data-v-6ca6d31c]::-ms-fill-lower{height:var(--track-height);border-radius:var(--track-border-radius) 0 0 var(--track-border-radius);margin:0;background:var(--track-value-background);border:none;border-right-width:0;margin-left:calc(var(--track-value-padding));margin-right:calc(0 - var(--track-value-padding))}.form_input-range.slider-progress[data-v-6ca6d31c]:hover::-ms-fill-lower{background:var(--track-value-background-hover)}.form_input-range.slider-progress[data-v-6ca6d31c]:active::-ms-fill-lower{background:var(--track-value-background-active)}.form_radio-card-detail[data-v-c9195151]{position:relative;overflow:hidden}.form_radio-card-detail[data-v-c9195151]:before{pointer-events:none;--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;width:25%;height:100%;transition:all .35s ease-in-out;-webkit-mask-image:linear-gradient(120deg,#fff);mask-image:linear-gradient(120deg,#fff);opacity:0}.dark .form_radio-card-detail[data-v-c9195151]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position)}.form_radio-card-detail[data-v-c9195151]:hover:before,.form_radio-card-detail._hover[data-v-c9195151]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:85%;opacity:1}.dark .form_radio-card-detail[data-v-c9195151]:hover:before,.dark .form_radio-card-detail._hover[data-v-c9195151]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.form_radio-card-detail-active[data-v-c9195151]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:85%;opacity:.5}.dark .form_radio-card-detail-active[data-v-c9195151]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.form_radio-card-simple[data-v-dd41bc0b]{position:relative;overflow:hidden}.form_radio-card-simple[data-v-dd41bc0b]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;width:25%;height:100%;transition:all .35s ease-in-out;-webkit-mask-image:linear-gradient(120deg,#fff);mask-image:linear-gradient(120deg,#fff);opacity:0}.dark .form_radio-card-simple[data-v-dd41bc0b]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position)}.form_radio-card-simple[data-v-dd41bc0b]:hover:before,.form_radio-card-simple._hover[data-v-dd41bc0b]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:85%;opacity:1}.dark .form_radio-card-simple[data-v-dd41bc0b]:hover:before,.dark .form_radio-card-simple._hover[data-v-dd41bc0b]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.form_radio-card-simple-active[data-v-dd41bc0b]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:85%;opacity:.5}.dark .form_radio-card-simple-active[data-v-dd41bc0b]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}input[type=search][data-v-0c2329bf]::-webkit-search-cancel-button{display:none}.form_voice-card[data-v-dbab964e]{position:relative;overflow:hidden;display:flex;flex-direction:column}.form_voice-card[data-v-dbab964e]:before{pointer-events:none;--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;width:25%;height:100%;transition:all .35s ease-in-out;-webkit-mask-image:linear-gradient(120deg,#fff);mask-image:linear-gradient(120deg,#fff);opacity:0}.dark .form_voice-card[data-v-dbab964e]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position)}.form_voice-card[data-v-dbab964e]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:85%;opacity:1}.dark .form_voice-card[data-v-dbab964e]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}input[type=search][data-v-070104a7]::-webkit-search-cancel-button{display:none}.voice-card[data-v-070104a7]{position:relative;overflow:hidden;display:flex;flex-direction:column}.voice-card[data-v-070104a7]:before{pointer-events:none;--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;width:25%;height:100%;transition:all .35s ease-in-out;-webkit-mask-image:linear-gradient(120deg,#fff);mask-image:linear-gradient(120deg,#fff);opacity:0}.dark .voice-card[data-v-070104a7]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position)}.voice-card[data-v-070104a7]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:85%;opacity:1}.dark .voice-card[data-v-070104a7]:hover:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.volumed[data-v-568551bc]{transform-style:preserve-3d;width:fit-content;height:fit-content}.test-dummy-flat[data-v-b4ef37ac]{display:inline-block;position:relative}.test-dummy-flat .marker[data-v-b4ef37ac]{position:absolute;top:0;right:0;bottom:0;left:0;background:conic-gradient(#ffeb3b,#ffeb3b 90deg,#000 90deg,#000 180deg,#ffeb3b 180deg,#ffeb3b 270deg,#000 270deg,#000 360deg);border-radius:50%;box-shadow:0 4px 12px #b9b9b933}.dark .test-dummy-flat .marker[data-v-b4ef37ac]{box-shadow:0 4px 12px #0003}.menu-icon-item[data-v-656e0116]{position:relative;overflow:hidden}.menu-icon-item[data-v-656e0116]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1;width:25%;height:100%;-webkit-mask-image:linear-gradient(120deg,white 30%,transparent 50%);mask-image:linear-gradient(120deg,white 30%,transparent 50%);opacity:0;transition:all .4s ease-in-out}.dark .menu-icon-item[data-v-656e0116]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position)}.menu-icon-item[data-v-656e0116]:hover:before,.menu-icon-item._hover[data-v-656e0116]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:85%;opacity:1}.dark .menu-icon-item[data-v-656e0116]:hover:before,.dark .menu-icon-item._hover[data-v-656e0116]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.menu-icon-item[data-v-656e0116]:after{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229 / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.6;position:absolute;top:0;right:0;bottom:0;left:0;z-index:-2;width:100%;height:100%;background-size:10px 10px;content:"";-webkit-mask-image:linear-gradient(165deg,white 30%,transparent 50%);mask-image:linear-gradient(165deg,white 30%,transparent 50%);transition:all .4s ease-in-out}.menu-icon-item[data-v-656e0116]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.5}.dark .menu-icon-item[data-v-656e0116]:after{background-image:radial-gradient(circle at 1px 1px,rgb(64 64 64 / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.25}.dark .menu-icon-item[data-v-656e0116]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(90% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0) / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.2}.menu-icon-item-icon[data-v-656e0116]{opacity:.5}.menu-icon-item:hover .menu-icon-item-title[data-v-656e0116],.menu-icon-item._hover .menu-icon-item-title[data-v-656e0116]{--un-text-opacity:1;color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.menu-icon-item:hover .menu-icon-item-description[data-v-656e0116],.menu-icon-item._hover .menu-icon-item-description[data-v-656e0116]{--un-text-opacity:1;color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity));opacity:.8}.menu-icon-item:hover .menu-icon-item-icon[data-v-656e0116],.menu-icon-item._hover .menu-icon-item-icon[data-v-656e0116]{--un-text-opacity:1;color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity));scale:1.2}.dark .menu-icon-item:hover .menu-icon-item-title[data-v-656e0116],.dark .menu-icon-item._hover .menu-icon-item-title[data-v-656e0116]{--un-text-opacity:1;color:oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.dark .menu-icon-item:hover .menu-icon-item-description[data-v-656e0116],.dark .menu-icon-item._hover .menu-icon-item-description[data-v-656e0116]{--un-text-opacity:1;color:oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity));opacity:.8}.dark .menu-icon-item:hover .menu-icon-item-icon[data-v-656e0116],.dark .menu-icon-item._hover .menu-icon-item-icon[data-v-656e0116]{--un-text-opacity:1;color:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.menu-icon-status-item[data-v-6e5b5c9c]{position:relative;overflow:hidden}.menu-icon-status-item[data-v-6e5b5c9c]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;width:25%;height:100%;transition:all .4s ease-in-out;-webkit-mask-image:linear-gradient(120deg,#fff);mask-image:linear-gradient(120deg,#fff);opacity:0}.dark .menu-icon-status-item[data-v-6e5b5c9c]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-from-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position)}.menu-icon-status-item[data-v-6e5b5c9c]:hover:before,.menu-icon-status-item._hover[data-v-6e5b5c9c]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position);--un-gradient-shape:to right in oklch;--un-gradient:var(--un-gradient-shape), var(--un-gradient-stops);background-image:linear-gradient(var(--un-gradient));width:50%;opacity:1}.dark .menu-icon-status-item[data-v-6e5b5c9c]:hover:before,.dark .menu-icon-status-item._hover[data-v-6e5b5c9c]:before{--un-gradient-from-position:0%;--un-gradient-from:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .2) var(--un-gradient-from-position);--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0) var(--un-gradient-to-position);--un-gradient-stops:var(--un-gradient-from), var(--un-gradient-to);--un-gradient-via-position:50%;--un-gradient-to:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / 0);--un-gradient-stops:var(--un-gradient-from), oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / .1) var(--un-gradient-via-position), var(--un-gradient-to);--un-gradient-to-position:100%;--un-gradient-to:transparent var(--un-gradient-to-position)}.menu-icon-status-item-link[data-v-6e5b5c9c]:after{background-image:radial-gradient(circle at 1px 1px,rgb(229 229 229 / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.8;position:absolute;top:0;right:0;bottom:0;left:0;z-index:-2;width:100%;height:100%;background-size:10px 10px;content:"";-webkit-mask-image:linear-gradient(165deg,white 30%,transparent 50%);mask-image:linear-gradient(165deg,white 30%,transparent 50%);transition:all .4s ease-in-out}.menu-icon-status-item-link[data-v-6e5b5c9c]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.5}.dark .menu-icon-status-item-link[data-v-6e5b5c9c]:after{background-image:radial-gradient(circle at 1px 1px,rgb(64 64 64 / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.4}.dark .menu-icon-status-item-link[data-v-6e5b5c9c]:after:hover{background-image:radial-gradient(circle at 1px 1px,oklch(90% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0) / var(--un-background-opacity)) 1px,transparent 0);--un-background-opacity:.2}.menu-icon-status-item-icon-color[data-v-6e5b5c9c]{opacity:.5}.menu-icon-status-item:hover .menu-icon-status-item-title[data-v-6e5b5c9c],.menu-icon-status-item._hover .menu-icon-status-item-title[data-v-6e5b5c9c]{--un-text-opacity:1;color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.menu-icon-status-item:hover .menu-icon-status-item-description[data-v-6e5b5c9c],.menu-icon-status-item._hover .menu-icon-status-item-description[data-v-6e5b5c9c]{--un-text-opacity:1;color:oklch(54% var(--theme-colors-chroma-600) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity));opacity:.8}.menu-icon-status-item:hover .menu-icon-status-item-icon[data-v-6e5b5c9c],.menu-icon-status-item._hover .menu-icon-status-item-icon[data-v-6e5b5c9c],.menu-icon-status-item:hover .menu-icon-status-item-icon-color[data-v-6e5b5c9c],.menu-icon-status-item._hover .menu-icon-status-item-icon-color[data-v-6e5b5c9c]{--un-text-opacity:1;color:oklch(62% var(--theme-colors-chroma) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity));scale:1.2}.dark .menu-icon-status-item:hover .menu-icon-status-item-title[data-v-6e5b5c9c],.dark .menu-icon-status-item._hover .menu-icon-status-item-title[data-v-6e5b5c9c]{--un-text-opacity:1;color:oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.dark .menu-icon-status-item:hover .menu-icon-status-item-description[data-v-6e5b5c9c],.dark .menu-icon-status-item._hover .menu-icon-status-item-description[data-v-6e5b5c9c]{--un-text-opacity:1;color:oklch(85% var(--theme-colors-chroma-300) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity));opacity:.8}.dark .menu-icon-status-item:hover .menu-icon-status-item-icon[data-v-6e5b5c9c],.dark .menu-icon-status-item._hover .menu-icon-status-item-icon[data-v-6e5b5c9c],.dark .menu-icon-status-item:hover .menu-icon-status-item-icon-color[data-v-6e5b5c9c],.dark .menu-icon-status-item._hover .menu-icon-status-item-icon-color[data-v-6e5b5c9c]{--un-text-opacity:1;color:oklch(74% var(--theme-colors-chroma-400) calc(var(--theme-colors-hue) + 0) / var(--un-text-opacity))}.skeleton[data-v-f404da2a]{position:relative;transition:all .2s ease-in-out}.skeleton-pulse[data-v-f404da2a]{animation:skeleton-pulse-f404da2a 1.5s ease-in-out .5s infinite}@keyframes skeleton-pulse-f404da2a{0%{opacity:1}50%{opacity:.5}to{opacity:1}}.skeleton-wave[data-v-f404da2a]:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;transform:translate(-100%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.2),transparent);animation:skeleton-wave-f404da2a 1.5s infinite;border-radius:inherit}.dark .skeleton-wave[data-v-f404da2a]:after{background:linear-gradient(90deg,transparent,rgba(255,255,255,.1),transparent)}@keyframes skeleton-wave-f404da2a{0%{transform:translate(-100%)}60%{transform:translate(100%)}to{transform:translate(100%)}}.card-hover-effect[data-v-895421da]{transform-style:preserve-3d;transform-origin:center;will-change:transform;transition:transform .3s cubic-bezier(.23,1,.32,1)}.card-hover-effect[data-v-895421da]:before,.card-hover-effect[data-v-895421da]:after{content:"";position:absolute;left:0;right:0;bottom:0;top:0;background-repeat:no-repeat;transition:all .33s ease;pointer-events:none}.card-hover-effect[data-v-895421da]:before{background-position:var(--card-position-x) var(--card-position-y);background-size:300% 300%;background-image:linear-gradient(115deg,transparent 0%,rgba(var(--color-primary-500),calc(.3 * var(--effect-intensity))) 25%,transparent 47%,transparent 53%,rgba(var(--color-primary-600),calc(.3 * var(--effect-intensity))) 75%,transparent 100%);opacity:calc(.5 * var(--effect-intensity));filter:brightness(.5) contrast(1);z-index:1;mix-blend-mode:color-dodge}.card-hover-effect[data-v-895421da]:after{background-position:var(--sparkle-position-x) var(--sparkle-position-y);background-size:160%;background-image:linear-gradient(125deg,rgba(var(--color-primary-500),calc(.3 * var(--effect-intensity))) 15%,rgba(var(--color-primary-400),calc(.25 * var(--effect-intensity))) 30%,rgba(var(--color-primary-300),calc(.2 * var(--effect-intensity))) 40%,rgba(var(--color-primary-200),calc(.1 * var(--effect-intensity))) 60%,rgba(var(--color-primary-400),calc(.25 * var(--effect-intensity))) 70%,rgba(var(--color-primary-500),calc(.3 * var(--effect-intensity))) 85%);background-blend-mode:overlay;opacity:calc(var(--sparkle-opacity) * var(--effect-intensity));filter:brightness(1) contrast(1);z-index:2;mix-blend-mode:color-dodge}.card-hover-effect[data-v-895421da]:hover:before{opacity:calc(.88 * var(--effect-intensity));filter:brightness(.66) contrast(1.33)}.card-hover-effect[data-v-895421da]:hover:after{opacity:var(--effect-intensity);filter:brightness(1.1) contrast(1.2)}.animate-stripe[data-v-b414abf5]{background-image:repeating-linear-gradient(-45deg,#f472b6,#f472b6 25px,#f9a8d4 25px,#f9a8d4 50px);animation:progress-b414abf5 2s linear infinite;background-size:150% 100%}@-webkit-keyframes progress-b414abf5{0%{background-position:0 0}to{background-position:-75px 0px}}@-moz-keyframes progress-b414abf5{0%{background-position:0 0}to{background-position:-75px 0px}}@-ms-keyframes progress-b414abf5{0%{background-position:0 0}to{background-position:-75px 0px}}@keyframes progress-b414abf5{0%{background-position:0 0}to{background-position:-70px 0px}} diff --git a/assets/Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js b/assets/Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js similarity index 99% rename from assets/Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js rename to assets/Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js index bd3ec9f45919df001a58d9b563dc6c6a15c38115..22fda6c87b2ec2a85c18ca0607f584ec990a8f02 100644 --- a/assets/Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js +++ b/assets/Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-node-C_5jnHCL.js","assets/index-D8Nm21zW.js","assets/index-D4Du7g_x.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,ce 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,cf as y1,$ as v1,cg as _1,a1 as b1,ch as Ho,ci as xn,W as qr,a4 as Wn,a_ as Ca,as as nr,cj as w1,X as hi,b7 as x1,b5 as S1,ck as Qp,bb as Mf,cl as T1,aj as Jl,J as co,bc as I1,bf as E1,bg as A1,bp as M1,cm as Ai}from"./index-D8Nm21zW.js";/*! +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-node-xSlPiRPI.js","assets/index-_NYoebRU.js","assets/index-D4Du7g_x.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,ce 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,cf as y1,$ as v1,cg as _1,a1 as b1,ch as Ho,ci as xn,W as qr,a4 as Wn,a_ as Ca,as as nr,cj as w1,X as hi,b7 as x1,b5 as S1,ck as Qp,bb as Mf,cl as T1,aj as Jl,J as co,bc as I1,bf as E1,bg as A1,bp as M1,cm as Ai}from"./index-_NYoebRU.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 jR=new TextDecoder("utf-8"),Wd=r=>jR.decode(r),$R=new TextEncoder,Zf=r=>$R.encode(r),GR=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)&&GR(r.fd),Lb=r=>wr(r)&&Kf(r.body),oc=r=>"_getDOMStream"in r&&"_getNodeStream"in r,WR=r=>wr(r)&&Ye(r.abort)&&Ye(r.getWriter)&&!oc(r),Kf=r=>wr(r)&&Ye(r.cancel)&&Ye(r.getReader)&&!oc(r),HR=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),XR=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 YR(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*qR(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=>qR(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 ZR=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*JR(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 nF(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,Ii=new Int32Array(2),ty=new Float32Array(Ii.buffer),ey=new Float64Array(Ii.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,Ii[0])}writeFloat64(t,e){ey[0]=e,this.writeInt32(t,Ii[Dl?0:1]),this.writeInt32(t+4,Ii[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 iF=void 0;function Ba(r){if(r===null)return"null";if(r===iF)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 sF=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[sF]=!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 lF(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 oF=BigInt(4294967296)*BigInt(4294967296),aF=oF-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 Fi=class extends Ot{constructor(){super(k.Null)}toString(){return"Null"}};Yb=Symbol.toStringTag;Fi[Yb]=(r=>r[Symbol.toStringTag]="Null")(Fi.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 cF=(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?cF():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 hF(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 hF(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 dF(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 fF=(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]=dF(e)},mF=(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)=>{fF(r,t,e.valueOf())},bw=({values:r},t,e)=>{r[t]=BigInt(e)},gF=({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)),yF=(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)},vF=(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},_F=(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)}},bF=({values:r,stride:t},e,n)=>{r.set(n.subarray(0,t),t*e)},wF=(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},SF=(r,t)=>(e,n,i,s)=>n&&e(n,r,t[s]),TF=(r,t)=>(e,n,i,s)=>n&&e(n,r,t.get(s)),IF=(r,t)=>(e,n,i,s)=>n&&e(n,r,t.get(i.name)),EF=(r,t)=>(e,n,i,s)=>n&&e(n,r,t[i.name]),AF=(r,t,e)=>{const n=r.type.children.map(s=>sn.getVisitFn(s.type)),i=e instanceof Map?IF(t,e):e instanceof Ne?TF(t,e):Array.isArray(e)?SF(t,e):EF(t,e);r.type.children.forEach((s,o)=>i(n[o],r.children[o],s,o))},MF=(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)},CF=(r,t,e)=>{var n;(n=r.dictionary)===null||n===void 0||n.set(r.values[t],e)},OF=(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},PF=(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)}},RF=(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 FF(this[un],this[bo])}},FF=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 LF=(r,t)=>864e5*r[t],NF=(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)},BF=({offset:r,values:t},e)=>{const n=r+e;return(t[n>>3]&1<LF(r,t),Vw=({values:r},t)=>Te(r[t]),zi=({stride:r,values:t},e)=>t[r*e],UF=({stride:r,values:t},e)=>gw(t[r*e]),jw=({values:r},t)=>r[t],kF=({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},zF=({values:r},t)=>r[t],VF=({type:r,values:t},e)=>r.precision!==ar.HALF?t[e]:gw(t[e]),jF=(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)),$F=(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],GF=(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)}},WF=({values:r,stride:t},e)=>uF.decimal(r.subarray(t*e,t*(e+1))),HF=(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])},XF=(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))},YF=(r,t)=>new ep(r,t),qF=(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])},ZF=(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],KF=(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)}},JF=(r,t)=>{const{stride:e,children:n}=r,s=n[0].slice(t*e,e);return new Ne([s])};Ft.prototype.visitNull=$t(NF);Ft.prototype.visitBool=$t(BF);Ft.prototype.visitInt=$t(zF);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(VF);Ft.prototype.visitFloat16=$t(UF);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(kF);Ft.prototype.visitDate=$t(jF);Ft.prototype.visitDateDay=$t(zw);Ft.prototype.visitDateMillisecond=$t(Vw);Ft.prototype.visitTimestamp=$t($F);Ft.prototype.visitTimestampSecond=$t(Ww);Ft.prototype.visitTimestampMillisecond=$t(Hw);Ft.prototype.visitTimestampMicrosecond=$t(Xw);Ft.prototype.visitTimestampNanosecond=$t(Yw);Ft.prototype.visitTime=$t(GF);Ft.prototype.visitTimeSecond=$t(qw);Ft.prototype.visitTimeMillisecond=$t(Qw);Ft.prototype.visitTimeMicrosecond=$t(Zw);Ft.prototype.visitTimeNanosecond=$t(Kw);Ft.prototype.visitDecimal=$t(WF);Ft.prototype.visitList=$t(HF);Ft.prototype.visitStruct=$t(YF);Ft.prototype.visitUnion=$t(qF);Ft.prototype.visitDenseUnion=$t(Jw);Ft.prototype.visitSparseUnion=$t(tx);Ft.prototype.visitDictionary=$t(QF);Ft.prototype.visitInterval=$t(ZF);Ft.prototype.visitIntervalDayTime=$t(ex);Ft.prototype.visitIntervalYearMonth=$t(rx);Ft.prototype.visitDuration=$t(KF);Ft.prototype.visitDurationSecond=$t(nx);Ft.prototype.visitDurationMillisecond=$t(ix);Ft.prototype.visitDurationMicrosecond=$t(sx);Ft.prototype.visitDurationNanosecond=$t(ox);Ft.prototype.visitFixedSizeList=$t(JF);Ft.prototype.visitMap=$t(XF);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 e2)}get[oo](){return this[Kd]||(this[Kd]=Array.from(this[so].toArray(),String))}[Symbol.iterator](){return new t2(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()}},t2=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)]})}},e2=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?KR(r,e):!1:r instanceof Map?n2(r):Array.isArray(r)?r2(r):r instanceof Ne?i2(r):s2(r,!0)}function r2(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 o2(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?a2(r,e):!1}}function o2(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)+u2(r,i>>3,n-i>>3)}function u2(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 c2=-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<=c2&&(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 h2=new Sa;function le(r){return h2.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 p2(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 p2(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 m2(o)})}let m2=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 d2(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 g2=zb,y2=Mo;class Va{static decode(t){t=new y2(ce(t));const e=Er.getRootAsFooter(t),n=Le.decode(e.schema(),new Map,e.version());return new v2(n,e)}static encode(t){const e=new g2,n=Le.encode(e,t.schema);Er.startRecordBatchesVector(e,t.numRecordBatches);for(const o of[...t.recordBatches()].slice().reverse())Di.encode(e,o);const i=e.endVector();Er.startDictionariesVector(e,t.numDictionaries);for(const o of[...t.dictionaryBatches()].slice().reverse())Di.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 _2{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 b2(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 b2{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 S2 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,x2.convertArray(n[e])):Ot.isBinary(t)||Ot.isLargeBinary(t)||Ot.isFixedSizeBinary(t)?T2(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 T2(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 fi(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 I2(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 E2(r,t){return r===t||mr(r,t)&&r.children.length===t.children.length&&Li.compareManyFields(r.children,t.children)}function A2(r,t){return r===t||mr(r,t)&&r.children.length===t.children.length&&Li.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])&&Li.compareManyFields(r.children,t.children)}function M2(r,t){return r===t||mr(r,t)&&r.id===t.id&&r.isOrdered===t.isOrdered&&Li.visit(r.indices,t.indices)&&Li.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 C2(r,t){return r===t||mr(r,t)&&r.listSize===t.listSize&&r.children.length===t.children.length&&Li.compareManyFields(r.children,t.children)}function O2(r,t){return r===t||mr(r,t)&&r.keysSorted===t.keysSorted&&r.children.length===t.children.length&&Li.compareManyFields(r.children,t.children)}Nt.prototype.visitNull=Fs;Nt.prototype.visitBool=Fs;Nt.prototype.visitInt=fi;Nt.prototype.visitInt8=fi;Nt.prototype.visitInt16=fi;Nt.prototype.visitInt32=fi;Nt.prototype.visitInt64=fi;Nt.prototype.visitUint8=fi;Nt.prototype.visitUint16=fi;Nt.prototype.visitUint32=fi;Nt.prototype.visitUint64=fi;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=I2;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=E2;Nt.prototype.visitStruct=A2;Nt.prototype.visitUnion=hp;Nt.prototype.visitDenseUnion=hp;Nt.prototype.visitSparseUnion=hp;Nt.prototype.visitDictionary=M2;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=C2;Nt.prototype.visitMap=O2;const Li=new Nt;function nf(r,t){return Li.compareSchemas(r,t)}function Ph(r,t){return P2(r,t.map(e=>e.data.concat()))}function P2(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 R2(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 Ni=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;Ni[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"))(Ni.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 Ni(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 wi=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 F2 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 F2;function D2(r,t=new Map){return new Le(N2(r,t),Yl(r.metadata),t)}function Tx(r){return new Br(r.count,Ix(r.columns),Ex(r.columns))}function L2(r){return new Vn(Tx(r.data),r.id,r.isDelta)}function N2(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 Bi(e.count,B2(e.VALIDITY)),...Ix(e.children)],[])}function Ex(r,t=[]){for(let e=-1,n=(r||[]).length;++et+ +(e===0),0)}function U2(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 Fi;case"null":return new Fi;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 k2=zb,z2=Mo;class fr{static fromJSON(t,e){const n=new fr(0,je.V5,e);return n._createHeader=V2(t,e),n}static decode(t){t=new z2(ce(t));const e=wi.getRootAsMessage(t),n=e.bodyLength(),i=e.version(),s=e.headerType(),o=new fr(n,i,s);return o._createHeader=j2(e,s),o}static encode(t){const e=new k2;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())),wi.startMessage(e),wi.addVersion(e,je.V5),wi.addHeader(e,n),wi.addHeaderType(e,t.headerType),wi.addBodyLength(e,BigInt(t.bodyLength)),wi.finishMessageBuffer(e,wi.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 Bi{constructor(t,e){this.length=Te(t),this.nullCount=Te(e)}}function V2(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 j2(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=J2;Pe.decode=Z2;Pe.fromJSON=U2;Le.encode=K2;Le.decode=$2;Le.fromJSON=D2;Br.encode=tD;Br.decode=G2;Br.fromJSON=Tx;Vn.encode=eD;Vn.decode=W2;Vn.fromJSON=L2;Bi.encode=rD;Bi.decode=X2;Ln.encode=nD;Ln.decode=H2;function $2(r,t=new Map,e=je.V5){const n=Q2(r,t);return new Le(n,ql(r),t,e)}function G2(r,t=je.V5){if(r.compression()!==null)throw new Error("Record batch compression not implemented");return new Br(r.length(),Y2(r),q2(r,t))}function W2(r,t=je.V5){return new Vn(Br.decode(r.data(),t),r.id(),r.isDelta())}function H2(r){return new Ln(r.offset(),r.length())}function X2(r){return new Bi(r.length(),r.nullCount())}function Y2(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,iD?Co.Little:Co.Big),i!==-1&&In.addCustomMetadata(r,i),In.endSchema(r)}function J2(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 tD(r,t){const e=t.nodes||[],n=t.buffers||[];ri.startNodesVector(r,e.length);for(const o of e.slice().reverse())Bi.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 eD(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 rD(r,t){return $b.createFieldNode(r,BigInt(t.length),BigInt(t.nullCount))}function nD(r,t){return jb.createBuffer(r,BigInt(t.offset),BigInt(t.length))}const iD=(()=>{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)?hD(t):Db(t)?pD(t):Is(t)?Jt(this,void 0,void 0,function*(){return yield tn.from(yield t)}):Lb(t)||Kf(t)||Nb(t)||Uo(t)?fD(new Po(t)):dD(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 lD 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 oD(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 sD(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 fD(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 pD(r){return Jt(this,void 0,void 0,function*(){const{size:t}=yield r.stat(),e=new Bu(r,t);return t>=aD&&gp(yield e.readAt(0,tl+7&-8))?new lD(new uD(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 Bi(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 Bi(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 mD(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 gD(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 pi(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=gD;ke.prototype.visitInt=pi;ke.prototype.visitFloat=pi;ke.prototype.visitUtf8=cc;ke.prototype.visitLargeUtf8=cc;ke.prototype.visitBinary=cc;ke.prototype.visitLargeBinary=cc;ke.prototype.visitFixedSizeBinary=pi;ke.prototype.visitDate=pi;ke.prototype.visitTimestamp=pi;ke.prototype.visitTime=pi;ke.prototype.visitDecimal=pi;ke.prototype.visitList=yp;ke.prototype.visitStruct=of;ke.prototype.visitUnion=mD;ke.prototype.visitInterval=pi;ke.prototype.visitDuration=pi;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&&WR(t)?this.toDOMStream({type:"bytes"}).pipeTo(t):t&&HR(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 Ni&&!(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 Ni?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 Di(a,t.bodyLength,this._position)):t.headerType===me.DictionaryBatch&&this._dictionaryBlocks.push(new Di(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 Ni&&(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 yD(r,t="stream"){return(t==="stream"?vp:_p).writeAll(r).toUint8Array(!0)}var vD=Object.create,Nx=Object.defineProperty,_D=Object.getOwnPropertyDescriptor,bD=Object.getOwnPropertyNames,wD=Object.getPrototypeOf,xD=Object.prototype.hasOwnProperty,SD=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),TD=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of bD(t))!xD.call(r,i)&&i!==e&&Nx(r,i,{get:()=>t[i],enumerable:!(n=_D(t,i))||n.enumerable});return r},ID=(r,t,e)=>(e=r!=null?vD(wD(r)):{},TD(!r||!r.__esModule?Nx(e,"default",{value:r,enumerable:!0}):e,r)),ED=SD((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||{}),AD=(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))(AD||{}),MD=(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))(MD||{}),CD=(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))(CD||{}),OD=(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))(OD||{}),PD=(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))(PD||{}),RD=class{log(r){}},Ux=class{constructor(r=2){this.level=r}log(r){r.level>=this.level&&console.log(r)}},FD=(r=>(r[r.SUCCESS=0]="SUCCESS",r))(FD||{}),DD=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 Ni(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 LD(this._bindings,this._conn,t)}async insertArrowTable(r,t){let e=yD(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}},LD=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 Ni(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}},ND=(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))(ND||{}),BD=(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))(BD||{}),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 UD=new TextEncoder,kD=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 DD(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=UD.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 zD(){let r=new TextDecoder;return t=>(typeof SharedArrayBuffer<"u"&&t.buffer instanceof SharedArrayBuffer&&(t=new Uint8Array(t)),r.decode(t))}zD();var VD=(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))(VD||{}),jD=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])),$D=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])),GD=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])),WD=()=>(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])),HD={version:"1.29.1-dev68.0"},xp=HD.version.split(".");xp[0];xp[1];xp[2];var XD=()=>typeof navigator>"u",Fh=null,Dh=null,Lh=null,Nh=null,Bh=null;async function YD(){return Fh==null&&(Fh=typeof BigInt64Array<"u"),Dh==null&&(Dh=await $D()),Lh==null&&(Lh=await WD()),Nh==null&&(Nh=await GD()),Bh==null&&(Bh=await jD()),{bigInt64Array:Fh,crossOriginIsolated:XD()||globalThis.crossOriginIsolated||!1,wasmExceptions:Dh,wasmSIMD:Nh,wasmThreads:Lh,wasmBulkMemory:Bh}}async function Ey(r){let t=await YD();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}}ID(ED());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(qD);return e?Ay(r,e.slice(1)):NaN}}const qD=/([+-]\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 ZD=new TextDecoder("utf-8"),KD=r=>ZD.decode(r),JD=new TextEncoder,Vx=r=>JD.encode(r),An=r=>typeof r=="function",el=r=>r!=null&&Object(r)===r,tL=r=>el(r)&&An(r.then),jx=r=>el(r)&&An(r[Symbol.iterator]),eL=r=>el(r)&&An(r[Symbol.asyncIterator]),rL=r=>el(r)&&"done"in r&&"value"in r,nL=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 iL(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),aL=r=>ur(Int16Array,r),lL=r=>ur(Int32Array,r),uL=r=>ur(BigInt64Array,r),cL=r=>ur(Uint8Array,r),hL=r=>ur(Uint16Array,r),dL=r=>ur(Uint32Array,r),fL=r=>ur(BigUint64Array,r),pL=r=>ur(Float32Array,r),mL=r=>ur(Float64Array,r),gL=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 yL=r=>Xn(Int8Array,r),vL=r=>Xn(Int16Array,r),_L=r=>Xn(Int32Array,r),bL=r=>Xn(Uint8Array,r),wL=r=>Xn(Uint16Array,r),xL=r=>Xn(Uint32Array,r),SL=r=>Xn(Float32Array,r),TL=r=>Xn(Float64Array,r),IL=r=>Xn(Uint8ClampedArray,r);function mn(r,t){return br(this,arguments,function*(){if(tL(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):eL(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 EL=r=>mn(Int8Array,r),AL=r=>mn(Int16Array,r),ML=r=>mn(Int32Array,r),CL=r=>mn(Uint8Array,r),OL=r=>mn(Uint16Array,r),PL=r=>mn(Uint32Array,r),RL=r=>mn(Float32Array,r),FL=r=>mn(Float64Array,r),DL=r=>mn(Uint8ClampedArray,r);function LL(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 UL=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 kL=BigInt(4294967296)*BigInt(4294967296),zL=kL-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}<${Ui[this.unit]}>`}get ArrayType(){return this.unit===Ui.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 jL=(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?jL():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 $L(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 $L(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 Ui.DAY:return H.DateDay;case Ui.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 GL=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 WL=(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)},XL=(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)=>{WL(r,t,e.valueOf())},wS=({values:r},t,e)=>{r[t]=BigInt(e)},YL=({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)),qL=(r,t,e)=>{r.type.unit===Ui.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},ZL=(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)}},KL=({values:r,stride:t},e,n)=>{r.set(n.subarray(0,t),t*e)},JL=(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},eN=(r,t)=>(e,n,i,s)=>n&&e(n,r,t[s]),rN=(r,t)=>(e,n,i,s)=>n&&e(n,r,t.get(s)),nN=(r,t)=>(e,n,i,s)=>n&&e(n,r,t.get(i.name)),iN=(r,t)=>(e,n,i,s)=>n&&e(n,r,t[i.name]),sN=(r,t,e)=>{const n=r.type.children.map(s=>$n.getVisitFn(s.type)),i=e instanceof Map?nN(t,e):e instanceof er?rN(t,e):Array.isArray(e)?eN(t,e):iN(t,e);r.type.children.forEach((s,o)=>i(n[o],r.children[o],s,o))},oN=(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)},aN=(r,t,e)=>{var n;(n=r.dictionary)===null||n===void 0||n.set(r.values[t],e)},lN=(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},uN=(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)}},cN=(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 hN(this[cn],this[To])}}class hN{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 fN=new dN;class Bt extends he{}function Ht(r){return(t,e)=>t.getValid(e)?r(t,e):null}const pN=(r,t)=>864e5*r[t],mN=(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)},gN=({offset:r,values:t},e)=>{const n=r+e;return(t[n>>3]&1<pN(r,t),jS=({values:r},t)=>pr(r[t]),Vi=({stride:r,values:t},e)=>t[r*e],yN=({stride:r,values:t},e)=>Ip(t[r*e]),$S=({values:r},t)=>r[t],vN=({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?KD(n):null},_N=({values:r},t)=>r[t],bN=({type:r,values:t},e)=>r.precision!==Dr.HALF?t[e]:Ip(t[e]),wN=(r,t)=>r.type.unit===Ui.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)),xN=(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],SN=(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)}},TN=({values:r,stride:t},e)=>hc.decimal(r.subarray(t*e,t*(e+1))),IN=(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])},EN=(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))},AN=(r,t)=>new Ap(r,t),MN=(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)},CN=(r,t)=>{var e;return(e=r.dictionary)===null||e===void 0?void 0:e.get(r.values[t])},ON=(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],PN=(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)}},RN=(r,t)=>{const{stride:e,children:n}=r,s=n[0].slice(t*e,e);return new er([s])};Bt.prototype.visitNull=Ht(mN);Bt.prototype.visitBool=Ht(gN);Bt.prototype.visitInt=Ht(_N);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(bN);Bt.prototype.visitFloat16=Ht(yN);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(vN);Bt.prototype.visitDate=Ht(wN);Bt.prototype.visitDateDay=Ht(VS);Bt.prototype.visitDateMillisecond=Ht(jS);Bt.prototype.visitTimestamp=Ht(xN);Bt.prototype.visitTimestampSecond=Ht(HS);Bt.prototype.visitTimestampMillisecond=Ht(XS);Bt.prototype.visitTimestampMicrosecond=Ht(YS);Bt.prototype.visitTimestampNanosecond=Ht(qS);Bt.prototype.visitTime=Ht(SN);Bt.prototype.visitTimeSecond=Ht(QS);Bt.prototype.visitTimeMillisecond=Ht(ZS);Bt.prototype.visitTimeMicrosecond=Ht(KS);Bt.prototype.visitTimeNanosecond=Ht(JS);Bt.prototype.visitDecimal=Ht(TN);Bt.prototype.visitList=Ht(IN);Bt.prototype.visitStruct=Ht(AN);Bt.prototype.visitUnion=Ht(MN);Bt.prototype.visitDenseUnion=Ht(tT);Bt.prototype.visitSparseUnion=Ht(eT);Bt.prototype.visitDictionary=Ht(CN);Bt.prototype.visitInterval=Ht(ON);Bt.prototype.visitIntervalDayTime=Ht(rT);Bt.prototype.visitIntervalYearMonth=Ht(nT);Bt.prototype.visitDuration=Ht(PN);Bt.prototype.visitDurationSecond=Ht(iT);Bt.prototype.visitDurationMillisecond=Ht(sT);Bt.prototype.visitDurationMicrosecond=Ht(oT);Bt.prototype.visitDurationNanosecond=Ht(aT);Bt.prototype.visitFixedSizeList=Ht(RN);Bt.prototype.visitMap=Ht(EN);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 DN)}get[uo](){return this[df]||(this[df]=Array.from(this[lo].toArray(),String))}[Symbol.iterator](){return new FN(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 FN{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 DN{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?NN(r):Array.isArray(r)?LN(r):r instanceof er?BN(r):UN(r,!0)}function LN(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 kN(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?zN(r,e):!1}}function kN(r,t){const e=r.length;if(t.length!==e)return!1;for(let n=-1;++n>n}function jN(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 $N=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:jN,truncateBitmap:ff},Symbol.toStringTag,{value:"Module"})),GN=-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<=GN&&(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 HN(r){return r.reduce((t,e)=>t+e.nullCount,0)}function XN(r){return r.reduce((t,e,n)=>(t[n+1]=t[n]+e.length,t),new Uint32Array(r.length+1))}function YN(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 KN(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 KN(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 JN(o)})}class JN{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=XN(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 WN(this.data)}get nullCount(){return HN(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 tB.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)=>YN(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:qN($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 eB=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 gi(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 nB(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 iB(r,t){return r===t||gr(r,t)&&r.children.length===t.children.length&&Gn.compareManyFields(r.children,t.children)}function sB(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 oB(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 aB(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 lB(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=gi;zt.prototype.visitInt8=gi;zt.prototype.visitInt16=gi;zt.prototype.visitInt32=gi;zt.prototype.visitInt64=gi;zt.prototype.visitUint8=gi;zt.prototype.visitUint16=gi;zt.prototype.visitUint32=gi;zt.prototype.visitUint64=gi;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=nB;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=iB;zt.prototype.visitStruct=sB;zt.prototype.visitUnion=Dp;zt.prototype.visitDenseUnion=Dp;zt.prototype.visitSparseUnion=Dp;zt.prototype.visitDictionary=oB;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=aB;zt.prototype.visitMap=lB;const Gn=new zt;function uB(r,t){return Gn.compareSchemas(r,t)}function cB(r,t){return Gn.compareFields(r,t)}function hB(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({},VL),rB),$N),GL),NL),VN),UL),{compareSchemas:uB,compareFields:cB,compareTypes:hB}),vT=6048e5,dB=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 fB={};function mc(){return fB}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 pB(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 mB(r,t,e){const[n,i]=pB(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)/dB)}function gB(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 yB(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function vB(r){return!(!yB(r)&&typeof r!="number"||isNaN(+an(r)))}function _B(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 bB={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"}},wB=(r,t,e)=>{let n;const i=bB[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 xB={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},SB={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},TB={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},IB={date:zh({formats:xB,defaultWidth:"full"}),time:zh({formats:SB,defaultWidth:"full"}),dateTime:zh({formats:TB,defaultWidth:"full"})},EB={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},AB=(r,t,e,n)=>EB[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 MB={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},CB={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},OB={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"]},PB={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"]},RB={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"}},FB={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"}},DB=(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"},LB={ordinalNumber:DB,era:sa({values:MB,defaultWidth:"wide"}),quarter:sa({values:CB,defaultWidth:"wide",argumentCallback:r=>r-1}),month:sa({values:OB,defaultWidth:"wide"}),day:sa({values:PB,defaultWidth:"wide"}),dayPeriod:sa({values:RB,defaultWidth:"wide",formattingValues:FB,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)?BB(a,h=>h.test(o)):NB(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 NB(r,t){for(const e in r)if(Object.prototype.hasOwnProperty.call(r,e)&&t(r[e]))return e}function BB(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 kB=/^(\d+)(th|st|nd|rd)?/i,zB=/\d+/i,VB={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},jB={any:[/^b/i,/^(a|c)/i]},$B={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},GB={any:[/1/i,/2/i,/3/i,/4/i]},WB={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},HB={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]},XB={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},YB={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]},qB={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}},ZB={ordinalNumber:UB({matchPattern:kB,parsePattern:zB,valueCallback:r=>parseInt(r,10)}),era:oa({matchPatterns:VB,defaultMatchWidth:"wide",parsePatterns:jB,defaultParseWidth:"any"}),quarter:oa({matchPatterns:$B,defaultMatchWidth:"wide",parsePatterns:GB,defaultParseWidth:"any",valueCallback:r=>r+1}),month:oa({matchPatterns:WB,defaultMatchWidth:"wide",parsePatterns:HB,defaultParseWidth:"any"}),day:oa({matchPatterns:XB,defaultMatchWidth:"wide",parsePatterns:YB,defaultParseWidth:"any"}),dayPeriod:oa({matchPatterns:qB,defaultMatchWidth:"any",parsePatterns:QB,defaultParseWidth:"any"})},KB={code:"en-US",formatDistance:wB,formatLong:IB,formatRelative:AB,localize:LB,match:ZB,options:{weekStartsOn:0,firstWeekContainsDate:1}};function JB(r,t){const e=an(r,t==null?void 0:t.in);return mB(e,_B(e))+1}function tU(r,t){const e=an(r,t==null?void 0:t.in),n=+Gu(e)-+gB(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 eU(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 rU(r,t){const e=an(r,t==null?void 0:t.in),n=+Wa(e,t)-+eU(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 xi={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 xi.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 xi.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=rU(r,n);return t==="wo"?e.ordinalNumber(i,{unit:"week"}):we(i,t.length)},I:function(r,t,e){const n=tU(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"}):xi.d(r,t)},D:function(r,t,e){const n=JB(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 xi.h(r,t)},H:function(r,t,e){return t==="Ho"?e.ordinalNumber(r.getHours(),{unit:"hour"}):xi.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"}):xi.m(r,t)},s:function(r,t,e){return t==="so"?e.ordinalNumber(r.getSeconds(),{unit:"second"}):xi.s(r,t)},S:function(r,t){return xi.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"})}},nU=(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))},iU={p:wT,P:nU},sU=/^D+$/,oU=/^Y+$/,aU=["D","DD","YY","YYYY"];function lU(r){return sU.test(r)}function uU(r){return oU.test(r)}function cU(r,t,e){const n=hU(r,t,e);if(console.warn(n),aU.includes(r))throw new RangeError(n)}function hU(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 dU=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,fU=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,pU=/^'([^]*?)'?$/,mU=/''/g,gU=/[a-zA-Z]/;function xT(r,t,e){var c,h,f,d;const n=mc(),i=n.locale??KB,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(!vB(a))throw new RangeError("Invalid time value");let l=t.match(fU).map(m=>{const g=m[0];if(g==="p"||g==="P"){const p=iU[g];return p(m,i.formatLong)}return m}).join("").match(dU).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const g=m[0];if(g==="'")return{isToken:!1,value:yU(m)};if(ov[g])return{isToken:!0,value:m};if(g.match(gU))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;(uU(g)||lU(g))&&cU(g,t,String(r));const p=ov[g[0]];return p(a,g,i.localize,u)}).join("")}function yU(r){const t=r.match(pU);return t?t[1].replace(mU,"'"):r}function vU(r,t){return an(r*1e3,t==null?void 0:t.in)}function _U(r,t){const e=bU(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 bU(r){var t;return typeof r=="function"&&((t=r.prototype)==null?void 0:t.constructor)===r}function wU(r,t){let e=r.length;switch("string"){case"string":{if(t.length!==1)throw new Error("The 'chars' parameter should be a single character string.");for(;e>0&&r[e-1]===t;)e--;break}}return r.substring(0,e)}function Tr(r){return r==null}function xU(r){return r!=null}async function pf(){if(typeof window<"u"&&window!==null)return"browser";try{const r=await Ai(()=>import("./__vite-browser-external-FmFgRqLi.js"),[]);return typeof r<"u"&&r.versions!=null&&r.versions.node!=null?"node":"unknown"}catch{return"unknown"}}function SU(r){return Tr(r)?!1:Ct.isInt(r.type)&&!ST(r)||TU(r)}function TU(r){return Tr(r)?!1:Ct.isInt(r.type)&&r.type.isSigned===!1}function IU(r){return Tr(r)?!1:Ct.isFloat(r.type)??!1}function EU(r){return Tr(r)?!1:Ct.isDecimal(r.type)}function AU(r){return Tr(r)?!1:Ct.isBool(r.type)}function MU(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 CU(r){return Tr(r)?!1:Ct.isTimestamp(r.type)}function OU(r){return Tr(r)?!1:Ct.isDate(r.type)}function PU(r){return Tr(r)?!1:Ct.isTime(r.type)}function RU(r){return Tr(r)?!1:Ct.isList(r.type)||Ct.isFixedSizeList(r.type)}function FU(r){return Tr(r)?!1:Ct.isStruct(r.type)||Ct.isMap(r.type)}function DU(r){return Tr(r)?!1:Ct.isStruct(r.type)&&r.metadata.get("ARROW:extension:name")==="interval"||Ct.isInterval(r.type)}function LU(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 NU(r,t){var n;const e=LU(r,((n=t==null?void 0:t.type)==null?void 0:n.unit)??te.SECOND);return vU(e)}function BU(r,t){const e=NU(r,t);return xT(e,e.getMilliseconds()===0?"HH:mm:ss":"HH:mm:ss.SSS")}function UU(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 kU(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),_U(e,Date)}function zU(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=wU(n.slice(-e),"0")||"";return`${i}${s}${o?`.${o}`:""}`}function VU(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 jU(r,t){var n,i,s,o;if(Ct.isInterval(t==null?void 0:t.type))return VU(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 $U(r,t){return(t==null?void 0:t.type)instanceof hf?JSON.parse(JSON.stringify(r,(e,n)=>{if(xU(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&&OU(t))return UU(r);if(typeof r=="bigint"&&PU(t))return BU(Number(r),t);if(e&&CU(t))return kU(r,t);if(ST(t))throw new Error("Period type is not supported yet");if(DU(t))return jU(r,t);if(MU(t))throw new Error("Duration type is not supported yet");return EU(t)?zU(r,t):IU(t)&&Number.isFinite(r)||SU(t)?r:FU(t)||RU(t)?$U(r,t):AU(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 Ai(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 Ai(async()=>{const{getBundles:h}=await import("./default-node-C_5jnHCL.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 Ai(()=>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 RD:s=t.logger;const o=new kD(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 GU(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 WU(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 HU(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=HU(t,[e.name])),super(t,e),this.table=t}}W(Lr,xv,"PgColumn");const hv=Symbol.for("drizzle:isPgEnum");function XU(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"),YU=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=YU,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 qU(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 qU(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 ZU=Symbol.for("drizzle:IsDrizzleView");var jv,$v,Gv;Gv=St,$v=Qe,jv=ZU;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)}`,KU=(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 JU(...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 tk(r){return Y`not ${r}`}const ek=(r,t)=>Y`${r} > ${Sr(t,r)}`,rk=(r,t)=>Y`${r} >= ${Sr(t,r)}`,nk=(r,t)=>Y`${r} < ${Sr(t,r)}`,ik=(r,t)=>Y`${r} <= ${Sr(t,r)}`;function sk(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 ok(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 ak(r){return Y`${r} is null`}function lk(r){return Y`${r} is not null`}function uk(r){return Y`exists ${r}`}function ck(r){return Y`not exists ${r}`}function hk(r,t,e){return Y`${r} between ${Sr(t,r)} and ${Sr(e,r)}`}function dk(r,t,e){return Y`${r} not between ${Sr(t,r)} and ${Sr(e,r)}`}function fk(r,t){return Y`${r} like ${t}`}function pk(r,t){return Y`${r} not like ${t}`}function mk(r,t){return Y`${r} ilike ${t}`}function gk(r,t){return Y`${r} not ilike ${t}`}function yk(r){return Y`${r} asc`}function vk(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 _k(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 bk(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 wk(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 xk(){return{and:yf,between:hk,eq:OT,exists:uk,gt:ek,gte:rk,ilike:mk,inArray:sk,isNull:ak,isNotNull:lk,like:fk,lt:nk,lte:ik,ne:KU,not:tk,notBetween:dk,notExists:ck,notLike:pk,notIlike:gk,notInArray:ok,or:JU,sql:Y}}function Sk(){return{sql:Y,asc:yk,desc:vk}}function Tk(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 Ik(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 Ek(r){return function(e,n){return new Yu(r,e,n)}}function Ak(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 Mk(r){return{one:Ik(r),many:Ek(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 Ck(r){return(r.replace(/['\u2019]/g,"").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[]).map(e=>e.toLowerCase()).join("_")}function Ok(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 Pk(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"?Ck:t==="camelCase"?Ok:Pk}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;Ni[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"))(Ni.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 Ni(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 wi=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 F2 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 F2;function D2(r,t=new Map){return new Le(N2(r,t),Yl(r.metadata),t)}function Tx(r){return new Br(r.count,Ix(r.columns),Ex(r.columns))}function L2(r){return new Vn(Tx(r.data),r.id,r.isDelta)}function N2(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 Bi(e.count,B2(e.VALIDITY)),...Ix(e.children)],[])}function Ex(r,t=[]){for(let e=-1,n=(r||[]).length;++et+ +(e===0),0)}function U2(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 Fi;case"null":return new Fi;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 k2=zb,z2=Mo;class fr{static fromJSON(t,e){const n=new fr(0,je.V5,e);return n._createHeader=V2(t,e),n}static decode(t){t=new z2(ce(t));const e=wi.getRootAsMessage(t),n=e.bodyLength(),i=e.version(),s=e.headerType(),o=new fr(n,i,s);return o._createHeader=j2(e,s),o}static encode(t){const e=new k2;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())),wi.startMessage(e),wi.addVersion(e,je.V5),wi.addHeader(e,n),wi.addHeaderType(e,t.headerType),wi.addBodyLength(e,BigInt(t.bodyLength)),wi.finishMessageBuffer(e,wi.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 Bi{constructor(t,e){this.length=Te(t),this.nullCount=Te(e)}}function V2(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 j2(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=J2;Pe.decode=Z2;Pe.fromJSON=U2;Le.encode=K2;Le.decode=$2;Le.fromJSON=D2;Br.encode=tD;Br.decode=G2;Br.fromJSON=Tx;Vn.encode=eD;Vn.decode=W2;Vn.fromJSON=L2;Bi.encode=rD;Bi.decode=X2;Ln.encode=nD;Ln.decode=H2;function $2(r,t=new Map,e=je.V5){const n=Q2(r,t);return new Le(n,ql(r),t,e)}function G2(r,t=je.V5){if(r.compression()!==null)throw new Error("Record batch compression not implemented");return new Br(r.length(),Y2(r),q2(r,t))}function W2(r,t=je.V5){return new Vn(Br.decode(r.data(),t),r.id(),r.isDelta())}function H2(r){return new Ln(r.offset(),r.length())}function X2(r){return new Bi(r.length(),r.nullCount())}function Y2(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,iD?Co.Little:Co.Big),i!==-1&&In.addCustomMetadata(r,i),In.endSchema(r)}function J2(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 tD(r,t){const e=t.nodes||[],n=t.buffers||[];ri.startNodesVector(r,e.length);for(const o of e.slice().reverse())Bi.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 eD(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 rD(r,t){return $b.createFieldNode(r,BigInt(t.length),BigInt(t.nullCount))}function nD(r,t){return jb.createBuffer(r,BigInt(t.offset),BigInt(t.length))}const iD=(()=>{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)?hD(t):Db(t)?pD(t):Is(t)?Jt(this,void 0,void 0,function*(){return yield tn.from(yield t)}):Lb(t)||Kf(t)||Nb(t)||Uo(t)?fD(new Po(t)):dD(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 lD 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 oD(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 sD(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 fD(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 pD(r){return Jt(this,void 0,void 0,function*(){const{size:t}=yield r.stat(),e=new Bu(r,t);return t>=aD&&gp(yield e.readAt(0,tl+7&-8))?new lD(new uD(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 Bi(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 Bi(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 mD(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 gD(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 pi(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=gD;ke.prototype.visitInt=pi;ke.prototype.visitFloat=pi;ke.prototype.visitUtf8=cc;ke.prototype.visitLargeUtf8=cc;ke.prototype.visitBinary=cc;ke.prototype.visitLargeBinary=cc;ke.prototype.visitFixedSizeBinary=pi;ke.prototype.visitDate=pi;ke.prototype.visitTimestamp=pi;ke.prototype.visitTime=pi;ke.prototype.visitDecimal=pi;ke.prototype.visitList=yp;ke.prototype.visitStruct=of;ke.prototype.visitUnion=mD;ke.prototype.visitInterval=pi;ke.prototype.visitDuration=pi;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&&WR(t)?this.toDOMStream({type:"bytes"}).pipeTo(t):t&&HR(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 Ni&&!(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 Ni?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 Di(a,t.bodyLength,this._position)):t.headerType===me.DictionaryBatch&&this._dictionaryBlocks.push(new Di(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 Ni&&(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 yD(r,t="stream"){return(t==="stream"?vp:_p).writeAll(r).toUint8Array(!0)}var vD=Object.create,Nx=Object.defineProperty,_D=Object.getOwnPropertyDescriptor,bD=Object.getOwnPropertyNames,wD=Object.getPrototypeOf,xD=Object.prototype.hasOwnProperty,SD=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),TD=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of bD(t))!xD.call(r,i)&&i!==e&&Nx(r,i,{get:()=>t[i],enumerable:!(n=_D(t,i))||n.enumerable});return r},ID=(r,t,e)=>(e=r!=null?vD(wD(r)):{},TD(!r||!r.__esModule?Nx(e,"default",{value:r,enumerable:!0}):e,r)),ED=SD((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||{}),AD=(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))(AD||{}),MD=(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))(MD||{}),CD=(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))(CD||{}),OD=(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))(OD||{}),PD=(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))(PD||{}),RD=class{log(r){}},Ux=class{constructor(r=2){this.level=r}log(r){r.level>=this.level&&console.log(r)}},FD=(r=>(r[r.SUCCESS=0]="SUCCESS",r))(FD||{}),DD=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 Ni(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 LD(this._bindings,this._conn,t)}async insertArrowTable(r,t){let e=yD(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}},LD=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 Ni(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}},ND=(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))(ND||{}),BD=(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))(BD||{}),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 UD=new TextEncoder,kD=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 DD(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=UD.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 zD(){let r=new TextDecoder;return t=>(typeof SharedArrayBuffer<"u"&&t.buffer instanceof SharedArrayBuffer&&(t=new Uint8Array(t)),r.decode(t))}zD();var VD=(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))(VD||{}),jD=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])),$D=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])),GD=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])),WD=()=>(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])),HD={version:"1.29.1-dev68.0"},xp=HD.version.split(".");xp[0];xp[1];xp[2];var XD=()=>typeof navigator>"u",Fh=null,Dh=null,Lh=null,Nh=null,Bh=null;async function YD(){return Fh==null&&(Fh=typeof BigInt64Array<"u"),Dh==null&&(Dh=await $D()),Lh==null&&(Lh=await WD()),Nh==null&&(Nh=await GD()),Bh==null&&(Bh=await jD()),{bigInt64Array:Fh,crossOriginIsolated:XD()||globalThis.crossOriginIsolated||!1,wasmExceptions:Dh,wasmSIMD:Nh,wasmThreads:Lh,wasmBulkMemory:Bh}}async function Ey(r){let t=await YD();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}}ID(ED());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(qD);return e?Ay(r,e.slice(1)):NaN}}const qD=/([+-]\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 ZD=new TextDecoder("utf-8"),KD=r=>ZD.decode(r),JD=new TextEncoder,Vx=r=>JD.encode(r),An=r=>typeof r=="function",el=r=>r!=null&&Object(r)===r,tL=r=>el(r)&&An(r.then),jx=r=>el(r)&&An(r[Symbol.iterator]),eL=r=>el(r)&&An(r[Symbol.asyncIterator]),rL=r=>el(r)&&"done"in r&&"value"in r,nL=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 iL(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),aL=r=>ur(Int16Array,r),lL=r=>ur(Int32Array,r),uL=r=>ur(BigInt64Array,r),cL=r=>ur(Uint8Array,r),hL=r=>ur(Uint16Array,r),dL=r=>ur(Uint32Array,r),fL=r=>ur(BigUint64Array,r),pL=r=>ur(Float32Array,r),mL=r=>ur(Float64Array,r),gL=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 yL=r=>Xn(Int8Array,r),vL=r=>Xn(Int16Array,r),_L=r=>Xn(Int32Array,r),bL=r=>Xn(Uint8Array,r),wL=r=>Xn(Uint16Array,r),xL=r=>Xn(Uint32Array,r),SL=r=>Xn(Float32Array,r),TL=r=>Xn(Float64Array,r),IL=r=>Xn(Uint8ClampedArray,r);function mn(r,t){return br(this,arguments,function*(){if(tL(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):eL(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 EL=r=>mn(Int8Array,r),AL=r=>mn(Int16Array,r),ML=r=>mn(Int32Array,r),CL=r=>mn(Uint8Array,r),OL=r=>mn(Uint16Array,r),PL=r=>mn(Uint32Array,r),RL=r=>mn(Float32Array,r),FL=r=>mn(Float64Array,r),DL=r=>mn(Uint8ClampedArray,r);function LL(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 UL=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 kL=BigInt(4294967296)*BigInt(4294967296),zL=kL-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}<${Ui[this.unit]}>`}get ArrayType(){return this.unit===Ui.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 jL=(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?jL():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 $L(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 $L(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 Ui.DAY:return H.DateDay;case Ui.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 GL=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 WL=(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)},XL=(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)=>{WL(r,t,e.valueOf())},wS=({values:r},t,e)=>{r[t]=BigInt(e)},YL=({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)),qL=(r,t,e)=>{r.type.unit===Ui.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},ZL=(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)}},KL=({values:r,stride:t},e,n)=>{r.set(n.subarray(0,t),t*e)},JL=(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},eN=(r,t)=>(e,n,i,s)=>n&&e(n,r,t[s]),rN=(r,t)=>(e,n,i,s)=>n&&e(n,r,t.get(s)),nN=(r,t)=>(e,n,i,s)=>n&&e(n,r,t.get(i.name)),iN=(r,t)=>(e,n,i,s)=>n&&e(n,r,t[i.name]),sN=(r,t,e)=>{const n=r.type.children.map(s=>$n.getVisitFn(s.type)),i=e instanceof Map?nN(t,e):e instanceof er?rN(t,e):Array.isArray(e)?eN(t,e):iN(t,e);r.type.children.forEach((s,o)=>i(n[o],r.children[o],s,o))},oN=(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)},aN=(r,t,e)=>{var n;(n=r.dictionary)===null||n===void 0||n.set(r.values[t],e)},lN=(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},uN=(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)}},cN=(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 hN(this[cn],this[To])}}class hN{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 fN=new dN;class Bt extends he{}function Ht(r){return(t,e)=>t.getValid(e)?r(t,e):null}const pN=(r,t)=>864e5*r[t],mN=(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)},gN=({offset:r,values:t},e)=>{const n=r+e;return(t[n>>3]&1<pN(r,t),jS=({values:r},t)=>pr(r[t]),Vi=({stride:r,values:t},e)=>t[r*e],yN=({stride:r,values:t},e)=>Ip(t[r*e]),$S=({values:r},t)=>r[t],vN=({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?KD(n):null},_N=({values:r},t)=>r[t],bN=({type:r,values:t},e)=>r.precision!==Dr.HALF?t[e]:Ip(t[e]),wN=(r,t)=>r.type.unit===Ui.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)),xN=(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],SN=(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)}},TN=({values:r,stride:t},e)=>hc.decimal(r.subarray(t*e,t*(e+1))),IN=(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])},EN=(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))},AN=(r,t)=>new Ap(r,t),MN=(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)},CN=(r,t)=>{var e;return(e=r.dictionary)===null||e===void 0?void 0:e.get(r.values[t])},ON=(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],PN=(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)}},RN=(r,t)=>{const{stride:e,children:n}=r,s=n[0].slice(t*e,e);return new er([s])};Bt.prototype.visitNull=Ht(mN);Bt.prototype.visitBool=Ht(gN);Bt.prototype.visitInt=Ht(_N);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(bN);Bt.prototype.visitFloat16=Ht(yN);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(vN);Bt.prototype.visitDate=Ht(wN);Bt.prototype.visitDateDay=Ht(VS);Bt.prototype.visitDateMillisecond=Ht(jS);Bt.prototype.visitTimestamp=Ht(xN);Bt.prototype.visitTimestampSecond=Ht(HS);Bt.prototype.visitTimestampMillisecond=Ht(XS);Bt.prototype.visitTimestampMicrosecond=Ht(YS);Bt.prototype.visitTimestampNanosecond=Ht(qS);Bt.prototype.visitTime=Ht(SN);Bt.prototype.visitTimeSecond=Ht(QS);Bt.prototype.visitTimeMillisecond=Ht(ZS);Bt.prototype.visitTimeMicrosecond=Ht(KS);Bt.prototype.visitTimeNanosecond=Ht(JS);Bt.prototype.visitDecimal=Ht(TN);Bt.prototype.visitList=Ht(IN);Bt.prototype.visitStruct=Ht(AN);Bt.prototype.visitUnion=Ht(MN);Bt.prototype.visitDenseUnion=Ht(tT);Bt.prototype.visitSparseUnion=Ht(eT);Bt.prototype.visitDictionary=Ht(CN);Bt.prototype.visitInterval=Ht(ON);Bt.prototype.visitIntervalDayTime=Ht(rT);Bt.prototype.visitIntervalYearMonth=Ht(nT);Bt.prototype.visitDuration=Ht(PN);Bt.prototype.visitDurationSecond=Ht(iT);Bt.prototype.visitDurationMillisecond=Ht(sT);Bt.prototype.visitDurationMicrosecond=Ht(oT);Bt.prototype.visitDurationNanosecond=Ht(aT);Bt.prototype.visitFixedSizeList=Ht(RN);Bt.prototype.visitMap=Ht(EN);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 DN)}get[uo](){return this[df]||(this[df]=Array.from(this[lo].toArray(),String))}[Symbol.iterator](){return new FN(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 FN{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 DN{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?NN(r):Array.isArray(r)?LN(r):r instanceof er?BN(r):UN(r,!0)}function LN(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 kN(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?zN(r,e):!1}}function kN(r,t){const e=r.length;if(t.length!==e)return!1;for(let n=-1;++n>n}function jN(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 $N=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:jN,truncateBitmap:ff},Symbol.toStringTag,{value:"Module"})),GN=-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<=GN&&(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 HN(r){return r.reduce((t,e)=>t+e.nullCount,0)}function XN(r){return r.reduce((t,e,n)=>(t[n+1]=t[n]+e.length,t),new Uint32Array(r.length+1))}function YN(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 KN(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 KN(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 JN(o)})}class JN{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=XN(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 WN(this.data)}get nullCount(){return HN(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 tB.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)=>YN(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:qN($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 eB=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 gi(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 nB(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 iB(r,t){return r===t||gr(r,t)&&r.children.length===t.children.length&&Gn.compareManyFields(r.children,t.children)}function sB(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 oB(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 aB(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 lB(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=gi;zt.prototype.visitInt8=gi;zt.prototype.visitInt16=gi;zt.prototype.visitInt32=gi;zt.prototype.visitInt64=gi;zt.prototype.visitUint8=gi;zt.prototype.visitUint16=gi;zt.prototype.visitUint32=gi;zt.prototype.visitUint64=gi;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=nB;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=iB;zt.prototype.visitStruct=sB;zt.prototype.visitUnion=Dp;zt.prototype.visitDenseUnion=Dp;zt.prototype.visitSparseUnion=Dp;zt.prototype.visitDictionary=oB;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=aB;zt.prototype.visitMap=lB;const Gn=new zt;function uB(r,t){return Gn.compareSchemas(r,t)}function cB(r,t){return Gn.compareFields(r,t)}function hB(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({},VL),rB),$N),GL),NL),VN),UL),{compareSchemas:uB,compareFields:cB,compareTypes:hB}),vT=6048e5,dB=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 fB={};function mc(){return fB}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 pB(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 mB(r,t,e){const[n,i]=pB(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)/dB)}function gB(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 yB(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function vB(r){return!(!yB(r)&&typeof r!="number"||isNaN(+an(r)))}function _B(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 bB={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"}},wB=(r,t,e)=>{let n;const i=bB[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 xB={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},SB={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},TB={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},IB={date:zh({formats:xB,defaultWidth:"full"}),time:zh({formats:SB,defaultWidth:"full"}),dateTime:zh({formats:TB,defaultWidth:"full"})},EB={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},AB=(r,t,e,n)=>EB[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 MB={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},CB={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},OB={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"]},PB={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"]},RB={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"}},FB={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"}},DB=(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"},LB={ordinalNumber:DB,era:sa({values:MB,defaultWidth:"wide"}),quarter:sa({values:CB,defaultWidth:"wide",argumentCallback:r=>r-1}),month:sa({values:OB,defaultWidth:"wide"}),day:sa({values:PB,defaultWidth:"wide"}),dayPeriod:sa({values:RB,defaultWidth:"wide",formattingValues:FB,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)?BB(a,h=>h.test(o)):NB(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 NB(r,t){for(const e in r)if(Object.prototype.hasOwnProperty.call(r,e)&&t(r[e]))return e}function BB(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 kB=/^(\d+)(th|st|nd|rd)?/i,zB=/\d+/i,VB={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},jB={any:[/^b/i,/^(a|c)/i]},$B={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},GB={any:[/1/i,/2/i,/3/i,/4/i]},WB={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},HB={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]},XB={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},YB={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]},qB={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}},ZB={ordinalNumber:UB({matchPattern:kB,parsePattern:zB,valueCallback:r=>parseInt(r,10)}),era:oa({matchPatterns:VB,defaultMatchWidth:"wide",parsePatterns:jB,defaultParseWidth:"any"}),quarter:oa({matchPatterns:$B,defaultMatchWidth:"wide",parsePatterns:GB,defaultParseWidth:"any",valueCallback:r=>r+1}),month:oa({matchPatterns:WB,defaultMatchWidth:"wide",parsePatterns:HB,defaultParseWidth:"any"}),day:oa({matchPatterns:XB,defaultMatchWidth:"wide",parsePatterns:YB,defaultParseWidth:"any"}),dayPeriod:oa({matchPatterns:qB,defaultMatchWidth:"any",parsePatterns:QB,defaultParseWidth:"any"})},KB={code:"en-US",formatDistance:wB,formatLong:IB,formatRelative:AB,localize:LB,match:ZB,options:{weekStartsOn:0,firstWeekContainsDate:1}};function JB(r,t){const e=an(r,t==null?void 0:t.in);return mB(e,_B(e))+1}function tU(r,t){const e=an(r,t==null?void 0:t.in),n=+Gu(e)-+gB(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 eU(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 rU(r,t){const e=an(r,t==null?void 0:t.in),n=+Wa(e,t)-+eU(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 xi={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 xi.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 xi.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=rU(r,n);return t==="wo"?e.ordinalNumber(i,{unit:"week"}):we(i,t.length)},I:function(r,t,e){const n=tU(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"}):xi.d(r,t)},D:function(r,t,e){const n=JB(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 xi.h(r,t)},H:function(r,t,e){return t==="Ho"?e.ordinalNumber(r.getHours(),{unit:"hour"}):xi.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"}):xi.m(r,t)},s:function(r,t,e){return t==="so"?e.ordinalNumber(r.getSeconds(),{unit:"second"}):xi.s(r,t)},S:function(r,t){return xi.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"})}},nU=(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))},iU={p:wT,P:nU},sU=/^D+$/,oU=/^Y+$/,aU=["D","DD","YY","YYYY"];function lU(r){return sU.test(r)}function uU(r){return oU.test(r)}function cU(r,t,e){const n=hU(r,t,e);if(console.warn(n),aU.includes(r))throw new RangeError(n)}function hU(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 dU=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,fU=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,pU=/^'([^]*?)'?$/,mU=/''/g,gU=/[a-zA-Z]/;function xT(r,t,e){var c,h,f,d;const n=mc(),i=n.locale??KB,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(!vB(a))throw new RangeError("Invalid time value");let l=t.match(fU).map(m=>{const g=m[0];if(g==="p"||g==="P"){const p=iU[g];return p(m,i.formatLong)}return m}).join("").match(dU).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const g=m[0];if(g==="'")return{isToken:!1,value:yU(m)};if(ov[g])return{isToken:!0,value:m};if(g.match(gU))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;(uU(g)||lU(g))&&cU(g,t,String(r));const p=ov[g[0]];return p(a,g,i.localize,u)}).join("")}function yU(r){const t=r.match(pU);return t?t[1].replace(mU,"'"):r}function vU(r,t){return an(r*1e3,t==null?void 0:t.in)}function _U(r,t){const e=bU(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 bU(r){var t;return typeof r=="function"&&((t=r.prototype)==null?void 0:t.constructor)===r}function wU(r,t){let e=r.length;switch("string"){case"string":{if(t.length!==1)throw new Error("The 'chars' parameter should be a single character string.");for(;e>0&&r[e-1]===t;)e--;break}}return r.substring(0,e)}function Tr(r){return r==null}function xU(r){return r!=null}async function pf(){if(typeof window<"u"&&window!==null)return"browser";try{const r=await Ai(()=>import("./__vite-browser-external-FmFgRqLi.js"),[]);return typeof r<"u"&&r.versions!=null&&r.versions.node!=null?"node":"unknown"}catch{return"unknown"}}function SU(r){return Tr(r)?!1:Ct.isInt(r.type)&&!ST(r)||TU(r)}function TU(r){return Tr(r)?!1:Ct.isInt(r.type)&&r.type.isSigned===!1}function IU(r){return Tr(r)?!1:Ct.isFloat(r.type)??!1}function EU(r){return Tr(r)?!1:Ct.isDecimal(r.type)}function AU(r){return Tr(r)?!1:Ct.isBool(r.type)}function MU(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 CU(r){return Tr(r)?!1:Ct.isTimestamp(r.type)}function OU(r){return Tr(r)?!1:Ct.isDate(r.type)}function PU(r){return Tr(r)?!1:Ct.isTime(r.type)}function RU(r){return Tr(r)?!1:Ct.isList(r.type)||Ct.isFixedSizeList(r.type)}function FU(r){return Tr(r)?!1:Ct.isStruct(r.type)||Ct.isMap(r.type)}function DU(r){return Tr(r)?!1:Ct.isStruct(r.type)&&r.metadata.get("ARROW:extension:name")==="interval"||Ct.isInterval(r.type)}function LU(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 NU(r,t){var n;const e=LU(r,((n=t==null?void 0:t.type)==null?void 0:n.unit)??te.SECOND);return vU(e)}function BU(r,t){const e=NU(r,t);return xT(e,e.getMilliseconds()===0?"HH:mm:ss":"HH:mm:ss.SSS")}function UU(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 kU(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),_U(e,Date)}function zU(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=wU(n.slice(-e),"0")||"";return`${i}${s}${o?`.${o}`:""}`}function VU(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 jU(r,t){var n,i,s,o;if(Ct.isInterval(t==null?void 0:t.type))return VU(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 $U(r,t){return(t==null?void 0:t.type)instanceof hf?JSON.parse(JSON.stringify(r,(e,n)=>{if(xU(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&&OU(t))return UU(r);if(typeof r=="bigint"&&PU(t))return BU(Number(r),t);if(e&&CU(t))return kU(r,t);if(ST(t))throw new Error("Period type is not supported yet");if(DU(t))return jU(r,t);if(MU(t))throw new Error("Duration type is not supported yet");return EU(t)?zU(r,t):IU(t)&&Number.isFinite(r)||SU(t)?r:FU(t)||RU(t)?$U(r,t):AU(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 Ai(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 Ai(async()=>{const{getBundles:h}=await import("./default-node-xSlPiRPI.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 Ai(()=>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 RD:s=t.logger;const o=new kD(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 GU(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 WU(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 HU(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=HU(t,[e.name])),super(t,e),this.table=t}}W(Lr,xv,"PgColumn");const hv=Symbol.for("drizzle:isPgEnum");function XU(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"),YU=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=YU,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 qU(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 qU(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 ZU=Symbol.for("drizzle:IsDrizzleView");var jv,$v,Gv;Gv=St,$v=Qe,jv=ZU;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)}`,KU=(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 JU(...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 tk(r){return Y`not ${r}`}const ek=(r,t)=>Y`${r} > ${Sr(t,r)}`,rk=(r,t)=>Y`${r} >= ${Sr(t,r)}`,nk=(r,t)=>Y`${r} < ${Sr(t,r)}`,ik=(r,t)=>Y`${r} <= ${Sr(t,r)}`;function sk(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 ok(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 ak(r){return Y`${r} is null`}function lk(r){return Y`${r} is not null`}function uk(r){return Y`exists ${r}`}function ck(r){return Y`not exists ${r}`}function hk(r,t,e){return Y`${r} between ${Sr(t,r)} and ${Sr(e,r)}`}function dk(r,t,e){return Y`${r} not between ${Sr(t,r)} and ${Sr(e,r)}`}function fk(r,t){return Y`${r} like ${t}`}function pk(r,t){return Y`${r} not like ${t}`}function mk(r,t){return Y`${r} ilike ${t}`}function gk(r,t){return Y`${r} not ilike ${t}`}function yk(r){return Y`${r} asc`}function vk(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 _k(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 bk(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 wk(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 xk(){return{and:yf,between:hk,eq:OT,exists:uk,gt:ek,gte:rk,ilike:mk,inArray:sk,isNull:ak,isNotNull:lk,like:fk,lt:nk,lte:ik,ne:KU,not:tk,notBetween:dk,notExists:ck,notLike:pk,notIlike:gk,notInArray:ok,or:JU,sql:Y}}function Sk(){return{sql:Y,asc:yk,desc:vk}}function Tk(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 Ik(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 Ek(r){return function(e,n){return new Yu(r,e,n)}}function Ak(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 Mk(r){return{one:Ik(r),many:Ek(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 Ck(r){return(r.replace(/['\u2019]/g,"").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[]).map(e=>e.toLowerCase()).join("_")}function Ok(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 Pk(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"?Ck:t==="camelCase"?Ok:Pk}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 L;u&&u.length>0&&(L=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}${L}${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(),L=lt(B,Pt)?B:Y.param(B,E);T.push(L)}else if(!E.default&&E.onUpdateFn!==void 0){const B=E.onUpdateFn(),L=lt(B,Pt)?B:Y.param(B,E);T.push(L)}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,xk()):o.where;m=w&&Xu(w,a)}const _=[];let S=[];if(o.columns){let w=!1;for(const[B,L]of Object.entries(o.columns))L!==void 0&&B in s.columns&&(!w&&L===!0&&(w=!0),S.push(B));S.length>0&&(S=w?S.filter(B=>{var L;return((L=o.columns)==null?void 0:L[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,Sk()):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:L}of T){const $=Ak(e,n,L),it=Xa(L.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(L,Os)?B===!0?{limit:1}:{...B,limit:1}:B,tableAlias:Z,joinOn:x,nestedQueryRelation:L}),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=bk(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(Rk()):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");_k(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 Rk=()=>({union:Fk,unionAll:Dk,intersect:Lk,intersectAll:Nk,except:Bk,exceptAll:Uk}),Fk=zo("union",!1),Dk=zo("union",!0),Lk=zo("intersect",!1),Nk=zo("intersect",!0),Bk=zo("except",!1),Uk=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 kk(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 GU(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 WU(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=Tk(t.schema,Mk);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=kk(r);let n;return e.bundles==="import-url"?n=(async()=>{const s=await pf();switch(s){case"browser":return(await Ai(async()=>{const{getImportUrlBundles:o}=await import("./import-url-browser-CPN8ipMD.js");return{getImportUrlBundles:o}},__vite__mapDeps([3,4]))).getImportUrlBundles();case"node":return await(await Ai(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 Ai(async()=>{const{getBundles:o}=await import("./default-browser-BrgSDbLD.js");return{getBundles:o}},[])).getBundles();case"node":return await(await Ai(async()=>{const{getBundles:o}=await import("./default-node-C_5jnHCL.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(wk(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 L;u&&u.length>0&&(L=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}${L}${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(),L=lt(B,Pt)?B:Y.param(B,E);T.push(L)}else if(!E.default&&E.onUpdateFn!==void 0){const B=E.onUpdateFn(),L=lt(B,Pt)?B:Y.param(B,E);T.push(L)}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,xk()):o.where;m=w&&Xu(w,a)}const _=[];let S=[];if(o.columns){let w=!1;for(const[B,L]of Object.entries(o.columns))L!==void 0&&B in s.columns&&(!w&&L===!0&&(w=!0),S.push(B));S.length>0&&(S=w?S.filter(B=>{var L;return((L=o.columns)==null?void 0:L[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,Sk()):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:L}of T){const $=Ak(e,n,L),it=Xa(L.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(L,Os)?B===!0?{limit:1}:{...B,limit:1}:B,tableAlias:Z,joinOn:x,nestedQueryRelation:L}),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=bk(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(Rk()):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");_k(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 Rk=()=>({union:Fk,unionAll:Dk,intersect:Lk,intersectAll:Nk,except:Bk,exceptAll:Uk}),Fk=zo("union",!1),Dk=zo("union",!0),Lk=zo("intersect",!1),Nk=zo("intersect",!0),Bk=zo("except",!1),Uk=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 kk(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 GU(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 WU(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=Tk(t.schema,Mk);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=kk(r);let n;return e.bundles==="import-url"?n=(async()=>{const s=await pf();switch(s){case"browser":return(await Ai(async()=>{const{getImportUrlBundles:o}=await import("./import-url-browser-CPN8ipMD.js");return{getImportUrlBundles:o}},__vite__mapDeps([3,4]))).getImportUrlBundles();case"node":return await(await Ai(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 Ai(async()=>{const{getBundles:o}=await import("./default-browser-BrgSDbLD.js");return{getBundles:o}},[])).getBundles();case"node":return await(await Ai(async()=>{const{getBundles:o}=await import("./default-node-xSlPiRPI.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(wk(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/TestDummyMarker.vue_vue_type_script_setup_true_lang-CG5q9Jpo.js b/assets/TestDummyMarker.vue_vue_type_script_setup_true_lang-7UKgQXIZ.js similarity index 98% rename from assets/TestDummyMarker.vue_vue_type_script_setup_true_lang-CG5q9Jpo.js rename to assets/TestDummyMarker.vue_vue_type_script_setup_true_lang-7UKgQXIZ.js index f0bbdb7432571dfa47ed63622b48338151691330..f5c799ff6ed67d4977ba7b6bdf058ce23dbaf945 100644 --- a/assets/TestDummyMarker.vue_vue_type_script_setup_true_lang-CG5q9Jpo.js +++ b/assets/TestDummyMarker.vue_vue_type_script_setup_true_lang-7UKgQXIZ.js @@ -1 +1 @@ -import{bx as A,d as m,c3 as I,bW as g,c4 as T,c0 as x,x as f,o as c,y,m as w,u as i,b$ as R,cd as N,g as $,h as b,cp as E,bY as D,cq as L,w as z,c as V,by as H,E as K,cr as U,C as W,cs as Y,bM as G,bJ as q,b as k,bI as X,a as _,D as M,n as S,bn as F,br as C,l as J,H as Q}from"./index-D8Nm21zW.js";import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";function O(t){return t?t.flatMap(e=>e.type===A?O(e.children):[e]):[]}const Z=m({name:"PrimitiveSlot",inheritAttrs:!1,setup(t,{attrs:e,slots:r}){return()=>{var p,v;if(!r.default)return null;const a=O(r.default()),n=a.findIndex(d=>d.type!==I);if(n===-1)return a;const l=a[n];(p=l.props)==null||delete p.ref;const o=l.props?g(e,l.props):e;e.class&&((v=l.props)!=null&&v.class)&&delete l.props.class;const u=T(l,o);for(const d in o)d.startsWith("on")&&(u.props||(u.props={}),u.props[d]=o[d]);return a.length===1?u:(a[n]=u,a)}}}),ee=["area","img","input"],B=m({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(t,{attrs:e,slots:r}){const a=t.asChild?"template":t.as;return typeof a=="string"&&ee.includes(a)?()=>x(a,e):a!=="template"?()=>x(t.as,e,{default:r.default}):()=>x(Z,e,{default:r.default})}}),te=m({__name:"VisuallyHidden",props:{feature:{default:"focusable"},asChild:{type:Boolean},as:{default:"span"}},setup(t){return(e,r)=>(c(),f(i(B),{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:y(()=>[w(e.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}});function ae(t,e){const r=`${t}Context`,a=Symbol(r);return[o=>{const u=R(a,o);if(u||u===null)return u;throw new Error(`Injection \`${a.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`)},o=>(N(a,o),o)]}function P(){const t=D(),e=$(),r=b(()=>{var o,u;return["#text","#comment"].includes((o=e.value)==null?void 0:o.$el.nodeName)?(u=e.value)==null?void 0:u.$el.nextElementSibling:E(e)}),a=Object.assign({},t.exposed),n={};for(const o in t.props)Object.defineProperty(n,o,{enumerable:!0,configurable:!0,get:()=>t.props[o]});if(Object.keys(a).length>0)for(const o in a)Object.defineProperty(n,o,{enumerable:!0,configurable:!0,get:()=>a[o]});Object.defineProperty(n,"$el",{enumerable:!0,configurable:!0,get:()=>t.vnode.el}),t.exposed=n;function l(o){e.value=o,o&&(Object.defineProperty(n,"$el",{enumerable:!0,configurable:!0,get:()=>o instanceof Element?o:o.$el}),t.exposed=n)}return{forwardRef:l,currentRef:e,currentElement:r}}function ne(){const t=$(),e=b(()=>{var r,a;return["#text","#comment"].includes((r=t.value)==null?void 0:r.$el.nodeName)?(a=t.value)==null?void 0:a.$el.nextElementSibling:E(t)});return{primitiveElement:t,currentElement:e}}function re(t){return b(()=>{var e;return L(t)?!!((e=E(t))!=null&&e.closest("form")):!0})}const j=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:r,currentElement:a}=ne(),n=b(()=>e.checked??e.value);return z(n,(l,o)=>{if(!a.value)return;const u=a.value,p=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(p,"value").set;if(d&&l!==o){const s=new Event("input",{bubbles:!0}),h=new Event("change",{bubbles:!0});d.call(u,l),u.dispatchEvent(s),u.dispatchEvent(h)}}),(l,o)=>(c(),f(te,g({ref_key:"primitiveElement",ref:r},{...e,...l.$attrs},{as:"input"}),null,16))}}),oe=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,r=b(()=>typeof e.value=="object"&&Array.isArray(e.value)&&e.value.length===0&&e.required),a=b(()=>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((n,l)=>typeof n=="object"?Object.entries(n).map(([o,u])=>({name:`[${e.name}][${l}][${o}]`,value:u})):{name:`[${e.name}][${l}]`,value:n}):e.value!==null&&typeof e.value=="object"&&!Array.isArray(e.value)?Object.entries(e.value).map(([n,l])=>({name:`[${e.name}][${n}]`,value:l})):[]);return(n,l)=>r.value?(c(),f(j,g({key:n.name},{...e,...n.$attrs},{name:n.name,value:n.value}),null,16,["name","value"])):(c(!0),V(A,{key:1},H(a.value,o=>(c(),f(j,g({key:o.name,ref_for:!0},{...e,...n.$attrs},{name:o.name,value:o.value}),null,16,["name","value"]))),128))}}),[le,se]=ae("SwitchRoot"),ue=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 r=t,a=e,{disabled:n}=K(r),l=U(r,"modelValue",a,{defaultValue:r.defaultValue,passive:r.modelValue===void 0});function o(){n.value||(l.value=!l.value)}const{forwardRef:u,currentElement:p}=P(),v=re(p),d=b(()=>{var s;return r.id&&p.value?(s=document.querySelector(`[for="${r.id}"]`))==null?void 0:s.innerText:void 0});return se({modelValue:l,toggleCheck:o,disabled:n}),(s,h)=>(c(),f(i(B),g(s.$attrs,{id:s.id,ref:i(u),role:"switch",type:s.as==="button"?"button":void 0,value:s.value,"aria-label":s.$attrs["aria-label"]||d.value,"aria-checked":i(l),"aria-required":s.required,"data-state":i(l)?"checked":"unchecked","data-disabled":i(n)?"":void 0,"as-child":s.asChild,as:s.as,disabled:i(n),onClick:o,onKeydown:Y(G(o,["prevent"]),["enter"])}),{default:y(()=>[w(s.$slots,"default",{modelValue:i(l)}),i(v)&&s.name?(c(),f(i(oe),{key:0,type:"checkbox",name:s.name,disabled:i(n),required:s.required,value:s.value,checked:!!i(l)},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"]))}}),ie=m({__name:"SwitchThumb",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=le();return P(),(r,a)=>{var n;return c(),f(i(B),{"data-state":(n=i(e).modelValue)!=null&&n.value?"checked":"unchecked","data-disabled":i(e).disabled.value?"":void 0,"as-child":r.asChild,as:r.as},{default:y(()=>[w(r.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"])}}}),de=m({__name:"Checkbox",props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(t){const e=q(t,"modelValue");return(r,a)=>(c(),f(i(ue),{modelValue:e.value,"onUpdate:modelValue":a[0]||(a[0]=n=>e.value=n),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:y(()=>[k(i(ie),{"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"]))}}),ce={flex:"~ col gap-4"},me={flex:"~ row","items-center":"","gap-2":""},pe={flex:"1"},fe={class:"flex items-center gap-1 text-sm font-medium"},ve={class:"text-xs text-neutral-500 dark:text-neutral-400"},ke=m({__name:"FieldCheckbox",props:X({label:null,description:null},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,r=q(t,"modelValue");return(a,n)=>(c(),V("label",ce,[_("div",me,[_("div",pe,[_("div",fe,M(e.label),1),_("div",ve,M(e.description),1)]),k(de,{modelValue:r.value,"onUpdate:modelValue":n[0]||(n[0]=l=>r.value=l)},null,8,["modelValue"])])]))}}),he=m({__name:"Volumed",props:{perspective:null,transform:null},setup(t){return(e,r)=>(c(),V("div",{class:"volumed",style:S({perspective:`${t.perspective}px`,transform:t.transform})},[w(e.$slots,"default",{},void 0,!0)],4))}}),be=F(he,[["__scopeId","data-v-568551bc"]]),ye=m({__name:"CursorMomentum",props:{baseSpeed:{default:.1},friction:{default:.95},momentumFactor:{default:.005}},setup(t,{expose:e}){const r=t,a=$(1),n=$(0);let l=0;const o=C(()=>r.friction),u=C(()=>r.baseSpeed),p=C(()=>r.momentumFactor);function v(s){l||(l=s);const h=s-l;l=s,a.value=u.value+(a.value-u.value)*o.value,n.value+=a.value*h,requestAnimationFrame(v)}function d(s){const h=Math.sqrt(s.movementX**2+s.movementY**2);a.value+=h*p.value}return J(()=>{window.addEventListener("mousemove",d),requestAnimationFrame(v)}),Q(()=>{window.removeEventListener("mousemove",d)}),e({momentum:a,currentValue:n}),(s,h)=>w(s.$slots,"default",{momentum:a.value,currentValue:n.value})}}),_e=m({__name:"TestDummyMarkerFlat",props:{size:null},setup(t){return(e,r)=>(c(),V("div",{class:"test-dummy-flat",style:S({width:`${t.size}px`,height:`${t.size}px`})},r[0]||(r[0]=[_("div",{class:"marker"},null,-1)]),4))}}),ge=F(_e,[["__scopeId","data-v-b4ef37ac"]]),Ve=m({__name:"TestDummyMarker",setup(t){return(e,r)=>(c(),f(ye,{"base-speed":.1,friction:.95,"momentum-factor":5e-4},{default:y(({currentValue:a})=>[k(be,{perspective:800,transform:"rotateX(45deg) translateY(3px)"},{default:y(()=>[k(ge,{size:24,style:S({transform:`rotate(${a}deg)`})},null,8,["style"])]),_:2},1024)]),_:1}))}});export{ke as _,Ve as a}; +import{bx as A,d as m,c3 as I,bW as g,c4 as T,c0 as x,x as f,o as c,y,m as w,u as i,b$ as R,cd as N,g as $,h as b,cp as E,bY as D,cq as L,w as z,c as V,by as H,E as K,cr as U,C as W,cs as Y,bM as G,bJ as q,b as k,bI as X,a as _,D as M,n as S,bn as F,br as C,l as J,H as Q}from"./index-_NYoebRU.js";import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";function O(t){return t?t.flatMap(e=>e.type===A?O(e.children):[e]):[]}const Z=m({name:"PrimitiveSlot",inheritAttrs:!1,setup(t,{attrs:e,slots:r}){return()=>{var p,v;if(!r.default)return null;const a=O(r.default()),n=a.findIndex(d=>d.type!==I);if(n===-1)return a;const l=a[n];(p=l.props)==null||delete p.ref;const o=l.props?g(e,l.props):e;e.class&&((v=l.props)!=null&&v.class)&&delete l.props.class;const u=T(l,o);for(const d in o)d.startsWith("on")&&(u.props||(u.props={}),u.props[d]=o[d]);return a.length===1?u:(a[n]=u,a)}}}),ee=["area","img","input"],B=m({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(t,{attrs:e,slots:r}){const a=t.asChild?"template":t.as;return typeof a=="string"&&ee.includes(a)?()=>x(a,e):a!=="template"?()=>x(t.as,e,{default:r.default}):()=>x(Z,e,{default:r.default})}}),te=m({__name:"VisuallyHidden",props:{feature:{default:"focusable"},asChild:{type:Boolean},as:{default:"span"}},setup(t){return(e,r)=>(c(),f(i(B),{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:y(()=>[w(e.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}});function ae(t,e){const r=`${t}Context`,a=Symbol(r);return[o=>{const u=R(a,o);if(u||u===null)return u;throw new Error(`Injection \`${a.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`)},o=>(N(a,o),o)]}function P(){const t=D(),e=$(),r=b(()=>{var o,u;return["#text","#comment"].includes((o=e.value)==null?void 0:o.$el.nodeName)?(u=e.value)==null?void 0:u.$el.nextElementSibling:E(e)}),a=Object.assign({},t.exposed),n={};for(const o in t.props)Object.defineProperty(n,o,{enumerable:!0,configurable:!0,get:()=>t.props[o]});if(Object.keys(a).length>0)for(const o in a)Object.defineProperty(n,o,{enumerable:!0,configurable:!0,get:()=>a[o]});Object.defineProperty(n,"$el",{enumerable:!0,configurable:!0,get:()=>t.vnode.el}),t.exposed=n;function l(o){e.value=o,o&&(Object.defineProperty(n,"$el",{enumerable:!0,configurable:!0,get:()=>o instanceof Element?o:o.$el}),t.exposed=n)}return{forwardRef:l,currentRef:e,currentElement:r}}function ne(){const t=$(),e=b(()=>{var r,a;return["#text","#comment"].includes((r=t.value)==null?void 0:r.$el.nodeName)?(a=t.value)==null?void 0:a.$el.nextElementSibling:E(t)});return{primitiveElement:t,currentElement:e}}function re(t){return b(()=>{var e;return L(t)?!!((e=E(t))!=null&&e.closest("form")):!0})}const j=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:r,currentElement:a}=ne(),n=b(()=>e.checked??e.value);return z(n,(l,o)=>{if(!a.value)return;const u=a.value,p=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(p,"value").set;if(d&&l!==o){const s=new Event("input",{bubbles:!0}),h=new Event("change",{bubbles:!0});d.call(u,l),u.dispatchEvent(s),u.dispatchEvent(h)}}),(l,o)=>(c(),f(te,g({ref_key:"primitiveElement",ref:r},{...e,...l.$attrs},{as:"input"}),null,16))}}),oe=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,r=b(()=>typeof e.value=="object"&&Array.isArray(e.value)&&e.value.length===0&&e.required),a=b(()=>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((n,l)=>typeof n=="object"?Object.entries(n).map(([o,u])=>({name:`[${e.name}][${l}][${o}]`,value:u})):{name:`[${e.name}][${l}]`,value:n}):e.value!==null&&typeof e.value=="object"&&!Array.isArray(e.value)?Object.entries(e.value).map(([n,l])=>({name:`[${e.name}][${n}]`,value:l})):[]);return(n,l)=>r.value?(c(),f(j,g({key:n.name},{...e,...n.$attrs},{name:n.name,value:n.value}),null,16,["name","value"])):(c(!0),V(A,{key:1},H(a.value,o=>(c(),f(j,g({key:o.name,ref_for:!0},{...e,...n.$attrs},{name:o.name,value:o.value}),null,16,["name","value"]))),128))}}),[le,se]=ae("SwitchRoot"),ue=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 r=t,a=e,{disabled:n}=K(r),l=U(r,"modelValue",a,{defaultValue:r.defaultValue,passive:r.modelValue===void 0});function o(){n.value||(l.value=!l.value)}const{forwardRef:u,currentElement:p}=P(),v=re(p),d=b(()=>{var s;return r.id&&p.value?(s=document.querySelector(`[for="${r.id}"]`))==null?void 0:s.innerText:void 0});return se({modelValue:l,toggleCheck:o,disabled:n}),(s,h)=>(c(),f(i(B),g(s.$attrs,{id:s.id,ref:i(u),role:"switch",type:s.as==="button"?"button":void 0,value:s.value,"aria-label":s.$attrs["aria-label"]||d.value,"aria-checked":i(l),"aria-required":s.required,"data-state":i(l)?"checked":"unchecked","data-disabled":i(n)?"":void 0,"as-child":s.asChild,as:s.as,disabled:i(n),onClick:o,onKeydown:Y(G(o,["prevent"]),["enter"])}),{default:y(()=>[w(s.$slots,"default",{modelValue:i(l)}),i(v)&&s.name?(c(),f(i(oe),{key:0,type:"checkbox",name:s.name,disabled:i(n),required:s.required,value:s.value,checked:!!i(l)},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"]))}}),ie=m({__name:"SwitchThumb",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=le();return P(),(r,a)=>{var n;return c(),f(i(B),{"data-state":(n=i(e).modelValue)!=null&&n.value?"checked":"unchecked","data-disabled":i(e).disabled.value?"":void 0,"as-child":r.asChild,as:r.as},{default:y(()=>[w(r.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"])}}}),de=m({__name:"Checkbox",props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(t){const e=q(t,"modelValue");return(r,a)=>(c(),f(i(ue),{modelValue:e.value,"onUpdate:modelValue":a[0]||(a[0]=n=>e.value=n),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:y(()=>[k(i(ie),{"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"]))}}),ce={flex:"~ col gap-4"},me={flex:"~ row","items-center":"","gap-2":""},pe={flex:"1"},fe={class:"flex items-center gap-1 text-sm font-medium"},ve={class:"text-xs text-neutral-500 dark:text-neutral-400"},ke=m({__name:"FieldCheckbox",props:X({label:null,description:null},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,r=q(t,"modelValue");return(a,n)=>(c(),V("label",ce,[_("div",me,[_("div",pe,[_("div",fe,M(e.label),1),_("div",ve,M(e.description),1)]),k(de,{modelValue:r.value,"onUpdate:modelValue":n[0]||(n[0]=l=>r.value=l)},null,8,["modelValue"])])]))}}),he=m({__name:"Volumed",props:{perspective:null,transform:null},setup(t){return(e,r)=>(c(),V("div",{class:"volumed",style:S({perspective:`${t.perspective}px`,transform:t.transform})},[w(e.$slots,"default",{},void 0,!0)],4))}}),be=F(he,[["__scopeId","data-v-568551bc"]]),ye=m({__name:"CursorMomentum",props:{baseSpeed:{default:.1},friction:{default:.95},momentumFactor:{default:.005}},setup(t,{expose:e}){const r=t,a=$(1),n=$(0);let l=0;const o=C(()=>r.friction),u=C(()=>r.baseSpeed),p=C(()=>r.momentumFactor);function v(s){l||(l=s);const h=s-l;l=s,a.value=u.value+(a.value-u.value)*o.value,n.value+=a.value*h,requestAnimationFrame(v)}function d(s){const h=Math.sqrt(s.movementX**2+s.movementY**2);a.value+=h*p.value}return J(()=>{window.addEventListener("mousemove",d),requestAnimationFrame(v)}),Q(()=>{window.removeEventListener("mousemove",d)}),e({momentum:a,currentValue:n}),(s,h)=>w(s.$slots,"default",{momentum:a.value,currentValue:n.value})}}),_e=m({__name:"TestDummyMarkerFlat",props:{size:null},setup(t){return(e,r)=>(c(),V("div",{class:"test-dummy-flat",style:S({width:`${t.size}px`,height:`${t.size}px`})},r[0]||(r[0]=[_("div",{class:"marker"},null,-1)]),4))}}),ge=F(_e,[["__scopeId","data-v-b4ef37ac"]]),Ve=m({__name:"TestDummyMarker",setup(t){return(e,r)=>(c(),f(ye,{"base-speed":.1,friction:.95,"momentum-factor":5e-4},{default:y(({currentValue:a})=>[k(be,{perspective:800,transform:"rotateX(45deg) translateY(3px)"},{default:y(()=>[k(ge,{size:24,style:S({transform:`rotate(${a}deg)`})},null,8,["style"])]),_:2},1024)]),_:1}))}});export{ke as _,Ve as a}; diff --git a/assets/Textarea.vue_vue_type_script_setup_true_lang-CP4Ap1fe.js b/assets/Textarea.vue_vue_type_script_setup_true_lang-akwsm8zZ.js similarity index 81% rename from assets/Textarea.vue_vue_type_script_setup_true_lang-CP4Ap1fe.js rename to assets/Textarea.vue_vue_type_script_setup_true_lang-akwsm8zZ.js index 0ac3ecaecd10250fcd346234d67222ec84b045c1..149f80beb12af4ce3ba74518f748477799df98a3 100644 --- a/assets/Textarea.vue_vue_type_script_setup_true_lang-CP4Ap1fe.js +++ b/assets/Textarea.vue_vue_type_script_setup_true_lang-akwsm8zZ.js @@ -1 +1 @@ -import{_ as u}from"./Basic.vue_vue_type_script_setup_true_lang-CrXWH1a1.js";import{d as t,bJ as r,x as n,o as d}from"./index-D8Nm21zW.js";const p=t({__name:"Textarea",props:{modelValue:{default:""},modelModifiers:{}},emits:["update:modelValue"],setup(o){const e=r(o,"modelValue");return(s,a)=>(d(),n(u,{modelValue:e.value,"onUpdate:modelValue":a[0]||(a[0]=l=>e.value=l),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","rounded-lg":"","px-3":"","py-2":"","text-sm":"","outline-none":""},null,8,["modelValue"]))}});export{p as _}; +import{_ as u}from"./Basic.vue_vue_type_script_setup_true_lang-C4n90OG-.js";import{d as t,bJ as r,x as n,o as d}from"./index-_NYoebRU.js";const p=t({__name:"Textarea",props:{modelValue:{default:""},modelModifiers:{}},emits:["update:modelValue"],setup(o){const e=r(o,"modelValue");return(s,a)=>(d(),n(u,{modelValue:e.value,"onUpdate:modelValue":a[0]||(a[0]=l=>e.value=l),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","rounded-lg":"","px-3":"","py-2":"","text-sm":"","outline-none":""},null,8,["modelValue"]))}});export{p as _}; diff --git a/assets/TransitionVertical.vue_vue_type_script_setup_true_lang-CL9MLblt.js b/assets/TransitionVertical.vue_vue_type_script_setup_true_lang-Cx39i7VD.js similarity index 93% rename from assets/TransitionVertical.vue_vue_type_script_setup_true_lang-CL9MLblt.js rename to assets/TransitionVertical.vue_vue_type_script_setup_true_lang-Cx39i7VD.js index a09670422d5929a16a56beb8fa4618446a0efe8e..4515614a13e486332ff57bdece7c425efbeda12e 100644 --- a/assets/TransitionVertical.vue_vue_type_script_setup_true_lang-CL9MLblt.js +++ b/assets/TransitionVertical.vue_vue_type_script_setup_true_lang-Cx39i7VD.js @@ -1 +1 @@ -import{d as m,x as T,o as l,bB as B,y as b,m as v}from"./index-D8Nm21zW.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-_NYoebRU.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_-D8yjOAQK.js b/assets/_...all_-CTir8ssX.js similarity index 64% rename from assets/_...all_-D8yjOAQK.js rename to assets/_...all_-CTir8ssX.js index 9f84c20eb6ae0acb27d1792b2a535ebceaa2ee24..5ffbd3a59bfdf9e1978ff76b048e88a41a462158 100644 --- a/assets/_...all_-D8yjOAQK.js +++ b/assets/_...all_-CTir8ssX.js @@ -1 +1 @@ -import{bn as e,c as n,o as c}from"./index-D8Nm21zW.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-_NYoebRU.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-DeGSbHPj.js b/assets/airi-card-BWLSOH_H.js similarity index 94% rename from assets/airi-card-DeGSbHPj.js rename to assets/airi-card-BWLSOH_H.js index 7fcae970f5f2fb615ed8b2cf5bc8b06a212b5649..75cb4dadc8cd51eb69dea3fdbfd5ba25c1946b09 100644 --- a/assets/airi-card-DeGSbHPj.js +++ b/assets/airi-card-BWLSOH_H.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-D8Nm21zW.js";import{j as G}from"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import{u as H}from"./consciousness-CgTB9b9w.js";import{u as N}from"./speech-B27BwGQ-.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-_NYoebRU.js";import{j as G}from"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import{u as H}from"./consciousness-Ch13RX1M.js";import{u as N}from"./speech-DTX8fpM-.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/alibaba-cloud-model-studio-BPTuNUid.js b/assets/alibaba-cloud-model-studio-B6gemIgl.js similarity index 72% rename from assets/alibaba-cloud-model-studio-BPTuNUid.js rename to assets/alibaba-cloud-model-studio-B6gemIgl.js index 564c7c8b1e4fec684de54690d378cacf5ce59ea6..a8fc22261cea8a31625f987e66b1b51c05158547 100644 --- a/assets/alibaba-cloud-model-studio-BPTuNUid.js +++ b/assets/alibaba-cloud-model-studio-B6gemIgl.js @@ -1 +1 @@ -import{_ as m}from"./FieldRange.vue_vue_type_script_setup_true_lang-B670Jjy-.js";import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import{d as M,g as u,s as S,q as F,h as V,l as $,w as v,x as k,o as B,y as h,b as c,u as i,a as I}from"./index-D8Nm21zW.js";import{u as U}from"./providers-DUDq6kdm.js";import{u as E}from"./speech-B27BwGQ-.js";import{_ as K,a as L}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-Cscdqs1L.js";import"./index-Be1NqeGb.js";import"./TestDummyMarker.vue_vue_type_script_setup_true_lang-CG5q9Jpo.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-Blzu2N2U.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-CYg3DjVq.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-CL9MLblt.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BNHdvI3g.js";import"./Input.vue_vue_type_script_setup_true_lang-DacRzqGb.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DFTTO3aS.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-Bq_0Y-1M.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js";const N={flex:"~ col gap-4"},o="alibaba-cloud-model-studio",y="cosyvoice-v1",oe=M({__name:"alibaba-cloud-model-studio",setup(T){const f={speed:1},d=u(0),l=u(1),n=u(0),p=E(),a=U(),{providers:g}=S(a),{t:s}=F(),P=V(()=>{var e;return!!((e=g.value[o])!=null&&e.apiKey)}),_=V(()=>p.availableVoices[o]||[]);async function w(e,r,t){const b=a.getProviderInstance(o);if(!b)throw new Error("Failed to initialize speech provider");const C=a.getProviderConfig(o),x=C.model||y;return await p.speech(b,x,e,r,{...C,...f})}return $(async()=>{const e=a.getProviderConfig(o);await a.getProviderMetadata(o).validators.validateProviderConfig(e)?await p.loadVoicesForProvider(o):console.error("Failed to validate provider config",e)}),v(d,async()=>{const e=a.getProviderConfig(o);e.pitch=d.value}),v(l,async()=>{const e=a.getProviderConfig(o);e.speed=l.value}),v(n,async()=>{const e=a.getProviderConfig(o);e.volume=n.value}),v(g,async()=>{const e=a.getProviderConfig(o);await a.getProviderMetadata(o).validators.validateProviderConfig(e)?await p.loadVoicesForProvider(o):console.error("Failed to validate provider config",e)},{immediate:!0}),(e,r)=>(B(),k(i(L),{"provider-id":o,"default-model":y,"additional-settings":f},{"voice-settings":h(()=>[I("div",N,[c(i(m),{modelValue:d.value,"onUpdate:modelValue":r[0]||(r[0]=t=>d.value=t),label:i(s)("settings.pages.providers.provider.common.fields.field.pitch.label"),description:i(s)("settings.pages.providers.provider.common.fields.field.pitch.description"),min:-100,max:100,step:1,"format-value":t=>`${t}%`},null,8,["modelValue","label","description","format-value"]),c(i(m),{modelValue:l.value,"onUpdate:modelValue":r[1]||(r[1]=t=>l.value=t),label:i(s)("settings.pages.providers.provider.common.fields.field.speed.label"),description:i(s)("settings.pages.providers.provider.common.fields.field.speed.description"),min:.5,max:2,step:.01},null,8,["modelValue","label","description"]),c(i(m),{modelValue:n.value,"onUpdate:modelValue":r[2]||(r[2]=t=>n.value=t),label:i(s)("settings.pages.providers.provider.common.fields.field.volume.label"),description:i(s)("settings.pages.providers.provider.common.fields.field.volume.description"),min:-100,max:100,step:1,"format-value":t=>`${t}%`},null,8,["modelValue","label","description","format-value"])])]),playground:h(()=>[c(i(K),{"available-voices":_.value,"generate-speech":w,"api-key-configured":P.value,"default-text":"Hello! This is a test of the ElevenLabs voice synthesis."},null,8,["available-voices","api-key-configured"])]),_:1}))}});export{oe as default}; +import{_ as m}from"./FieldRange.vue_vue_type_script_setup_true_lang-BeH9VX4J.js";import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import{d as M,g as u,s as S,q as F,h as V,l as $,w as v,x as k,o as B,y as h,b as c,u as i,a as I}from"./index-_NYoebRU.js";import{u as U}from"./providers-Bbs_o2SI.js";import{u as E}from"./speech-DTX8fpM-.js";import{_ as K,a as L}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-C9WOvHCP.js";import"./index-Be1NqeGb.js";import"./TestDummyMarker.vue_vue_type_script_setup_true_lang-7UKgQXIZ.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BBijRr4z.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-Dx_TCyI1.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Cx39i7VD.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BHH_IiH5.js";import"./Input.vue_vue_type_script_setup_true_lang-DXXJ9lLc.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DEakgvr1.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-8eUb1l9O.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js";const N={flex:"~ col gap-4"},o="alibaba-cloud-model-studio",y="cosyvoice-v1",oe=M({__name:"alibaba-cloud-model-studio",setup(T){const f={speed:1},d=u(0),l=u(1),n=u(0),p=E(),a=U(),{providers:g}=S(a),{t:s}=F(),P=V(()=>{var e;return!!((e=g.value[o])!=null&&e.apiKey)}),_=V(()=>p.availableVoices[o]||[]);async function w(e,r,t){const b=a.getProviderInstance(o);if(!b)throw new Error("Failed to initialize speech provider");const C=a.getProviderConfig(o),x=C.model||y;return await p.speech(b,x,e,r,{...C,...f})}return $(async()=>{const e=a.getProviderConfig(o);await a.getProviderMetadata(o).validators.validateProviderConfig(e)?await p.loadVoicesForProvider(o):console.error("Failed to validate provider config",e)}),v(d,async()=>{const e=a.getProviderConfig(o);e.pitch=d.value}),v(l,async()=>{const e=a.getProviderConfig(o);e.speed=l.value}),v(n,async()=>{const e=a.getProviderConfig(o);e.volume=n.value}),v(g,async()=>{const e=a.getProviderConfig(o);await a.getProviderMetadata(o).validators.validateProviderConfig(e)?await p.loadVoicesForProvider(o):console.error("Failed to validate provider config",e)},{immediate:!0}),(e,r)=>(B(),k(i(L),{"provider-id":o,"default-model":y,"additional-settings":f},{"voice-settings":h(()=>[I("div",N,[c(i(m),{modelValue:d.value,"onUpdate:modelValue":r[0]||(r[0]=t=>d.value=t),label:i(s)("settings.pages.providers.provider.common.fields.field.pitch.label"),description:i(s)("settings.pages.providers.provider.common.fields.field.pitch.description"),min:-100,max:100,step:1,"format-value":t=>`${t}%`},null,8,["modelValue","label","description","format-value"]),c(i(m),{modelValue:l.value,"onUpdate:modelValue":r[1]||(r[1]=t=>l.value=t),label:i(s)("settings.pages.providers.provider.common.fields.field.speed.label"),description:i(s)("settings.pages.providers.provider.common.fields.field.speed.description"),min:.5,max:2,step:.01},null,8,["modelValue","label","description"]),c(i(m),{modelValue:n.value,"onUpdate:modelValue":r[2]||(r[2]=t=>n.value=t),label:i(s)("settings.pages.providers.provider.common.fields.field.volume.label"),description:i(s)("settings.pages.providers.provider.common.fields.field.volume.description"),min:-100,max:100,step:1,"format-value":t=>`${t}%`},null,8,["modelValue","label","description","format-value"])])]),playground:h(()=>[c(i(K),{"available-voices":_.value,"generate-speech":w,"api-key-configured":P.value,"default-text":"Hello! This is a test of the ElevenLabs voice synthesis."},null,8,["available-voices","api-key-configured"])]),_:1}))}});export{oe as default}; diff --git a/assets/anthropic-BVw1aKkH.js b/assets/anthropic-Bi5WbaJz.js similarity index 80% rename from assets/anthropic-BVw1aKkH.js rename to assets/anthropic-Bi5WbaJz.js index acdd960e1b72f793ea5f869e10854e1c2fab0ead..4abb9f0465f21344b40c5d599c032a6c28fd0fef 100644 --- a/assets/anthropic-BVw1aKkH.js +++ b/assets/anthropic-Bi5WbaJz.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.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,bL as p,u as t}from"./index-D8Nm21zW.js";import{u as R}from"./providers-DUDq6kdm.js";import{_ as O,a as $}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-Blzu2N2U.js";import{_ as A}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DFTTO3aS.js";import{_ as I,a as N}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-Bq_0Y-1M.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-Ccg-E6bm.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-CYg3DjVq.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-CL9MLblt.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BNHdvI3g.js";import"./Input.vue_vue_type_script_setup_true_lang-DacRzqGb.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js";const e="anthropic",Q=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(I),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(A),{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(O),{title:t(c)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t($),{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{Q as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.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,bL as p,u as t}from"./index-_NYoebRU.js";import{u as R}from"./providers-Bbs_o2SI.js";import{_ as O,a as $}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BBijRr4z.js";import{_ as A}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DEakgvr1.js";import{_ as I,a as N}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-8eUb1l9O.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-7OtTanLQ.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-Dx_TCyI1.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Cx39i7VD.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BHH_IiH5.js";import"./Input.vue_vue_type_script_setup_true_lang-DXXJ9lLc.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js";const e="anthropic",Q=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(I),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(A),{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(O),{title:t(c)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t($),{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{Q as default}; diff --git a/assets/audio-DVqTW1PB.js b/assets/audio-D7a74pGw.js similarity index 88% rename from assets/audio-DVqTW1PB.js rename to assets/audio-D7a74pGw.js index fe93358b7225070b09eb66f2622691c7e5f0c7f2..cc99f53e2b03dc814d7066f55721ef70026629cc 100644 --- a/assets/audio-DVqTW1PB.js +++ b/assets/audio-D7a74pGw.js @@ -1 +1 @@ -import{d as s,g as f,c as d,o as p,a as t}from"./index-D8Nm21zW.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-_NYoebRU.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/background-remove-xa-QFjKj.js b/assets/background-remove--UC_RV6n.js similarity index 99% rename from assets/background-remove-xa-QFjKj.js rename to assets/background-remove--UC_RV6n.js index d4a5b7de90fd906b08fccb5b93a2f10391353b8f..fe62d0f4100ee41cccc0324035b292fccc005f09 100644 --- a/assets/background-remove-xa-QFjKj.js +++ b/assets/background-remove--UC_RV6n.js @@ -1,4 +1,4 @@ -var uv=Object.defineProperty;var dv=(e,r,t)=>r in e?uv(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var te=(e,r,t)=>dv(e,typeof r!="symbol"?r+"":r,t);import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import{_ as cv}from"./InputFile.vue_vue_type_script_setup_true_lang-aVfE3xzX.js";import{d as pv,g as ks,h as hv,l as mv,c as Tn,o as En,a as Sr,b as fv,D as wf,bx as bf,by as Mf,C as yf,n as _v,u as gv}from"./index-D8Nm21zW.js";const la=new Map,kn=[],wv=(e,r,t)=>{if(r&&typeof r.init=="function"&&typeof r.createInferenceSessionHandler=="function"){const s=la.get(e);if(s===void 0)la.set(e,{backend:r,priority:t});else{if(s.priority>t)return;if(s.priority===t&&s.backend!==r)throw new Error(`cannot register backend "${e}" using priority ${t}`)}if(t>=0){const o=kn.indexOf(e);o!==-1&&kn.splice(o,1);for(let n=0;n{const r=la.get(e);if(!r)return"backend not found.";if(r.initialized)return r.backend;if(r.aborted)return r.error;{const t=!!r.initPromise;try{return t||(r.initPromise=r.backend.init(e)),await r.initPromise,r.initialized=!0,r.backend}catch(s){return t||(r.error=`${s}`,r.aborted=!0),r.error}finally{delete r.initPromise}}},Mv=async e=>{const r=e.executionProviders||[],t=r.map(l=>typeof l=="string"?l:l.name),s=t.length===0?kn:t;let o;const n=[],i=new Set;for(const l of s){const u=await bv(l);typeof u=="string"?n.push({name:l,err:u}):(o||(o=u),o===u&&i.add(l))}if(!o)throw new Error(`no available backend found. ERR: ${n.map(l=>`[${l.name}] ${l.err}`).join(", ")}`);for(const{name:l,err:u}of n)t.includes(l)&&console.warn(`removing requested execution provider "${l}" from session options because it is not available: ${u}`);const a=r.filter(l=>i.has(typeof l=="string"?l:l.name));return[o,new Proxy(e,{get:(l,u)=>u==="executionProviders"?a:Reflect.get(l,u)})]},yv="1.21.0";let vf="warning";const ms={wasm:{},webgl:{},webgpu:{},versions:{common:yv},set logLevel(e){if(e!==void 0){if(typeof e!="string"||["verbose","info","warning","error","fatal"].indexOf(e)===-1)throw new Error(`Unsupported logging level: ${e}`);vf=e}},get logLevel(){return vf}};Object.defineProperty(ms,"logLevel",{enumerable:!0});const vv=ms,xv=(e,r)=>{const t=typeof document<"u"?document.createElement("canvas"):new OffscreenCanvas(1,1);t.width=e.dims[3],t.height=e.dims[2];const s=t.getContext("2d");if(s!=null){let o,n;(r==null?void 0:r.tensorLayout)!==void 0&&r.tensorLayout==="NHWC"?(o=e.dims[2],n=e.dims[3]):(o=e.dims[3],n=e.dims[2]);const i=(r==null?void 0:r.format)!==void 0?r.format:"RGB",a=r==null?void 0:r.norm;let l,u;a===void 0||a.mean===void 0?l=[255,255,255,255]:typeof a.mean=="number"?l=[a.mean,a.mean,a.mean,a.mean]:(l=[a.mean[0],a.mean[1],a.mean[2],0],a.mean[3]!==void 0&&(l[3]=a.mean[3])),a===void 0||a.bias===void 0?u=[0,0,0,0]:typeof a.bias=="number"?u=[a.bias,a.bias,a.bias,a.bias]:(u=[a.bias[0],a.bias[1],a.bias[2],0],a.bias[3]!==void 0&&(u[3]=a.bias[3]));const p=n*o;let d=0,c=p,_=p*2,f=-1;i==="RGBA"?(d=0,c=p,_=p*2,f=p*3):i==="RGB"?(d=0,c=p,_=p*2):i==="RBG"&&(d=0,_=p,c=p*2);for(let v=0;v{const t=typeof document<"u"?document.createElement("canvas").getContext("2d"):new OffscreenCanvas(1,1).getContext("2d");let s;if(t!=null){let o,n,i;(r==null?void 0:r.tensorLayout)!==void 0&&r.tensorLayout==="NHWC"?(o=e.dims[2],n=e.dims[1],i=e.dims[3]):(o=e.dims[3],n=e.dims[2],i=e.dims[1]);const a=r!==void 0&&r.format!==void 0?r.format:"RGB",l=r==null?void 0:r.norm;let u,p;l===void 0||l.mean===void 0?u=[255,255,255,255]:typeof l.mean=="number"?u=[l.mean,l.mean,l.mean,l.mean]:(u=[l.mean[0],l.mean[1],l.mean[2],255],l.mean[3]!==void 0&&(u[3]=l.mean[3])),l===void 0||l.bias===void 0?p=[0,0,0,0]:typeof l.bias=="number"?p=[l.bias,l.bias,l.bias,l.bias]:(p=[l.bias[0],l.bias[1],l.bias[2],0],l.bias[3]!==void 0&&(p[3]=l.bias[3]));const d=n*o;if(r!==void 0&&(r.format!==void 0&&i===4&&r.format!=="RGBA"||i===3&&r.format!=="RGB"&&r.format!=="BGR"))throw new Error("Tensor format doesn't match input tensor dims");const c=4;let _=0,f=1,v=2,$=3,w=0,g=d,C=d*2,E=-1;a==="RGBA"?(w=0,g=d,C=d*2,E=d*3):a==="RGB"?(w=0,g=d,C=d*2):a==="RBG"&&(w=0,C=d,g=d*2),s=t.createImageData(o,n);for(let y=0;y{if(e===void 0)throw new Error("Image buffer must be defined");if(r.height===void 0||r.width===void 0)throw new Error("Image height and width must be defined");if(r.tensorLayout==="NHWC")throw new Error("NHWC Tensor layout is not supported yet");const{height:t,width:s}=r,o=r.norm??{mean:255,bias:0};let n,i;typeof o.mean=="number"?n=[o.mean,o.mean,o.mean,o.mean]:n=[o.mean[0],o.mean[1],o.mean[2],o.mean[3]??255],typeof o.bias=="number"?i=[o.bias,o.bias,o.bias,o.bias]:i=[o.bias[0],o.bias[1],o.bias[2],o.bias[3]??0];const a=r.format!==void 0?r.format:"RGBA",l=r.tensorFormat!==void 0&&r.tensorFormat!==void 0?r.tensorFormat:"RGB",u=t*s,p=l==="RGBA"?new Float32Array(u*4):new Float32Array(u*3);let d=4,c=0,_=1,f=2,v=3,$=0,w=u,g=u*2,C=-1;a==="RGB"&&(d=3,c=0,_=1,f=2,v=-1),l==="RGBA"?C=u*3:l==="RBG"?($=0,g=u,w=u*2):l==="BGR"&&(g=0,w=u,$=u*2);for(let y=0;y{const t=typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement,s=typeof ImageData<"u"&&e instanceof ImageData,o=typeof ImageBitmap<"u"&&e instanceof ImageBitmap,n=typeof e=="string";let i,a=r??{};const l=()=>{if(typeof document<"u")return document.createElement("canvas");if(typeof OffscreenCanvas<"u")return new OffscreenCanvas(1,1);throw new Error("Canvas is not supported")},u=p=>typeof HTMLCanvasElement<"u"&&p instanceof HTMLCanvasElement||p instanceof OffscreenCanvas?p.getContext("2d"):null;if(t){const p=l();p.width=e.width,p.height=e.height;const d=u(p);if(d!=null){let c=e.height,_=e.width;if(r!==void 0&&r.resizedHeight!==void 0&&r.resizedWidth!==void 0&&(c=r.resizedHeight,_=r.resizedWidth),r!==void 0){if(a=r,r.tensorFormat!==void 0)throw new Error("Image input config format must be RGBA for HTMLImageElement");a.tensorFormat="RGBA",a.height=c,a.width=_}else a.tensorFormat="RGBA",a.height=c,a.width=_;d.drawImage(e,0,0),i=d.getImageData(0,0,_,c).data}else throw new Error("Can not access image data")}else if(s){let p,d;if(r!==void 0&&r.resizedWidth!==void 0&&r.resizedHeight!==void 0?(p=r.resizedHeight,d=r.resizedWidth):(p=e.height,d=e.width),r!==void 0&&(a=r),a.format="RGBA",a.height=p,a.width=d,r!==void 0){const c=l();c.width=d,c.height=p;const _=u(c);if(_!=null)_.putImageData(e,0,0),i=_.getImageData(0,0,d,p).data;else throw new Error("Can not access image data")}else i=e.data}else if(o){if(r===void 0)throw new Error("Please provide image config with format for Imagebitmap");const p=l();p.width=e.width,p.height=e.height;const d=u(p);if(d!=null){const c=e.height,_=e.width;return d.drawImage(e,0,0,_,c),i=d.getImageData(0,0,_,c).data,a.height=c,a.width=_,kl(i,a)}else throw new Error("Can not access image data")}else{if(n)return new Promise((p,d)=>{const c=l(),_=u(c);if(!e||!_)return d();const f=new Image;f.crossOrigin="Anonymous",f.src=e,f.onload=()=>{c.width=f.width,c.height=f.height,_.drawImage(f,0,0,c.width,c.height);const v=_.getImageData(0,0,c.width,c.height);a.height=c.height,a.width=c.width,p(kl(v.data,a))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(i!==void 0)return kl(i,a);throw new Error("Input data provided is not supported - aborted tensor creation")},Pv=(e,r)=>{const{width:t,height:s,download:o,dispose:n}=r,i=[1,s,t,4];return new Qr({location:"texture",type:"float32",texture:e,dims:i,download:o,dispose:n})},Cv=(e,r)=>{const{dataType:t,dims:s,download:o,dispose:n}=r;return new Qr({location:"gpu-buffer",type:t??"float32",gpuBuffer:e,dims:s,download:o,dispose:n})},Sv=(e,r)=>{const{dataType:t,dims:s,download:o,dispose:n}=r;return new Qr({location:"ml-tensor",type:t??"float32",mlTensor:e,dims:s,download:o,dispose:n})},$v=(e,r,t)=>new Qr({location:"cpu-pinned",type:e,data:r,dims:t??[r.length]}),so=new Map([["float32",Float32Array],["uint8",Uint8Array],["int8",Int8Array],["uint16",Uint16Array],["int16",Int16Array],["int32",Int32Array],["bool",Uint8Array],["float64",Float64Array],["uint32",Uint32Array],["int4",Uint8Array],["uint4",Uint8Array]]),ua=new Map([[Float32Array,"float32"],[Uint8Array,"uint8"],[Int8Array,"int8"],[Uint16Array,"uint16"],[Int16Array,"int16"],[Int32Array,"int32"],[Float64Array,"float64"],[Uint32Array,"uint32"]]);let xf=!1;const kv=()=>{if(!xf){xf=!0;const e=typeof BigInt64Array<"u"&&BigInt64Array.from,r=typeof BigUint64Array<"u"&&BigUint64Array.from,t=globalThis.Float16Array,s=typeof t<"u"&&t.from;e&&(so.set("int64",BigInt64Array),ua.set(BigInt64Array,"int64")),r&&(so.set("uint64",BigUint64Array),ua.set(BigUint64Array,"uint64")),s?(so.set("float16",t),ua.set(t,"float16")):so.set("float16",Uint16Array)}},Iv=e=>{let r=1;for(let t=0;t{switch(e.location){case"cpu":return new Qr(e.type,e.data,r);case"cpu-pinned":return new Qr({location:"cpu-pinned",data:e.data,type:e.type,dims:r});case"texture":return new Qr({location:"texture",texture:e.texture,type:e.type,dims:r});case"gpu-buffer":return new Qr({location:"gpu-buffer",gpuBuffer:e.gpuBuffer,type:e.type,dims:r});case"ml-tensor":return new Qr({location:"ml-tensor",mlTensor:e.mlTensor,type:e.type,dims:r});default:throw new Error(`tensorReshape: tensor location ${e.location} is not supported`)}};let Qr=class{constructor(r,t,s){kv();let o,n;if(typeof r=="object"&&"location"in r)switch(this.dataLocation=r.location,o=r.type,n=r.dims,r.location){case"cpu-pinned":{const a=so.get(o);if(!a)throw new TypeError(`unsupported type "${o}" to create tensor from pinned buffer`);if(!(r.data instanceof a))throw new TypeError(`buffer should be of type ${a.name}`);this.cpuData=r.data;break}case"texture":{if(o!=="float32")throw new TypeError(`unsupported type "${o}" to create tensor from texture`);this.gpuTextureData=r.texture,this.downloader=r.download,this.disposer=r.dispose;break}case"gpu-buffer":{if(o!=="float32"&&o!=="float16"&&o!=="int32"&&o!=="int64"&&o!=="uint32"&&o!=="uint8"&&o!=="bool"&&o!=="uint4"&&o!=="int4")throw new TypeError(`unsupported type "${o}" to create tensor from gpu buffer`);this.gpuBufferData=r.gpuBuffer,this.downloader=r.download,this.disposer=r.dispose;break}case"ml-tensor":{if(o!=="float32"&&o!=="float16"&&o!=="int32"&&o!=="int64"&&o!=="uint32"&&o!=="uint64"&&o!=="int8"&&o!=="uint8"&&o!=="bool"&&o!=="uint4"&&o!=="int4")throw new TypeError(`unsupported type "${o}" to create tensor from MLTensor`);this.mlTensorData=r.mlTensor,this.downloader=r.download,this.disposer=r.dispose;break}default:throw new Error(`Tensor constructor: unsupported location '${this.dataLocation}'`)}else{let a,l;if(typeof r=="string")if(o=r,l=s,r==="string"){if(!Array.isArray(t))throw new TypeError("A string tensor's data must be a string array.");a=t}else{const u=so.get(r);if(u===void 0)throw new TypeError(`Unsupported tensor type: ${r}.`);if(Array.isArray(t)){if(r==="float16"&&u===Uint16Array||r==="uint4"||r==="int4")throw new TypeError(`Creating a ${r} tensor from number array is not supported. Please use ${u.name} as data.`);r==="uint64"||r==="int64"?a=u.from(t,BigInt):a=u.from(t)}else if(t instanceof u)a=t;else if(t instanceof Uint8ClampedArray)if(r==="uint8")a=Uint8Array.from(t);else throw new TypeError("A Uint8ClampedArray tensor's data must be type of uint8");else if(r==="float16"&&t instanceof Uint16Array&&u!==Uint16Array)a=new globalThis.Float16Array(t.buffer,t.byteOffset,t.length);else throw new TypeError(`A ${o} tensor's data must be type of ${u}`)}else if(l=t,Array.isArray(r)){if(r.length===0)throw new TypeError("Tensor type cannot be inferred from an empty array.");const u=typeof r[0];if(u==="string")o="string",a=r;else if(u==="boolean")o="bool",a=Uint8Array.from(r);else throw new TypeError(`Invalid element type of data array: ${u}.`)}else if(r instanceof Uint8ClampedArray)o="uint8",a=Uint8Array.from(r);else{const u=ua.get(r.constructor);if(u===void 0)throw new TypeError(`Unsupported type for tensor data: ${r.constructor}.`);o=u,a=r}if(l===void 0)l=[a.length];else if(!Array.isArray(l))throw new TypeError("A tensor's dims must be a number array");n=l,this.cpuData=a,this.dataLocation="cpu"}const i=Iv(n);if(this.cpuData&&i!==this.cpuData.length&&!((o==="uint4"||o==="int4")&&Math.ceil(i/2)===this.cpuData.length))throw new Error(`Tensor's size(${i}) does not match data length(${this.cpuData.length}).`);this.type=o,this.dims=n,this.size=i}static async fromImage(r,t){return Ev(r,t)}static fromTexture(r,t){return Pv(r,t)}static fromGpuBuffer(r,t){return Cv(r,t)}static fromMLTensor(r,t){return Sv(r,t)}static fromPinnedBuffer(r,t,s){return $v(r,t,s)}toDataURL(r){return xv(this,r)}toImageData(r){return Tv(this,r)}get data(){if(this.ensureValid(),!this.cpuData)throw new Error("The data is not on CPU. Use `getData()` to download GPU data to CPU, or use `texture` or `gpuBuffer` property to access the GPU data directly.");return this.cpuData}get location(){return this.dataLocation}get texture(){if(this.ensureValid(),!this.gpuTextureData)throw new Error("The data is not stored as a WebGL texture.");return this.gpuTextureData}get gpuBuffer(){if(this.ensureValid(),!this.gpuBufferData)throw new Error("The data is not stored as a WebGPU buffer.");return this.gpuBufferData}get mlTensor(){if(this.ensureValid(),!this.mlTensorData)throw new Error("The data is not stored as a WebNN MLTensor.");return this.mlTensorData}async getData(r){switch(this.ensureValid(),this.dataLocation){case"cpu":case"cpu-pinned":return this.data;case"texture":case"gpu-buffer":case"ml-tensor":{if(!this.downloader)throw new Error("The current tensor is not created with a specified data downloader.");if(this.isDownloading)throw new Error("The current tensor is being downloaded.");try{this.isDownloading=!0;const t=await this.downloader();return this.downloader=void 0,this.dataLocation="cpu",this.cpuData=t,r&&this.disposer&&(this.disposer(),this.disposer=void 0),t}finally{this.isDownloading=!1}}default:throw new Error(`cannot get data from location: ${this.dataLocation}`)}}dispose(){if(this.isDownloading)throw new Error("The current tensor is being downloaded.");this.disposer&&(this.disposer(),this.disposer=void 0),this.cpuData=void 0,this.gpuTextureData=void 0,this.gpuBufferData=void 0,this.mlTensorData=void 0,this.downloader=void 0,this.isDownloading=void 0,this.dataLocation="none"}ensureValid(){if(this.dataLocation==="none")throw new Error("The tensor is disposed.")}reshape(r){if(this.ensureValid(),this.downloader||this.disposer)throw new Error("Cannot reshape a tensor that owns GPU resource.");return Av(this,r)}};const to=Qr,nb=(e,r)=>{(typeof ms.trace>"u"?!ms.wasm.trace:!ms.trace)||console.timeStamp(`${e}::ORT::${r}`)},ob=(e,r)=>{var o;const t=((o=new Error().stack)==null?void 0:o.split(/\r\n|\r|\n/g))||[];let s=!1;for(let n=0;n{(typeof ms.trace>"u"?!ms.wasm.trace:!ms.trace)||ob("BEGIN",e)},Iu=e=>{(typeof ms.trace>"u"?!ms.wasm.trace:!ms.trace)||ob("END",e)};let Fv=class ib{constructor(r){this.handler=r}async run(r,t,s){ku();const o={};let n={};if(typeof r!="object"||r===null||r instanceof to||Array.isArray(r))throw new TypeError("'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.");let i=!0;if(typeof t=="object"){if(t===null)throw new TypeError("Unexpected argument[1]: cannot be null.");if(t instanceof to)throw new TypeError("'fetches' cannot be a Tensor");if(Array.isArray(t)){if(t.length===0)throw new TypeError("'fetches' cannot be an empty array.");i=!1;for(const u of t){if(typeof u!="string")throw new TypeError("'fetches' must be a string array or an object.");if(this.outputNames.indexOf(u)===-1)throw new RangeError(`'fetches' contains invalid output name: ${u}.`);o[u]=null}if(typeof s=="object"&&s!==null)n=s;else if(typeof s<"u")throw new TypeError("'options' must be an object.")}else{let u=!1;const p=Object.getOwnPropertyNames(t);for(const d of this.outputNames)if(p.indexOf(d)!==-1){const c=t[d];(c===null||c instanceof to)&&(u=!0,i=!1,o[d]=c)}if(u){if(typeof s=="object"&&s!==null)n=s;else if(typeof s<"u")throw new TypeError("'options' must be an object.")}else n=t}}else if(typeof t<"u")throw new TypeError("Unexpected argument[1]: must be 'fetches' or 'options'.");for(const u of this.inputNames)if(typeof r[u]>"u")throw new Error(`input '${u}' is missing in 'feeds'.`);if(i)for(const u of this.outputNames)o[u]=null;const a=await this.handler.run(r,o,n),l={};for(const u in a)if(Object.hasOwnProperty.call(a,u)){const p=a[u];p instanceof to?l[u]=p:l[u]=new to(p.type,p.data,p.dims)}return Iu(),l}async release(){return this.handler.dispose()}static async create(r,t,s,o){ku();let n,i={};if(typeof r=="string"){if(n=r,typeof t=="object"&&t!==null)i=t;else if(typeof t<"u")throw new TypeError("'options' must be an object.")}else if(r instanceof Uint8Array){if(n=r,typeof t=="object"&&t!==null)i=t;else if(typeof t<"u")throw new TypeError("'options' must be an object.")}else if(r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer){const p=r;let d=0,c=r.byteLength;if(typeof t=="object"&&t!==null)i=t;else if(typeof t=="number"){if(d=t,!Number.isSafeInteger(d))throw new RangeError("'byteOffset' must be an integer.");if(d<0||d>=p.byteLength)throw new RangeError(`'byteOffset' is out of range [0, ${p.byteLength}).`);if(c=r.byteLength-d,typeof s=="number"){if(c=s,!Number.isSafeInteger(c))throw new RangeError("'byteLength' must be an integer.");if(c<=0||d+c>p.byteLength)throw new RangeError(`'byteLength' is out of range (0, ${p.byteLength-d}].`);if(typeof o=="object"&&o!==null)i=o;else if(typeof o<"u")throw new TypeError("'options' must be an object.")}else if(typeof s<"u")throw new TypeError("'byteLength' must be a number.")}else if(typeof t<"u")throw new TypeError("'options' must be an object.");n=new Uint8Array(p,d,c)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");const[a,l]=await Mv(i),u=await a.createInferenceSessionHandler(n,l);return Iu(),new ib(u)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}};const Ov=Fv,Dv=Object.freeze(Object.defineProperty({__proto__:null,InferenceSession:Ov,TRACE:nb,TRACE_FUNC_BEGIN:ku,TRACE_FUNC_END:Iu,Tensor:to,env:vv,registerBackend:wv},Symbol.toStringTag,{value:"Module"}));/*! +var uv=Object.defineProperty;var dv=(e,r,t)=>r in e?uv(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var te=(e,r,t)=>dv(e,typeof r!="symbol"?r+"":r,t);import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import{_ as cv}from"./InputFile.vue_vue_type_script_setup_true_lang-UdikYOzo.js";import{d as pv,g as ks,h as hv,l as mv,c as Tn,o as En,a as Sr,b as fv,D as wf,bx as bf,by as Mf,C as yf,n as _v,u as gv}from"./index-_NYoebRU.js";const la=new Map,kn=[],wv=(e,r,t)=>{if(r&&typeof r.init=="function"&&typeof r.createInferenceSessionHandler=="function"){const s=la.get(e);if(s===void 0)la.set(e,{backend:r,priority:t});else{if(s.priority>t)return;if(s.priority===t&&s.backend!==r)throw new Error(`cannot register backend "${e}" using priority ${t}`)}if(t>=0){const o=kn.indexOf(e);o!==-1&&kn.splice(o,1);for(let n=0;n{const r=la.get(e);if(!r)return"backend not found.";if(r.initialized)return r.backend;if(r.aborted)return r.error;{const t=!!r.initPromise;try{return t||(r.initPromise=r.backend.init(e)),await r.initPromise,r.initialized=!0,r.backend}catch(s){return t||(r.error=`${s}`,r.aborted=!0),r.error}finally{delete r.initPromise}}},Mv=async e=>{const r=e.executionProviders||[],t=r.map(l=>typeof l=="string"?l:l.name),s=t.length===0?kn:t;let o;const n=[],i=new Set;for(const l of s){const u=await bv(l);typeof u=="string"?n.push({name:l,err:u}):(o||(o=u),o===u&&i.add(l))}if(!o)throw new Error(`no available backend found. ERR: ${n.map(l=>`[${l.name}] ${l.err}`).join(", ")}`);for(const{name:l,err:u}of n)t.includes(l)&&console.warn(`removing requested execution provider "${l}" from session options because it is not available: ${u}`);const a=r.filter(l=>i.has(typeof l=="string"?l:l.name));return[o,new Proxy(e,{get:(l,u)=>u==="executionProviders"?a:Reflect.get(l,u)})]},yv="1.21.0";let vf="warning";const ms={wasm:{},webgl:{},webgpu:{},versions:{common:yv},set logLevel(e){if(e!==void 0){if(typeof e!="string"||["verbose","info","warning","error","fatal"].indexOf(e)===-1)throw new Error(`Unsupported logging level: ${e}`);vf=e}},get logLevel(){return vf}};Object.defineProperty(ms,"logLevel",{enumerable:!0});const vv=ms,xv=(e,r)=>{const t=typeof document<"u"?document.createElement("canvas"):new OffscreenCanvas(1,1);t.width=e.dims[3],t.height=e.dims[2];const s=t.getContext("2d");if(s!=null){let o,n;(r==null?void 0:r.tensorLayout)!==void 0&&r.tensorLayout==="NHWC"?(o=e.dims[2],n=e.dims[3]):(o=e.dims[3],n=e.dims[2]);const i=(r==null?void 0:r.format)!==void 0?r.format:"RGB",a=r==null?void 0:r.norm;let l,u;a===void 0||a.mean===void 0?l=[255,255,255,255]:typeof a.mean=="number"?l=[a.mean,a.mean,a.mean,a.mean]:(l=[a.mean[0],a.mean[1],a.mean[2],0],a.mean[3]!==void 0&&(l[3]=a.mean[3])),a===void 0||a.bias===void 0?u=[0,0,0,0]:typeof a.bias=="number"?u=[a.bias,a.bias,a.bias,a.bias]:(u=[a.bias[0],a.bias[1],a.bias[2],0],a.bias[3]!==void 0&&(u[3]=a.bias[3]));const p=n*o;let d=0,c=p,_=p*2,f=-1;i==="RGBA"?(d=0,c=p,_=p*2,f=p*3):i==="RGB"?(d=0,c=p,_=p*2):i==="RBG"&&(d=0,_=p,c=p*2);for(let v=0;v{const t=typeof document<"u"?document.createElement("canvas").getContext("2d"):new OffscreenCanvas(1,1).getContext("2d");let s;if(t!=null){let o,n,i;(r==null?void 0:r.tensorLayout)!==void 0&&r.tensorLayout==="NHWC"?(o=e.dims[2],n=e.dims[1],i=e.dims[3]):(o=e.dims[3],n=e.dims[2],i=e.dims[1]);const a=r!==void 0&&r.format!==void 0?r.format:"RGB",l=r==null?void 0:r.norm;let u,p;l===void 0||l.mean===void 0?u=[255,255,255,255]:typeof l.mean=="number"?u=[l.mean,l.mean,l.mean,l.mean]:(u=[l.mean[0],l.mean[1],l.mean[2],255],l.mean[3]!==void 0&&(u[3]=l.mean[3])),l===void 0||l.bias===void 0?p=[0,0,0,0]:typeof l.bias=="number"?p=[l.bias,l.bias,l.bias,l.bias]:(p=[l.bias[0],l.bias[1],l.bias[2],0],l.bias[3]!==void 0&&(p[3]=l.bias[3]));const d=n*o;if(r!==void 0&&(r.format!==void 0&&i===4&&r.format!=="RGBA"||i===3&&r.format!=="RGB"&&r.format!=="BGR"))throw new Error("Tensor format doesn't match input tensor dims");const c=4;let _=0,f=1,v=2,$=3,w=0,g=d,C=d*2,E=-1;a==="RGBA"?(w=0,g=d,C=d*2,E=d*3):a==="RGB"?(w=0,g=d,C=d*2):a==="RBG"&&(w=0,C=d,g=d*2),s=t.createImageData(o,n);for(let y=0;y{if(e===void 0)throw new Error("Image buffer must be defined");if(r.height===void 0||r.width===void 0)throw new Error("Image height and width must be defined");if(r.tensorLayout==="NHWC")throw new Error("NHWC Tensor layout is not supported yet");const{height:t,width:s}=r,o=r.norm??{mean:255,bias:0};let n,i;typeof o.mean=="number"?n=[o.mean,o.mean,o.mean,o.mean]:n=[o.mean[0],o.mean[1],o.mean[2],o.mean[3]??255],typeof o.bias=="number"?i=[o.bias,o.bias,o.bias,o.bias]:i=[o.bias[0],o.bias[1],o.bias[2],o.bias[3]??0];const a=r.format!==void 0?r.format:"RGBA",l=r.tensorFormat!==void 0&&r.tensorFormat!==void 0?r.tensorFormat:"RGB",u=t*s,p=l==="RGBA"?new Float32Array(u*4):new Float32Array(u*3);let d=4,c=0,_=1,f=2,v=3,$=0,w=u,g=u*2,C=-1;a==="RGB"&&(d=3,c=0,_=1,f=2,v=-1),l==="RGBA"?C=u*3:l==="RBG"?($=0,g=u,w=u*2):l==="BGR"&&(g=0,w=u,$=u*2);for(let y=0;y{const t=typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement,s=typeof ImageData<"u"&&e instanceof ImageData,o=typeof ImageBitmap<"u"&&e instanceof ImageBitmap,n=typeof e=="string";let i,a=r??{};const l=()=>{if(typeof document<"u")return document.createElement("canvas");if(typeof OffscreenCanvas<"u")return new OffscreenCanvas(1,1);throw new Error("Canvas is not supported")},u=p=>typeof HTMLCanvasElement<"u"&&p instanceof HTMLCanvasElement||p instanceof OffscreenCanvas?p.getContext("2d"):null;if(t){const p=l();p.width=e.width,p.height=e.height;const d=u(p);if(d!=null){let c=e.height,_=e.width;if(r!==void 0&&r.resizedHeight!==void 0&&r.resizedWidth!==void 0&&(c=r.resizedHeight,_=r.resizedWidth),r!==void 0){if(a=r,r.tensorFormat!==void 0)throw new Error("Image input config format must be RGBA for HTMLImageElement");a.tensorFormat="RGBA",a.height=c,a.width=_}else a.tensorFormat="RGBA",a.height=c,a.width=_;d.drawImage(e,0,0),i=d.getImageData(0,0,_,c).data}else throw new Error("Can not access image data")}else if(s){let p,d;if(r!==void 0&&r.resizedWidth!==void 0&&r.resizedHeight!==void 0?(p=r.resizedHeight,d=r.resizedWidth):(p=e.height,d=e.width),r!==void 0&&(a=r),a.format="RGBA",a.height=p,a.width=d,r!==void 0){const c=l();c.width=d,c.height=p;const _=u(c);if(_!=null)_.putImageData(e,0,0),i=_.getImageData(0,0,d,p).data;else throw new Error("Can not access image data")}else i=e.data}else if(o){if(r===void 0)throw new Error("Please provide image config with format for Imagebitmap");const p=l();p.width=e.width,p.height=e.height;const d=u(p);if(d!=null){const c=e.height,_=e.width;return d.drawImage(e,0,0,_,c),i=d.getImageData(0,0,_,c).data,a.height=c,a.width=_,kl(i,a)}else throw new Error("Can not access image data")}else{if(n)return new Promise((p,d)=>{const c=l(),_=u(c);if(!e||!_)return d();const f=new Image;f.crossOrigin="Anonymous",f.src=e,f.onload=()=>{c.width=f.width,c.height=f.height,_.drawImage(f,0,0,c.width,c.height);const v=_.getImageData(0,0,c.width,c.height);a.height=c.height,a.width=c.width,p(kl(v.data,a))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(i!==void 0)return kl(i,a);throw new Error("Input data provided is not supported - aborted tensor creation")},Pv=(e,r)=>{const{width:t,height:s,download:o,dispose:n}=r,i=[1,s,t,4];return new Qr({location:"texture",type:"float32",texture:e,dims:i,download:o,dispose:n})},Cv=(e,r)=>{const{dataType:t,dims:s,download:o,dispose:n}=r;return new Qr({location:"gpu-buffer",type:t??"float32",gpuBuffer:e,dims:s,download:o,dispose:n})},Sv=(e,r)=>{const{dataType:t,dims:s,download:o,dispose:n}=r;return new Qr({location:"ml-tensor",type:t??"float32",mlTensor:e,dims:s,download:o,dispose:n})},$v=(e,r,t)=>new Qr({location:"cpu-pinned",type:e,data:r,dims:t??[r.length]}),so=new Map([["float32",Float32Array],["uint8",Uint8Array],["int8",Int8Array],["uint16",Uint16Array],["int16",Int16Array],["int32",Int32Array],["bool",Uint8Array],["float64",Float64Array],["uint32",Uint32Array],["int4",Uint8Array],["uint4",Uint8Array]]),ua=new Map([[Float32Array,"float32"],[Uint8Array,"uint8"],[Int8Array,"int8"],[Uint16Array,"uint16"],[Int16Array,"int16"],[Int32Array,"int32"],[Float64Array,"float64"],[Uint32Array,"uint32"]]);let xf=!1;const kv=()=>{if(!xf){xf=!0;const e=typeof BigInt64Array<"u"&&BigInt64Array.from,r=typeof BigUint64Array<"u"&&BigUint64Array.from,t=globalThis.Float16Array,s=typeof t<"u"&&t.from;e&&(so.set("int64",BigInt64Array),ua.set(BigInt64Array,"int64")),r&&(so.set("uint64",BigUint64Array),ua.set(BigUint64Array,"uint64")),s?(so.set("float16",t),ua.set(t,"float16")):so.set("float16",Uint16Array)}},Iv=e=>{let r=1;for(let t=0;t{switch(e.location){case"cpu":return new Qr(e.type,e.data,r);case"cpu-pinned":return new Qr({location:"cpu-pinned",data:e.data,type:e.type,dims:r});case"texture":return new Qr({location:"texture",texture:e.texture,type:e.type,dims:r});case"gpu-buffer":return new Qr({location:"gpu-buffer",gpuBuffer:e.gpuBuffer,type:e.type,dims:r});case"ml-tensor":return new Qr({location:"ml-tensor",mlTensor:e.mlTensor,type:e.type,dims:r});default:throw new Error(`tensorReshape: tensor location ${e.location} is not supported`)}};let Qr=class{constructor(r,t,s){kv();let o,n;if(typeof r=="object"&&"location"in r)switch(this.dataLocation=r.location,o=r.type,n=r.dims,r.location){case"cpu-pinned":{const a=so.get(o);if(!a)throw new TypeError(`unsupported type "${o}" to create tensor from pinned buffer`);if(!(r.data instanceof a))throw new TypeError(`buffer should be of type ${a.name}`);this.cpuData=r.data;break}case"texture":{if(o!=="float32")throw new TypeError(`unsupported type "${o}" to create tensor from texture`);this.gpuTextureData=r.texture,this.downloader=r.download,this.disposer=r.dispose;break}case"gpu-buffer":{if(o!=="float32"&&o!=="float16"&&o!=="int32"&&o!=="int64"&&o!=="uint32"&&o!=="uint8"&&o!=="bool"&&o!=="uint4"&&o!=="int4")throw new TypeError(`unsupported type "${o}" to create tensor from gpu buffer`);this.gpuBufferData=r.gpuBuffer,this.downloader=r.download,this.disposer=r.dispose;break}case"ml-tensor":{if(o!=="float32"&&o!=="float16"&&o!=="int32"&&o!=="int64"&&o!=="uint32"&&o!=="uint64"&&o!=="int8"&&o!=="uint8"&&o!=="bool"&&o!=="uint4"&&o!=="int4")throw new TypeError(`unsupported type "${o}" to create tensor from MLTensor`);this.mlTensorData=r.mlTensor,this.downloader=r.download,this.disposer=r.dispose;break}default:throw new Error(`Tensor constructor: unsupported location '${this.dataLocation}'`)}else{let a,l;if(typeof r=="string")if(o=r,l=s,r==="string"){if(!Array.isArray(t))throw new TypeError("A string tensor's data must be a string array.");a=t}else{const u=so.get(r);if(u===void 0)throw new TypeError(`Unsupported tensor type: ${r}.`);if(Array.isArray(t)){if(r==="float16"&&u===Uint16Array||r==="uint4"||r==="int4")throw new TypeError(`Creating a ${r} tensor from number array is not supported. Please use ${u.name} as data.`);r==="uint64"||r==="int64"?a=u.from(t,BigInt):a=u.from(t)}else if(t instanceof u)a=t;else if(t instanceof Uint8ClampedArray)if(r==="uint8")a=Uint8Array.from(t);else throw new TypeError("A Uint8ClampedArray tensor's data must be type of uint8");else if(r==="float16"&&t instanceof Uint16Array&&u!==Uint16Array)a=new globalThis.Float16Array(t.buffer,t.byteOffset,t.length);else throw new TypeError(`A ${o} tensor's data must be type of ${u}`)}else if(l=t,Array.isArray(r)){if(r.length===0)throw new TypeError("Tensor type cannot be inferred from an empty array.");const u=typeof r[0];if(u==="string")o="string",a=r;else if(u==="boolean")o="bool",a=Uint8Array.from(r);else throw new TypeError(`Invalid element type of data array: ${u}.`)}else if(r instanceof Uint8ClampedArray)o="uint8",a=Uint8Array.from(r);else{const u=ua.get(r.constructor);if(u===void 0)throw new TypeError(`Unsupported type for tensor data: ${r.constructor}.`);o=u,a=r}if(l===void 0)l=[a.length];else if(!Array.isArray(l))throw new TypeError("A tensor's dims must be a number array");n=l,this.cpuData=a,this.dataLocation="cpu"}const i=Iv(n);if(this.cpuData&&i!==this.cpuData.length&&!((o==="uint4"||o==="int4")&&Math.ceil(i/2)===this.cpuData.length))throw new Error(`Tensor's size(${i}) does not match data length(${this.cpuData.length}).`);this.type=o,this.dims=n,this.size=i}static async fromImage(r,t){return Ev(r,t)}static fromTexture(r,t){return Pv(r,t)}static fromGpuBuffer(r,t){return Cv(r,t)}static fromMLTensor(r,t){return Sv(r,t)}static fromPinnedBuffer(r,t,s){return $v(r,t,s)}toDataURL(r){return xv(this,r)}toImageData(r){return Tv(this,r)}get data(){if(this.ensureValid(),!this.cpuData)throw new Error("The data is not on CPU. Use `getData()` to download GPU data to CPU, or use `texture` or `gpuBuffer` property to access the GPU data directly.");return this.cpuData}get location(){return this.dataLocation}get texture(){if(this.ensureValid(),!this.gpuTextureData)throw new Error("The data is not stored as a WebGL texture.");return this.gpuTextureData}get gpuBuffer(){if(this.ensureValid(),!this.gpuBufferData)throw new Error("The data is not stored as a WebGPU buffer.");return this.gpuBufferData}get mlTensor(){if(this.ensureValid(),!this.mlTensorData)throw new Error("The data is not stored as a WebNN MLTensor.");return this.mlTensorData}async getData(r){switch(this.ensureValid(),this.dataLocation){case"cpu":case"cpu-pinned":return this.data;case"texture":case"gpu-buffer":case"ml-tensor":{if(!this.downloader)throw new Error("The current tensor is not created with a specified data downloader.");if(this.isDownloading)throw new Error("The current tensor is being downloaded.");try{this.isDownloading=!0;const t=await this.downloader();return this.downloader=void 0,this.dataLocation="cpu",this.cpuData=t,r&&this.disposer&&(this.disposer(),this.disposer=void 0),t}finally{this.isDownloading=!1}}default:throw new Error(`cannot get data from location: ${this.dataLocation}`)}}dispose(){if(this.isDownloading)throw new Error("The current tensor is being downloaded.");this.disposer&&(this.disposer(),this.disposer=void 0),this.cpuData=void 0,this.gpuTextureData=void 0,this.gpuBufferData=void 0,this.mlTensorData=void 0,this.downloader=void 0,this.isDownloading=void 0,this.dataLocation="none"}ensureValid(){if(this.dataLocation==="none")throw new Error("The tensor is disposed.")}reshape(r){if(this.ensureValid(),this.downloader||this.disposer)throw new Error("Cannot reshape a tensor that owns GPU resource.");return Av(this,r)}};const to=Qr,nb=(e,r)=>{(typeof ms.trace>"u"?!ms.wasm.trace:!ms.trace)||console.timeStamp(`${e}::ORT::${r}`)},ob=(e,r)=>{var o;const t=((o=new Error().stack)==null?void 0:o.split(/\r\n|\r|\n/g))||[];let s=!1;for(let n=0;n{(typeof ms.trace>"u"?!ms.wasm.trace:!ms.trace)||ob("BEGIN",e)},Iu=e=>{(typeof ms.trace>"u"?!ms.wasm.trace:!ms.trace)||ob("END",e)};let Fv=class ib{constructor(r){this.handler=r}async run(r,t,s){ku();const o={};let n={};if(typeof r!="object"||r===null||r instanceof to||Array.isArray(r))throw new TypeError("'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.");let i=!0;if(typeof t=="object"){if(t===null)throw new TypeError("Unexpected argument[1]: cannot be null.");if(t instanceof to)throw new TypeError("'fetches' cannot be a Tensor");if(Array.isArray(t)){if(t.length===0)throw new TypeError("'fetches' cannot be an empty array.");i=!1;for(const u of t){if(typeof u!="string")throw new TypeError("'fetches' must be a string array or an object.");if(this.outputNames.indexOf(u)===-1)throw new RangeError(`'fetches' contains invalid output name: ${u}.`);o[u]=null}if(typeof s=="object"&&s!==null)n=s;else if(typeof s<"u")throw new TypeError("'options' must be an object.")}else{let u=!1;const p=Object.getOwnPropertyNames(t);for(const d of this.outputNames)if(p.indexOf(d)!==-1){const c=t[d];(c===null||c instanceof to)&&(u=!0,i=!1,o[d]=c)}if(u){if(typeof s=="object"&&s!==null)n=s;else if(typeof s<"u")throw new TypeError("'options' must be an object.")}else n=t}}else if(typeof t<"u")throw new TypeError("Unexpected argument[1]: must be 'fetches' or 'options'.");for(const u of this.inputNames)if(typeof r[u]>"u")throw new Error(`input '${u}' is missing in 'feeds'.`);if(i)for(const u of this.outputNames)o[u]=null;const a=await this.handler.run(r,o,n),l={};for(const u in a)if(Object.hasOwnProperty.call(a,u)){const p=a[u];p instanceof to?l[u]=p:l[u]=new to(p.type,p.data,p.dims)}return Iu(),l}async release(){return this.handler.dispose()}static async create(r,t,s,o){ku();let n,i={};if(typeof r=="string"){if(n=r,typeof t=="object"&&t!==null)i=t;else if(typeof t<"u")throw new TypeError("'options' must be an object.")}else if(r instanceof Uint8Array){if(n=r,typeof t=="object"&&t!==null)i=t;else if(typeof t<"u")throw new TypeError("'options' must be an object.")}else if(r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer){const p=r;let d=0,c=r.byteLength;if(typeof t=="object"&&t!==null)i=t;else if(typeof t=="number"){if(d=t,!Number.isSafeInteger(d))throw new RangeError("'byteOffset' must be an integer.");if(d<0||d>=p.byteLength)throw new RangeError(`'byteOffset' is out of range [0, ${p.byteLength}).`);if(c=r.byteLength-d,typeof s=="number"){if(c=s,!Number.isSafeInteger(c))throw new RangeError("'byteLength' must be an integer.");if(c<=0||d+c>p.byteLength)throw new RangeError(`'byteLength' is out of range (0, ${p.byteLength-d}].`);if(typeof o=="object"&&o!==null)i=o;else if(typeof o<"u")throw new TypeError("'options' must be an object.")}else if(typeof s<"u")throw new TypeError("'byteLength' must be a number.")}else if(typeof t<"u")throw new TypeError("'options' must be an object.");n=new Uint8Array(p,d,c)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");const[a,l]=await Mv(i),u=await a.createInferenceSessionHandler(n,l);return Iu(),new ib(u)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}};const Ov=Fv,Dv=Object.freeze(Object.defineProperty({__proto__:null,InferenceSession:Ov,TRACE:nb,TRACE_FUNC_BEGIN:ku,TRACE_FUNC_END:Iu,Tensor:to,env:vv,registerBackend:wv},Symbol.toStringTag,{value:"Module"}));/*! * ONNX Runtime Web v1.22.0-dev.20250409-89f8206ba4 * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. diff --git a/assets/chat-BJiWkk-g.js b/assets/chat-DmD3mlQa.js similarity index 99% rename from assets/chat-BJiWkk-g.js rename to assets/chat-DmD3mlQa.js index 85adaed3cff264e05e7311e0672a16d96435e442..a80984e02c06a03d2f37bb9cfb74cb7affb5e419 100644 --- a/assets/chat-BJiWkk-g.js +++ b/assets/chat-DmD3mlQa.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,u as M,ad as A,bx as P,by as q,t as z,C as U,D as $}from"./index-D8Nm21zW.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,u as M,ad as A,bx as P,by as q,t as z,C as U,D as $}from"./index-_NYoebRU.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-CcKNsU55.js b/assets/cloudflare-workers-ai-DSu08414.js similarity index 76% rename from assets/cloudflare-workers-ai-CcKNsU55.js rename to assets/cloudflare-workers-ai-DSu08414.js index 6ab6e6d173abec44cdb68550cea47368b7f4dbb8..06dfa7ad3c931c606495d6c53baf4efd95c8f517 100644 --- a/assets/cloudflare-workers-ai-CcKNsU55.js +++ b/assets/cloudflare-workers-ai-DSu08414.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import{d as V,bI as w,bJ as y,x as k,o as I,q,bG as x,s as M,h as v,l as $,w as K,y as f,b as c,u as l}from"./index-D8Nm21zW.js";import{u as P}from"./providers-DUDq6kdm.js";import{_ as z}from"./FieldInput.vue_vue_type_script_setup_true_lang-BNHdvI3g.js";import{_ as A}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DFTTO3aS.js";import{_ as B,a as C}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-Bq_0Y-1M.js";import{_ as N}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-Ccg-E6bm.js";import"./index-Be1NqeGb.js";import"./Input.vue_vue_type_script_setup_true_lang-DacRzqGb.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.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",H=V({__name:"cloudflare-workers-ai",setup(p){const{t:r}=q(),u=x(),n=P(),{providers:e}=M(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}});$(()=>{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)||""}),K([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{H as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import{d as V,bI as w,bJ as y,x as k,o as I,q,bG as x,s as M,h as v,l as $,w as K,y as f,b as c,u as l}from"./index-_NYoebRU.js";import{u as P}from"./providers-Bbs_o2SI.js";import{_ as z}from"./FieldInput.vue_vue_type_script_setup_true_lang-BHH_IiH5.js";import{_ as A}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DEakgvr1.js";import{_ as B,a as C}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-8eUb1l9O.js";import{_ as N}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-7OtTanLQ.js";import"./index-Be1NqeGb.js";import"./Input.vue_vue_type_script_setup_true_lang-DXXJ9lLc.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.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",H=V({__name:"cloudflare-workers-ai",setup(p){const{t:r}=q(),u=x(),n=P(),{providers:e}=M(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}});$(()=>{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)||""}),K([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{H as default}; diff --git a/assets/consciousness-CgTB9b9w.js b/assets/consciousness-Ch13RX1M.js similarity index 90% rename from assets/consciousness-CgTB9b9w.js rename to assets/consciousness-Ch13RX1M.js index 500f7eb2bbff2ce90d28a80906209d794423d39c..693b32c9e8200126eb236da7098a7dd22360301a 100644 --- a/assets/consciousness-CgTB9b9w.js +++ b/assets/consciousness-Ch13RX1M.js @@ -1 +1 @@ -import{f as P,bD as n,g as M,h as r,w as L}from"./index-D8Nm21zW.js";import{u as w}from"./providers-DUDq6kdm.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-_NYoebRU.js";import{u as w}from"./providers-Bbs_o2SI.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-qQlC4dPp.js b/assets/consciousness-DFJwJ2-w.js similarity index 94% rename from assets/consciousness-qQlC4dPp.js rename to assets/consciousness-DFJwJ2-w.js index aa3bbe01252744f39366faf4eb5d19903df10882..ffc535f58667c62c2dce3ffc4b1fe1a8e3e16caa 100644 --- a/assets/consciousness-qQlC4dPp.js +++ b/assets/consciousness-DFJwJ2-w.js @@ -1 +1 @@ -import{d as R,s as b,q as U,l as q,bw as z,c as r,o as l,b as h,a as e,A as f,u as s,C as k,D as i,bx as y,by as B,y as E,bo as T,x as M,ad as p,bE as $}from"./index-D8Nm21zW.js";import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import{R as j,a as A}from"./RadioCardDetailManySelect-6Dh1XQsR.js";import{_ as F}from"./PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js";import{u as Q}from"./consciousness-CgTB9b9w.js";import{u as G}from"./providers-DUDq6kdm.js";import{b as w}from"./route-block-B_A1xBdJ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-CL9MLblt.js";import"./Input.vue_vue_type_script_setup_true_lang-DacRzqGb.js";import"./index-Be1NqeGb.js";const I={bg:"neutral-50 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-4"},H={flex:"~ col gap-4"},J={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-500"},K={text:"neutral-400 dark:neutral-400"},O={"max-w-full":""},W={key:0,flex:"~ row gap-4",style:{"scrollbar-width":"none"},"min-w-0":"","of-x-scroll":"","scroll-smooth":"",role:"radiogroup"},X={key:1},Y={key:0},Z={flex:"~ col gap-4"},ee={class:"text-lg md:text-2xl"},se={text:"neutral-400 dark:neutral-400"},te={key:0,class:"flex items-center justify-center py-4"},oe={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"},ie={class:"flex flex-col"},le={class:"font-medium"},ne={class:"text-sm text-red-600 dark:text-red-400"},re={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"},de={class:"flex flex-col"},ae={class:"font-medium"},ce={class:"text-sm text-amber-600 dark:text-amber-400"},ue={key:1},pe={flex:"~ col gap-4"},me={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},xe={text:"neutral-400 dark:neutral-500"},ge={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"},ve={class:"flex flex-col"},_e={class:"font-medium"},be={class:"dark:text-primary-400 text-primary-600 text-sm"},he={class:"mt-2"},fe={class:"mb-1 block text-sm font-medium"},ke=["placeholder"],ye={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},Me=R({__name:"consciousness",setup(we){const V=G(),x=Q(),{availableProviders:C,availableTextGenerationsProvidersMetadata:P}=b(V),{activeProvider:d,activeModel:a,customModelName:S,modelSearchQuery:c,supportsModelListing:g,providerModels:m,isLoadingActiveProviderModels:v,activeProviderModelError:_}=b(x),{t}=U();q(async()=>{await x.loadModelsForProvider(d.value)});function N(u){S.value=u}return(u,o)=>{const D=z("motion");return l(),r(y,null,[h(s(F),{title:u.$t("settings.pages.modules.consciousness.title"),subtitle:u.$t("settings.pages.modules.title")},null,8,["title","subtitle"]),e("div",I,[e("div",null,[e("div",H,[e("div",null,[e("h2",J,i(s(t)("settings.pages.providers.title")),1),e("div",K,[e("span",null,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.description")),1)])]),e("div",O,[s(C).length>0?(l(),r("fieldset",W,[(l(!0),r(y,null,B(s(P),n=>(l(),M(s(A),{id:n.id,key:n.id,modelValue:s(d),"onUpdate:modelValue":o[0]||(o[0]=L=>p(d)?d.value=L:null),name:"provider",value:n.id,title:n.localizedName,description:n.localizedDescription},null,8,["id","modelValue","value","title","description"]))),128))])):(l(),r("div",X,[h(s(T),{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:E(()=>o[4]||(o[4]=[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(g)?(l(),r("div",Y,[e("div",Z,[e("div",null,[e("h2",ee,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),e("div",se,[e("span",null,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),s(v)?(l(),r("div",te,[o[5]||(o[5]=e("div",{class:"mr-2 animate-spin"},[e("div",{"i-solar:spinner-line-duotone":"","text-xl":""})],-1)),e("span",null,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.loading")),1)])):s(_)?(l(),r("div",oe,[o[6]||(o[6]=e("div",{"i-solar:close-circle-line-duotone":"",class:"text-2xl text-red-500 dark:text-red-400"},null,-1)),e("div",ie,[e("span",le,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.error")),1),e("span",ne,i(s(_)),1)])])):s(m).length===0&&!s(v)?(l(),r("div",re,[o[7]||(o[7]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),e("div",de,[e("span",ae,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models")),1),e("span",ce,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description")),1)])])):s(m).length>0?(l(),M(s(j),{key:3,modelValue:s(a),"onUpdate:modelValue":o[1]||(o[1]=n=>p(a)?a.value=n:null),"search-query":s(c),"onUpdate:searchQuery":o[2]||(o[2]=n=>p(c)?c.value=n:null),items:s(m),searchable:!0,"search-placeholder":s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder"),"search-no-results-title":s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results"),"search-no-results-description":s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description",{query:s(c)}),"search-results-text":s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results",{count:"{count}",total:"{total}"}),"custom-input-placeholder":s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder"),"expand-button-text":s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.expand"),"collapse-button-text":s(t)("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"])):k("",!0)])])):s(d)&&!s(g)?(l(),r("div",ue,[e("div",pe,[e("div",null,[e("h2",me,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),e("div",xe,[e("span",null,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),e("div",ge,[o[8]||(o[8]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-primary-500 dark:text-primary-400 text-2xl"},null,-1)),e("div",ve,[e("span",_e,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported")),1),e("span",be,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported_description")),1)])]),e("div",he,[e("label",fe,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_name")),1),f(e("input",{"onUpdate:modelValue":o[3]||(o[3]=n=>p(a)?a.value=n: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(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_placeholder")},null,8,ke),[[$,s(a)]])])])])):k("",!0)]),f((l(),r("div",ye,o[9]||(o[9]=[e("div",{text:"60","i-solar:ghost-bold-duotone":""},null,-1)]))),[[D]])],64)}}});typeof w=="function"&&w(Me);export{Me as default}; +import{d as R,s as b,q as U,l as q,bw as z,c as r,o as l,b as h,a as e,A as f,u as s,C as k,D as i,bx as y,by as B,y as E,bo as T,x as M,ad as p,bE as $}from"./index-_NYoebRU.js";import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import{R as j,a as A}from"./RadioCardDetailManySelect-CC_vBTye.js";import{_ as F}from"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js";import{u as Q}from"./consciousness-Ch13RX1M.js";import{u as G}from"./providers-Bbs_o2SI.js";import{b as w}from"./route-block-B_A1xBdJ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Cx39i7VD.js";import"./Input.vue_vue_type_script_setup_true_lang-DXXJ9lLc.js";import"./index-Be1NqeGb.js";const I={bg:"neutral-50 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-4"},H={flex:"~ col gap-4"},J={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-500"},K={text:"neutral-400 dark:neutral-400"},O={"max-w-full":""},W={key:0,flex:"~ row gap-4",style:{"scrollbar-width":"none"},"min-w-0":"","of-x-scroll":"","scroll-smooth":"",role:"radiogroup"},X={key:1},Y={key:0},Z={flex:"~ col gap-4"},ee={class:"text-lg md:text-2xl"},se={text:"neutral-400 dark:neutral-400"},te={key:0,class:"flex items-center justify-center py-4"},oe={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"},ie={class:"flex flex-col"},le={class:"font-medium"},ne={class:"text-sm text-red-600 dark:text-red-400"},re={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"},de={class:"flex flex-col"},ae={class:"font-medium"},ce={class:"text-sm text-amber-600 dark:text-amber-400"},ue={key:1},pe={flex:"~ col gap-4"},me={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},xe={text:"neutral-400 dark:neutral-500"},ge={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"},ve={class:"flex flex-col"},_e={class:"font-medium"},be={class:"dark:text-primary-400 text-primary-600 text-sm"},he={class:"mt-2"},fe={class:"mb-1 block text-sm font-medium"},ke=["placeholder"],ye={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},Me=R({__name:"consciousness",setup(we){const V=G(),x=Q(),{availableProviders:C,availableTextGenerationsProvidersMetadata:P}=b(V),{activeProvider:d,activeModel:a,customModelName:S,modelSearchQuery:c,supportsModelListing:g,providerModels:m,isLoadingActiveProviderModels:v,activeProviderModelError:_}=b(x),{t}=U();q(async()=>{await x.loadModelsForProvider(d.value)});function N(u){S.value=u}return(u,o)=>{const D=z("motion");return l(),r(y,null,[h(s(F),{title:u.$t("settings.pages.modules.consciousness.title"),subtitle:u.$t("settings.pages.modules.title")},null,8,["title","subtitle"]),e("div",I,[e("div",null,[e("div",H,[e("div",null,[e("h2",J,i(s(t)("settings.pages.providers.title")),1),e("div",K,[e("span",null,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.description")),1)])]),e("div",O,[s(C).length>0?(l(),r("fieldset",W,[(l(!0),r(y,null,B(s(P),n=>(l(),M(s(A),{id:n.id,key:n.id,modelValue:s(d),"onUpdate:modelValue":o[0]||(o[0]=L=>p(d)?d.value=L:null),name:"provider",value:n.id,title:n.localizedName,description:n.localizedDescription},null,8,["id","modelValue","value","title","description"]))),128))])):(l(),r("div",X,[h(s(T),{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:E(()=>o[4]||(o[4]=[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(g)?(l(),r("div",Y,[e("div",Z,[e("div",null,[e("h2",ee,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),e("div",se,[e("span",null,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),s(v)?(l(),r("div",te,[o[5]||(o[5]=e("div",{class:"mr-2 animate-spin"},[e("div",{"i-solar:spinner-line-duotone":"","text-xl":""})],-1)),e("span",null,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.loading")),1)])):s(_)?(l(),r("div",oe,[o[6]||(o[6]=e("div",{"i-solar:close-circle-line-duotone":"",class:"text-2xl text-red-500 dark:text-red-400"},null,-1)),e("div",ie,[e("span",le,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.error")),1),e("span",ne,i(s(_)),1)])])):s(m).length===0&&!s(v)?(l(),r("div",re,[o[7]||(o[7]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),e("div",de,[e("span",ae,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models")),1),e("span",ce,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description")),1)])])):s(m).length>0?(l(),M(s(j),{key:3,modelValue:s(a),"onUpdate:modelValue":o[1]||(o[1]=n=>p(a)?a.value=n:null),"search-query":s(c),"onUpdate:searchQuery":o[2]||(o[2]=n=>p(c)?c.value=n:null),items:s(m),searchable:!0,"search-placeholder":s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder"),"search-no-results-title":s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results"),"search-no-results-description":s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description",{query:s(c)}),"search-results-text":s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results",{count:"{count}",total:"{total}"}),"custom-input-placeholder":s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder"),"expand-button-text":s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.expand"),"collapse-button-text":s(t)("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"])):k("",!0)])])):s(d)&&!s(g)?(l(),r("div",ue,[e("div",pe,[e("div",null,[e("h2",me,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),e("div",xe,[e("span",null,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),e("div",ge,[o[8]||(o[8]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-primary-500 dark:text-primary-400 text-2xl"},null,-1)),e("div",ve,[e("span",_e,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported")),1),e("span",be,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported_description")),1)])]),e("div",he,[e("label",fe,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_name")),1),f(e("input",{"onUpdate:modelValue":o[3]||(o[3]=n=>p(a)?a.value=n: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(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_placeholder")},null,8,ke),[[$,s(a)]])])])])):k("",!0)]),f((l(),r("div",ye,o[9]||(o[9]=[e("div",{text:"60","i-solar:ghost-bold-duotone":""},null,-1)]))),[[D]])],64)}}});typeof w=="function"&&w(Me);export{Me as default}; diff --git a/assets/deepseek-D7OL7kwG.js b/assets/deepseek-hdH9dlLT.js similarity index 69% rename from assets/deepseek-D7OL7kwG.js rename to assets/deepseek-hdH9dlLT.js index 56f129573082d6ce38170b7b0c2cd6eb4a9e67d5..ed0e39c9a279b2f603c2154dc446c6e5a0a56f3a 100644 --- a/assets/deepseek-D7OL7kwG.js +++ b/assets/deepseek-hdH9dlLT.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.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,u as t}from"./index-D8Nm21zW.js";import{u as w}from"./providers-DUDq6kdm.js";import{_ as z,a as C}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-Blzu2N2U.js";import{_ as M}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DFTTO3aS.js";import{_ as N,a as P}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-Bq_0Y-1M.js";import{_ as R}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-Ccg-E6bm.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-CYg3DjVq.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-CL9MLblt.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BNHdvI3g.js";import"./Input.vue_vue_type_script_setup_true_lang-DacRzqGb.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js";const a="deepseek",L=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{L as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.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,u as t}from"./index-_NYoebRU.js";import{u as w}from"./providers-Bbs_o2SI.js";import{_ as z,a as C}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BBijRr4z.js";import{_ as M}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DEakgvr1.js";import{_ as N,a as P}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-8eUb1l9O.js";import{_ as R}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-7OtTanLQ.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-Dx_TCyI1.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Cx39i7VD.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BHH_IiH5.js";import"./Input.vue_vue_type_script_setup_true_lang-DXXJ9lLc.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js";const a="deepseek",L=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{L as default}; diff --git a/assets/default-_iAhyx9C.js b/assets/default-CDGo-Xl7.js similarity index 89% rename from assets/default-_iAhyx9C.js rename to assets/default-CDGo-Xl7.js index 3701c3e3a7b05c33fb2f59f6efb553f0e21c934a..8317c2457aed24d65f60dcab2fd7f7ff544996dc 100644 --- a/assets/default-_iAhyx9C.js +++ b/assets/default-CDGo-Xl7.js @@ -1 +1 @@ -import{d as t,c as s,a as e,b as a,u as o,R as n,o as p}from"./index-D8Nm21zW.js";import{H as d}from"./HeaderLink-yHEt2vbv.js";const r={style:{paddingBottom:"env(safe-area-inset-bottom, 0px)",paddingTop:"env(safe-area-inset-top, 0px)",paddingRight:"env(safe-area-inset-right, 0px)",paddingLeft:"env(safe-area-inset-left, 0px)"}},i={class:"px-0 py-1 md:px-3 md:py-3","w-full":"","gap-2":"",bg:"$bg-color"},c={class:"px-3 py-2 md:px-5 md:py-5",flex:"~ col","mx-auto":"","max-w-screen-xl":""},u=t({__name:"default",setup(m){return(f,l)=>(p(),s("div",r,[e("div",i,[a(d)]),e("div",c,[a(o(n))])]))}});export{u as default}; +import{d as t,c as s,a as e,b as a,u as o,R as n,o as p}from"./index-_NYoebRU.js";import{H as d}from"./HeaderLink-Bo73zIrx.js";const r={style:{paddingBottom:"env(safe-area-inset-bottom, 0px)",paddingTop:"env(safe-area-inset-top, 0px)",paddingRight:"env(safe-area-inset-right, 0px)",paddingLeft:"env(safe-area-inset-left, 0px)"}},i={class:"px-0 py-1 md:px-3 md:py-3","w-full":"","gap-2":"",bg:"$bg-color"},c={class:"px-3 py-2 md:px-5 md:py-5",flex:"~ col","mx-auto":"","max-w-screen-xl":""},u=t({__name:"default",setup(m){return(f,l)=>(p(),s("div",r,[e("div",i,[a(d)]),e("div",c,[a(o(n))])]))}});export{u as default}; diff --git a/assets/default-node-C_5jnHCL.js b/assets/default-node-xSlPiRPI.js similarity index 89% rename from assets/default-node-C_5jnHCL.js rename to assets/default-node-xSlPiRPI.js index 2dc3aa768b1bb3e1a96127fe53592655079f0a9f..9ce8796e085abd90d339aa2367ef258deb0ed183 100644 --- a/assets/default-node-C_5jnHCL.js +++ b/assets/default-node-xSlPiRPI.js @@ -1 +1 @@ -import{cm as t}from"./index-D8Nm21zW.js";async function m(){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{m as getBundles}; +import{cm as t}from"./index-_NYoebRU.js";async function m(){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{m as getBundles}; diff --git a/assets/delays-CbCH4HsM.js b/assets/delays-D_eq9i1G.js similarity index 73% rename from assets/delays-CbCH4HsM.js rename to assets/delays-D_eq9i1G.js index f755a5d7c58fed99d7953258e989e99e145b9231..463752c56e9db8d085dfc4f47b8766f60e54d5ee 100644 --- a/assets/delays-CbCH4HsM.js +++ b/assets/delays-D_eq9i1G.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import{_ as v}from"./Textarea.vue_vue_type_script_setup_true_lang-CP4Ap1fe.js";import{d as _,g as r,c as n,o as t,a as e,b,u as k,D as i,bx as f,by as m}from"./index-D8Nm21zW.js";import{b as y,l as x}from"./queues-DJEZsGUG.js";import"./index-DxNnZI6o.js";import"./Basic.vue_vue_type_script_setup_true_lang-CrXWH1a1.js";import"./queue-CEzllKo3.js";const w={flex:"","flex-col":"","gap-2":"","p-2":""},h={flex:"","flex-row":"","gap-2":""},M={"rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-4":""},V={"w-full":"",flex:"","flex-row":"","gap-4":""},D={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},E={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},H=_({__name:"delays",setup(S){const s=r(""),c=r([]),p=r([]),u=r(!1),d=y();d.onHandlerEvent("delay",a=>{p.value.push(a)});function g(){u.value=!0;const a=s.value.split("");for(const o of a)d.add(o);d.add(x),s.value="",u.value=!1}return(a,o)=>(t(),n("div",w,[e("div",h,[b(k(v),{modelValue:s.value,"onUpdate:modelValue":o[0]||(o[0]=l=>s.value=l),placeholder:"Message",p:"2",bg:"neutral-100 dark:neutral-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:g},null,8,["modelValue"]),e("button",M,i(u.value?"Processing...":"Send"),1)]),e("div",V,[e("div",D,[o[1]||(o[1]=e("h3",{"font-semibold":""}," Emotion Message ",-1)),(t(!0),n(f,null,m(c.value,l=>(t(),n("div",{key:l},[e("div",null,i(l),1)]))),128))]),e("div",E,[o[2]||(o[2]=e("h3",{"font-semibold":""}," Delays ",-1)),(t(!0),n(f,null,m(p.value,l=>(t(),n("div",{key:l},[e("div",null,i(l)+"s",1)]))),128))])])]))}});export{H as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import{_ as v}from"./Textarea.vue_vue_type_script_setup_true_lang-akwsm8zZ.js";import{d as _,g as r,c as n,o as t,a as e,b,u as k,D as i,bx as f,by as m}from"./index-_NYoebRU.js";import{b as y,l as x}from"./queues-R1s0xq50.js";import"./index-CLoML2wX.js";import"./Basic.vue_vue_type_script_setup_true_lang-C4n90OG-.js";import"./queue-DeGTso58.js";const w={flex:"","flex-col":"","gap-2":"","p-2":""},h={flex:"","flex-row":"","gap-2":""},M={"rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-4":""},V={"w-full":"",flex:"","flex-row":"","gap-4":""},D={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},E={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},H=_({__name:"delays",setup(S){const s=r(""),c=r([]),p=r([]),u=r(!1),d=y();d.onHandlerEvent("delay",a=>{p.value.push(a)});function g(){u.value=!0;const a=s.value.split("");for(const o of a)d.add(o);d.add(x),s.value="",u.value=!1}return(a,o)=>(t(),n("div",w,[e("div",h,[b(k(v),{modelValue:s.value,"onUpdate:modelValue":o[0]||(o[0]=l=>s.value=l),placeholder:"Message",p:"2",bg:"neutral-100 dark:neutral-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:g},null,8,["modelValue"]),e("button",M,i(u.value?"Processing...":"Send"),1)]),e("div",V,[e("div",D,[o[1]||(o[1]=e("h3",{"font-semibold":""}," Emotion Message ",-1)),(t(!0),n(f,null,m(c.value,l=>(t(),n("div",{key:l},[e("div",null,i(l),1)]))),128))]),e("div",E,[o[2]||(o[2]=e("h3",{"font-semibold":""}," Delays ",-1)),(t(!0),n(f,null,m(p.value,l=>(t(),n("div",{key:l},[e("div",null,i(l)+"s",1)]))),128))])])]))}});export{H as default}; diff --git a/assets/elevenlabs-1fmL3c-0.js b/assets/elevenlabs-CdMQrcRu.js similarity index 83% rename from assets/elevenlabs-1fmL3c-0.js rename to assets/elevenlabs-CdMQrcRu.js index bcfb28cd05deb60918f70167df01688a3dde7569..c3c9f313fce7a37048c9e956e1da890517cacb5e 100644 --- a/assets/elevenlabs-1fmL3c-0.js +++ b/assets/elevenlabs-CdMQrcRu.js @@ -1 +1 @@ -import{_ as h}from"./TestDummyMarker.vue_vue_type_script_setup_true_lang-CG5q9Jpo.js";import{_ as p}from"./FieldRange.vue_vue_type_script_setup_true_lang-B670Jjy-.js";import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import{d as $,g as n,s as F,q as I,h as S,l as E,w as r,x as K,o as L,y as _,b as d,u as o,a as N}from"./index-D8Nm21zW.js";import{u as T}from"./providers-DUDq6kdm.js";import{u as q}from"./speech-B27BwGQ-.js";import{_ as z,a as G}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-Cscdqs1L.js";import"./index-Be1NqeGb.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-Blzu2N2U.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-CYg3DjVq.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-CL9MLblt.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BNHdvI3g.js";import"./Input.vue_vue_type_script_setup_true_lang-DacRzqGb.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DFTTO3aS.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-Bq_0Y-1M.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js";const H={flex:"~ col gap-4"},l="elevenlabs",w="eleven_multilingual_v2",ae=$({__name:"elevenlabs",setup(R){const V={similarityBoost:.75,stability:.5,speed:1,style:0,useSpeakerBoost:!0},v=n(0),u=n(1),m=n(0),f=n(0),c=n(.5),g=n(.75),b=n(!1),y=q(),t=T(),{providers:C}=F(t),{t:a}=I(),k=S(()=>{var e;return!!((e=C.value[l])!=null&&e.apiKey)}),B=S(()=>y.availableVoices[l]||[]);async function M(e,i,s){const P=t.getProviderInstance(l);if(!P)throw new Error("Failed to initialize speech provider");const x=t.getProviderConfig(l),U=x.model||w;return await y.speech(P,U,e,i,{...x,...V})}return E(async()=>{const e=t.getProviderConfig(l);await t.getProviderMetadata(l).validators.validateProviderConfig(e)?await y.loadVoicesForProvider(l):console.error("Failed to validate provider config",e)}),r(v,async()=>{const e=t.getProviderConfig(l);e.pitch=v.value}),r(u,async()=>{const e=t.getProviderConfig(l);e.speed=u.value}),r(m,async()=>{const e=t.getProviderConfig(l);e.volume=m.value}),r(f,async()=>{const e=t.getProviderConfig(l);e.style=f.value}),r(c,async()=>{const e=t.getProviderConfig(l);e.stability=c.value}),r(g,async()=>{const e=t.getProviderConfig(l);e.similarityBoost=g.value}),r(b,async()=>{const e=t.getProviderConfig(l);e.useSpeakerBoost=b.value}),r(C,async()=>{const e=t.getProviderConfig(l);await t.getProviderMetadata(l).validators.validateProviderConfig(e)?await y.loadVoicesForProvider(l):console.error("Failed to validate provider config",e)},{immediate:!0}),(e,i)=>(L(),K(o(G),{"provider-id":l,"default-model":w,"additional-settings":V},{"voice-settings":_(()=>[N("div",H,[d(o(p),{modelValue:v.value,"onUpdate:modelValue":i[0]||(i[0]=s=>v.value=s),label:o(a)("settings.pages.providers.provider.common.fields.field.pitch.label"),description:o(a)("settings.pages.providers.provider.common.fields.field.pitch.description"),min:-100,max:100,step:1,"format-value":s=>`${s}%`},null,8,["modelValue","label","description","format-value"]),d(o(p),{modelValue:u.value,"onUpdate:modelValue":i[1]||(i[1]=s=>u.value=s),label:o(a)("settings.pages.providers.provider.common.fields.field.speed.label"),description:o(a)("settings.pages.providers.provider.common.fields.field.speed.description"),min:.5,max:2,step:.01},null,8,["modelValue","label","description"]),d(o(p),{modelValue:m.value,"onUpdate:modelValue":i[2]||(i[2]=s=>m.value=s),label:o(a)("settings.pages.providers.provider.common.fields.field.volume.label"),description:o(a)("settings.pages.providers.provider.common.fields.field.volume.description"),min:-100,max:100,step:1,"format-value":s=>`${s}%`},null,8,["modelValue","label","description","format-value"]),d(o(p),{modelValue:f.value,"onUpdate:modelValue":i[3]||(i[3]=s=>f.value=s),label:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.style.label"),description:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.style.description"),min:0,max:1,step:.01},null,8,["modelValue","label","description"]),d(o(p),{modelValue:c.value,"onUpdate:modelValue":i[4]||(i[4]=s=>c.value=s),label:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.stability.label"),description:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.stability.description"),min:0,max:1,step:.01},null,8,["modelValue","label","description"]),d(o(p),{modelValue:g.value,"onUpdate:modelValue":i[5]||(i[5]=s=>g.value=s),label:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.label"),description:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.description"),min:0,max:1,step:.01},null,8,["modelValue","label","description"]),d(o(h),{modelValue:b.value,"onUpdate:modelValue":i[6]||(i[6]=s=>b.value=s),label:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.label"),description:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.description")},null,8,["modelValue","label","description"])])]),playground:_(()=>[d(o(z),{"available-voices":B.value,"generate-speech":M,"api-key-configured":k.value,"default-text":"Hello! This is a test of the ElevenLabs voice synthesis."},null,8,["available-voices","api-key-configured"])]),_:1}))}});export{ae as default}; +import{_ as h}from"./TestDummyMarker.vue_vue_type_script_setup_true_lang-7UKgQXIZ.js";import{_ as p}from"./FieldRange.vue_vue_type_script_setup_true_lang-BeH9VX4J.js";import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import{d as $,g as n,s as F,q as I,h as S,l as E,w as r,x as K,o as L,y as _,b as d,u as o,a as N}from"./index-_NYoebRU.js";import{u as T}from"./providers-Bbs_o2SI.js";import{u as q}from"./speech-DTX8fpM-.js";import{_ as z,a as G}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-C9WOvHCP.js";import"./index-Be1NqeGb.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BBijRr4z.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-Dx_TCyI1.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Cx39i7VD.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BHH_IiH5.js";import"./Input.vue_vue_type_script_setup_true_lang-DXXJ9lLc.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DEakgvr1.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-8eUb1l9O.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js";const H={flex:"~ col gap-4"},l="elevenlabs",w="eleven_multilingual_v2",ae=$({__name:"elevenlabs",setup(R){const V={similarityBoost:.75,stability:.5,speed:1,style:0,useSpeakerBoost:!0},v=n(0),u=n(1),m=n(0),f=n(0),c=n(.5),g=n(.75),b=n(!1),y=q(),t=T(),{providers:C}=F(t),{t:a}=I(),k=S(()=>{var e;return!!((e=C.value[l])!=null&&e.apiKey)}),B=S(()=>y.availableVoices[l]||[]);async function M(e,i,s){const P=t.getProviderInstance(l);if(!P)throw new Error("Failed to initialize speech provider");const x=t.getProviderConfig(l),U=x.model||w;return await y.speech(P,U,e,i,{...x,...V})}return E(async()=>{const e=t.getProviderConfig(l);await t.getProviderMetadata(l).validators.validateProviderConfig(e)?await y.loadVoicesForProvider(l):console.error("Failed to validate provider config",e)}),r(v,async()=>{const e=t.getProviderConfig(l);e.pitch=v.value}),r(u,async()=>{const e=t.getProviderConfig(l);e.speed=u.value}),r(m,async()=>{const e=t.getProviderConfig(l);e.volume=m.value}),r(f,async()=>{const e=t.getProviderConfig(l);e.style=f.value}),r(c,async()=>{const e=t.getProviderConfig(l);e.stability=c.value}),r(g,async()=>{const e=t.getProviderConfig(l);e.similarityBoost=g.value}),r(b,async()=>{const e=t.getProviderConfig(l);e.useSpeakerBoost=b.value}),r(C,async()=>{const e=t.getProviderConfig(l);await t.getProviderMetadata(l).validators.validateProviderConfig(e)?await y.loadVoicesForProvider(l):console.error("Failed to validate provider config",e)},{immediate:!0}),(e,i)=>(L(),K(o(G),{"provider-id":l,"default-model":w,"additional-settings":V},{"voice-settings":_(()=>[N("div",H,[d(o(p),{modelValue:v.value,"onUpdate:modelValue":i[0]||(i[0]=s=>v.value=s),label:o(a)("settings.pages.providers.provider.common.fields.field.pitch.label"),description:o(a)("settings.pages.providers.provider.common.fields.field.pitch.description"),min:-100,max:100,step:1,"format-value":s=>`${s}%`},null,8,["modelValue","label","description","format-value"]),d(o(p),{modelValue:u.value,"onUpdate:modelValue":i[1]||(i[1]=s=>u.value=s),label:o(a)("settings.pages.providers.provider.common.fields.field.speed.label"),description:o(a)("settings.pages.providers.provider.common.fields.field.speed.description"),min:.5,max:2,step:.01},null,8,["modelValue","label","description"]),d(o(p),{modelValue:m.value,"onUpdate:modelValue":i[2]||(i[2]=s=>m.value=s),label:o(a)("settings.pages.providers.provider.common.fields.field.volume.label"),description:o(a)("settings.pages.providers.provider.common.fields.field.volume.description"),min:-100,max:100,step:1,"format-value":s=>`${s}%`},null,8,["modelValue","label","description","format-value"]),d(o(p),{modelValue:f.value,"onUpdate:modelValue":i[3]||(i[3]=s=>f.value=s),label:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.style.label"),description:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.style.description"),min:0,max:1,step:.01},null,8,["modelValue","label","description"]),d(o(p),{modelValue:c.value,"onUpdate:modelValue":i[4]||(i[4]=s=>c.value=s),label:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.stability.label"),description:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.stability.description"),min:0,max:1,step:.01},null,8,["modelValue","label","description"]),d(o(p),{modelValue:g.value,"onUpdate:modelValue":i[5]||(i[5]=s=>g.value=s),label:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.label"),description:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.description"),min:0,max:1,step:.01},null,8,["modelValue","label","description"]),d(o(h),{modelValue:b.value,"onUpdate:modelValue":i[6]||(i[6]=s=>b.value=s),label:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.label"),description:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.description")},null,8,["modelValue","label","description"])])]),playground:_(()=>[d(o(z),{"available-voices":B.value,"generate-speech":M,"api-key-configured":k.value,"default-text":"Hello! This is a test of the ElevenLabs voice synthesis."},null,8,["available-voices","api-key-configured"])]),_:1}))}});export{ae as default}; diff --git a/assets/emotions-CgTD5sIw.js b/assets/emotions-DGp86i9c.js similarity index 72% rename from assets/emotions-CgTD5sIw.js rename to assets/emotions-DGp86i9c.js index 5cfcd14cf23b4f18f67ef9cfd1d05c48ec311f82..14feec6ff814a2c3f32793fd3781c5e4de4ce608 100644 --- a/assets/emotions-CgTD5sIw.js +++ b/assets/emotions-DGp86i9c.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import{_}from"./Textarea.vue_vue_type_script_setup_true_lang-CP4Ap1fe.js";import{d as b,g as u,c as s,o as t,a as e,b as k,u as x,D as d,bx as f,by as p}from"./index-D8Nm21zW.js";import{u as h}from"./queue-CEzllKo3.js";import{a as w,l as y}from"./queues-DJEZsGUG.js";import"./Basic.vue_vue_type_script_setup_true_lang-CrXWH1a1.js";const M={flex:"","flex-col":"","gap-2":"","p-2":""},V={flex:"","flex-row":"","gap-2":""},E={"rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-4":""},Q={"w-full":"",flex:"","flex-row":"","gap-4":""},S={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},B={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},T=b({__name:"emotions",setup(P){const l=u(""),c=u([]),i=u([]),r=u(!1),g=h({handlers:[async a=>{i.value.push(a.data)}]}),m=w(g);function v(){r.value=!0;const a=l.value.split("");for(const o of a)m.add(o);m.add(y),l.value="",r.value=!1}return(a,o)=>(t(),s("div",M,[e("div",V,[k(x(_),{modelValue:l.value,"onUpdate:modelValue":o[0]||(o[0]=n=>l.value=n),placeholder:"Message",p:"2",bg:"neutral-100 dark:neutral-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:v},null,8,["modelValue"]),e("button",E,d(r.value?"Processing...":"Send"),1)]),e("div",Q,[e("div",S,[o[1]||(o[1]=e("h3",{"font-semibold":""}," Messages ",-1)),(t(!0),s(f,null,p(c.value,n=>(t(),s("div",{key:n},[e("div",null,d(n),1)]))),128))]),e("div",B,[o[2]||(o[2]=e("h3",{"font-semibold":""}," Emotions ",-1)),(t(!0),s(f,null,p(i.value,n=>(t(),s("div",{key:n},[e("div",null,d(n),1)]))),128))])])]))}});export{T as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import{_}from"./Textarea.vue_vue_type_script_setup_true_lang-akwsm8zZ.js";import{d as b,g as u,c as s,o as t,a as e,b as k,u as x,D as d,bx as f,by as p}from"./index-_NYoebRU.js";import{u as h}from"./queue-DeGTso58.js";import{a as w,l as y}from"./queues-R1s0xq50.js";import"./Basic.vue_vue_type_script_setup_true_lang-C4n90OG-.js";const M={flex:"","flex-col":"","gap-2":"","p-2":""},V={flex:"","flex-row":"","gap-2":""},E={"rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-4":""},Q={"w-full":"",flex:"","flex-row":"","gap-4":""},S={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},B={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},T=b({__name:"emotions",setup(P){const l=u(""),c=u([]),i=u([]),r=u(!1),g=h({handlers:[async a=>{i.value.push(a.data)}]}),m=w(g);function v(){r.value=!0;const a=l.value.split("");for(const o of a)m.add(o);m.add(y),l.value="",r.value=!1}return(a,o)=>(t(),s("div",M,[e("div",V,[k(x(_),{modelValue:l.value,"onUpdate:modelValue":o[0]||(o[0]=n=>l.value=n),placeholder:"Message",p:"2",bg:"neutral-100 dark:neutral-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:v},null,8,["modelValue"]),e("button",E,d(r.value?"Processing...":"Send"),1)]),e("div",Q,[e("div",S,[o[1]||(o[1]=e("h3",{"font-semibold":""}," Messages ",-1)),(t(!0),s(f,null,p(c.value,n=>(t(),s("div",{key:n},[e("div",null,d(n),1)]))),128))]),e("div",B,[o[2]||(o[2]=e("h3",{"font-semibold":""}," Emotions ",-1)),(t(!0),s(f,null,p(i.value,n=>(t(),s("div",{key:n},[e("div",null,d(n),1)]))),128))])])]))}});export{T as default}; diff --git a/assets/featherless-ai-CcOpVhSb.js b/assets/featherless-ai-l43obo_f.js similarity index 69% rename from assets/featherless-ai-CcOpVhSb.js rename to assets/featherless-ai-l43obo_f.js index d9f1aa54fbd5aefc1cdfd2ac589705961db868cf..7a52f802e04bc34aa1e95d22160378ac32f405a3 100644 --- a/assets/featherless-ai-CcOpVhSb.js +++ b/assets/featherless-ai-l43obo_f.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.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,u as t}from"./index-D8Nm21zW.js";import{u as x}from"./providers-DUDq6kdm.js";import{_ as z,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-Blzu2N2U.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DFTTO3aS.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-Bq_0Y-1M.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-Ccg-E6bm.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-CYg3DjVq.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-CL9MLblt.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BNHdvI3g.js";import"./Input.vue_vue_type_script_setup_true_lang-DacRzqGb.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js";const a="featherless-ai",L=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{L as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.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,u as t}from"./index-_NYoebRU.js";import{u as x}from"./providers-Bbs_o2SI.js";import{_ as z,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BBijRr4z.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DEakgvr1.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-8eUb1l9O.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-7OtTanLQ.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-Dx_TCyI1.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Cx39i7VD.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BHH_IiH5.js";import"./Input.vue_vue_type_script_setup_true_lang-DXXJ9lLc.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js";const a="featherless-ai",L=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{L as default}; diff --git a/assets/filter-message-CZTuPPrs.js b/assets/filter-message-kXOD8_b1.js similarity index 79% rename from assets/filter-message-CZTuPPrs.js rename to assets/filter-message-kXOD8_b1.js index 105efcc763b198b811c76cfd6127cf6b2e1888f3..5b461a1f305a9f975840d79700d216a046eed4d6 100644 --- a/assets/filter-message-CZTuPPrs.js +++ b/assets/filter-message-kXOD8_b1.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import{_ as m}from"./Textarea.vue_vue_type_script_setup_true_lang-CP4Ap1fe.js";import{d as g,g as c,c as v,o as _,a as s,b,u as x,D as d}from"./index-D8Nm21zW.js";import"./Basic.vue_vue_type_script_setup_true_lang-CrXWH1a1.js";const S={flex:"","flex-col":"","gap-2":"","p-2":""},k={flex:"","flex-row":"","gap-2":""},w={"rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-4":""},V={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},D=g({__name:"filter-message",setup(M){const o=c(""),u=c(!1),r=c({content:""});async function f(i){return new Promise(e=>setTimeout(e,i))}async function p(){u.value=!0;const i=o.value.split("");let e;(a=>{a.Literal="literal",a.Special="special"})(e||(e={}));let t="literal",l="";for(const a of i){await f(50);let n=t;a==="<"?n="special":a===">"&&(n="literal"),t==="literal"&&n==="special"&&(r.value.content+=l,l=""),t==="special"&&n==="literal"&&(l=""),t==="literal"&&n==="literal"&&(r.value.content+=a,l=""),t=n}l&&(r.value.content+=l),o.value="",u.value=!1}return(i,e)=>(_(),v("div",S,[s("div",k,[b(x(m),{modelValue:o.value,"onUpdate:modelValue":e[0]||(e[0]=t=>o.value=t),placeholder:"Message",p:"2",bg:"neutral-100 dark:neutral-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:p},null,8,["modelValue"]),s("button",w,d(u.value?"Processing...":"Send"),1)]),s("div",V,[e[1]||(e[1]=s("h3",{"font-semibold":""}," Streaming Message ",-1)),s("div",null,d(r.value.content),1)])]))}});export{D as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import{_ as m}from"./Textarea.vue_vue_type_script_setup_true_lang-akwsm8zZ.js";import{d as g,g as c,c as v,o as _,a as s,b,u as x,D as d}from"./index-_NYoebRU.js";import"./Basic.vue_vue_type_script_setup_true_lang-C4n90OG-.js";const S={flex:"","flex-col":"","gap-2":"","p-2":""},k={flex:"","flex-row":"","gap-2":""},w={"rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-4":""},V={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},D=g({__name:"filter-message",setup(M){const o=c(""),u=c(!1),r=c({content:""});async function f(i){return new Promise(e=>setTimeout(e,i))}async function p(){u.value=!0;const i=o.value.split("");let e;(a=>{a.Literal="literal",a.Special="special"})(e||(e={}));let t="literal",l="";for(const a of i){await f(50);let n=t;a==="<"?n="special":a===">"&&(n="literal"),t==="literal"&&n==="special"&&(r.value.content+=l,l=""),t==="special"&&n==="literal"&&(l=""),t==="literal"&&n==="literal"&&(r.value.content+=a,l=""),t=n}l&&(r.value.content+=l),o.value="",u.value=!1}return(i,e)=>(_(),v("div",S,[s("div",k,[b(x(m),{modelValue:o.value,"onUpdate:modelValue":e[0]||(e[0]=t=>o.value=t),placeholder:"Message",p:"2",bg:"neutral-100 dark:neutral-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:p},null,8,["modelValue"]),s("button",w,d(u.value?"Processing...":"Send"),1)]),s("div",V,[e[1]||(e[1]=s("h3",{"font-semibold":""}," Streaming Message ",-1)),s("div",null,d(r.value.content),1)])]))}});export{D as default}; diff --git a/assets/fireworks-ai-DAA5zEq0.js b/assets/fireworks-ai-Bu1605cC.js similarity index 69% rename from assets/fireworks-ai-DAA5zEq0.js rename to assets/fireworks-ai-Bu1605cC.js index 8ef94ee852cadedcb552abcc66e8534082c3cd10..3fda13440b0e9d8f091c37ff6841e650aa984728 100644 --- a/assets/fireworks-ai-DAA5zEq0.js +++ b/assets/fireworks-ai-Bu1605cC.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.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,u as t}from"./index-D8Nm21zW.js";import{u as x}from"./providers-DUDq6kdm.js";import{_ as z,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-Blzu2N2U.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DFTTO3aS.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-Bq_0Y-1M.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-Ccg-E6bm.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-CYg3DjVq.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-CL9MLblt.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BNHdvI3g.js";import"./Input.vue_vue_type_script_setup_true_lang-DacRzqGb.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js";const a="fireworks-ai",L=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{L as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.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,u as t}from"./index-_NYoebRU.js";import{u as x}from"./providers-Bbs_o2SI.js";import{_ as z,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BBijRr4z.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DEakgvr1.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-8eUb1l9O.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-7OtTanLQ.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-Dx_TCyI1.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Cx39i7VD.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BHH_IiH5.js";import"./Input.vue_vue_type_script_setup_true_lang-DXXJ9lLc.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js";const a="fireworks-ai",L=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{L as default}; diff --git a/assets/google-generative-ai-DdbM-cuq.js b/assets/google-generative-ai-CW8mDDFz.js similarity index 72% rename from assets/google-generative-ai-DdbM-cuq.js rename to assets/google-generative-ai-CW8mDDFz.js index f7f07caffcfdb3413d3871cf2f8a6523579440c1..5dbbce607ad72b5fddda606367f34731a84e1291 100644 --- a/assets/google-generative-ai-DdbM-cuq.js +++ b/assets/google-generative-ai-CW8mDDFz.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.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,u as t}from"./index-D8Nm21zW.js";import{u as G}from"./providers-DUDq6kdm.js";import{_ as w,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-Blzu2N2U.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DFTTO3aS.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-Bq_0Y-1M.js";import{_ as z}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-Ccg-E6bm.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-CYg3DjVq.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-CL9MLblt.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BNHdvI3g.js";import"./Input.vue_vue_type_script_setup_true_lang-DacRzqGb.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js";const e="google-generative-ai",O=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{O as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.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,u as t}from"./index-_NYoebRU.js";import{u as G}from"./providers-Bbs_o2SI.js";import{_ as w,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BBijRr4z.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DEakgvr1.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-8eUb1l9O.js";import{_ as z}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-7OtTanLQ.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-Dx_TCyI1.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Cx39i7VD.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BHH_IiH5.js";import"./Input.vue_vue_type_script_setup_true_lang-DXXJ9lLc.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js";const e="google-generative-ai",O=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{O as default}; diff --git a/assets/image-CIQPT2z3.js b/assets/image-C0IQeyre.js similarity index 95% rename from assets/image-CIQPT2z3.js rename to assets/image-C0IQeyre.js index d45d27ee87cc9f88b69ae0cb570a6c1885d4da2a..a62d997cea0c139ecdd301038756f616362c7a30 100644 --- a/assets/image-CIQPT2z3.js +++ b/assets/image-C0IQeyre.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,u as v,bn as w}from"./index-D8Nm21zW.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,u as v,bn as w}from"./index-_NYoebRU.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-Cy4LPsSb.js b/assets/index-B9VZCkKy.js similarity index 70% rename from assets/index-Cy4LPsSb.js rename to assets/index-B9VZCkKy.js index 83aa1cdaf7b14c30d77cafa0c2c2323b52301575..b9dd943c8da8c7932fb26ecd1faac99b9677d4c3 100644 --- a/assets/index-Cy4LPsSb.js +++ b/assets/index-B9VZCkKy.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import{_ as n}from"./PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js";import{d as a,bw as r,c as i,o,b as l,A as c,u as m,a as d,bx as u}from"./index-D8Nm21zW.js";const p={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-20rem)]","bottom-0":"","right--15":"","z--1":"",initial:{scale:.9,opacity:0,y:40},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},x=a({__name:"index",setup(f){return(e,t)=>{const s=r("motion");return o(),i(u,null,[l(m(n),{title:e.$t("settings.pages.memory.title"),subtitle:e.$t("settings.title")},null,8,["title","subtitle"]),c((o(),i("div",p,t[0]||(t[0]=[d("div",{text:"60","i-solar:leaf-bold-duotone":""},null,-1)]))),[[s]])],64)}}});export{x as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import{_ as n}from"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js";import{d as a,bw as r,c as i,o,b as l,A as c,u as m,a as d,bx as u}from"./index-_NYoebRU.js";const p={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-20rem)]","bottom-0":"","right--15":"","z--1":"",initial:{scale:.9,opacity:0,y:40},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},x=a({__name:"index",setup(f){return(e,t)=>{const s=r("motion");return o(),i(u,null,[l(m(n),{title:e.$t("settings.pages.memory.title"),subtitle:e.$t("settings.title")},null,8,["title","subtitle"]),c((o(),i("div",p,t[0]||(t[0]=[d("div",{text:"60","i-solar:leaf-bold-duotone":""},null,-1)]))),[[s]])],64)}}});export{x as default}; diff --git a/assets/index-CMXq_S_x.js b/assets/index-BL40lgIh.js similarity index 91% rename from assets/index-CMXq_S_x.js rename to assets/index-BL40lgIh.js index c9d1945d047325455f560c57a38c2989a9c39c4e..f3056b674f2f4912194746bb6549ba5a788d6b5a 100644 --- a/assets/index-CMXq_S_x.js +++ b/assets/index-BL40lgIh.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import{_ as E}from"./PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js";import{d as S,r as D,x as b,o as a,y as P,a as i,c as m,C as w,m as R,D as C,z as q,bn as L,bG as N,g as r,q as V,v as j,h as F,bw as G,b as O,u as p,A as y,bx as $,by as H,n as J,bv as K}from"./index-D8Nm21zW.js";import{_ as M}from"./IconAnimation.vue_vue_type_script_setup_true_lang-CRr1ZQyH.js";import{b as I}from"./route-block-B_A1xBdJ.js";const Q={"z-1":"","flex-1":""},U={"text-lg":"","font-bold":"",class:"menu-icon-item-title",transition:"all ease-in-out duration-400"},W={text:"sm neutral-500 dark:neutral-400",class:"menu-icon-item-description",transition:"all ease-in-out duration-400"},X=S({__name:"IconItem",props:{title:null,description:null,icon:null,iconTemplate:{type:Boolean},to:null},setup(o){return(g,f)=>{const v=D("RouterLink");return a(),b(v,{box:"border",flex:"~ row",bg:"neutral-50 dark:neutral-900",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:o.to},{default:P(()=>[i("div",Q,[i("div",U,C(o.title),1),i("div",W,[i("span",null,C(o.description),1)])]),typeof o.icon=="string"?(a(),m("div",{key:0,class:q(["menu-icon-item-icon",[o.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)):w("",!0),o.iconTemplate?R(g.$slots,"icon",{key:1},void 0,!0):w("",!0)]),_:3},8,["to"])}}}),Y=L(X,[["__scopeId","data-v-656e0116"]]),Z={flex:"~ col gap-4"},tt={flex:"~ col gap-4"},et={key:1,text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-12rem)]","bottom-0":"","right--10":"","z--1":"",initial:{scale:.9,opacity:0,rotate:180},enter:{scale:1,opacity:1,rotate:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},it={text:"60","i-solar:settings-bold-duotone":""},ot=S({__name:"index",setup(o){const g=N(),f=r(!1),v=r(),c=r(),{t}=V(),x=r(""),h=r(""),k=r(!1),d=j();function z(){var n;(n=c.value)==null||n.call(c)}async function T(n,l){const e=n.currentTarget.querySelector(".menu-icon-item-icon");if(!e)return;const u=e.getBoundingClientRect(),_=`${u.left}px, ${u.top}px`;x.value=l.icon,h.value=_,k.value=!0,await K(),f.value=!0}const B=g.beforeEach(async(n,l,s)=>{if(!d.usePageSpecificTransitions||d.disableTransitions){s();return}await new Promise(e=>{c.value=e}),B(),s()}),A=F(()=>[{title:t("settings.pages.card.title"),description:t("settings.pages.card.description"),icon:"i-solar:emoji-funny-square-bold-duotone",to:"/settings/airi-card"},{title:t("settings.pages.modules.title"),description:t("settings.pages.modules.description"),icon:"i-solar:layers-bold-duotone",to:"/settings/modules"},{title:t("settings.pages.scene.title"),description:t("settings.pages.scene.description"),icon:"i-solar:armchair-2-bold-duotone",to:"/settings/scene"},{title:t("settings.pages.models.title"),description:t("settings.pages.models.description"),icon:"i-solar:people-nearby-bold-duotone",to:"/settings/models"},{title:t("settings.pages.memory.title"),description:t("settings.pages.memory.description"),icon:"i-solar:leaf-bold-duotone",to:"/settings/memory"},{title:t("settings.pages.providers.title"),description:t("settings.pages.providers.description"),icon:"i-solar:box-minimalistic-bold-duotone",to:"/settings/providers"},{title:t("settings.pages.themes.title"),description:t("settings.pages.themes.description"),icon:"i-solar:filters-bold-duotone",to:"/settings/appearance"}]);return(n,l)=>{const s=G("motion");return a(),m($,null,[O(p(E),{title:n.$t("settings.title")},null,8,["title"]),i("div",Z,[l[0]||(l[0]=i("div",null,null,-1)),i("div",tt,[(a(!0),m($,null,H(A.value,(e,u)=>y((a(),b(p(Y),{key:e.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:J({transitionDelay:`${u*50}ms`}),title:e.title,description:e.description,icon:e.icon,to:e.to,onClick:_=>T(_,e)},null,8,["style","title","description","icon","to","onClick"])),[[s]])),128))]),k.value&&!p(d).disableTransitions&&p(d).usePageSpecificTransitions?(a(),b(M,{key:0,ref_key:"iconAnimation",ref:v,icon:x.value,"icon-size":6*1.2,position:h.value,duration:1e3,"text-color":"text-neutral-400/50 dark:text-neutral-600/20",started:f.value,onAnimationEndedOnce:z},null,8,["icon","position","started"])):y((a(),m("div",et,[y(i("div",it,null,512),[[s]])])),[[s]])])],64)}}});typeof I=="function"&&I(ot);export{ot as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import{_ as E}from"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js";import{d as S,r as D,x as b,o as a,y as P,a as i,c as m,C as w,m as R,D as C,z as q,bn as L,bG as N,g as r,q as V,v as j,h as F,bw as G,b as O,u as p,A as y,bx as $,by as H,n as J,bv as K}from"./index-_NYoebRU.js";import{_ as M}from"./IconAnimation.vue_vue_type_script_setup_true_lang-BRA-bMih.js";import{b as I}from"./route-block-B_A1xBdJ.js";const Q={"z-1":"","flex-1":""},U={"text-lg":"","font-bold":"",class:"menu-icon-item-title",transition:"all ease-in-out duration-400"},W={text:"sm neutral-500 dark:neutral-400",class:"menu-icon-item-description",transition:"all ease-in-out duration-400"},X=S({__name:"IconItem",props:{title:null,description:null,icon:null,iconTemplate:{type:Boolean},to:null},setup(o){return(g,f)=>{const v=D("RouterLink");return a(),b(v,{box:"border",flex:"~ row",bg:"neutral-50 dark:neutral-900",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:o.to},{default:P(()=>[i("div",Q,[i("div",U,C(o.title),1),i("div",W,[i("span",null,C(o.description),1)])]),typeof o.icon=="string"?(a(),m("div",{key:0,class:q(["menu-icon-item-icon",[o.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)):w("",!0),o.iconTemplate?R(g.$slots,"icon",{key:1},void 0,!0):w("",!0)]),_:3},8,["to"])}}}),Y=L(X,[["__scopeId","data-v-656e0116"]]),Z={flex:"~ col gap-4"},tt={flex:"~ col gap-4"},et={key:1,text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-12rem)]","bottom-0":"","right--10":"","z--1":"",initial:{scale:.9,opacity:0,rotate:180},enter:{scale:1,opacity:1,rotate:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},it={text:"60","i-solar:settings-bold-duotone":""},ot=S({__name:"index",setup(o){const g=N(),f=r(!1),v=r(),c=r(),{t}=V(),x=r(""),h=r(""),k=r(!1),d=j();function z(){var n;(n=c.value)==null||n.call(c)}async function T(n,l){const e=n.currentTarget.querySelector(".menu-icon-item-icon");if(!e)return;const u=e.getBoundingClientRect(),_=`${u.left}px, ${u.top}px`;x.value=l.icon,h.value=_,k.value=!0,await K(),f.value=!0}const B=g.beforeEach(async(n,l,s)=>{if(!d.usePageSpecificTransitions||d.disableTransitions){s();return}await new Promise(e=>{c.value=e}),B(),s()}),A=F(()=>[{title:t("settings.pages.card.title"),description:t("settings.pages.card.description"),icon:"i-solar:emoji-funny-square-bold-duotone",to:"/settings/airi-card"},{title:t("settings.pages.modules.title"),description:t("settings.pages.modules.description"),icon:"i-solar:layers-bold-duotone",to:"/settings/modules"},{title:t("settings.pages.scene.title"),description:t("settings.pages.scene.description"),icon:"i-solar:armchair-2-bold-duotone",to:"/settings/scene"},{title:t("settings.pages.models.title"),description:t("settings.pages.models.description"),icon:"i-solar:people-nearby-bold-duotone",to:"/settings/models"},{title:t("settings.pages.memory.title"),description:t("settings.pages.memory.description"),icon:"i-solar:leaf-bold-duotone",to:"/settings/memory"},{title:t("settings.pages.providers.title"),description:t("settings.pages.providers.description"),icon:"i-solar:box-minimalistic-bold-duotone",to:"/settings/providers"},{title:t("settings.pages.themes.title"),description:t("settings.pages.themes.description"),icon:"i-solar:filters-bold-duotone",to:"/settings/appearance"}]);return(n,l)=>{const s=G("motion");return a(),m($,null,[O(p(E),{title:n.$t("settings.title")},null,8,["title"]),i("div",Z,[l[0]||(l[0]=i("div",null,null,-1)),i("div",tt,[(a(!0),m($,null,H(A.value,(e,u)=>y((a(),b(p(Y),{key:e.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:J({transitionDelay:`${u*50}ms`}),title:e.title,description:e.description,icon:e.icon,to:e.to,onClick:_=>T(_,e)},null,8,["style","title","description","icon","to","onClick"])),[[s]])),128))]),k.value&&!p(d).disableTransitions&&p(d).usePageSpecificTransitions?(a(),b(M,{key:0,ref_key:"iconAnimation",ref:v,icon:x.value,"icon-size":6*1.2,position:h.value,duration:1e3,"text-color":"text-neutral-400/50 dark:text-neutral-600/20",started:f.value,onAnimationEndedOnce:z},null,8,["icon","position","started"])):y((a(),m("div",et,[y(i("div",it,null,512),[[s]])])),[[s]])])],64)}}});typeof I=="function"&&I(ot);export{ot as default}; diff --git a/assets/index-DemghqgU.js b/assets/index-BOm9MDgq.js similarity index 78% rename from assets/index-DemghqgU.js rename to assets/index-BOm9MDgq.js index 3824cdbc3106e9ef50f67bbe8607e95618ac6773..c4194a646224380782a3432a30c72ccefe41b907 100644 --- a/assets/index-DemghqgU.js +++ b/assets/index-BOm9MDgq.js @@ -1 +1 @@ -import{_ as u}from"./IconAnimation.vue_vue_type_script_setup_true_lang-CRr1ZQyH.js";import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import{_ as p}from"./PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js";import{d as f,bw as _,c as n,o,b as v,a,x,A as b,u as e,bx as k}from"./index-D8Nm21zW.js";import{u as y}from"./useIconAnimation-D5irYuyi.js";import{b as r}from"./route-block-B_A1xBdJ.js";const g={key:1,text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,y:20},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},h=f({__name:"index",setup(A){const{iconAnimationStarted:s,showIconAnimation:c,animationIcon:l}=y("i-solar:armchair-2-bold-duotone");return(i,t)=>{const m=u,d=_("motion");return o(),n(k,null,[v(e(p),{title:i.$t("settings.pages.scene.title"),subtitle:i.$t("settings.title")},null,8,["title","subtitle"]),t[1]||(t[1]=a("div",null," Scene ",-1)),e(c)?(o(),x(m,{key:0,"z-index":-1,icon:e(l),"icon-size":12,duration:1e3,started:e(s),"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"])):b((o(),n("div",g,t[0]||(t[0]=[a("div",{text:"60","i-solar:armchair-2-bold-duotone":""},null,-1)]))),[[d]])],64)}}});typeof r=="function"&&r(h);export{h as default}; +import{_ as u}from"./IconAnimation.vue_vue_type_script_setup_true_lang-BRA-bMih.js";import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import{_ as p}from"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js";import{d as f,bw as _,c as n,o,b as v,a,x,A as b,u as e,bx as k}from"./index-_NYoebRU.js";import{u as y}from"./useIconAnimation-Cb5gBMka.js";import{b as r}from"./route-block-B_A1xBdJ.js";const g={key:1,text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,y:20},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},h=f({__name:"index",setup(A){const{iconAnimationStarted:s,showIconAnimation:c,animationIcon:l}=y("i-solar:armchair-2-bold-duotone");return(i,t)=>{const m=u,d=_("motion");return o(),n(k,null,[v(e(p),{title:i.$t("settings.pages.scene.title"),subtitle:i.$t("settings.title")},null,8,["title","subtitle"]),t[1]||(t[1]=a("div",null," Scene ",-1)),e(c)?(o(),x(m,{key:0,"z-index":-1,icon:e(l),"icon-size":12,duration:1e3,started:e(s),"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"])):b((o(),n("div",g,t[0]||(t[0]=[a("div",{text:"60","i-solar:armchair-2-bold-duotone":""},null,-1)]))),[[d]])],64)}}});typeof r=="function"&&r(h);export{h as default}; diff --git a/assets/index-Cs5RsFGh.js b/assets/index-BUi2PgJw.js similarity index 81% rename from assets/index-Cs5RsFGh.js rename to assets/index-BUi2PgJw.js index f585ffaeae945271731a9622c08aec47e9a56a19..548e30a8f5b338178a2a7fab2623e48e427facfd 100644 --- a/assets/index-Cs5RsFGh.js +++ b/assets/index-BUi2PgJw.js @@ -1 +1 @@ -import{_ as x}from"./IconAnimation.vue_vue_type_script_setup_true_lang-CRr1ZQyH.js";import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import{_ as v}from"./PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js";import{d as k,s as I,bw as h,c as i,o,b as z,a as c,x as l,A as m,u as e,bx as d,by as A}from"./index-D8Nm21zW.js";import{u as $}from"./providers-DUDq6kdm.js";import{I as w}from"./IconStatusItem-BzE_9TF3.js";import{u as B}from"./useIconAnimation-D5irYuyi.js";import{b as u}from"./route-block-B_A1xBdJ.js";import"./index-Be1NqeGb.js";const S={grid:"~ cols-2 gap-4"},D={key:1,text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,y:20},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},N=k({__name:"index",setup(C){const p=$(),{allProvidersMetadata:f}=I(p),{iconAnimationStarted:_,showIconAnimation:y,animationIcon:g}=B("i-solar:box-minimalistic-bold-duotone");return(n,a)=>{const b=x,s=h("motion");return o(),i(d,null,[z(e(v),{title:n.$t("settings.pages.providers.title"),subtitle:n.$t("settings.title")},null,8,["title","subtitle"]),c("div",S,[(o(!0),i(d,null,A(e(f),(t,r)=>m((o(),l(e(w),{key:t.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+r*10,delay:r*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"])),[[s]])),128))]),e(y)?(o(),l(b,{key:0,"z-index":-1,icon:e(g),"icon-size":12,duration:1e3,started:e(_),"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"])):m((o(),i("div",D,a[0]||(a[0]=[c("div",{text:"60","i-solar:box-minimalistic-bold-duotone":""},null,-1)]))),[[s]])],64)}}});typeof u=="function"&&u(N);export{N as default}; +import{_ as x}from"./IconAnimation.vue_vue_type_script_setup_true_lang-BRA-bMih.js";import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import{_ as v}from"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js";import{d as k,s as I,bw as h,c as i,o,b as z,a as c,x as l,A as m,u as e,bx as d,by as A}from"./index-_NYoebRU.js";import{u as $}from"./providers-Bbs_o2SI.js";import{I as w}from"./IconStatusItem-DEltasic.js";import{u as B}from"./useIconAnimation-Cb5gBMka.js";import{b as u}from"./route-block-B_A1xBdJ.js";import"./index-Be1NqeGb.js";const S={grid:"~ cols-2 gap-4"},D={key:1,text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,y:20},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},N=k({__name:"index",setup(C){const p=$(),{allProvidersMetadata:f}=I(p),{iconAnimationStarted:_,showIconAnimation:y,animationIcon:g}=B("i-solar:box-minimalistic-bold-duotone");return(n,a)=>{const b=x,s=h("motion");return o(),i(d,null,[z(e(v),{title:n.$t("settings.pages.providers.title"),subtitle:n.$t("settings.title")},null,8,["title","subtitle"]),c("div",S,[(o(!0),i(d,null,A(e(f),(t,r)=>m((o(),l(e(w),{key:t.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+r*10,delay:r*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"])),[[s]])),128))]),e(y)?(o(),l(b,{key:0,"z-index":-1,icon:e(g),"icon-size":12,duration:1e3,started:e(_),"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"])):m((o(),i("div",D,a[0]||(a[0]=[c("div",{text:"60","i-solar:box-minimalistic-bold-duotone":""},null,-1)]))),[[s]])],64)}}});typeof u=="function"&&u(N);export{N as default}; diff --git a/assets/index-BUaUWOtl.js b/assets/index-Bl8tS_1d.js similarity index 99% rename from assets/index-BUaUWOtl.js rename to assets/index-Bl8tS_1d.js index 9a61193d1bebfb7820c453f06d1b72c47a763994..1e3438e9192e9180a924eba13e94d3c2b3747714 100644 --- a/assets/index-BUaUWOtl.js +++ b/assets/index-Bl8tS_1d.js @@ -1,3 +1,3 @@ -import{h as O,g as E,G as Mt,w as j,ah as Lt,ai as Ft,bT as xe,u as m,d as D,x as T,o as B,y as A,m as P,bU as de,bV as fe,bW as F,bM as Ze,bv as ge,l as De,E as lt,C as Nt,b as me,bX as yn,bY as ye,bZ as wn,b_ as kt,b$ as bn,c0 as ke,c1 as xn,c2 as On,br as Cn,H as It,bx as An,c3 as Wt,c4 as En,c5 as Ht,c6 as xt,af as K,ab as Dn,bL as Pn,D as _n,c as Vt,n as st,c7 as jt,c8 as Bn,c9 as zt,ca as Tn,cb as Rn,a as $n,cc as Sn,cd as Mn}from"./index-D8Nm21zW.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,bT as xe,u as m,d as D,x as T,o as B,y as A,m as P,bU as de,bV as fe,bW as F,bM as Ze,bv as ge,l as De,E as lt,C as Nt,b as me,bX as yn,bY as ye,bZ as wn,b_ as kt,b$ as bn,c0 as ke,c1 as xn,c2 as On,br as Cn,H as It,bx as An,c3 as Wt,c4 as En,c5 as Ht,c6 as xt,af as K,ab as Dn,bL as Pn,D as _n,c as Vt,n as st,c7 as jt,c8 as Bn,c9 as zt,ca as Tn,cb as Rn,a as $n,cc as Sn,cd as Mn}from"./index-_NYoebRU.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-B5H7zFR1.js b/assets/index-C6pwynJz.js similarity index 89% rename from assets/index-B5H7zFR1.js rename to assets/index-C6pwynJz.js index 84995439004db43f078422f3426b686e85379d28..b7b7fb88aca3a87aa0af47958b6fd591df145d60 100644 --- a/assets/index-B5H7zFR1.js +++ b/assets/index-C6pwynJz.js @@ -1 +1 @@ -import{d as T,q as J,s as H,g as c,w as Q,h,bw as R,c as m,o as d,b as y,a as s,A as w,u as r,bE as G,D as l,bH as K,z as P,C as V,y as W,bx as U,by as X,x as Y}from"./index-D8Nm21zW.js";import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import{_ as Z}from"./InputFile.vue_vue_type_script_setup_true_lang-aVfE3xzX.js";import{_ as ee}from"./PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js";import{u as te}from"./airi-card-DeGSbHPj.js";import{_ as se}from"./CardDetailDialog.vue_vue_type_script_setup_true_lang-DAwVKIUC.js";import{_ as ae}from"./CardListItem.vue_vue_type_script_setup_true_lang-DG6xnm5K.js";import{_ as re}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-NzJTgSSI.js";import{b as j}from"./route-block-B_A1xBdJ.js";import"./consciousness-CgTB9b9w.js";import"./providers-DUDq6kdm.js";import"./index-Be1NqeGb.js";import"./speech-B27BwGQ-.js";import"./index-BUaUWOtl.js";const oe={"rounded-xl":"","p-4":"",flex:"~ col gap-4"},ne={flex:"~ row","flex-wrap":"","items-center":"","justify-between":"","gap-4":""},le={class:"relative min-w-[200px] flex-1","inline-flex":"~","w-full":"","items-center":""},ie=["placeholder"],de={class:"flex items-center gap-2"},ue={"text-sm":"","text-neutral-500":"","dark:text-neutral-400":""},ce={value:"nameAsc"},me={value:"nameDesc"},pe={value:"recent"},fe={key:0,flex:"","flex-col":"","items-center":""},ve={"font-medium":"",text:"neutral-600 dark:neutral-300"},xe={text:"neutral-500 dark:neutral-400","mt-2":"","text-sm":""},ge={key:1,flex:"","flex-col":"","items-center":""},_e={"font-medium":"",text:"primary-600 dark:primary-300"},be={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"},ye={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"},ke={class:"flex flex-col"},Ce={class:"font-medium"},he={class:"text-sm text-amber-600 dark:text-amber-400"},we={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},Ve=T({__name:"index",setup(De){const{t:n}=J(),k=te(),{addCard:q,removeCard:B}=k,{cards:p,activeCardId:D}=H(k),_=c(""),f=c(!1),v=c(""),x=c("nameAsc"),C=c([]);Q(C,async a=>{const e=a[0];if(e)try{const o=await e.text(),i=JSON.parse(o);_.value=q(i),f.value=!0}catch(o){console.error("Error processing card file:",o)}});const $=h(()=>Array.from(p.value.entries()).map(([a,e])=>({id:a,name:e.name,description:e.description}))),E=h(()=>{if(!v.value)return $.value;const a=v.value.toLowerCase();return $.value.filter(e=>e.name.toLowerCase().includes(a)||e.description&&e.description.toLowerCase().includes(a))}),S=h(()=>{const a=[...E.value];return x.value==="nameAsc"?a.sort((e,o)=>e.name.localeCompare(o.name)):x.value==="nameDesc"?a.sort((e,o)=>o.name.localeCompare(e.name)):x.value==="recent"?a.sort((e,o)=>o.id.localeCompare(e.id)):a}),b=c(!1),u=c(null);function L(){u.value&&(B(u.value),u.value=null,b.value=!1)}function O(a){u.value=a,b.value=!0}function F(a){_.value=a,f.value=!0}function I(a){D.value=a}function M(a){const e=p.value.get(a);return(e==null?void 0:e.version)||"1.0.0"}function A(a,e){var t,g,z,N;const o=p.value.get(a);if(!o||!((g=(t=o.extensions)==null?void 0:t.airi)!=null&&g.modules))return"default";const i=o.extensions.airi.modules;return e==="consciousness"?(z=i.consciousness)!=null&&z.model&&i.consciousness.model.split("-").pop()||"default":e==="voice"&&((N=i.speech)==null?void 0:N.voice_id)||"default"}return(a,e)=>{var i;const o=R("motion");return d(),m(U,null,[y(r(ee),{title:a.$t("settings.pages.card.title"),subtitle:a.$t("settings.title")},null,8,["title","subtitle"]),s("div",oe,[s("div",ne,[s("div",le,[e[6]||(e[6]=s("div",{class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},[s("div",{"i-solar:magnifer-line-duotone":"",class:"text-neutral-500 dark:text-neutral-400"})],-1)),w(s("input",{"onUpdate:modelValue":e[0]||(e[0]=t=>v.value=t),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:r(n)("settings.pages.card.search")},null,8,ie),[[G,v.value]])]),s("div",de,[s("div",ue,l(r(n)("settings.pages.card.sort_by"))+": ",1),w(s("select",{"onUpdate:modelValue":e[1]||(e[1]=t=>x.value=t),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"},[s("option",ce,l(r(n)("settings.pages.card.name_asc")),1),s("option",me,l(r(n)("settings.pages.card.name_desc")),1),s("option",pe,l(r(n)("settings.pages.card.recent")),1)],512),[[K,x.value]])])]),s("div",{class:P(["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))]":r(p).size>0}])},[y(r(Z),{modelValue:C.value,"onUpdate:modelValue":e[2]||(e[2]=t=>C.value=t),accept:"*.json"},{default:W(({isDragging:t})=>[t?(d(),m("div",ge,[e[8]||(e[8]=s("div",{"i-solar:upload-minimalistic-bold":"",class:"text-primary-500 dark:text-primary-400 mb-2 text-5xl"},null,-1)),s("p",_e,l(r(n)("settings.pages.card.drop_here")),1)])):(d(),m("div",fe,[e[7]||(e[7]=s("div",{"i-solar:upload-square-line-duotone":"","mb-4":"","text-5xl":"",text:"neutral-400 dark:neutral-500"},null,-1)),s("p",ve,l(r(n)("settings.pages.card.upload")),1),s("p",xe,l(r(n)("settings.pages.card.upload_desc")),1)]))]),_:1},8,["modelValue"]),r(p).size>0?(d(!0),m(U,{key:0},X(S.value,t=>(d(),Y(ae,{id:t.id,key:t.id,name:t.name,description:t.description,"is-active":t.id===r(D),"is-selected":t.id===_.value&&f.value,version:M(t.id),"consciousness-model":A(t.id,"consciousness"),"voice-model":A(t.id,"voice"),onSelect:g=>F(t.id),onActivate:g=>I(t.id),onDelete:g=>O(t.id)},null,8,["id","name","description","is-active","is-selected","version","consciousness-model","voice-model","onSelect","onActivate","onDelete"]))),128)):V("",!0),r(p).size===0?(d(),m("div",be,[e[9]||(e[9]=s("div",{"i-solar:card-search-broken":"","mx-auto":"","mb-3":"","text-6xl":"","text-neutral-400":""},null,-1)),s("p",null,l(r(n)("settings.pages.card.no_cards")),1)])):V("",!0),v.value&&S.value.length===0?(d(),m("div",ye,[e[10]||(e[10]=s("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),s("div",ke,[s("span",Ce,l(r(n)("settings.pages.card.no_results")),1),s("span",he,l(r(n)("settings.pages.card.try_different_search")),1)])])):V("",!0)],2)]),y(re,{modelValue:b.value,"onUpdate:modelValue":e[3]||(e[3]=t=>b.value=t),"card-name":u.value?(i=r(k).getCard(u.value))==null?void 0:i.name:"",onConfirm:L,onCancel:e[4]||(e[4]=t=>u.value=null)},null,8,["modelValue","card-name"]),y(se,{modelValue:f.value,"onUpdate:modelValue":e[5]||(e[5]=t=>f.value=t),"card-id":_.value},null,8,["modelValue","card-id"]),w((d(),m("div",we,e[11]||(e[11]=[s("div",{text:"60","i-solar:emoji-funny-square-bold-duotone":""},null,-1)]))),[[o]])],64)}}});typeof j=="function"&&j(Ve);export{Ve as default}; +import{d as T,q as J,s as H,g as c,w as Q,h,bw as R,c as m,o as d,b as y,a as s,A as w,u as r,bE as G,D as l,bH as K,z as P,C as V,y as W,bx as U,by as X,x as Y}from"./index-_NYoebRU.js";import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import{_ as Z}from"./InputFile.vue_vue_type_script_setup_true_lang-UdikYOzo.js";import{_ as ee}from"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js";import{u as te}from"./airi-card-BWLSOH_H.js";import{_ as se}from"./CardDetailDialog.vue_vue_type_script_setup_true_lang-BFh-yT1v.js";import{_ as ae}from"./CardListItem.vue_vue_type_script_setup_true_lang-CXgQKm7D.js";import{_ as re}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-BHqygveO.js";import{b as j}from"./route-block-B_A1xBdJ.js";import"./consciousness-Ch13RX1M.js";import"./providers-Bbs_o2SI.js";import"./index-Be1NqeGb.js";import"./speech-DTX8fpM-.js";import"./index-Bl8tS_1d.js";const oe={"rounded-xl":"","p-4":"",flex:"~ col gap-4"},ne={flex:"~ row","flex-wrap":"","items-center":"","justify-between":"","gap-4":""},le={class:"relative min-w-[200px] flex-1","inline-flex":"~","w-full":"","items-center":""},ie=["placeholder"],de={class:"flex items-center gap-2"},ue={"text-sm":"","text-neutral-500":"","dark:text-neutral-400":""},ce={value:"nameAsc"},me={value:"nameDesc"},pe={value:"recent"},fe={key:0,flex:"","flex-col":"","items-center":""},ve={"font-medium":"",text:"neutral-600 dark:neutral-300"},xe={text:"neutral-500 dark:neutral-400","mt-2":"","text-sm":""},ge={key:1,flex:"","flex-col":"","items-center":""},_e={"font-medium":"",text:"primary-600 dark:primary-300"},be={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"},ye={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"},ke={class:"flex flex-col"},Ce={class:"font-medium"},he={class:"text-sm text-amber-600 dark:text-amber-400"},we={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},Ve=T({__name:"index",setup(De){const{t:n}=J(),k=te(),{addCard:q,removeCard:B}=k,{cards:p,activeCardId:D}=H(k),_=c(""),f=c(!1),v=c(""),x=c("nameAsc"),C=c([]);Q(C,async a=>{const e=a[0];if(e)try{const o=await e.text(),i=JSON.parse(o);_.value=q(i),f.value=!0}catch(o){console.error("Error processing card file:",o)}});const $=h(()=>Array.from(p.value.entries()).map(([a,e])=>({id:a,name:e.name,description:e.description}))),E=h(()=>{if(!v.value)return $.value;const a=v.value.toLowerCase();return $.value.filter(e=>e.name.toLowerCase().includes(a)||e.description&&e.description.toLowerCase().includes(a))}),S=h(()=>{const a=[...E.value];return x.value==="nameAsc"?a.sort((e,o)=>e.name.localeCompare(o.name)):x.value==="nameDesc"?a.sort((e,o)=>o.name.localeCompare(e.name)):x.value==="recent"?a.sort((e,o)=>o.id.localeCompare(e.id)):a}),b=c(!1),u=c(null);function L(){u.value&&(B(u.value),u.value=null,b.value=!1)}function O(a){u.value=a,b.value=!0}function F(a){_.value=a,f.value=!0}function I(a){D.value=a}function M(a){const e=p.value.get(a);return(e==null?void 0:e.version)||"1.0.0"}function A(a,e){var t,g,z,N;const o=p.value.get(a);if(!o||!((g=(t=o.extensions)==null?void 0:t.airi)!=null&&g.modules))return"default";const i=o.extensions.airi.modules;return e==="consciousness"?(z=i.consciousness)!=null&&z.model&&i.consciousness.model.split("-").pop()||"default":e==="voice"&&((N=i.speech)==null?void 0:N.voice_id)||"default"}return(a,e)=>{var i;const o=R("motion");return d(),m(U,null,[y(r(ee),{title:a.$t("settings.pages.card.title"),subtitle:a.$t("settings.title")},null,8,["title","subtitle"]),s("div",oe,[s("div",ne,[s("div",le,[e[6]||(e[6]=s("div",{class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},[s("div",{"i-solar:magnifer-line-duotone":"",class:"text-neutral-500 dark:text-neutral-400"})],-1)),w(s("input",{"onUpdate:modelValue":e[0]||(e[0]=t=>v.value=t),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:r(n)("settings.pages.card.search")},null,8,ie),[[G,v.value]])]),s("div",de,[s("div",ue,l(r(n)("settings.pages.card.sort_by"))+": ",1),w(s("select",{"onUpdate:modelValue":e[1]||(e[1]=t=>x.value=t),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"},[s("option",ce,l(r(n)("settings.pages.card.name_asc")),1),s("option",me,l(r(n)("settings.pages.card.name_desc")),1),s("option",pe,l(r(n)("settings.pages.card.recent")),1)],512),[[K,x.value]])])]),s("div",{class:P(["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))]":r(p).size>0}])},[y(r(Z),{modelValue:C.value,"onUpdate:modelValue":e[2]||(e[2]=t=>C.value=t),accept:"*.json"},{default:W(({isDragging:t})=>[t?(d(),m("div",ge,[e[8]||(e[8]=s("div",{"i-solar:upload-minimalistic-bold":"",class:"text-primary-500 dark:text-primary-400 mb-2 text-5xl"},null,-1)),s("p",_e,l(r(n)("settings.pages.card.drop_here")),1)])):(d(),m("div",fe,[e[7]||(e[7]=s("div",{"i-solar:upload-square-line-duotone":"","mb-4":"","text-5xl":"",text:"neutral-400 dark:neutral-500"},null,-1)),s("p",ve,l(r(n)("settings.pages.card.upload")),1),s("p",xe,l(r(n)("settings.pages.card.upload_desc")),1)]))]),_:1},8,["modelValue"]),r(p).size>0?(d(!0),m(U,{key:0},X(S.value,t=>(d(),Y(ae,{id:t.id,key:t.id,name:t.name,description:t.description,"is-active":t.id===r(D),"is-selected":t.id===_.value&&f.value,version:M(t.id),"consciousness-model":A(t.id,"consciousness"),"voice-model":A(t.id,"voice"),onSelect:g=>F(t.id),onActivate:g=>I(t.id),onDelete:g=>O(t.id)},null,8,["id","name","description","is-active","is-selected","version","consciousness-model","voice-model","onSelect","onActivate","onDelete"]))),128)):V("",!0),r(p).size===0?(d(),m("div",be,[e[9]||(e[9]=s("div",{"i-solar:card-search-broken":"","mx-auto":"","mb-3":"","text-6xl":"","text-neutral-400":""},null,-1)),s("p",null,l(r(n)("settings.pages.card.no_cards")),1)])):V("",!0),v.value&&S.value.length===0?(d(),m("div",ye,[e[10]||(e[10]=s("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),s("div",ke,[s("span",Ce,l(r(n)("settings.pages.card.no_results")),1),s("span",he,l(r(n)("settings.pages.card.try_different_search")),1)])])):V("",!0)],2)]),y(re,{modelValue:b.value,"onUpdate:modelValue":e[3]||(e[3]=t=>b.value=t),"card-name":u.value?(i=r(k).getCard(u.value))==null?void 0:i.name:"",onConfirm:L,onCancel:e[4]||(e[4]=t=>u.value=null)},null,8,["modelValue","card-name"]),y(se,{modelValue:f.value,"onUpdate:modelValue":e[5]||(e[5]=t=>f.value=t),"card-id":_.value},null,8,["modelValue","card-id"]),w((d(),m("div",we,e[11]||(e[11]=[s("div",{text:"60","i-solar:emoji-funny-square-bold-duotone":""},null,-1)]))),[[o]])],64)}}});typeof j=="function"&&j(Ve);export{Ve as default}; diff --git a/assets/index-Cu7e5uZ2.js b/assets/index-CEzIWA5x.js similarity index 91% rename from assets/index-Cu7e5uZ2.js rename to assets/index-CEzIWA5x.js index b53aed7ab5fe24d9ab3f09619c93bb3cc7819a13..373b744a513246deda9a34e292606551b439721b 100644 --- a/assets/index-Cu7e5uZ2.js +++ b/assets/index-CEzIWA5x.js @@ -1 +1 @@ -import{_ as Z}from"./IconAnimation.vue_vue_type_script_setup_true_lang-CRr1ZQyH.js";import{k as V,l as P,m as q,J as H}from"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import{d as E,v as B,c as p,o as s,u as t,m as W,q as G,bN as K,s as Q,g as F,w as X,bO as Y,b as i,x as A,C as ee,y as u,a as m,A as S,bE as te,bL as g,D as N,bx as U,by as z,bH as oe,bn as ne,k as ie,bw as le}from"./index-D8Nm21zW.js";import{_ as ae}from"./PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js";import{_ as se,a as re}from"./Model.vue_vue_type_script_setup_true_lang-xbmtXrdQ.js";import{V as de}from"./browser-CkchkNbv.js";import{_ as D,a as ce}from"./ColorPalette.vue_vue_type_script_setup_true_lang-Dh84R3gB.js";import{u as ue}from"./useIconAnimation-D5irYuyi.js";import{b as I}from"./route-block-B_A1xBdJ.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-CYg3DjVq.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-CL9MLblt.js";import"./index-BUaUWOtl.js";const me=["disabled"],h=E({__name:"Live2DModelControlButton",emits:["click"],setup(L){const f=B();return(r,n)=>(s(),p("button",{disabled:t(f).loadingLive2dModel,bg:"neutral-100 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",transition:"all ease-in-out duration-250",rounded:"",onClick:n[0]||(n[0]=v=>r.$emit("click"))},[W(r.$slots,"default")],8,me))}}),fe={flex:"~ col gap-4"},pe={flex:"","items-center":"","gap-2":""},ve=["disabled","placeholder"],be={"font-medium":""},_e={flex:"","gap-2":""},ge=["onUpdate:modelValue"],he=["href","download"],ye=E({__name:"Live2DSettings",props:{palette:null},emits:["extractColorsFromModel"],setup(L){const{t:f}=G(),r=K({accept:"application/zip"}),n=B(),{live2dModelFile:v,live2dMotionMap:b,live2dLoadSource:y,loadingLive2dModel:x,availableLive2dMotions:j,live2dModelUrl:M}=Q(n),d=F(M.value);r.onChange(o=>{o&&o.length>0&&(b.value={},v.value=o[0],y.value="file",x.value=!0)}),X(()=>n.loadingLive2dModel,o=>{o||y.value==="file"&&j.value.forEach(e=>{e.motionName in V?b.value[e.fileName]=e.motionName:b.value[e.fileName]=P})});async function _(o,e){if(!Object.keys(e).length)return o;const a=await new H().loadAsync(o),c=Object.keys(a.files).find($=>$.endsWith("model3.json"));if(!c)throw new Error("model3.json not found");const J=await a.file(c).async("string"),R=JSON.parse(J),C={};Object.entries(e).forEach(([$,O])=>{if(C[O]){C[O].push({File:$});return}C[O]=[{File:$}]}),R.FileReferences.Motions=C,a.file(c,JSON.stringify(R,null,2));const T=await a.generateAsync({type:"blob"});return new File([T],o.name,{type:o.type,lastModified:o.lastModified})}async function w(){const o=await q.getItem("live2dModel");if(!o)return;const e=await _(o,b.value);v.value=e,y.value="file",x.value=!0}const k=Y(v);return(o,e)=>(s(),p("div",fe,[i(t(D),{title:"settings.live2d.change-model.title",icon:"i-solar:magic-stick-3-bold-duotone","inner-class":"text-sm"},{default:u(()=>[m("div",pe,[S(m("input",{"onUpdate:modelValue":e[0]||(e[0]=l=>d.value=l),disabled:t(n).loadingLive2dModel,class:"form-control flex-1",border:"neutral-300 dark:neutral-800 solid 1 focus:neutral-400 dark:focus:neutral-600",transition:"border duration-250 ease-in-out",placeholder:t(f)("settings.live2d.change-model.from-url-placeholder")},null,8,ve),[[te,d.value]]),i(h,{class:"form-control",onClick:e[1]||(e[1]=l=>M.value=d.value)},{default:u(()=>[g(N(t(f)("settings.live2d.change-model.from-url")),1)]),_:1})]),i(h,{class:"form-control place-self-end",onClick:e[2]||(e[2]=l=>t(r).open())},{default:u(()=>[g(N(t(f)("settings.live2d.change-model.from-file"))+"... ",1)]),_:1}),i(h,{class:"form-control",onClick:e[3]||(e[3]=l=>o.$emit("extractColorsFromModel"))},{default:u(()=>e[4]||(e[4]=[g(" Extract colors from model ")])),_:1}),i(ce,{colors:L.palette.map(l=>({hex:l,name:l}))},null,8,["colors"])]),_:1}),t(n).live2dLoadSource==="file"?(s(),A(t(D),{key:0,title:"settings.live2d.edit-motion-map.title",icon:"i-solar:face-scan-circle-bold-duotone"},{default:u(()=>{var l;return[(s(!0),p(U,null,z(t(n).availableLive2dMotions,a=>(s(),p("div",{key:a.fileName,flex:"","items-center":"","justify-between":"","text-sm":""},[m("span",be,N(a.fileName),1),m("div",_e,[S(m("select",{"onUpdate:modelValue":c=>t(n).live2dMotionMap[a.fileName]=c},[(s(!0),p(U,null,z(Object.keys(t(V)),c=>(s(),p("option",{key:c},N(c),1))),128))],8,ge),[[oe,t(n).live2dMotionMap[a.fileName]]]),i(h,{class:"form-control",onClick:c=>t(n).live2dCurrentMotion={group:a.motionName,index:a.motionIndex}},{default:u(()=>e[5]||(e[5]=[g(" Play ")])),_:2},1032,["onClick"])])]))),128)),i(h,{onClick:w},{default:u(()=>e[6]||(e[6]=[g(" Save and patch ")])),_:1}),m("a",{"mt-2":"",block:"",href:t(k),download:`${((l=t(n).live2dModelFile)==null?void 0:l.name)||"live2d"}-motion-edited.zip`},[i(h,{"w-full":""},{default:u(()=>e[7]||(e[7]=[g("Export")])),_:1})],8,he)]}),_:1})):ee("",!0)]))}}),ke=ne(ye,[["__scopeId","data-v-b2e16668"]]),xe={flex:""},Me={key:1,text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,y:15},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},we=E({__name:"index",setup(L){const f=F(),r=F(),{width:n,height:v}=ie(f),b=F([]);async function y(){if(!r.value)return;const d=await r.value.captureFrame();if(!d){console.error("No frame captured");return}const _=URL.createObjectURL(d);try{const k=await new de(_).getPalette();b.value=Object.values(k).map(o=>o==null?void 0:o.hex).filter(o=>typeof o=="string")}finally{URL.revokeObjectURL(_)}}const{iconAnimationStarted:x,showIconAnimation:j,animationIcon:M}=ue("i-solar:people-nearby-bold-duotone");return(d,_)=>{const w=Z,k=le("motion");return s(),p(U,null,[i(t(ae),{title:d.$t("settings.pages.models.title"),subtitle:d.$t("settings.title")},null,8,["title","subtitle"]),m("div",xe,[m("div",{ref_key:"live2dContainerRef",ref:f,w:"50%",h:"80vh"},[i(t(re),{ref_key:"live2dCanvasRef",ref:r,width:t(n),height:t(v)},{default:u(({app:o})=>[i(t(se),{app:o,"mouth-open-size":0,width:t(n),height:t(v),paused:!1},null,8,["app","width","height"])]),_:1},8,["width","height"])],512),i(ke,{w:"50%",h:"80vh",palette:b.value,onExtractColorsFromModel:y},null,8,["palette"])]),t(j)?(s(),A(w,{key:0,"z-index":-1,icon:t(M),"icon-size":12,duration:1e3,started:t(x),"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"])):S((s(),p("div",Me,_[0]||(_[0]=[m("div",{text:"60","i-solar:people-nearby-bold-duotone":""},null,-1)]))),[[k]])],64)}}});typeof I=="function"&&I(we);export{we as default}; +import{_ as Z}from"./IconAnimation.vue_vue_type_script_setup_true_lang-BRA-bMih.js";import{k as V,l as P,m as q,J as H}from"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import{d as E,v as B,c as p,o as s,u as t,m as W,q as G,bN as K,s as Q,g as F,w as X,bO as Y,b as i,x as A,C as ee,y as u,a as m,A as S,bE as te,bL as g,D as N,bx as U,by as z,bH as oe,bn as ne,k as ie,bw as le}from"./index-_NYoebRU.js";import{_ as ae}from"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js";import{_ as se,a as re}from"./Model.vue_vue_type_script_setup_true_lang-BJMG46Vq.js";import{V as de}from"./browser-CkchkNbv.js";import{_ as D,a as ce}from"./ColorPalette.vue_vue_type_script_setup_true_lang-DQF1MPun.js";import{u as ue}from"./useIconAnimation-Cb5gBMka.js";import{b as I}from"./route-block-B_A1xBdJ.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-Dx_TCyI1.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Cx39i7VD.js";import"./index-Bl8tS_1d.js";const me=["disabled"],h=E({__name:"Live2DModelControlButton",emits:["click"],setup(L){const f=B();return(r,n)=>(s(),p("button",{disabled:t(f).loadingLive2dModel,bg:"neutral-100 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",transition:"all ease-in-out duration-250",rounded:"",onClick:n[0]||(n[0]=v=>r.$emit("click"))},[W(r.$slots,"default")],8,me))}}),fe={flex:"~ col gap-4"},pe={flex:"","items-center":"","gap-2":""},ve=["disabled","placeholder"],be={"font-medium":""},_e={flex:"","gap-2":""},ge=["onUpdate:modelValue"],he=["href","download"],ye=E({__name:"Live2DSettings",props:{palette:null},emits:["extractColorsFromModel"],setup(L){const{t:f}=G(),r=K({accept:"application/zip"}),n=B(),{live2dModelFile:v,live2dMotionMap:b,live2dLoadSource:y,loadingLive2dModel:x,availableLive2dMotions:j,live2dModelUrl:M}=Q(n),d=F(M.value);r.onChange(o=>{o&&o.length>0&&(b.value={},v.value=o[0],y.value="file",x.value=!0)}),X(()=>n.loadingLive2dModel,o=>{o||y.value==="file"&&j.value.forEach(e=>{e.motionName in V?b.value[e.fileName]=e.motionName:b.value[e.fileName]=P})});async function _(o,e){if(!Object.keys(e).length)return o;const a=await new H().loadAsync(o),c=Object.keys(a.files).find($=>$.endsWith("model3.json"));if(!c)throw new Error("model3.json not found");const J=await a.file(c).async("string"),R=JSON.parse(J),C={};Object.entries(e).forEach(([$,O])=>{if(C[O]){C[O].push({File:$});return}C[O]=[{File:$}]}),R.FileReferences.Motions=C,a.file(c,JSON.stringify(R,null,2));const T=await a.generateAsync({type:"blob"});return new File([T],o.name,{type:o.type,lastModified:o.lastModified})}async function w(){const o=await q.getItem("live2dModel");if(!o)return;const e=await _(o,b.value);v.value=e,y.value="file",x.value=!0}const k=Y(v);return(o,e)=>(s(),p("div",fe,[i(t(D),{title:"settings.live2d.change-model.title",icon:"i-solar:magic-stick-3-bold-duotone","inner-class":"text-sm"},{default:u(()=>[m("div",pe,[S(m("input",{"onUpdate:modelValue":e[0]||(e[0]=l=>d.value=l),disabled:t(n).loadingLive2dModel,class:"form-control flex-1",border:"neutral-300 dark:neutral-800 solid 1 focus:neutral-400 dark:focus:neutral-600",transition:"border duration-250 ease-in-out",placeholder:t(f)("settings.live2d.change-model.from-url-placeholder")},null,8,ve),[[te,d.value]]),i(h,{class:"form-control",onClick:e[1]||(e[1]=l=>M.value=d.value)},{default:u(()=>[g(N(t(f)("settings.live2d.change-model.from-url")),1)]),_:1})]),i(h,{class:"form-control place-self-end",onClick:e[2]||(e[2]=l=>t(r).open())},{default:u(()=>[g(N(t(f)("settings.live2d.change-model.from-file"))+"... ",1)]),_:1}),i(h,{class:"form-control",onClick:e[3]||(e[3]=l=>o.$emit("extractColorsFromModel"))},{default:u(()=>e[4]||(e[4]=[g(" Extract colors from model ")])),_:1}),i(ce,{colors:L.palette.map(l=>({hex:l,name:l}))},null,8,["colors"])]),_:1}),t(n).live2dLoadSource==="file"?(s(),A(t(D),{key:0,title:"settings.live2d.edit-motion-map.title",icon:"i-solar:face-scan-circle-bold-duotone"},{default:u(()=>{var l;return[(s(!0),p(U,null,z(t(n).availableLive2dMotions,a=>(s(),p("div",{key:a.fileName,flex:"","items-center":"","justify-between":"","text-sm":""},[m("span",be,N(a.fileName),1),m("div",_e,[S(m("select",{"onUpdate:modelValue":c=>t(n).live2dMotionMap[a.fileName]=c},[(s(!0),p(U,null,z(Object.keys(t(V)),c=>(s(),p("option",{key:c},N(c),1))),128))],8,ge),[[oe,t(n).live2dMotionMap[a.fileName]]]),i(h,{class:"form-control",onClick:c=>t(n).live2dCurrentMotion={group:a.motionName,index:a.motionIndex}},{default:u(()=>e[5]||(e[5]=[g(" Play ")])),_:2},1032,["onClick"])])]))),128)),i(h,{onClick:w},{default:u(()=>e[6]||(e[6]=[g(" Save and patch ")])),_:1}),m("a",{"mt-2":"",block:"",href:t(k),download:`${((l=t(n).live2dModelFile)==null?void 0:l.name)||"live2d"}-motion-edited.zip`},[i(h,{"w-full":""},{default:u(()=>e[7]||(e[7]=[g("Export")])),_:1})],8,he)]}),_:1})):ee("",!0)]))}}),ke=ne(ye,[["__scopeId","data-v-b2e16668"]]),xe={flex:""},Me={key:1,text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,y:15},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},we=E({__name:"index",setup(L){const f=F(),r=F(),{width:n,height:v}=ie(f),b=F([]);async function y(){if(!r.value)return;const d=await r.value.captureFrame();if(!d){console.error("No frame captured");return}const _=URL.createObjectURL(d);try{const k=await new de(_).getPalette();b.value=Object.values(k).map(o=>o==null?void 0:o.hex).filter(o=>typeof o=="string")}finally{URL.revokeObjectURL(_)}}const{iconAnimationStarted:x,showIconAnimation:j,animationIcon:M}=ue("i-solar:people-nearby-bold-duotone");return(d,_)=>{const w=Z,k=le("motion");return s(),p(U,null,[i(t(ae),{title:d.$t("settings.pages.models.title"),subtitle:d.$t("settings.title")},null,8,["title","subtitle"]),m("div",xe,[m("div",{ref_key:"live2dContainerRef",ref:f,w:"50%",h:"80vh"},[i(t(re),{ref_key:"live2dCanvasRef",ref:r,width:t(n),height:t(v)},{default:u(({app:o})=>[i(t(se),{app:o,"mouth-open-size":0,width:t(n),height:t(v),paused:!1},null,8,["app","width","height"])]),_:1},8,["width","height"])],512),i(ke,{w:"50%",h:"80vh",palette:b.value,onExtractColorsFromModel:y},null,8,["palette"])]),t(j)?(s(),A(w,{key:0,"z-index":-1,icon:t(M),"icon-size":12,duration:1e3,started:t(x),"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"])):S((s(),p("div",Me,_[0]||(_[0]=[m("div",{text:"60","i-solar:people-nearby-bold-duotone":""},null,-1)]))),[[k]])],64)}}});typeof I=="function"&&I(we);export{we as default}; diff --git a/assets/index-DxNnZI6o.js b/assets/index-CLoML2wX.js similarity index 99% rename from assets/index-DxNnZI6o.js rename to assets/index-CLoML2wX.js index f607bb131bea72ac216e5821f2c892ef91942281..0a7dd6122d2b7bef28efec884b0ba87f764c2dcb 100644 --- a/assets/index-DxNnZI6o.js +++ b/assets/index-CLoML2wX.js @@ -1,4 +1,4 @@ -import{cn as getAugmentedNamespace}from"./index-D8Nm21zW.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{cn as getAugmentedNamespace}from"./index-_NYoebRU.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-CrclHGQ3.js b/assets/index-CrclHGQ3.js deleted file mode 100644 index 97511b4dd5c17ec8e459fd0348a2748456b605cc..0000000000000000000000000000000000000000 --- a/assets/index-CrclHGQ3.js +++ /dev/null @@ -1,532 +0,0 @@ -var fl=Object.defineProperty;var dl=(t,e,n)=>e in t?fl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var le=(t,e,n)=>dl(t,typeof e!="symbol"?e+"":e,n);import{V as pl,a as hl,c as ml,r as gl,b as qr,d as yl,E as $i,e as vl,f as xl,g as bl,h as wl,i as Tl}from"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import{f as nr,g as W,h as He,s as We,t as Al,d as ze,i as _l,j as kl,k as pi,w as Ue,l as wn,c as re,o as Q,m as _n,p as El,q as on,v as nn,x as rn,y as Ve,b as Ae,a as O,z as dt,A as Ct,B as hi,C as ut,D as me,u as V,M as Tt,T as Rt,E as mi,F as rr,G as Da,Z as Gn,H as Ht,I as Ml,V as ae,S as qi,Q as $n,O as Qt,J as De,P as Nt,K as Sl,L as Oa,N as Tn,U as gi,W as je,X as Fa,Y as Ba,_ as yi,$ as kn,a0 as Il,a1 as vi,a2 as Rl,a3 as za,a4 as _t,a5 as xi,a6 as Lt,a7 as Cl,a8 as Ua,a9 as Vt,aa as ja,ab as Nl,ac as Ll,ad as Pl,ae as Dl,af as Va,ag as ir,ah as Ol,ai as Fl,aj as Bl,ak as jt,al as zl,am as Ul,an as jl,ao as Vl,ap as fr,aq as qn,ar as Yr,as as zt,at as Ha,au as Kr,av as Wt,aw as Yi,ax as Ut,ay as Xt,az as dr,aA as Hl,aB as Gl,aC as $l,aD as ql,aE as Ga,aF as $a,aG as Yn,aH as qa,aI as bi,aJ as Kn,aK as Ya,aL as Yl,n as Wr,aM as Kl,aN as Xr,aO as Ka,aP as Wl,aQ as yn,aR as Wa,aS as gt,aT as kt,aU as An,aV as Xl,aW as Ql,aX as Zl,aY as Jl,aZ as eu,a_ as wi,a$ as tu,b0 as nu,b1 as ru,b2 as pr,b3 as iu,b4 as Xa,b5 as ou,b6 as au,b7 as su,b8 as lu,b9 as uu,ba as hr,bb as cu,bc as fu,bd as du,be as Ki,bf as Wi,bg as Xi,bh as Qi,bi as pu,bj as hu,bk as mu,bl as gu,bm as yu,bn as or,bo as vu,bp as Qa,bq as xu,br as bu,bs as wu,bt as Tu,bu as Za,bv as Wn,bw as Ja,bx as Ti,by as Ai,bz as Au,bA as mr,bB as _u,bC as ku}from"./index-D8Nm21zW.js";import{getImportUrlBundles as Eu}from"./import-url-browser-CPN8ipMD.js";import{s as Zt,c as Zi,u as Mu,g as Su}from"./speech-B27BwGQ-.js";import{u as gr}from"./queue-CEzllKo3.js";import{u as Iu,a as Ru,b as Cu,l as Nu}from"./queues-DJEZsGUG.js";import{l as Lu,u as _i}from"./providers-DUDq6kdm.js";import{s as Pu}from"./index-D975M2PQ.js";import{u as Du}from"./airi-card-DeGSbHPj.js";import{_ as Ou,a as Fu,r as dn}from"./Model.vue_vue_type_script_setup_true_lang-xbmtXrdQ.js";import{_ as ki}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-CL9MLblt.js";import{_ as Ji}from"./Collapsable.vue_vue_type_script_setup_true_lang-CYg3DjVq.js";import{H as Bu}from"./HeaderLink-yHEt2vbv.js";import{_ as es}from"./Basic.vue_vue_type_script_setup_true_lang-CrXWH1a1.js";import{u as ts}from"./consciousness-CgTB9b9w.js";import{d as eo}from"./index-DxNnZI6o.js";import{b as to}from"./route-block-B_A1xBdJ.js";import"./duckdb-mvp-CaaD-olE.js";import"./index-Be1NqeGb.js";async function*zu(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 Uu(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 ju(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 Vu(t,e="linear"){switch(e){case"linear":return Uu(t);case"minmax":return ju(t)}}const ns=nr("AudioContext",()=>({audioContext:new AudioContext,calculateVolume:Vu})),Hu=nr("SpeakingStore",()=>{const n=W(0),r=W(!1),i=He(()=>r.value?(30+70*n.value)/100:30);return{mouthOpenSize:n,nowSpeaking:r,nowSpeakingAvatarBorderOpacity:i}});function Nn(t,e,n){return e+n<0||e+n>=t.length-1?"":t[e+n]}function Gu(t){let e="literal",n="";return{async consume(r){var i,o,a;for(let s=0;s"?(l+=Nn(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 $u=nr("llm",()=>{async function t(n,r,i,o){const a=o==null?void 0:o.headers;return await Pu({...r.chat(n),messages:i,headers:a})}async function e(n,r){if(n==="")return[];try{return await Lu({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}}),Pt=nr("chat",()=>{const{stream:t}=$u(),{systemPrompt:e}=We(Du()),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 y(h){a.value.push(h)}function v(h){s.value.push(h)}function x(h){l.value.push(h)}function T(h){u.value.push(h)}function M(h){c.value.push(h)}const k=W([{role:"system",content:e.value}]),C=W({role:"assistant",content:""});async function P(h,I){var b;try{if(n.value=!0,!h)return;for(const D of r.value)await D(h);C.value={role:"assistant",content:""},k.value.push({role:"user",content:h}),k.value.push(C.value);const g=k.value.slice(0,k.value.length-1).map(D=>Al(D));for(const D of i.value)await D(h);for(const D of o.value)await D(h);const m=((b=I.providerConfig)==null?void 0:b.headers)||{},A=await t(I.model,I.chatProvider,g,{headers:m});for(const D of a.value)await D(h);let S="";const B=Gu({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 zu(A.textStream,async F=>F))S+=D,await B.consume(D);await B.end();for(const D of u.value)await D();for(const D of c.value)await D(S);console.debug("LLM output:",S)}catch(g){throw console.error("Error sending message:",g),g}finally{n.value=!1}}return{sending:n,messages:k,streamingMessage:C,send:P,onBeforeMessageComposed:f,onAfterMessageComposed:p,onBeforeSend:d,onAfterSend:y,onTokenLiteral:v,onTokenSpecial:x,onStreamEnd:T,onAssistantResponseEnd:M}}),rs=ze({__name:"Screen",setup(t){const e=W(),n=_l(El),{width:r,height:i}=kl(),o=pi(e,{immediate:!0,windowResize:!0,reset:!0}),a=He(()=>n.between("sm","md").value||n.smaller("sm").value),s=He(()=>n.between("md","lg").value),l=He(()=>n.greaterOrEqual("lg").value),u=He(()=>l.value?o.width.value:a.value||s.value?r.value-16:o.width.value),c=W(0);return Ue([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}),Ue([o.width,o.height],()=>{l.value||a.value||s.value?c.value=o.height.value:c.value=600}),wn(async()=>{e.value&&o.update()}),(f,p)=>(Q(),re("div",{ref_key:"containerRef",ref:e,"h-full":"","w-full":""},[_n(f.$slots,"default",{width:u.value,height:c.value})],512))}}),qu={absolute:"",bottom:"3",right:"3"},Yu={flex:"~ row","cursor-pointer":""},Ku=["checked","aria-checked"],Wu={key:0,"min-w":"50vw",z:"(Q(),rn(rs,{relative:""},{default:Ve(({width:a,height:s})=>[Ae(Fu,{width:a,height:s},{default:Ve(({app:l})=>[Ae(Ou,{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",qu,[O("div",Yu,[O("label",{class:dt([n.value?"bg-neutral-300 dark:bg-neutral-200":"bg-neutral-100 dark:bg-neutral-700"]),transition:"all ease-in-out duration-500",text:"lg neutral-500 dark:neutral-400","m-1":"","h-fit":"","w-fit":"","cursor-pointer":"","appearance-none":"","gap-1":"","rounded-lg":"","rounded-md":"","border-none":"","p-2":"","outline-none":""},[Ct(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,Ku),[[hi,n.value]]),o[8]||(o[8]=O("div",{"select-none":""},[O("div",{"i-solar:bug-bold-duotone":""})],-1))],2)]),Ae(ki,null,{default:Ve(()=>[n.value?(Q(),re("div",Wu,[O("div",Xu,[O("div",Qu,[O("span",null,me(V(e)("stage.viewers.debug-menu.emotions")),1)]),O("div",Zu,[O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[1]||(o[1]=l=>r.value={group:"Surprise",index:0})},me(V(e)("stage.viewers.debug-menu.emotions-btn.surprised")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[2]||(o[2]=l=>r.value={group:"Sad",index:0})},me(V(e)("stage.viewers.debug-menu.emotions-btn.sad")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[3]||(o[3]=l=>r.value={group:"Angry",index:0})},me(V(e)("stage.viewers.debug-menu.emotions-btn.angry")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[4]||(o[4]=l=>r.value={group:"Happy",index:0})},me(V(e)("stage.viewers.debug-menu.emotions-btn.happy")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[5]||(o[5]=l=>r.value={group:"Awkward",index:0})},me(V(e)("stage.viewers.debug-menu.emotions-btn.awkward")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[6]||(o[6]=l=>r.value={group:"Question",index:0})},me(V(e)("stage.viewers.debug-menu.emotions-btn.question")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[7]||(o[7]=l=>r.value={group:"Think",index:0})},me(V(e)("stage.viewers.debug-menu.emotions-btn.think")),1)])])])):ut("",!0)]),_:1})])]),_:1}))}});var ec=Object.defineProperty,tc=(t,e,n)=>e in t?ec(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,nc=(t,e,n)=>tc(t,e+"",n);function rc(t){return Ol()?(Fl(t),!0):!1}function is(t){return typeof t=="function"?t():V(t)}const ic=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const oc=Object.prototype.toString,ac=t=>oc.call(t)==="[object Object]",sc=()=>{},lc=ic?window:void 0;function uc(t){var e;const n=is(t);return(e=n==null?void 0:n.$el)!=null?e:n}function yr(...t){let e,n,r,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,r,i]=t,e=lc):[e,n,r,i]=t,!e)return sc;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=Ue(()=>[uc(e),is(i)],([c,f])=>{if(a(),!c)return;const p=ac(f)?{...f}:f;o.push(...n.flatMap(d=>r.map(y=>s(c,d,y,p))))},{immediate:!0,flush:"post"}),u=()=>{l(),a()};return rc(u),u}function os(t,e,n,r){const i=class extends kn{constructor(o={}){const a=Object.entries(t);super({uniforms:a.reduce((s,[l,u])=>{const c=vi.clone({[l]:{value:u}});return{...s,...c}},{}),vertexShader:e,fragmentShader:n}),nc(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=Vt.generateUUID(),i}os({color:new je("white"),scale:new De(1,1),imageBounds:new De(1,1),resolution:1024,map:null,zoom:1,radius:0,grayscale:0,opacity:1},` - varying vec2 vUv; - varying vec2 vPos; - void main() { - gl_Position = projectionMatrix * viewMatrix * modelMatrix * vec4(position, 1.); - vUv = uv; - vPos = position.xy; - } - `,` - // mostly from https://gist.github.com/statico/df64c5d167362ecf7b34fca0b1459a44 - varying vec2 vUv; - varying vec2 vPos; - uniform vec2 scale; - uniform vec2 imageBounds; - uniform float resolution; - uniform vec3 color; - uniform sampler2D map; - uniform float radius; - uniform float zoom; - uniform float grayscale; - uniform float opacity; - const vec3 luma = vec3(.299, 0.587, 0.114); - vec4 toGrayscale(vec4 color, float intensity) { - return vec4(mix(color.rgb, vec3(dot(color.rgb, luma)), intensity), color.a); - } - vec2 aspect(vec2 size) { - return size / min(size.x, size.y); - } - - const float PI = 3.14159265; - - // from https://iquilezles.org/articles/distfunctions - float udRoundBox( vec2 p, vec2 b, float r ) { - return length(max(abs(p)-b+r,0.0))-r; - } - - void main() { - vec2 s = aspect(scale); - vec2 i = aspect(imageBounds); - float rs = s.x / s.y; - float ri = i.x / i.y; - vec2 new = rs < ri ? vec2(i.x * s.y / i.y, s.y) : vec2(s.x, i.y * s.x / i.x); - vec2 offset = (rs < ri ? vec2((new.x - s.x) / 2.0, 0.0) : vec2(0.0, (new.y - s.y) / 2.0)) / new; - vec2 uv = vUv * s / new + offset; - vec2 zUv = (uv - vec2(0.5, 0.5)) / zoom + vec2(0.5, 0.5); - - vec2 res = vec2(scale * resolution); - vec2 halfRes = 0.5 * res; - float b = udRoundBox(vUv.xy * res - halfRes, halfRes, resolution * radius); - vec3 a = mix(vec3(1.0,0.0,0.0), vec3(0.0,0.0,0.0), smoothstep(0.0, 1.0, b)); - gl_FragColor = toGrayscale(texture2D(map, zUv) * vec4(color, opacity * a), grayscale); - - #include - #include - } - `);const Ei=parseInt(Bl.replace(/\D+/g,""));var cc=Object.defineProperty,fc=(t,e,n)=>e in t?cc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,dc=(t,e,n)=>(fc(t,e+"",n),n);async function no(t){const e=await t.arrayBuffer(),n=btoa(String.fromCharCode(...new Uint8Array(e)));return`data:${t.type||""};base64,${n}`}let Ln,vr,$t,Pn;function xr(t,e=1/0,n=null){vr||(vr=new ja(2,2,1,1)),$t||($t=new kn({uniforms:{blitTexture:new $l(t)},vertexShader:` - varying vec2 vUv; - void main(){ - vUv = uv; - gl_Position = vec4(position.xy * 1.0,0.,.999999); - } - `,fragmentShader:` - uniform sampler2D blitTexture; - varying vec2 vUv; - - void main(){ - gl_FragColor = vec4(vUv.xy, 0, 1); - - #ifdef IS_SRGB - gl_FragColor = LinearTosRGB( texture2D( blitTexture, vUv) ); - #else - gl_FragColor = texture2D( blitTexture, vUv); - #endif - } - `})),$t.uniforms.blitTexture.value=t,$t.defines.IS_SRGB="colorSpace"in t?t.colorSpace==="srgb":t.encoding===3001,$t.needsUpdate=!0,Pn||(Pn=new jt(vr,$t),Pn.frustrumCulled=!1);const r=new Nt,i=new Kr;i.add(Pn),n||(n=Ln=new ql({antialias:!1})),n.setSize(Math.min(t.image.width,e),Math.min(t.image.height,e)),n.clear(),n.render(i,r);const o=new qn(n.domElement);return o.minFilter=t.minFilter,o.magFilter=t.magFilter,o.wrapS=t.wrapS,o.wrapT=t.wrapT,o.name=t.name,Ln&&(Ln.dispose(),Ln=null),o}const ro={POSITION:["byte","byte normalized","unsigned byte","unsigned byte normalized","short","short normalized","unsigned short","unsigned short normalized"],NORMAL:["byte normalized","short normalized"],TANGENT:["byte normalized","short normalized"],TEXCOORD:["byte","byte normalized","unsigned byte","short","short normalized","unsigned short"]};class as{constructor(){this.pluginCallbacks=[],this.register(function(e){return new Tc(e)}),this.register(function(e){return new Ac(e)}),this.register(function(e){return new Ec(e)}),this.register(function(e){return new Mc(e)}),this.register(function(e){return new Sc(e)}),this.register(function(e){return new Ic(e)}),this.register(function(e){return new _c(e)}),this.register(function(e){return new kc(e)}),this.register(function(e){return new Rc(e)}),this.register(function(e){return new Cc(e)}),this.register(function(e){return new Nc(e)})}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,n,r,i){const o=new wc,a=[];for(let s=0,l=this.pluginCallbacks.length;st.times[t.times.length-1]){if(Math.abs(t.times[t.times.length-1]-e)<.001)return t.times.length-1;r[r.length-1]=e,r.set(t.times,0),i.set(t.values,0),i.set(o.evaluate(e),t.values.length),a=r.length-1}else for(let s=0;se){r.set(t.times.slice(0,s+1),0),r[s+1]=e,r.set(t.times.slice(s+1),s+2),i.set(t.values.slice(0,(s+1)*n),0),i.set(o.evaluate(e),(s+1)*n),i.set(t.values.slice((s+1)*n),(s+2)*n),a=s+1;break}}return t.times=r,t.values=i,a},mergeMorphTargetTracks:function(t,e){const n=[],r={},i=t.tracks;for(let o=0;o4?a=t.array[i*t.itemSize+o]:(o===0?a=t.getX(i):o===1?a=t.getY(i):o===2?a=t.getZ(i):o===3&&(a=t.getW(i)),t.normalized===!0&&(a=Vt.normalize(a,t.array))),r.min[o]=Math.min(r.min[o],a),r.max[o]=Math.max(r.max[o],a)}return r}function ss(t){return Math.ceil(t/4)*4}function wr(t,e=0){const n=ss(t.byteLength);if(n!==t.byteLength){const r=new Uint8Array(n);if(r.set(new Uint8Array(t)),e!==0)for(let i=t.byteLength;i"u"&&typeof OffscreenCanvas<"u"?new OffscreenCanvas(1,1):document.createElement("canvas")}function lo(t,e){if(t.toBlob!==void 0)return new Promise(r=>t.toBlob(r,e));let n;return e==="image/jpeg"?n=.92:e==="image/webp"&&(n=.8),t.convertToBlob({type:e,quality:n})}class wc{constructor(){this.plugins=[],this.options={},this.pending=[],this.buffers=[],this.byteOffset=0,this.buffers=[],this.nodeMap=new Map,this.skins=[],this.extensionsUsed={},this.extensionsRequired={},this.uids=new Map,this.uid=0,this.json={asset:{version:"2.0",generator:"THREE.GLTFExporter"}},this.cache={meshes:new Map,attributes:new Map,attributesNormalized:new Map,materials:new Map,textures:new Map,images:new Map}}setPlugins(e){this.plugins=e}async write(e,n,r={}){this.options=Object.assign({binary:!1,trs:!1,onlyVisible:!0,maxTextureSize:1/0,animations:[],includeCustomExtensions:!1},r),this.options.animations.length>0&&(this.options.trs=!0),this.processInput(e),await Promise.all(this.pending);const i=this,o=i.buffers,a=i.json;r=i.options;const s=i.extensionsUsed,l=i.extensionsRequired,u=new Blob(o,{type:"application/octet-stream"}),c=Object.keys(s),f=Object.keys(l);c.length>0&&(a.extensionsUsed=c),f.length>0&&(a.extensionsRequired=f),a.buffers&&a.buffers.length>0&&(a.buffers[0].byteLength=u.size),r.binary===!0?u.arrayBuffer().then(p=>{const d=wr(p),y=new DataView(new ArrayBuffer(ao));y.setUint32(0,d.byteLength,!0),y.setUint32(4,yc,!0);const v=wr(vc(JSON.stringify(a)),32),x=new DataView(new ArrayBuffer(ao));x.setUint32(0,v.byteLength,!0),x.setUint32(4,gc,!0);const T=new ArrayBuffer(oo),M=new DataView(T);M.setUint32(0,hc,!0),M.setUint32(4,mc,!0);const k=oo+x.byteLength+v.byteLength+y.byteLength+d.byteLength;M.setUint32(8,k,!0),new Blob([T,x,v,y,d],{type:"application/octet-stream"}).arrayBuffer().then(n)}):a.buffers&&a.buffers.length>0?no(u).then(p=>{a.buffers[0].uri=p,n(a)}):n(a)}serializeUserData(e,n){if(Object.keys(e.userData).length===0)return;const r=this.options,i=this.extensionsUsed;try{const o=JSON.parse(JSON.stringify(e.userData));if(r.includeCustomExtensions&&o.gltfExtensions){n.extensions===void 0&&(n.extensions={});for(const a in o.gltfExtensions)n.extensions[a]=o.gltfExtensions[a],i[a]=!0;delete o.gltfExtensions}Object.keys(o).length>0&&(n.extras=o)}catch(o){console.warn("THREE.GLTFExporter: userData of '"+e.name+"' won't be serialized because of JSON.stringify error - "+o.message)}}getUID(e,n=!1){if(this.uids.has(e)===!1){const r=new Map;r.set(!0,this.uid++),r.set(!1,this.uid++),this.uids.set(e,r)}return this.uids.get(e).get(n)}isNormalizedNormalAttribute(e){if(this.cache.attributesNormalized.has(e))return!1;const n=new ae;for(let r=0,i=e.count;r5e-4)return!1;return!0}createNormalizedNormalAttribute(e){const n=this.cache;if(n.attributesNormalized.has(e))return n.attributesNormalized.get(e);const r=e.clone(),i=new ae;for(let o=0,a=r.count;o4?y=e.array[p*e.itemSize+d]:(d===0?y=e.getX(p):d===1?y=e.getY(p):d===2?y=e.getZ(p):d===3&&(y=e.getW(p)),e.normalized===!0&&(y=Vt.normalize(y,e.array))),n===he.FLOAT?u.setFloat32(c,y,!0):n===he.INT?u.setInt32(c,y,!0):n===he.UNSIGNED_INT?u.setUint32(c,y,!0):n===he.SHORT?u.setInt16(c,y,!0):n===he.UNSIGNED_SHORT?u.setUint16(c,y,!0):n===he.BYTE?u.setInt8(c,y):n===he.UNSIGNED_BYTE&&u.setUint8(c,y),c+=s}const f={buffer:this.processBuffer(u.buffer),byteOffset:this.byteOffset,byteLength:l};return o!==void 0&&(f.target=o),o===he.ARRAY_BUFFER&&(f.byteStride=e.itemSize*s),this.byteOffset+=l,a.bufferViews.push(f),{id:a.bufferViews.length-1,byteLength:0}}processBufferViewImage(e){const n=this,r=n.json;return r.bufferViews||(r.bufferViews=[]),e.arrayBuffer().then(i=>{const o=wr(i),a={buffer:n.processBuffer(o),byteOffset:n.byteOffset,byteLength:o.byteLength};return n.byteOffset+=o.byteLength,r.bufferViews.push(a)-1})}processAccessor(e,n,r,i){const o=this.json,a={1:"SCALAR",2:"VEC2",3:"VEC3",4:"VEC4",9:"MAT3",16:"MAT4"};let s;if(e.array.constructor===Float32Array)s=he.FLOAT;else if(e.array.constructor===Int32Array)s=he.INT;else if(e.array.constructor===Uint32Array)s=he.UNSIGNED_INT;else if(e.array.constructor===Int16Array)s=he.SHORT;else if(e.array.constructor===Uint16Array)s=he.UNSIGNED_SHORT;else if(e.array.constructor===Int8Array)s=he.BYTE;else if(e.array.constructor===Uint8Array)s=he.UNSIGNED_BYTE;else throw new Error("THREE.GLTFExporter: Unsupported bufferAttribute component type: "+e.array.constructor.name);if(r===void 0&&(r=0),i===void 0&&(i=e.count),i===0)return null;const l=bc(e,r,i);let u;n!==void 0&&(u=e===n.index?he.ELEMENT_ARRAY_BUFFER:he.ARRAY_BUFFER);const c=this.processBufferView(e,s,r,i,u),f={bufferView:c.id,byteOffset:c.byteOffset,componentType:s,count:i,max:l.max,min:l.min,type:a[e.itemSize]};return e.normalized===!0&&(f.normalized=!0),o.accessors||(o.accessors=[]),o.accessors.push(f)-1}processImage(e,n,r,i="image/png"){if(e!==null){const o=this,a=o.cache,s=o.json,l=o.options,u=o.pending;a.images.has(e)||a.images.set(e,{});const c=a.images.get(e),f=i+":flipY/"+r.toString();if(c[f]!==void 0)return c[f];s.images||(s.images=[]);const p={mimeType:i},d=so();d.width=Math.min(e.width,l.maxTextureSize),d.height=Math.min(e.height,l.maxTextureSize);const y=d.getContext("2d");if(r===!0&&(y.translate(0,d.height),y.scale(1,-1)),e.data!==void 0){n!==Yr&&console.error("GLTFExporter: Only RGBAFormat is supported.",n),(e.width>l.maxTextureSize||e.height>l.maxTextureSize)&&console.warn("GLTFExporter: Image size is bigger than maxTextureSize",e);const x=new Uint8ClampedArray(e.height*e.width*4);for(let T=0;To.processBufferViewImage(x)).then(x=>{p.bufferView=x})):d.toDataURL!==void 0?p.uri=d.toDataURL(i):u.push(lo(d,i).then(no).then(x=>{p.uri=x}));const v=s.images.push(p)-1;return c[f]=v,v}else throw new Error("THREE.GLTFExporter: No valid image data found. Unable to process texture.")}processSampler(e){const n=this.json;n.samplers||(n.samplers=[]);const r={magFilter:nt[e.magFilter],minFilter:nt[e.minFilter],wrapS:nt[e.wrapS],wrapT:nt[e.wrapT]};return n.samplers.push(r)-1}processTexture(e){const n=this.options,r=this.cache,i=this.json;if(r.textures.has(e))return r.textures.get(e);i.textures||(i.textures=[]),e instanceof fr&&(e=xr(e,n.maxTextureSize));let o=e.userData.mimeType;o==="image/webp"&&(o="image/png");const a={sampler:this.processSampler(e),source:this.processImage(e.image,e.format,e.flipY,o)};e.name&&(a.name=e.name),this._invokeAll(function(l){l.writeTexture&&l.writeTexture(e,a)});const s=i.textures.push(a)-1;return r.textures.set(e,s),s}processMaterial(e){const n=this.cache,r=this.json;if(n.materials.has(e))return n.materials.get(e);if(e.isShaderMaterial)return console.warn("GLTFExporter: THREE.ShaderMaterial not supported."),null;r.materials||(r.materials=[]);const i={pbrMetallicRoughness:{}};e.isMeshStandardMaterial!==!0&&e.isMeshBasicMaterial!==!0&&console.warn("GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.");const o=e.color.toArray().concat([e.opacity]);if(gn(o,[1,1,1,1])||(i.pbrMetallicRoughness.baseColorFactor=o),e.isMeshStandardMaterial?(i.pbrMetallicRoughness.metallicFactor=e.metalness,i.pbrMetallicRoughness.roughnessFactor=e.roughness):(i.pbrMetallicRoughness.metallicFactor=.5,i.pbrMetallicRoughness.roughnessFactor=.5),e.metalnessMap||e.roughnessMap){const s=this.buildMetalRoughTexture(e.metalnessMap,e.roughnessMap),l={index:this.processTexture(s),channel:s.channel};this.applyTextureTransform(l,s),i.pbrMetallicRoughness.metallicRoughnessTexture=l}if(e.map){const s={index:this.processTexture(e.map),texCoord:e.map.channel};this.applyTextureTransform(s,e.map),i.pbrMetallicRoughness.baseColorTexture=s}if(e.emissive){const s=e.emissive;if(Math.max(s.r,s.g,s.b)>0&&(i.emissiveFactor=e.emissive.toArray()),e.emissiveMap){const l={index:this.processTexture(e.emissiveMap),texCoord:e.emissiveMap.channel};this.applyTextureTransform(l,e.emissiveMap),i.emissiveTexture=l}}if(e.normalMap){const s={index:this.processTexture(e.normalMap),texCoord:e.normalMap.channel};e.normalScale&&e.normalScale.x!==1&&(s.scale=e.normalScale.x),this.applyTextureTransform(s,e.normalMap),i.normalTexture=s}if(e.aoMap){const s={index:this.processTexture(e.aoMap),texCoord:e.aoMap.channel};e.aoMapIntensity!==1&&(s.strength=e.aoMapIntensity),this.applyTextureTransform(s,e.aoMap),i.occlusionTexture=s}e.transparent?i.alphaMode="BLEND":e.alphaTest>0&&(i.alphaMode="MASK",i.alphaCutoff=e.alphaTest),e.side===ir&&(i.doubleSided=!0),e.name!==""&&(i.name=e.name),this.serializeUserData(e,i),this._invokeAll(function(s){s.writeMaterial&&s.writeMaterial(e,i)});const a=r.materials.push(i)-1;return n.materials.set(e,a),a}processMesh(e){const n=this.cache,r=this.json,i=[e.geometry.uuid];if(Array.isArray(e.material))for(let k=0,C=e.material.length;k=152?{uv:"TEXCOORD_0",uv1:"TEXCOORD_1",uv2:"TEXCOORD_2",uv3:"TEXCOORD_3"}:{uv:"TEXCOORD_0",uv2:"TEXCOORD_1"},color:"COLOR_0",skinWeight:"WEIGHTS_0",skinIndex:"JOINTS_0"},d=a.getAttribute("normal");d!==void 0&&!this.isNormalizedNormalAttribute(d)&&(console.warn("THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one."),a.setAttribute("normal",this.createNormalizedNormalAttribute(d)));let y=null;for(let k in a.attributes){if(k.slice(0,5)==="morph")continue;const C=a.attributes[k];if(k=p[k]||k.toUpperCase(),/^(POSITION|NORMAL|TANGENT|TEXCOORD_\d+|COLOR_\d+|JOINTS_\d+|WEIGHTS_\d+)$/.test(k)||(k="_"+k),n.attributes.has(this.getUID(C))){u[k]=n.attributes.get(this.getUID(C));continue}y=null;const P=C.array;k==="JOINTS_0"&&!(P instanceof Uint16Array)&&!(P instanceof Uint8Array)&&(console.warn('GLTFExporter: Attribute "skinIndex" converted to type UNSIGNED_SHORT.'),y=new zt(new Uint16Array(P),C.itemSize,C.normalized));const h=this.processAccessor(y||C,a);h!==null&&(k.startsWith("_")||this.detectMeshQuantization(k,C),u[k]=h,n.attributes.set(this.getUID(C),h))}if(d!==void 0&&a.setAttribute("normal",d),Object.keys(u).length===0)return null;if(e.morphTargetInfluences!==void 0&&e.morphTargetInfluences.length>0){const k=[],C=[],P={};if(e.morphTargetDictionary!==void 0)for(const h in e.morphTargetDictionary)P[e.morphTargetDictionary[h]]=h;for(let h=0;h0&&(l.extras={},l.extras.targetNames=C)}const v=Array.isArray(e.material);if(v&&a.groups.length===0)return null;const x=v?e.material:[e.material],T=v?a.groups:[{materialIndex:0,start:void 0,count:void 0}];for(let k=0,C=T.length;k0&&(P.targets=f),a.index!==null){let I=this.getUID(a.index);(T[k].start!==void 0||T[k].count!==void 0)&&(I+=":"+T[k].start+":"+T[k].count),n.attributes.has(I)?P.indices=n.attributes.get(I):(P.indices=this.processAccessor(a.index,a,T[k].start,T[k].count),n.attributes.set(I,P.indices)),P.indices===null&&delete P.indices}const h=this.processMaterial(x[T[k].materialIndex]);h!==null&&(P.material=h),c.push(P)}l.primitives=c,r.meshes||(r.meshes=[]),this._invokeAll(function(k){k.writeMesh&&k.writeMesh(e,l)});const M=r.meshes.push(l)-1;return n.meshes.set(o,M),M}detectMeshQuantization(e,n){if(this.extensionsUsed[br])return;let r;switch(n.array.constructor){case Int8Array:r="byte";break;case Uint8Array:r="unsigned byte";break;case Int16Array:r="short";break;case Uint16Array:r="unsigned short";break;default:return}n.normalized&&(r+=" normalized");const i=e.split("_",1)[0];ro[i]&&ro[i].includes(r)&&(this.extensionsUsed[br]=!0,this.extensionsRequired[br]=!0)}processCamera(e){const n=this.json;n.cameras||(n.cameras=[]);const r=e.isOrthographicCamera,i={type:r?"orthographic":"perspective"};return r?i.orthographic={xmag:e.right*2,ymag:e.top*2,zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near}:i.perspective={aspectRatio:e.aspect,yfov:Vt.degToRad(e.fov),zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near},e.name!==""&&(i.name=e.type),n.cameras.push(i)-1}processAnimation(e,n){const r=this.json,i=this.nodeMap;r.animations||(r.animations=[]),e=as.Utils.mergeMorphTargetTracks(e.clone(),n);const o=e.tracks,a=[],s=[];for(let l=0;l0){const s=[];for(let l=0,u=e.children.length;l0&&(o.children=s)}this._invokeAll(function(s){s.writeNode&&s.writeNode(e,o)});const a=n.nodes.push(o)-1;return i.set(e,a),a}processScene(e){const n=this.json,r=this.options;n.scenes||(n.scenes=[],n.scene=0);const i={};e.name!==""&&(i.name=e.name),n.scenes.push(i);const o=[];for(let a=0,s=e.children.length;a0&&(i.nodes=o),this.serializeUserData(e,i)}processObjects(e){const n=new Kr;n.name="AuxScene";for(let r=0;r0&&this.processObjects(r);for(let i=0;i0&&(a.range=e.distance)):e.isSpotLight&&(a.type="spot",e.distance>0&&(a.range=e.distance),a.spot={},a.spot.innerConeAngle=(e.penumbra-1)*e.angle*-1,a.spot.outerConeAngle=e.angle),e.decay!==void 0&&e.decay!==2&&console.warn("THREE.GLTFExporter: Light decay may be lost. glTF is physically-based, and expects light.decay=2."),e.target&&(e.target.parent!==e||e.target.position.x!==0||e.target.position.y!==0||e.target.position.z!==-1)&&console.warn("THREE.GLTFExporter: Light direction may be lost. For best results, make light.target a child of the light with position 0,0,-1."),o[this.name]||(i.extensions=i.extensions||{},i.extensions[this.name]={lights:[]},o[this.name]=!0);const s=i.extensions[this.name].lights;s.push(a),n.extensions=n.extensions||{},n.extensions[this.name]={light:s.length-1}}}let Ac=class{constructor(t){this.writer=t,this.name="KHR_materials_unlit"}writeMaterial(t,e){if(!t.isMeshBasicMaterial)return;const n=this.writer.extensionsUsed;e.extensions=e.extensions||{},e.extensions[this.name]={},n[this.name]=!0,e.pbrMetallicRoughness.metallicFactor=0,e.pbrMetallicRoughness.roughnessFactor=.9}},_c=class{constructor(t){this.writer=t,this.name="KHR_materials_clearcoat"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.clearcoat===0)return;const n=this.writer,r=n.extensionsUsed,i={};if(i.clearcoatFactor=t.clearcoat,t.clearcoatMap){const o={index:n.processTexture(t.clearcoatMap),texCoord:t.clearcoatMap.channel};n.applyTextureTransform(o,t.clearcoatMap),i.clearcoatTexture=o}if(i.clearcoatRoughnessFactor=t.clearcoatRoughness,t.clearcoatRoughnessMap){const o={index:n.processTexture(t.clearcoatRoughnessMap),texCoord:t.clearcoatRoughnessMap.channel};n.applyTextureTransform(o,t.clearcoatRoughnessMap),i.clearcoatRoughnessTexture=o}if(t.clearcoatNormalMap){const o={index:n.processTexture(t.clearcoatNormalMap),texCoord:t.clearcoatNormalMap.channel};n.applyTextureTransform(o,t.clearcoatNormalMap),i.clearcoatNormalTexture=o}e.extensions=e.extensions||{},e.extensions[this.name]=i,r[this.name]=!0}},kc=class{constructor(t){this.writer=t,this.name="KHR_materials_iridescence"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.iridescence===0)return;const n=this.writer,r=n.extensionsUsed,i={};if(i.iridescenceFactor=t.iridescence,t.iridescenceMap){const o={index:n.processTexture(t.iridescenceMap),texCoord:t.iridescenceMap.channel};n.applyTextureTransform(o,t.iridescenceMap),i.iridescenceTexture=o}if(i.iridescenceIor=t.iridescenceIOR,i.iridescenceThicknessMinimum=t.iridescenceThicknessRange[0],i.iridescenceThicknessMaximum=t.iridescenceThicknessRange[1],t.iridescenceThicknessMap){const o={index:n.processTexture(t.iridescenceThicknessMap),texCoord:t.iridescenceThicknessMap.channel};n.applyTextureTransform(o,t.iridescenceThicknessMap),i.iridescenceThicknessTexture=o}e.extensions=e.extensions||{},e.extensions[this.name]=i,r[this.name]=!0}},Ec=class{constructor(t){this.writer=t,this.name="KHR_materials_transmission"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.transmission===0)return;const n=this.writer,r=n.extensionsUsed,i={};if(i.transmissionFactor=t.transmission,t.transmissionMap){const o={index:n.processTexture(t.transmissionMap),texCoord:t.transmissionMap.channel};n.applyTextureTransform(o,t.transmissionMap),i.transmissionTexture=o}e.extensions=e.extensions||{},e.extensions[this.name]=i,r[this.name]=!0}},Mc=class{constructor(t){this.writer=t,this.name="KHR_materials_volume"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.transmission===0)return;const n=this.writer,r=n.extensionsUsed,i={};if(i.thicknessFactor=t.thickness,t.thicknessMap){const o={index:n.processTexture(t.thicknessMap),texCoord:t.thicknessMap.channel};n.applyTextureTransform(o,t.thicknessMap),i.thicknessTexture=o}i.attenuationDistance=t.attenuationDistance,i.attenuationColor=t.attenuationColor.toArray(),e.extensions=e.extensions||{},e.extensions[this.name]=i,r[this.name]=!0}},Sc=class{constructor(t){this.writer=t,this.name="KHR_materials_ior"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.ior===1.5)return;const n=this.writer.extensionsUsed,r={};r.ior=t.ior,e.extensions=e.extensions||{},e.extensions[this.name]=r,n[this.name]=!0}},Ic=class{constructor(t){this.writer=t,this.name="KHR_materials_specular"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.specularIntensity===1&&t.specularColor.equals(pc)&&!t.specularIntensityMap&&!t.specularColorTexture)return;const n=this.writer,r=n.extensionsUsed,i={};if(t.specularIntensityMap){const o={index:n.processTexture(t.specularIntensityMap),texCoord:t.specularIntensityMap.channel};n.applyTextureTransform(o,t.specularIntensityMap),i.specularTexture=o}if(t.specularColorMap){const o={index:n.processTexture(t.specularColorMap),texCoord:t.specularColorMap.channel};n.applyTextureTransform(o,t.specularColorMap),i.specularColorTexture=o}i.specularFactor=t.specularIntensity,i.specularColorFactor=t.specularColor.toArray(),e.extensions=e.extensions||{},e.extensions[this.name]=i,r[this.name]=!0}},Rc=class{constructor(t){this.writer=t,this.name="KHR_materials_sheen"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.sheen==0)return;const n=this.writer,r=n.extensionsUsed,i={};if(t.sheenRoughnessMap){const o={index:n.processTexture(t.sheenRoughnessMap),texCoord:t.sheenRoughnessMap.channel};n.applyTextureTransform(o,t.sheenRoughnessMap),i.sheenRoughnessTexture=o}if(t.sheenColorMap){const o={index:n.processTexture(t.sheenColorMap),texCoord:t.sheenColorMap.channel};n.applyTextureTransform(o,t.sheenColorMap),i.sheenColorTexture=o}i.sheenRoughnessFactor=t.sheenRoughness,i.sheenColorFactor=t.sheenColor.toArray(),e.extensions=e.extensions||{},e.extensions[this.name]=i,r[this.name]=!0}},Cc=class{constructor(t){this.writer=t,this.name="KHR_materials_anisotropy"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.anisotropy==0)return;const n=this.writer,r=n.extensionsUsed,i={};if(t.anisotropyMap){const o={index:n.processTexture(t.anisotropyMap)};n.applyTextureTransform(o,t.anisotropyMap),i.anisotropyTexture=o}i.anisotropyStrength=t.anisotropy,i.anisotropyRotation=t.anisotropyRotation,e.extensions=e.extensions||{},e.extensions[this.name]=i,r[this.name]=!0}},Nc=class{constructor(t){this.writer=t,this.name="KHR_materials_emissive_strength"}writeMaterial(t,e){if(!t.isMeshStandardMaterial||t.emissiveIntensity===1)return;const n=this.writer.extensionsUsed,r={};r.emissiveStrength=t.emissiveIntensity,e.extensions=e.extensions||{},e.extensions[this.name]=r,n[this.name]=!0}};var En=Uint8Array,ls=Uint16Array,Lc=Uint32Array,Pc=new En([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Dc=new En([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),us=function(t,e){for(var n=new ls(31),r=0;r<31;++r)n[r]=e+=1<>>1|(Le&21845)<<1;Mt=(Mt&52428)>>>2|(Mt&13107)<<2,Mt=(Mt&61680)>>>4|(Mt&3855)<<4,Bc[Le]=((Mt&65280)>>>8|(Mt&255)<<8)>>>1}var ar=new En(288);for(var Le=0;Le<144;++Le)ar[Le]=8;for(var Le=144;Le<256;++Le)ar[Le]=9;for(var Le=256;Le<280;++Le)ar[Le]=7;for(var Le=280;Le<288;++Le)ar[Le]=8;var zc=new En(32);for(var Le=0;Le<32;++Le)zc[Le]=5;var Uc=new En(0),jc=typeof TextDecoder<"u"&&new TextDecoder,Vc=0;try{jc.decode(Uc,{stream:!0}),Vc=1}catch{}var Hc=Object.defineProperty,Gc=(t,e,n)=>e in t?Hc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$c=(t,e,n)=>(Gc(t,e+"",n),n);const fs=class extends jt{constructor(t,e={}){super(t),this.isReflector=!0,this.type="Reflector",this.camera=new Nt;const n=this,r=e.color!==void 0?new je(e.color):new je(8355711),i=e.textureWidth||512,o=e.textureHeight||512,a=e.clipBias||0,s=e.shader||fs.ReflectorShader,l=e.multisample!==void 0?e.multisample:4,u=new Oa,c=new ae,f=new ae,p=new ae,d=new _t,y=new ae(0,0,-1),v=new Lt,x=new ae,T=new ae,M=new Lt,k=new _t,C=this.camera,P=new Ul(i,o,{samples:l,type:jl}),h=new kn({uniforms:vi.clone(s.uniforms),fragmentShader:s.fragmentShader,vertexShader:s.vertexShader});h.uniforms.tDiffuse.value=P.texture,h.uniforms.color.value=r,h.uniforms.textureMatrix.value=k,this.material=h,this.onBeforeRender=function(I,b,g){if(f.setFromMatrixPosition(n.matrixWorld),p.setFromMatrixPosition(g.matrixWorld),d.extractRotation(n.matrixWorld),c.set(0,0,1),c.applyMatrix4(d),x.subVectors(f,p),x.dot(c)>0)return;x.reflect(c).negate(),x.add(f),d.extractRotation(g.matrixWorld),y.set(0,0,-1),y.applyMatrix4(d),y.add(p),T.subVectors(f,y),T.reflect(c).negate(),T.add(f),C.position.copy(x),C.up.set(0,1,0),C.up.applyMatrix4(d),C.up.reflect(c),C.lookAt(T),C.far=g.far,C.updateMatrixWorld(),C.projectionMatrix.copy(g.projectionMatrix),k.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),k.multiply(C.projectionMatrix),k.multiply(C.matrixWorldInverse),k.multiply(n.matrixWorld),u.setFromNormalAndCoplanarPoint(c,f),u.applyMatrix4(C.matrixWorldInverse),v.set(u.normal.x,u.normal.y,u.normal.z,u.constant);const m=C.projectionMatrix;M.x=(Math.sign(v.x)+m.elements[8])/m.elements[0],M.y=(Math.sign(v.y)+m.elements[9])/m.elements[5],M.z=-1,M.w=(1+m.elements[10])/m.elements[14],v.multiplyScalar(2/v.dot(M)),m.elements[2]=v.x,m.elements[6]=v.y,m.elements[10]=v.z+1-a,m.elements[14]=v.w,n.visible=!1;const A=I.getRenderTarget(),S=I.xr.enabled,B=I.shadowMap.autoUpdate,D=I.toneMapping;let F=!1;"outputColorSpace"in I?F=I.outputColorSpace==="srgb":F=I.outputEncoding===3001,I.xr.enabled=!1,I.shadowMap.autoUpdate=!1,"outputColorSpace"in I?I.outputColorSpace="srgb-linear":I.outputEncoding=3e3,I.toneMapping=Vl,I.setRenderTarget(P),I.state.buffers.depth.setMask(!0),I.autoClear===!1&&I.clear(),I.render(b,C),I.xr.enabled=S,I.shadowMap.autoUpdate=B,I.toneMapping=D,"outputColorSpace"in I?I.outputColorSpace=F?"srgb":"srgb-linear":I.outputEncoding=F?3001:3e3,I.setRenderTarget(A);const j=g.viewport;j!==void 0&&I.state.viewport(j),n.visible=!0},this.getRenderTarget=function(){return P},this.dispose=function(){P.dispose(),n.material.dispose()}}};let Qr=fs;$c(Qr,"ReflectorShader",{uniforms:{color:{value:null},tDiffuse:{value:null},textureMatrix:{value:null}},vertexShader:` - uniform mat4 textureMatrix; - varying vec4 vUv; - - #include - #include - - void main() { - - vUv = textureMatrix * vec4( position, 1.0 ); - - gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); - - #include - - }`,fragmentShader:` - uniform vec3 color; - uniform sampler2D tDiffuse; - varying vec4 vUv; - - #include - - float blendOverlay( float base, float blend ) { - - return( base < 0.5 ? ( 2.0 * base * blend ) : ( 1.0 - 2.0 * ( 1.0 - base ) * ( 1.0 - blend ) ) ); - - } - - vec3 blendOverlay( vec3 base, vec3 blend ) { - - return vec3( blendOverlay( base.r, blend.r ), blendOverlay( base.g, blend.g ), blendOverlay( base.b, blend.b ) ); - - } - - void main() { - - #include - - vec4 base = texture2DProj( tDiffuse, vUv ); - gl_FragColor = vec4( blendOverlay( base.rgb, color ), 1.0 ); - - #include - #include <${Ei>=154?"colorspace_fragment":"encodings_fragment"}> - - }`});var qc=Object.defineProperty,Yc=(t,e,n)=>e in t?qc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ds=(t,e,n)=>(Yc(t,typeof e!="symbol"?e+"":e,n),n);const sr=new Fa,Kc=new Float32Array([-1,-1,0,0,0,1,-1,0,1,0,1,1,0,1,1,-1,1,0,0,1]),ps=new Ba(Kc,5);sr.setIndex([0,1,2,0,2,3]);sr.setAttribute("position",new yi(ps,3,0,!1));sr.setAttribute("uv",new yi(ps,2,3,!1));const Zr=class extends jt{constructor(){super(Zr.Geometry,new Wt({opacity:0,transparent:!0})),this.isLensflare=!0,this.type="Lensflare",this.frustumCulled=!1,this.renderOrder=1/0;const t=new ae,e=new ae,n=new Yi(new Uint8Array(16*16*3),16,16,Yr);n.minFilter=Ut,n.magFilter=Ut,n.wrapS=Xt,n.wrapT=Xt;const r=new Yi(new Uint8Array(16*16*3),16,16,Yr);r.minFilter=Ut,r.magFilter=Ut,r.wrapS=Xt,r.wrapT=Xt;const i=Zr.Geometry,o=new dr({uniforms:{scale:{value:null},screenPosition:{value:null}},vertexShader:` - - precision highp float; - - uniform vec3 screenPosition; - uniform vec2 scale; - - attribute vec3 position; - - void main() { - - gl_Position = vec4( position.xy * scale + screenPosition.xy, screenPosition.z, 1.0 ); - - }`,fragmentShader:` - - precision highp float; - - void main() { - - gl_FragColor = vec4( 1.0, 0.0, 1.0, 1.0 ); - - }`,depthTest:!0,depthWrite:!1,transparent:!1}),a=new dr({uniforms:{map:{value:n},scale:{value:null},screenPosition:{value:null}},vertexShader:` - - precision highp float; - - uniform vec3 screenPosition; - uniform vec2 scale; - - attribute vec3 position; - attribute vec2 uv; - - varying vec2 vUV; - - void main() { - - vUV = uv; - - gl_Position = vec4( position.xy * scale + screenPosition.xy, screenPosition.z, 1.0 ); - - }`,fragmentShader:` - - precision highp float; - - uniform sampler2D map; - - varying vec2 vUV; - - void main() { - - gl_FragColor = texture2D( map, vUV ); - - }`,depthTest:!1,depthWrite:!1,transparent:!1}),s=new jt(i,o),l=[],u=hs.Shader,c=new dr({uniforms:{map:{value:null},occlusionMap:{value:r},color:{value:new je(16777215)},scale:{value:new De},screenPosition:{value:new ae}},vertexShader:u.vertexShader,fragmentShader:u.fragmentShader,blending:Hl,transparent:!0,depthWrite:!1}),f=new jt(i,c);this.addElement=function(x){l.push(x)};const p=new De,d=new De,y=new Gl,v=new Lt;this.onBeforeRender=function(x,T,M){x.getCurrentViewport(v);const k=v.w/v.z,C=v.z/2,P=v.w/2;let h=16/v.w;if(p.set(h*k,h),y.min.set(v.x,v.y),y.max.set(v.x+(v.z-16),v.y+(v.w-16)),e.setFromMatrixPosition(this.matrixWorld),e.applyMatrix4(M.matrixWorldInverse),!(e.z>0)&&(t.copy(e).applyMatrix4(M.projectionMatrix),d.x=v.x+t.x*C+C-8,d.y=v.y+t.y*P+P-8,y.containsPoint(d))){x.copyFramebufferToTexture(d,n);let I=o.uniforms;I.scale.value=p,I.screenPosition.value=t,x.renderBufferDirect(M,null,i,o,s,null),x.copyFramebufferToTexture(d,r),I=a.uniforms,I.scale.value=p,I.screenPosition.value=t,x.renderBufferDirect(M,null,i,a,s,null);const b=-t.x*2,g=-t.y*2;for(let m=0,A=l.length;me in t?Xc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ms=(t,e,n)=>(Qc(t,typeof e!="symbol"?e+"":e,n),n);const Vn={uniforms:{turbidity:{value:2},rayleigh:{value:1},mieCoefficient:{value:.005},mieDirectionalG:{value:.8},sunPosition:{value:new ae},up:{value:new ae(0,1,0)}},vertexShader:` - uniform vec3 sunPosition; - uniform float rayleigh; - uniform float turbidity; - uniform float mieCoefficient; - uniform vec3 up; - - varying vec3 vWorldPosition; - varying vec3 vSunDirection; - varying float vSunfade; - varying vec3 vBetaR; - varying vec3 vBetaM; - varying float vSunE; - - // constants for atmospheric scattering - const float e = 2.71828182845904523536028747135266249775724709369995957; - const float pi = 3.141592653589793238462643383279502884197169; - - // wavelength of used primaries, according to preetham - const vec3 lambda = vec3( 680E-9, 550E-9, 450E-9 ); - // this pre-calcuation replaces older TotalRayleigh(vec3 lambda) function: - // (8.0 * pow(pi, 3.0) * pow(pow(n, 2.0) - 1.0, 2.0) * (6.0 + 3.0 * pn)) / (3.0 * N * pow(lambda, vec3(4.0)) * (6.0 - 7.0 * pn)) - const vec3 totalRayleigh = vec3( 5.804542996261093E-6, 1.3562911419845635E-5, 3.0265902468824876E-5 ); - - // mie stuff - // K coefficient for the primaries - const float v = 4.0; - const vec3 K = vec3( 0.686, 0.678, 0.666 ); - // MieConst = pi * pow( ( 2.0 * pi ) / lambda, vec3( v - 2.0 ) ) * K - const vec3 MieConst = vec3( 1.8399918514433978E14, 2.7798023919660528E14, 4.0790479543861094E14 ); - - // earth shadow hack - // cutoffAngle = pi / 1.95; - const float cutoffAngle = 1.6110731556870734; - const float steepness = 1.5; - const float EE = 1000.0; - - float sunIntensity( float zenithAngleCos ) { - zenithAngleCos = clamp( zenithAngleCos, -1.0, 1.0 ); - return EE * max( 0.0, 1.0 - pow( e, -( ( cutoffAngle - acos( zenithAngleCos ) ) / steepness ) ) ); - } - - vec3 totalMie( float T ) { - float c = ( 0.2 * T ) * 10E-18; - return 0.434 * c * MieConst; - } - - void main() { - - vec4 worldPosition = modelMatrix * vec4( position, 1.0 ); - vWorldPosition = worldPosition.xyz; - - gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); - gl_Position.z = gl_Position.w; // set z to camera.far - - vSunDirection = normalize( sunPosition ); - - vSunE = sunIntensity( dot( vSunDirection, up ) ); - - vSunfade = 1.0 - clamp( 1.0 - exp( ( sunPosition.y / 450000.0 ) ), 0.0, 1.0 ); - - float rayleighCoefficient = rayleigh - ( 1.0 * ( 1.0 - vSunfade ) ); - - // extinction (absorbtion + out scattering) - // rayleigh coefficients - vBetaR = totalRayleigh * rayleighCoefficient; - - // mie coefficients - vBetaM = totalMie( turbidity ) * mieCoefficient; - - } - `,fragmentShader:` - varying vec3 vWorldPosition; - varying vec3 vSunDirection; - varying float vSunfade; - varying vec3 vBetaR; - varying vec3 vBetaM; - varying float vSunE; - - uniform float mieDirectionalG; - uniform vec3 up; - - const vec3 cameraPos = vec3( 0.0, 0.0, 0.0 ); - - // constants for atmospheric scattering - const float pi = 3.141592653589793238462643383279502884197169; - - const float n = 1.0003; // refractive index of air - const float N = 2.545E25; // number of molecules per unit volume for air at 288.15K and 1013mb (sea level -45 celsius) - - // optical length at zenith for molecules - const float rayleighZenithLength = 8.4E3; - const float mieZenithLength = 1.25E3; - // 66 arc seconds -> degrees, and the cosine of that - const float sunAngularDiameterCos = 0.999956676946448443553574619906976478926848692873900859324; - - // 3.0 / ( 16.0 * pi ) - const float THREE_OVER_SIXTEENPI = 0.05968310365946075; - // 1.0 / ( 4.0 * pi ) - const float ONE_OVER_FOURPI = 0.07957747154594767; - - float rayleighPhase( float cosTheta ) { - return THREE_OVER_SIXTEENPI * ( 1.0 + pow( cosTheta, 2.0 ) ); - } - - float hgPhase( float cosTheta, float g ) { - float g2 = pow( g, 2.0 ); - float inverse = 1.0 / pow( 1.0 - 2.0 * g * cosTheta + g2, 1.5 ); - return ONE_OVER_FOURPI * ( ( 1.0 - g2 ) * inverse ); - } - - void main() { - - vec3 direction = normalize( vWorldPosition - cameraPos ); - - // optical length - // cutoff angle at 90 to avoid singularity in next formula. - float zenithAngle = acos( max( 0.0, dot( up, direction ) ) ); - float inverse = 1.0 / ( cos( zenithAngle ) + 0.15 * pow( 93.885 - ( ( zenithAngle * 180.0 ) / pi ), -1.253 ) ); - float sR = rayleighZenithLength * inverse; - float sM = mieZenithLength * inverse; - - // combined extinction factor - vec3 Fex = exp( -( vBetaR * sR + vBetaM * sM ) ); - - // in scattering - float cosTheta = dot( direction, vSunDirection ); - - float rPhase = rayleighPhase( cosTheta * 0.5 + 0.5 ); - vec3 betaRTheta = vBetaR * rPhase; - - float mPhase = hgPhase( cosTheta, mieDirectionalG ); - vec3 betaMTheta = vBetaM * mPhase; - - vec3 Lin = pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * ( 1.0 - Fex ), vec3( 1.5 ) ); - Lin *= mix( vec3( 1.0 ), pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * Fex, vec3( 1.0 / 2.0 ) ), clamp( pow( 1.0 - dot( up, vSunDirection ), 5.0 ), 0.0, 1.0 ) ); - - // nightsky - float theta = acos( direction.y ); // elevation --> y-axis, [-pi/2, pi/2] - float phi = atan( direction.z, direction.x ); // azimuth --> x-axis [-pi/2, pi/2] - vec2 uv = vec2( phi, theta ) / vec2( 2.0 * pi, pi ) + vec2( 0.5, 0.0 ); - vec3 L0 = vec3( 0.1 ) * Fex; - - // composition + solar disc - float sundisk = smoothstep( sunAngularDiameterCos, sunAngularDiameterCos + 0.00002, cosTheta ); - L0 += ( vSunE * 19000.0 * Fex ) * sundisk; - - vec3 texColor = ( Lin + L0 ) * 0.04 + vec3( 0.0, 0.0003, 0.00075 ); - - vec3 retColor = pow( texColor, vec3( 1.0 / ( 1.2 + ( 1.2 * vSunfade ) ) ) ); - - gl_FragColor = vec4( retColor, 1.0 ); - - #include - #include <${Ei>=154?"colorspace_fragment":"encodings_fragment"}> - - } - `},gs=new kn({name:"SkyShader",fragmentShader:Vn.fragmentShader,vertexShader:Vn.vertexShader,uniforms:vi.clone(Vn.uniforms),side:Il,depthWrite:!1});class ys extends jt{constructor(){super(new zl(1,1,1),gs)}}ms(ys,"SkyShader",Vn);ms(ys,"material",gs);new Rl;new ae;new za(0,0,0,"YXZ");new ae;var Zc=Object.defineProperty,Jc=(t,e,n)=>e in t?Zc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ne=(t,e,n)=>(Jc(t,typeof e!="symbol"?e+"":e,n),n);const Dn=new Sl,uo=new Oa,ef=Math.cos(70*(Math.PI/180)),co=(t,e)=>(t%e+e)%e;class tf extends Ml{constructor(e,n){super(),ne(this,"object"),ne(this,"domElement"),ne(this,"enabled",!0),ne(this,"target",new ae),ne(this,"minDistance",0),ne(this,"maxDistance",1/0),ne(this,"minZoom",0),ne(this,"maxZoom",1/0),ne(this,"minPolarAngle",0),ne(this,"maxPolarAngle",Math.PI),ne(this,"minAzimuthAngle",-1/0),ne(this,"maxAzimuthAngle",1/0),ne(this,"enableDamping",!1),ne(this,"dampingFactor",.05),ne(this,"enableZoom",!0),ne(this,"zoomSpeed",1),ne(this,"enableRotate",!0),ne(this,"rotateSpeed",1),ne(this,"enablePan",!0),ne(this,"panSpeed",1),ne(this,"screenSpacePanning",!0),ne(this,"keyPanSpeed",7),ne(this,"zoomToCursor",!1),ne(this,"autoRotate",!1),ne(this,"autoRotateSpeed",2),ne(this,"reverseOrbit",!1),ne(this,"reverseHorizontalOrbit",!1),ne(this,"reverseVerticalOrbit",!1),ne(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),ne(this,"mouseButtons",{LEFT:Tt.ROTATE,MIDDLE:Tt.DOLLY,RIGHT:Tt.PAN}),ne(this,"touches",{ONE:Rt.ROTATE,TWO:Rt.DOLLY_PAN}),ne(this,"target0"),ne(this,"position0"),ne(this,"zoom0"),ne(this,"_domElementKeyEvents",null),ne(this,"getPolarAngle"),ne(this,"getAzimuthalAngle"),ne(this,"setPolarAngle"),ne(this,"setAzimuthalAngle"),ne(this,"getDistance"),ne(this,"getZoomScale"),ne(this,"listenToKeyEvents"),ne(this,"stopListenToKeyEvents"),ne(this,"saveState"),ne(this,"reset"),ne(this,"update"),ne(this,"connect"),ne(this,"dispose"),ne(this,"dollyIn"),ne(this,"dollyOut"),ne(this,"getScale"),ne(this,"setScale"),this.object=e,this.domElement=n,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>c.phi,this.getAzimuthalAngle=()=>c.theta,this.setPolarAngle=L=>{let q=co(L,2*Math.PI),X=c.phi;X<0&&(X+=2*Math.PI),q<0&&(q+=2*Math.PI);let Me=Math.abs(q-X);2*Math.PI-Me{let q=co(L,2*Math.PI),X=c.theta;X<0&&(X+=2*Math.PI),q<0&&(q+=2*Math.PI);let Me=Math.abs(q-X);2*Math.PI-Mer.object.position.distanceTo(r.target),this.listenToKeyEvents=L=>{L.addEventListener("keydown",ie),this._domElementKeyEvents=L},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",ie),this._domElementKeyEvents=null},this.saveState=()=>{r.target0.copy(r.target),r.position0.copy(r.object.position),r.zoom0=r.object.zoom},this.reset=()=>{r.target.copy(r.target0),r.object.position.copy(r.position0),r.object.zoom=r.zoom0,r.object.updateProjectionMatrix(),r.dispatchEvent(i),r.update(),l=s.NONE},this.update=(()=>{const L=new ae,q=new ae(0,1,0),X=new $n().setFromUnitVectors(e.up,q),Me=X.clone().invert(),et=new ae,ft=new $n,Rn=2*Math.PI;return function(){const Gi=r.object.position;X.setFromUnitVectors(e.up,q),Me.copy(X).invert(),L.copy(Gi).sub(r.target),L.applyQuaternion(X),c.setFromVector3(L),r.autoRotate&&l===s.NONE&&D(S()),r.enableDamping?(c.theta+=f.theta*r.dampingFactor,c.phi+=f.phi*r.dampingFactor):(c.theta+=f.theta,c.phi+=f.phi);let xt=r.minAzimuthAngle,bt=r.maxAzimuthAngle;isFinite(xt)&&isFinite(bt)&&(xt<-Math.PI?xt+=Rn:xt>Math.PI&&(xt-=Rn),bt<-Math.PI?bt+=Rn:bt>Math.PI&&(bt-=Rn),xt<=bt?c.theta=Math.max(xt,Math.min(bt,c.theta)):c.theta=c.theta>(xt+bt)/2?Math.max(xt,c.theta):Math.min(bt,c.theta)),c.phi=Math.max(r.minPolarAngle,Math.min(r.maxPolarAngle,c.phi)),c.makeSafe(),r.enableDamping===!0?r.target.addScaledVector(d,r.dampingFactor):r.target.add(d),r.zoomToCursor&&g||r.object.isOrthographicCamera?c.radius=R(c.radius):c.radius=R(c.radius*p),L.setFromSpherical(c),L.applyQuaternion(Me),Gi.copy(r.target).add(L),r.object.matrixAutoUpdate||r.object.updateMatrix(),r.object.lookAt(r.target),r.enableDamping===!0?(f.theta*=1-r.dampingFactor,f.phi*=1-r.dampingFactor,d.multiplyScalar(1-r.dampingFactor)):(f.set(0,0,0),d.set(0,0,0));let un=!1;if(r.zoomToCursor&&g){let cn=null;if(r.object instanceof Nt&&r.object.isPerspectiveCamera){const fn=L.length();cn=R(fn*p);const Cn=fn-cn;r.object.position.addScaledVector(I,Cn),r.object.updateMatrixWorld()}else if(r.object.isOrthographicCamera){const fn=new ae(b.x,b.y,0);fn.unproject(r.object),r.object.zoom=Math.max(r.minZoom,Math.min(r.maxZoom,r.object.zoom/p)),r.object.updateProjectionMatrix(),un=!0;const Cn=new ae(b.x,b.y,0);Cn.unproject(r.object),r.object.position.sub(Cn).add(fn),r.object.updateMatrixWorld(),cn=L.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),r.zoomToCursor=!1;cn!==null&&(r.screenSpacePanning?r.target.set(0,0,-1).transformDirection(r.object.matrix).multiplyScalar(cn).add(r.object.position):(Dn.origin.copy(r.object.position),Dn.direction.set(0,0,-1).transformDirection(r.object.matrix),Math.abs(r.object.up.dot(Dn.direction))u||8*(1-ft.dot(r.object.quaternion))>u?(r.dispatchEvent(i),et.copy(r.object.position),ft.copy(r.object.quaternion),un=!1,!0):!1}})(),this.connect=L=>{r.domElement=L,r.domElement.style.touchAction="none",r.domElement.addEventListener("contextmenu",$e),r.domElement.addEventListener("pointerdown",Se),r.domElement.addEventListener("pointercancel",it),r.domElement.addEventListener("wheel",K)},this.dispose=()=>{var L,q,X,Me,et,ft;r.domElement&&(r.domElement.style.touchAction="auto"),(L=r.domElement)==null||L.removeEventListener("contextmenu",$e),(q=r.domElement)==null||q.removeEventListener("pointerdown",Se),(X=r.domElement)==null||X.removeEventListener("pointercancel",it),(Me=r.domElement)==null||Me.removeEventListener("wheel",K),(et=r.domElement)==null||et.ownerDocument.removeEventListener("pointermove",Ge),(ft=r.domElement)==null||ft.ownerDocument.removeEventListener("pointerup",it),r._domElementKeyEvents!==null&&r._domElementKeyEvents.removeEventListener("keydown",ie)};const r=this,i={type:"change"},o={type:"start"},a={type:"end"},s={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let l=s.NONE;const u=1e-6,c=new qi,f=new qi;let p=1;const d=new ae,y=new De,v=new De,x=new De,T=new De,M=new De,k=new De,C=new De,P=new De,h=new De,I=new ae,b=new De;let g=!1;const m=[],A={};function S(){return 2*Math.PI/60/60*r.autoRotateSpeed}function B(){return Math.pow(.95,r.zoomSpeed)}function D(L){r.reverseOrbit||r.reverseHorizontalOrbit?f.theta+=L:f.theta-=L}function F(L){r.reverseOrbit||r.reverseVerticalOrbit?f.phi+=L:f.phi-=L}const j=(()=>{const L=new ae;return function(q,X){L.setFromMatrixColumn(X,0),L.multiplyScalar(-q),d.add(L)}})(),J=(()=>{const L=new ae;return function(q,X){r.screenSpacePanning===!0?L.setFromMatrixColumn(X,1):(L.setFromMatrixColumn(X,0),L.crossVectors(r.object.up,L)),L.multiplyScalar(q),d.add(L)}})(),oe=(()=>{const L=new ae;return function(q,X){const Me=r.domElement;if(Me&&r.object instanceof Nt&&r.object.isPerspectiveCamera){const et=r.object.position;L.copy(et).sub(r.target);let ft=L.length();ft*=Math.tan(r.object.fov/2*Math.PI/180),j(2*q*ft/Me.clientHeight,r.object.matrix),J(2*X*ft/Me.clientHeight,r.object.matrix)}else Me&&r.object instanceof Qt&&r.object.isOrthographicCamera?(j(q*(r.object.right-r.object.left)/r.object.zoom/Me.clientWidth,r.object.matrix),J(X*(r.object.top-r.object.bottom)/r.object.zoom/Me.clientHeight,r.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),r.enablePan=!1)}})();function Z(L){r.object instanceof Nt&&r.object.isPerspectiveCamera||r.object instanceof Qt&&r.object.isOrthographicCamera?p=L:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),r.enableZoom=!1)}function _(L){Z(p/L)}function ee(L){Z(p*L)}function ge(L){if(!r.zoomToCursor||!r.domElement)return;g=!0;const q=r.domElement.getBoundingClientRect(),X=L.clientX-q.left,Me=L.clientY-q.top,et=q.width,ft=q.height;b.x=X/et*2-1,b.y=-(Me/ft)*2+1,I.set(b.x,b.y,1).unproject(r.object).sub(r.object.position).normalize()}function R(L){return Math.max(r.minDistance,Math.min(r.maxDistance,L))}function ye(L){y.set(L.clientX,L.clientY)}function _e(L){ge(L),C.set(L.clientX,L.clientY)}function ve(L){T.set(L.clientX,L.clientY)}function Fe(L){v.set(L.clientX,L.clientY),x.subVectors(v,y).multiplyScalar(r.rotateSpeed);const q=r.domElement;q&&(D(2*Math.PI*x.x/q.clientHeight),F(2*Math.PI*x.y/q.clientHeight)),y.copy(v),r.update()}function G(L){P.set(L.clientX,L.clientY),h.subVectors(P,C),h.y>0?_(B()):h.y<0&&ee(B()),C.copy(P),r.update()}function w(L){M.set(L.clientX,L.clientY),k.subVectors(M,T).multiplyScalar(r.panSpeed),oe(k.x,k.y),T.copy(M),r.update()}function E(L){ge(L),L.deltaY<0?ee(B()):L.deltaY>0&&_(B()),r.update()}function N(L){let q=!1;switch(L.code){case r.keys.UP:oe(0,r.keyPanSpeed),q=!0;break;case r.keys.BOTTOM:oe(0,-r.keyPanSpeed),q=!0;break;case r.keys.LEFT:oe(r.keyPanSpeed,0),q=!0;break;case r.keys.RIGHT:oe(-r.keyPanSpeed,0),q=!0;break}q&&(L.preventDefault(),r.update())}function H(){if(m.length==1)y.set(m[0].pageX,m[0].pageY);else{const L=.5*(m[0].pageX+m[1].pageX),q=.5*(m[0].pageY+m[1].pageY);y.set(L,q)}}function z(){if(m.length==1)T.set(m[0].pageX,m[0].pageY);else{const L=.5*(m[0].pageX+m[1].pageX),q=.5*(m[0].pageY+m[1].pageY);T.set(L,q)}}function Y(){const L=m[0].pageX-m[1].pageX,q=m[0].pageY-m[1].pageY,X=Math.sqrt(L*L+q*q);C.set(0,X)}function te(){r.enableZoom&&Y(),r.enablePan&&z()}function xe(){r.enableZoom&&Y(),r.enableRotate&&H()}function ke(L){if(m.length==1)v.set(L.pageX,L.pageY);else{const X=vt(L),Me=.5*(L.pageX+X.x),et=.5*(L.pageY+X.y);v.set(Me,et)}x.subVectors(v,y).multiplyScalar(r.rotateSpeed);const q=r.domElement;q&&(D(2*Math.PI*x.x/q.clientHeight),F(2*Math.PI*x.y/q.clientHeight)),y.copy(v)}function de(L){if(m.length==1)M.set(L.pageX,L.pageY);else{const q=vt(L),X=.5*(L.pageX+q.x),Me=.5*(L.pageY+q.y);M.set(X,Me)}k.subVectors(M,T).multiplyScalar(r.panSpeed),oe(k.x,k.y),T.copy(M)}function be(L){const q=vt(L),X=L.pageX-q.x,Me=L.pageY-q.y,et=Math.sqrt(X*X+Me*Me);P.set(0,et),h.set(0,Math.pow(P.y/C.y,r.zoomSpeed)),_(h.y),C.copy(P)}function Re(L){r.enableZoom&&be(L),r.enablePan&&de(L)}function Te(L){r.enableZoom&&be(L),r.enableRotate&&ke(L)}function Se(L){var q,X;r.enabled!==!1&&(m.length===0&&((q=r.domElement)==null||q.ownerDocument.addEventListener("pointermove",Ge),(X=r.domElement)==null||X.ownerDocument.addEventListener("pointerup",it)),yt(L),L.pointerType==="touch"?ce(L):ln(L))}function Ge(L){r.enabled!==!1&&(L.pointerType==="touch"?we(L):U(L))}function it(L){var q,X,Me;ct(L),m.length===0&&((q=r.domElement)==null||q.releasePointerCapture(L.pointerId),(X=r.domElement)==null||X.ownerDocument.removeEventListener("pointermove",Ge),(Me=r.domElement)==null||Me.ownerDocument.removeEventListener("pointerup",it)),r.dispatchEvent(a),l=s.NONE}function ln(L){let q;switch(L.button){case 0:q=r.mouseButtons.LEFT;break;case 1:q=r.mouseButtons.MIDDLE;break;case 2:q=r.mouseButtons.RIGHT;break;default:q=-1}switch(q){case Tt.DOLLY:if(r.enableZoom===!1)return;_e(L),l=s.DOLLY;break;case Tt.ROTATE:if(L.ctrlKey||L.metaKey||L.shiftKey){if(r.enablePan===!1)return;ve(L),l=s.PAN}else{if(r.enableRotate===!1)return;ye(L),l=s.ROTATE}break;case Tt.PAN:if(L.ctrlKey||L.metaKey||L.shiftKey){if(r.enableRotate===!1)return;ye(L),l=s.ROTATE}else{if(r.enablePan===!1)return;ve(L),l=s.PAN}break;default:l=s.NONE}l!==s.NONE&&r.dispatchEvent(o)}function U(L){if(r.enabled!==!1)switch(l){case s.ROTATE:if(r.enableRotate===!1)return;Fe(L);break;case s.DOLLY:if(r.enableZoom===!1)return;G(L);break;case s.PAN:if(r.enablePan===!1)return;w(L);break}}function K(L){r.enabled===!1||r.enableZoom===!1||l!==s.NONE&&l!==s.ROTATE||(L.preventDefault(),r.dispatchEvent(o),E(L),r.dispatchEvent(a))}function ie(L){r.enabled===!1||r.enablePan===!1||N(L)}function ce(L){switch(Et(L),m.length){case 1:switch(r.touches.ONE){case Rt.ROTATE:if(r.enableRotate===!1)return;H(),l=s.TOUCH_ROTATE;break;case Rt.PAN:if(r.enablePan===!1)return;z(),l=s.TOUCH_PAN;break;default:l=s.NONE}break;case 2:switch(r.touches.TWO){case Rt.DOLLY_PAN:if(r.enableZoom===!1&&r.enablePan===!1)return;te(),l=s.TOUCH_DOLLY_PAN;break;case Rt.DOLLY_ROTATE:if(r.enableZoom===!1&&r.enableRotate===!1)return;xe(),l=s.TOUCH_DOLLY_ROTATE;break;default:l=s.NONE}break;default:l=s.NONE}l!==s.NONE&&r.dispatchEvent(o)}function we(L){switch(Et(L),l){case s.TOUCH_ROTATE:if(r.enableRotate===!1)return;ke(L),r.update();break;case s.TOUCH_PAN:if(r.enablePan===!1)return;de(L),r.update();break;case s.TOUCH_DOLLY_PAN:if(r.enableZoom===!1&&r.enablePan===!1)return;Re(L),r.update();break;case s.TOUCH_DOLLY_ROTATE:if(r.enableZoom===!1&&r.enableRotate===!1)return;Te(L),r.update();break;default:l=s.NONE}}function $e(L){r.enabled!==!1&&L.preventDefault()}function yt(L){m.push(L)}function ct(L){delete A[L.pointerId];for(let q=0;q{ee(L),r.update()},this.dollyOut=(L=B())=>{_(L),r.update()},this.getScale=()=>p,this.setScale=L=>{Z(L),r.update()},this.getZoomScale=()=>B(),n!==void 0&&this.connect(n),this.update()}}new _t;new ae;new za;new ae;var nf=Object.defineProperty,rf=(t,e,n)=>e in t?nf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Mi=(t,e,n)=>(rf(t,typeof e!="symbol"?e+"":e,n),n);class vs{constructor(e){Mi(this,"data"),this.data=e}generateShapes(e,n=100,r){const i=[],o={letterSpacing:0,lineHeight:1,...r},a=of(e,n,this.data,o);for(let s=0,l=a.length;s - #include - #include - uniform float thickness; - uniform bool screenspace; - uniform vec2 size; - void main() { - #if defined (USE_SKINNING) - #include - #include - #include - #include - #include - #endif - #include - #include - #include - #include - vec4 tNormal = vec4(normal, 0.0); - vec4 tPosition = vec4(transformed, 1.0); - #ifdef USE_INSTANCING - tNormal = instanceMatrix * tNormal; - tPosition = instanceMatrix * tPosition; - #endif - if (screenspace) { - vec3 newPosition = tPosition.xyz + tNormal.xyz * thickness; - gl_Position = projectionMatrix * modelViewMatrix * vec4(newPosition, 1.0); - } else { - vec4 clipPosition = projectionMatrix * modelViewMatrix * tPosition; - vec4 clipNormal = projectionMatrix * modelViewMatrix * tNormal; - vec2 offset = normalize(clipNormal.xy) * thickness / size * clipPosition.w * 2.0; - clipPosition.xy += offset; - gl_Position = clipPosition; - } - }`,`uniform vec3 color; - uniform float opacity; - void main(){ - gl_FragColor = vec4(color, opacity); - #include - #include - }`);const sf=["args","material-uniforms-color-value"];Qr.ReflectorShader;new ae;new ae;new ae;var Tr;/Mac/.test((Tr=globalThis==null?void 0:globalThis.navigator)===null||Tr===void 0?void 0:Tr.platform);const lf=["target","auto-rotate","auto-rotate-speed","enable-damping","damping-factor","enable-pan","key-pan-speed","keys","max-azimuth-angle","min-azimuth-angle","max-polar-angle","min-polar-angle","min-distance","max-distance","min-zoom","max-zoom","touches","enable-zoom","zoom-speed","enable-rotate","rotate-speed","mouse-buttons","args"],uf=ze({__name:"OrbitControls",props:{makeDefault:{type:Boolean,default:!1},camera:{},domElement:{},target:{default:()=>[0,0,0]},enableDamping:{type:Boolean,default:!0},dampingFactor:{default:.05},autoRotate:{type:Boolean,default:!1},autoRotateSpeed:{default:2},enablePan:{type:Boolean,default:!0},keyPanSpeed:{default:7},keys:{},maxAzimuthAngle:{default:Number.POSITIVE_INFINITY},minAzimuthAngle:{default:Number.NEGATIVE_INFINITY},maxPolarAngle:{default:Math.PI},minPolarAngle:{default:0},minDistance:{default:0},maxDistance:{default:Number.POSITIVE_INFINITY},minZoom:{default:0},maxZoom:{default:Number.POSITIVE_INFINITY},touches:{default:()=>({ONE:Rt.ROTATE,TWO:Rt.DOLLY_PAN})},enableZoom:{type:Boolean,default:!0},zoomSpeed:{default:1},enableRotate:{type:Boolean,default:!0},rotateSpeed:{default:1},mouseButtons:{default:()=>({LEFT:Tt.ROTATE,MIDDLE:Tt.DOLLY,RIGHT:Tt.PAN})}},emits:["change","start","end"],setup(t,{expose:e,emit:n}){const r=t,i=n,{makeDefault:o,autoRotate:a,autoRotateSpeed:s,enableDamping:l,dampingFactor:u,enablePan:c,keyPanSpeed:f,maxAzimuthAngle:p,minAzimuthAngle:d,maxPolarAngle:y,minPolarAngle:v,minDistance:x,maxDistance:T,minZoom:M,maxZoom:k,enableZoom:C,zoomSpeed:P,enableRotate:h,touches:I,rotateSpeed:b,target:g,mouseButtons:m}=mi(r),{camera:A,renderer:S,extend:B,controls:D,invalidate:F}=rr(),j=Da(null);B({OrbitControls:tf}),Ue(j,Z=>{J(),Z&&o.value?D.value=Z:D.value=null});function J(){yr(j.value,"change",()=>{i("change",j.value),F()}),yr(j.value,"start",()=>i("start",j.value)),yr(j.value,"end",()=>i("end",j.value))}const{onBeforeRender:oe}=Gn();return oe(({invalidate:Z})=>{j.value&&(l.value||a.value)&&(j.value.update(),a.value&&Z())}),Ht(()=>{j.value&&j.value.dispose()}),e({instance:j}),(Z,_)=>(Z.camera||V(A))&&(Z.domElement||V(S))?(Q(),re("TresOrbitControls",{key:0,ref_key:"controlsRef",ref:j,target:V(g),"auto-rotate":V(a),"auto-rotate-speed":V(s),"enable-damping":V(l),"damping-factor":V(u),"enable-pan":V(c),"key-pan-speed":V(f),keys:Z.keys,"max-azimuth-angle":V(p),"min-azimuth-angle":V(d),"max-polar-angle":V(y),"min-polar-angle":V(v),"min-distance":V(x),"max-distance":V(T),"min-zoom":V(M),"max-zoom":V(k),touches:V(I),"enable-zoom":V(C),"zoom-speed":V(P),"enable-rotate":V(h),"rotate-speed":V(b),"mouse-buttons":V(m),args:[Z.camera||V(A),Z.domElement||V(S).domElement]},null,8,lf)):ut("",!0)}});function On(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var fo={exports:{}},po;function cf(){return po||(po=1,function(t,e){(function(n){t.exports=n()})(function(){return function n(r,i,o){function a(u,c){if(!i[u]){if(!r[u]){var f=typeof On=="function"&&On;if(!c&&f)return f(u,!0);if(s)return s(u,!0);throw new Error("Cannot find module '"+u+"'")}c=i[u]={exports:{}},r[u][0].call(c.exports,function(p){var d=r[u][1][p];return a(d||p)},c,c.exports,n,r,i,o)}return i[u].exports}for(var s=typeof On=="function"&&On,l=0;l>16),F((65280&m)>>8),F(255&m);return A==2?F(255&(m=I(b.charAt(g))<<2|I(b.charAt(g+1))>>4)):A==1&&(F((m=I(b.charAt(g))<<10|I(b.charAt(g+1))<<4|I(b.charAt(g+2))>>2)>>8&255),F(255&m)),S},y.fromByteArray=function(b){var g,m,A,S,B=b.length%3,D="";function F(j){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(j)}for(g=0,A=b.length-B;g>18&63)+F(S>>12&63)+F(S>>6&63)+F(63&S);switch(B){case 1:D=(D+=F((m=b[b.length-1])>>2))+F(m<<4&63)+"==";break;case 2:D=(D=(D+=F((m=(b[b.length-2]<<8)+b[b.length-1])>>10))+F(m>>4&63))+F(m<<2&63)+"="}return D}})(i===void 0?this.base64js={}:i)}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(n,r,i){(function(o,a,x,l,u,c,f,p,d){var y=n("base64-js"),v=n("ieee754");function x(w,E,N){if(!(this instanceof x))return new x(w,E,N);var H,z,Y,te,xe=typeof w;if(E==="base64"&&xe=="string")for(w=(te=w).trim?te.trim():te.replace(/^\s+|\s+$/g,"");w.length%4!=0;)w+="=";if(xe=="number")H=oe(w);else if(xe=="string")H=x.byteLength(w,E);else{if(xe!="object")throw new Error("First argument needs to be a number, array or string.");H=oe(w.length)}if(x._useTypedArrays?z=x._augment(new Uint8Array(H)):((z=this).length=H,z._isBuffer=!0),x._useTypedArrays&&typeof w.byteLength=="number")z._set(w);else if(Z(te=w)||x.isBuffer(te)||te&&typeof te=="object"&&typeof te.length=="number")for(Y=0;Y>8,te=te%256,xe.push(te),xe.push(Y);return xe}(E),w,N,H)}function k(w,E,N){var H="";N=Math.min(w.length,N);for(var z=E;z>>0)):(E+1>>0),z}function h(w,E,N,H){if(H||(G(typeof N=="boolean","missing or invalid endian"),G(E!=null,"missing offset"),G(E+1>>8*(H?Y:1-Y)}function A(w,E,N,H,z){if(z||(G(E!=null,"missing value"),G(typeof H=="boolean","missing or invalid endian"),G(N!=null,"missing offset"),G(N+3>>8*(H?Y:3-Y)&255}function S(w,E,N,H,z){z||(G(E!=null,"missing value"),G(typeof H=="boolean","missing or invalid endian"),G(N!=null,"missing offset"),G(N+1this.length&&(H=this.length);var z=(H=w.length-E=this.length))return this[w]},x.prototype.readUInt16LE=function(w,E){return C(this,w,!0,E)},x.prototype.readUInt16BE=function(w,E){return C(this,w,!1,E)},x.prototype.readUInt32LE=function(w,E){return P(this,w,!0,E)},x.prototype.readUInt32BE=function(w,E){return P(this,w,!1,E)},x.prototype.readInt8=function(w,E){if(E||(G(w!=null,"missing offset"),G(w=this.length))return 128&this[w]?-1*(255-this[w]+1):this[w]},x.prototype.readInt16LE=function(w,E){return h(this,w,!0,E)},x.prototype.readInt16BE=function(w,E){return h(this,w,!1,E)},x.prototype.readInt32LE=function(w,E){return I(this,w,!0,E)},x.prototype.readInt32BE=function(w,E){return I(this,w,!1,E)},x.prototype.readFloatLE=function(w,E){return b(this,w,!0,E)},x.prototype.readFloatBE=function(w,E){return b(this,w,!1,E)},x.prototype.readDoubleLE=function(w,E){return g(this,w,!0,E)},x.prototype.readDoubleBE=function(w,E){return g(this,w,!1,E)},x.prototype.writeUInt8=function(w,E,N){N||(G(w!=null,"missing value"),G(E!=null,"missing offset"),G(E=this.length||(this[E]=w)},x.prototype.writeUInt16LE=function(w,E,N){m(this,w,E,!0,N)},x.prototype.writeUInt16BE=function(w,E,N){m(this,w,E,!1,N)},x.prototype.writeUInt32LE=function(w,E,N){A(this,w,E,!0,N)},x.prototype.writeUInt32BE=function(w,E,N){A(this,w,E,!1,N)},x.prototype.writeInt8=function(w,E,N){N||(G(w!=null,"missing value"),G(E!=null,"missing offset"),G(E=this.length||(0<=w?this.writeUInt8(w,E,N):this.writeUInt8(255+w+1,E,N))},x.prototype.writeInt16LE=function(w,E,N){S(this,w,E,!0,N)},x.prototype.writeInt16BE=function(w,E,N){S(this,w,E,!1,N)},x.prototype.writeInt32LE=function(w,E,N){B(this,w,E,!0,N)},x.prototype.writeInt32BE=function(w,E,N){B(this,w,E,!1,N)},x.prototype.writeFloatLE=function(w,E,N){D(this,w,E,!0,N)},x.prototype.writeFloatBE=function(w,E,N){D(this,w,E,!1,N)},x.prototype.writeDoubleLE=function(w,E,N){F(this,w,E,!0,N)},x.prototype.writeDoubleBE=function(w,E,N){F(this,w,E,!1,N)},x.prototype.fill=function(w,E,N){if(E=E||0,N=N||this.length,G(typeof(w=typeof(w=w||0)=="string"?w.charCodeAt(0):w)=="number"&&!isNaN(w),"value is not a number"),G(E<=N,"end < start"),N!==E&&this.length!==0){G(0<=E&&E"},x.prototype.toArrayBuffer=function(){if(typeof Uint8Array>"u")throw new Error("Buffer.toArrayBuffer not supported in this browser");if(x._useTypedArrays)return new x(this).buffer;for(var w=new Uint8Array(this.length),E=0,N=w.length;E=E.length||z>=w.length);z++)E[z+N]=w[z];return z}function ye(w){try{return decodeURIComponent(w)}catch{return"�"}}function _e(w,E){G(typeof w=="number","cannot write a non-number as a number"),G(0<=w,"specified a negative value for writing an unsigned value"),G(w<=E,"value is larger than maximum value for type"),G(Math.floor(w)===w,"value has a fractional component")}function ve(w,E,N){G(typeof w=="number","cannot write a non-number as a number"),G(w<=E,"value larger than maximum allowed value"),G(N<=w,"value smaller than minimum allowed value"),G(Math.floor(w)===w,"value has a fractional component")}function Fe(w,E,N){G(typeof w=="number","cannot write a non-number as a number"),G(w<=E,"value larger than maximum allowed value"),G(N<=w,"value smaller than minimum allowed value")}function G(w,E){if(!w)throw new Error(E||"Failed assertion")}x._augment=function(w){return w._isBuffer=!0,w._get=w.get,w._set=w.set,w.get=j.get,w.set=j.set,w.write=j.write,w.toString=j.toString,w.toLocaleString=j.toString,w.toJSON=j.toJSON,w.copy=j.copy,w.slice=j.slice,w.readUInt8=j.readUInt8,w.readUInt16LE=j.readUInt16LE,w.readUInt16BE=j.readUInt16BE,w.readUInt32LE=j.readUInt32LE,w.readUInt32BE=j.readUInt32BE,w.readInt8=j.readInt8,w.readInt16LE=j.readInt16LE,w.readInt16BE=j.readInt16BE,w.readInt32LE=j.readInt32LE,w.readInt32BE=j.readInt32BE,w.readFloatLE=j.readFloatLE,w.readFloatBE=j.readFloatBE,w.readDoubleLE=j.readDoubleLE,w.readDoubleBE=j.readDoubleBE,w.writeUInt8=j.writeUInt8,w.writeUInt16LE=j.writeUInt16LE,w.writeUInt16BE=j.writeUInt16BE,w.writeUInt32LE=j.writeUInt32LE,w.writeUInt32BE=j.writeUInt32BE,w.writeInt8=j.writeInt8,w.writeInt16LE=j.writeInt16LE,w.writeInt16BE=j.writeInt16BE,w.writeInt32LE=j.writeInt32LE,w.writeInt32BE=j.writeInt32BE,w.writeFloatLE=j.writeFloatLE,w.writeFloatBE=j.writeFloatBE,w.writeDoubleLE=j.writeDoubleLE,w.writeDoubleBE=j.writeDoubleBE,w.fill=j.fill,w.inspect=j.inspect,w.toArrayBuffer=j.toArrayBuffer,w}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(n,r,i){(function(o,a,y,l,u,c,f,p,d){var y=n("buffer").Buffer,v=4,x=new y(v);x.fill(0),r.exports={hash:function(T,M,k,C){for(var P=M(function(m,A){m.length%v!=0&&(S=m.length+(v-m.length%v),m=y.concat([m,x],S));for(var S,B=[],D=A?m.readInt32BE:m.readInt32LE,F=0;Fk?J=j(J):J.length>5]|=128<>>9<<4)]=I;for(var b=1732584193,g=-271733879,m=-1732584194,A=271733878,S=0;S>>32-m,b)}function T(h,I,b,g,m,A,S){return x(I&b|~I&g,h,I,m,A,S)}function M(h,I,b,g,m,A,S){return x(I&g|b&~g,h,I,m,A,S)}function k(h,I,b,g,m,A,S){return x(I^b^g,h,I,m,A,S)}function C(h,I,b,g,m,A,S){return x(b^(I|~g),h,I,m,A,S)}function P(h,I){var b=(65535&h)+(65535&I);return(h>>16)+(I>>16)+(b>>16)<<16|65535&b}r.exports=function(h){return y.hash(h,v,16)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(n,r,i){(function(o,a,s,l,u,c,f,p,d){r.exports=function(y){for(var v,x=new Array(y),T=0;T>>((3&T)<<3)&255;return x}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(n,r,i){(function(o,a,s,l,u,c,f,p,d){var y=n("./helpers");function v(M,k){M[k>>5]|=128<<24-k%32,M[15+(k+64>>9<<4)]=k;for(var C,P,h,I=Array(80),b=1732584193,g=-271733879,m=-1732584194,A=271733878,S=-1009589776,B=0;B>16)+(k>>16)+(C>>16)<<16|65535&C}function T(M,k){return M<>>32-k}r.exports=function(M){return y.hash(M,v,20,!0)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(n,r,i){(function(o,a,s,l,u,c,f,p,d){function y(k,C){var P=(65535&k)+(65535&C);return(k>>16)+(C>>16)+(P>>16)<<16|65535&P}function v(k,C){var P,h=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),I=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),b=new Array(64);k[C>>5]|=128<<24-C%32,k[15+(C+64>>9<<4)]=C;for(var g,m,A=0;A>>C|k<<32-C},M=function(k,C){return k>>>C};r.exports=function(k){return x.hash(k,v,32,!0)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(n,r,i){(function(o,a,s,l,u,c,f,p,d){i.read=function(y,v,x,T,A){var k,C,P=8*A-T-1,h=(1<>1,b=-7,g=x?A-1:0,m=x?-1:1,A=y[v+g];for(g+=m,k=A&(1<<-b)-1,A>>=-b,b+=P;0>=-b,b+=T;0>1,g=M===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=T?0:S-1,A=T?1:-1,S=v<0||v===0&&1/v<0?1:0;for(v=Math.abs(v),isNaN(v)||v===1/0?(P=isNaN(v)?1:0,C=I):(C=Math.floor(Math.log(v)/Math.LN2),v*(T=Math.pow(2,-C))<1&&(C--,T*=2),2<=(v+=1<=C+b?g/T:g*Math.pow(2,1-b))*T&&(C++,T/=2),I<=C+b?(P=0,C=I):1<=C+b?(P=(v*T-1)*Math.pow(2,M),C+=b):(P=v*Math.pow(2,b-1)*Math.pow(2,M),C=0));8<=M;y[x+m]=255&P,m+=A,P/=256,M-=8);for(C=C<>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]),go}var vo,xo;function bs(){return xo||(xo=1,vo=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]),vo}var Ar,bo;function df(){if(bo)return Ar;bo=1;var t=xs();return Ar=t.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"]),Ar}var _r,wo;function pf(){if(wo)return _r;wo=1;var t=bs();return t=t.slice().filter(function(e){return!/^(gl\_|texture)/.test(e)}),_r=t.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"]),_r}var kr,To;function hf(){if(To)return kr;To=1,kr=C;var t=xs(),e=ff(),n=bs(),r=df(),i=pf(),o=999,a=9999,s=0,l=1,u=2,c=3,f=4,p=5,d=6,y=7,v=8,x=9,T=10,M=11,k=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"];function C(P){var h=0,I=0,b=o,g,m,A=[],S=[],B=1,D=0,F=0,j=!1,J=!1,oe="",Z;P=P||{};var _=n,ee=t;P.version==="300 es"&&(_=i,ee=r);for(var ge={},R={},h=0;h<_.length;h++)ge[_[h]]=!0;for(var h=0;h0)continue;Te=de.slice(0,1).join("")}return ye(Te),F+=Te.length,A=A.slice(Te.length),A.length}while(!0)}function Y(){return/[^a-fA-F0-9]/.test(g)?(ye(A.join("")),b=o,h):(A.push(g),m=g,h+1)}function te(){return g==="."||/[eE]/.test(g)?(A.push(g),b=p,m=g,h+1):g==="x"&&A.length===1&&A[0]==="0"?(b=M,A.push(g),m=g,h+1):/[^\d]/.test(g)?(ye(A.join("")),b=o,h):(A.push(g),m=g,h+1)}function xe(){return g==="f"&&(A.push(g),m=g,h+=1),/[eE]/.test(g)||(g==="-"||g==="+")&&/[eE]/.test(m)?(A.push(g),m=g,h+1):/[^\d]/.test(g)?(ye(A.join("")),b=o,h):(A.push(g),m=g,h+1)}function ke(){if(/[^\d\w_]/.test(g)){var de=A.join("");return R[de]?b=v:ge[de]?b=y:b=d,ye(A.join("")),b=o,h}return A.push(g),m=g,h+1}}return kr}var Er,Ao;function mf(){if(Ao)return Er;Ao=1;var t=hf();Er=e;function e(n,r){var i=t(r),o=[];return o=o.concat(i(n)),o=o.concat(i(null)),o}return Er}mf();function gf(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function yf(t){var e=gf(t,"string");return typeof e=="symbol"?e:String(e)}function Ie(t,e,n){return e=yf(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ue={position:"csm_Position",positionRaw:"csm_PositionRaw",pointSize:"csm_PointSize",fragColor:"csm_FragColor",diffuseColor:"csm_DiffuseColor",normal:"csm_Normal",roughness:"csm_Roughness",metalness:"csm_Metalness",emissive:"csm_Emissive",ao:"csm_AO",bump:"csm_Bump",depthAlpha:"csm_DepthAlpha"},qe,qt;qe={},Ie(qe,"".concat(ue.normal),{"#include ":` - vec3 objectNormal = `.concat(ue.normal,`; - #ifdef USE_TANGENT - vec3 objectTangent = vec3( tangent.xyz ); - #endif - `)}),Ie(qe,"".concat(ue.position),{"#include ":` - vec3 transformed = `.concat(ue.position,`; - `)}),Ie(qe,"".concat(ue.positionRaw),{"#include ":` - vec4 csm_internal_positionUnprojected = `.concat(ue.positionRaw,`; - mat4x4 csm_internal_unprojectMatrix = projectionMatrix * modelViewMatrix; - #ifdef USE_INSTANCING - csm_internal_unprojectMatrix = csm_internal_unprojectMatrix * instanceMatrix; - #endif - csm_internal_positionUnprojected = inverse(csm_internal_unprojectMatrix) * csm_internal_positionUnprojected; - vec3 transformed = csm_internal_positionUnprojected.xyz; - `)}),Ie(qe,"".concat(ue.pointSize),{"gl_PointSize = size;":` - gl_PointSize = `.concat(ue.pointSize,`; - `)}),Ie(qe,"".concat(ue.diffuseColor),{"#include ":` - #include - diffuseColor = `.concat(ue.diffuseColor,`; - `)}),Ie(qe,"".concat(ue.fragColor),{"#include ":` - #include - gl_FragColor = `.concat(ue.fragColor,`; - `)}),Ie(qe,"".concat(ue.emissive),{"vec3 totalEmissiveRadiance = emissive;":` - vec3 totalEmissiveRadiance = `.concat(ue.emissive,`; - `)}),Ie(qe,"".concat(ue.roughness),{"#include ":` - #include - roughnessFactor = `.concat(ue.roughness,`; - `)}),Ie(qe,"".concat(ue.metalness),{"#include ":` - #include - metalnessFactor = `.concat(ue.metalness,`; - `)}),Ie(qe,"".concat(ue.ao),{"#include ":` - #include - reflectedLight.indirectDiffuse *= 1. - `.concat(ue.ao,`; - `)}),Ie(qe,"".concat(ue.bump),{"#include ":` - #include - - vec3 csm_internal_orthogonal = `.concat(ue.bump," - (dot(").concat(ue.bump,`, normal) * normal); - vec3 csm_internal_projectedbump = mat3(csm_internal_vModelViewMatrix) * csm_internal_orthogonal; - normal = normalize(normal - csm_internal_projectedbump); - `)}),Ie(qe,"".concat(ue.depthAlpha),{"gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );":` - gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity * `.concat(ue.depthAlpha,` ); - `),"gl_FragColor = packDepthToRGBA( fragCoordZ );":` - gl_FragColor = packDepthToRGBA( fragCoordZ ); - gl_FragColor.a *= `.concat(ue.depthAlpha,`; - `)});qt={},Ie(qt,"".concat(ue.position),{"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );":` - gl_Position = projectionMatrix * modelViewMatrix * vec4( `.concat(ue.position,`, 1.0 ); - `)}),Ie(qt,"".concat(ue.positionRaw),{"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );":` - gl_Position = `.concat(ue.position,`; - `)}),Ie(qt,"".concat(ue.diffuseColor),{"gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );":` - gl_FragColor = `.concat(ue.diffuseColor,`; - `)}),Ie(qt,"".concat(ue.fragColor),{"gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );":` - gl_FragColor = `.concat(ue.fragColor,`; - `)});var Ye;Ye={},Ie(Ye,"".concat(ue.position),"*"),Ie(Ye,"".concat(ue.positionRaw),"*"),Ie(Ye,"".concat(ue.normal),"*"),Ie(Ye,"".concat(ue.pointSize),["PointsMaterial"]),Ie(Ye,"".concat(ue.diffuseColor),"*"),Ie(Ye,"".concat(ue.fragColor),"*"),Ie(Ye,"".concat(ue.emissive),["MeshStandardMaterial","MeshPhysicalMaterial"]),Ie(Ye,"".concat(ue.roughness),["MeshStandardMaterial","MeshPhysicalMaterial"]),Ie(Ye,"".concat(ue.metalness),["MeshStandardMaterial","MeshPhysicalMaterial"]),Ie(Ye,"".concat(ue.ao),["MeshStandardMaterial","MeshPhysicalMaterial","MeshBasicMaterial","MeshLambertMaterial","MeshPhongMaterial","MeshToonMaterial"]),Ie(Ye,"".concat(ue.bump),["MeshLambertMaterial","MeshMatcapMaterial","MeshNormalMaterial","MeshPhongMaterial","MeshPhysicalMaterial","MeshStandardMaterial","MeshToonMaterial","ShadowMaterial"]),Ie(Ye,"".concat(ue.depthAlpha),"*");var vf=`void main() { - gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); -}`,xf=`#include - -void main() { - vec2 center = vec2(0., 1.); - float rotation = 0.0; - - - - float size = 0.03; - - vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); - vec2 scale; - scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); - scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); - - bool isPerspective = isPerspectiveMatrix( projectionMatrix ); - if ( isPerspective ) scale *= - mvPosition.z; - - vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale * size; - vec2 rotatedPosition; - rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; - rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; - mvPosition.xy += rotatedPosition; - - gl_Position = projectionMatrix * mvPosition; -}`;const Mn=new ae(0,0,0),Si=new ae(0,0,0),bf=new ae(0,0,0);function _o(t,e,n){const r=Mn.setFromMatrixPosition(t.matrixWorld);r.project(e);const i=n.width/2,o=n.height/2;return[(Number.isNaN(r.x)?0:r.x)*i+i,-(r.y*o)+o,r.z]}function wf(t,e){const n=Mn.setFromMatrixPosition(t.matrixWorld),r=Si.setFromMatrixPosition(e.matrixWorld),i=n.sub(r),o=e.getWorldDirection(bf);return i.angleTo(o)>Math.PI/2}function Tf(t,e,n,r){const i=Mn.setFromMatrixPosition(t.matrixWorld),o=i.clone();o.project(e),n.setFromCamera(new De(o.x,o.y),e);const a=n.intersectObjects(r,!0);if(a.length>0){const s=a[0].distance;return i.distanceTo(n.ray.origin)Math.abs(t)<1e-10?0:t;function ws(t,e,n=""){let r="matrix3d(";for(let i=0;i!==16;i++)r+=Jr(e[i]*t.elements[i])+(i!==15?",":")");return n+r}const kf=(t=>e=>ws(e,t))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),Ef=(t=>(e,n)=>ws(e,t(n),"translate(-50%,-50%)"))(t=>[1/t,1/t,1/t,1,-1/t,-1/t,-1/t,-1,1/t,1/t,1/t,1,1,1,1,1]),Mf=["geometry","material"];new ja;var ei={exports:{}},Sf=ei.exports,ko;function If(){return ko||(ko=1,function(t,e){(function(n,r){t.exports=r()})(Sf,function(){var n=function(){function r(d){return a.appendChild(d.dom),d}function i(d){for(var y=0;yl+1e3&&(c.update(1e3*u/(d-l),100),l=d,u=0,p)){var y=performance.memory;p.update(y.usedJSHeapSize/1048576,y.jsHeapSizeLimit/1048576)}return d},update:function(){s=this.end()},domElement:a,setMode:i}};return n.Panel=function(r,i,o){var a=1/0,s=0,l=Math.round,u=l(window.devicePixelRatio||1),c=80*u,f=48*u,p=3*u,d=2*u,y=3*u,v=15*u,x=74*u,T=30*u,M=document.createElement("canvas");M.width=c,M.height=f,M.style.cssText="width:80px;height:48px";var k=M.getContext("2d");return k.font="bold "+9*u+"px Helvetica,Arial,sans-serif",k.textBaseline="top",k.fillStyle=o,k.fillRect(0,0,c,f),k.fillStyle=i,k.fillText(r,p,d),k.fillRect(y,v,x,T),k.fillStyle=o,k.globalAlpha=.9,k.fillRect(y,v,x,T),{dom:M,update:function(C,P){a=Math.min(a,C),s=Math.max(s,C),k.fillStyle=o,k.globalAlpha=1,k.fillRect(0,0,c,v),k.fillStyle=i,k.fillText(l(C)+" "+r+" ("+l(a)+"-"+l(s)+")",p,d),k.drawImage(M,y+u,v,x-u,T,y,v,x-u,T),k.fillRect(y+x-u,v,u,T),k.fillStyle=o,k.globalAlpha=.9,k.fillRect(y+x-u,v,u,l((1-C/P)*T))}}},n})}(ei)),ei.exports}If();const Rf={key:0,args:[0,1,64]},Cf={key:1,args:[.5,1,64]},Nf={key:2},Lf=["tone-mapped","map","side","color"];new je(16777215);const Yt=ze({__name:"Range",props:{modelValue:null,min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","mousedown"],setup(t,{emit:e}){const n=t,r=e,i=W(null);function o(y,v,x){return Math.min(Math.max(y,v),x)}function a(y){const v=y.toString();return v.includes("e-")?Number.parseInt(v.split("e-")[1],10):v.includes(".")?v.split(".")[1].length:0}function s(y,v){const x=a(v),T=10**(x+3);return Number.parseFloat((y*T/T).toFixed(x))}const l=He(()=>s(o(n.modelValue,n.min,n.max),n.step)),u=He(()=>{const y=(l.value-n.min)/(n.max-n.min)*100;return{width:`${y}%`,backgroundSize:`${y}% 100%`}});function c(y){if(!i.value)return l.value;const v=i.value.getBoundingClientRect(),T=(y.clientX-v.left)/v.width,M=n.max-n.min,k=n.min+M*T,C=Math.round(k/n.step)*n.step;return Math.min(Math.max(C,n.min),n.max)}function f(y){if(n.disabled)return;const v=c(y);r("update:modelValue",v)}function p(y){if(n.disabled)return;y.preventDefault();const v=c(y);r("update:modelValue",v),window.addEventListener("mousemove",f),window.addEventListener("mouseup",d)}function d(y){window.removeEventListener("mousemove",f),window.removeEventListener("mouseup",d)}return Ht(()=>{window.removeEventListener("mousemove",f),window.removeEventListener("mouseup",d)}),(y,v)=>(Q(),re("span",{ref_key:"sliderRef",ref:i,class:dt(["range-slider disabled:pointer-events-none disabled:cursor-default disabled:opacity-50",{disabled:t.disabled}]),bg:"[#e6e1fc] dark:[#676085]","touch-action-none":"",relative:"","inline-block":"","w-full":"","cursor-ew-resize":"","rounded-sm":"",onMousedown:p},[O("span",{style:Wr(u.value),bg:"[#cabeff] dark:[#4e34b9]",relative:"",block:"","rounded-sm":"",h:"[14px]"},null,4),O("span",{role:"slider",class:"slider-thumb",style:Wr({left:`${(l.value-t.min)/(t.max-t.min)*100}%`}),absolute:"","rounded-sm":"",w:"[1px]",h:"[14px]",bg:"neutral-100 dark:neutral-400",top:"50%",transform:"translate-x-[50%] translate-y-[-50%]"},null,4)],34))}});function Eo(t,e){if(e===Kl)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),t;if(e===Xr||e===Ka){let n=t.getIndex();if(n===null){const a=[],s=t.getAttribute("position");if(s!==void 0){for(let l=0;l=2.0 are supported."));return}const u=new pd(o,{path:n||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});u.fileLoader.setRequestHeader(this.requestHeader);for(let c=0;c=0&&s[f]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+f+'".')}}u.setExtensions(a),u.setPlugins(s),u.parse(r,i)}parseAsync(e,n){const r=this;return new Promise(function(i,o){r.parse(e,n,i,o)})}}function Df(){let t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}}const pe={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class Of{constructor(e){this.parser=e,this.name=pe.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,n=this.parser.json.nodes||[];for(let r=0,i=n.length;r=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return n.loadTextureImage(e,o.source,a)}}class Xf{constructor(e){this.parser=e,this.name=pe.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const n=this.name,r=this.parser,i=r.json,o=i.textures[e];if(!o.extensions||!o.extensions[n])return null;const a=o.extensions[n],s=i.images[a.source];let l=r.textureLoader;if(s.uri){const u=r.options.manager.getHandler(s.uri);u!==null&&(l=u)}return this.detectSupport().then(function(u){if(u)return r.loadTextureImage(e,a.source,l);if(i.extensionsRequired&&i.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return r.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const n=new Image;n.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",n.onload=n.onerror=function(){e(n.height===1)}})),this.isSupported}}class Qf{constructor(e){this.parser=e,this.name=pe.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const n=this.name,r=this.parser,i=r.json,o=i.textures[e];if(!o.extensions||!o.extensions[n])return null;const a=o.extensions[n],s=i.images[a.source];let l=r.textureLoader;if(s.uri){const u=r.options.manager.getHandler(s.uri);u!==null&&(l=u)}return this.detectSupport().then(function(u){if(u)return r.loadTextureImage(e,a.source,l);if(i.extensionsRequired&&i.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return r.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const n=new Image;n.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",n.onload=n.onerror=function(){e(n.height===1)}})),this.isSupported}}class Zf{constructor(e){this.name=pe.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const n=this.parser.json,r=n.bufferViews[e];if(r.extensions&&r.extensions[this.name]){const i=r.extensions[this.name],o=this.parser.getDependency("buffer",i.buffer),a=this.parser.options.meshoptDecoder;if(!a||!a.supported){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return o.then(function(s){const l=i.byteOffset||0,u=i.byteLength||0,c=i.count,f=i.byteStride,p=new Uint8Array(s,l,u);return a.decodeGltfBufferAsync?a.decodeGltfBufferAsync(c,f,p,i.mode,i.filter).then(function(d){return d.buffer}):a.ready.then(function(){const d=new ArrayBuffer(c*f);return a.decodeGltfBuffer(new Uint8Array(d),c,f,p,i.mode,i.filter),d})})}else return null}}class Jf{constructor(e){this.name=pe.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const n=this.parser.json,r=n.nodes[e];if(!r.extensions||!r.extensions[this.name]||r.mesh===void 0)return null;const i=n.meshes[r.mesh];for(const u of i.primitives)if(u.mode!==at.TRIANGLES&&u.mode!==at.TRIANGLE_STRIP&&u.mode!==at.TRIANGLE_FAN&&u.mode!==void 0)return null;const a=r.extensions[this.name].attributes,s=[],l={};for(const u in a)s.push(this.parser.getDependency("accessor",a[u]).then(c=>(l[u]=c,l[u])));return s.length<1?null:(s.push(this.parser.createNodeMesh(e)),Promise.all(s).then(u=>{const c=u.pop(),f=c.isGroup?c.children:[c],p=u[0].count,d=[];for(const y of f){const v=new _t,x=new ae,T=new $n,M=new ae(1,1,1),k=new Jl(y.geometry,y.material,p);for(let C=0;C0||t.search(/^data\:image\/jpeg/)===0?"image/jpeg":t.search(/\.webp($|\?)/i)>0||t.search(/^data\:image\/webp/)===0?"image/webp":t.search(/\.ktx2($|\?)/i)>0||t.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}const dd=new _t;class pd{constructor(e={},n={}){this.json=e,this.extensions={},this.plugins={},this.options=n,this.cache=new Df,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let r=!1,i=-1,o=!1,a=-1;if(typeof navigator<"u"){const s=navigator.userAgent;r=/^((?!chrome|android).)*safari/i.test(s)===!0;const l=s.match(/Version\/(\d+)/);i=r&&l?parseInt(l[1],10):-1,o=s.indexOf("Firefox")>-1,a=o?s.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>"u"||r&&i<17||o&&a<98?this.textureLoader=new tu(this.options.manager):this.textureLoader=new nu(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Wa(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,n){const r=this,i=this.json,o=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(a){return a._markDefs&&a._markDefs()}),Promise.all(this._invokeAll(function(a){return a.beforeRoot&&a.beforeRoot()})).then(function(){return Promise.all([r.getDependencies("scene"),r.getDependencies("animation"),r.getDependencies("camera")])}).then(function(a){const s={scene:a[0][i.scene||0],scenes:a[0],animations:a[1],cameras:a[2],asset:i.asset,parser:r,userData:{}};return Ot(o,s,i),wt(s,i),Promise.all(r._invokeAll(function(l){return l.afterRoot&&l.afterRoot(s)})).then(function(){for(const l of s.scenes)l.updateMatrixWorld();e(s)})}).catch(n)}_markDefs(){const e=this.json.nodes||[],n=this.json.skins||[],r=this.json.meshes||[];for(let i=0,o=n.length;i{const l=this.associations.get(a);l!=null&&this.associations.set(s,l);for(const[u,c]of a.children.entries())o(c,s.children[u])};return o(r,i),i.name+="_instance_"+e.uses[n]++,i}_invokeOne(e){const n=Object.values(this.plugins);n.push(this);for(let r=0;r=2&&x.setY(g,h[I*l+1]),l>=3&&x.setZ(g,h[I*l+2]),l>=4&&x.setW(g,h[I*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}x.normalized=y}return x})}loadTexture(e){const n=this.json,r=this.options,o=n.textures[e].source,a=n.images[o];let s=this.textureLoader;if(a.uri){const l=r.manager.getHandler(a.uri);l!==null&&(s=l)}return this.loadTextureImage(e,o,s)}loadTextureImage(e,n,r){const i=this,o=this.json,a=o.textures[e],s=o.images[n],l=(s.uri||s.bufferView)+":"+a.sampler;if(this.textureCache[l])return this.textureCache[l];const u=this.loadImageSource(n,r).then(function(c){c.flipY=!1,c.name=a.name||s.name||"",c.name===""&&typeof s.uri=="string"&&s.uri.startsWith("data:image/")===!1&&(c.name=s.uri);const p=(o.samplers||{})[a.sampler]||{};return c.magFilter=So[p.magFilter]||Yn,c.minFilter=So[p.minFilter]||bi,c.wrapS=Io[p.wrapS]||Kn,c.wrapT=Io[p.wrapT]||Kn,c.generateMipmaps=!c.isCompressedTexture&&c.minFilter!==Ut&&c.minFilter!==Yn,i.associations.set(c,{textures:e}),c}).catch(function(){return null});return this.textureCache[l]=u,u}loadImageSource(e,n){const r=this,i=this.json,o=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(f=>f.clone());const a=i.images[e],s=self.URL||self.webkitURL;let l=a.uri||"",u=!1;if(a.bufferView!==void 0)l=r.getDependency("bufferView",a.bufferView).then(function(f){u=!0;const p=new Blob([f],{type:a.mimeType});return l=s.createObjectURL(p),l});else if(a.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const c=Promise.resolve(l).then(function(f){return new Promise(function(p,d){let y=p;n.isImageBitmapLoader===!0&&(y=function(v){const x=new qn(v);x.needsUpdate=!0,p(x)}),n.load(yn.resolveURL(f,o.path),y,void 0,d)})}).then(function(f){return u===!0&&s.revokeObjectURL(l),wt(f,a),f.userData.mimeType=a.mimeType||fd(a.uri),f}).catch(function(f){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),f});return this.sourceCache[e]=c,c}assignTexture(e,n,r,i){const o=this;return this.getDependency("texture",r.index).then(function(a){if(!a)return null;if(r.texCoord!==void 0&&r.texCoord>0&&(a=a.clone(),a.channel=r.texCoord),o.extensions[pe.KHR_TEXTURE_TRANSFORM]){const s=r.extensions!==void 0?r.extensions[pe.KHR_TEXTURE_TRANSFORM]:void 0;if(s){const l=o.associations.get(a);a=o.extensions[pe.KHR_TEXTURE_TRANSFORM].extendTexture(a,s),o.associations.set(a,l)}}return i!==void 0&&(a.colorSpace=i),e[n]=a,a})}assignFinalMaterial(e){const n=e.geometry;let r=e.material;const i=n.attributes.tangent===void 0,o=n.attributes.color!==void 0,a=n.attributes.normal===void 0;if(e.isPoints){const s="PointsMaterial:"+r.uuid;let l=this.cache.get(s);l||(l=new ru,pr.prototype.copy.call(l,r),l.color.copy(r.color),l.map=r.map,l.sizeAttenuation=!1,this.cache.add(s,l)),r=l}else if(e.isLine){const s="LineBasicMaterial:"+r.uuid;let l=this.cache.get(s);l||(l=new iu,pr.prototype.copy.call(l,r),l.color.copy(r.color),l.map=r.map,this.cache.add(s,l)),r=l}if(i||o||a){let s="ClonedMaterial:"+r.uuid+":";i&&(s+="derivative-tangents:"),o&&(s+="vertex-colors:"),a&&(s+="flat-shading:");let l=this.cache.get(s);l||(l=r.clone(),o&&(l.vertexColors=!0),a&&(l.flatShading=!0),i&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(s,l),this.associations.set(l,this.associations.get(r))),r=l}e.material=r}getMaterialType(){return Xa}loadMaterial(e){const n=this,r=this.json,i=this.extensions,o=r.materials[e];let a;const s={},l=o.extensions||{},u=[];if(l[pe.KHR_MATERIALS_UNLIT]){const f=i[pe.KHR_MATERIALS_UNLIT];a=f.getMaterialType(),u.push(f.extendParams(s,o,n))}else{const f=o.pbrMetallicRoughness||{};if(s.color=new je(1,1,1),s.opacity=1,Array.isArray(f.baseColorFactor)){const p=f.baseColorFactor;s.color.setRGB(p[0],p[1],p[2],kt),s.opacity=p[3]}f.baseColorTexture!==void 0&&u.push(n.assignTexture(s,"map",f.baseColorTexture,An)),s.metalness=f.metallicFactor!==void 0?f.metallicFactor:1,s.roughness=f.roughnessFactor!==void 0?f.roughnessFactor:1,f.metallicRoughnessTexture!==void 0&&(u.push(n.assignTexture(s,"metalnessMap",f.metallicRoughnessTexture)),u.push(n.assignTexture(s,"roughnessMap",f.metallicRoughnessTexture))),a=this._invokeOne(function(p){return p.getMaterialType&&p.getMaterialType(e)}),u.push(Promise.all(this._invokeAll(function(p){return p.extendMaterialParams&&p.extendMaterialParams(e,s)})))}o.doubleSided===!0&&(s.side=ir);const c=o.alphaMode||Sr.OPAQUE;if(c===Sr.BLEND?(s.transparent=!0,s.depthWrite=!1):(s.transparent=!1,c===Sr.MASK&&(s.alphaTest=o.alphaCutoff!==void 0?o.alphaCutoff:.5)),o.normalTexture!==void 0&&a!==Wt&&(u.push(n.assignTexture(s,"normalMap",o.normalTexture)),s.normalScale=new De(1,1),o.normalTexture.scale!==void 0)){const f=o.normalTexture.scale;s.normalScale.set(f,f)}if(o.occlusionTexture!==void 0&&a!==Wt&&(u.push(n.assignTexture(s,"aoMap",o.occlusionTexture)),o.occlusionTexture.strength!==void 0&&(s.aoMapIntensity=o.occlusionTexture.strength)),o.emissiveFactor!==void 0&&a!==Wt){const f=o.emissiveFactor;s.emissive=new je().setRGB(f[0],f[1],f[2],kt)}return o.emissiveTexture!==void 0&&a!==Wt&&u.push(n.assignTexture(s,"emissiveMap",o.emissiveTexture,An)),Promise.all(u).then(function(){const f=new a(s);return o.name&&(f.name=o.name),wt(f,o),n.associations.set(f,{materials:e}),o.extensions&&Ot(i,f,o),f})}createUniqueName(e){const n=Tn.sanitizeNodeName(e||"");return n in this.nodeNamesUsed?n+"_"+ ++this.nodeNamesUsed[n]:(this.nodeNamesUsed[n]=0,n)}loadGeometries(e){const n=this,r=this.extensions,i=this.primitiveCache;function o(s){return r[pe.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(s,n).then(function(l){return Ro(l,s,n)})}const a=[];for(let s=0,l=e.length;s0&&ud(T,o),T.name=n.createUniqueName(o.name||"mesh_"+e),wt(T,o),x.extensions&&Ot(i,T,x),n.assignFinalMaterial(T),f.push(T)}for(let d=0,y=f.length;d1?c=new hr:u.length===1?c=u[0]:c=new wi,c!==u[0])for(let f=0,p=u.length;f{const f=new Map;for(const[p,d]of i.associations)(p instanceof pr||p instanceof qn)&&f.set(p,d);return c.traverse(p=>{const d=i.associations.get(p);d!=null&&f.set(p,d)}),f};return i.associations=u(o),o})}_createAnimationTracks(e,n,r,i,o){const a=[],s=e.name?e.name:e.uuid,l=[];St[o.path]===St.weights?e.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(s);let u;switch(St[o.path]){case St.weights:u=Wi;break;case St.rotation:u=Xi;break;case St.translation:case St.scale:u=Ki;break;default:switch(r.itemSize){case 1:u=Wi;break;case 2:case 3:default:u=Ki;break}break}const c=i.interpolation!==void 0?ad[i.interpolation]:gi,f=this._getArrayFromAccessor(r);for(let p=0,d=l.length;pnew pl(t)),Ft.register(t=>new hl(t)),Ft)}async function md(t){const r=(await _s().loadAsync(t)).userData;if(!r.vrmAnimations){console.warn("No VRM animations found in the .vrma file");return}if(r.vrmAnimations.length===0){console.warn("No VRM animations found in the .vrma file");return}return r.vrmAnimations[0]}async function gd(t,e){if(!t){console.warn("No VRM found");return}if(e)return ml(e,t)}function yd(){const t=W(!1),e=W(0),n=W(0),r=.2,i=1,o=6,a=W(Math.random()*(o-i)+i);function s(l,u){if(l!=null&&l.expressionManager&&(n.value+=u,!t.value&&n.value>=a.value&&(t.value=!0,e.value=0),t.value)){e.value+=u/r;const c=Math.sin(Math.PI*e.value);l.expressionManager.setValue("blink",c),e.value>=1&&(t.value=!1,n.value=0,l.expressionManager.setValue("blink",0),a.value=Math.random()*(o-i)+i)}}return{update:s}}function vd(){let t=-1,e,n=0;function r(){e?e.set(dn(-.25,.25),dn(-.2,.15),-.65):e=new ae(dn(-.25,.25),dn(-.2,.15),-.65)}function i(o,a){var s;!(o!=null&&o.expressionManager)||!o.lookAt||(n>=t?(r(),n=0,t=gl()/1e3):e||r(),o.lookAt.target||(o.lookAt.target=new wi),o.lookAt.target.position.lerp(e,dn(.2,.5)),(s=o.lookAt)==null||s.update(a),n+=a)}return{update:i}}async function xd(t,e){const i=(await _s().loadAsync(t,a=>{var s;return(s=e==null?void 0:e.onProgress)==null?void 0:s.call(e,a)})).userData;if(!i.vrm)return;const o=i.vrm;if(qr.removeUnnecessaryVertices(o.scene),qr.combineSkeletons(o.scene),o.scene.traverse(a=>{a.frustumCulled=!1}),o.lookAt){const a=new yl(o.lookAt);a.name="lookAtQuaternionProxy",o.scene.add(a)}return e!=null&&e.scene&&e.scene.add(o.scene),e!=null&&e.position&&o.scene.position.set(...e.position),o}function bd(t){const e=W(null),n=W(!1),r=W(0),i=W(new Map),o=W(new Map),a=W(),s=(T,M,k)=>T+(M-T)*k,l=T=>T<.5?4*T*T*T:1-(-2*T+2)**3/2,u=new Map([["happy",{expression:[{name:"happy",value:1,duration:.3},{name:"aa",value:.3}],blendDuration:.3}],["sad",{expression:[{name:"sad",value:1},{name:"oh",value:.2}],blendDuration:.3}],["angry",{expression:[{name:"angry",value:1},{name:"ee",value:.4}],blendDuration:.2}],["surprised",{expression:[{name:"Surprised",value:1},{name:"oh",value:.6}],blendDuration:.1}],["neutral",{expression:[{name:"neutral",value:1}],blendDuration:.5}]]),c=()=>{a.value&&(clearTimeout(a.value),a.value=void 0)},f=T=>{var k;if(c(),!u.has(T)){console.warn(`Emotion ${T} not found`);return}const M=u.get(T);if(e.value=T,n.value=!0,r.value=0,t.expressionManager){const C=Object.keys(t.expressionManager.expressionMap);for(const P of C)t.expressionManager.setValue(P,0)}i.value.clear(),o.value.clear();for(const C of M.expression||[]){const P=((k=t.expressionManager)==null?void 0:k.getValue(C.name))||0;i.value.set(C.name,P),o.value.set(C.name,C.value)}};return{currentEmotion:e,isTransitioning:n,setEmotion:f,setEmotionWithResetAfter:(T,M)=>{c(),f(T),a.value=setTimeout(()=>{f("neutral"),a.value=void 0},M)},update:T=>{var C;if(!n.value||!e.value)return;const k=u.get(e.value).blendDuration||.3;r.value+=T/k,r.value>=1&&(r.value=1,n.value=!1);for(const[P,h]of o.value){const I=i.value.get(P)||0,b=s(I,h,l(r.value));(C=t.expressionManager)==null||C.setValue(P,b)}},addEmotionState:(T,M)=>{u.set(T,M)},removeEmotionState:T=>{u.delete(T)},dispose:()=>{c()}}}const wd=ze({__name:"Model",props:{model:null,idleAnimation:null,loadAnimations:null,position:null,paused:{type:Boolean}},emits:["loadModelProgress","error"],setup(t,{expose:e,emit:n}){const r=t,i=n;let o;const a=W(),s=W(),{scene:l}=rr(),{onBeforeRender:u}=Gn(),c=yd(),f=vd(),p=W();Ue(()=>r.position,([v,x,T])=>{a.value&&a.value.scene.position.set(v,x,T)}),wn(async()=>{if(l.value)try{const v=await xd(r.model,{scene:l.value,lookAt:!0,position:r.position,onProgress:M=>i("loadModelProgress",Number.parseFloat((100*(M.loaded/M.total)).toFixed(2)))});if(!v){console.warn("No VRM model loaded");return}const x=await md(r.idleAnimation),T=await gd(v,x);if(!T){console.warn("No VRM animation loaded");return}s.value=new mu(v.scene),s.value.clipAction(T).play(),p.value=bd(v),a.value=v,o=u(({delta:M})=>{var k,C,P;(k=s.value)==null||k.update(M),(C=a.value)==null||C.update(M),c.update(a.value,M),f.update(a.value,M),(P=p.value)==null||P.update(M)}).off}catch(v){i("error",v)}}),Ht(()=>{o==null||o(),a.value&&(a.value.scene.removeFromParent(),qr.deepDispose(a.value.scene))}),e({setExpression(v){var x;(x=p.value)==null||x.setEmotionWithResetAfter(v,1e3)}});const{pause:d,resume:y}=Gn();return Ue(()=>r.paused,v=>{v?d():y()}),(v,x)=>_n(v.$slots,"default")}}),Td=["position"],Ad={absolute:"",bottom:"3",right:"3"},_d={flex:"~ row","cursor-pointer":""},kd=["checked","aria-checked"],Ed={key:0,"min-w":"50vw",z:"{var v;(v=p.value)==null||v.setExpression(y)}}),(y,v)=>(Q(),rn(rs,{relative:""},{default:Ve(({height:x,width:T})=>[Ae(V(gu),{alpha:!0,antialias:!0,width:T,height:x},{default:Ve(()=>[Ae(V(uf)),O("TresPerspectiveCamera",{position:[a.value,s.value,l.value]},null,8,Td),v[14]||(v[14]=O("TresDirectionalLight",{color:16777215,intensity:1.2,position:[1,1,1]},null,-1)),v[15]||(v[15]=O("TresAmbientLight",{color:16777215,intensity:1.5},null,-1)),Ae(wd,{ref_key:"modelRef",ref:p,model:r.model,"idle-animation":r.idleAnimation,position:[u.value,c.value,f.value],paused:r.paused,onLoadModelProgress:v[0]||(v[0]=M=>i("loadModelProgress",M)),onError:v[1]||(v[1]=M=>i("error",M))},null,8,["model","idle-animation","position","paused"])]),_:2},1032,["width","height"]),O("div",Ad,[O("div",_d,[O("label",{class:dt([o.value?"bg-neutral-300 dark:bg-neutral-200":"bg-neutral-100 dark:bg-neutral-700"]),transition:"all ease-in-out duration-500",text:"lg neutral-500 dark:neutral-400","m-1":"","h-fit":"","w-fit":"","cursor-pointer":"","appearance-none":"","gap-1":"","rounded-lg":"","rounded-md":"","border-none":"","p-2":"","outline-none":""},[Ct(O("input",{"onUpdate:modelValue":v[2]||(v[2]=M=>o.value=M),checked:o.value,"aria-checked":o.value,name:"showLive2DViewerInspector",type:"checkbox",hidden:"","appearance-none":"","outline-none":""},null,8,kd),[[hi,o.value]]),v[16]||(v[16]=O("div",{"select-none":""},[O("div",{"i-solar:bug-bold-duotone":""})],-1))],2)]),Ae(ki,null,{default:Ve(()=>[o.value?(Q(),re("div",Ed,[O("div",Md,[O("div",Sd,[O("span",null,me(V(d)("stage.viewers.debug-menu.vrm.model.title")),1)]),Ae(Ji,{"h-fit":"","w-full":"",flex:"~ col",border:"~ gray/25 rounded-lg",divide:"y dashed gray/25","of-clip":"","shadow-sm":""},{label:Ve(()=>[O("span",Id,me(V(d)("stage.viewers.debug-menu.vrm.camera")),1)]),default:Ve(()=>[O("div",Rd,[v[17]||(v[17]=O("div",{text:"neutral-400 dark:neutral-500"},[O("span",null,"X")],-1)),O("label",Cd,[Ae(Yt,{modelValue:a.value,"onUpdate:modelValue":v[3]||(v[3]=M=>a.value=M),min:-10,max:10,step:.01},null,8,["modelValue"])]),O("div",Nd,[O("span",null,me(a.value),1)]),v[18]||(v[18]=O("div",{text:"neutral-400 dark:neutral-500"},[O("span",null,"Y")],-1)),O("label",Ld,[Ae(Yt,{modelValue:s.value,"onUpdate:modelValue":v[4]||(v[4]=M=>s.value=M),min:-10,max:10,step:.01},null,8,["modelValue"])]),O("div",Pd,[O("span",null,me(s.value),1)]),v[19]||(v[19]=O("div",{text:"neutral-400 dark:neutral-500"},[O("span",null,"Z")],-1)),O("label",Dd,[Ae(Yt,{modelValue:l.value,"onUpdate:modelValue":v[5]||(v[5]=M=>l.value=M),min:-10,max:10,step:.01},null,8,["modelValue"])]),O("div",Od,[O("span",null,me(l.value),1)])])]),_:1}),Ae(Ji,{"h-fit":"","w-full":"",flex:"~ col",border:"~ gray/25 rounded-lg",divide:"y dashed gray/25","of-clip":"","shadow-sm":""},{label:Ve(()=>[O("span",Fd,me(V(d)("stage.viewers.debug-menu.vrm.model.title")),1)]),default:Ve(()=>[O("div",Bd,[v[20]||(v[20]=O("div",{text:"neutral-400 dark:neutral-500"},[O("span",null,"X")],-1)),O("label",zd,[Ae(Yt,{modelValue:u.value,"onUpdate:modelValue":v[6]||(v[6]=M=>u.value=M),min:-10,max:10,step:.01},null,8,["modelValue"])]),O("div",Ud,[O("span",null,me(u.value),1)]),v[21]||(v[21]=O("div",{text:"neutral-400 dark:neutral-500"},[O("span",null,"Y")],-1)),O("label",jd,[Ae(Yt,{modelValue:c.value,"onUpdate:modelValue":v[7]||(v[7]=M=>c.value=M),min:-10,max:10,step:.01},null,8,["modelValue"])]),O("div",Vd,[O("span",null,me(c.value),1)]),v[22]||(v[22]=O("div",{text:"neutral-400 dark:neutral-500"},[O("span",null,"Z")],-1)),O("label",Hd,[Ae(Yt,{modelValue:f.value,"onUpdate:modelValue":v[8]||(v[8]=M=>f.value=M),min:-10,max:10,step:.01},null,8,["modelValue"])]),O("div",Gd,[O("span",null,me(f.value),1)])])]),_:1}),O("div",$d,[O("span",null,me(V(d)("stage.viewers.debug-menu.emotions")),1)]),O("div",qd,[O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:v[9]||(v[9]=M=>{var k;return(k=p.value)==null?void 0:k.setExpression("neutral")})},me(V(d)("stage.viewers.debug-menu.emotions-btn.neutral")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:v[10]||(v[10]=M=>{var k;return(k=p.value)==null?void 0:k.setExpression("surprised")})},me(V(d)("stage.viewers.debug-menu.emotions-btn.surprised")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:v[11]||(v[11]=M=>{var k;return(k=p.value)==null?void 0:k.setExpression("sad")})},me(V(d)("stage.viewers.debug-menu.emotions-btn.sad")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:v[12]||(v[12]=M=>{var k;return(k=p.value)==null?void 0:k.setExpression("angry")})},me(V(d)("stage.viewers.debug-menu.emotions-btn.angry")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:v[13]||(v[13]=M=>{var k;return(k=p.value)==null?void 0:k.setExpression("happy")})},me(V(d)("stage.viewers.debug-menu.emotions-btn.happy")),1)])])])):ut("",!0)]),_:1})])]),_:1}))}}),Xe=Symbol.for("drizzle:entityKind");function ot(t,e){if(!t||typeof t!="object")return!1;if(t instanceof e)return!0;if(!Object.prototype.hasOwnProperty.call(e,Xe))throw new Error(`Class "${e.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 n=Object.getPrototypeOf(t).constructor;if(n)for(;n;){if(Xe in n&&n[Xe]===e[Xe])return!0;n=Object.getPrototypeOf(n)}return!1}var ma;ma=Xe;class Ii{constructor(e,n){le(this,"name");le(this,"keyAsName");le(this,"primary");le(this,"notNull");le(this,"default");le(this,"defaultFn");le(this,"onUpdateFn");le(this,"hasDefault");le(this,"isUnique");le(this,"uniqueName");le(this,"uniqueType");le(this,"dataType");le(this,"columnType");le(this,"enumValues");le(this,"generated");le(this,"generatedIdentity");le(this,"config");this.table=e,this.config=n,this.name=n.name,this.keyAsName=n.keyAsName,this.notNull=n.notNull,this.default=n.default,this.defaultFn=n.defaultFn,this.onUpdateFn=n.onUpdateFn,this.hasDefault=n.hasDefault,this.primary=n.primaryKey,this.isUnique=n.isUnique,this.uniqueName=n.uniqueName,this.uniqueType=n.uniqueType,this.dataType=n.dataType,this.columnType=n.columnType,this.generated=n.generated,this.generatedIdentity=n.generatedIdentity}mapFromDriverValue(e){return e}mapToDriverValue(e){return e}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!=="byDefault"}}le(Ii,ma,"Column");const Rr=Symbol.for("drizzle:Name"),Co=Symbol.for("drizzle:isPgEnum");function Kd(t){return!!t&&typeof t=="function"&&Co in t&&t[Co]===!0}var ga;ga=Xe;class Ri{constructor(e,n,r,i=!1){this._={brand:"Subquery",sql:e,selectedFields:n,alias:r,isWith:i}}}le(Ri,ga,"Subquery");const Wd={startActiveSpan(t,e){return e()}},vn=Symbol.for("drizzle:ViewBaseConfig"),Cr=Symbol.for("drizzle:Schema"),No=Symbol.for("drizzle:Columns"),Lo=Symbol.for("drizzle:ExtraConfigColumns"),Nr=Symbol.for("drizzle:OriginalName"),Lr=Symbol.for("drizzle:BaseName"),Xn=Symbol.for("drizzle:IsAlias"),Po=Symbol.for("drizzle:ExtraConfigBuilder"),Xd=Symbol.for("drizzle:IsDrizzleTable");var ya,va,xa,ba,wa,Ta,Aa,_a,ka,Ea;Ea=Xe,ka=Rr,_a=Nr,Aa=Cr,Ta=No,wa=Lo,ba=Lr,xa=Xn,va=Xd,ya=Po;class At{constructor(e,n,r){le(this,ka);le(this,_a);le(this,Aa);le(this,Ta);le(this,wa);le(this,ba);le(this,xa,!1);le(this,va,!0);le(this,ya);this[Rr]=this[Nr]=e,this[Cr]=n,this[Lr]=r}}le(At,Ea,"Table"),le(At,"Symbol",{Name:Rr,Schema:Cr,OriginalName:Nr,Columns:No,ExtraConfigColumns:Lo,BaseName:Lr,IsAlias:Xn,ExtraConfigBuilder:Po});function Qd(t){return t!=null&&typeof t.getSQL=="function"}function Zd(t){var n;const e={sql:"",params:[]};for(const r of t)e.sql+=r.sql,e.params.push(...r.params),(n=r.typings)!=null&&n.length&&(e.typings||(e.typings=[]),e.typings.push(...r.typings));return e}var Ma;Ma=Xe;class st{constructor(e){le(this,"value");this.value=Array.isArray(e)?e:[e]}getSQL(){return new Be([this])}}le(st,Ma,"StringChunk");var Sa;Sa=Xe;const Bt=class Bt{constructor(e){le(this,"decoder",ks);le(this,"shouldInlineParams",!1);this.queryChunks=e}append(e){return this.queryChunks.push(...e.queryChunks),this}toQuery(e){return Wd.startActiveSpan("drizzle.buildSQL",n=>{const r=this.buildQueryFromSourceParams(this.queryChunks,e);return n==null||n.setAttributes({"drizzle.query.text":r.sql,"drizzle.query.params":JSON.stringify(r.params)}),r})}buildQueryFromSourceParams(e,n){const r=Object.assign({},n,{inlineParams:n.inlineParams||this.shouldInlineParams,paramStartIndex:n.paramStartIndex||{value:0}}),{casing:i,escapeName:o,escapeParam:a,prepareTyping:s,inlineParams:l,paramStartIndex:u}=r;return Zd(e.map(c=>{var f;if(ot(c,st))return{sql:c.value.join(""),params:[]};if(ot(c,Qn))return{sql:o(c.value),params:[]};if(c===void 0)return{sql:"",params:[]};if(Array.isArray(c)){const p=[new st("(")];for(const[d,y]of c.entries())p.push(y),dt},Es={mapToDriverValue:t=>t};({...ks,...Es});var Ra;Ra=Xe;class Ci{constructor(e,n=Es){le(this,"brand");this.value=e,this.encoder=n}getSQL(){return new Be([this])}}le(Ci,Ra,"Param");function ri(t,...e){const n=[];(e.length>0||t.length>0&&t[0]!=="")&&n.push(new st(t[0]));for(const[r,i]of e.entries())n.push(i,new st(t[r+1]));return new Be(n)}(t=>{function e(){return new Be([])}t.empty=e;function n(l){return new Be(l)}t.fromList=n;function r(l){return new Be([new st(l)])}t.raw=r;function i(l,u){const c=[];for(const[f,p]of l.entries())f>0&&u!==void 0&&c.push(u),c.push(p);return new Be(c)}t.join=i;function o(l){return new Qn(l)}t.identifier=o;function a(l){return new Zn(l)}t.placeholder=a;function s(l,u){return new Ci(l,u)}t.param=s})(ri||(ri={}));(t=>{var n;n=Xe;const r=class r{constructor(o,a){le(this,"isSelectionField",!1);this.sql=o,this.fieldAlias=a}getSQL(){return this.sql}clone(){return new r(this.sql,this.fieldAlias)}};le(r,n,"SQL.Aliased");let e=r;t.Aliased=e})(Be||(Be={}));var Ca;Ca=Xe;class Zn{constructor(e){this.name=e}getSQL(){return new Be([this])}}le(Zn,Ca,"Placeholder");const Jd=Symbol.for("drizzle:IsDrizzleView");var Na,La,Pa;Pa=Xe,La=vn,Na=Jd;class Ms{constructor({name:e,schema:n,selectedFields:r,query:i}){le(this,La);le(this,Na,!0);this[vn]={name:e,originalName:e,schema:n,selectedFields:r,query:i,isExisting:!i,isAlias:!1}}getSQL(){return new Be([this])}}le(Ms,Pa,"View");Ii.prototype.getSQL=function(){return new Be([this])};At.prototype.getSQL=function(){return new Be([this])};Ri.prototype.getSQL=function(){return new Be([this])};const ep=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Sn{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}}Sn.prototype.normal={};Sn.prototype.property={};Sn.prototype.space=void 0;function Ss(t,e){const n={},r={};for(const i of t)Object.assign(n,i.property),Object.assign(r,i.normal);return new Sn(n,r,e)}function ii(t){return t.toLowerCase()}class Ze{constructor(e,n){this.attribute=n,this.property=e}}Ze.prototype.attribute="";Ze.prototype.booleanish=!1;Ze.prototype.boolean=!1;Ze.prototype.commaOrSpaceSeparated=!1;Ze.prototype.commaSeparated=!1;Ze.prototype.defined=!1;Ze.prototype.mustUseProperty=!1;Ze.prototype.number=!1;Ze.prototype.overloadedBoolean=!1;Ze.prototype.property="";Ze.prototype.spaceSeparated=!1;Ze.prototype.space=void 0;let tp=0;const fe=Gt(),Pe=Gt(),Is=Gt(),$=Gt(),Ce=Gt(),en=Gt(),tt=Gt();function Gt(){return 2**++tp}const oi=Object.freeze(Object.defineProperty({__proto__:null,boolean:fe,booleanish:Pe,commaOrSpaceSeparated:tt,commaSeparated:en,number:$,overloadedBoolean:Is,spaceSeparated:Ce},Symbol.toStringTag,{value:"Module"})),Pr=Object.keys(oi);class Ni extends Ze{constructor(e,n,r,i){let o=-1;if(super(e,n),Do(this,"space",i),typeof r=="number")for(;++o4&&n.slice(0,4)==="data"&&op.test(e)){if(e.charAt(4)==="-"){const o=e.slice(5).replace(Oo,lp);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=e.slice(4);if(!Oo.test(o)){let a=o.replace(ip,sp);a.charAt(0)!=="-"&&(a="-"+a),e="data"+a}}i=Ni}return new i(r,e)}function sp(t){return"-"+t.toLowerCase()}function lp(t){return t.charAt(1).toUpperCase()}const up=Ss([Rs,np,Ls,Ps,Ds],"html"),Os=Ss([Rs,rp,Ls,Ps,Ds],"svg"),Fo={}.hasOwnProperty;function cp(t,e){const n=e||{};function r(i,...o){let a=r.invalid;const s=r.handlers;if(i&&Fo.call(i,t)){const l=String(i[t]);a=Fo.call(s,l)?s[l]:r.unknown}if(a)return a.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const fp=/^>|^->||--!>|"],pp=["<",">"];function hp(t,e,n,r){return r.settings.bogusComments?"":"";function i(o){return Zt(o,Object.assign({},r.settings.characterReferences,{subset:pp}))}}function mp(t,e,n,r){return""}function gp(t,e){const n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function yp(t){return t.join(" ").trim()}const vp=/[ \t\n\f\r]/g;function Li(t){return typeof t=="object"?t.type==="text"?Bo(t.value):!1:Bo(t)}function Bo(t){return t.replace(vp,"")===""}const Oe=Bs(1),Fs=Bs(-1),xp=[];function Bs(t){return e;function e(n,r,i){const o=n?n.children:xp;let a=(r||0)+t,s=o[a];if(!i)for(;s&&Li(s);)a+=t,s=o[a];return s}}const bp={}.hasOwnProperty;function zs(t){return e;function e(n,r,i){return bp.call(t,n.tagName)&&t[n.tagName](n,r,i)}}const Pi=zs({body:Tp,caption:Dr,colgroup:Dr,dd:Ep,dt:kp,head:Dr,html:wp,li:_p,optgroup:Mp,option:Sp,p:Ap,rp:zo,rt:zo,tbody:Rp,td:Uo,tfoot:Cp,th:Uo,thead:Ip,tr:Np});function Dr(t,e,n){const r=Oe(n,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&Li(r.value.charAt(0)))}function wp(t,e,n){const r=Oe(n,e);return!r||r.type!=="comment"}function Tp(t,e,n){const r=Oe(n,e);return!r||r.type!=="comment"}function Ap(t,e,n){const r=Oe(n,e);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function _p(t,e,n){const r=Oe(n,e);return!r||r.type==="element"&&r.tagName==="li"}function kp(t,e,n){const r=Oe(n,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function Ep(t,e,n){const r=Oe(n,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function zo(t,e,n){const r=Oe(n,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function Mp(t,e,n){const r=Oe(n,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function Sp(t,e,n){const r=Oe(n,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function Ip(t,e,n){const r=Oe(n,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function Rp(t,e,n){const r=Oe(n,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function Cp(t,e,n){return!Oe(n,e)}function Np(t,e,n){const r=Oe(n,e);return!r||r.type==="element"&&r.tagName==="tr"}function Uo(t,e,n){const r=Oe(n,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const Lp=zs({body:Op,colgroup:Fp,head:Dp,html:Pp,tbody:Bp});function Pp(t){const e=Oe(t,-1);return!e||e.type!=="comment"}function Dp(t){const e=new Set;for(const r of t.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(e.has(r.tagName))return!1;e.add(r.tagName)}const n=t.children[0];return!n||n.type==="element"}function Op(t){const e=Oe(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&Li(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function Fp(t,e,n){const r=Fs(n,e),i=Oe(t,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&Pi(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function Bp(t,e,n){const r=Fs(n,e),i=Oe(t,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&Pi(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const Fn={name:[[` -\f\r &/=>`.split(""),` -\f\r "&'/=>\``.split("")],[`\0 -\f\r "&'/<=>`.split(""),`\0 -\f\r "&'/<=>\``.split("")]],unquoted:[[` -\f\r &>`.split(""),`\0 -\f\r "&'<=>\``.split("")],[`\0 -\f\r "&'<=>\``.split(""),`\0 -\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function zp(t,e,n,r){const i=r.schema,o=i.space==="svg"?!1:r.settings.omitOptionalTags;let a=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(t.tagName.toLowerCase());const s=[];let l;i.space==="html"&&t.tagName==="svg"&&(r.schema=Os);const u=Up(r,t.properties),c=r.all(i.space==="html"&&t.tagName==="template"?t.content:t);return r.schema=i,c&&(a=!1),(u||!o||!Lp(t,e,n))&&(s.push("<",t.tagName,u?" "+u:""),a&&(i.space==="svg"||r.settings.closeSelfClosing)&&(l=u.charAt(u.length-1),(!r.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&s.push(" "),s.push("/")),s.push(">")),s.push(c),!a&&(!o||!Pi(t,e,n))&&s.push(""),s.join("")}function Up(t,e){const n=[];let r=-1,i;if(e){for(i in e)if(e[i]!==null&&e[i]!==void 0){const o=jp(t,i,e[i]);o&&n.push(o)}}for(;++rZi(n,t.alternative)&&(a=t.alternative),s=a+Zt(n,Object.assign({},t.settings.characterReferences,{subset:(a==="'"?Fn.single:Fn.double)[i][o],attribute:!0}))+a),l+(s&&"="+s))}const Vp=["<","&"];function Us(t,e,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?t.value:Zt(t.value,Object.assign({},r.settings.characterReferences,{subset:Vp}))}function Hp(t,e,n,r){return r.settings.allowDangerousHtml?t.value:Us(t,e,n,r)}function Gp(t,e,n,r){return r.all(t)}const $p=cp("type",{invalid:qp,unknown:Yp,handlers:{comment:hp,doctype:mp,element:zp,raw:Hp,root:Gp,text:Us}});function qp(t){throw new Error("Expected node, not `"+t+"`")}function Yp(t){const e=t;throw new Error("Cannot compile unknown node `"+e.type+"`")}const Kp={},Wp={},Xp=[];function Qp(t,e){const n=e||Kp,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Zp,all:Jp,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||ep,characterReferences:n.characterReferences||Wp,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?Os:up,quote:r,alternative:i}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function Zp(t,e,n){return $p(t,e,n,this)}function Jp(t){const e=[],n=t&&t.children||Xp;let r=-1;for(;++ri?0:i+e:e=e>i?i:e,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(e,n),t.splice(...a);else for(n&&t.splice(e,n);o0?(mt(t,t.length,0,e),t):e}const Ho={}.hasOwnProperty;function ih(t){const e={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function tn(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ht=Dt(/[A-Za-z]/),rt=Dt(/[\dA-Za-z]/),sh=Dt(/[#-'*+\--9=?A-Z^-~]/);function ai(t){return t!==null&&(t<32||t===127)}const si=Dt(/\d/),lh=Dt(/[\dA-Fa-f]/),uh=Dt(/[!-/:-@[-`{-~]/);function se(t){return t!==null&&t<-2}function Qe(t){return t!==null&&(t<0||t===32)}function Ee(t){return t===-2||t===-1||t===32}const ch=Dt(new RegExp("\\p{P}|\\p{S}","u")),fh=Dt(/\s/);function Dt(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function sn(t){const e=[];let n=-1,r=0,i=0;for(;++n55295&&o<57344){const s=t.charCodeAt(n+1);o<56320&&s>56319&&s<57344?(a=String.fromCharCode(o,s),i=1):a="�"}else a=String.fromCharCode(o);a&&(e.push(t.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return e.join("")+t.slice(r)}function Ne(t,e,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(l){return Ee(l)?(t.enter(n),s(l)):e(l)}function s(l){return Ee(l)&&o++a))return;const I=e.events.length;let b=I,g,m;for(;b--;)if(e.events[b][0]==="exit"&&e.events[b][1].type==="chunkFlow"){if(g){m=e.events[b][1].end;break}g=!0}for(T(r),h=I;hk;){const P=n[C];e.containerState=P[1],P[0].exit.call(e,t)}n.length=k}function M(){i.write([null]),o=void 0,i=void 0,e.containerState._closeFlow=void 0}}function gh(t,e,n){return Ne(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function $o(t){if(t===null||Qe(t)||fh(t))return 1;if(ch(t))return 2}function Oi(t,e,n){const r=[];let i=-1;for(;++i1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const f={...t[r][1].end},p={...t[n][1].start};qo(f,-l),qo(p,l),a={type:l>1?"strongSequence":"emphasisSequence",start:f,end:{...t[r][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...t[n][1].start},end:p},o={type:l>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...a.start},end:{...s.end}},t[r][1].end={...a.start},t[n][1].start={...s.end},u=[],t[r][1].end.offset-t[r][1].start.offset&&(u=lt(u,[["enter",t[r][1],e],["exit",t[r][1],e]])),u=lt(u,[["enter",i,e],["enter",a,e],["exit",a,e],["enter",o,e]]),u=lt(u,Oi(e.parser.constructs.insideSpan.null,t.slice(r+1,n),e)),u=lt(u,[["exit",o,e],["enter",s,e],["exit",s,e],["exit",i,e]]),t[n][1].end.offset-t[n][1].start.offset?(c=2,u=lt(u,[["enter",t[n][1],e],["exit",t[n][1],e]])):c=0,mt(t,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n0&&Ee(h)?Ne(t,M,"linePrefix",o+1)(h):M(h)}function M(h){return h===null||se(h)?t.check(Yo,v,C)(h):(t.enter("codeFlowValue"),k(h))}function k(h){return h===null||se(h)?(t.exit("codeFlowValue"),M(h)):(t.consume(h),k)}function C(h){return t.exit("codeFenced"),e(h)}function P(h,I,b){let g=0;return m;function m(F){return h.enter("lineEnding"),h.consume(F),h.exit("lineEnding"),A}function A(F){return h.enter("codeFencedFence"),Ee(F)?Ne(h,S,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):S(F)}function S(F){return F===s?(h.enter("codeFencedFenceSequence"),B(F)):b(F)}function B(F){return F===s?(g++,h.consume(F),B):g>=a?(h.exit("codeFencedFenceSequence"),Ee(F)?Ne(h,D,"whitespace")(F):D(F)):b(F)}function D(F){return F===null||se(F)?(h.exit("codeFencedFence"),I(F)):b(F)}}}function Sh(t,e,n){const r=this;return i;function i(a){return a===null?n(a):(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?n(a):e(a)}}const Or={name:"codeIndented",tokenize:Rh},Ih={partial:!0,tokenize:Ch};function Rh(t,e,n){const r=this;return i;function i(u){return t.enter("codeIndented"),Ne(t,o,"linePrefix",5)(u)}function o(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?l(u):se(u)?t.attempt(Ih,a,l)(u):(t.enter("codeFlowValue"),s(u))}function s(u){return u===null||se(u)?(t.exit("codeFlowValue"),a(u)):(t.consume(u),s)}function l(u){return t.exit("codeIndented"),e(u)}}function Ch(t,e,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):se(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),i):Ne(t,o,"linePrefix",5)(a)}function o(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?e(a):se(a)?i(a):n(a)}}const Nh={name:"codeText",previous:Ph,resolve:Lh,tokenize:Dh};function Lh(t){let e=t.length-4,n=3,r,i;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(r=n;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return ethis.left.length)return this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse();const i=this.left.slice(e);return i.push(...this.right.slice(this.right.length-r+this.left.length).reverse()),i}splice(e,n,r){const i=n||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&hn(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),hn(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),hn(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e=4?e(a):t.interrupt(r.parser.constructs.flow,n,e)(a)}}function Ys(t,e,n,r,i,o,a,s,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return f;function f(T){return T===60?(t.enter(r),t.enter(i),t.enter(o),t.consume(T),t.exit(o),p):T===null||T===32||T===41||ai(T)?n(T):(t.enter(r),t.enter(a),t.enter(s),t.enter("chunkString",{contentType:"string"}),v(T))}function p(T){return T===62?(t.enter(o),t.consume(T),t.exit(o),t.exit(i),t.exit(r),e):(t.enter(s),t.enter("chunkString",{contentType:"string"}),d(T))}function d(T){return T===62?(t.exit("chunkString"),t.exit(s),p(T)):T===null||T===60||se(T)?n(T):(t.consume(T),T===92?y:d)}function y(T){return T===60||T===62||T===92?(t.consume(T),d):d(T)}function v(T){return!c&&(T===null||T===41||Qe(T))?(t.exit("chunkString"),t.exit(s),t.exit(a),t.exit(r),e(T)):c999||d===null||d===91||d===93&&!l||d===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):d===93?(t.exit(o),t.enter(i),t.consume(d),t.exit(i),t.exit(r),e):se(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),c):(t.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===null||d===91||d===93||se(d)||s++>999?(t.exit("chunkString"),c(d)):(t.consume(d),l||(l=!Ee(d)),d===92?p:f)}function p(d){return d===91||d===92||d===93?(t.consume(d),s++,f):f(d)}}function Ws(t,e,n,r,i,o){let a;return s;function s(p){return p===34||p===39||p===40?(t.enter(r),t.enter(i),t.consume(p),t.exit(i),a=p===40?41:p,l):n(p)}function l(p){return p===a?(t.enter(i),t.consume(p),t.exit(i),t.exit(r),e):(t.enter(o),u(p))}function u(p){return p===a?(t.exit(o),l(a)):p===null?n(p):se(p)?(t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),Ne(t,u,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===a||p===null||se(p)?(t.exit("chunkString"),u(p)):(t.consume(p),p===92?f:c)}function f(p){return p===a||p===92?(t.consume(p),c):c(p)}}function xn(t,e){let n;return r;function r(i){return se(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),n=!0,r):Ee(i)?Ne(t,r,n?"linePrefix":"lineSuffix")(i):e(i)}}const Hh={name:"definition",tokenize:$h},Gh={partial:!0,tokenize:qh};function $h(t,e,n){const r=this;let i;return o;function o(d){return t.enter("definition"),a(d)}function a(d){return Ks.call(r,t,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function s(d){return i=tn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(t.enter("definitionMarker"),t.consume(d),t.exit("definitionMarker"),l):n(d)}function l(d){return Qe(d)?xn(t,u)(d):u(d)}function u(d){return Ys(t,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function c(d){return t.attempt(Gh,f,f)(d)}function f(d){return Ee(d)?Ne(t,p,"whitespace")(d):p(d)}function p(d){return d===null||se(d)?(t.exit("definition"),r.parser.defined.push(i),e(d)):n(d)}}function qh(t,e,n){return r;function r(s){return Qe(s)?xn(t,i)(s):n(s)}function i(s){return Ws(t,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return Ee(s)?Ne(t,a,"whitespace")(s):a(s)}function a(s){return s===null||se(s)?e(s):n(s)}}const Yh={name:"hardBreakEscape",tokenize:Kh};function Kh(t,e,n){return r;function r(o){return t.enter("hardBreakEscape"),t.consume(o),i}function i(o){return se(o)?(t.exit("hardBreakEscape"),e(o)):n(o)}}const Wh={name:"headingAtx",resolve:Xh,tokenize:Qh};function Xh(t,e){let n=t.length-2,r=3,i,o;return t[r][1].type==="whitespace"&&(r+=2),n-2>r&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&t[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:t[r][1].start,end:t[n][1].end},o={type:"chunkText",start:t[r][1].start,end:t[n][1].end,contentType:"text"},mt(t,r,n-r+1,[["enter",i,e],["enter",o,e],["exit",o,e],["exit",i,e]])),t}function Qh(t,e,n){let r=0;return i;function i(c){return t.enter("atxHeading"),o(c)}function o(c){return t.enter("atxHeadingSequence"),a(c)}function a(c){return c===35&&r++<6?(t.consume(c),a):c===null||Qe(c)?(t.exit("atxHeadingSequence"),s(c)):n(c)}function s(c){return c===35?(t.enter("atxHeadingSequence"),l(c)):c===null||se(c)?(t.exit("atxHeading"),e(c)):Ee(c)?Ne(t,s,"whitespace")(c):(t.enter("atxHeadingText"),u(c))}function l(c){return c===35?(t.consume(c),l):(t.exit("atxHeadingSequence"),s(c))}function u(c){return c===null||c===35||Qe(c)?(t.exit("atxHeadingText"),s(c)):(t.consume(c),u)}}const Zh=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Wo=["pre","script","style","textarea"],Jh={concrete:!0,name:"htmlFlow",resolveTo:nm,tokenize:rm},em={partial:!0,tokenize:om},tm={partial:!0,tokenize:im};function nm(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function rm(t,e,n){const r=this;let i,o,a,s,l;return u;function u(R){return c(R)}function c(R){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(R),f}function f(R){return R===33?(t.consume(R),p):R===47?(t.consume(R),o=!0,v):R===63?(t.consume(R),i=3,r.interrupt?e:_):ht(R)?(t.consume(R),a=String.fromCharCode(R),x):n(R)}function p(R){return R===45?(t.consume(R),i=2,d):R===91?(t.consume(R),i=5,s=0,y):ht(R)?(t.consume(R),i=4,r.interrupt?e:_):n(R)}function d(R){return R===45?(t.consume(R),r.interrupt?e:_):n(R)}function y(R){const ye="CDATA[";return R===ye.charCodeAt(s++)?(t.consume(R),s===ye.length?r.interrupt?e:S:y):n(R)}function v(R){return ht(R)?(t.consume(R),a=String.fromCharCode(R),x):n(R)}function x(R){if(R===null||R===47||R===62||Qe(R)){const ye=R===47,_e=a.toLowerCase();return!ye&&!o&&Wo.includes(_e)?(i=1,r.interrupt?e(R):S(R)):Zh.includes(a.toLowerCase())?(i=6,ye?(t.consume(R),T):r.interrupt?e(R):S(R)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(R):o?M(R):k(R))}return R===45||rt(R)?(t.consume(R),a+=String.fromCharCode(R),x):n(R)}function T(R){return R===62?(t.consume(R),r.interrupt?e:S):n(R)}function M(R){return Ee(R)?(t.consume(R),M):m(R)}function k(R){return R===47?(t.consume(R),m):R===58||R===95||ht(R)?(t.consume(R),C):Ee(R)?(t.consume(R),k):m(R)}function C(R){return R===45||R===46||R===58||R===95||rt(R)?(t.consume(R),C):P(R)}function P(R){return R===61?(t.consume(R),h):Ee(R)?(t.consume(R),P):k(R)}function h(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(t.consume(R),l=R,I):Ee(R)?(t.consume(R),h):b(R)}function I(R){return R===l?(t.consume(R),l=null,g):R===null||se(R)?n(R):(t.consume(R),I)}function b(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||Qe(R)?P(R):(t.consume(R),b)}function g(R){return R===47||R===62||Ee(R)?k(R):n(R)}function m(R){return R===62?(t.consume(R),A):n(R)}function A(R){return R===null||se(R)?S(R):Ee(R)?(t.consume(R),A):n(R)}function S(R){return R===45&&i===2?(t.consume(R),j):R===60&&i===1?(t.consume(R),J):R===62&&i===4?(t.consume(R),ee):R===63&&i===3?(t.consume(R),_):R===93&&i===5?(t.consume(R),Z):se(R)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(em,ge,B)(R)):R===null||se(R)?(t.exit("htmlFlowData"),B(R)):(t.consume(R),S)}function B(R){return t.check(tm,D,ge)(R)}function D(R){return t.enter("lineEnding"),t.consume(R),t.exit("lineEnding"),F}function F(R){return R===null||se(R)?B(R):(t.enter("htmlFlowData"),S(R))}function j(R){return R===45?(t.consume(R),_):S(R)}function J(R){return R===47?(t.consume(R),a="",oe):S(R)}function oe(R){if(R===62){const ye=a.toLowerCase();return Wo.includes(ye)?(t.consume(R),ee):S(R)}return ht(R)&&a.length<8?(t.consume(R),a+=String.fromCharCode(R),oe):S(R)}function Z(R){return R===93?(t.consume(R),_):S(R)}function _(R){return R===62?(t.consume(R),ee):R===45&&i===2?(t.consume(R),_):S(R)}function ee(R){return R===null||se(R)?(t.exit("htmlFlowData"),ge(R)):(t.consume(R),ee)}function ge(R){return t.exit("htmlFlow"),e(R)}}function im(t,e,n){const r=this;return i;function i(a){return se(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),o):n(a)}function o(a){return r.parser.lazy[r.now().line]?n(a):e(a)}}function om(t,e,n){return r;function r(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(lr,e,n)}}const am={name:"htmlText",tokenize:sm};function sm(t,e,n){const r=this;let i,o,a;return s;function s(_){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(_),l}function l(_){return _===33?(t.consume(_),u):_===47?(t.consume(_),P):_===63?(t.consume(_),k):ht(_)?(t.consume(_),b):n(_)}function u(_){return _===45?(t.consume(_),c):_===91?(t.consume(_),o=0,y):ht(_)?(t.consume(_),M):n(_)}function c(_){return _===45?(t.consume(_),d):n(_)}function f(_){return _===null?n(_):_===45?(t.consume(_),p):se(_)?(a=f,J(_)):(t.consume(_),f)}function p(_){return _===45?(t.consume(_),d):f(_)}function d(_){return _===62?j(_):_===45?p(_):f(_)}function y(_){const ee="CDATA[";return _===ee.charCodeAt(o++)?(t.consume(_),o===ee.length?v:y):n(_)}function v(_){return _===null?n(_):_===93?(t.consume(_),x):se(_)?(a=v,J(_)):(t.consume(_),v)}function x(_){return _===93?(t.consume(_),T):v(_)}function T(_){return _===62?j(_):_===93?(t.consume(_),T):v(_)}function M(_){return _===null||_===62?j(_):se(_)?(a=M,J(_)):(t.consume(_),M)}function k(_){return _===null?n(_):_===63?(t.consume(_),C):se(_)?(a=k,J(_)):(t.consume(_),k)}function C(_){return _===62?j(_):k(_)}function P(_){return ht(_)?(t.consume(_),h):n(_)}function h(_){return _===45||rt(_)?(t.consume(_),h):I(_)}function I(_){return se(_)?(a=I,J(_)):Ee(_)?(t.consume(_),I):j(_)}function b(_){return _===45||rt(_)?(t.consume(_),b):_===47||_===62||Qe(_)?g(_):n(_)}function g(_){return _===47?(t.consume(_),j):_===58||_===95||ht(_)?(t.consume(_),m):se(_)?(a=g,J(_)):Ee(_)?(t.consume(_),g):j(_)}function m(_){return _===45||_===46||_===58||_===95||rt(_)?(t.consume(_),m):A(_)}function A(_){return _===61?(t.consume(_),S):se(_)?(a=A,J(_)):Ee(_)?(t.consume(_),A):g(_)}function S(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(t.consume(_),i=_,B):se(_)?(a=S,J(_)):Ee(_)?(t.consume(_),S):(t.consume(_),D)}function B(_){return _===i?(t.consume(_),i=void 0,F):_===null?n(_):se(_)?(a=B,J(_)):(t.consume(_),B)}function D(_){return _===null||_===34||_===39||_===60||_===61||_===96?n(_):_===47||_===62||Qe(_)?g(_):(t.consume(_),D)}function F(_){return _===47||_===62||Qe(_)?g(_):n(_)}function j(_){return _===62?(t.consume(_),t.exit("htmlTextData"),t.exit("htmlText"),e):n(_)}function J(_){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(_),t.exit("lineEnding"),oe}function oe(_){return Ee(_)?Ne(t,Z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):Z(_)}function Z(_){return t.enter("htmlTextData"),a(_)}}const Fi={name:"labelEnd",resolveAll:fm,resolveTo:dm,tokenize:pm},lm={tokenize:hm},um={tokenize:mm},cm={tokenize:gm};function fm(t){let e=-1;const n=[];for(;++e=3&&(u===null||se(u))?(t.exit("thematicBreak"),e(u)):n(u)}function l(u){return u===i?(t.consume(u),r++,l):(t.exit("thematicBreakSequence"),Ee(u)?Ne(t,s,"whitespace")(u):s(u))}}const Ke={continuation:{tokenize:Em},exit:Sm,name:"list",tokenize:km},Am={partial:!0,tokenize:Im},_m={partial:!0,tokenize:Mm};function km(t,e,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return s;function s(d){const y=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:si(d)){if(r.containerState.type||(r.containerState.type=y,t.enter(y,{_container:!0})),y==="listUnordered")return t.enter("listItemPrefix"),d===42||d===45?t.check(Hn,n,u)(d):u(d);if(!r.interrupt||d===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(d)}return n(d)}function l(d){return si(d)&&++a<10?(t.consume(d),l):(!r.interrupt||a<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(t.exit("listItemValue"),u(d)):n(d)}function u(d){return t.enter("listItemMarker"),t.consume(d),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,t.check(lr,r.interrupt?n:c,t.attempt(Am,p,f))}function c(d){return r.containerState.initialBlankLine=!0,o++,p(d)}function f(d){return Ee(d)?(t.enter("listItemPrefixWhitespace"),t.consume(d),t.exit("listItemPrefixWhitespace"),p):n(d)}function p(d){return r.containerState.size=o+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(d)}}function Em(t,e,n){const r=this;return r.containerState._closeFlow=void 0,t.check(lr,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ne(t,e,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!Ee(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(_m,e,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ne(t,t.attempt(Ke,e,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function Mm(t,e,n){const r=this;return Ne(t,i,"listItemIndent",r.containerState.size+1);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?e(o):n(o)}}function Sm(t){t.exit(this.containerState.type)}function Im(t,e,n){const r=this;return Ne(t,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const a=r.events[r.events.length-1];return!Ee(o)&&a&&a[1].type==="listItemPrefixWhitespace"?e(o):n(o)}}const Xo={name:"setextUnderline",resolveTo:Rm,tokenize:Cm};function Rm(t,e){let n=t.length,r,i,o;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){r=n;break}t[n][1].type==="paragraph"&&(i=n)}else t[n][1].type==="content"&&t.splice(n,1),!o&&t[n][1].type==="definition"&&(o=n);const a={type:"setextHeading",start:{...t[i][1].start},end:{...t[t.length-1][1].end}};return t[i][1].type="setextHeadingText",o?(t.splice(i,0,["enter",a,e]),t.splice(o+1,0,["exit",t[r][1],e]),t[r][1].end={...t[o][1].end}):t[r][1]=a,t.push(["exit",a,e]),t}function Cm(t,e,n){const r=this;let i;return o;function o(u){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(t.enter("setextHeadingLine"),i=u,a(u)):n(u)}function a(u){return t.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(t.consume(u),s):(t.exit("setextHeadingLineSequence"),Ee(u)?Ne(t,l,"lineSuffix")(u):l(u))}function l(u){return u===null||se(u)?(t.exit("setextHeadingLine"),e(u)):n(u)}}const Nm={tokenize:Lm};function Lm(t){const e=this,n=t.attempt(lr,r,t.attempt(this.parser.constructs.flowInitial,i,Ne(t,t.attempt(this.parser.constructs.flow,i,t.attempt(Bh,i)),"linePrefix")));return n;function r(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function i(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),e.currentConstruct=void 0,n}}const Pm={resolveAll:Qs()},Dm=Xs("string"),Om=Xs("text");function Xs(t){return{resolveAll:Qs(t==="text"?Fm:void 0),tokenize:e};function e(n){const r=this,i=this.parser.constructs[t],o=n.attempt(i,a,s);return a;function a(c){return u(c)?o(c):s(c)}function s(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;const f=i[c];let p=-1;if(f)for(;++p-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}o>0&&a.push(t[i].slice(0,o))}return a}function Xm(t,e){let n=-1;const r=[];let i;for(;++n0){const $e=ie.tokenStack[ie.tokenStack.length-1];($e[1]||ea).call(ie,void 0,$e[0])}for(K.position={start:It(U.length>0?U[0][1].start:{line:1,column:1,offset:0}),end:It(U.length>0?U[U.length-2][1].end:{line:1,column:1,offset:0})},we=-1;++we1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};t.patch(e,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return t.patch(e,u),t.applyData(e,u)}function pg(t,e){const n={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function hg(t,e){if(t.options.allowDangerousHtml){const n={type:"raw",value:e.value};return t.patch(e,n),t.applyData(e,n)}}function el(t,e){const n=e.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+r}];const i=t.all(e),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function mg(t,e){const n=String(e.identifier).toUpperCase(),r=t.definitionById.get(n);if(!r)return el(t,e);const i={src:sn(r.url||""),alt:e.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return t.patch(e,o),t.applyData(e,o)}function gg(t,e){const n={src:sn(e.url)};e.alt!==null&&e.alt!==void 0&&(n.alt=e.alt),e.title!==null&&e.title!==void 0&&(n.title=e.title);const r={type:"element",tagName:"img",properties:n,children:[]};return t.patch(e,r),t.applyData(e,r)}function yg(t,e){const n={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return t.patch(e,r),t.applyData(e,r)}function vg(t,e){const n=String(e.identifier).toUpperCase(),r=t.definitionById.get(n);if(!r)return el(t,e);const i={href:sn(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:t.all(e)};return t.patch(e,o),t.applyData(e,o)}function xg(t,e){const n={href:sn(e.url)};e.title!==null&&e.title!==void 0&&(n.title=e.title);const r={type:"element",tagName:"a",properties:n,children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function bg(t,e,n){const r=t.all(e),i=n?wg(n):tl(e),o={},a=[];if(typeof e.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s1}function Tg(t,e){const n={},r=t.all(e);let i=-1;for(typeof e.start=="number"&&e.start!==1&&(n.start=e.start);++i0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Eg(t){const e=rl(t),n=nl(t);if(e&&n)return{start:e,end:n}}function Mg(t,e){const n=t.all(e),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:t.wrap([r],!0)};t.patch(e.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:t.wrap(n,!0)},s=rl(e.children[1]),l=nl(e.children[e.children.length-1]);s&&l&&(a.position={start:s,end:l}),i.push(a)}const o={type:"element",tagName:"table",properties:{},children:t.wrap(i,!0)};return t.patch(e,o),t.applyData(e,o)}function Sg(t,e,n){const r=n?n.children:void 0,o=(r?r.indexOf(e):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,s=a?a.length:e.children.length;let l=-1;const u=[];for(;++l0,!0),r[0]),i=r.index+r[0].length,r=n.exec(e);return o.push(ra(e.slice(i),i>0,!1)),o.join("")}function ra(t,e,n){let r=0,i=t.length;if(e){let o=t.codePointAt(r);for(;o===ta||o===na;)r++,o=t.codePointAt(r)}if(n){let o=t.codePointAt(i-1);for(;o===ta||o===na;)i--,o=t.codePointAt(i-1)}return i>r?t.slice(r,i):""}function Cg(t,e){const n={type:"text",value:Rg(String(e.value))};return t.patch(e,n),t.applyData(e,n)}function Ng(t,e){const n={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,n),t.applyData(e,n)}const Lg={blockquote:sg,break:lg,code:ug,delete:cg,emphasis:fg,footnoteReference:dg,heading:pg,html:hg,imageReference:mg,image:gg,inlineCode:yg,linkReference:vg,link:xg,listItem:bg,list:Tg,paragraph:Ag,root:_g,strong:kg,table:Mg,tableCell:Ig,tableRow:Sg,text:Cg,thematicBreak:Ng,toml:Bn,yaml:Bn,definition:Bn,footnoteDefinition:Bn};function Bn(){}const ol=-1,ur=0,Jn=1,er=2,Bi=3,zi=4,Ui=5,ji=6,al=7,sl=8,ia=typeof self=="object"?self:globalThis,Pg=(t,e)=>{const n=(i,o)=>(t.set(o,i),i),r=i=>{if(t.has(i))return t.get(i);const[o,a]=e[i];switch(o){case ur:case ol:return n(a,i);case Jn:{const s=n([],i);for(const l of a)s.push(r(l));return s}case er:{const s=n({},i);for(const[l,u]of a)s[r(l)]=r(u);return s}case Bi:return n(new Date(a),i);case zi:{const{source:s,flags:l}=a;return n(new RegExp(s,l),i)}case Ui:{const s=n(new Map,i);for(const[l,u]of a)s.set(r(l),r(u));return s}case ji:{const s=n(new Set,i);for(const l of a)s.add(r(l));return s}case al:{const{name:s,message:l}=a;return n(new ia[s](l),i)}case sl:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i)}return n(new ia[o](a),i)};return r},oa=t=>Pg(new Map,t)(0),Kt="",{toString:Dg}={},{keys:Og}=Object,mn=t=>{const e=typeof t;if(e!=="object"||!t)return[ur,e];const n=Dg.call(t).slice(8,-1);switch(n){case"Array":return[Jn,Kt];case"Object":return[er,Kt];case"Date":return[Bi,Kt];case"RegExp":return[zi,Kt];case"Map":return[Ui,Kt];case"Set":return[ji,Kt]}return n.includes("Array")?[Jn,n]:n.includes("Error")?[al,n]:[er,n]},zn=([t,e])=>t===ur&&(e==="function"||e==="symbol"),Fg=(t,e,n,r)=>{const i=(a,s)=>{const l=r.push(a)-1;return n.set(s,l),l},o=a=>{if(n.has(a))return n.get(a);let[s,l]=mn(a);switch(s){case ur:{let c=a;switch(l){case"bigint":s=sl,c=a.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return i([ol],a)}return i([s,c],a)}case Jn:{if(l)return i([l,[...a]],a);const c=[],f=i([s,c],a);for(const p of a)c.push(o(p));return f}case er:{if(l)switch(l){case"BigInt":return i([l,a.toString()],a);case"Boolean":case"Number":case"String":return i([l,a.valueOf()],a)}if(e&&"toJSON"in a)return o(a.toJSON());const c=[],f=i([s,c],a);for(const p of Og(a))(t||!zn(mn(a[p])))&&c.push([o(p),o(a[p])]);return f}case Bi:return i([s,a.toISOString()],a);case zi:{const{source:c,flags:f}=a;return i([s,{source:c,flags:f}],a)}case Ui:{const c=[],f=i([s,c],a);for(const[p,d]of a)(t||!(zn(mn(p))||zn(mn(d))))&&c.push([o(p),o(d)]);return f}case ji:{const c=[],f=i([s,c],a);for(const p of a)(t||!zn(mn(p)))&&c.push(o(p));return f}}const{message:u}=a;return i([s,{name:l,message:u}],a)};return o},aa=(t,{json:e,lossy:n}={})=>{const r=[];return Fg(!(e||n),!!e,new Map,r)(t),r},tr=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?oa(aa(t,e)):structuredClone(t):(t,e)=>oa(aa(t,e));function Bg(t,e){const n=[{type:"text",value:"↩"}];return e>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),n}function zg(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function Ug(t){const e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=t.options.footnoteBackContent||Bg,r=t.options.footnoteBackLabel||zg,i=t.options.footnoteLabel||"Footnotes",o=t.options.footnoteLabelTagName||"h2",a=t.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l0&&y.push({type:"text",value:" "});let M=typeof n=="string"?n:n(l,d);typeof M=="string"&&(M={type:"text",value:M}),y.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+p+(d>1?"-"+d:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,d),className:["data-footnote-backref"]},children:Array.isArray(M)?M:[M]})}const x=c[c.length-1];if(x&&x.type==="element"&&x.tagName==="p"){const M=x.children[x.children.length-1];M&&M.type==="text"?M.value+=" ":x.children.push({type:"text",value:" "}),x.children.push(...y)}else c.push(...y);const T={type:"element",tagName:"li",properties:{id:e+"fn-"+p},children:t.wrap(c,!0)};t.patch(u,T),s.push(T)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...tr(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` -`},{type:"element",tagName:"ol",properties:{},children:t.wrap(s,!0)},{type:"text",value:` -`}]}}const ll=function(t){if(t==null)return Gg;if(typeof t=="function")return cr(t);if(typeof t=="object")return Array.isArray(t)?jg(t):Vg(t);if(typeof t=="string")return Hg(t);throw new Error("Expected function, string, or object as test")};function jg(t){const e=[];let n=-1;for(;++n":""))+")"})}return p;function p(){let d=ul,y,v,x;if((!e||o(l,u,c[c.length-1]||void 0))&&(d=Wg(n(l,c)),d[0]===sa))return d;if("children"in l&&l.children){const T=l;if(T.children&&d[0]!==Yg)for(v=(r?T.children.length:-1)+a,x=c.concat(T);v>-1&&v0&&n.push({type:"text",value:` -`}),n}function la(t){let e=0,n=t.charCodeAt(e);for(;n===9||n===32;)e++,n=t.charCodeAt(e);return t.slice(e)}function ua(t,e){const n=Zg(t,e),r=n.one(t,void 0),i=Ug(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:` -`},i),o}function ry(t,e){return t&&"run"in t?async function(n,r){const i=ua(n,{file:r,...e});await t.run(i,r)}:function(n,r){return ua(n,{file:r,...t||e})}}function ca(t){if(t)throw t}var Br,fa;function iy(){if(fa)return Br;fa=1;var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):e.call(u)==="[object Array]"},o=function(u){if(!u||e.call(u)!=="[object Object]")return!1;var c=t.call(u,"constructor"),f=u.constructor&&u.constructor.prototype&&t.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!c&&!f)return!1;var p;for(p in u);return typeof p>"u"||t.call(u,p)},a=function(u,c){n&&c.name==="__proto__"?n(u,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):u[c.name]=c.newValue},s=function(u,c){if(c==="__proto__")if(t.call(u,c)){if(r)return r(u,c).value}else return;return u[c]};return Br=function l(){var u,c,f,p,d,y,v=arguments[0],x=1,T=arguments.length,M=!1;for(typeof v=="boolean"&&(M=v,v=arguments[1]||{},x=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});xa.length;let l;s&&a.push(i);try{l=t.apply(this,a)}catch(u){const c=u;if(s&&n)throw c;return i(c)}s||(l&&l.then&&typeof l.then=="function"?l.then(o,i):l instanceof Error?i(l):o(l))}function i(a,...s){n||(n=!0,e(a,...s))}function o(a){i(null,a)}}class Je extends Error{constructor(e,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},a=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof e=="string"?i=e:!o.cause&&e&&(a=!0,i=e.message,o.cause=e),!o.ruleId&&!o.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const s=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=bn(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}Je.prototype.file="";Je.prototype.name="";Je.prototype.reason="";Je.prototype.message="";Je.prototype.stack="";Je.prototype.column=void 0;Je.prototype.line=void 0;Je.prototype.ancestors=void 0;Je.prototype.cause=void 0;Je.prototype.fatal=void 0;Je.prototype.place=void 0;Je.prototype.ruleId=void 0;Je.prototype.source=void 0;const pt={basename:ly,dirname:uy,extname:cy,join:fy,sep:"/"};function ly(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');In(t);let n=0,r=-1,i=t.length,o;if(e===void 0||e.length===0||e.length>t.length){for(;i--;)if(t.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":t.slice(n,r)}if(e===t)return"";let a=-1,s=e.length-1;for(;i--;)if(t.codePointAt(i)===47){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),s>-1&&(t.codePointAt(i)===e.codePointAt(s--)?s<0&&(r=i):(s=-1,r=a));return n===r?r=a:r<0&&(r=t.length),t.slice(n,r)}function uy(t){if(In(t),t.length===0)return".";let e=-1,n=t.length,r;for(;--n;)if(t.codePointAt(n)===47){if(r){e=n;break}}else r||(r=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function cy(t){In(t);let e=t.length,n=-1,r=0,i=-1,o=0,a;for(;e--;){const s=t.codePointAt(e);if(s===47){if(a){r=e+1;break}continue}n<0&&(a=!0,n=e+1),s===46?i<0?i=e:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":t.slice(i,n)}function fy(...t){let e=-1,n;for(;++e0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function py(t,e){let n="",r=0,i=-1,o=0,a=-1,s,l;for(;++a<=t.length;){if(a2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length>0){n="",r=0,i=a,o=0;continue}}e&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+t.slice(i+1,a):n=t.slice(i+1,a),r=a-i-1;i=a,o=0}else s===46&&o>-1?o++:o=-1}return n}function In(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const hy={cwd:my};function my(){return"/"}function di(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function gy(t){if(typeof t=="string")t=new URL(t);else if(!di(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return yy(t)}function yy(t){if(t.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const e=t.pathname;let n=-1;for(;++n0){let[d,...y]=c;const v=r[p][1];fi(v)&&fi(d)&&(d=zr(!0,v,d)),r[p]=[u,d,...y]}}}}const Ty=new Vi().freeze();function Hr(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Gr(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function $r(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function pa(t){if(!fi(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function ha(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function Un(t){return Ay(t)?t:new vy(t)}function Ay(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function _y(t){return typeof t=="string"||ky(t)}function ky(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}function Hi(){const t=Ty().use(ag).use(ry).use(eh);return{process:e=>t.processSync(e).toString()}}const Ey={relative:""},My={"h-full":"","w-full":""},Sy={key:0,class:"animate-stripe",absolute:"",left:"1/2",bottom:"20%",z:"20","rounded-2xl":"",text:"primary-600","px-2":"","py-2":"",transform:"translate-x--1/2"},Iy={bg:"primary-50","rounded-xl":"","px-10":"","py-6":""},Ry=["innerHTML"],Cy=ze({__name:"Stage",props:{paused:{type:Boolean,default:!1}},setup(t){const e=W(),n=W(),{stageView:r}=We(nn()),{mouthOpenSize:i}=We(Hu()),{audioContext:o,calculateVolume:a}=ns(),{onBeforeMessageComposed:s,onBeforeSend:l,onTokenLiteral:u,onTokenSpecial:c,onStreamEnd:f,streamingMessage:p,onAssistantResponseEnd:d}=Pt(),{process:y}=Hi(),v=_i(),x=W(),T=W(!1),M=W(!1),k=gr({handlers:[_=>new Promise(ee=>{const ge=o.createBufferSource();ge.buffer=_.data.audioBuffer,ge.connect(o.destination),ge.connect(x.value),T.value=!0,ge.start(0),ge.onended=()=>{T.value=!1,ee()}})]}),C=Mu(),{ssmlEnabled:P,activeSpeechProvider:h,activeSpeechModel:I,activeSpeechVoice:b,pitch:g}=We(C);async function m(_){try{if(!h.value){console.warn("No active speech provider configured");return}if(!b.value){console.warn("No active speech voice configured");return}const ee=v.getProviderInstance(h.value);if(!ee){console.error("Failed to initialize speech provider");return}const ge=v.getProviderConfig(h.value),R=P.value?C.generateSSML(_.data,b.value,{...ge,pitch:g.value}):_.data,ye=await Su({...ee.speech(I.value,ge),input:R,voice:b.value.id}),_e=await o.decodeAudioData(ye);await k.add({audioBuffer:_e,text:_.data})}catch(ee){console.error("Speech generation failed:",ee)}}const A=gr({handlers:[m]});A.on("add",_=>{console.debug("ttsQueue added",_)});const S=Iu(A),{live2dCurrentMotion:B}=We(nn()),D=gr({handlers:[async _=>{if(r.value==="3d"){const ee=wl[_.data];if(!ee)return;await n.value.setExpression(ee)}else r.value==="2d"&&(B.value={group:Tl[_.data]})}]}),F=Ru(D);F.onHandlerEvent("emotion",_=>{console.debug("emotion detected",_)});const j=Cu();j.onHandlerEvent("delay",_=>{console.debug("delay detected",_)});function J(){requestAnimationFrame(J),T.value&&(i.value=a(x.value,"linear"))}function oe(){M.value||(J(),o.resume(),M.value=!0)}function Z(){x.value||(x.value=o.createAnalyser())}return s(async()=>{Z(),oe()}),l(async()=>{B.value={group:$i}}),u(async _=>{await S.add(_)}),c(async _=>{await j.add(_),await F.add(_)}),f(async()=>{await j.add(Nu)}),d(async _=>{}),Ht(()=>{var ee,ge,R;M.value=!1;const _=window;(ee=_.electron)==null||ee.ipcRenderer.removeAllListeners("before-hide"),(ge=_.electron)==null||ge.ipcRenderer.removeAllListeners("after-show"),(R=_.electron)==null||R.ipcRenderer.removeAllListeners("before-quit")}),wn(()=>{var ee,ge,R;const _=window;(ee=_.electron)==null||ee.ipcRenderer.on("before-hide",()=>{B.value={group:vl}}),(ge=_.electron)==null||ge.ipcRenderer.on("after-show",()=>{B.value={group:xl}}),(R=_.electron)==null||R.ipcRenderer.on("before-quit",()=>{B.value={group:$i}})}),wn(async()=>{e.value=bl({connection:{bundles:Eu()}}),await e.value.execute(ri`CREATE TABLE memory_test (vec FLOAT[768]);`)}),(_,ee)=>(Q(),re("div",Ey,[O("div",My,[V(r)==="2d"?(Q(),rn(Ju,{key:0,"mouth-open-size":V(i),"min-w":"50% (Q(),re("header",Fy,[O("div",By,[Ae(Bu)]),Ae(V(vu),{class:"m-1 block max-h-[10lh] min-h-[1lh] rounded-lg bg-neutral-100 p-2 text-lg text-neutral-500 outline-none dark:bg-neutral-800 dark:text-neutral-400",to:"/settings"},{default:Ve(()=>n[0]||(n[0]=[O("div",{"i-solar:settings-minimalistic-bold-duotone":""},null,-1)])),_:1})]))}});function cl(t,e){const n=Qa(e??{},{...eo.getDefaultRealTimeVADOptions("v5"),preSpeechPadFrames:30,positiveSpeechThreshold:.5,negativeSpeechThreshold:.35,minSpeechFrames:30,auto:!0}),r=W(),i=xu("microphone");async function o(){if(r.value&&(r.value.destroy(),r.value=void 0,console.warn("existing MicVAD destroyed")),!i.value)return;const a=V(t);if(!a)return;const s=await navigator.mediaDevices.getUserMedia({audio:{deviceId:a}});r.value=await eo.MicVAD.new({...n,stream:s}),n.auto&&r.value.start()}return Ue(i,o,{immediate:!0}),Ue(bu(t),o,{immediate:!0}),wu(o),Ht(()=>{r.value&&(r.value.destroy(),r.value=void 0)}),{destroy:()=>{r.value&&(r.value.destroy(),r.value=void 0)},start:()=>{r.value&&r.value.start()}}}function Uy(t,e){const n=Qa(e,{onLoading:()=>{},onInitiate:()=>{},onProgress:()=>{},onDone:()=>{},onReady:()=>{},onStart:()=>{},onUpdate:()=>{},onComplete:()=>{}}),{post:r,data:i,terminate:o}=Tu(t,{type:"module"}),a=W(null),s=W(""),l=W([]),u=W(!1),c=W(0),f=W("");return Ue(i,p=>{var d,y,v,x,T,M,k,C;switch(p.status){case"loading":a.value="loading",s.value=p.data,(d=n.onLoading)==null||d.call(n,p.data);break;case"initiate":l.value.push(p),(y=n.onInitiate)==null||y.call(n,p);break;case"progress":l.value=l.value.map(P=>P.file===p.file?{...P,...p}:P),(v=n.onProgress)==null||v.call(n,p);break;case"done":l.value=l.value.filter(P=>P.file!==p.file),(x=n.onDone)==null||x.call(n,p);break;case"ready":a.value="ready",(T=n.onReady)==null||T.call(n);break;case"start":u.value=!0,(M=n.onStart)==null||M.call(n);break;case"update":c.value=p.tps,(k=n.onUpdate)==null||k.call(n,p.tps);break;case"complete":u.value=!1,f.value=p.output[0]||"",console.debug("Whisper result:",f.value),(C=n.onComplete)==null||C.call(n,p.output[0]);break}}),Ht(()=>{o()}),{transcribe:p=>r(p),status:a,loadingMessage:s,loadingProgress:l,transcribing:u,tps:c,result:f,load:()=>r({type:"load"}),terminate:o}}const jy="/assets/worker-kM8CmLr7.js";async function Vy(t,e){const n=new ArrayBuffer(44+t.length*2),r=new DataView(n);jn(r,0,"RIFF"),r.setUint32(4,36+t.length*2,!0),jn(r,8,"WAVE"),jn(r,12,"fmt "),r.setUint32(16,16,!0),r.setUint16(20,1,!0),r.setUint16(22,1,!0),r.setUint32(24,e,!0),r.setUint32(28,e*2,!0),r.setUint16(32,2,!0),r.setUint16(34,16,!0),jn(r,36,"data"),r.setUint32(40,t.length*2,!0),Hy(r,44,t);const i=new Blob([r],{type:"audio/wav"});return new Promise((o,a)=>{const s=new FileReader;s.onload=()=>{const l=s.result.split(",")[1];o(l)},s.onerror=a,s.readAsDataURL(i)})}function jn(t,e,n){for(let r=0;r{Wn().then(()=>{i.update(),o.value=i.height.value})}),u(async()=>{Wn().then(()=>{i.update(),o.value=i.height.value})}),(c,f)=>{const p=Ja("auto-animate");return Q(),re("div",Gy,[f[2]||(f[2]=O("div",{"flex-1":""},null,-1)),Ct((Q(),re("div",{ref_key:"chatHistoryRef",ref:e,"h-full":"","w-full":"",flex:"~ col","overflow-scroll":""},[f[1]||(f[1]=O("div",{"flex-1":""},null,-1)),(Q(!0),re(Ti,null,Ai(V(n),(d,y)=>(Q(),re("div",{key:y,"mb-2":""},[d.role==="error"?(Q(),re("div",$y,[O("div",qy,[O("div",Yy,[O("div",Ky,[O("span",Wy,me(V(a)("stage.chat.message.character-name.core-system")),1)]),f[0]||(f[0]=O("div",{"i-solar:danger-triangle-bold-duotone":"","text-violet-500":""},null,-1))]),V(r)&&y===V(n).length-1?(Q(),re("div",Xy)):(Q(),re("div",{key:1,class:"markdown-content break-words text-violet-500",text:"base {if(!B||!B.trim())return;const D=o.getProviderConfig(a.value);await y(B,{chatProvider:o.getProviderInstance(a.value),model:s.value,providerConfig:D})}});async function I(){if(e.value.trim())try{const B=o.getProviderConfig(a.value);await y(e.value,{chatProvider:o.getProviderInstance(a.value),model:s.value,providerConfig:B})}catch(B){x.value.pop(),x.value.push({role:"error",content:B.message})}}const{destroy:b,start:g}=cl(d,{onSpeechStart:()=>{n.value=!0},onVADMisfire:()=>{n.value=!1},onSpeechEnd:B=>{n.value=!1,A(B)},auto:!1});function m(){P.value!=="loading"&&(C(),g())}async function A(B){await T.resume();const D=await Vy(B,T.sampleRate);k({type:"generate",data:{audio:D,language:"en"}})}async function S(B){const D=B.target,F=u.value.find(j=>j.deviceId===D.value);if(!F){f.value=void 0;return}f.value=F}return Ue(p,async B=>{B==="false"&&(b(),h())}),Ue(i,async B=>{B&&await c()}),v(async()=>{e.value=""}),(B,D)=>(Q(),re("div",u0,[O("fieldset",c0,[O("label",{class:dt([r.value==="chat"?"bg-primary-100 dark:bg-primary-900":"bg-white dark:bg-primary-950",r.value==="chat"?"text-primary-500 dark:text-primary-500":"",{"transition-colors-none ":V(l)}]),flex:"~ row",checked:r.value==="chat","aria-checked":r.value==="chat",border:"solid l-2 t-2 b-2 primary-100 dark:primary-900",bg:"hover:primary-100 dark:hover:primary-900",text:"primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500",transition:"all duration-250 ease-in-out","cursor-pointer":"","items-center":"","gap-1":"","rounded-l-lg":"","px-2":""},[Ct(O("input",{"onUpdate:modelValue":D[0]||(D[0]=F=>r.value=F),type:"radio",name:"tab",value:"chat",hidden:""},null,512),[[mr,r.value]]),D[5]||(D[5]=O("div",{"i-solar:dialog-2-bold-duotone":"",text:"2xl",transform:"translate-y--2"},null,-1)),O("div",d0,[O("span",p0,me(V(M)("stage.chat.tabs.chat")),1)])],10,f0),O("label",{class:dt([r.value==="custom"?"bg-primary-100 dark:bg-primary-900":"bg-white dark:bg-primary-950",r.value==="custom"?"text-primary-500 dark:text-primary-500":"",{"transition-colors-none ":V(l)}]),flex:"~ row",checked:r.value==="custom","aria-checked":r.value==="custom",border:"solid t-2 b-2 primary-100 dark:primary-900",bg:"hover:primary-100 dark:hover:primary-900",text:"primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500",transition:"all duration-250 ease-in-out","cursor-pointer":"","items-center":"","gap-1":"","px-2":""},[Ct(O("input",{"onUpdate:modelValue":D[1]||(D[1]=F=>r.value=F),type:"radio",name:"tab",value:"custom",hidden:""},null,512),[[mr,r.value]]),D[6]||(D[6]=O("div",{"i-solar:star-fall-2-bold-duotone":"",text:"2xl",transform:"translate-y--2"},null,-1)),O("div",m0,[O("span",null,me(V(M)("stage.chat.tabs.custom")),1)])],10,h0),O("label",{class:dt([r.value==="clothes"?"bg-primary-100 dark:bg-primary-900":"bg-white dark:bg-primary-950",r.value==="clothes"?"text-primary-500 dark:text-primary-500":"",{"transition-colors-none ":V(l)}]),flex:"~ row",checked:r.value==="clothes","aria-checked":r.value==="clothes",border:"solid r-2 t-2 b-2 primary-100 dark:primary-900",bg:"hover:primary-100 dark:hover:primary-900",text:"primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500",transition:"all duration-250 ease-in-out","cursor-pointer":"","items-center":"","gap-1":"","rounded-r-lg":"","px-2":""},[Ct(O("input",{"onUpdate:modelValue":D[2]||(D[2]=F=>r.value=F),type:"radio",name:"tab",value:"clothes",hidden:""},null,512),[[mr,r.value]]),D[7]||(D[7]=O("div",{"i-solar:magic-stick-3-bold-duotone":"",text:"2xl",transform:"translate-y--2"},null,-1)),O("div",y0,[O("span",null,me(V(M)("stage.chat.tabs.clothes")),1)])],10,g0)]),O("div",v0,[O("div",x0,[Ae(l0,{"h-full":"","flex-1":"","p-4":"",w:"full","max-h":"e.value=F),placeholder:V(M)("stage.message"),text:"primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500 placeholder:primary-300 placeholder:hover:primary-500 placeholder:dark:primary-300/50 placeholder:dark:hover:primary-500",bg:"primary-100 dark:primary-400/20","min-h":"[100px]","max-h":"[300px]","w-full":"","rounded-t-xl":"","p-4":"","font-medium":"","outline-none":"",transition:"all duration-250 ease-in-out placeholder:all placeholder:duration-250 placeholder:ease-in-out",class:dt({"transition-colors-none placeholder:transition-colors-none":V(l)}),onSubmit:I},null,8,["modelValue","placeholder","class"])])])]),O("div",w0,[O("button",{bg:"complementary-100 hover:complementary-200 dark:complementary-800 dark:hover:complementary-700",transition:"all duration-250 ease-in-out",class:dt({"transition-colors-none":V(l)}),text:"complementary-400","mb-6":"",flex:"","cursor-pointer":"","items-center":"","justify-center":"","gap-2":"","rounded-full":"","px-4":"","py-2":"",onClick:m},[Ae(_u,{mode:"out-in"},{default:Ve(()=>[V(P)===null?(Q(),re("div",T0,me(V(M)("stage.operations.load-models")),1)):V(P)==="loading"?(Q(),re("div",A0,[D[8]||(D[8]=O("div",{"i-svg-spinners:bouncing-ball":"",class:"text-cyan"},null,-1)),O("span",null,me(V(M)("stage.operations.load-models-status.loading")),1)])):V(P)==="ready"?(Q(),re("div",_0,[D[9]||(D[9]=O("div",{"i-lucide:check":"",class:"text-cyan"},null,-1)),O("span",null,me(V(M)("stage.operations.load-models-status.ready")),1)])):ut("",!0)]),_:1})],2),O("div",k0,[Ae(V(ki),null,{default:Ve(()=>[i.value?(Q(),re("fieldset",E0,[(Q(!0),re(Ti,null,Ai(V(u),(F,j)=>(Q(),re("label",{key:j,class:"[&_div_span]:dark:hover:bg-cyan-300 [&_div_span]:dark:hover:bg-cyan-900"},[O("input",{type:"radio",name:"audioInput",value:F.deviceId,hidden:"",onChange:S},null,40,M0),O("div",S0,[O("div",I0,[F.deviceId===V(d)?(Q(),re("div",R0)):ut("",!0)]),O("span",{"inline-block":"",class:dt([F.deviceId===V(d)?"cyan-400 dark:text-white":"cyan-400/50 dark:text-white/50"]),transition:"all duration-250 ease-in-out"},me(F.label),3)])]))),128))])):ut("",!0)]),_:1}),O("label",{bg:"complementary-100 hover:complementary-200 dark:complementary-800 dark:hover:complementary-700",transition:"all duration-250 ease-in-out",class:dt({"transition-colors-none":V(l)}),text:"complementary-400","h-fit":"",flex:"","cursor-pointer":"","items-center":"","justify-center":"","gap-2":"","rounded-full":"","px-4":"","py-2":""},[Ct(O("input",{"onUpdate:modelValue":D[4]||(D[4]=F=>i.value=F),type:"checkbox",hidden:""},null,512),[[hi,i.value]]),D[10]||(D[10]=O("div",{"i-solar:microphone-2-bold-duotone":""},null,-1)),O("div",null,[n.value?(Q(),re("span",N0,"Listening...")):(Q(),re("span",C0,me(V(M)("settings.microphone")),1))])],2)])])]))}}),P0=or(L0,[["__scopeId","data-v-1f3e13c7"]]),D0={py:"1",flex:"~ col",rounded:"lg","overflow-hidden":""},O0={key:0,flex:"",mr:"12"},F0={flex:"~ col",border:"4 solid primary-200/50 dark:primary-500/50",shadow:"md primary-200/50 dark:none","min-w-20":"","rounded-lg":"","px-2":"","py-1":"",h:"unset {Wn().then(()=>{i.update(),o.value=i.height.value})}),l(async()=>{Wn().then(()=>{i.update(),o.value=i.height.value})}),(u,c)=>{const f=Ja("auto-animate");return Q(),re("div",D0,[c[1]||(c[1]=O("div",{"flex-1":""},null,-1)),Ct((Q(),re("div",{ref_key:"chatHistoryRef",ref:e,"h-full":"","w-full":"","max-h":"30vh",flex:"~ col","overflow-scroll":""},[c[0]||(c[0]=O("div",{"flex-1":""},null,-1)),(Q(!0),re(Ti,null,Ai(V(r),(p,d)=>(Q(),re("div",{key:d,"mb-2":""},[p.role==="assistant"?(Q(),re("div",O0,[O("div",F0,[O("div",null,[O("span",B0,me(V(n)("stage.chat.message.character-name.airi")),1)]),p.content?(Q(),re("div",{key:0,class:"markdown-content",text:"base {n.value=!0},onVADMisfire:()=>{n.value=!1},onSpeechEnd:x=>{n.value=!1,v()},auto:!1});function v(x){alert("Transcription is not implemented yet")}return Ue(a,async x=>{x==="false"&&d()}),c(async()=>{e.value=""}),wn(()=>{y()}),(x,T)=>(Q(),re("div",null,[O("div",Y0,[Ae(q0,{absolute:"","left-0":"","top-0":"",transform:"translate-y-[-100%]","w-full":""}),O("div",K0,[Ae(V(es),{modelValue:e.value,"onUpdate:modelValue":T[0]||(T[0]=M=>e.value=M),placeholder:V(f)("stage.message"),border:"solid 2 primary-100 dark:primary-400/20",text:"primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500 placeholder:primary-300 placeholder:hover:primary-500 placeholder:dark:primary-300/50 placeholder:dark:hover:primary-500",bg:"primary-100 dark:primary-400/20","max-h":"[10lh]","min-h":"[1lh]","w-full":"","resize-none":"","overflow-y-scroll":"","rounded-xl":"","p-2":"","font-medium":"","outline-none":"",transition:"all duration-250 ease-in-out placeholder:all placeholder:duration-250 placeholder:ease-in-out",class:dt({"transition-colors-none placeholder:transition-colors-none":V(l)}),onSubmit:p},null,8,["modelValue","placeholder","class"])])])]))}}),X0={class:"relative"},Q0={absolute:"","left-0":"","right-0":"","top-0":"","w-full":"","overflow-hidden":""},Z0=ze({__name:"AnimatedWave",props:{height:{default:40},amplitude:{default:14},waveLength:{default:250},fillColor:{default:"oklch(95% 0.10 var(--theme-colors-hue))"},direction:{default:"down"},movementDirection:{default:"left"},animationSpeed:{default:50}},setup(t){const e=t,n=W(e.height),r=W(e.amplitude),i=W(e.waveLength),o=W(e.fillColor),a=W(e.direction),s=W(e.movementDirection);function l(f,p,d,y,v){const x=[],M=Math.ceil(f/y)*y,k=1,C=v==="up"?d:p-d;x.push(`M 0 ${C}`);const P=Math.PI*2/y;for(let I=0;I<=M;I+=k){const b=d*Math.sin(P*I),g=v==="up"?C-b:C+b;x.push(`L ${I} ${g}`)}const h=v==="up"?p:0;return x.push(`L ${M} ${h}`),x.push(`L 0 ${h} Z`),x.join(" ")}const u=He(()=>n.value+r.value*2),c=He(()=>{const f=` - - `;return`url(data:image/svg+xml;base64,${btoa(f)})`});return Ue(()=>[e.height,e.amplitude,e.waveLength,e.fillColor,e.direction,e.movementDirection],()=>{n.value=e.height,r.value=e.amplitude,i.value=e.waveLength,o.value=e.fillColor,a.value=e.direction,s.value=e.movementDirection},{immediate:!0}),(f,p)=>(Q(),re("div",X0,[_n(f.$slots,"default",{},void 0,!0),O("div",Q0,[O("div",{class:"wave",style:Wr({background:o.value,height:`${u.value}px`,maskImage:c.value,WebkitMaskImage:c.value,"--wave-translate":`${-i.value}px`,"--animation-duration":`${i.value/t.animationSpeed}s`,"animation-direction":s.value==="left"?"normal":"reverse"})},null,4)])]))}}),J0=or(Z0,[["__scopeId","data-v-d4cf94d8"]]),e1={relative:"",flex:"~ col","z-2":"","h-100dvh":"","w-100vw":"","of-hidden":""},t1={relative:"",flex:"~ 1 row gap-y-0 gap-x-2 (Q(),rn(Oy,null,{default:Ve(()=>[Ae(J0,{"fill-color":V(e)?"oklch(35% calc(var(--theme-colors-chroma) * 0.6) var(--theme-colors-hue))":"color-mix(in srgb, oklch(95% calc(var(--theme-colors-chroma-50) * 0.5) var(--theme-colors-hue)) 80%, oklch(100% 0 360))"},{default:Ve(()=>[O("div",e1,[O("div",null,[Ae(zy,{class:"flex",p2:""})]),O("div",t1,[Ae(V(Ny),{"flex-1":"","min-w":"1/2",paused:n.value},null,8,["paused"]),Ae(P0,{class:"flex i**1.2).map(i=>i*1.2).reduce((i,o)=>i+o,0)/e.length/100}function ql(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 Kl(t,e="linear"){switch(e){case"linear":return Yl(t);case"minmax":return ql(t)}}const pa=$n("AudioContext",()=>({audioContext:new AudioContext,calculateVolume:Kl})),Wl=$n("SpeakingStore",()=>{const n=W(0),r=W(!1),i=je(()=>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 Xl(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 Ql=$n("llm",()=>{async function t(n,r,i,o){const a=o==null?void 0:o.headers;return await Ul({...r.chat(n),messages:i,headers:a})}async function e(n,r){if(n==="")return[];try{return await zl({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}=Ql(),{systemPrompt:e}=qe(jl()),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 y(h){a.value.push(h)}function x(h){s.value.push(h)}function v(h){l.value.push(h)}function k(h){u.value.push(h)}function M(h){c.value.push(h)}const A=W([{role:"system",content:e.value}]),C=W({role:"assistant",content:""});async function P(h,I){var b;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=>Is(D));for(const D of i.value)await D(h);for(const D of o.value)await D(h);const m=((b=I.providerConfig)==null?void 0:b.headers)||{},T=await t(I.model,I.chatProvider,g,{headers:m});for(const D of a.value)await D(h);let S="";const F=Xl({onLiteral:async D=>{for(const B of s.value)await B(D);C.value.content+=D},onSpecial:async D=>{for(const B of l.value)await B(D)}});for await(const D of $l(T.textStream,async B=>B))S+=D,await F.consume(D);await F.end();for(const D of u.value)await D();for(const D of c.value)await D(S);console.debug("LLM output:",S)}catch(g){throw console.error("Error sending message:",g),g}finally{n.value=!1}}return{sending:n,messages:A,streamingMessage:C,send:P,onBeforeMessageComposed:f,onAfterMessageComposed:p,onBeforeSend:d,onAfterSend:y,onTokenLiteral:x,onTokenSpecial:v,onStreamEnd:k,onAssistantResponseEnd:M}}),ha=Be({__name:"Screen",setup(t){const e=W(),n=Rs(Ns),{width:r,height:i}=Cs(),o=Qr(e,{immediate:!0,windowResize:!0,reset:!0}),a=je(()=>n.between("sm","md").value||n.smaller("sm").value),s=je(()=>n.between("md","lg").value),l=je(()=>n.greaterOrEqual("lg").value),u=je(()=>l.value?o.width.value:a.value||s.value?r.value-16:o.width.value),c=W(0);return Fe([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}),Fe([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))}}),Zl={absolute:"",bottom:"3",right:"3"},Jl={flex:"~ row","cursor-pointer":""},eu=["checked","aria-checked"],tu={key:0,"min-w":"50vw",z:"(Q(),Xt(ha,{relative:""},{default:Ue(({width:a,height:s})=>[ke(Hl,{width:a,height:s},{default:Ue(({app:l})=>[ke(Vl,{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",Zl,[O("div",Jl,[O("label",{class:st([n.value?"bg-neutral-300 dark:bg-neutral-200":"bg-neutral-100 dark:bg-neutral-700"]),transition:"all ease-in-out duration-500",text:"lg neutral-500 dark:neutral-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,eu),[[Zr,n.value]]),o[8]||(o[8]=O("div",{"select-none":""},[O("div",{"i-solar:bug-bold-duotone":""})],-1))],2)]),ke(ui,null,{default:Ue(()=>[n.value?(Q(),re("div",tu,[O("div",nu,[O("div",ru,[O("span",null,he(V(e)("stage.viewers.debug-menu.emotions")),1)]),O("div",iu,[O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[1]||(o[1]=l=>r.value={group:"Surprise",index:0})},he(V(e)("stage.viewers.debug-menu.emotions-btn.surprised")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[2]||(o[2]=l=>r.value={group:"Sad",index:0})},he(V(e)("stage.viewers.debug-menu.emotions-btn.sad")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[3]||(o[3]=l=>r.value={group:"Angry",index:0})},he(V(e)("stage.viewers.debug-menu.emotions-btn.angry")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[4]||(o[4]=l=>r.value={group:"Happy",index:0})},he(V(e)("stage.viewers.debug-menu.emotions-btn.happy")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[5]||(o[5]=l=>r.value={group:"Awkward",index:0})},he(V(e)("stage.viewers.debug-menu.emotions-btn.awkward")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[6]||(o[6]=l=>r.value={group:"Question",index:0})},he(V(e)("stage.viewers.debug-menu.emotions-btn.question")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[7]||(o[7]=l=>r.value={group:"Think",index:0})},he(V(e)("stage.viewers.debug-menu.emotions-btn.think")),1)])])])):it("",!0)]),_:1})])]),_:1}))}});var au=Object.defineProperty,su=(t,e,n)=>e in t?au(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lu=(t,e,n)=>su(t,e+"",n);function uu(t){return Vs()?(Hs(t),!0):!1}function ma(t){return typeof t=="function"?t():V(t)}const cu=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const fu=Object.prototype.toString,du=t=>fu.call(t)==="[object Object]",pu=()=>{},hu=cu?window:void 0;function mu(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=hu):[e,n,r,i]=t,!e)return pu;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=Fe(()=>[mu(e),ma(i)],([c,f])=>{if(a(),!c)return;const p=du(f)?{...f}:f;o.push(...n.flatMap(d=>r.map(y=>s(c,d,y,p))))},{immediate:!0,flush:"post"}),u=()=>{l(),a()};return uu(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}),lu(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 ze("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() { + gl_Position = projectionMatrix * viewMatrix * modelMatrix * vec4(position, 1.); + vUv = uv; + vPos = position.xy; + } + `,` + // mostly from https://gist.github.com/statico/df64c5d167362ecf7b34fca0b1459a44 + varying vec2 vUv; + varying vec2 vPos; + uniform vec2 scale; + uniform vec2 imageBounds; + uniform float resolution; + uniform vec3 color; + uniform sampler2D map; + uniform float radius; + uniform float zoom; + uniform float grayscale; + uniform float opacity; + const vec3 luma = vec3(.299, 0.587, 0.114); + vec4 toGrayscale(vec4 color, float intensity) { + return vec4(mix(color.rgb, vec3(dot(color.rgb, luma)), intensity), color.a); + } + vec2 aspect(vec2 size) { + return size / min(size.x, size.y); + } + + const float PI = 3.14159265; + + // from https://iquilezles.org/articles/distfunctions + float udRoundBox( vec2 p, vec2 b, float r ) { + return length(max(abs(p)-b+r,0.0))-r; + } + + void main() { + vec2 s = aspect(scale); + vec2 i = aspect(imageBounds); + float rs = s.x / s.y; + float ri = i.x / i.y; + vec2 new = rs < ri ? vec2(i.x * s.y / i.y, s.y) : vec2(s.x, i.y * s.x / i.x); + vec2 offset = (rs < ri ? vec2((new.x - s.x) / 2.0, 0.0) : vec2(0.0, (new.y - s.y) / 2.0)) / new; + vec2 uv = vUv * s / new + offset; + vec2 zUv = (uv - vec2(0.5, 0.5)) / zoom + vec2(0.5, 0.5); + + vec2 res = vec2(scale * resolution); + vec2 halfRes = 0.5 * res; + float b = udRoundBox(vUv.xy * res - halfRes, halfRes, resolution * radius); + vec3 a = mix(vec3(1.0,0.0,0.0), vec3(0.0,0.0,0.0), smoothstep(0.0, 1.0, b)); + gl_FragColor = toGrayscale(texture2D(map, zUv) * vec4(color, opacity * a), grayscale); + + #include + #include + } + `);const ci=parseInt(Gs.replace(/\D+/g,""));var gu=Object.defineProperty,yu=(t,e,n)=>e in t?gu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xu=(t,e,n)=>(yu(t,e+"",n),n);async function Bi(t){const e=await t.arrayBuffer(),n=btoa(String.fromCharCode(...new Uint8Array(e)));return`data:${t.type||""};base64,${n}`}let An,sr,Ft,En;function lr(t,e=1/0,n=null){sr||(sr=new Zo(2,2,1,1)),Ft||(Ft=new yn({uniforms:{blitTexture:new Qs(t)},vertexShader:` + varying vec2 vUv; + void main(){ + vUv = uv; + gl_Position = vec4(position.xy * 1.0,0.,.999999); + } + `,fragmentShader:` + uniform sampler2D blitTexture; + varying vec2 vUv; + + void main(){ + gl_FragColor = vec4(vUv.xy, 0, 1); + + #ifdef IS_SRGB + gl_FragColor = LinearTosRGB( texture2D( blitTexture, vUv) ); + #else + gl_FragColor = texture2D( blitTexture, vUv); + #endif + } + `})),Ft.uniforms.blitTexture.value=t,Ft.defines.IS_SRGB="colorSpace"in t?t.colorSpace==="srgb":t.encoding===3001,Ft.needsUpdate=!0,En||(En=new Pt(sr,Ft),En.frustrumCulled=!1);const r=new Et,i=new Lr;i.add(En),n||(n=An=new Zs({antialias:!1})),n.setSize(Math.min(t.image.width,e),Math.min(t.image.height,e)),n.clear(),n.render(i,r);const o=new Fn(n.domElement);return o.minFilter=t.minFilter,o.magFilter=t.magFilter,o.wrapS=t.wrapS,o.wrapT=t.wrapT,o.name=t.name,An&&(An.dispose(),An=null),o}const Fi={POSITION:["byte","byte normalized","unsigned byte","unsigned byte normalized","short","short normalized","unsigned short","unsigned short normalized"],NORMAL:["byte normalized","short normalized"],TANGENT:["byte normalized","short normalized"],TEXCOORD:["byte","byte normalized","unsigned byte","short","short normalized","unsigned short"]};class ya{constructor(){this.pluginCallbacks=[],this.register(function(e){return new Su(e)}),this.register(function(e){return new Iu(e)}),this.register(function(e){return new Nu(e)}),this.register(function(e){return new Lu(e)}),this.register(function(e){return new Pu(e)}),this.register(function(e){return new Du(e)}),this.register(function(e){return new Ru(e)}),this.register(function(e){return new Cu(e)}),this.register(function(e){return new Ou(e)}),this.register(function(e){return new Bu(e)}),this.register(function(e){return new Fu(e)})}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,n,r,i){const o=new Mu,a=[];for(let s=0,l=this.pluginCallbacks.length;st.times[t.times.length-1]){if(Math.abs(t.times[t.times.length-1]-e)<.001)return t.times.length-1;r[r.length-1]=e,r.set(t.times,0),i.set(t.values,0),i.set(o.evaluate(e),t.values.length),a=r.length-1}else for(let s=0;se){r.set(t.times.slice(0,s+1),0),r[s+1]=e,r.set(t.times.slice(s+1),s+2),i.set(t.values.slice(0,(s+1)*n),0),i.set(o.evaluate(e),(s+1)*n),i.set(t.values.slice((s+1)*n),(s+2)*n),a=s+1;break}}return t.times=r,t.values=i,a},mergeMorphTargetTracks:function(t,e){const n=[],r={},i=t.tracks;for(let o=0;o4?a=t.array[i*t.itemSize+o]:(o===0?a=t.getX(i):o===1?a=t.getY(i):o===2?a=t.getZ(i):o===3&&(a=t.getW(i)),t.normalized===!0&&(a=Dt.normalize(a,t.array))),r.min[o]=Math.min(r.min[o],a),r.max[o]=Math.max(r.max[o],a)}return r}function xa(t){return Math.ceil(t/4)*4}function cr(t,e=0){const n=xa(t.byteLength);if(n!==t.byteLength){const r=new Uint8Array(n);if(r.set(new Uint8Array(t)),e!==0)for(let i=t.byteLength;i"u"&&typeof OffscreenCanvas<"u"?new OffscreenCanvas(1,1):document.createElement("canvas")}function Hi(t,e){if(t.toBlob!==void 0)return new Promise(r=>t.toBlob(r,e));let n;return e==="image/jpeg"?n=.92:e==="image/webp"&&(n=.8),t.convertToBlob({type:e,quality:n})}class Mu{constructor(){this.plugins=[],this.options={},this.pending=[],this.buffers=[],this.byteOffset=0,this.buffers=[],this.nodeMap=new Map,this.skins=[],this.extensionsUsed={},this.extensionsRequired={},this.uids=new Map,this.uid=0,this.json={asset:{version:"2.0",generator:"THREE.GLTFExporter"}},this.cache={meshes:new Map,attributes:new Map,attributesNormalized:new Map,materials:new Map,textures:new Map,images:new Map}}setPlugins(e){this.plugins=e}async write(e,n,r={}){this.options=Object.assign({binary:!1,trs:!1,onlyVisible:!0,maxTextureSize:1/0,animations:[],includeCustomExtensions:!1},r),this.options.animations.length>0&&(this.options.trs=!0),this.processInput(e),await Promise.all(this.pending);const i=this,o=i.buffers,a=i.json;r=i.options;const s=i.extensionsUsed,l=i.extensionsRequired,u=new Blob(o,{type:"application/octet-stream"}),c=Object.keys(s),f=Object.keys(l);c.length>0&&(a.extensionsUsed=c),f.length>0&&(a.extensionsRequired=f),a.buffers&&a.buffers.length>0&&(a.buffers[0].byteLength=u.size),r.binary===!0?u.arrayBuffer().then(p=>{const d=cr(p),y=new DataView(new ArrayBuffer(ji));y.setUint32(0,d.byteLength,!0),y.setUint32(4,Tu,!0);const x=cr(_u(JSON.stringify(a)),32),v=new DataView(new ArrayBuffer(ji));v.setUint32(0,x.byteLength,!0),v.setUint32(4,ku,!0);const k=new ArrayBuffer(Ui),M=new DataView(k);M.setUint32(0,bu,!0),M.setUint32(4,wu,!0);const A=Ui+v.byteLength+x.byteLength+y.byteLength+d.byteLength;M.setUint32(8,A,!0),new Blob([k,v,x,y,d],{type:"application/octet-stream"}).arrayBuffer().then(n)}):a.buffers&&a.buffers.length>0?Bi(u).then(p=>{a.buffers[0].uri=p,n(a)}):n(a)}serializeUserData(e,n){if(Object.keys(e.userData).length===0)return;const r=this.options,i=this.extensionsUsed;try{const o=JSON.parse(JSON.stringify(e.userData));if(r.includeCustomExtensions&&o.gltfExtensions){n.extensions===void 0&&(n.extensions={});for(const a in o.gltfExtensions)n.extensions[a]=o.gltfExtensions[a],i[a]=!0;delete o.gltfExtensions}Object.keys(o).length>0&&(n.extras=o)}catch(o){console.warn("THREE.GLTFExporter: userData of '"+e.name+"' won't be serialized because of JSON.stringify error - "+o.message)}}getUID(e,n=!1){if(this.uids.has(e)===!1){const r=new Map;r.set(!0,this.uid++),r.set(!1,this.uid++),this.uids.set(e,r)}return this.uids.get(e).get(n)}isNormalizedNormalAttribute(e){if(this.cache.attributesNormalized.has(e))return!1;const n=new ae;for(let r=0,i=e.count;r5e-4)return!1;return!0}createNormalizedNormalAttribute(e){const n=this.cache;if(n.attributesNormalized.has(e))return n.attributesNormalized.get(e);const r=e.clone(),i=new ae;for(let o=0,a=r.count;o4?y=e.array[p*e.itemSize+d]:(d===0?y=e.getX(p):d===1?y=e.getY(p):d===2?y=e.getZ(p):d===3&&(y=e.getW(p)),e.normalized===!0&&(y=Dt.normalize(y,e.array))),n===pe.FLOAT?u.setFloat32(c,y,!0):n===pe.INT?u.setInt32(c,y,!0):n===pe.UNSIGNED_INT?u.setUint32(c,y,!0):n===pe.SHORT?u.setInt16(c,y,!0):n===pe.UNSIGNED_SHORT?u.setUint16(c,y,!0):n===pe.BYTE?u.setInt8(c,y):n===pe.UNSIGNED_BYTE&&u.setUint8(c,y),c+=s}const f={buffer:this.processBuffer(u.buffer),byteOffset:this.byteOffset,byteLength:l};return o!==void 0&&(f.target=o),o===pe.ARRAY_BUFFER&&(f.byteStride=e.itemSize*s),this.byteOffset+=l,a.bufferViews.push(f),{id:a.bufferViews.length-1,byteLength:0}}processBufferViewImage(e){const n=this,r=n.json;return r.bufferViews||(r.bufferViews=[]),e.arrayBuffer().then(i=>{const o=cr(i),a={buffer:n.processBuffer(o),byteOffset:n.byteOffset,byteLength:o.byteLength};return n.byteOffset+=o.byteLength,r.bufferViews.push(a)-1})}processAccessor(e,n,r,i){const o=this.json,a={1:"SCALAR",2:"VEC2",3:"VEC3",4:"VEC4",9:"MAT3",16:"MAT4"};let s;if(e.array.constructor===Float32Array)s=pe.FLOAT;else if(e.array.constructor===Int32Array)s=pe.INT;else if(e.array.constructor===Uint32Array)s=pe.UNSIGNED_INT;else if(e.array.constructor===Int16Array)s=pe.SHORT;else if(e.array.constructor===Uint16Array)s=pe.UNSIGNED_SHORT;else if(e.array.constructor===Int8Array)s=pe.BYTE;else if(e.array.constructor===Uint8Array)s=pe.UNSIGNED_BYTE;else throw new Error("THREE.GLTFExporter: Unsupported bufferAttribute component type: "+e.array.constructor.name);if(r===void 0&&(r=0),i===void 0&&(i=e.count),i===0)return null;const l=Eu(e,r,i);let u;n!==void 0&&(u=e===n.index?pe.ELEMENT_ARRAY_BUFFER:pe.ARRAY_BUFFER);const c=this.processBufferView(e,s,r,i,u),f={bufferView:c.id,byteOffset:c.byteOffset,componentType:s,count:i,max:l.max,min:l.min,type:a[e.itemSize]};return e.normalized===!0&&(f.normalized=!0),o.accessors||(o.accessors=[]),o.accessors.push(f)-1}processImage(e,n,r,i="image/png"){if(e!==null){const o=this,a=o.cache,s=o.json,l=o.options,u=o.pending;a.images.has(e)||a.images.set(e,{});const c=a.images.get(e),f=i+":flipY/"+r.toString();if(c[f]!==void 0)return c[f];s.images||(s.images=[]);const p={mimeType:i},d=Vi();d.width=Math.min(e.width,l.maxTextureSize),d.height=Math.min(e.height,l.maxTextureSize);const y=d.getContext("2d");if(r===!0&&(y.translate(0,d.height),y.scale(1,-1)),e.data!==void 0){n!==Nr&&console.error("GLTFExporter: Only RGBAFormat is supported.",n),(e.width>l.maxTextureSize||e.height>l.maxTextureSize)&&console.warn("GLTFExporter: Image size is bigger than maxTextureSize",e);const v=new Uint8ClampedArray(e.height*e.width*4);for(let k=0;ko.processBufferViewImage(v)).then(v=>{p.bufferView=v})):d.toDataURL!==void 0?p.uri=d.toDataURL(i):u.push(Hi(d,i).then(Bi).then(v=>{p.uri=v}));const x=s.images.push(p)-1;return c[f]=x,x}else throw new Error("THREE.GLTFExporter: No valid image data found. Unable to process texture.")}processSampler(e){const n=this.json;n.samplers||(n.samplers=[]);const r={magFilter:Je[e.magFilter],minFilter:Je[e.minFilter],wrapS:Je[e.wrapS],wrapT:Je[e.wrapT]};return n.samplers.push(r)-1}processTexture(e){const n=this.options,r=this.cache,i=this.json;if(r.textures.has(e))return r.textures.get(e);i.textures||(i.textures=[]),e instanceof er&&(e=lr(e,n.maxTextureSize));let o=e.userData.mimeType;o==="image/webp"&&(o="image/png");const a={sampler:this.processSampler(e),source:this.processImage(e.image,e.format,e.flipY,o)};e.name&&(a.name=e.name),this._invokeAll(function(l){l.writeTexture&&l.writeTexture(e,a)});const s=i.textures.push(a)-1;return r.textures.set(e,s),s}processMaterial(e){const n=this.cache,r=this.json;if(n.materials.has(e))return n.materials.get(e);if(e.isShaderMaterial)return console.warn("GLTFExporter: THREE.ShaderMaterial not supported."),null;r.materials||(r.materials=[]);const i={pbrMetallicRoughness:{}};e.isMeshStandardMaterial!==!0&&e.isMeshBasicMaterial!==!0&&console.warn("GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.");const o=e.color.toArray().concat([e.opacity]);if(un(o,[1,1,1,1])||(i.pbrMetallicRoughness.baseColorFactor=o),e.isMeshStandardMaterial?(i.pbrMetallicRoughness.metallicFactor=e.metalness,i.pbrMetallicRoughness.roughnessFactor=e.roughness):(i.pbrMetallicRoughness.metallicFactor=.5,i.pbrMetallicRoughness.roughnessFactor=.5),e.metalnessMap||e.roughnessMap){const s=this.buildMetalRoughTexture(e.metalnessMap,e.roughnessMap),l={index:this.processTexture(s),channel:s.channel};this.applyTextureTransform(l,s),i.pbrMetallicRoughness.metallicRoughnessTexture=l}if(e.map){const s={index:this.processTexture(e.map),texCoord:e.map.channel};this.applyTextureTransform(s,e.map),i.pbrMetallicRoughness.baseColorTexture=s}if(e.emissive){const s=e.emissive;if(Math.max(s.r,s.g,s.b)>0&&(i.emissiveFactor=e.emissive.toArray()),e.emissiveMap){const l={index:this.processTexture(e.emissiveMap),texCoord:e.emissiveMap.channel};this.applyTextureTransform(l,e.emissiveMap),i.emissiveTexture=l}}if(e.normalMap){const s={index:this.processTexture(e.normalMap),texCoord:e.normalMap.channel};e.normalScale&&e.normalScale.x!==1&&(s.scale=e.normalScale.x),this.applyTextureTransform(s,e.normalMap),i.normalTexture=s}if(e.aoMap){const s={index:this.processTexture(e.aoMap),texCoord:e.aoMap.channel};e.aoMapIntensity!==1&&(s.strength=e.aoMapIntensity),this.applyTextureTransform(s,e.aoMap),i.occlusionTexture=s}e.transparent?i.alphaMode="BLEND":e.alphaTest>0&&(i.alphaMode="MASK",i.alphaCutoff=e.alphaTest),e.side===qn&&(i.doubleSided=!0),e.name!==""&&(i.name=e.name),this.serializeUserData(e,i),this._invokeAll(function(s){s.writeMaterial&&s.writeMaterial(e,i)});const a=r.materials.push(i)-1;return n.materials.set(e,a),a}processMesh(e){const n=this.cache,r=this.json,i=[e.geometry.uuid];if(Array.isArray(e.material))for(let A=0,C=e.material.length;A=152?{uv:"TEXCOORD_0",uv1:"TEXCOORD_1",uv2:"TEXCOORD_2",uv3:"TEXCOORD_3"}:{uv:"TEXCOORD_0",uv2:"TEXCOORD_1"},color:"COLOR_0",skinWeight:"WEIGHTS_0",skinIndex:"JOINTS_0"},d=a.getAttribute("normal");d!==void 0&&!this.isNormalizedNormalAttribute(d)&&(console.warn("THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one."),a.setAttribute("normal",this.createNormalizedNormalAttribute(d)));let y=null;for(let A in a.attributes){if(A.slice(0,5)==="morph")continue;const C=a.attributes[A];if(A=p[A]||A.toUpperCase(),/^(POSITION|NORMAL|TANGENT|TEXCOORD_\d+|COLOR_\d+|JOINTS_\d+|WEIGHTS_\d+)$/.test(A)||(A="_"+A),n.attributes.has(this.getUID(C))){u[A]=n.attributes.get(this.getUID(C));continue}y=null;const P=C.array;A==="JOINTS_0"&&!(P instanceof Uint16Array)&&!(P instanceof Uint8Array)&&(console.warn('GLTFExporter: Attribute "skinIndex" converted to type UNSIGNED_SHORT.'),y=new Nt(new Uint16Array(P),C.itemSize,C.normalized));const h=this.processAccessor(y||C,a);h!==null&&(A.startsWith("_")||this.detectMeshQuantization(A,C),u[A]=h,n.attributes.set(this.getUID(C),h))}if(d!==void 0&&a.setAttribute("normal",d),Object.keys(u).length===0)return null;if(e.morphTargetInfluences!==void 0&&e.morphTargetInfluences.length>0){const A=[],C=[],P={};if(e.morphTargetDictionary!==void 0)for(const h in e.morphTargetDictionary)P[e.morphTargetDictionary[h]]=h;for(let h=0;h0&&(l.extras={},l.extras.targetNames=C)}const x=Array.isArray(e.material);if(x&&a.groups.length===0)return null;const v=x?e.material:[e.material],k=x?a.groups:[{materialIndex:0,start:void 0,count:void 0}];for(let A=0,C=k.length;A0&&(P.targets=f),a.index!==null){let I=this.getUID(a.index);(k[A].start!==void 0||k[A].count!==void 0)&&(I+=":"+k[A].start+":"+k[A].count),n.attributes.has(I)?P.indices=n.attributes.get(I):(P.indices=this.processAccessor(a.index,a,k[A].start,k[A].count),n.attributes.set(I,P.indices)),P.indices===null&&delete P.indices}const h=this.processMaterial(v[k[A].materialIndex]);h!==null&&(P.material=h),c.push(P)}l.primitives=c,r.meshes||(r.meshes=[]),this._invokeAll(function(A){A.writeMesh&&A.writeMesh(e,l)});const M=r.meshes.push(l)-1;return n.meshes.set(o,M),M}detectMeshQuantization(e,n){if(this.extensionsUsed[ur])return;let r;switch(n.array.constructor){case Int8Array:r="byte";break;case Uint8Array:r="unsigned byte";break;case Int16Array:r="short";break;case Uint16Array:r="unsigned short";break;default:return}n.normalized&&(r+=" normalized");const i=e.split("_",1)[0];Fi[i]&&Fi[i].includes(r)&&(this.extensionsUsed[ur]=!0,this.extensionsRequired[ur]=!0)}processCamera(e){const n=this.json;n.cameras||(n.cameras=[]);const r=e.isOrthographicCamera,i={type:r?"orthographic":"perspective"};return r?i.orthographic={xmag:e.right*2,ymag:e.top*2,zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near}:i.perspective={aspectRatio:e.aspect,yfov:Dt.degToRad(e.fov),zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near},e.name!==""&&(i.name=e.type),n.cameras.push(i)-1}processAnimation(e,n){const r=this.json,i=this.nodeMap;r.animations||(r.animations=[]),e=ya.Utils.mergeMorphTargetTracks(e.clone(),n);const o=e.tracks,a=[],s=[];for(let l=0;l0){const s=[];for(let l=0,u=e.children.length;l0&&(o.children=s)}this._invokeAll(function(s){s.writeNode&&s.writeNode(e,o)});const a=n.nodes.push(o)-1;return i.set(e,a),a}processScene(e){const n=this.json,r=this.options;n.scenes||(n.scenes=[],n.scene=0);const i={};e.name!==""&&(i.name=e.name),n.scenes.push(i);const o=[];for(let a=0,s=e.children.length;a0&&(i.nodes=o),this.serializeUserData(e,i)}processObjects(e){const n=new Lr;n.name="AuxScene";for(let r=0;r0&&this.processObjects(r);for(let i=0;i0&&(a.range=e.distance)):e.isSpotLight&&(a.type="spot",e.distance>0&&(a.range=e.distance),a.spot={},a.spot.innerConeAngle=(e.penumbra-1)*e.angle*-1,a.spot.outerConeAngle=e.angle),e.decay!==void 0&&e.decay!==2&&console.warn("THREE.GLTFExporter: Light decay may be lost. glTF is physically-based, and expects light.decay=2."),e.target&&(e.target.parent!==e||e.target.position.x!==0||e.target.position.y!==0||e.target.position.z!==-1)&&console.warn("THREE.GLTFExporter: Light direction may be lost. For best results, make light.target a child of the light with position 0,0,-1."),o[this.name]||(i.extensions=i.extensions||{},i.extensions[this.name]={lights:[]},o[this.name]=!0);const s=i.extensions[this.name].lights;s.push(a),n.extensions=n.extensions||{},n.extensions[this.name]={light:s.length-1}}}let Iu=class{constructor(t){this.writer=t,this.name="KHR_materials_unlit"}writeMaterial(t,e){if(!t.isMeshBasicMaterial)return;const n=this.writer.extensionsUsed;e.extensions=e.extensions||{},e.extensions[this.name]={},n[this.name]=!0,e.pbrMetallicRoughness.metallicFactor=0,e.pbrMetallicRoughness.roughnessFactor=.9}},Ru=class{constructor(t){this.writer=t,this.name="KHR_materials_clearcoat"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.clearcoat===0)return;const n=this.writer,r=n.extensionsUsed,i={};if(i.clearcoatFactor=t.clearcoat,t.clearcoatMap){const o={index:n.processTexture(t.clearcoatMap),texCoord:t.clearcoatMap.channel};n.applyTextureTransform(o,t.clearcoatMap),i.clearcoatTexture=o}if(i.clearcoatRoughnessFactor=t.clearcoatRoughness,t.clearcoatRoughnessMap){const o={index:n.processTexture(t.clearcoatRoughnessMap),texCoord:t.clearcoatRoughnessMap.channel};n.applyTextureTransform(o,t.clearcoatRoughnessMap),i.clearcoatRoughnessTexture=o}if(t.clearcoatNormalMap){const o={index:n.processTexture(t.clearcoatNormalMap),texCoord:t.clearcoatNormalMap.channel};n.applyTextureTransform(o,t.clearcoatNormalMap),i.clearcoatNormalTexture=o}e.extensions=e.extensions||{},e.extensions[this.name]=i,r[this.name]=!0}},Cu=class{constructor(t){this.writer=t,this.name="KHR_materials_iridescence"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.iridescence===0)return;const n=this.writer,r=n.extensionsUsed,i={};if(i.iridescenceFactor=t.iridescence,t.iridescenceMap){const o={index:n.processTexture(t.iridescenceMap),texCoord:t.iridescenceMap.channel};n.applyTextureTransform(o,t.iridescenceMap),i.iridescenceTexture=o}if(i.iridescenceIor=t.iridescenceIOR,i.iridescenceThicknessMinimum=t.iridescenceThicknessRange[0],i.iridescenceThicknessMaximum=t.iridescenceThicknessRange[1],t.iridescenceThicknessMap){const o={index:n.processTexture(t.iridescenceThicknessMap),texCoord:t.iridescenceThicknessMap.channel};n.applyTextureTransform(o,t.iridescenceThicknessMap),i.iridescenceThicknessTexture=o}e.extensions=e.extensions||{},e.extensions[this.name]=i,r[this.name]=!0}},Nu=class{constructor(t){this.writer=t,this.name="KHR_materials_transmission"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.transmission===0)return;const n=this.writer,r=n.extensionsUsed,i={};if(i.transmissionFactor=t.transmission,t.transmissionMap){const o={index:n.processTexture(t.transmissionMap),texCoord:t.transmissionMap.channel};n.applyTextureTransform(o,t.transmissionMap),i.transmissionTexture=o}e.extensions=e.extensions||{},e.extensions[this.name]=i,r[this.name]=!0}},Lu=class{constructor(t){this.writer=t,this.name="KHR_materials_volume"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.transmission===0)return;const n=this.writer,r=n.extensionsUsed,i={};if(i.thicknessFactor=t.thickness,t.thicknessMap){const o={index:n.processTexture(t.thicknessMap),texCoord:t.thicknessMap.channel};n.applyTextureTransform(o,t.thicknessMap),i.thicknessTexture=o}i.attenuationDistance=t.attenuationDistance,i.attenuationColor=t.attenuationColor.toArray(),e.extensions=e.extensions||{},e.extensions[this.name]=i,r[this.name]=!0}},Pu=class{constructor(t){this.writer=t,this.name="KHR_materials_ior"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.ior===1.5)return;const n=this.writer.extensionsUsed,r={};r.ior=t.ior,e.extensions=e.extensions||{},e.extensions[this.name]=r,n[this.name]=!0}},Du=class{constructor(t){this.writer=t,this.name="KHR_materials_specular"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.specularIntensity===1&&t.specularColor.equals(vu)&&!t.specularIntensityMap&&!t.specularColorTexture)return;const n=this.writer,r=n.extensionsUsed,i={};if(t.specularIntensityMap){const o={index:n.processTexture(t.specularIntensityMap),texCoord:t.specularIntensityMap.channel};n.applyTextureTransform(o,t.specularIntensityMap),i.specularTexture=o}if(t.specularColorMap){const o={index:n.processTexture(t.specularColorMap),texCoord:t.specularColorMap.channel};n.applyTextureTransform(o,t.specularColorMap),i.specularColorTexture=o}i.specularFactor=t.specularIntensity,i.specularColorFactor=t.specularColor.toArray(),e.extensions=e.extensions||{},e.extensions[this.name]=i,r[this.name]=!0}},Ou=class{constructor(t){this.writer=t,this.name="KHR_materials_sheen"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.sheen==0)return;const n=this.writer,r=n.extensionsUsed,i={};if(t.sheenRoughnessMap){const o={index:n.processTexture(t.sheenRoughnessMap),texCoord:t.sheenRoughnessMap.channel};n.applyTextureTransform(o,t.sheenRoughnessMap),i.sheenRoughnessTexture=o}if(t.sheenColorMap){const o={index:n.processTexture(t.sheenColorMap),texCoord:t.sheenColorMap.channel};n.applyTextureTransform(o,t.sheenColorMap),i.sheenColorTexture=o}i.sheenRoughnessFactor=t.sheenRoughness,i.sheenColorFactor=t.sheenColor.toArray(),e.extensions=e.extensions||{},e.extensions[this.name]=i,r[this.name]=!0}},Bu=class{constructor(t){this.writer=t,this.name="KHR_materials_anisotropy"}writeMaterial(t,e){if(!t.isMeshPhysicalMaterial||t.anisotropy==0)return;const n=this.writer,r=n.extensionsUsed,i={};if(t.anisotropyMap){const o={index:n.processTexture(t.anisotropyMap)};n.applyTextureTransform(o,t.anisotropyMap),i.anisotropyTexture=o}i.anisotropyStrength=t.anisotropy,i.anisotropyRotation=t.anisotropyRotation,e.extensions=e.extensions||{},e.extensions[this.name]=i,r[this.name]=!0}},Fu=class{constructor(t){this.writer=t,this.name="KHR_materials_emissive_strength"}writeMaterial(t,e){if(!t.isMeshStandardMaterial||t.emissiveIntensity===1)return;const n=this.writer.extensionsUsed,r={};r.emissiveStrength=t.emissiveIntensity,e.extensions=e.extensions||{},e.extensions[this.name]=r,n[this.name]=!0}};var xn=Uint8Array,va=Uint16Array,zu=Uint32Array,Uu=new xn([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ju=new xn([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ba=function(t,e){for(var n=new va(31),r=0;r<31;++r)n[r]=e+=1<>>1|(Ne&21845)<<1;wt=(wt&52428)>>>2|(wt&13107)<<2,wt=(wt&61680)>>>4|(wt&3855)<<4,Gu[Ne]=((wt&65280)>>>8|(wt&255)<<8)>>>1}var Wn=new xn(288);for(var Ne=0;Ne<144;++Ne)Wn[Ne]=8;for(var Ne=144;Ne<256;++Ne)Wn[Ne]=9;for(var Ne=256;Ne<280;++Ne)Wn[Ne]=7;for(var Ne=280;Ne<288;++Ne)Wn[Ne]=8;var $u=new xn(32);for(var Ne=0;Ne<32;++Ne)$u[Ne]=5;var Yu=new xn(0),qu=typeof TextDecoder<"u"&&new TextDecoder,Ku=0;try{qu.decode(Yu,{stream:!0}),Ku=1}catch{}var Wu=Object.defineProperty,Xu=(t,e,n)=>e in t?Wu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qu=(t,e,n)=>(Xu(t,e+"",n),n);const ka=class extends Pt{constructor(t,e={}){super(t),this.isReflector=!0,this.type="Reflector",this.camera=new Et;const n=this,r=e.color!==void 0?new ze(e.color):new ze(8355711),i=e.textureWidth||512,o=e.textureHeight||512,a=e.clipBias||0,s=e.shader||ka.ReflectorShader,l=e.multisample!==void 0?e.multisample:4,u=new qo,c=new ae,f=new ae,p=new ae,d=new xt,y=new ae(0,0,-1),x=new Mt,v=new ae,k=new ae,M=new Mt,A=new xt,C=this.camera,P=new Ys(i,o,{samples:l,type:qs}),h=new yn({uniforms:ni.clone(s.uniforms),fragmentShader:s.fragmentShader,vertexShader:s.vertexShader});h.uniforms.tDiffuse.value=P.texture,h.uniforms.color.value=r,h.uniforms.textureMatrix.value=A,this.material=h,this.onBeforeRender=function(I,b,g){if(f.setFromMatrixPosition(n.matrixWorld),p.setFromMatrixPosition(g.matrixWorld),d.extractRotation(n.matrixWorld),c.set(0,0,1),c.applyMatrix4(d),v.subVectors(f,p),v.dot(c)>0)return;v.reflect(c).negate(),v.add(f),d.extractRotation(g.matrixWorld),y.set(0,0,-1),y.applyMatrix4(d),y.add(p),k.subVectors(f,y),k.reflect(c).negate(),k.add(f),C.position.copy(v),C.up.set(0,1,0),C.up.applyMatrix4(d),C.up.reflect(c),C.lookAt(k),C.far=g.far,C.updateMatrixWorld(),C.projectionMatrix.copy(g.projectionMatrix),A.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),A.multiply(C.projectionMatrix),A.multiply(C.matrixWorldInverse),A.multiply(n.matrixWorld),u.setFromNormalAndCoplanarPoint(c,f),u.applyMatrix4(C.matrixWorldInverse),x.set(u.normal.x,u.normal.y,u.normal.z,u.constant);const m=C.projectionMatrix;M.x=(Math.sign(x.x)+m.elements[8])/m.elements[0],M.y=(Math.sign(x.y)+m.elements[9])/m.elements[5],M.z=-1,M.w=(1+m.elements[10])/m.elements[14],x.multiplyScalar(2/x.dot(M)),m.elements[2]=x.x,m.elements[6]=x.y,m.elements[10]=x.z+1-a,m.elements[14]=x.w,n.visible=!1;const T=I.getRenderTarget(),S=I.xr.enabled,F=I.shadowMap.autoUpdate,D=I.toneMapping;let B=!1;"outputColorSpace"in I?B=I.outputColorSpace==="srgb":B=I.outputEncoding===3001,I.xr.enabled=!1,I.shadowMap.autoUpdate=!1,"outputColorSpace"in I?I.outputColorSpace="srgb-linear":I.outputEncoding=3e3,I.toneMapping=Ks,I.setRenderTarget(P),I.state.buffers.depth.setMask(!0),I.autoClear===!1&&I.clear(),I.render(b,C),I.xr.enabled=S,I.shadowMap.autoUpdate=F,I.toneMapping=D,"outputColorSpace"in I?I.outputColorSpace=B?"srgb":"srgb-linear":I.outputEncoding=B?3001:3e3,I.setRenderTarget(T);const j=g.viewport;j!==void 0&&I.state.viewport(j),n.visible=!0},this.getRenderTarget=function(){return P},this.dispose=function(){P.dispose(),n.material.dispose()}}};let Or=ka;Qu(Or,"ReflectorShader",{uniforms:{color:{value:null},tDiffuse:{value:null},textureMatrix:{value:null}},vertexShader:` + uniform mat4 textureMatrix; + varying vec4 vUv; + + #include + #include + + void main() { + + vUv = textureMatrix * vec4( position, 1.0 ); + + gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); + + #include + + }`,fragmentShader:` + uniform vec3 color; + uniform sampler2D tDiffuse; + varying vec4 vUv; + + #include + + float blendOverlay( float base, float blend ) { + + return( base < 0.5 ? ( 2.0 * base * blend ) : ( 1.0 - 2.0 * ( 1.0 - base ) * ( 1.0 - blend ) ) ); + + } + + vec3 blendOverlay( vec3 base, vec3 blend ) { + + return vec3( blendOverlay( base.r, blend.r ), blendOverlay( base.g, blend.g ), blendOverlay( base.b, blend.b ) ); + + } + + void main() { + + #include + + vec4 base = texture2DProj( tDiffuse, vUv ); + gl_FragColor = vec4( blendOverlay( base.rgb, color ), 1.0 ); + + #include + #include <${ci>=154?"colorspace_fragment":"encodings_fragment"}> + + }`});var Zu=Object.defineProperty,Ju=(t,e,n)=>e in t?Zu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ta=(t,e,n)=>(Ju(t,typeof e!="symbol"?e+"":e,n),n);const Xn=new Ko,ec=new Float32Array([-1,-1,0,0,0,1,-1,0,1,0,1,1,0,1,1,-1,1,0,0,1]),_a=new Wo(ec,5);Xn.setIndex([0,1,2,0,2,3]);Xn.setAttribute("position",new ti(_a,3,0,!1));Xn.setAttribute("uv",new ti(_a,2,3,!1));const Br=class extends Pt{constructor(){super(Br.Geometry,new Vt({opacity:0,transparent:!0})),this.isLensflare=!0,this.type="Lensflare",this.frustumCulled=!1,this.renderOrder=1/0;const t=new ae,e=new ae,n=new Si(new Uint8Array(16*16*3),16,16,Nr);n.minFilter=Lt,n.magFilter=Lt,n.wrapS=Ht,n.wrapT=Ht;const r=new Si(new Uint8Array(16*16*3),16,16,Nr);r.minFilter=Lt,r.magFilter=Lt,r.wrapS=Ht,r.wrapT=Ht;const i=Br.Geometry,o=new tr({uniforms:{scale:{value:null},screenPosition:{value:null}},vertexShader:` + + precision highp float; + + uniform vec3 screenPosition; + uniform vec2 scale; + + attribute vec3 position; + + void main() { + + gl_Position = vec4( position.xy * scale + screenPosition.xy, screenPosition.z, 1.0 ); + + }`,fragmentShader:` + + precision highp float; + + void main() { + + gl_FragColor = vec4( 1.0, 0.0, 1.0, 1.0 ); + + }`,depthTest:!0,depthWrite:!1,transparent:!1}),a=new tr({uniforms:{map:{value:n},scale:{value:null},screenPosition:{value:null}},vertexShader:` + + precision highp float; + + uniform vec3 screenPosition; + uniform vec2 scale; + + attribute vec3 position; + attribute vec2 uv; + + varying vec2 vUV; + + void main() { + + vUV = uv; + + gl_Position = vec4( position.xy * scale + screenPosition.xy, screenPosition.z, 1.0 ); + + }`,fragmentShader:` + + precision highp float; + + uniform sampler2D map; + + varying vec2 vUV; + + void main() { + + gl_FragColor = texture2D( map, vUV ); + + }`,depthTest:!1,depthWrite:!1,transparent:!1}),s=new Pt(i,o),l=[],u=Aa.Shader,c=new tr({uniforms:{map:{value:null},occlusionMap:{value:r},color:{value:new ze(16777215)},scale:{value:new Pe},screenPosition:{value:new ae}},vertexShader:u.vertexShader,fragmentShader:u.fragmentShader,blending:Ws,transparent:!0,depthWrite:!1}),f=new Pt(i,c);this.addElement=function(v){l.push(v)};const p=new Pe,d=new Pe,y=new Xs,x=new Mt;this.onBeforeRender=function(v,k,M){v.getCurrentViewport(x);const A=x.w/x.z,C=x.z/2,P=x.w/2;let h=16/x.w;if(p.set(h*A,h),y.min.set(x.x,x.y),y.max.set(x.x+(x.z-16),x.y+(x.w-16)),e.setFromMatrixPosition(this.matrixWorld),e.applyMatrix4(M.matrixWorldInverse),!(e.z>0)&&(t.copy(e).applyMatrix4(M.projectionMatrix),d.x=x.x+t.x*C+C-8,d.y=x.y+t.y*P+P-8,y.containsPoint(d))){v.copyFramebufferToTexture(d,n);let I=o.uniforms;I.scale.value=p,I.screenPosition.value=t,v.renderBufferDirect(M,null,i,o,s,null),v.copyFramebufferToTexture(d,r),I=a.uniforms,I.scale.value=p,I.screenPosition.value=t,v.renderBufferDirect(M,null,i,a,s,null);const b=-t.x*2,g=-t.y*2;for(let m=0,T=l.length;me in t?nc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ea=(t,e,n)=>(rc(t,typeof e!="symbol"?e+"":e,n),n);const Pn={uniforms:{turbidity:{value:2},rayleigh:{value:1},mieCoefficient:{value:.005},mieDirectionalG:{value:.8},sunPosition:{value:new ae},up:{value:new ae(0,1,0)}},vertexShader:` + uniform vec3 sunPosition; + uniform float rayleigh; + uniform float turbidity; + uniform float mieCoefficient; + uniform vec3 up; + + varying vec3 vWorldPosition; + varying vec3 vSunDirection; + varying float vSunfade; + varying vec3 vBetaR; + varying vec3 vBetaM; + varying float vSunE; + + // constants for atmospheric scattering + const float e = 2.71828182845904523536028747135266249775724709369995957; + const float pi = 3.141592653589793238462643383279502884197169; + + // wavelength of used primaries, according to preetham + const vec3 lambda = vec3( 680E-9, 550E-9, 450E-9 ); + // this pre-calcuation replaces older TotalRayleigh(vec3 lambda) function: + // (8.0 * pow(pi, 3.0) * pow(pow(n, 2.0) - 1.0, 2.0) * (6.0 + 3.0 * pn)) / (3.0 * N * pow(lambda, vec3(4.0)) * (6.0 - 7.0 * pn)) + const vec3 totalRayleigh = vec3( 5.804542996261093E-6, 1.3562911419845635E-5, 3.0265902468824876E-5 ); + + // mie stuff + // K coefficient for the primaries + const float v = 4.0; + const vec3 K = vec3( 0.686, 0.678, 0.666 ); + // MieConst = pi * pow( ( 2.0 * pi ) / lambda, vec3( v - 2.0 ) ) * K + const vec3 MieConst = vec3( 1.8399918514433978E14, 2.7798023919660528E14, 4.0790479543861094E14 ); + + // earth shadow hack + // cutoffAngle = pi / 1.95; + const float cutoffAngle = 1.6110731556870734; + const float steepness = 1.5; + const float EE = 1000.0; + + float sunIntensity( float zenithAngleCos ) { + zenithAngleCos = clamp( zenithAngleCos, -1.0, 1.0 ); + return EE * max( 0.0, 1.0 - pow( e, -( ( cutoffAngle - acos( zenithAngleCos ) ) / steepness ) ) ); + } + + vec3 totalMie( float T ) { + float c = ( 0.2 * T ) * 10E-18; + return 0.434 * c * MieConst; + } + + void main() { + + vec4 worldPosition = modelMatrix * vec4( position, 1.0 ); + vWorldPosition = worldPosition.xyz; + + gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); + gl_Position.z = gl_Position.w; // set z to camera.far + + vSunDirection = normalize( sunPosition ); + + vSunE = sunIntensity( dot( vSunDirection, up ) ); + + vSunfade = 1.0 - clamp( 1.0 - exp( ( sunPosition.y / 450000.0 ) ), 0.0, 1.0 ); + + float rayleighCoefficient = rayleigh - ( 1.0 * ( 1.0 - vSunfade ) ); + + // extinction (absorbtion + out scattering) + // rayleigh coefficients + vBetaR = totalRayleigh * rayleighCoefficient; + + // mie coefficients + vBetaM = totalMie( turbidity ) * mieCoefficient; + + } + `,fragmentShader:` + varying vec3 vWorldPosition; + varying vec3 vSunDirection; + varying float vSunfade; + varying vec3 vBetaR; + varying vec3 vBetaM; + varying float vSunE; + + uniform float mieDirectionalG; + uniform vec3 up; + + const vec3 cameraPos = vec3( 0.0, 0.0, 0.0 ); + + // constants for atmospheric scattering + const float pi = 3.141592653589793238462643383279502884197169; + + const float n = 1.0003; // refractive index of air + const float N = 2.545E25; // number of molecules per unit volume for air at 288.15K and 1013mb (sea level -45 celsius) + + // optical length at zenith for molecules + const float rayleighZenithLength = 8.4E3; + const float mieZenithLength = 1.25E3; + // 66 arc seconds -> degrees, and the cosine of that + const float sunAngularDiameterCos = 0.999956676946448443553574619906976478926848692873900859324; + + // 3.0 / ( 16.0 * pi ) + const float THREE_OVER_SIXTEENPI = 0.05968310365946075; + // 1.0 / ( 4.0 * pi ) + const float ONE_OVER_FOURPI = 0.07957747154594767; + + float rayleighPhase( float cosTheta ) { + return THREE_OVER_SIXTEENPI * ( 1.0 + pow( cosTheta, 2.0 ) ); + } + + float hgPhase( float cosTheta, float g ) { + float g2 = pow( g, 2.0 ); + float inverse = 1.0 / pow( 1.0 - 2.0 * g * cosTheta + g2, 1.5 ); + return ONE_OVER_FOURPI * ( ( 1.0 - g2 ) * inverse ); + } + + void main() { + + vec3 direction = normalize( vWorldPosition - cameraPos ); + + // optical length + // cutoff angle at 90 to avoid singularity in next formula. + float zenithAngle = acos( max( 0.0, dot( up, direction ) ) ); + float inverse = 1.0 / ( cos( zenithAngle ) + 0.15 * pow( 93.885 - ( ( zenithAngle * 180.0 ) / pi ), -1.253 ) ); + float sR = rayleighZenithLength * inverse; + float sM = mieZenithLength * inverse; + + // combined extinction factor + vec3 Fex = exp( -( vBetaR * sR + vBetaM * sM ) ); + + // in scattering + float cosTheta = dot( direction, vSunDirection ); + + float rPhase = rayleighPhase( cosTheta * 0.5 + 0.5 ); + vec3 betaRTheta = vBetaR * rPhase; + + float mPhase = hgPhase( cosTheta, mieDirectionalG ); + vec3 betaMTheta = vBetaM * mPhase; + + vec3 Lin = pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * ( 1.0 - Fex ), vec3( 1.5 ) ); + Lin *= mix( vec3( 1.0 ), pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * Fex, vec3( 1.0 / 2.0 ) ), clamp( pow( 1.0 - dot( up, vSunDirection ), 5.0 ), 0.0, 1.0 ) ); + + // nightsky + float theta = acos( direction.y ); // elevation --> y-axis, [-pi/2, pi/2] + float phi = atan( direction.z, direction.x ); // azimuth --> x-axis [-pi/2, pi/2] + vec2 uv = vec2( phi, theta ) / vec2( 2.0 * pi, pi ) + vec2( 0.5, 0.0 ); + vec3 L0 = vec3( 0.1 ) * Fex; + + // composition + solar disc + float sundisk = smoothstep( sunAngularDiameterCos, sunAngularDiameterCos + 0.00002, cosTheta ); + L0 += ( vSunE * 19000.0 * Fex ) * sundisk; + + vec3 texColor = ( Lin + L0 ) * 0.04 + vec3( 0.0, 0.0003, 0.00075 ); + + vec3 retColor = pow( texColor, vec3( 1.0 / ( 1.2 + ( 1.2 * vSunfade ) ) ) ); + + gl_FragColor = vec4( retColor, 1.0 ); + + #include + #include <${ci>=154?"colorspace_fragment":"encodings_fragment"}> + + } + `},Ma=new yn({name:"SkyShader",fragmentShader:Pn.fragmentShader,vertexShader:Pn.vertexShader,uniforms:ni.clone(Pn.uniforms),side:Ds,depthWrite:!1});class Sa extends Pt{constructor(){super(new $s(1,1,1),Ma)}}Ea(Sa,"SkyShader",Pn);Ea(Sa,"material",Ma);new Os;new ae;new Xo(0,0,0,"YXZ");new ae;var ic=Object.defineProperty,oc=(t,e,n)=>e in t?ic(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ne=(t,e,n)=>(oc(t,typeof e!="symbol"?e+"":e,n),n);const Mn=new Ps,Gi=new qo,ac=Math.cos(70*(Math.PI/180)),$i=(t,e)=>(t%e+e)%e;class sc extends Ls{constructor(e,n){super(),ne(this,"object"),ne(this,"domElement"),ne(this,"enabled",!0),ne(this,"target",new ae),ne(this,"minDistance",0),ne(this,"maxDistance",1/0),ne(this,"minZoom",0),ne(this,"maxZoom",1/0),ne(this,"minPolarAngle",0),ne(this,"maxPolarAngle",Math.PI),ne(this,"minAzimuthAngle",-1/0),ne(this,"maxAzimuthAngle",1/0),ne(this,"enableDamping",!1),ne(this,"dampingFactor",.05),ne(this,"enableZoom",!0),ne(this,"zoomSpeed",1),ne(this,"enableRotate",!0),ne(this,"rotateSpeed",1),ne(this,"enablePan",!0),ne(this,"panSpeed",1),ne(this,"screenSpacePanning",!0),ne(this,"keyPanSpeed",7),ne(this,"zoomToCursor",!1),ne(this,"autoRotate",!1),ne(this,"autoRotateSpeed",2),ne(this,"reverseOrbit",!1),ne(this,"reverseHorizontalOrbit",!1),ne(this,"reverseVerticalOrbit",!1),ne(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),ne(this,"mouseButtons",{LEFT:yt.ROTATE,MIDDLE:yt.DOLLY,RIGHT:yt.PAN}),ne(this,"touches",{ONE:_t.ROTATE,TWO:_t.DOLLY_PAN}),ne(this,"target0"),ne(this,"position0"),ne(this,"zoom0"),ne(this,"_domElementKeyEvents",null),ne(this,"getPolarAngle"),ne(this,"getAzimuthalAngle"),ne(this,"setPolarAngle"),ne(this,"setAzimuthalAngle"),ne(this,"getDistance"),ne(this,"getZoomScale"),ne(this,"listenToKeyEvents"),ne(this,"stopListenToKeyEvents"),ne(this,"saveState"),ne(this,"reset"),ne(this,"update"),ne(this,"connect"),ne(this,"dispose"),ne(this,"dollyIn"),ne(this,"dollyOut"),ne(this,"getScale"),ne(this,"setScale"),this.object=e,this.domElement=n,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>c.phi,this.getAzimuthalAngle=()=>c.theta,this.setPolarAngle=L=>{let Y=$i(L,2*Math.PI),X=c.phi;X<0&&(X+=2*Math.PI),Y<0&&(Y+=2*Math.PI);let Ee=Math.abs(Y-X);2*Math.PI-Ee{let Y=$i(L,2*Math.PI),X=c.theta;X<0&&(X+=2*Math.PI),Y<0&&(Y+=2*Math.PI);let Ee=Math.abs(Y-X);2*Math.PI-Eer.object.position.distanceTo(r.target),this.listenToKeyEvents=L=>{L.addEventListener("keydown",ie),this._domElementKeyEvents=L},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",ie),this._domElementKeyEvents=null},this.saveState=()=>{r.target0.copy(r.target),r.position0.copy(r.object.position),r.zoom0=r.object.zoom},this.reset=()=>{r.target.copy(r.target0),r.object.position.copy(r.position0),r.object.zoom=r.zoom0,r.object.updateProjectionMatrix(),r.dispatchEvent(i),r.update(),l=s.NONE},this.update=(()=>{const L=new ae,Y=new ae(0,1,0),X=new Bn().setFromUnitVectors(e.up,Y),Ee=X.clone().invert(),Qe=new ae,at=new Bn,kn=2*Math.PI;return function(){const Ai=r.object.position;X.setFromUnitVectors(e.up,Y),Ee.copy(X).invert(),L.copy(Ai).sub(r.target),L.applyQuaternion(X),c.setFromVector3(L),r.autoRotate&&l===s.NONE&&D(S()),r.enableDamping?(c.theta+=f.theta*r.dampingFactor,c.phi+=f.phi*r.dampingFactor):(c.theta+=f.theta,c.phi+=f.phi);let ht=r.minAzimuthAngle,mt=r.maxAzimuthAngle;isFinite(ht)&&isFinite(mt)&&(ht<-Math.PI?ht+=kn:ht>Math.PI&&(ht-=kn),mt<-Math.PI?mt+=kn:mt>Math.PI&&(mt-=kn),ht<=mt?c.theta=Math.max(ht,Math.min(mt,c.theta)):c.theta=c.theta>(ht+mt)/2?Math.max(ht,c.theta):Math.min(mt,c.theta)),c.phi=Math.max(r.minPolarAngle,Math.min(r.maxPolarAngle,c.phi)),c.makeSafe(),r.enableDamping===!0?r.target.addScaledVector(d,r.dampingFactor):r.target.add(d),r.zoomToCursor&&g||r.object.isOrthographicCamera?c.radius=R(c.radius):c.radius=R(c.radius*p),L.setFromSpherical(c),L.applyQuaternion(Ee),Ai.copy(r.target).add(L),r.object.matrixAutoUpdate||r.object.updateMatrix(),r.object.lookAt(r.target),r.enableDamping===!0?(f.theta*=1-r.dampingFactor,f.phi*=1-r.dampingFactor,d.multiplyScalar(1-r.dampingFactor)):(f.set(0,0,0),d.set(0,0,0));let tn=!1;if(r.zoomToCursor&&g){let nn=null;if(r.object instanceof Et&&r.object.isPerspectiveCamera){const rn=L.length();nn=R(rn*p);const Tn=rn-nn;r.object.position.addScaledVector(I,Tn),r.object.updateMatrixWorld()}else if(r.object.isOrthographicCamera){const rn=new ae(b.x,b.y,0);rn.unproject(r.object),r.object.zoom=Math.max(r.minZoom,Math.min(r.maxZoom,r.object.zoom/p)),r.object.updateProjectionMatrix(),tn=!0;const Tn=new ae(b.x,b.y,0);Tn.unproject(r.object),r.object.position.sub(Tn).add(rn),r.object.updateMatrixWorld(),nn=L.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),r.zoomToCursor=!1;nn!==null&&(r.screenSpacePanning?r.target.set(0,0,-1).transformDirection(r.object.matrix).multiplyScalar(nn).add(r.object.position):(Mn.origin.copy(r.object.position),Mn.direction.set(0,0,-1).transformDirection(r.object.matrix),Math.abs(r.object.up.dot(Mn.direction))u||8*(1-at.dot(r.object.quaternion))>u?(r.dispatchEvent(i),Qe.copy(r.object.position),at.copy(r.object.quaternion),tn=!1,!0):!1}})(),this.connect=L=>{r.domElement=L,r.domElement.style.touchAction="none",r.domElement.addEventListener("contextmenu",He),r.domElement.addEventListener("pointerdown",Me),r.domElement.addEventListener("pointercancel",tt),r.domElement.addEventListener("wheel",K)},this.dispose=()=>{var L,Y,X,Ee,Qe,at;r.domElement&&(r.domElement.style.touchAction="auto"),(L=r.domElement)==null||L.removeEventListener("contextmenu",He),(Y=r.domElement)==null||Y.removeEventListener("pointerdown",Me),(X=r.domElement)==null||X.removeEventListener("pointercancel",tt),(Ee=r.domElement)==null||Ee.removeEventListener("wheel",K),(Qe=r.domElement)==null||Qe.ownerDocument.removeEventListener("pointermove",Ve),(at=r.domElement)==null||at.ownerDocument.removeEventListener("pointerup",tt),r._domElementKeyEvents!==null&&r._domElementKeyEvents.removeEventListener("keydown",ie)};const r=this,i={type:"change"},o={type:"start"},a={type:"end"},s={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let l=s.NONE;const u=1e-6,c=new Mi,f=new Mi;let p=1;const d=new ae,y=new Pe,x=new Pe,v=new Pe,k=new Pe,M=new Pe,A=new Pe,C=new Pe,P=new Pe,h=new Pe,I=new ae,b=new Pe;let g=!1;const m=[],T={};function S(){return 2*Math.PI/60/60*r.autoRotateSpeed}function F(){return Math.pow(.95,r.zoomSpeed)}function D(L){r.reverseOrbit||r.reverseHorizontalOrbit?f.theta+=L:f.theta-=L}function B(L){r.reverseOrbit||r.reverseVerticalOrbit?f.phi+=L:f.phi-=L}const j=(()=>{const L=new ae;return function(Y,X){L.setFromMatrixColumn(X,0),L.multiplyScalar(-Y),d.add(L)}})(),J=(()=>{const L=new ae;return function(Y,X){r.screenSpacePanning===!0?L.setFromMatrixColumn(X,1):(L.setFromMatrixColumn(X,0),L.crossVectors(r.object.up,L)),L.multiplyScalar(Y),d.add(L)}})(),oe=(()=>{const L=new ae;return function(Y,X){const Ee=r.domElement;if(Ee&&r.object instanceof Et&&r.object.isPerspectiveCamera){const Qe=r.object.position;L.copy(Qe).sub(r.target);let at=L.length();at*=Math.tan(r.object.fov/2*Math.PI/180),j(2*Y*at/Ee.clientHeight,r.object.matrix),J(2*X*at/Ee.clientHeight,r.object.matrix)}else Ee&&r.object instanceof Gt&&r.object.isOrthographicCamera?(j(Y*(r.object.right-r.object.left)/r.object.zoom/Ee.clientWidth,r.object.matrix),J(X*(r.object.top-r.object.bottom)/r.object.zoom/Ee.clientHeight,r.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),r.enablePan=!1)}})();function Z(L){r.object instanceof Et&&r.object.isPerspectiveCamera||r.object instanceof Gt&&r.object.isOrthographicCamera?p=L:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),r.enableZoom=!1)}function _(L){Z(p/L)}function ee(L){Z(p*L)}function me(L){if(!r.zoomToCursor||!r.domElement)return;g=!0;const Y=r.domElement.getBoundingClientRect(),X=L.clientX-Y.left,Ee=L.clientY-Y.top,Qe=Y.width,at=Y.height;b.x=X/Qe*2-1,b.y=-(Ee/at)*2+1,I.set(b.x,b.y,1).unproject(r.object).sub(r.object.position).normalize()}function R(L){return Math.max(r.minDistance,Math.min(r.maxDistance,L))}function ge(L){y.set(L.clientX,L.clientY)}function Te(L){me(L),C.set(L.clientX,L.clientY)}function ye(L){k.set(L.clientX,L.clientY)}function Oe(L){x.set(L.clientX,L.clientY),v.subVectors(x,y).multiplyScalar(r.rotateSpeed);const Y=r.domElement;Y&&(D(2*Math.PI*v.x/Y.clientHeight),B(2*Math.PI*v.y/Y.clientHeight)),y.copy(x),r.update()}function G(L){P.set(L.clientX,L.clientY),h.subVectors(P,C),h.y>0?_(F()):h.y<0&&ee(F()),C.copy(P),r.update()}function w(L){M.set(L.clientX,L.clientY),A.subVectors(M,k).multiplyScalar(r.panSpeed),oe(A.x,A.y),k.copy(M),r.update()}function E(L){me(L),L.deltaY<0?ee(F()):L.deltaY>0&&_(F()),r.update()}function N(L){let Y=!1;switch(L.code){case r.keys.UP:oe(0,r.keyPanSpeed),Y=!0;break;case r.keys.BOTTOM:oe(0,-r.keyPanSpeed),Y=!0;break;case r.keys.LEFT:oe(r.keyPanSpeed,0),Y=!0;break;case r.keys.RIGHT:oe(-r.keyPanSpeed,0),Y=!0;break}Y&&(L.preventDefault(),r.update())}function H(){if(m.length==1)y.set(m[0].pageX,m[0].pageY);else{const L=.5*(m[0].pageX+m[1].pageX),Y=.5*(m[0].pageY+m[1].pageY);y.set(L,Y)}}function z(){if(m.length==1)k.set(m[0].pageX,m[0].pageY);else{const L=.5*(m[0].pageX+m[1].pageX),Y=.5*(m[0].pageY+m[1].pageY);k.set(L,Y)}}function q(){const L=m[0].pageX-m[1].pageX,Y=m[0].pageY-m[1].pageY,X=Math.sqrt(L*L+Y*Y);C.set(0,X)}function te(){r.enableZoom&&q(),r.enablePan&&z()}function xe(){r.enableZoom&&q(),r.enableRotate&&H()}function _e(L){if(m.length==1)x.set(L.pageX,L.pageY);else{const X=pt(L),Ee=.5*(L.pageX+X.x),Qe=.5*(L.pageY+X.y);x.set(Ee,Qe)}v.subVectors(x,y).multiplyScalar(r.rotateSpeed);const Y=r.domElement;Y&&(D(2*Math.PI*v.x/Y.clientHeight),B(2*Math.PI*v.y/Y.clientHeight)),y.copy(x)}function fe(L){if(m.length==1)M.set(L.pageX,L.pageY);else{const Y=pt(L),X=.5*(L.pageX+Y.x),Ee=.5*(L.pageY+Y.y);M.set(X,Ee)}A.subVectors(M,k).multiplyScalar(r.panSpeed),oe(A.x,A.y),k.copy(M)}function ve(L){const Y=pt(L),X=L.pageX-Y.x,Ee=L.pageY-Y.y,Qe=Math.sqrt(X*X+Ee*Ee);P.set(0,Qe),h.set(0,Math.pow(P.y/C.y,r.zoomSpeed)),_(h.y),C.copy(P)}function Ie(L){r.enableZoom&&ve(L),r.enablePan&&fe(L)}function we(L){r.enableZoom&&ve(L),r.enableRotate&&_e(L)}function Me(L){var Y,X;r.enabled!==!1&&(m.length===0&&((Y=r.domElement)==null||Y.ownerDocument.addEventListener("pointermove",Ve),(X=r.domElement)==null||X.ownerDocument.addEventListener("pointerup",tt)),dt(L),L.pointerType==="touch"?ue(L):en(L))}function Ve(L){r.enabled!==!1&&(L.pointerType==="touch"?be(L):U(L))}function tt(L){var Y,X,Ee;ot(L),m.length===0&&((Y=r.domElement)==null||Y.releasePointerCapture(L.pointerId),(X=r.domElement)==null||X.ownerDocument.removeEventListener("pointermove",Ve),(Ee=r.domElement)==null||Ee.ownerDocument.removeEventListener("pointerup",tt)),r.dispatchEvent(a),l=s.NONE}function en(L){let Y;switch(L.button){case 0:Y=r.mouseButtons.LEFT;break;case 1:Y=r.mouseButtons.MIDDLE;break;case 2:Y=r.mouseButtons.RIGHT;break;default:Y=-1}switch(Y){case yt.DOLLY:if(r.enableZoom===!1)return;Te(L),l=s.DOLLY;break;case yt.ROTATE:if(L.ctrlKey||L.metaKey||L.shiftKey){if(r.enablePan===!1)return;ye(L),l=s.PAN}else{if(r.enableRotate===!1)return;ge(L),l=s.ROTATE}break;case yt.PAN:if(L.ctrlKey||L.metaKey||L.shiftKey){if(r.enableRotate===!1)return;ge(L),l=s.ROTATE}else{if(r.enablePan===!1)return;ye(L),l=s.PAN}break;default:l=s.NONE}l!==s.NONE&&r.dispatchEvent(o)}function U(L){if(r.enabled!==!1)switch(l){case s.ROTATE:if(r.enableRotate===!1)return;Oe(L);break;case s.DOLLY:if(r.enableZoom===!1)return;G(L);break;case s.PAN:if(r.enablePan===!1)return;w(L);break}}function K(L){r.enabled===!1||r.enableZoom===!1||l!==s.NONE&&l!==s.ROTATE||(L.preventDefault(),r.dispatchEvent(o),E(L),r.dispatchEvent(a))}function ie(L){r.enabled===!1||r.enablePan===!1||N(L)}function ue(L){switch(bt(L),m.length){case 1:switch(r.touches.ONE){case _t.ROTATE:if(r.enableRotate===!1)return;H(),l=s.TOUCH_ROTATE;break;case _t.PAN:if(r.enablePan===!1)return;z(),l=s.TOUCH_PAN;break;default:l=s.NONE}break;case 2:switch(r.touches.TWO){case _t.DOLLY_PAN:if(r.enableZoom===!1&&r.enablePan===!1)return;te(),l=s.TOUCH_DOLLY_PAN;break;case _t.DOLLY_ROTATE:if(r.enableZoom===!1&&r.enableRotate===!1)return;xe(),l=s.TOUCH_DOLLY_ROTATE;break;default:l=s.NONE}break;default:l=s.NONE}l!==s.NONE&&r.dispatchEvent(o)}function be(L){switch(bt(L),l){case s.TOUCH_ROTATE:if(r.enableRotate===!1)return;_e(L),r.update();break;case s.TOUCH_PAN:if(r.enablePan===!1)return;fe(L),r.update();break;case s.TOUCH_DOLLY_PAN:if(r.enableZoom===!1&&r.enablePan===!1)return;Ie(L),r.update();break;case s.TOUCH_DOLLY_ROTATE:if(r.enableZoom===!1&&r.enableRotate===!1)return;we(L),r.update();break;default:l=s.NONE}}function He(L){r.enabled!==!1&&L.preventDefault()}function dt(L){m.push(L)}function ot(L){delete T[L.pointerId];for(let Y=0;Y{ee(L),r.update()},this.dollyOut=(L=F())=>{_(L),r.update()},this.getScale=()=>p,this.setScale=L=>{Z(L),r.update()},this.getZoomScale=()=>F(),n!==void 0&&this.connect(n),this.update()}}new xt;new ae;new Xo;new ae;var lc=Object.defineProperty,uc=(t,e,n)=>e in t?lc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,fi=(t,e,n)=>(uc(t,typeof e!="symbol"?e+"":e,n),n);class Ia{constructor(e){fi(this,"data"),this.data=e}generateShapes(e,n=100,r){const i=[],o={letterSpacing:0,lineHeight:1,...r},a=cc(e,n,this.data,o);for(let s=0,l=a.length;s + #include + #include + uniform float thickness; + uniform bool screenspace; + uniform vec2 size; + void main() { + #if defined (USE_SKINNING) + #include + #include + #include + #include + #include + #endif + #include + #include + #include + #include + vec4 tNormal = vec4(normal, 0.0); + vec4 tPosition = vec4(transformed, 1.0); + #ifdef USE_INSTANCING + tNormal = instanceMatrix * tNormal; + tPosition = instanceMatrix * tPosition; + #endif + if (screenspace) { + vec3 newPosition = tPosition.xyz + tNormal.xyz * thickness; + gl_Position = projectionMatrix * modelViewMatrix * vec4(newPosition, 1.0); + } else { + vec4 clipPosition = projectionMatrix * modelViewMatrix * tPosition; + vec4 clipNormal = projectionMatrix * modelViewMatrix * tNormal; + vec2 offset = normalize(clipNormal.xy) * thickness / size * clipPosition.w * 2.0; + clipPosition.xy += offset; + gl_Position = clipPosition; + } + }`,`uniform vec3 color; + uniform float opacity; + void main(){ + gl_FragColor = vec4(color, opacity); + #include + #include + }`);const dc=["args","material-uniforms-color-value"];Or.ReflectorShader;new ae;new ae;new ae;var fr;/Mac/.test((fr=globalThis==null?void 0:globalThis.navigator)===null||fr===void 0?void 0:fr.platform);const pc=["target","auto-rotate","auto-rotate-speed","enable-damping","damping-factor","enable-pan","key-pan-speed","keys","max-azimuth-angle","min-azimuth-angle","max-polar-angle","min-polar-angle","min-distance","max-distance","min-zoom","max-zoom","touches","enable-zoom","zoom-speed","enable-rotate","rotate-speed","mouse-buttons","args"],hc=Be({__name:"OrbitControls",props:{makeDefault:{type:Boolean,default:!1},camera:{},domElement:{},target:{default:()=>[0,0,0]},enableDamping:{type:Boolean,default:!0},dampingFactor:{default:.05},autoRotate:{type:Boolean,default:!1},autoRotateSpeed:{default:2},enablePan:{type:Boolean,default:!0},keyPanSpeed:{default:7},keys:{},maxAzimuthAngle:{default:Number.POSITIVE_INFINITY},minAzimuthAngle:{default:Number.NEGATIVE_INFINITY},maxPolarAngle:{default:Math.PI},minPolarAngle:{default:0},minDistance:{default:0},maxDistance:{default:Number.POSITIVE_INFINITY},minZoom:{default:0},maxZoom:{default:Number.POSITIVE_INFINITY},touches:{default:()=>({ONE:_t.ROTATE,TWO:_t.DOLLY_PAN})},enableZoom:{type:Boolean,default:!0},zoomSpeed:{default:1},enableRotate:{type:Boolean,default:!0},rotateSpeed:{default:1},mouseButtons:{default:()=>({LEFT:yt.ROTATE,MIDDLE:yt.DOLLY,RIGHT:yt.PAN})}},emits:["change","start","end"],setup(t,{expose:e,emit:n}){const r=t,i=n,{makeDefault:o,autoRotate:a,autoRotateSpeed:s,enableDamping:l,dampingFactor:u,enablePan:c,keyPanSpeed:f,maxAzimuthAngle:p,minAzimuthAngle:d,maxPolarAngle:y,minPolarAngle:x,minDistance:v,maxDistance:k,minZoom:M,maxZoom:A,enableZoom:C,zoomSpeed:P,enableRotate:h,touches:I,rotateSpeed:b,target:g,mouseButtons:m}=Jr(r),{camera:T,renderer:S,extend:F,controls:D,invalidate:B}=Yn(),j=Yo(null);F({OrbitControls:sc}),Fe(j,Z=>{J(),Z&&o.value?D.value=Z:D.value=null});function J(){ar(j.value,"change",()=>{i("change",j.value),B()}),ar(j.value,"start",()=>i("start",j.value)),ar(j.value,"end",()=>i("end",j.value))}const{onBeforeRender:oe}=On();return oe(({invalidate:Z})=>{j.value&&(l.value||a.value)&&(j.value.update(),a.value&&Z())}),Ot(()=>{j.value&&j.value.dispose()}),e({instance:j}),(Z,_)=>(Z.camera||V(T))&&(Z.domElement||V(S))?(Q(),re("TresOrbitControls",{key:0,ref_key:"controlsRef",ref:j,target:V(g),"auto-rotate":V(a),"auto-rotate-speed":V(s),"enable-damping":V(l),"damping-factor":V(u),"enable-pan":V(c),"key-pan-speed":V(f),keys:Z.keys,"max-azimuth-angle":V(p),"min-azimuth-angle":V(d),"max-polar-angle":V(y),"min-polar-angle":V(x),"min-distance":V(v),"max-distance":V(k),"min-zoom":V(M),"max-zoom":V(A),touches:V(I),"enable-zoom":V(C),"zoom-speed":V(P),"enable-rotate":V(h),"rotate-speed":V(b),"mouse-buttons":V(m),args:[Z.camera||V(T),Z.domElement||V(S).domElement]},null,8,pc)):it("",!0)}});function Sn(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Yi={exports:{}},qi;function mc(){return qi||(qi=1,function(t,e){(function(n){t.exports=n()})(function(){return function n(r,i,o){function a(u,c){if(!i[u]){if(!r[u]){var f=typeof Sn=="function"&&Sn;if(!c&&f)return f(u,!0);if(s)return s(u,!0);throw new Error("Cannot find module '"+u+"'")}c=i[u]={exports:{}},r[u][0].call(c.exports,function(p){var d=r[u][1][p];return a(d||p)},c,c.exports,n,r,i,o)}return i[u].exports}for(var s=typeof Sn=="function"&&Sn,l=0;l>16),B((65280&m)>>8),B(255&m);return T==2?B(255&(m=I(b.charAt(g))<<2|I(b.charAt(g+1))>>4)):T==1&&(B((m=I(b.charAt(g))<<10|I(b.charAt(g+1))<<4|I(b.charAt(g+2))>>2)>>8&255),B(255&m)),S},y.fromByteArray=function(b){var g,m,T,S,F=b.length%3,D="";function B(j){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(j)}for(g=0,T=b.length-F;g>18&63)+B(S>>12&63)+B(S>>6&63)+B(63&S);switch(F){case 1:D=(D+=B((m=b[b.length-1])>>2))+B(m<<4&63)+"==";break;case 2:D=(D=(D+=B((m=(b[b.length-2]<<8)+b[b.length-1])>>10))+B(m>>4&63))+B(m<<2&63)+"="}return D}})(i===void 0?this.base64js={}:i)}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(n,r,i){(function(o,a,v,l,u,c,f,p,d){var y=n("base64-js"),x=n("ieee754");function v(w,E,N){if(!(this instanceof v))return new v(w,E,N);var H,z,q,te,xe=typeof w;if(E==="base64"&&xe=="string")for(w=(te=w).trim?te.trim():te.replace(/^\s+|\s+$/g,"");w.length%4!=0;)w+="=";if(xe=="number")H=oe(w);else if(xe=="string")H=v.byteLength(w,E);else{if(xe!="object")throw new Error("First argument needs to be a number, array or string.");H=oe(w.length)}if(v._useTypedArrays?z=v._augment(new Uint8Array(H)):((z=this).length=H,z._isBuffer=!0),v._useTypedArrays&&typeof w.byteLength=="number")z._set(w);else if(Z(te=w)||v.isBuffer(te)||te&&typeof te=="object"&&typeof te.length=="number")for(q=0;q>8,te=te%256,xe.push(te),xe.push(q);return xe}(E),w,N,H)}function A(w,E,N){var H="";N=Math.min(w.length,N);for(var z=E;z>>0)):(E+1>>0),z}function h(w,E,N,H){if(H||(G(typeof N=="boolean","missing or invalid endian"),G(E!=null,"missing offset"),G(E+1>>8*(H?q:1-q)}function T(w,E,N,H,z){if(z||(G(E!=null,"missing value"),G(typeof H=="boolean","missing or invalid endian"),G(N!=null,"missing offset"),G(N+3>>8*(H?q:3-q)&255}function S(w,E,N,H,z){z||(G(E!=null,"missing value"),G(typeof H=="boolean","missing or invalid endian"),G(N!=null,"missing offset"),G(N+1this.length&&(H=this.length);var z=(H=w.length-E=this.length))return this[w]},v.prototype.readUInt16LE=function(w,E){return C(this,w,!0,E)},v.prototype.readUInt16BE=function(w,E){return C(this,w,!1,E)},v.prototype.readUInt32LE=function(w,E){return P(this,w,!0,E)},v.prototype.readUInt32BE=function(w,E){return P(this,w,!1,E)},v.prototype.readInt8=function(w,E){if(E||(G(w!=null,"missing offset"),G(w=this.length))return 128&this[w]?-1*(255-this[w]+1):this[w]},v.prototype.readInt16LE=function(w,E){return h(this,w,!0,E)},v.prototype.readInt16BE=function(w,E){return h(this,w,!1,E)},v.prototype.readInt32LE=function(w,E){return I(this,w,!0,E)},v.prototype.readInt32BE=function(w,E){return I(this,w,!1,E)},v.prototype.readFloatLE=function(w,E){return b(this,w,!0,E)},v.prototype.readFloatBE=function(w,E){return b(this,w,!1,E)},v.prototype.readDoubleLE=function(w,E){return g(this,w,!0,E)},v.prototype.readDoubleBE=function(w,E){return g(this,w,!1,E)},v.prototype.writeUInt8=function(w,E,N){N||(G(w!=null,"missing value"),G(E!=null,"missing offset"),G(E=this.length||(this[E]=w)},v.prototype.writeUInt16LE=function(w,E,N){m(this,w,E,!0,N)},v.prototype.writeUInt16BE=function(w,E,N){m(this,w,E,!1,N)},v.prototype.writeUInt32LE=function(w,E,N){T(this,w,E,!0,N)},v.prototype.writeUInt32BE=function(w,E,N){T(this,w,E,!1,N)},v.prototype.writeInt8=function(w,E,N){N||(G(w!=null,"missing value"),G(E!=null,"missing offset"),G(E=this.length||(0<=w?this.writeUInt8(w,E,N):this.writeUInt8(255+w+1,E,N))},v.prototype.writeInt16LE=function(w,E,N){S(this,w,E,!0,N)},v.prototype.writeInt16BE=function(w,E,N){S(this,w,E,!1,N)},v.prototype.writeInt32LE=function(w,E,N){F(this,w,E,!0,N)},v.prototype.writeInt32BE=function(w,E,N){F(this,w,E,!1,N)},v.prototype.writeFloatLE=function(w,E,N){D(this,w,E,!0,N)},v.prototype.writeFloatBE=function(w,E,N){D(this,w,E,!1,N)},v.prototype.writeDoubleLE=function(w,E,N){B(this,w,E,!0,N)},v.prototype.writeDoubleBE=function(w,E,N){B(this,w,E,!1,N)},v.prototype.fill=function(w,E,N){if(E=E||0,N=N||this.length,G(typeof(w=typeof(w=w||0)=="string"?w.charCodeAt(0):w)=="number"&&!isNaN(w),"value is not a number"),G(E<=N,"end < start"),N!==E&&this.length!==0){G(0<=E&&E"},v.prototype.toArrayBuffer=function(){if(typeof Uint8Array>"u")throw new Error("Buffer.toArrayBuffer not supported in this browser");if(v._useTypedArrays)return new v(this).buffer;for(var w=new Uint8Array(this.length),E=0,N=w.length;E=E.length||z>=w.length);z++)E[z+N]=w[z];return z}function ge(w){try{return decodeURIComponent(w)}catch{return"�"}}function Te(w,E){G(typeof w=="number","cannot write a non-number as a number"),G(0<=w,"specified a negative value for writing an unsigned value"),G(w<=E,"value is larger than maximum value for type"),G(Math.floor(w)===w,"value has a fractional component")}function ye(w,E,N){G(typeof w=="number","cannot write a non-number as a number"),G(w<=E,"value larger than maximum allowed value"),G(N<=w,"value smaller than minimum allowed value"),G(Math.floor(w)===w,"value has a fractional component")}function Oe(w,E,N){G(typeof w=="number","cannot write a non-number as a number"),G(w<=E,"value larger than maximum allowed value"),G(N<=w,"value smaller than minimum allowed value")}function G(w,E){if(!w)throw new Error(E||"Failed assertion")}v._augment=function(w){return w._isBuffer=!0,w._get=w.get,w._set=w.set,w.get=j.get,w.set=j.set,w.write=j.write,w.toString=j.toString,w.toLocaleString=j.toString,w.toJSON=j.toJSON,w.copy=j.copy,w.slice=j.slice,w.readUInt8=j.readUInt8,w.readUInt16LE=j.readUInt16LE,w.readUInt16BE=j.readUInt16BE,w.readUInt32LE=j.readUInt32LE,w.readUInt32BE=j.readUInt32BE,w.readInt8=j.readInt8,w.readInt16LE=j.readInt16LE,w.readInt16BE=j.readInt16BE,w.readInt32LE=j.readInt32LE,w.readInt32BE=j.readInt32BE,w.readFloatLE=j.readFloatLE,w.readFloatBE=j.readFloatBE,w.readDoubleLE=j.readDoubleLE,w.readDoubleBE=j.readDoubleBE,w.writeUInt8=j.writeUInt8,w.writeUInt16LE=j.writeUInt16LE,w.writeUInt16BE=j.writeUInt16BE,w.writeUInt32LE=j.writeUInt32LE,w.writeUInt32BE=j.writeUInt32BE,w.writeInt8=j.writeInt8,w.writeInt16LE=j.writeInt16LE,w.writeInt16BE=j.writeInt16BE,w.writeInt32LE=j.writeInt32LE,w.writeInt32BE=j.writeInt32BE,w.writeFloatLE=j.writeFloatLE,w.writeFloatBE=j.writeFloatBE,w.writeDoubleLE=j.writeDoubleLE,w.writeDoubleBE=j.writeDoubleBE,w.fill=j.fill,w.inspect=j.inspect,w.toArrayBuffer=j.toArrayBuffer,w}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(n,r,i){(function(o,a,y,l,u,c,f,p,d){var y=n("buffer").Buffer,x=4,v=new y(x);v.fill(0),r.exports={hash:function(k,M,A,C){for(var P=M(function(m,T){m.length%x!=0&&(S=m.length+(x-m.length%x),m=y.concat([m,v],S));for(var S,F=[],D=T?m.readInt32BE:m.readInt32LE,B=0;BA?J=j(J):J.length>5]|=128<>>9<<4)]=I;for(var b=1732584193,g=-271733879,m=-1732584194,T=271733878,S=0;S>>32-m,b)}function k(h,I,b,g,m,T,S){return v(I&b|~I&g,h,I,m,T,S)}function M(h,I,b,g,m,T,S){return v(I&g|b&~g,h,I,m,T,S)}function A(h,I,b,g,m,T,S){return v(I^b^g,h,I,m,T,S)}function C(h,I,b,g,m,T,S){return v(b^(I|~g),h,I,m,T,S)}function P(h,I){var b=(65535&h)+(65535&I);return(h>>16)+(I>>16)+(b>>16)<<16|65535&b}r.exports=function(h){return y.hash(h,x,16)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(n,r,i){(function(o,a,s,l,u,c,f,p,d){r.exports=function(y){for(var x,v=new Array(y),k=0;k>>((3&k)<<3)&255;return v}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(n,r,i){(function(o,a,s,l,u,c,f,p,d){var y=n("./helpers");function x(M,A){M[A>>5]|=128<<24-A%32,M[15+(A+64>>9<<4)]=A;for(var C,P,h,I=Array(80),b=1732584193,g=-271733879,m=-1732584194,T=271733878,S=-1009589776,F=0;F>16)+(A>>16)+(C>>16)<<16|65535&C}function k(M,A){return M<>>32-A}r.exports=function(M){return y.hash(M,x,20,!0)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(n,r,i){(function(o,a,s,l,u,c,f,p,d){function y(A,C){var P=(65535&A)+(65535&C);return(A>>16)+(C>>16)+(P>>16)<<16|65535&P}function x(A,C){var P,h=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),I=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),b=new Array(64);A[C>>5]|=128<<24-C%32,A[15+(C+64>>9<<4)]=C;for(var g,m,T=0;T>>C|A<<32-C},M=function(A,C){return A>>>C};r.exports=function(A){return v.hash(A,x,32,!0)}}).call(this,n("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(n,r,i){(function(o,a,s,l,u,c,f,p,d){i.read=function(y,x,v,k,T){var A,C,P=8*T-k-1,h=(1<>1,b=-7,g=v?T-1:0,m=v?-1:1,T=y[x+g];for(g+=m,A=T&(1<<-b)-1,T>>=-b,b+=P;0>=-b,b+=k;0>1,g=M===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=k?0:S-1,T=k?1:-1,S=x<0||x===0&&1/x<0?1:0;for(x=Math.abs(x),isNaN(x)||x===1/0?(P=isNaN(x)?1:0,C=I):(C=Math.floor(Math.log(x)/Math.LN2),x*(k=Math.pow(2,-C))<1&&(C--,k*=2),2<=(x+=1<=C+b?g/k:g*Math.pow(2,1-b))*k&&(C++,k/=2),I<=C+b?(P=0,C=I):1<=C+b?(P=(x*k-1)*Math.pow(2,M),C+=b):(P=x*Math.pow(2,b-1)*Math.pow(2,M),C=0));8<=M;y[v+m]=255&P,m+=T,P/=256,M-=8);for(C=C<>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]),Xi}var Zi,Ji;function Ca(){return Ji||(Ji=1,Zi=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]),Zi}var dr,eo;function yc(){if(eo)return dr;eo=1;var t=Ra();return dr=t.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"]),dr}var pr,to;function xc(){if(to)return pr;to=1;var t=Ca();return t=t.slice().filter(function(e){return!/^(gl\_|texture)/.test(e)}),pr=t.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"]),pr}var hr,no;function vc(){if(no)return hr;no=1,hr=C;var t=Ra(),e=gc(),n=Ca(),r=yc(),i=xc(),o=999,a=9999,s=0,l=1,u=2,c=3,f=4,p=5,d=6,y=7,x=8,v=9,k=10,M=11,A=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"];function C(P){var h=0,I=0,b=o,g,m,T=[],S=[],F=1,D=0,B=0,j=!1,J=!1,oe="",Z;P=P||{};var _=n,ee=t;P.version==="300 es"&&(_=i,ee=r);for(var me={},R={},h=0;h<_.length;h++)me[_[h]]=!0;for(var h=0;h0)continue;we=fe.slice(0,1).join("")}return ge(we),B+=we.length,T=T.slice(we.length),T.length}while(!0)}function q(){return/[^a-fA-F0-9]/.test(g)?(ge(T.join("")),b=o,h):(T.push(g),m=g,h+1)}function te(){return g==="."||/[eE]/.test(g)?(T.push(g),b=p,m=g,h+1):g==="x"&&T.length===1&&T[0]==="0"?(b=M,T.push(g),m=g,h+1):/[^\d]/.test(g)?(ge(T.join("")),b=o,h):(T.push(g),m=g,h+1)}function xe(){return g==="f"&&(T.push(g),m=g,h+=1),/[eE]/.test(g)||(g==="-"||g==="+")&&/[eE]/.test(m)?(T.push(g),m=g,h+1):/[^\d]/.test(g)?(ge(T.join("")),b=o,h):(T.push(g),m=g,h+1)}function _e(){if(/[^\d\w_]/.test(g)){var fe=T.join("");return R[fe]?b=x:me[fe]?b=y:b=d,ge(T.join("")),b=o,h}return T.push(g),m=g,h+1}}return hr}var mr,ro;function bc(){if(ro)return mr;ro=1;var t=vc();mr=e;function e(n,r){var i=t(r),o=[];return o=o.concat(i(n)),o=o.concat(i(null)),o}return mr}bc();function wc(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function kc(t){var e=wc(t,"string");return typeof e=="symbol"?e:String(e)}function Se(t,e,n){return e=kc(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var le={position:"csm_Position",positionRaw:"csm_PositionRaw",pointSize:"csm_PointSize",fragColor:"csm_FragColor",diffuseColor:"csm_DiffuseColor",normal:"csm_Normal",roughness:"csm_Roughness",metalness:"csm_Metalness",emissive:"csm_Emissive",ao:"csm_AO",bump:"csm_Bump",depthAlpha:"csm_DepthAlpha"},Ge,zt;Ge={},Se(Ge,"".concat(le.normal),{"#include ":` + vec3 objectNormal = `.concat(le.normal,`; + #ifdef USE_TANGENT + vec3 objectTangent = vec3( tangent.xyz ); + #endif + `)}),Se(Ge,"".concat(le.position),{"#include ":` + vec3 transformed = `.concat(le.position,`; + `)}),Se(Ge,"".concat(le.positionRaw),{"#include ":` + vec4 csm_internal_positionUnprojected = `.concat(le.positionRaw,`; + mat4x4 csm_internal_unprojectMatrix = projectionMatrix * modelViewMatrix; + #ifdef USE_INSTANCING + csm_internal_unprojectMatrix = csm_internal_unprojectMatrix * instanceMatrix; + #endif + csm_internal_positionUnprojected = inverse(csm_internal_unprojectMatrix) * csm_internal_positionUnprojected; + vec3 transformed = csm_internal_positionUnprojected.xyz; + `)}),Se(Ge,"".concat(le.pointSize),{"gl_PointSize = size;":` + gl_PointSize = `.concat(le.pointSize,`; + `)}),Se(Ge,"".concat(le.diffuseColor),{"#include ":` + #include + diffuseColor = `.concat(le.diffuseColor,`; + `)}),Se(Ge,"".concat(le.fragColor),{"#include ":` + #include + gl_FragColor = `.concat(le.fragColor,`; + `)}),Se(Ge,"".concat(le.emissive),{"vec3 totalEmissiveRadiance = emissive;":` + vec3 totalEmissiveRadiance = `.concat(le.emissive,`; + `)}),Se(Ge,"".concat(le.roughness),{"#include ":` + #include + roughnessFactor = `.concat(le.roughness,`; + `)}),Se(Ge,"".concat(le.metalness),{"#include ":` + #include + metalnessFactor = `.concat(le.metalness,`; + `)}),Se(Ge,"".concat(le.ao),{"#include ":` + #include + reflectedLight.indirectDiffuse *= 1. - `.concat(le.ao,`; + `)}),Se(Ge,"".concat(le.bump),{"#include ":` + #include + + vec3 csm_internal_orthogonal = `.concat(le.bump," - (dot(").concat(le.bump,`, normal) * normal); + vec3 csm_internal_projectedbump = mat3(csm_internal_vModelViewMatrix) * csm_internal_orthogonal; + normal = normalize(normal - csm_internal_projectedbump); + `)}),Se(Ge,"".concat(le.depthAlpha),{"gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );":` + gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity * `.concat(le.depthAlpha,` ); + `),"gl_FragColor = packDepthToRGBA( fragCoordZ );":` + gl_FragColor = packDepthToRGBA( fragCoordZ ); + gl_FragColor.a *= `.concat(le.depthAlpha,`; + `)});zt={},Se(zt,"".concat(le.position),{"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );":` + gl_Position = projectionMatrix * modelViewMatrix * vec4( `.concat(le.position,`, 1.0 ); + `)}),Se(zt,"".concat(le.positionRaw),{"gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );":` + gl_Position = `.concat(le.position,`; + `)}),Se(zt,"".concat(le.diffuseColor),{"gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );":` + gl_FragColor = `.concat(le.diffuseColor,`; + `)}),Se(zt,"".concat(le.fragColor),{"gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );":` + gl_FragColor = `.concat(le.fragColor,`; + `)});var $e;$e={},Se($e,"".concat(le.position),"*"),Se($e,"".concat(le.positionRaw),"*"),Se($e,"".concat(le.normal),"*"),Se($e,"".concat(le.pointSize),["PointsMaterial"]),Se($e,"".concat(le.diffuseColor),"*"),Se($e,"".concat(le.fragColor),"*"),Se($e,"".concat(le.emissive),["MeshStandardMaterial","MeshPhysicalMaterial"]),Se($e,"".concat(le.roughness),["MeshStandardMaterial","MeshPhysicalMaterial"]),Se($e,"".concat(le.metalness),["MeshStandardMaterial","MeshPhysicalMaterial"]),Se($e,"".concat(le.ao),["MeshStandardMaterial","MeshPhysicalMaterial","MeshBasicMaterial","MeshLambertMaterial","MeshPhongMaterial","MeshToonMaterial"]),Se($e,"".concat(le.bump),["MeshLambertMaterial","MeshMatcapMaterial","MeshNormalMaterial","MeshPhongMaterial","MeshPhysicalMaterial","MeshStandardMaterial","MeshToonMaterial","ShadowMaterial"]),Se($e,"".concat(le.depthAlpha),"*");var Tc=`void main() { + gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); +}`,_c=`#include + +void main() { + vec2 center = vec2(0., 1.); + float rotation = 0.0; + + + + float size = 0.03; + + vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); + vec2 scale; + scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); + scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); + + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + if ( isPerspective ) scale *= - mvPosition.z; + + vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale * size; + vec2 rotatedPosition; + rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; + rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; + mvPosition.xy += rotatedPosition; + + gl_Position = projectionMatrix * mvPosition; +}`;const vn=new ae(0,0,0),di=new ae(0,0,0),Ac=new ae(0,0,0);function io(t,e,n){const r=vn.setFromMatrixPosition(t.matrixWorld);r.project(e);const i=n.width/2,o=n.height/2;return[(Number.isNaN(r.x)?0:r.x)*i+i,-(r.y*o)+o,r.z]}function Ec(t,e){const n=vn.setFromMatrixPosition(t.matrixWorld),r=di.setFromMatrixPosition(e.matrixWorld),i=n.sub(r),o=e.getWorldDirection(Ac);return i.angleTo(o)>Math.PI/2}function Mc(t,e,n,r){const i=vn.setFromMatrixPosition(t.matrixWorld),o=i.clone();o.project(e),n.setFromCamera(new Pe(o.x,o.y),e);const a=n.intersectObjects(r,!0);if(a.length>0){const s=a[0].distance;return i.distanceTo(n.ray.origin)Math.abs(t)<1e-10?0:t;function Na(t,e,n=""){let r="matrix3d(";for(let i=0;i!==16;i++)r+=Fr(e[i]*t.elements[i])+(i!==15?",":")");return n+r}const Rc=(t=>e=>Na(e,t))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),Cc=(t=>(e,n)=>Na(e,t(n),"translate(-50%,-50%)"))(t=>[1/t,1/t,1/t,1,-1/t,-1/t,-1/t,-1,1/t,1/t,1/t,1,1,1,1,1]),Nc=["geometry","material"];new Zo;var zr={exports:{}},Lc=zr.exports,oo;function Pc(){return oo||(oo=1,function(t,e){(function(n,r){t.exports=r()})(Lc,function(){var n=function(){function r(d){return a.appendChild(d.dom),d}function i(d){for(var y=0;yl+1e3&&(c.update(1e3*u/(d-l),100),l=d,u=0,p)){var y=performance.memory;p.update(y.usedJSHeapSize/1048576,y.jsHeapSizeLimit/1048576)}return d},update:function(){s=this.end()},domElement:a,setMode:i}};return n.Panel=function(r,i,o){var a=1/0,s=0,l=Math.round,u=l(window.devicePixelRatio||1),c=80*u,f=48*u,p=3*u,d=2*u,y=3*u,x=15*u,v=74*u,k=30*u,M=document.createElement("canvas");M.width=c,M.height=f,M.style.cssText="width:80px;height:48px";var A=M.getContext("2d");return A.font="bold "+9*u+"px Helvetica,Arial,sans-serif",A.textBaseline="top",A.fillStyle=o,A.fillRect(0,0,c,f),A.fillStyle=i,A.fillText(r,p,d),A.fillRect(y,x,v,k),A.fillStyle=o,A.globalAlpha=.9,A.fillRect(y,x,v,k),{dom:M,update:function(C,P){a=Math.min(a,C),s=Math.max(s,C),A.fillStyle=o,A.globalAlpha=1,A.fillRect(0,0,c,x),A.fillStyle=i,A.fillText(l(C)+" "+r+" ("+l(a)+"-"+l(s)+")",p,d),A.drawImage(M,y+u,x,v-u,k,y,x,v-u,k),A.fillRect(y+v-u,x,u,k),A.fillStyle=o,A.globalAlpha=.9,A.fillRect(y+v-u,x,u,l((1-C/P)*k))}}},n})}(zr)),zr.exports}Pc();const Dc={key:0,args:[0,1,64]},Oc={key:1,args:[.5,1,64]},Bc={key:2},Fc=["tone-mapped","map","side","color"];new ze(16777215);const Ut=Be({__name:"Range",props:{modelValue:null,min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","mousedown"],setup(t,{emit:e}){const n=t,r=e,i=W(null);function o(y,x,v){return Math.min(Math.max(y,x),v)}function a(y){const x=y.toString();return x.includes("e-")?Number.parseInt(x.split("e-")[1],10):x.includes(".")?x.split(".")[1].length:0}function s(y,x){const v=a(x),k=10**(v+3);return Number.parseFloat((y*k/k).toFixed(v))}const l=je(()=>s(o(n.modelValue,n.min,n.max),n.step)),u=je(()=>{const y=(l.value-n.min)/(n.max-n.min)*100;return{width:`${y}%`,backgroundSize:`${y}% 100%`}});function c(y){if(!i.value)return l.value;const x=i.value.getBoundingClientRect(),k=(y.clientX-x.left)/x.width,M=n.max-n.min,A=n.min+M*k,C=Math.round(A/n.step)*n.step;return Math.min(Math.max(C,n.min),n.max)}function f(y){if(n.disabled)return;const x=c(y);r("update:modelValue",x)}function p(y){if(n.disabled)return;y.preventDefault();const x=c(y);r("update:modelValue",x),window.addEventListener("mousemove",f),window.addEventListener("mouseup",d)}function d(y){window.removeEventListener("mousemove",f),window.removeEventListener("mouseup",d)}return Ot(()=>{window.removeEventListener("mousemove",f),window.removeEventListener("mouseup",d)}),(y,x)=>(Q(),re("span",{ref_key:"sliderRef",ref:i,class:st(["range-slider disabled:pointer-events-none disabled:cursor-default disabled:opacity-50",{disabled:t.disabled}]),bg:"[#e6e1fc] dark:[#676085]","touch-action-none":"",relative:"","inline-block":"","w-full":"","cursor-ew-resize":"","rounded-sm":"",onMousedown:p},[O("span",{style:Pr(u.value),bg:"[#cabeff] dark:[#4e34b9]",relative:"",block:"","rounded-sm":"",h:"[14px]"},null,4),O("span",{role:"slider",class:"slider-thumb",style:Pr({left:`${(l.value-t.min)/(t.max-t.min)*100}%`}),absolute:"","rounded-sm":"",w:"[1px]",h:"[14px]",bg:"neutral-100 dark:neutral-400",top:"50%",transform:"translate-x-[50%] translate-y-[-50%]"},null,4)],34))}});function ao(t,e){if(e===el)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),t;if(e===Dr||e===oa){let n=t.getIndex();if(n===null){const a=[],s=t.getAttribute("position");if(s!==void 0){for(let l=0;l=2.0 are supported."));return}const u=new vf(o,{path:n||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});u.fileLoader.setRequestHeader(this.requestHeader);for(let c=0;c=0&&s[f]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+f+'".')}}u.setExtensions(a),u.setPlugins(s),u.parse(r,i)}parseAsync(e,n){const r=this;return new Promise(function(i,o){r.parse(e,n,i,o)})}}function Uc(){let t={};return{get:function(e){return t[e]},add:function(e,n){t[e]=n},remove:function(e){delete t[e]},removeAll:function(){t={}}}}const de={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class jc{constructor(e){this.parser=e,this.name=de.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,n=this.parser.json.nodes||[];for(let r=0,i=n.length;r=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return n.loadTextureImage(e,o.source,a)}}class tf{constructor(e){this.parser=e,this.name=de.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const n=this.name,r=this.parser,i=r.json,o=i.textures[e];if(!o.extensions||!o.extensions[n])return null;const a=o.extensions[n],s=i.images[a.source];let l=r.textureLoader;if(s.uri){const u=r.options.manager.getHandler(s.uri);u!==null&&(l=u)}return this.detectSupport().then(function(u){if(u)return r.loadTextureImage(e,a.source,l);if(i.extensionsRequired&&i.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return r.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const n=new Image;n.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",n.onload=n.onerror=function(){e(n.height===1)}})),this.isSupported}}class nf{constructor(e){this.parser=e,this.name=de.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const n=this.name,r=this.parser,i=r.json,o=i.textures[e];if(!o.extensions||!o.extensions[n])return null;const a=o.extensions[n],s=i.images[a.source];let l=r.textureLoader;if(s.uri){const u=r.options.manager.getHandler(s.uri);u!==null&&(l=u)}return this.detectSupport().then(function(u){if(u)return r.loadTextureImage(e,a.source,l);if(i.extensionsRequired&&i.extensionsRequired.indexOf(n)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return r.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const n=new Image;n.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",n.onload=n.onerror=function(){e(n.height===1)}})),this.isSupported}}class rf{constructor(e){this.name=de.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const n=this.parser.json,r=n.bufferViews[e];if(r.extensions&&r.extensions[this.name]){const i=r.extensions[this.name],o=this.parser.getDependency("buffer",i.buffer),a=this.parser.options.meshoptDecoder;if(!a||!a.supported){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return o.then(function(s){const l=i.byteOffset||0,u=i.byteLength||0,c=i.count,f=i.byteStride,p=new Uint8Array(s,l,u);return a.decodeGltfBufferAsync?a.decodeGltfBufferAsync(c,f,p,i.mode,i.filter).then(function(d){return d.buffer}):a.ready.then(function(){const d=new ArrayBuffer(c*f);return a.decodeGltfBuffer(new Uint8Array(d),c,f,p,i.mode,i.filter),d})})}else return null}}class of{constructor(e){this.name=de.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const n=this.parser.json,r=n.nodes[e];if(!r.extensions||!r.extensions[this.name]||r.mesh===void 0)return null;const i=n.meshes[r.mesh];for(const u of i.primitives)if(u.mode!==nt.TRIANGLES&&u.mode!==nt.TRIANGLE_STRIP&&u.mode!==nt.TRIANGLE_FAN&&u.mode!==void 0)return null;const a=r.extensions[this.name].attributes,s=[],l={};for(const u in a)s.push(this.parser.getDependency("accessor",a[u]).then(c=>(l[u]=c,l[u])));return s.length<1?null:(s.push(this.parser.createNodeMesh(e)),Promise.all(s).then(u=>{const c=u.pop(),f=c.isGroup?c.children:[c],p=u[0].count,d=[];for(const y of f){const x=new xt,v=new ae,k=new Bn,M=new ae(1,1,1),A=new ol(y.geometry,y.material,p);for(let C=0;C0||t.search(/^data\:image\/jpeg/)===0?"image/jpeg":t.search(/\.webp($|\?)/i)>0||t.search(/^data\:image\/webp/)===0?"image/webp":t.search(/\.ktx2($|\?)/i)>0||t.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}const xf=new xt;class vf{constructor(e={},n={}){this.json=e,this.extensions={},this.plugins={},this.options=n,this.cache=new Uc,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let r=!1,i=-1,o=!1,a=-1;if(typeof navigator<"u"){const s=navigator.userAgent;r=/^((?!chrome|android).)*safari/i.test(s)===!0;const l=s.match(/Version\/(\d+)/);i=r&&l?parseInt(l[1],10):-1,o=s.indexOf("Firefox")>-1,a=o?s.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>"u"||r&&i<17||o&&a<98?this.textureLoader=new sl(this.options.manager):this.textureLoader=new ll(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new aa(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,n){const r=this,i=this.json,o=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(a){return a._markDefs&&a._markDefs()}),Promise.all(this._invokeAll(function(a){return a.beforeRoot&&a.beforeRoot()})).then(function(){return Promise.all([r.getDependencies("scene"),r.getDependencies("animation"),r.getDependencies("camera")])}).then(function(a){const s={scene:a[0][i.scene||0],scenes:a[0],animations:a[1],cameras:a[2],asset:i.asset,parser:r,userData:{}};return Rt(o,s,i),gt(s,i),Promise.all(r._invokeAll(function(l){return l.afterRoot&&l.afterRoot(s)})).then(function(){for(const l of s.scenes)l.updateMatrixWorld();e(s)})}).catch(n)}_markDefs(){const e=this.json.nodes||[],n=this.json.skins||[],r=this.json.meshes||[];for(let i=0,o=n.length;i{const l=this.associations.get(a);l!=null&&this.associations.set(s,l);for(const[u,c]of a.children.entries())o(c,s.children[u])};return o(r,i),i.name+="_instance_"+e.uses[n]++,i}_invokeOne(e){const n=Object.values(this.plugins);n.push(this);for(let r=0;r=2&&v.setY(g,h[I*l+1]),l>=3&&v.setZ(g,h[I*l+2]),l>=4&&v.setW(g,h[I*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}v.normalized=y}return v})}loadTexture(e){const n=this.json,r=this.options,o=n.textures[e].source,a=n.images[o];let s=this.textureLoader;if(a.uri){const l=r.manager.getHandler(a.uri);l!==null&&(s=l)}return this.loadTextureImage(e,o,s)}loadTextureImage(e,n,r){const i=this,o=this.json,a=o.textures[e],s=o.images[n],l=(s.uri||s.bufferView)+":"+a.sampler;if(this.textureCache[l])return this.textureCache[l];const u=this.loadImageSource(n,r).then(function(c){c.flipY=!1,c.name=a.name||s.name||"",c.name===""&&typeof s.uri=="string"&&s.uri.startsWith("data:image/")===!1&&(c.name=s.uri);const p=(o.samplers||{})[a.sampler]||{};return c.magFilter=lo[p.magFilter]||zn,c.minFilter=lo[p.minFilter]||ii,c.wrapS=uo[p.wrapS]||Un,c.wrapT=uo[p.wrapT]||Un,c.generateMipmaps=!c.isCompressedTexture&&c.minFilter!==Lt&&c.minFilter!==zn,i.associations.set(c,{textures:e}),c}).catch(function(){return null});return this.textureCache[l]=u,u}loadImageSource(e,n){const r=this,i=this.json,o=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(f=>f.clone());const a=i.images[e],s=self.URL||self.webkitURL;let l=a.uri||"",u=!1;if(a.bufferView!==void 0)l=r.getDependency("bufferView",a.bufferView).then(function(f){u=!0;const p=new Blob([f],{type:a.mimeType});return l=s.createObjectURL(p),l});else if(a.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const c=Promise.resolve(l).then(function(f){return new Promise(function(p,d){let y=p;n.isImageBitmapLoader===!0&&(y=function(x){const v=new Fn(x);v.needsUpdate=!0,p(v)}),n.load(cn.resolveURL(f,o.path),y,void 0,d)})}).then(function(f){return u===!0&&s.revokeObjectURL(l),gt(f,a),f.userData.mimeType=a.mimeType||yf(a.uri),f}).catch(function(f){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),f});return this.sourceCache[e]=c,c}assignTexture(e,n,r,i){const o=this;return this.getDependency("texture",r.index).then(function(a){if(!a)return null;if(r.texCoord!==void 0&&r.texCoord>0&&(a=a.clone(),a.channel=r.texCoord),o.extensions[de.KHR_TEXTURE_TRANSFORM]){const s=r.extensions!==void 0?r.extensions[de.KHR_TEXTURE_TRANSFORM]:void 0;if(s){const l=o.associations.get(a);a=o.extensions[de.KHR_TEXTURE_TRANSFORM].extendTexture(a,s),o.associations.set(a,l)}}return i!==void 0&&(a.colorSpace=i),e[n]=a,a})}assignFinalMaterial(e){const n=e.geometry;let r=e.material;const i=n.attributes.tangent===void 0,o=n.attributes.color!==void 0,a=n.attributes.normal===void 0;if(e.isPoints){const s="PointsMaterial:"+r.uuid;let l=this.cache.get(s);l||(l=new ul,nr.prototype.copy.call(l,r),l.color.copy(r.color),l.map=r.map,l.sizeAttenuation=!1,this.cache.add(s,l)),r=l}else if(e.isLine){const s="LineBasicMaterial:"+r.uuid;let l=this.cache.get(s);l||(l=new cl,nr.prototype.copy.call(l,r),l.color.copy(r.color),l.map=r.map,this.cache.add(s,l)),r=l}if(i||o||a){let s="ClonedMaterial:"+r.uuid+":";i&&(s+="derivative-tangents:"),o&&(s+="vertex-colors:"),a&&(s+="flat-shading:");let l=this.cache.get(s);l||(l=r.clone(),o&&(l.vertexColors=!0),a&&(l.flatShading=!0),i&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(s,l),this.associations.set(l,this.associations.get(r))),r=l}e.material=r}getMaterialType(){return sa}loadMaterial(e){const n=this,r=this.json,i=this.extensions,o=r.materials[e];let a;const s={},l=o.extensions||{},u=[];if(l[de.KHR_MATERIALS_UNLIT]){const f=i[de.KHR_MATERIALS_UNLIT];a=f.getMaterialType(),u.push(f.extendParams(s,o,n))}else{const f=o.pbrMetallicRoughness||{};if(s.color=new ze(1,1,1),s.opacity=1,Array.isArray(f.baseColorFactor)){const p=f.baseColorFactor;s.color.setRGB(p[0],p[1],p[2],vt),s.opacity=p[3]}f.baseColorTexture!==void 0&&u.push(n.assignTexture(s,"map",f.baseColorTexture,mn)),s.metalness=f.metallicFactor!==void 0?f.metallicFactor:1,s.roughness=f.roughnessFactor!==void 0?f.roughnessFactor:1,f.metallicRoughnessTexture!==void 0&&(u.push(n.assignTexture(s,"metalnessMap",f.metallicRoughnessTexture)),u.push(n.assignTexture(s,"roughnessMap",f.metallicRoughnessTexture))),a=this._invokeOne(function(p){return p.getMaterialType&&p.getMaterialType(e)}),u.push(Promise.all(this._invokeAll(function(p){return p.extendMaterialParams&&p.extendMaterialParams(e,s)})))}o.doubleSided===!0&&(s.side=qn);const c=o.alphaMode||yr.OPAQUE;if(c===yr.BLEND?(s.transparent=!0,s.depthWrite=!1):(s.transparent=!1,c===yr.MASK&&(s.alphaTest=o.alphaCutoff!==void 0?o.alphaCutoff:.5)),o.normalTexture!==void 0&&a!==Vt&&(u.push(n.assignTexture(s,"normalMap",o.normalTexture)),s.normalScale=new Pe(1,1),o.normalTexture.scale!==void 0)){const f=o.normalTexture.scale;s.normalScale.set(f,f)}if(o.occlusionTexture!==void 0&&a!==Vt&&(u.push(n.assignTexture(s,"aoMap",o.occlusionTexture)),o.occlusionTexture.strength!==void 0&&(s.aoMapIntensity=o.occlusionTexture.strength)),o.emissiveFactor!==void 0&&a!==Vt){const f=o.emissiveFactor;s.emissive=new ze().setRGB(f[0],f[1],f[2],vt)}return o.emissiveTexture!==void 0&&a!==Vt&&u.push(n.assignTexture(s,"emissiveMap",o.emissiveTexture,mn)),Promise.all(u).then(function(){const f=new a(s);return o.name&&(f.name=o.name),gt(f,o),n.associations.set(f,{materials:e}),o.extensions&&Rt(i,f,o),f})}createUniqueName(e){const n=hn.sanitizeNodeName(e||"");return n in this.nodeNamesUsed?n+"_"+ ++this.nodeNamesUsed[n]:(this.nodeNamesUsed[n]=0,n)}loadGeometries(e){const n=this,r=this.extensions,i=this.primitiveCache;function o(s){return r[de.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(s,n).then(function(l){return co(l,s,n)})}const a=[];for(let s=0,l=e.length;s0&&mf(k,o),k.name=n.createUniqueName(o.name||"mesh_"+e),gt(k,o),v.extensions&&Rt(i,k,v),n.assignFinalMaterial(k),f.push(k)}for(let d=0,y=f.length;d1?c=new rr:u.length===1?c=u[0]:c=new oi,c!==u[0])for(let f=0,p=u.length;f{const f=new Map;for(const[p,d]of i.associations)(p instanceof nr||p instanceof Fn)&&f.set(p,d);return c.traverse(p=>{const d=i.associations.get(p);d!=null&&f.set(p,d)}),f};return i.associations=u(o),o})}_createAnimationTracks(e,n,r,i,o){const a=[],s=e.name?e.name:e.uuid,l=[];kt[o.path]===kt.weights?e.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(s);let u;switch(kt[o.path]){case kt.weights:u=Ri;break;case kt.rotation:u=Ci;break;case kt.translation:case kt.scale:u=Ii;break;default:switch(r.itemSize){case 1:u=Ri;break;case 2:case 3:default:u=Ii;break}break}const c=i.interpolation!==void 0?df[i.interpolation]:ei,f=this._getArrayFromAccessor(r);for(let p=0,d=l.length;pnew vs(t)),Ct.register(t=>new bs(t)),Ct)}async function wf(t){const r=(await Da().loadAsync(t)).userData;if(!r.vrmAnimations){console.warn("No VRM animations found in the .vrma file");return}if(r.vrmAnimations.length===0){console.warn("No VRM animations found in the .vrma file");return}return r.vrmAnimations[0]}async function kf(t,e){if(!t){console.warn("No VRM found");return}if(e)return ws(e,t)}function Tf(){const t=W(!1),e=W(0),n=W(0),r=.2,i=1,o=6,a=W(Math.random()*(o-i)+i);function s(l,u){if(l!=null&&l.expressionManager&&(n.value+=u,!t.value&&n.value>=a.value&&(t.value=!0,e.value=0),t.value)){e.value+=u/r;const c=Math.sin(Math.PI*e.value);l.expressionManager.setValue("blink",c),e.value>=1&&(t.value=!1,n.value=0,l.expressionManager.setValue("blink",0),a.value=Math.random()*(o-i)+i)}}return{update:s}}function _f(){let t=-1,e,n=0;function r(){e?e.set(on(-.25,.25),on(-.2,.15),-.65):e=new ae(on(-.25,.25),on(-.2,.15),-.65)}function i(o,a){var s;!(o!=null&&o.expressionManager)||!o.lookAt||(n>=t?(r(),n=0,t=ks()/1e3):e||r(),o.lookAt.target||(o.lookAt.target=new oi),o.lookAt.target.position.lerp(e,on(.2,.5)),(s=o.lookAt)==null||s.update(a),n+=a)}return{update:i}}async function Af(t,e){const i=(await Da().loadAsync(t,a=>{var s;return(s=e==null?void 0:e.onProgress)==null?void 0:s.call(e,a)})).userData;if(!i.vrm)return;const o=i.vrm;if(Cr.removeUnnecessaryVertices(o.scene),Cr.combineSkeletons(o.scene),o.scene.traverse(a=>{a.frustumCulled=!1}),o.lookAt){const a=new Ts(o.lookAt);a.name="lookAtQuaternionProxy",o.scene.add(a)}return e!=null&&e.scene&&e.scene.add(o.scene),e!=null&&e.position&&o.scene.position.set(...e.position),o}function Ef(t){const e=W(null),n=W(!1),r=W(0),i=W(new Map),o=W(new Map),a=W(),s=(k,M,A)=>k+(M-k)*A,l=k=>k<.5?4*k*k*k:1-(-2*k+2)**3/2,u=new Map([["happy",{expression:[{name:"happy",value:1,duration:.3},{name:"aa",value:.3}],blendDuration:.3}],["sad",{expression:[{name:"sad",value:1},{name:"oh",value:.2}],blendDuration:.3}],["angry",{expression:[{name:"angry",value:1},{name:"ee",value:.4}],blendDuration:.2}],["surprised",{expression:[{name:"Surprised",value:1},{name:"oh",value:.6}],blendDuration:.1}],["neutral",{expression:[{name:"neutral",value:1}],blendDuration:.5}]]),c=()=>{a.value&&(clearTimeout(a.value),a.value=void 0)},f=k=>{var A;if(c(),!u.has(k)){console.warn(`Emotion ${k} not found`);return}const M=u.get(k);if(e.value=k,n.value=!0,r.value=0,t.expressionManager){const C=Object.keys(t.expressionManager.expressionMap);for(const P of C)t.expressionManager.setValue(P,0)}i.value.clear(),o.value.clear();for(const C of M.expression||[]){const P=((A=t.expressionManager)==null?void 0:A.getValue(C.name))||0;i.value.set(C.name,P),o.value.set(C.name,C.value)}};return{currentEmotion:e,isTransitioning:n,setEmotion:f,setEmotionWithResetAfter:(k,M)=>{c(),f(k),a.value=setTimeout(()=>{f("neutral"),a.value=void 0},M)},update:k=>{var C;if(!n.value||!e.value)return;const A=u.get(e.value).blendDuration||.3;r.value+=k/A,r.value>=1&&(r.value=1,n.value=!1);for(const[P,h]of o.value){const I=i.value.get(P)||0,b=s(I,h,l(r.value));(C=t.expressionManager)==null||C.setValue(P,b)}},addEmotionState:(k,M)=>{u.set(k,M)},removeEmotionState:k=>{u.delete(k)},dispose:()=>{c()}}}const Mf=Be({__name:"Model",props:{model:null,idleAnimation:null,loadAnimations:null,position:null,paused:{type:Boolean}},emits:["loadModelProgress","error"],setup(t,{expose:e,emit:n}){const r=t,i=n;let o;const a=W(),s=W(),{scene:l}=Yn(),{onBeforeRender:u}=On(),c=Tf(),f=_f(),p=W();Fe(()=>r.position,([x,v,k])=>{a.value&&a.value.scene.position.set(x,v,k)}),pn(async()=>{if(l.value)try{const x=await Af(r.model,{scene:l.value,lookAt:!0,position:r.position,onProgress:M=>i("loadModelProgress",Number.parseFloat((100*(M.loaded/M.total)).toFixed(2)))});if(!x){console.warn("No VRM model loaded");return}const v=await wf(r.idleAnimation),k=await kf(x,v);if(!k){console.warn("No VRM animation loaded");return}s.value=new wl(x.scene),s.value.clipAction(k).play(),p.value=Ef(x),a.value=x,o=u(({delta:M})=>{var A,C,P;(A=s.value)==null||A.update(M),(C=a.value)==null||C.update(M),c.update(a.value,M),f.update(a.value,M),(P=p.value)==null||P.update(M)}).off}catch(x){i("error",x)}}),Ot(()=>{o==null||o(),a.value&&(a.value.scene.removeFromParent(),Cr.deepDispose(a.value.scene))}),e({setExpression(x){var v;(v=p.value)==null||v.setEmotionWithResetAfter(x,1e3)}});const{pause:d,resume:y}=On();return Fe(()=>r.paused,x=>{x?d():y()}),(x,v)=>gn(x.$slots,"default")}}),Sf=["position"],If={absolute:"",bottom:"3",right:"3"},Rf={flex:"~ row","cursor-pointer":""},Cf=["checked","aria-checked"],Nf={key:0,"min-w":"50vw",z:"{var x;(x=p.value)==null||x.setExpression(y)}}),(y,x)=>(Q(),Xt(ha,{relative:""},{default:Ue(({height:v,width:k})=>[ke(V(kl),{alpha:!0,antialias:!0,width:k,height:v},{default:Ue(()=>[ke(V(hc)),O("TresPerspectiveCamera",{position:[a.value,s.value,l.value]},null,8,Sf),x[14]||(x[14]=O("TresDirectionalLight",{color:16777215,intensity:1.2,position:[1,1,1]},null,-1)),x[15]||(x[15]=O("TresAmbientLight",{color:16777215,intensity:1.5},null,-1)),ke(Mf,{ref_key:"modelRef",ref:p,model:r.model,"idle-animation":r.idleAnimation,position:[u.value,c.value,f.value],paused:r.paused,onLoadModelProgress:x[0]||(x[0]=M=>i("loadModelProgress",M)),onError:x[1]||(x[1]=M=>i("error",M))},null,8,["model","idle-animation","position","paused"])]),_:2},1032,["width","height"]),O("div",If,[O("div",Rf,[O("label",{class:st([o.value?"bg-neutral-300 dark:bg-neutral-200":"bg-neutral-100 dark:bg-neutral-700"]),transition:"all ease-in-out duration-500",text:"lg neutral-500 dark:neutral-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":x[2]||(x[2]=M=>o.value=M),checked:o.value,"aria-checked":o.value,name:"showLive2DViewerInspector",type:"checkbox",hidden:"","appearance-none":"","outline-none":""},null,8,Cf),[[Zr,o.value]]),x[16]||(x[16]=O("div",{"select-none":""},[O("div",{"i-solar:bug-bold-duotone":""})],-1))],2)]),ke(ui,null,{default:Ue(()=>[o.value?(Q(),re("div",Nf,[O("div",Lf,[O("div",Pf,[O("span",null,he(V(d)("stage.viewers.debug-menu.vrm.model.title")),1)]),ke(Pi,{"h-fit":"","w-full":"",flex:"~ col",border:"~ gray/25 rounded-lg",divide:"y dashed gray/25","of-clip":"","shadow-sm":""},{label:Ue(()=>[O("span",Df,he(V(d)("stage.viewers.debug-menu.vrm.camera")),1)]),default:Ue(()=>[O("div",Of,[x[17]||(x[17]=O("div",{text:"neutral-400 dark:neutral-500"},[O("span",null,"X")],-1)),O("label",Bf,[ke(Ut,{modelValue:a.value,"onUpdate:modelValue":x[3]||(x[3]=M=>a.value=M),min:-10,max:10,step:.01},null,8,["modelValue"])]),O("div",Ff,[O("span",null,he(a.value),1)]),x[18]||(x[18]=O("div",{text:"neutral-400 dark:neutral-500"},[O("span",null,"Y")],-1)),O("label",zf,[ke(Ut,{modelValue:s.value,"onUpdate:modelValue":x[4]||(x[4]=M=>s.value=M),min:-10,max:10,step:.01},null,8,["modelValue"])]),O("div",Uf,[O("span",null,he(s.value),1)]),x[19]||(x[19]=O("div",{text:"neutral-400 dark:neutral-500"},[O("span",null,"Z")],-1)),O("label",jf,[ke(Ut,{modelValue:l.value,"onUpdate:modelValue":x[5]||(x[5]=M=>l.value=M),min:-10,max:10,step:.01},null,8,["modelValue"])]),O("div",Vf,[O("span",null,he(l.value),1)])])]),_:1}),ke(Pi,{"h-fit":"","w-full":"",flex:"~ col",border:"~ gray/25 rounded-lg",divide:"y dashed gray/25","of-clip":"","shadow-sm":""},{label:Ue(()=>[O("span",Hf,he(V(d)("stage.viewers.debug-menu.vrm.model.title")),1)]),default:Ue(()=>[O("div",Gf,[x[20]||(x[20]=O("div",{text:"neutral-400 dark:neutral-500"},[O("span",null,"X")],-1)),O("label",$f,[ke(Ut,{modelValue:u.value,"onUpdate:modelValue":x[6]||(x[6]=M=>u.value=M),min:-10,max:10,step:.01},null,8,["modelValue"])]),O("div",Yf,[O("span",null,he(u.value),1)]),x[21]||(x[21]=O("div",{text:"neutral-400 dark:neutral-500"},[O("span",null,"Y")],-1)),O("label",qf,[ke(Ut,{modelValue:c.value,"onUpdate:modelValue":x[7]||(x[7]=M=>c.value=M),min:-10,max:10,step:.01},null,8,["modelValue"])]),O("div",Kf,[O("span",null,he(c.value),1)]),x[22]||(x[22]=O("div",{text:"neutral-400 dark:neutral-500"},[O("span",null,"Z")],-1)),O("label",Wf,[ke(Ut,{modelValue:f.value,"onUpdate:modelValue":x[8]||(x[8]=M=>f.value=M),min:-10,max:10,step:.01},null,8,["modelValue"])]),O("div",Xf,[O("span",null,he(f.value),1)])])]),_:1}),O("div",Qf,[O("span",null,he(V(d)("stage.viewers.debug-menu.emotions")),1)]),O("div",Zf,[O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:x[9]||(x[9]=M=>{var A;return(A=p.value)==null?void 0:A.setExpression("neutral")})},he(V(d)("stage.viewers.debug-menu.emotions-btn.neutral")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:x[10]||(x[10]=M=>{var A;return(A=p.value)==null?void 0:A.setExpression("surprised")})},he(V(d)("stage.viewers.debug-menu.emotions-btn.surprised")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:x[11]||(x[11]=M=>{var A;return(A=p.value)==null?void 0:A.setExpression("sad")})},he(V(d)("stage.viewers.debug-menu.emotions-btn.sad")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:x[12]||(x[12]=M=>{var A;return(A=p.value)==null?void 0:A.setExpression("angry")})},he(V(d)("stage.viewers.debug-menu.emotions-btn.angry")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:x[13]||(x[13]=M=>{var A;return(A=p.value)==null?void 0:A.setExpression("happy")})},he(V(d)("stage.viewers.debug-menu.emotions-btn.happy")),1)])])])):it("",!0)]),_:1})])]),_:1}))}}),ed=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class bn{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}}bn.prototype.normal={};bn.prototype.property={};bn.prototype.space=void 0;function Oa(t,e){const n={},r={};for(const i of t)Object.assign(n,i.property),Object.assign(r,i.normal);return new bn(n,r,e)}function Vr(t){return t.toLowerCase()}class We{constructor(e,n){this.attribute=n,this.property=e}}We.prototype.attribute="";We.prototype.booleanish=!1;We.prototype.boolean=!1;We.prototype.commaOrSpaceSeparated=!1;We.prototype.commaSeparated=!1;We.prototype.defined=!1;We.prototype.mustUseProperty=!1;We.prototype.number=!1;We.prototype.overloadedBoolean=!1;We.prototype.property="";We.prototype.spaceSeparated=!1;We.prototype.space=void 0;let td=0;const ce=Bt(),Le=Bt(),Ba=Bt(),$=Bt(),Re=Bt(),qt=Bt(),Ze=Bt();function Bt(){return 2**++td}const Hr=Object.freeze(Object.defineProperty({__proto__:null,boolean:ce,booleanish:Le,commaOrSpaceSeparated:Ze,commaSeparated:qt,number:$,overloadedBoolean:Ba,spaceSeparated:Re},Symbol.toStringTag,{value:"Module"})),vr=Object.keys(Hr);class pi extends We{constructor(e,n,r,i){let o=-1;if(super(e,n),fo(this,"space",i),typeof r=="number")for(;++o4&&n.slice(0,4)==="data"&&od.test(e)){if(e.charAt(4)==="-"){const o=e.slice(5).replace(po,ld);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=e.slice(4);if(!po.test(o)){let a=o.replace(id,sd);a.charAt(0)!=="-"&&(a="-"+a),e="data"+a}}i=pi}return new i(r,e)}function sd(t){return"-"+t.toLowerCase()}function ld(t){return t.charAt(1).toUpperCase()}const ud=Oa([Fa,nd,ja,Va,Ha],"html"),Ga=Oa([Fa,rd,ja,Va,Ha],"svg"),ho={}.hasOwnProperty;function cd(t,e){const n=e||{};function r(i,...o){let a=r.invalid;const s=r.handlers;if(i&&ho.call(i,t)){const l=String(i[t]);a=ho.call(s,l)?s[l]:r.unknown}if(a)return a.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const fd=/^>|^->||--!>|"],pd=["<",">"];function hd(t,e,n,r){return r.settings.bogusComments?"":"";function i(o){return $t(o,Object.assign({},r.settings.characterReferences,{subset:pd}))}}function md(t,e,n,r){return""}function gd(t,e){const n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function yd(t){return t.join(" ").trim()}const xd=/[ \t\n\f\r]/g;function hi(t){return typeof t=="object"?t.type==="text"?mo(t.value):!1:mo(t)}function mo(t){return t.replace(xd,"")===""}const De=Ya(1),$a=Ya(-1),vd=[];function Ya(t){return e;function e(n,r,i){const o=n?n.children:vd;let a=(r||0)+t,s=o[a];if(!i)for(;s&&hi(s);)a+=t,s=o[a];return s}}const bd={}.hasOwnProperty;function qa(t){return e;function e(n,r,i){return bd.call(t,n.tagName)&&t[n.tagName](n,r,i)}}const mi=qa({body:kd,caption:br,colgroup:br,dd:Ed,dt:Ad,head:br,html:wd,li:_d,optgroup:Md,option:Sd,p:Td,rp:go,rt:go,tbody:Rd,td:yo,tfoot:Cd,th:yo,thead:Id,tr:Nd});function br(t,e,n){const r=De(n,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&hi(r.value.charAt(0)))}function wd(t,e,n){const r=De(n,e);return!r||r.type!=="comment"}function kd(t,e,n){const r=De(n,e);return!r||r.type!=="comment"}function Td(t,e,n){const r=De(n,e);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function _d(t,e,n){const r=De(n,e);return!r||r.type==="element"&&r.tagName==="li"}function Ad(t,e,n){const r=De(n,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function Ed(t,e,n){const r=De(n,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function go(t,e,n){const r=De(n,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function Md(t,e,n){const r=De(n,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function Sd(t,e,n){const r=De(n,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function Id(t,e,n){const r=De(n,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function Rd(t,e,n){const r=De(n,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function Cd(t,e,n){return!De(n,e)}function Nd(t,e,n){const r=De(n,e);return!r||r.type==="element"&&r.tagName==="tr"}function yo(t,e,n){const r=De(n,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const Ld=qa({body:Od,colgroup:Bd,head:Dd,html:Pd,tbody:Fd});function Pd(t){const e=De(t,-1);return!e||e.type!=="comment"}function Dd(t){const e=new Set;for(const r of t.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(e.has(r.tagName))return!1;e.add(r.tagName)}const n=t.children[0];return!n||n.type==="element"}function Od(t){const e=De(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&hi(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function Bd(t,e,n){const r=$a(n,e),i=De(t,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&mi(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function Fd(t,e,n){const r=$a(n,e),i=De(t,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&mi(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const In={name:[[` +\f\r &/=>`.split(""),` +\f\r "&'/=>\``.split("")],[`\0 +\f\r "&'/<=>`.split(""),`\0 +\f\r "&'/<=>\``.split("")]],unquoted:[[` +\f\r &>`.split(""),`\0 +\f\r "&'<=>\``.split("")],[`\0 +\f\r "&'<=>\``.split(""),`\0 +\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function zd(t,e,n,r){const i=r.schema,o=i.space==="svg"?!1:r.settings.omitOptionalTags;let a=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(t.tagName.toLowerCase());const s=[];let l;i.space==="html"&&t.tagName==="svg"&&(r.schema=Ga);const u=Ud(r,t.properties),c=r.all(i.space==="html"&&t.tagName==="template"?t.content:t);return r.schema=i,c&&(a=!1),(u||!o||!Ld(t,e,n))&&(s.push("<",t.tagName,u?" "+u:""),a&&(i.space==="svg"||r.settings.closeSelfClosing)&&(l=u.charAt(u.length-1),(!r.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&s.push(" "),s.push("/")),s.push(">")),s.push(c),!a&&(!o||!mi(t,e,n))&&s.push(""),s.join("")}function Ud(t,e){const n=[];let r=-1,i;if(e){for(i in e)if(e[i]!==null&&e[i]!==void 0){const o=jd(t,i,e[i]);o&&n.push(o)}}for(;++rLi(n,t.alternative)&&(a=t.alternative),s=a+$t(n,Object.assign({},t.settings.characterReferences,{subset:(a==="'"?In.single:In.double)[i][o],attribute:!0}))+a),l+(s&&"="+s))}const Vd=["<","&"];function Ka(t,e,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?t.value:$t(t.value,Object.assign({},r.settings.characterReferences,{subset:Vd}))}function Hd(t,e,n,r){return r.settings.allowDangerousHtml?t.value:Ka(t,e,n,r)}function Gd(t,e,n,r){return r.all(t)}const $d=cd("type",{invalid:Yd,unknown:qd,handlers:{comment:hd,doctype:md,element:zd,raw:Hd,root:Gd,text:Ka}});function Yd(t){throw new Error("Expected node, not `"+t+"`")}function qd(t){const e=t;throw new Error("Cannot compile unknown node `"+e.type+"`")}const Kd={},Wd={},Xd=[];function Qd(t,e){const n=e||Kd,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Zd,all:Jd,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||ed,characterReferences:n.characterReferences||Wd,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?Ga:ud,quote:r,alternative:i}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function Zd(t,e,n){return $d(t,e,n,this)}function Jd(t){const e=[],n=t&&t.children||Xd;let r=-1;for(;++ri?0:i+e:e=e>i?i:e,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(e,n),t.splice(...a);else for(n&&t.splice(e,n);o0?(ct(t,t.length,0,e),t):e}const bo={}.hasOwnProperty;function ip(t){const e={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Kt(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ut=It(/[A-Za-z]/),et=It(/[\dA-Za-z]/),sp=It(/[#-'*+\--9=?A-Z^-~]/);function Gr(t){return t!==null&&(t<32||t===127)}const $r=It(/\d/),lp=It(/[\dA-Fa-f]/),up=It(/[!-/:-@[-`{-~]/);function se(t){return t!==null&&t<-2}function Ke(t){return t!==null&&(t<0||t===32)}function Ae(t){return t===-2||t===-1||t===32}const cp=It(new RegExp("\\p{P}|\\p{S}","u")),fp=It(/\s/);function It(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function Jt(t){const e=[];let n=-1,r=0,i=0;for(;++n55295&&o<57344){const s=t.charCodeAt(n+1);o<56320&&s>56319&&s<57344?(a=String.fromCharCode(o,s),i=1):a="�"}else a=String.fromCharCode(o);a&&(e.push(t.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return e.join("")+t.slice(r)}function Ce(t,e,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(l){return Ae(l)?(t.enter(n),s(l)):e(l)}function s(l){return Ae(l)&&o++a))return;const I=e.events.length;let b=I,g,m;for(;b--;)if(e.events[b][0]==="exit"&&e.events[b][1].type==="chunkFlow"){if(g){m=e.events[b][1].end;break}g=!0}for(k(r),h=I;hA;){const P=n[C];e.containerState=P[1],P[0].exit.call(e,t)}n.length=A}function M(){i.write([null]),o=void 0,i=void 0,e.containerState._closeFlow=void 0}}function gp(t,e,n){return Ce(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ko(t){if(t===null||Ke(t)||fp(t))return 1;if(cp(t))return 2}function yi(t,e,n){const r=[];let i=-1;for(;++i1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const f={...t[r][1].end},p={...t[n][1].start};To(f,-l),To(p,l),a={type:l>1?"strongSequence":"emphasisSequence",start:f,end:{...t[r][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...t[n][1].start},end:p},o={type:l>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...a.start},end:{...s.end}},t[r][1].end={...a.start},t[n][1].start={...s.end},u=[],t[r][1].end.offset-t[r][1].start.offset&&(u=rt(u,[["enter",t[r][1],e],["exit",t[r][1],e]])),u=rt(u,[["enter",i,e],["enter",a,e],["exit",a,e],["enter",o,e]]),u=rt(u,yi(e.parser.constructs.insideSpan.null,t.slice(r+1,n),e)),u=rt(u,[["exit",o,e],["enter",s,e],["exit",s,e],["exit",i,e]]),t[n][1].end.offset-t[n][1].start.offset?(c=2,u=rt(u,[["enter",t[n][1],e],["exit",t[n][1],e]])):c=0,ct(t,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n0&&Ae(h)?Ce(t,M,"linePrefix",o+1)(h):M(h)}function M(h){return h===null||se(h)?t.check(_o,x,C)(h):(t.enter("codeFlowValue"),A(h))}function A(h){return h===null||se(h)?(t.exit("codeFlowValue"),M(h)):(t.consume(h),A)}function C(h){return t.exit("codeFenced"),e(h)}function P(h,I,b){let g=0;return m;function m(B){return h.enter("lineEnding"),h.consume(B),h.exit("lineEnding"),T}function T(B){return h.enter("codeFencedFence"),Ae(B)?Ce(h,S,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):S(B)}function S(B){return B===s?(h.enter("codeFencedFenceSequence"),F(B)):b(B)}function F(B){return B===s?(g++,h.consume(B),F):g>=a?(h.exit("codeFencedFenceSequence"),Ae(B)?Ce(h,D,"whitespace")(B):D(B)):b(B)}function D(B){return B===null||se(B)?(h.exit("codeFencedFence"),I(B)):b(B)}}}function Sp(t,e,n){const r=this;return i;function i(a){return a===null?n(a):(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?n(a):e(a)}}const wr={name:"codeIndented",tokenize:Rp},Ip={partial:!0,tokenize:Cp};function Rp(t,e,n){const r=this;return i;function i(u){return t.enter("codeIndented"),Ce(t,o,"linePrefix",5)(u)}function o(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?l(u):se(u)?t.attempt(Ip,a,l)(u):(t.enter("codeFlowValue"),s(u))}function s(u){return u===null||se(u)?(t.exit("codeFlowValue"),a(u)):(t.consume(u),s)}function l(u){return t.exit("codeIndented"),e(u)}}function Cp(t,e,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):se(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),i):Ce(t,o,"linePrefix",5)(a)}function o(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?e(a):se(a)?i(a):n(a)}}const Np={name:"codeText",previous:Pp,resolve:Lp,tokenize:Dp};function Lp(t){let e=t.length-4,n=3,r,i;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(r=n;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return ethis.left.length)return this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse();const i=this.left.slice(e);return i.push(...this.right.slice(this.right.length-r+this.left.length).reverse()),i}splice(e,n,r){const i=n||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&sn(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),sn(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),sn(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e=4?e(a):t.interrupt(r.parser.constructs.flow,n,e)(a)}}function ts(t,e,n,r,i,o,a,s,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return f;function f(k){return k===60?(t.enter(r),t.enter(i),t.enter(o),t.consume(k),t.exit(o),p):k===null||k===32||k===41||Gr(k)?n(k):(t.enter(r),t.enter(a),t.enter(s),t.enter("chunkString",{contentType:"string"}),x(k))}function p(k){return k===62?(t.enter(o),t.consume(k),t.exit(o),t.exit(i),t.exit(r),e):(t.enter(s),t.enter("chunkString",{contentType:"string"}),d(k))}function d(k){return k===62?(t.exit("chunkString"),t.exit(s),p(k)):k===null||k===60||se(k)?n(k):(t.consume(k),k===92?y:d)}function y(k){return k===60||k===62||k===92?(t.consume(k),d):d(k)}function x(k){return!c&&(k===null||k===41||Ke(k))?(t.exit("chunkString"),t.exit(s),t.exit(a),t.exit(r),e(k)):c999||d===null||d===91||d===93&&!l||d===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):d===93?(t.exit(o),t.enter(i),t.consume(d),t.exit(i),t.exit(r),e):se(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),c):(t.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===null||d===91||d===93||se(d)||s++>999?(t.exit("chunkString"),c(d)):(t.consume(d),l||(l=!Ae(d)),d===92?p:f)}function p(d){return d===91||d===92||d===93?(t.consume(d),s++,f):f(d)}}function rs(t,e,n,r,i,o){let a;return s;function s(p){return p===34||p===39||p===40?(t.enter(r),t.enter(i),t.consume(p),t.exit(i),a=p===40?41:p,l):n(p)}function l(p){return p===a?(t.enter(i),t.consume(p),t.exit(i),t.exit(r),e):(t.enter(o),u(p))}function u(p){return p===a?(t.exit(o),l(a)):p===null?n(p):se(p)?(t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),Ce(t,u,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===a||p===null||se(p)?(t.exit("chunkString"),u(p)):(t.consume(p),p===92?f:c)}function f(p){return p===a||p===92?(t.consume(p),c):c(p)}}function fn(t,e){let n;return r;function r(i){return se(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),n=!0,r):Ae(i)?Ce(t,r,n?"linePrefix":"lineSuffix")(i):e(i)}}const Hp={name:"definition",tokenize:$p},Gp={partial:!0,tokenize:Yp};function $p(t,e,n){const r=this;let i;return o;function o(d){return t.enter("definition"),a(d)}function a(d){return ns.call(r,t,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function s(d){return i=Kt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(t.enter("definitionMarker"),t.consume(d),t.exit("definitionMarker"),l):n(d)}function l(d){return Ke(d)?fn(t,u)(d):u(d)}function u(d){return ts(t,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function c(d){return t.attempt(Gp,f,f)(d)}function f(d){return Ae(d)?Ce(t,p,"whitespace")(d):p(d)}function p(d){return d===null||se(d)?(t.exit("definition"),r.parser.defined.push(i),e(d)):n(d)}}function Yp(t,e,n){return r;function r(s){return Ke(s)?fn(t,i)(s):n(s)}function i(s){return rs(t,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return Ae(s)?Ce(t,a,"whitespace")(s):a(s)}function a(s){return s===null||se(s)?e(s):n(s)}}const qp={name:"hardBreakEscape",tokenize:Kp};function Kp(t,e,n){return r;function r(o){return t.enter("hardBreakEscape"),t.consume(o),i}function i(o){return se(o)?(t.exit("hardBreakEscape"),e(o)):n(o)}}const Wp={name:"headingAtx",resolve:Xp,tokenize:Qp};function Xp(t,e){let n=t.length-2,r=3,i,o;return t[r][1].type==="whitespace"&&(r+=2),n-2>r&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&t[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:t[r][1].start,end:t[n][1].end},o={type:"chunkText",start:t[r][1].start,end:t[n][1].end,contentType:"text"},ct(t,r,n-r+1,[["enter",i,e],["enter",o,e],["exit",o,e],["exit",i,e]])),t}function Qp(t,e,n){let r=0;return i;function i(c){return t.enter("atxHeading"),o(c)}function o(c){return t.enter("atxHeadingSequence"),a(c)}function a(c){return c===35&&r++<6?(t.consume(c),a):c===null||Ke(c)?(t.exit("atxHeadingSequence"),s(c)):n(c)}function s(c){return c===35?(t.enter("atxHeadingSequence"),l(c)):c===null||se(c)?(t.exit("atxHeading"),e(c)):Ae(c)?Ce(t,s,"whitespace")(c):(t.enter("atxHeadingText"),u(c))}function l(c){return c===35?(t.consume(c),l):(t.exit("atxHeadingSequence"),s(c))}function u(c){return c===null||c===35||Ke(c)?(t.exit("atxHeadingText"),s(c)):(t.consume(c),u)}}const Zp=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Eo=["pre","script","style","textarea"],Jp={concrete:!0,name:"htmlFlow",resolveTo:nh,tokenize:rh},eh={partial:!0,tokenize:oh},th={partial:!0,tokenize:ih};function nh(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function rh(t,e,n){const r=this;let i,o,a,s,l;return u;function u(R){return c(R)}function c(R){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(R),f}function f(R){return R===33?(t.consume(R),p):R===47?(t.consume(R),o=!0,x):R===63?(t.consume(R),i=3,r.interrupt?e:_):ut(R)?(t.consume(R),a=String.fromCharCode(R),v):n(R)}function p(R){return R===45?(t.consume(R),i=2,d):R===91?(t.consume(R),i=5,s=0,y):ut(R)?(t.consume(R),i=4,r.interrupt?e:_):n(R)}function d(R){return R===45?(t.consume(R),r.interrupt?e:_):n(R)}function y(R){const ge="CDATA[";return R===ge.charCodeAt(s++)?(t.consume(R),s===ge.length?r.interrupt?e:S:y):n(R)}function x(R){return ut(R)?(t.consume(R),a=String.fromCharCode(R),v):n(R)}function v(R){if(R===null||R===47||R===62||Ke(R)){const ge=R===47,Te=a.toLowerCase();return!ge&&!o&&Eo.includes(Te)?(i=1,r.interrupt?e(R):S(R)):Zp.includes(a.toLowerCase())?(i=6,ge?(t.consume(R),k):r.interrupt?e(R):S(R)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(R):o?M(R):A(R))}return R===45||et(R)?(t.consume(R),a+=String.fromCharCode(R),v):n(R)}function k(R){return R===62?(t.consume(R),r.interrupt?e:S):n(R)}function M(R){return Ae(R)?(t.consume(R),M):m(R)}function A(R){return R===47?(t.consume(R),m):R===58||R===95||ut(R)?(t.consume(R),C):Ae(R)?(t.consume(R),A):m(R)}function C(R){return R===45||R===46||R===58||R===95||et(R)?(t.consume(R),C):P(R)}function P(R){return R===61?(t.consume(R),h):Ae(R)?(t.consume(R),P):A(R)}function h(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(t.consume(R),l=R,I):Ae(R)?(t.consume(R),h):b(R)}function I(R){return R===l?(t.consume(R),l=null,g):R===null||se(R)?n(R):(t.consume(R),I)}function b(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||Ke(R)?P(R):(t.consume(R),b)}function g(R){return R===47||R===62||Ae(R)?A(R):n(R)}function m(R){return R===62?(t.consume(R),T):n(R)}function T(R){return R===null||se(R)?S(R):Ae(R)?(t.consume(R),T):n(R)}function S(R){return R===45&&i===2?(t.consume(R),j):R===60&&i===1?(t.consume(R),J):R===62&&i===4?(t.consume(R),ee):R===63&&i===3?(t.consume(R),_):R===93&&i===5?(t.consume(R),Z):se(R)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(eh,me,F)(R)):R===null||se(R)?(t.exit("htmlFlowData"),F(R)):(t.consume(R),S)}function F(R){return t.check(th,D,me)(R)}function D(R){return t.enter("lineEnding"),t.consume(R),t.exit("lineEnding"),B}function B(R){return R===null||se(R)?F(R):(t.enter("htmlFlowData"),S(R))}function j(R){return R===45?(t.consume(R),_):S(R)}function J(R){return R===47?(t.consume(R),a="",oe):S(R)}function oe(R){if(R===62){const ge=a.toLowerCase();return Eo.includes(ge)?(t.consume(R),ee):S(R)}return ut(R)&&a.length<8?(t.consume(R),a+=String.fromCharCode(R),oe):S(R)}function Z(R){return R===93?(t.consume(R),_):S(R)}function _(R){return R===62?(t.consume(R),ee):R===45&&i===2?(t.consume(R),_):S(R)}function ee(R){return R===null||se(R)?(t.exit("htmlFlowData"),me(R)):(t.consume(R),ee)}function me(R){return t.exit("htmlFlow"),e(R)}}function ih(t,e,n){const r=this;return i;function i(a){return se(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),o):n(a)}function o(a){return r.parser.lazy[r.now().line]?n(a):e(a)}}function oh(t,e,n){return r;function r(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(Qn,e,n)}}const ah={name:"htmlText",tokenize:sh};function sh(t,e,n){const r=this;let i,o,a;return s;function s(_){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(_),l}function l(_){return _===33?(t.consume(_),u):_===47?(t.consume(_),P):_===63?(t.consume(_),A):ut(_)?(t.consume(_),b):n(_)}function u(_){return _===45?(t.consume(_),c):_===91?(t.consume(_),o=0,y):ut(_)?(t.consume(_),M):n(_)}function c(_){return _===45?(t.consume(_),d):n(_)}function f(_){return _===null?n(_):_===45?(t.consume(_),p):se(_)?(a=f,J(_)):(t.consume(_),f)}function p(_){return _===45?(t.consume(_),d):f(_)}function d(_){return _===62?j(_):_===45?p(_):f(_)}function y(_){const ee="CDATA[";return _===ee.charCodeAt(o++)?(t.consume(_),o===ee.length?x:y):n(_)}function x(_){return _===null?n(_):_===93?(t.consume(_),v):se(_)?(a=x,J(_)):(t.consume(_),x)}function v(_){return _===93?(t.consume(_),k):x(_)}function k(_){return _===62?j(_):_===93?(t.consume(_),k):x(_)}function M(_){return _===null||_===62?j(_):se(_)?(a=M,J(_)):(t.consume(_),M)}function A(_){return _===null?n(_):_===63?(t.consume(_),C):se(_)?(a=A,J(_)):(t.consume(_),A)}function C(_){return _===62?j(_):A(_)}function P(_){return ut(_)?(t.consume(_),h):n(_)}function h(_){return _===45||et(_)?(t.consume(_),h):I(_)}function I(_){return se(_)?(a=I,J(_)):Ae(_)?(t.consume(_),I):j(_)}function b(_){return _===45||et(_)?(t.consume(_),b):_===47||_===62||Ke(_)?g(_):n(_)}function g(_){return _===47?(t.consume(_),j):_===58||_===95||ut(_)?(t.consume(_),m):se(_)?(a=g,J(_)):Ae(_)?(t.consume(_),g):j(_)}function m(_){return _===45||_===46||_===58||_===95||et(_)?(t.consume(_),m):T(_)}function T(_){return _===61?(t.consume(_),S):se(_)?(a=T,J(_)):Ae(_)?(t.consume(_),T):g(_)}function S(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(t.consume(_),i=_,F):se(_)?(a=S,J(_)):Ae(_)?(t.consume(_),S):(t.consume(_),D)}function F(_){return _===i?(t.consume(_),i=void 0,B):_===null?n(_):se(_)?(a=F,J(_)):(t.consume(_),F)}function D(_){return _===null||_===34||_===39||_===60||_===61||_===96?n(_):_===47||_===62||Ke(_)?g(_):(t.consume(_),D)}function B(_){return _===47||_===62||Ke(_)?g(_):n(_)}function j(_){return _===62?(t.consume(_),t.exit("htmlTextData"),t.exit("htmlText"),e):n(_)}function J(_){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(_),t.exit("lineEnding"),oe}function oe(_){return Ae(_)?Ce(t,Z,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):Z(_)}function Z(_){return t.enter("htmlTextData"),a(_)}}const xi={name:"labelEnd",resolveAll:fh,resolveTo:dh,tokenize:ph},lh={tokenize:hh},uh={tokenize:mh},ch={tokenize:gh};function fh(t){let e=-1;const n=[];for(;++e=3&&(u===null||se(u))?(t.exit("thematicBreak"),e(u)):n(u)}function l(u){return u===i?(t.consume(u),r++,l):(t.exit("thematicBreakSequence"),Ae(u)?Ce(t,s,"whitespace")(u):s(u))}}const Ye={continuation:{tokenize:Eh},exit:Sh,name:"list",tokenize:Ah},Th={partial:!0,tokenize:Ih},_h={partial:!0,tokenize:Mh};function Ah(t,e,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return s;function s(d){const y=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:$r(d)){if(r.containerState.type||(r.containerState.type=y,t.enter(y,{_container:!0})),y==="listUnordered")return t.enter("listItemPrefix"),d===42||d===45?t.check(Dn,n,u)(d):u(d);if(!r.interrupt||d===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(d)}return n(d)}function l(d){return $r(d)&&++a<10?(t.consume(d),l):(!r.interrupt||a<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(t.exit("listItemValue"),u(d)):n(d)}function u(d){return t.enter("listItemMarker"),t.consume(d),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,t.check(Qn,r.interrupt?n:c,t.attempt(Th,p,f))}function c(d){return r.containerState.initialBlankLine=!0,o++,p(d)}function f(d){return Ae(d)?(t.enter("listItemPrefixWhitespace"),t.consume(d),t.exit("listItemPrefixWhitespace"),p):n(d)}function p(d){return r.containerState.size=o+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(d)}}function Eh(t,e,n){const r=this;return r.containerState._closeFlow=void 0,t.check(Qn,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ce(t,e,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!Ae(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(_h,e,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ce(t,t.attempt(Ye,e,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function Mh(t,e,n){const r=this;return Ce(t,i,"listItemIndent",r.containerState.size+1);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?e(o):n(o)}}function Sh(t){t.exit(this.containerState.type)}function Ih(t,e,n){const r=this;return Ce(t,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const a=r.events[r.events.length-1];return!Ae(o)&&a&&a[1].type==="listItemPrefixWhitespace"?e(o):n(o)}}const Mo={name:"setextUnderline",resolveTo:Rh,tokenize:Ch};function Rh(t,e){let n=t.length,r,i,o;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){r=n;break}t[n][1].type==="paragraph"&&(i=n)}else t[n][1].type==="content"&&t.splice(n,1),!o&&t[n][1].type==="definition"&&(o=n);const a={type:"setextHeading",start:{...t[i][1].start},end:{...t[t.length-1][1].end}};return t[i][1].type="setextHeadingText",o?(t.splice(i,0,["enter",a,e]),t.splice(o+1,0,["exit",t[r][1],e]),t[r][1].end={...t[o][1].end}):t[r][1]=a,t.push(["exit",a,e]),t}function Ch(t,e,n){const r=this;let i;return o;function o(u){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(t.enter("setextHeadingLine"),i=u,a(u)):n(u)}function a(u){return t.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(t.consume(u),s):(t.exit("setextHeadingLineSequence"),Ae(u)?Ce(t,l,"lineSuffix")(u):l(u))}function l(u){return u===null||se(u)?(t.exit("setextHeadingLine"),e(u)):n(u)}}const Nh={tokenize:Lh};function Lh(t){const e=this,n=t.attempt(Qn,r,t.attempt(this.parser.constructs.flowInitial,i,Ce(t,t.attempt(this.parser.constructs.flow,i,t.attempt(Fp,i)),"linePrefix")));return n;function r(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function i(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),e.currentConstruct=void 0,n}}const Ph={resolveAll:os()},Dh=is("string"),Oh=is("text");function is(t){return{resolveAll:os(t==="text"?Bh:void 0),tokenize:e};function e(n){const r=this,i=this.parser.constructs[t],o=n.attempt(i,a,s);return a;function a(c){return u(c)?o(c):s(c)}function s(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),o(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;const f=i[c];let p=-1;if(f)for(;++p-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}o>0&&a.push(t[i].slice(0,o))}return a}function Xh(t,e){let n=-1;const r=[];let i;for(;++n0){const He=ie.tokenStack[ie.tokenStack.length-1];(He[1]||Co).call(ie,void 0,He[0])}for(K.position={start:Tt(U.length>0?U[0][1].start:{line:1,column:1,offset:0}),end:Tt(U.length>0?U[U.length-2][1].end:{line:1,column:1,offset:0})},be=-1;++be1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};t.patch(e,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return t.patch(e,u),t.applyData(e,u)}function pm(t,e){const n={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function hm(t,e){if(t.options.allowDangerousHtml){const n={type:"raw",value:e.value};return t.patch(e,n),t.applyData(e,n)}}function ls(t,e){const n=e.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+r}];const i=t.all(e),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function mm(t,e){const n=String(e.identifier).toUpperCase(),r=t.definitionById.get(n);if(!r)return ls(t,e);const i={src:Jt(r.url||""),alt:e.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return t.patch(e,o),t.applyData(e,o)}function gm(t,e){const n={src:Jt(e.url)};e.alt!==null&&e.alt!==void 0&&(n.alt=e.alt),e.title!==null&&e.title!==void 0&&(n.title=e.title);const r={type:"element",tagName:"img",properties:n,children:[]};return t.patch(e,r),t.applyData(e,r)}function ym(t,e){const n={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return t.patch(e,r),t.applyData(e,r)}function xm(t,e){const n=String(e.identifier).toUpperCase(),r=t.definitionById.get(n);if(!r)return ls(t,e);const i={href:Jt(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:t.all(e)};return t.patch(e,o),t.applyData(e,o)}function vm(t,e){const n={href:Jt(e.url)};e.title!==null&&e.title!==void 0&&(n.title=e.title);const r={type:"element",tagName:"a",properties:n,children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function bm(t,e,n){const r=t.all(e),i=n?wm(n):us(e),o={},a=[];if(typeof e.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s1}function km(t,e){const n={},r=t.all(e);let i=-1;for(typeof e.start=="number"&&e.start!==1&&(n.start=e.start);++i0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Em(t){const e=fs(t),n=cs(t);if(e&&n)return{start:e,end:n}}function Mm(t,e){const n=t.all(e),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:t.wrap([r],!0)};t.patch(e.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:t.wrap(n,!0)},s=fs(e.children[1]),l=cs(e.children[e.children.length-1]);s&&l&&(a.position={start:s,end:l}),i.push(a)}const o={type:"element",tagName:"table",properties:{},children:t.wrap(i,!0)};return t.patch(e,o),t.applyData(e,o)}function Sm(t,e,n){const r=n?n.children:void 0,o=(r?r.indexOf(e):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,s=a?a.length:e.children.length;let l=-1;const u=[];for(;++l0,!0),r[0]),i=r.index+r[0].length,r=n.exec(e);return o.push(Po(e.slice(i),i>0,!1)),o.join("")}function Po(t,e,n){let r=0,i=t.length;if(e){let o=t.codePointAt(r);for(;o===No||o===Lo;)r++,o=t.codePointAt(r)}if(n){let o=t.codePointAt(i-1);for(;o===No||o===Lo;)i--,o=t.codePointAt(i-1)}return i>r?t.slice(r,i):""}function Cm(t,e){const n={type:"text",value:Rm(String(e.value))};return t.patch(e,n),t.applyData(e,n)}function Nm(t,e){const n={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,n),t.applyData(e,n)}const Lm={blockquote:sm,break:lm,code:um,delete:cm,emphasis:fm,footnoteReference:dm,heading:pm,html:hm,imageReference:mm,image:gm,inlineCode:ym,linkReference:xm,link:vm,listItem:bm,list:km,paragraph:Tm,root:_m,strong:Am,table:Mm,tableCell:Im,tableRow:Sm,text:Cm,thematicBreak:Nm,toml:Rn,yaml:Rn,definition:Rn,footnoteDefinition:Rn};function Rn(){}const ps=-1,Zn=0,Vn=1,Hn=2,vi=3,bi=4,wi=5,ki=6,hs=7,ms=8,Do=typeof self=="object"?self:globalThis,Pm=(t,e)=>{const n=(i,o)=>(t.set(o,i),i),r=i=>{if(t.has(i))return t.get(i);const[o,a]=e[i];switch(o){case Zn:case ps:return n(a,i);case Vn:{const s=n([],i);for(const l of a)s.push(r(l));return s}case Hn:{const s=n({},i);for(const[l,u]of a)s[r(l)]=r(u);return s}case vi:return n(new Date(a),i);case bi:{const{source:s,flags:l}=a;return n(new RegExp(s,l),i)}case wi:{const s=n(new Map,i);for(const[l,u]of a)s.set(r(l),r(u));return s}case ki:{const s=n(new Set,i);for(const l of a)s.add(r(l));return s}case hs:{const{name:s,message:l}=a;return n(new Do[s](l),i)}case ms:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i)}return n(new Do[o](a),i)};return r},Oo=t=>Pm(new Map,t)(0),jt="",{toString:Dm}={},{keys:Om}=Object,ln=t=>{const e=typeof t;if(e!=="object"||!t)return[Zn,e];const n=Dm.call(t).slice(8,-1);switch(n){case"Array":return[Vn,jt];case"Object":return[Hn,jt];case"Date":return[vi,jt];case"RegExp":return[bi,jt];case"Map":return[wi,jt];case"Set":return[ki,jt]}return n.includes("Array")?[Vn,n]:n.includes("Error")?[hs,n]:[Hn,n]},Cn=([t,e])=>t===Zn&&(e==="function"||e==="symbol"),Bm=(t,e,n,r)=>{const i=(a,s)=>{const l=r.push(a)-1;return n.set(s,l),l},o=a=>{if(n.has(a))return n.get(a);let[s,l]=ln(a);switch(s){case Zn:{let c=a;switch(l){case"bigint":s=ms,c=a.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return i([ps],a)}return i([s,c],a)}case Vn:{if(l)return i([l,[...a]],a);const c=[],f=i([s,c],a);for(const p of a)c.push(o(p));return f}case Hn:{if(l)switch(l){case"BigInt":return i([l,a.toString()],a);case"Boolean":case"Number":case"String":return i([l,a.valueOf()],a)}if(e&&"toJSON"in a)return o(a.toJSON());const c=[],f=i([s,c],a);for(const p of Om(a))(t||!Cn(ln(a[p])))&&c.push([o(p),o(a[p])]);return f}case vi:return i([s,a.toISOString()],a);case bi:{const{source:c,flags:f}=a;return i([s,{source:c,flags:f}],a)}case wi:{const c=[],f=i([s,c],a);for(const[p,d]of a)(t||!(Cn(ln(p))||Cn(ln(d))))&&c.push([o(p),o(d)]);return f}case ki:{const c=[],f=i([s,c],a);for(const p of a)(t||!Cn(ln(p)))&&c.push(o(p));return f}}const{message:u}=a;return i([s,{name:l,message:u}],a)};return o},Bo=(t,{json:e,lossy:n}={})=>{const r=[];return Bm(!(e||n),!!e,new Map,r)(t),r},Gn=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?Oo(Bo(t,e)):structuredClone(t):(t,e)=>Oo(Bo(t,e));function Fm(t,e){const n=[{type:"text",value:"↩"}];return e>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),n}function zm(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function Um(t){const e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=t.options.footnoteBackContent||Fm,r=t.options.footnoteBackLabel||zm,i=t.options.footnoteLabel||"Footnotes",o=t.options.footnoteLabelTagName||"h2",a=t.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l0&&y.push({type:"text",value:" "});let M=typeof n=="string"?n:n(l,d);typeof M=="string"&&(M={type:"text",value:M}),y.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+p+(d>1?"-"+d:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,d),className:["data-footnote-backref"]},children:Array.isArray(M)?M:[M]})}const v=c[c.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const M=v.children[v.children.length-1];M&&M.type==="text"?M.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...y)}else c.push(...y);const k={type:"element",tagName:"li",properties:{id:e+"fn-"+p},children:t.wrap(c,!0)};t.patch(u,k),s.push(k)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Gn(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` +`},{type:"element",tagName:"ol",properties:{},children:t.wrap(s,!0)},{type:"text",value:` +`}]}}const gs=function(t){if(t==null)return Gm;if(typeof t=="function")return Jn(t);if(typeof t=="object")return Array.isArray(t)?jm(t):Vm(t);if(typeof t=="string")return Hm(t);throw new Error("Expected function, string, or object as test")};function jm(t){const e=[];let n=-1;for(;++n":""))+")"})}return p;function p(){let d=ys,y,x,v;if((!e||o(l,u,c[c.length-1]||void 0))&&(d=Wm(n(l,c)),d[0]===Fo))return d;if("children"in l&&l.children){const k=l;if(k.children&&d[0]!==qm)for(x=(r?k.children.length:-1)+a,v=c.concat(k);x>-1&&x0&&n.push({type:"text",value:` +`}),n}function zo(t){let e=0,n=t.charCodeAt(e);for(;n===9||n===32;)e++,n=t.charCodeAt(e);return t.slice(e)}function Uo(t,e){const n=Zm(t,e),r=n.one(t,void 0),i=Um(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:` +`},i),o}function rg(t,e){return t&&"run"in t?async function(n,r){const i=Uo(n,{file:r,...e});await t.run(i,r)}:function(n,r){return Uo(n,{file:r,...t||e})}}function jo(t){if(t)throw t}var Tr,Vo;function ig(){if(Vo)return Tr;Vo=1;var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):e.call(u)==="[object Array]"},o=function(u){if(!u||e.call(u)!=="[object Object]")return!1;var c=t.call(u,"constructor"),f=u.constructor&&u.constructor.prototype&&t.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!c&&!f)return!1;var p;for(p in u);return typeof p>"u"||t.call(u,p)},a=function(u,c){n&&c.name==="__proto__"?n(u,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):u[c.name]=c.newValue},s=function(u,c){if(c==="__proto__")if(t.call(u,c)){if(r)return r(u,c).value}else return;return u[c]};return Tr=function l(){var u,c,f,p,d,y,x=arguments[0],v=1,k=arguments.length,M=!1;for(typeof x=="boolean"&&(M=x,x=arguments[1]||{},v=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});va.length;let l;s&&a.push(i);try{l=t.apply(this,a)}catch(u){const c=u;if(s&&n)throw c;return i(c)}s||(l&&l.then&&typeof l.then=="function"?l.then(o,i):l instanceof Error?i(l):o(l))}function i(a,...s){n||(n=!0,e(a,...s))}function o(a){i(null,a)}}class Xe extends Error{constructor(e,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},a=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof e=="string"?i=e:!o.cause&&e&&(a=!0,i=e.message,o.cause=e),!o.ruleId&&!o.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const s=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=dn(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}Xe.prototype.file="";Xe.prototype.name="";Xe.prototype.reason="";Xe.prototype.message="";Xe.prototype.stack="";Xe.prototype.column=void 0;Xe.prototype.line=void 0;Xe.prototype.ancestors=void 0;Xe.prototype.cause=void 0;Xe.prototype.fatal=void 0;Xe.prototype.place=void 0;Xe.prototype.ruleId=void 0;Xe.prototype.source=void 0;const lt={basename:lg,dirname:ug,extname:cg,join:fg,sep:"/"};function lg(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');wn(t);let n=0,r=-1,i=t.length,o;if(e===void 0||e.length===0||e.length>t.length){for(;i--;)if(t.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":t.slice(n,r)}if(e===t)return"";let a=-1,s=e.length-1;for(;i--;)if(t.codePointAt(i)===47){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),s>-1&&(t.codePointAt(i)===e.codePointAt(s--)?s<0&&(r=i):(s=-1,r=a));return n===r?r=a:r<0&&(r=t.length),t.slice(n,r)}function ug(t){if(wn(t),t.length===0)return".";let e=-1,n=t.length,r;for(;--n;)if(t.codePointAt(n)===47){if(r){e=n;break}}else r||(r=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function cg(t){wn(t);let e=t.length,n=-1,r=0,i=-1,o=0,a;for(;e--;){const s=t.codePointAt(e);if(s===47){if(a){r=e+1;break}continue}n<0&&(a=!0,n=e+1),s===46?i<0?i=e:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":t.slice(i,n)}function fg(...t){let e=-1,n;for(;++e0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function pg(t,e){let n="",r=0,i=-1,o=0,a=-1,s,l;for(;++a<=t.length;){if(a2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length>0){n="",r=0,i=a,o=0;continue}}e&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+t.slice(i+1,a):n=t.slice(i+1,a),r=a-i-1;i=a,o=0}else s===46&&o>-1?o++:o=-1}return n}function wn(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const hg={cwd:mg};function mg(){return"/"}function Xr(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function gg(t){if(typeof t=="string")t=new URL(t);else if(!Xr(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return yg(t)}function yg(t){if(t.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const e=t.pathname;let n=-1;for(;++n0){let[d,...y]=c;const x=r[p][1];Wr(x)&&Wr(d)&&(d=_r(!0,x,d)),r[p]=[u,d,...y]}}}}const kg=new Ti().freeze();function Sr(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Ir(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Rr(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Go(t){if(!Wr(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function $o(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function Nn(t){return Tg(t)?t:new xg(t)}function Tg(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function _g(t){return typeof t=="string"||Ag(t)}function Ag(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}function _i(){const t=kg().use(am).use(rg).use(ep);return{process:e=>t.processSync(e).toString()}}const Eg={relative:""},Mg={"h-full":"","w-full":""},Sg={key:0,class:"animate-stripe",absolute:"",left:"1/2",bottom:"20%",z:"20","rounded-2xl":"",text:"primary-600","px-2":"","py-2":"",transform:"translate-x--1/2"},Ig={bg:"primary-50","rounded-xl":"","px-10":"","py-6":""},Rg=["innerHTML"],Cg=Be({__name:"Stage",props:{paused:{type:Boolean,default:!1}},setup(t){const e=W(),n=W(),{stageView:r}=qe(Wt()),{mouthOpenSize:i}=qe(Wl()),{audioContext:o,calculateVolume:a}=pa(),{onBeforeMessageComposed:s,onBeforeSend:l,onTokenLiteral:u,onTokenSpecial:c,onStreamEnd:f,streamingMessage:p,onAssistantResponseEnd:d}=St(),{process:y}=_i(),x=li(),v=W(),k=W(!1),M=W(!1),A=or({handlers:[_=>new Promise(ee=>{const me=o.createBufferSource();me.buffer=_.data.audioBuffer,me.connect(o.destination),me.connect(v.value),k.value=!0,me.start(0),me.onended=()=>{k.value=!1,ee()}})]}),C=Ll(),{ssmlEnabled:P,activeSpeechProvider:h,activeSpeechModel:I,activeSpeechVoice:b,pitch:g}=qe(C);async function m(_){try{if(!h.value){console.warn("No active speech provider configured");return}if(!b.value){console.warn("No active speech voice configured");return}const ee=x.getProviderInstance(h.value);if(!ee){console.error("Failed to initialize speech provider");return}const me=x.getProviderConfig(h.value),R=P.value?C.generateSSML(_.data,b.value,{...me,pitch:g.value}):_.data,ge=await Pl({...ee.speech(I.value,me),input:R,voice:b.value.id}),Te=await o.decodeAudioData(ge);await A.add({audioBuffer:Te,text:_.data})}catch(ee){console.error("Speech generation failed:",ee)}}const T=or({handlers:[m]});T.on("add",_=>{console.debug("ttsQueue added",_)});const S=Dl(T),{live2dCurrentMotion:F}=qe(Wt()),D=or({handlers:[async _=>{if(r.value==="3d"){const ee=Ms[_.data];if(!ee)return;await n.value.setExpression(ee)}else r.value==="2d"&&(F.value={group:Ss[_.data]})}]}),B=Ol(D);B.onHandlerEvent("emotion",_=>{console.debug("emotion detected",_)});const j=Bl();j.onHandlerEvent("delay",_=>{console.debug("delay detected",_)});function J(){requestAnimationFrame(J),k.value&&(i.value=a(v.value,"linear"))}function oe(){M.value||(J(),o.resume(),M.value=!0)}function Z(){v.value||(v.value=o.createAnalyser())}return s(async()=>{Z(),oe()}),l(async()=>{F.value={group:Ei}}),u(async _=>{await S.add(_)}),c(async _=>{await j.add(_),await B.add(_)}),f(async()=>{await j.add(Fl)}),d(async _=>{}),Ot(()=>{var ee,me,R;M.value=!1;const _=window;(ee=_.electron)==null||ee.ipcRenderer.removeAllListeners("before-hide"),(me=_.electron)==null||me.ipcRenderer.removeAllListeners("after-show"),(R=_.electron)==null||R.ipcRenderer.removeAllListeners("before-quit")}),pn(()=>{var ee,me,R;const _=window;(ee=_.electron)==null||ee.ipcRenderer.on("before-hide",()=>{F.value={group:_s}}),(me=_.electron)==null||me.ipcRenderer.on("after-show",()=>{F.value={group:As}}),(R=_.electron)==null||R.ipcRenderer.on("before-quit",()=>{F.value={group:Ei}})}),pn(async()=>{e.value=Es({connection:{bundles:Nl()}}),await e.value.execute("CREATE TABLE memory_test (vec FLOAT[768]);")}),(_,ee)=>(Q(),re("div",Eg,[O("div",Mg,[V(r)==="2d"?(Q(),Xt(ou,{key:0,"mouth-open-size":V(i),"min-w":"50% (Q(),re("header",Bg,[O("div",Fg,[ke(Gl)]),ke(V(_l),{class:"m-1 block max-h-[10lh] min-h-[1lh] rounded-lg bg-neutral-100 p-2 text-lg text-neutral-500 outline-none dark:bg-neutral-800 dark:text-neutral-400",to:"/settings"},{default:Ue(()=>n[0]||(n[0]=[O("div",{"i-solar:settings-minimalistic-bold-duotone":""},null,-1)])),_:1})]))}});function xs(t,e){const n=la(e??{},{...Di.getDefaultRealTimeVADOptions("v5"),preSpeechPadFrames:30,positiveSpeechThreshold:.5,negativeSpeechThreshold:.35,minSpeechFrames:30,auto:!0}),r=W(),i=Al("microphone");async function o(){if(r.value&&(r.value.destroy(),r.value=void 0,console.warn("existing MicVAD destroyed")),!i.value)return;const a=V(t);if(!a)return;const s=await navigator.mediaDevices.getUserMedia({audio:{deviceId:a}});r.value=await Di.MicVAD.new({...n,stream:s}),n.auto&&r.value.start()}return Fe(i,o,{immediate:!0}),Fe(El(t),o,{immediate:!0}),Ml(o),Ot(()=>{r.value&&(r.value.destroy(),r.value=void 0)}),{destroy:()=>{r.value&&(r.value.destroy(),r.value=void 0)},start:()=>{r.value&&r.value.start()}}}function Ug(t,e){const n=la(e,{onLoading:()=>{},onInitiate:()=>{},onProgress:()=>{},onDone:()=>{},onReady:()=>{},onStart:()=>{},onUpdate:()=>{},onComplete:()=>{}}),{post:r,data:i,terminate:o}=Sl(t,{type:"module"}),a=W(null),s=W(""),l=W([]),u=W(!1),c=W(0),f=W("");return Fe(i,p=>{var d,y,x,v,k,M,A,C;switch(p.status){case"loading":a.value="loading",s.value=p.data,(d=n.onLoading)==null||d.call(n,p.data);break;case"initiate":l.value.push(p),(y=n.onInitiate)==null||y.call(n,p);break;case"progress":l.value=l.value.map(P=>P.file===p.file?{...P,...p}:P),(x=n.onProgress)==null||x.call(n,p);break;case"done":l.value=l.value.filter(P=>P.file!==p.file),(v=n.onDone)==null||v.call(n,p);break;case"ready":a.value="ready",(k=n.onReady)==null||k.call(n);break;case"start":u.value=!0,(M=n.onStart)==null||M.call(n);break;case"update":c.value=p.tps,(A=n.onUpdate)==null||A.call(n,p.tps);break;case"complete":u.value=!1,f.value=p.output[0]||"",console.debug("Whisper result:",f.value),(C=n.onComplete)==null||C.call(n,p.output[0]);break}}),Ot(()=>{o()}),{transcribe:p=>r(p),status:a,loadingMessage:s,loadingProgress:l,transcribing:u,tps:c,result:f,load:()=>r({type:"load"}),terminate:o}}const jg="/assets/worker-kM8CmLr7.js";async function Vg(t,e){const n=new ArrayBuffer(44+t.length*2),r=new DataView(n);Ln(r,0,"RIFF"),r.setUint32(4,36+t.length*2,!0),Ln(r,8,"WAVE"),Ln(r,12,"fmt "),r.setUint32(16,16,!0),r.setUint16(20,1,!0),r.setUint16(22,1,!0),r.setUint32(24,e,!0),r.setUint32(28,e*2,!0),r.setUint16(32,2,!0),r.setUint16(34,16,!0),Ln(r,36,"data"),r.setUint32(40,t.length*2,!0),Hg(r,44,t);const i=new Blob([r],{type:"audio/wav"});return new Promise((o,a)=>{const s=new FileReader;s.onload=()=>{const l=s.result.split(",")[1];o(l)},s.onerror=a,s.readAsDataURL(i)})}function Ln(t,e,n){for(let r=0;r{jn().then(()=>{i.update(),o.value=i.height.value})}),u(async()=>{jn().then(()=>{i.update(),o.value=i.height.value})}),(c,f)=>{const p=ca("auto-animate");return Q(),re("div",Gg,[f[2]||(f[2]=O("div",{"flex-1":""},null,-1)),At((Q(),re("div",{ref_key:"chatHistoryRef",ref:e,"h-full":"","w-full":"",flex:"~ col","overflow-scroll":""},[f[1]||(f[1]=O("div",{"flex-1":""},null,-1)),(Q(!0),re(ai,null,si(V(n),(d,y)=>(Q(),re("div",{key:y,"mb-2":""},[d.role==="error"?(Q(),re("div",$g,[O("div",Yg,[O("div",qg,[O("div",Kg,[O("span",Wg,he(V(a)("stage.chat.message.character-name.core-system")),1)]),f[0]||(f[0]=O("div",{"i-solar:danger-triangle-bold-duotone":"","text-violet-500":""},null,-1))]),V(r)&&y===V(n).length-1?(Q(),re("div",Xg)):(Q(),re("div",{key:1,class:"markdown-content break-words text-violet-500",text:"base {if(!F||!F.trim())return;const D=o.getProviderConfig(a.value);await y(F,{chatProvider:o.getProviderInstance(a.value),model:s.value,providerConfig:D})}});async function I(){if(e.value.trim())try{const F=o.getProviderConfig(a.value);await y(e.value,{chatProvider:o.getProviderInstance(a.value),model:s.value,providerConfig:F})}catch(F){v.value.pop(),v.value.push({role:"error",content:F.message})}}const{destroy:b,start:g}=xs(d,{onSpeechStart:()=>{n.value=!0},onVADMisfire:()=>{n.value=!1},onSpeechEnd:F=>{n.value=!1,T(F)},auto:!1});function m(){P.value!=="loading"&&(C(),g())}async function T(F){await k.resume();const D=await Vg(F,k.sampleRate);A({type:"generate",data:{audio:D,language:"en"}})}async function S(F){const D=F.target,B=u.value.find(j=>j.deviceId===D.value);if(!B){f.value=void 0;return}f.value=B}return Fe(p,async F=>{F==="false"&&(b(),h())}),Fe(i,async F=>{F&&await c()}),x(async()=>{e.value=""}),(F,D)=>(Q(),re("div",uy,[O("fieldset",cy,[O("label",{class:st([r.value==="chat"?"bg-primary-100 dark:bg-primary-900":"bg-white dark:bg-primary-950",r.value==="chat"?"text-primary-500 dark:text-primary-500":"",{"transition-colors-none ":V(l)}]),flex:"~ row",checked:r.value==="chat","aria-checked":r.value==="chat",border:"solid l-2 t-2 b-2 primary-100 dark:primary-900",bg:"hover:primary-100 dark:hover:primary-900",text:"primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500",transition:"all duration-250 ease-in-out","cursor-pointer":"","items-center":"","gap-1":"","rounded-l-lg":"","px-2":""},[At(O("input",{"onUpdate:modelValue":D[0]||(D[0]=B=>r.value=B),type:"radio",name:"tab",value:"chat",hidden:""},null,512),[[ir,r.value]]),D[5]||(D[5]=O("div",{"i-solar:dialog-2-bold-duotone":"",text:"2xl",transform:"translate-y--2"},null,-1)),O("div",dy,[O("span",py,he(V(M)("stage.chat.tabs.chat")),1)])],10,fy),O("label",{class:st([r.value==="custom"?"bg-primary-100 dark:bg-primary-900":"bg-white dark:bg-primary-950",r.value==="custom"?"text-primary-500 dark:text-primary-500":"",{"transition-colors-none ":V(l)}]),flex:"~ row",checked:r.value==="custom","aria-checked":r.value==="custom",border:"solid t-2 b-2 primary-100 dark:primary-900",bg:"hover:primary-100 dark:hover:primary-900",text:"primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500",transition:"all duration-250 ease-in-out","cursor-pointer":"","items-center":"","gap-1":"","px-2":""},[At(O("input",{"onUpdate:modelValue":D[1]||(D[1]=B=>r.value=B),type:"radio",name:"tab",value:"custom",hidden:""},null,512),[[ir,r.value]]),D[6]||(D[6]=O("div",{"i-solar:star-fall-2-bold-duotone":"",text:"2xl",transform:"translate-y--2"},null,-1)),O("div",my,[O("span",null,he(V(M)("stage.chat.tabs.custom")),1)])],10,hy),O("label",{class:st([r.value==="clothes"?"bg-primary-100 dark:bg-primary-900":"bg-white dark:bg-primary-950",r.value==="clothes"?"text-primary-500 dark:text-primary-500":"",{"transition-colors-none ":V(l)}]),flex:"~ row",checked:r.value==="clothes","aria-checked":r.value==="clothes",border:"solid r-2 t-2 b-2 primary-100 dark:primary-900",bg:"hover:primary-100 dark:hover:primary-900",text:"primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500",transition:"all duration-250 ease-in-out","cursor-pointer":"","items-center":"","gap-1":"","rounded-r-lg":"","px-2":""},[At(O("input",{"onUpdate:modelValue":D[2]||(D[2]=B=>r.value=B),type:"radio",name:"tab",value:"clothes",hidden:""},null,512),[[ir,r.value]]),D[7]||(D[7]=O("div",{"i-solar:magic-stick-3-bold-duotone":"",text:"2xl",transform:"translate-y--2"},null,-1)),O("div",yy,[O("span",null,he(V(M)("stage.chat.tabs.clothes")),1)])],10,gy)]),O("div",xy,[O("div",vy,[ke(ly,{"h-full":"","flex-1":"","p-4":"",w:"full","max-h":"e.value=B),placeholder:V(M)("stage.message"),text:"primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500 placeholder:primary-300 placeholder:hover:primary-500 placeholder:dark:primary-300/50 placeholder:dark:hover:primary-500",bg:"primary-100 dark:primary-400/20","min-h":"[100px]","max-h":"[300px]","w-full":"","rounded-t-xl":"","p-4":"","font-medium":"","outline-none":"",transition:"all duration-250 ease-in-out placeholder:all placeholder:duration-250 placeholder:ease-in-out",class:st({"transition-colors-none placeholder:transition-colors-none":V(l)}),onSubmit:I},null,8,["modelValue","placeholder","class"])])])]),O("div",wy,[O("button",{bg:"complementary-100 hover:complementary-200 dark:complementary-800 dark:hover:complementary-700",transition:"all duration-250 ease-in-out",class:st({"transition-colors-none":V(l)}),text:"complementary-400","mb-6":"",flex:"","cursor-pointer":"","items-center":"","justify-center":"","gap-2":"","rounded-full":"","px-4":"","py-2":"",onClick:m},[ke(Rl,{mode:"out-in"},{default:Ue(()=>[V(P)===null?(Q(),re("div",ky,he(V(M)("stage.operations.load-models")),1)):V(P)==="loading"?(Q(),re("div",Ty,[D[8]||(D[8]=O("div",{"i-svg-spinners:bouncing-ball":"",class:"text-cyan"},null,-1)),O("span",null,he(V(M)("stage.operations.load-models-status.loading")),1)])):V(P)==="ready"?(Q(),re("div",_y,[D[9]||(D[9]=O("div",{"i-lucide:check":"",class:"text-cyan"},null,-1)),O("span",null,he(V(M)("stage.operations.load-models-status.ready")),1)])):it("",!0)]),_:1})],2),O("div",Ay,[ke(V(ui),null,{default:Ue(()=>[i.value?(Q(),re("fieldset",Ey,[(Q(!0),re(ai,null,si(V(u),(B,j)=>(Q(),re("label",{key:j,class:"[&_div_span]:dark:hover:bg-cyan-300 [&_div_span]:dark:hover:bg-cyan-900"},[O("input",{type:"radio",name:"audioInput",value:B.deviceId,hidden:"",onChange:S},null,40,My),O("div",Sy,[O("div",Iy,[B.deviceId===V(d)?(Q(),re("div",Ry)):it("",!0)]),O("span",{"inline-block":"",class:st([B.deviceId===V(d)?"cyan-400 dark:text-white":"cyan-400/50 dark:text-white/50"]),transition:"all duration-250 ease-in-out"},he(B.label),3)])]))),128))])):it("",!0)]),_:1}),O("label",{bg:"complementary-100 hover:complementary-200 dark:complementary-800 dark:hover:complementary-700",transition:"all duration-250 ease-in-out",class:st({"transition-colors-none":V(l)}),text:"complementary-400","h-fit":"",flex:"","cursor-pointer":"","items-center":"","justify-center":"","gap-2":"","rounded-full":"","px-4":"","py-2":""},[At(O("input",{"onUpdate:modelValue":D[4]||(D[4]=B=>i.value=B),type:"checkbox",hidden:""},null,512),[[Zr,i.value]]),D[10]||(D[10]=O("div",{"i-solar:microphone-2-bold-duotone":""},null,-1)),O("div",null,[n.value?(Q(),re("span",Ny,"Listening...")):(Q(),re("span",Cy,he(V(M)("settings.microphone")),1))])],2)])])]))}}),Py=Kn(Ly,[["__scopeId","data-v-1f3e13c7"]]),Dy={py:"1",flex:"~ col",rounded:"lg","overflow-hidden":""},Oy={key:0,flex:"",mr:"12"},By={flex:"~ col",border:"4 solid primary-200/50 dark:primary-500/50",shadow:"md primary-200/50 dark:none","min-w-20":"","rounded-lg":"","px-2":"","py-1":"",h:"unset {jn().then(()=>{i.update(),o.value=i.height.value})}),l(async()=>{jn().then(()=>{i.update(),o.value=i.height.value})}),(u,c)=>{const f=ca("auto-animate");return Q(),re("div",Dy,[c[1]||(c[1]=O("div",{"flex-1":""},null,-1)),At((Q(),re("div",{ref_key:"chatHistoryRef",ref:e,"h-full":"","w-full":"","max-h":"30vh",flex:"~ col","overflow-scroll":""},[c[0]||(c[0]=O("div",{"flex-1":""},null,-1)),(Q(!0),re(ai,null,si(V(r),(p,d)=>(Q(),re("div",{key:d,"mb-2":""},[p.role==="assistant"?(Q(),re("div",Oy,[O("div",By,[O("div",null,[O("span",Fy,he(V(n)("stage.chat.message.character-name.airi")),1)]),p.content?(Q(),re("div",{key:0,class:"markdown-content",text:"base {n.value=!0},onVADMisfire:()=>{n.value=!1},onSpeechEnd:v=>{n.value=!1,x()},auto:!1});function x(v){alert("Transcription is not implemented yet")}return Fe(a,async v=>{v==="false"&&d()}),c(async()=>{e.value=""}),pn(()=>{y()}),(v,k)=>(Q(),re("div",null,[O("div",qy,[ke(Yy,{absolute:"","left-0":"","top-0":"",transform:"translate-y-[-100%]","w-full":""}),O("div",Ky,[ke(V(fa),{modelValue:e.value,"onUpdate:modelValue":k[0]||(k[0]=M=>e.value=M),placeholder:V(f)("stage.message"),border:"solid 2 primary-100 dark:primary-400/20",text:"primary-300 hover:primary-500 dark:primary-300/50 dark:hover:primary-500 placeholder:primary-300 placeholder:hover:primary-500 placeholder:dark:primary-300/50 placeholder:dark:hover:primary-500",bg:"primary-100 dark:primary-400/20","max-h":"[10lh]","min-h":"[1lh]","w-full":"","resize-none":"","overflow-y-scroll":"","rounded-xl":"","p-2":"","font-medium":"","outline-none":"",transition:"all duration-250 ease-in-out placeholder:all placeholder:duration-250 placeholder:ease-in-out",class:st({"transition-colors-none placeholder:transition-colors-none":V(l)}),onSubmit:p},null,8,["modelValue","placeholder","class"])])])]))}}),Xy={class:"relative"},Qy={absolute:"","left-0":"","right-0":"","top-0":"","w-full":"","overflow-hidden":""},Zy=Be({__name:"AnimatedWave",props:{height:{default:40},amplitude:{default:14},waveLength:{default:250},fillColor:{default:"oklch(95% 0.10 var(--theme-colors-hue))"},direction:{default:"down"},movementDirection:{default:"left"},animationSpeed:{default:50}},setup(t){const e=t,n=W(e.height),r=W(e.amplitude),i=W(e.waveLength),o=W(e.fillColor),a=W(e.direction),s=W(e.movementDirection);function l(f,p,d,y,x){const v=[],M=Math.ceil(f/y)*y,A=1,C=x==="up"?d:p-d;v.push(`M 0 ${C}`);const P=Math.PI*2/y;for(let I=0;I<=M;I+=A){const b=d*Math.sin(P*I),g=x==="up"?C-b:C+b;v.push(`L ${I} ${g}`)}const h=x==="up"?p:0;return v.push(`L ${M} ${h}`),v.push(`L 0 ${h} Z`),v.join(" ")}const u=je(()=>n.value+r.value*2),c=je(()=>{const f=` + + `;return`url(data:image/svg+xml;base64,${btoa(f)})`});return Fe(()=>[e.height,e.amplitude,e.waveLength,e.fillColor,e.direction,e.movementDirection],()=>{n.value=e.height,r.value=e.amplitude,i.value=e.waveLength,o.value=e.fillColor,a.value=e.direction,s.value=e.movementDirection},{immediate:!0}),(f,p)=>(Q(),re("div",Xy,[gn(f.$slots,"default",{},void 0,!0),O("div",Qy,[O("div",{class:"wave",style:Pr({background:o.value,height:`${u.value}px`,maskImage:c.value,WebkitMaskImage:c.value,"--wave-translate":`${-i.value}px`,"--animation-duration":`${i.value/t.animationSpeed}s`,"animation-direction":s.value==="left"?"normal":"reverse"})},null,4)])]))}}),Jy=Kn(Zy,[["__scopeId","data-v-d4cf94d8"]]),e0={relative:"",flex:"~ col","z-2":"","h-100dvh":"","w-100vw":"","of-hidden":""},t0={relative:"",flex:"~ 1 row gap-y-0 gap-x-2 (Q(),Xt(Og,null,{default:Ue(()=>[ke(Jy,{"fill-color":V(e)?"oklch(35% calc(var(--theme-colors-chroma) * 0.6) var(--theme-colors-hue))":"color-mix(in srgb, oklch(95% calc(var(--theme-colors-chroma-50) * 0.5) var(--theme-colors-hue)) 80%, oklch(100% 0 360))"},{default:Ue(()=>[O("div",e0,[O("div",null,[ke(zg,{class:"flex",p2:""})]),O("div",t0,[ke(V(Ng),{"flex-1":"","min-w":"1/2",paused:n.value},null,8,["paused"]),ke(Py,{class:"flex (o(),r("label",Q,[a(e("input",{"onUpdate:modelValue":c[0]||(c[0]=v=>n.value=v),"aria-checked":n.value,type:"checkbox",hidden:""},null,8,W),[[V,n.value]]),e("div",null,[h(u(y.$t(p.text))+" ",1),p.description?(o(),r("div",X,u(y.$t(p.description)),1)):U("",!0)]),m(H,{name:"slide-away",mode:"out-in"},{default:g(()=>[n.value?(o(),r("div",{key:0,class:x(p.iconOn),transition:"all ease-in-out duration-250"},null,2)):(o(),r("div",{key:1,class:x(p.iconOff),transition:"all ease-in-out duration-250"},null,2))]),_:1})]))}}),Y=[[],["#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"]],Z={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",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+3*10,delay:3*50,transition:"all ease-in-out duration-250"},ee={value:"en-US"},te={value:"zh-CN"},ie={flex:"","items-center":"","justify-between":"",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+5*10,delay:5*50,transition:"all ease-in-out duration-250"},ne={"text-lg":"","font-semibold":""},ae={relative:"",flex:"","cursor-pointer":"","items-center":"","gap-2":""},oe=["disabled"],se={class:"color-bar",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+7*10,delay:7*50,transition:"all ease-in-out duration-250"},le={"text-white":"",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+8*10,delay:8*50,transition:"all ease-in-out duration-250"},re={class:"color-bar transparency-grid",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+9*10,delay:9*50,transition:"all ease-in-out duration-250"},de=["duration","delay"],ue={"font-medium":""},pe={text:"sm neutral-500"},ye={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[65dvh]","right--15":"","z--1":"",initial:{scale:.9,opacity:0,rotate:30},enter:{scale:1,opacity:1,rotate:0},duration:250,flex:"","items-center":"","justify-center":""},$=A({__name:"index",setup(p){const n=M(),y=O(),{t:c}=j(),v=N(!1);return P(()=>[n.usePageSpecificTransitions,n.disableTransitions],()=>{v.value=!0}),(d,t)=>{const s=z("motion");return o(),r(D,null,[m(i(G),{title:d.$t("settings.pages.themes.title"),subtitle:d.$t("settings.title")},null,8,["title","subtitle"]),a((o(),f(i(C),{title:i(c)("settings.sections.section.general.title"),icon:"i-solar:filters-bold-duotone",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+1*10,delay:1*50,transition:"all ease-in-out duration-250"},{default:g(()=>[a(m(B,{modelValue:i(y),"onUpdate:modelValue":t[0]||(t[0]=l=>I(y)?y.value=l:null),initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+2*10,delay:2*50,"icon-on":"i-solar:moon-stars-bold-duotone","icon-off":"i-solar:sun-fog-bold-duotone",text:"settings.theme",transition:"all ease-in-out duration-250"},null,8,["modelValue"]),[[s]]),a((o(),r("div",Z,[h(u(d.$t("settings.language.title"))+" ",1),a(e("select",{"onUpdate:modelValue":t[1]||(t[1]=l=>i(n).language=l),transition:"all ease-in-out duration-250","cursor-pointer":"","bg-transparent":"","text-right":"","outline-none":""},[e("option",ee,u(d.$t("settings.language.english")),1),e("option",te,u(d.$t("settings.language.chinese")),1)],512),[[L,i(n).language]])])),[[s]])]),_:1},8,["title"])),[[s]]),a((o(),f(i(C),{title:i(c)("settings.pages.themes.sections.section.custom-color.title"),icon:"i-solar:pallete-2-bold-duotone",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+4*10,delay:4*50,transition:"all ease-in-out duration-250"},{default:g(()=>[a((o(),r("div",ie,[e("span",ne,u(d.$t("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.label")),1),e("label",ae,[a(e("input",{"onUpdate:modelValue":t[2]||(t[2]=l=>i(n).themeColorsHueDynamic=l),type:"checkbox",class:"peer sr-only"},null,512),[[V,i(n).themeColorsHueDynamic]]),t[6]||(t[6]=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)),h(" "+u(d.$t("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.rgb-on.title")),1)])])),[[s]]),a(e("input",{"onUpdate:modelValue":t[3]||(t[3]=l=>i(n).themeColorsHue=l),initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+6*10,delay:6*50,transition:"all ease-in-out duration-250",type:"range",min:"0",max:"360",step:"0.01",class:x(["theme-hue-slider",i(n).themeColorsHueDynamic?"opacity-25 cursor-not-allowed":"cursor-pointer"]),disabled:i(n).themeColorsHueDynamic},null,10,oe),[[R,i(n).themeColorsHue],[s]]),a((o(),r("div",se,[t[8]||(t[8]=e("span",{"bg-primary-50":""},"50",-1)),t[9]||(t[9]=e("span",{"bg-primary-100":""},"100",-1)),t[10]||(t[10]=e("span",{"bg-primary-200":""},"200",-1)),t[11]||(t[11]=e("span",{"bg-primary-300":""},"300",-1)),t[12]||(t[12]=e("span",{"bg-primary-400":""},"400",-1)),t[13]||(t[13]=e("span",{"bg-primary-500":""},"500",-1)),a((o(),r("div",le,t[7]||(t[7]=[e("span",{"bg-primary-600":""},"600",-1),e("span",{"bg-primary-700":""},"700",-1),e("span",{"bg-primary-800":""},"800",-1),e("span",{"bg-primary-900":""},"900",-1),e("span",{"bg-primary-950":""},"950",-1)]))),[[s]])])),[[s]]),a((o(),r("div",re,t[14]||(t[14]=[e("span",{bg:"primary-500/5"},"500/5",-1),e("span",{bg:"primary-500/10"},"500/10",-1),e("span",{bg:"primary-500/20"},"500/20",-1),e("span",{bg:"primary-500/30"},"500/30",-1),e("span",{bg:"primary-500/40"},"500/40",-1),e("span",{bg:"primary-500/50"},"500/50",-1),e("span",{bg:"primary-500/60"},"500/60",-1),e("span",{bg:"primary-500/70"},"500/70",-1),e("span",{bg:"primary-500/80"},"500/80",-1),e("span",{bg:"primary-500/90"},"500/90",-1),e("span",{bg:"primary-500"},"500",-1)]))),[[s]])]),_:1},8,["title"])),[[s]]),a((o(),f(i(C),{title:"settings.pages.themes.sections.section.theme-presets.title",icon:"i-solar:magic-stick-2-bold-duotone",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+10*10,delay:10*50,transition:"all ease-in-out duration-250"},{default:g(()=>[(o(!0),r(D,null,q(d.$tm("settings.pages.themes.sections.section.theme-presets.presets"),({title:l,description:w,colors:E},b)=>a((o(),r("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",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+11*10+b*10,delay:11*50+b*50,transition:"all ease-in-out duration-250"},[e("div",null,[e("span",ue,u(d.$rt(l)),1),e("div",pe,u(d.$rt(w)),1)]),m(K,{colors:E.map((T,S)=>({hex:i(Y)[b][S],name:d.$rt(T)}))},null,8,["colors"])],8,de)),[[s]])),128))]),_:1})),[[s]]),a((o(),f(i(C),{title:"settings.pages.themes.sections.section.developer.title",icon:"i-solar:code-bold-duotone",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+18*10,delay:18*50,transition:"all ease-in-out duration-250"},{default:g(()=>[a(m(B,{modelValue:i(n).disableTransitions,"onUpdate:modelValue":t[4]||(t[4]=l=>i(n).disableTransitions=l),"icon-on":"i-solar:people-nearby-bold-duotone","icon-off":"i-solar:running-2-line-duotone",text:"settings.animations.stage-transitions.title",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+19*10,delay:19*50,transition:"all ease-in-out duration-250"},null,8,["modelValue"]),[[s]]),a(m(B,{modelValue:i(n).usePageSpecificTransitions,"onUpdate:modelValue":t[5]||(t[5]=l=>i(n).usePageSpecificTransitions=l),disabled:i(n).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",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+20*10,delay:20*50,transition:"all ease-in-out duration-250"},null,8,["modelValue","disabled"]),[[s]])]),_:1})),[[s]]),a((o(),r("div",ye,t[15]||(t[15]=[e("div",{text:"60","i-solar:filters-bold-duotone":""},null,-1)]))),[[s]])],64)}}});typeof k=="function"&&k($);const he=J($,[["__scopeId","data-v-4a014d7b"]]);export{he as default}; +import{d as A,bI as _,bJ as F,c as r,o,A as a,a as e,b as m,B as V,bL as h,C as U,D as u,y as g,z as x,bB as H,v as M,bC as O,q as j,g as N,w as P,bw as z,u as i,x as f,ad as I,bH as L,bE as R,bx as D,by as q,bn as J}from"./index-_NYoebRU.js";import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import{_ as G}from"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js";import{_ as C,a as K}from"./ColorPalette.vue_vue_type_script_setup_true_lang-DQF1MPun.js";import{b as k}from"./route-block-B_A1xBdJ.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-Dx_TCyI1.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Cx39i7VD.js";import"./index-Bl8tS_1d.js";const Q={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"},W=["aria-checked"],X={key:0,text:"sm neutral-500"},B=A({__name:"CheckBar",props:_({text:null,iconOn:null,iconOff:null,description:null},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(p){const n=F(p,"modelValue");return(y,c)=>(o(),r("label",Q,[a(e("input",{"onUpdate:modelValue":c[0]||(c[0]=v=>n.value=v),"aria-checked":n.value,type:"checkbox",hidden:""},null,8,W),[[V,n.value]]),e("div",null,[h(u(y.$t(p.text))+" ",1),p.description?(o(),r("div",X,u(y.$t(p.description)),1)):U("",!0)]),m(H,{name:"slide-away",mode:"out-in"},{default:g(()=>[n.value?(o(),r("div",{key:0,class:x(p.iconOn),transition:"all ease-in-out duration-250"},null,2)):(o(),r("div",{key:1,class:x(p.iconOff),transition:"all ease-in-out duration-250"},null,2))]),_:1})]))}}),Y=[[],["#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"]],Z={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",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+3*10,delay:3*50,transition:"all ease-in-out duration-250"},ee={value:"en-US"},te={value:"zh-CN"},ie={flex:"","items-center":"","justify-between":"",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+5*10,delay:5*50,transition:"all ease-in-out duration-250"},ne={"text-lg":"","font-semibold":""},ae={relative:"",flex:"","cursor-pointer":"","items-center":"","gap-2":""},oe=["disabled"],se={class:"color-bar",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+7*10,delay:7*50,transition:"all ease-in-out duration-250"},le={"text-white":"",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+8*10,delay:8*50,transition:"all ease-in-out duration-250"},re={class:"color-bar transparency-grid",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+9*10,delay:9*50,transition:"all ease-in-out duration-250"},de=["duration","delay"],ue={"font-medium":""},pe={text:"sm neutral-500"},ye={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[65dvh]","right--15":"","z--1":"",initial:{scale:.9,opacity:0,rotate:30},enter:{scale:1,opacity:1,rotate:0},duration:250,flex:"","items-center":"","justify-center":""},$=A({__name:"index",setup(p){const n=M(),y=O(),{t:c}=j(),v=N(!1);return P(()=>[n.usePageSpecificTransitions,n.disableTransitions],()=>{v.value=!0}),(d,t)=>{const s=z("motion");return o(),r(D,null,[m(i(G),{title:d.$t("settings.pages.themes.title"),subtitle:d.$t("settings.title")},null,8,["title","subtitle"]),a((o(),f(i(C),{title:i(c)("settings.sections.section.general.title"),icon:"i-solar:filters-bold-duotone",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+1*10,delay:1*50,transition:"all ease-in-out duration-250"},{default:g(()=>[a(m(B,{modelValue:i(y),"onUpdate:modelValue":t[0]||(t[0]=l=>I(y)?y.value=l:null),initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+2*10,delay:2*50,"icon-on":"i-solar:moon-stars-bold-duotone","icon-off":"i-solar:sun-fog-bold-duotone",text:"settings.theme",transition:"all ease-in-out duration-250"},null,8,["modelValue"]),[[s]]),a((o(),r("div",Z,[h(u(d.$t("settings.language.title"))+" ",1),a(e("select",{"onUpdate:modelValue":t[1]||(t[1]=l=>i(n).language=l),transition:"all ease-in-out duration-250","cursor-pointer":"","bg-transparent":"","text-right":"","outline-none":""},[e("option",ee,u(d.$t("settings.language.english")),1),e("option",te,u(d.$t("settings.language.chinese")),1)],512),[[L,i(n).language]])])),[[s]])]),_:1},8,["title"])),[[s]]),a((o(),f(i(C),{title:i(c)("settings.pages.themes.sections.section.custom-color.title"),icon:"i-solar:pallete-2-bold-duotone",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+4*10,delay:4*50,transition:"all ease-in-out duration-250"},{default:g(()=>[a((o(),r("div",ie,[e("span",ne,u(d.$t("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.label")),1),e("label",ae,[a(e("input",{"onUpdate:modelValue":t[2]||(t[2]=l=>i(n).themeColorsHueDynamic=l),type:"checkbox",class:"peer sr-only"},null,512),[[V,i(n).themeColorsHueDynamic]]),t[6]||(t[6]=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)),h(" "+u(d.$t("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.rgb-on.title")),1)])])),[[s]]),a(e("input",{"onUpdate:modelValue":t[3]||(t[3]=l=>i(n).themeColorsHue=l),initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+6*10,delay:6*50,transition:"all ease-in-out duration-250",type:"range",min:"0",max:"360",step:"0.01",class:x(["theme-hue-slider",i(n).themeColorsHueDynamic?"opacity-25 cursor-not-allowed":"cursor-pointer"]),disabled:i(n).themeColorsHueDynamic},null,10,oe),[[R,i(n).themeColorsHue],[s]]),a((o(),r("div",se,[t[8]||(t[8]=e("span",{"bg-primary-50":""},"50",-1)),t[9]||(t[9]=e("span",{"bg-primary-100":""},"100",-1)),t[10]||(t[10]=e("span",{"bg-primary-200":""},"200",-1)),t[11]||(t[11]=e("span",{"bg-primary-300":""},"300",-1)),t[12]||(t[12]=e("span",{"bg-primary-400":""},"400",-1)),t[13]||(t[13]=e("span",{"bg-primary-500":""},"500",-1)),a((o(),r("div",le,t[7]||(t[7]=[e("span",{"bg-primary-600":""},"600",-1),e("span",{"bg-primary-700":""},"700",-1),e("span",{"bg-primary-800":""},"800",-1),e("span",{"bg-primary-900":""},"900",-1),e("span",{"bg-primary-950":""},"950",-1)]))),[[s]])])),[[s]]),a((o(),r("div",re,t[14]||(t[14]=[e("span",{bg:"primary-500/5"},"500/5",-1),e("span",{bg:"primary-500/10"},"500/10",-1),e("span",{bg:"primary-500/20"},"500/20",-1),e("span",{bg:"primary-500/30"},"500/30",-1),e("span",{bg:"primary-500/40"},"500/40",-1),e("span",{bg:"primary-500/50"},"500/50",-1),e("span",{bg:"primary-500/60"},"500/60",-1),e("span",{bg:"primary-500/70"},"500/70",-1),e("span",{bg:"primary-500/80"},"500/80",-1),e("span",{bg:"primary-500/90"},"500/90",-1),e("span",{bg:"primary-500"},"500",-1)]))),[[s]])]),_:1},8,["title"])),[[s]]),a((o(),f(i(C),{title:"settings.pages.themes.sections.section.theme-presets.title",icon:"i-solar:magic-stick-2-bold-duotone",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+10*10,delay:10*50,transition:"all ease-in-out duration-250"},{default:g(()=>[(o(!0),r(D,null,q(d.$tm("settings.pages.themes.sections.section.theme-presets.presets"),({title:l,description:w,colors:E},b)=>a((o(),r("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",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+11*10+b*10,delay:11*50+b*50,transition:"all ease-in-out duration-250"},[e("div",null,[e("span",ue,u(d.$rt(l)),1),e("div",pe,u(d.$rt(w)),1)]),m(K,{colors:E.map((T,S)=>({hex:i(Y)[b][S],name:d.$rt(T)}))},null,8,["colors"])],8,de)),[[s]])),128))]),_:1})),[[s]]),a((o(),f(i(C),{title:"settings.pages.themes.sections.section.developer.title",icon:"i-solar:code-bold-duotone",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+18*10,delay:18*50,transition:"all ease-in-out duration-250"},{default:g(()=>[a(m(B,{modelValue:i(n).disableTransitions,"onUpdate:modelValue":t[4]||(t[4]=l=>i(n).disableTransitions=l),"icon-on":"i-solar:people-nearby-bold-duotone","icon-off":"i-solar:running-2-line-duotone",text:"settings.animations.stage-transitions.title",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+19*10,delay:19*50,transition:"all ease-in-out duration-250"},null,8,["modelValue"]),[[s]]),a(m(B,{modelValue:i(n).usePageSpecificTransitions,"onUpdate:modelValue":t[5]||(t[5]=l=>i(n).usePageSpecificTransitions=l),disabled:i(n).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",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+20*10,delay:20*50,transition:"all ease-in-out duration-250"},null,8,["modelValue","disabled"]),[[s]])]),_:1})),[[s]]),a((o(),r("div",ye,t[15]||(t[15]=[e("div",{text:"60","i-solar:filters-bold-duotone":""},null,-1)]))),[[s]])],64)}}});typeof k=="function"&&k($);const he=J($,[["__scopeId","data-v-4a014d7b"]]);export{he as default}; diff --git a/assets/index-DuLZCAM8.js b/assets/index-DvPtiAnj.js similarity index 88% rename from assets/index-DuLZCAM8.js rename to assets/index-DvPtiAnj.js index e6f5ee1dce50b832e9604e08679eb3b3c043b58a..0f9bd8153fbe36e2f858389af2ec784391a1342b 100644 --- a/assets/index-DuLZCAM8.js +++ b/assets/index-DvPtiAnj.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import{_ as h}from"./PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js";import{d as v,q as _,h as k,bw as x,c as t,o as i,b as I,a as d,x as l,A as m,u as s,bx as g,by as w}from"./index-D8Nm21zW.js";import{I as z}from"./IconStatusItem-BzE_9TF3.js";import{_ as A}from"./IconAnimation.vue_vue_type_script_setup_true_lang-CRr1ZQyH.js";import{u as B}from"./useIconAnimation-D5irYuyi.js";import{b as u}from"./route-block-B_A1xBdJ.js";const $={grid:"~ cols-1 sm:cols-2 gap-4"},C={key:1,text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,y:20},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},D=v({__name:"index",setup(L){const{t:e}=_(),p=k(()=>[{id:"consciousness",name:e("settings.pages.modules.consciousness.title"),description:e("settings.pages.modules.consciousness.description"),icon:"i-solar:ghost-bold-duotone",to:"/settings/modules/consciousness",configured:!1},{id:"speech",name:e("settings.pages.modules.speech.title"),description:e("settings.pages.modules.speech.description"),icon:"i-solar:user-speak-rounded-bold-duotone",to:"/settings/modules/speech",configured:!1},{id:"hearing",name:e("settings.pages.modules.hearing.title"),description:e("settings.pages.modules.hearing.description"),icon:"i-solar:microphone-3-bold-duotone",to:"",configured:!1},{id:"vision",name:e("settings.pages.modules.vision.title"),description:e("settings.pages.modules.vision.description"),icon:"i-solar:eye-closed-bold-duotone",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-solar:bookmark-bold-duotone",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-solar:book-bookmark-bold-duotone",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:f,showIconAnimation:y,animationIcon:b}=B("i-solar:layers-bold-duotone");return(n,r)=>{const a=x("motion");return i(),t(g,null,[I(s(h),{title:n.$t("settings.pages.modules.title"),subtitle:n.$t("settings.title")},null,8,["title","subtitle"]),d("div",$,[(i(!0),t(g,null,w(p.value,(o,c)=>m((i(),l(s(z),{key:o.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+c*10,delay:c*50,title:o.name,description:o.description,icon:o.icon,"icon-color":o.iconColor,"icon-image":o.iconImage,to:o.to,configured:o.configured},null,8,["duration","delay","title","description","icon","icon-color","icon-image","to","configured"])),[[a]])),128))]),s(y)?(i(),l(A,{key:0,icon:s(b),"icon-size":12,duration:1e3,started:s(f),"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((i(),t("div",C,r[0]||(r[0]=[d("div",{text:"60","i-solar:layers-bold-duotone":""},null,-1)]))),[[a]])],64)}}});typeof u=="function"&&u(D);export{D as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import{_ as h}from"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js";import{d as v,q as _,h as k,bw as x,c as t,o as i,b as I,a as d,x as l,A as m,u as s,bx as g,by as w}from"./index-_NYoebRU.js";import{I as z}from"./IconStatusItem-DEltasic.js";import{_ as A}from"./IconAnimation.vue_vue_type_script_setup_true_lang-BRA-bMih.js";import{u as B}from"./useIconAnimation-Cb5gBMka.js";import{b as u}from"./route-block-B_A1xBdJ.js";const $={grid:"~ cols-1 sm:cols-2 gap-4"},C={key:1,text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,y:20},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},D=v({__name:"index",setup(L){const{t:e}=_(),p=k(()=>[{id:"consciousness",name:e("settings.pages.modules.consciousness.title"),description:e("settings.pages.modules.consciousness.description"),icon:"i-solar:ghost-bold-duotone",to:"/settings/modules/consciousness",configured:!1},{id:"speech",name:e("settings.pages.modules.speech.title"),description:e("settings.pages.modules.speech.description"),icon:"i-solar:user-speak-rounded-bold-duotone",to:"/settings/modules/speech",configured:!1},{id:"hearing",name:e("settings.pages.modules.hearing.title"),description:e("settings.pages.modules.hearing.description"),icon:"i-solar:microphone-3-bold-duotone",to:"",configured:!1},{id:"vision",name:e("settings.pages.modules.vision.title"),description:e("settings.pages.modules.vision.description"),icon:"i-solar:eye-closed-bold-duotone",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-solar:bookmark-bold-duotone",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-solar:book-bookmark-bold-duotone",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:f,showIconAnimation:y,animationIcon:b}=B("i-solar:layers-bold-duotone");return(n,r)=>{const a=x("motion");return i(),t(g,null,[I(s(h),{title:n.$t("settings.pages.modules.title"),subtitle:n.$t("settings.title")},null,8,["title","subtitle"]),d("div",$,[(i(!0),t(g,null,w(p.value,(o,c)=>m((i(),l(s(z),{key:o.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+c*10,delay:c*50,title:o.name,description:o.description,icon:o.icon,"icon-color":o.iconColor,"icon-image":o.iconImage,to:o.to,configured:o.configured},null,8,["duration","delay","title","description","icon","icon-color","icon-image","to","configured"])),[[a]])),128))]),s(y)?(i(),l(A,{key:0,icon:s(b),"icon-size":12,duration:1e3,started:s(f),"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((i(),t("div",C,r[0]||(r[0]=[d("div",{text:"60","i-solar:layers-bold-duotone":""},null,-1)]))),[[a]])],64)}}});typeof u=="function"&&u(D);export{D as default}; diff --git a/assets/index-D8Nm21zW.js b/assets/index-_NYoebRU.js similarity index 99% rename from assets/index-D8Nm21zW.js rename to assets/index-_NYoebRU.js index 9cec09575ab0a0aeb4f28e51ee6055455b021c93..bb686c2ff2ca8da66493a7e2cc9e967ae9f60dc6 100644 --- a/assets/index-D8Nm21zW.js +++ b/assets/index-_NYoebRU.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-_iAhyx9C.js","assets/HeaderLink-yHEt2vbv.js","assets/HeaderLink-DsxHr3rn.css","assets/index-CrclHGQ3.js","assets/Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js","assets/Stage-BMdJCq4V.css","assets/import-url-browser-CPN8ipMD.js","assets/duckdb-mvp-CaaD-olE.js","assets/speech-B27BwGQ-.js","assets/index-Be1NqeGb.js","assets/providers-DUDq6kdm.js","assets/queue-CEzllKo3.js","assets/queues-DJEZsGUG.js","assets/index-D975M2PQ.js","assets/airi-card-DeGSbHPj.js","assets/consciousness-CgTB9b9w.js","assets/Model.vue_vue_type_script_setup_true_lang-xbmtXrdQ.js","assets/TransitionVertical.vue_vue_type_script_setup_true_lang-CL9MLblt.js","assets/Collapsable.vue_vue_type_script_setup_true_lang-CYg3DjVq.js","assets/Basic.vue_vue_type_script_setup_true_lang-CrXWH1a1.js","assets/index-DxNnZI6o.js","assets/route-block-B_A1xBdJ.js","assets/index-DFm202zN.css","assets/background-remove-xa-QFjKj.js","assets/InputFile.vue_vue_type_script_setup_true_lang-aVfE3xzX.js","assets/chat-BJiWkk-g.js","assets/image-CIQPT2z3.js","assets/image-BhuwcwI9.css","assets/vibrant-Ck8ouQeR.js","assets/browser-CkchkNbv.js","assets/queue-D7nBskKs.js","assets/index-CMXq_S_x.js","assets/PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js","assets/IconAnimation.vue_vue_type_script_setup_true_lang-CRr1ZQyH.js","assets/index-B5H7zFR1.js","assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-DAwVKIUC.js","assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-NzJTgSSI.js","assets/index-BUaUWOtl.js","assets/CardListItem.vue_vue_type_script_setup_true_lang-DG6xnm5K.js","assets/CardDetailDialog-Dxt-FHQW.js","assets/CardListItem-CmKnCrTs.js","assets/DeleteCardDialog-BfLGvfow.js","assets/index-DgTAR4Sy.js","assets/ColorPalette.vue_vue_type_script_setup_true_lang-Dh84R3gB.js","assets/index-4Fmwd3_O.css","assets/index-Cy4LPsSb.js","assets/index-Cu7e5uZ2.js","assets/useIconAnimation-D5irYuyi.js","assets/index-rlpEp8ML.css","assets/index-DuLZCAM8.js","assets/IconStatusItem-BzE_9TF3.js","assets/consciousness-qQlC4dPp.js","assets/RadioCardDetailManySelect-6Dh1XQsR.js","assets/Input.vue_vue_type_script_setup_true_lang-DacRzqGb.js","assets/memory-long-term-BkSIgiZH.js","assets/memory-short-term-Dq-l2fpr.js","assets/speech--gNAMctx.js","assets/TestDummyMarker.vue_vue_type_script_setup_true_lang-CG5q9Jpo.js","assets/FieldInput.vue_vue_type_script_setup_true_lang-BNHdvI3g.js","assets/FieldRange.vue_vue_type_script_setup_true_lang-B670Jjy-.js","assets/Textarea.vue_vue_type_script_setup_true_lang-CP4Ap1fe.js","assets/index-Cs5RsFGh.js","assets/alibaba-cloud-model-studio-BPTuNUid.js","assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-Cscdqs1L.js","assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-Blzu2N2U.js","assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DFTTO3aS.js","assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-Bq_0Y-1M.js","assets/anthropic-BVw1aKkH.js","assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-Ccg-E6bm.js","assets/cloudflare-workers-ai-CcKNsU55.js","assets/deepseek-D7OL7kwG.js","assets/elevenlabs-1fmL3c-0.js","assets/featherless-ai-CcOpVhSb.js","assets/fireworks-ai-DAA5zEq0.js","assets/google-generative-ai-DdbM-cuq.js","assets/microsoft-speech-DxiRqm6y.js","assets/mistral-ai-CzsP5HyY.js","assets/moonshot-ai-B-gxAO4v.js","assets/novita-ai-DCHaCXXA.js","assets/ollama-DVhvZ81j.js","assets/openai-DeU27RZU.js","assets/openrouter-ai-BENIJVm4.js","assets/together-ai-CmQtGg2y.js","assets/volcengine-DP5EEnId.js","assets/xai-93geoyGl.js","assets/index-DemghqgU.js","assets/filter-message-CZTuPPrs.js","assets/delays-CbCH4HsM.js","assets/emotions-CgTD5sIw.js","assets/messages-Dpefqazf.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-CDGo-Xl7.js","assets/HeaderLink-Bo73zIrx.js","assets/HeaderLink-DsxHr3rn.css","assets/index-D8yxqLeR.js","assets/Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js","assets/Stage-BD8JBwgH.css","assets/import-url-browser-CPN8ipMD.js","assets/duckdb-mvp-CaaD-olE.js","assets/speech-DTX8fpM-.js","assets/index-Be1NqeGb.js","assets/providers-Bbs_o2SI.js","assets/queue-DeGTso58.js","assets/queues-R1s0xq50.js","assets/index-D975M2PQ.js","assets/airi-card-BWLSOH_H.js","assets/consciousness-Ch13RX1M.js","assets/Model.vue_vue_type_script_setup_true_lang-BJMG46Vq.js","assets/TransitionVertical.vue_vue_type_script_setup_true_lang-Cx39i7VD.js","assets/Collapsable.vue_vue_type_script_setup_true_lang-Dx_TCyI1.js","assets/Basic.vue_vue_type_script_setup_true_lang-C4n90OG-.js","assets/index-CLoML2wX.js","assets/route-block-B_A1xBdJ.js","assets/index-DFm202zN.css","assets/background-remove--UC_RV6n.js","assets/InputFile.vue_vue_type_script_setup_true_lang-UdikYOzo.js","assets/chat-DmD3mlQa.js","assets/image-C0IQeyre.js","assets/image-BhuwcwI9.css","assets/vibrant-KanvtdV8.js","assets/browser-CkchkNbv.js","assets/queue-Bfgtzwnz.js","assets/index-BL40lgIh.js","assets/PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js","assets/IconAnimation.vue_vue_type_script_setup_true_lang-BRA-bMih.js","assets/index-C6pwynJz.js","assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-BFh-yT1v.js","assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-BHqygveO.js","assets/index-Bl8tS_1d.js","assets/CardListItem.vue_vue_type_script_setup_true_lang-CXgQKm7D.js","assets/CardDetailDialog-KFyFC3hN.js","assets/CardListItem-D6WoT0h6.js","assets/DeleteCardDialog-Cc50HfYA.js","assets/index-DHX0Uek_.js","assets/ColorPalette.vue_vue_type_script_setup_true_lang-DQF1MPun.js","assets/index-4Fmwd3_O.css","assets/index-B9VZCkKy.js","assets/index-CEzIWA5x.js","assets/useIconAnimation-Cb5gBMka.js","assets/index-rlpEp8ML.css","assets/index-DvPtiAnj.js","assets/IconStatusItem-DEltasic.js","assets/consciousness-DFJwJ2-w.js","assets/RadioCardDetailManySelect-CC_vBTye.js","assets/Input.vue_vue_type_script_setup_true_lang-DXXJ9lLc.js","assets/memory-long-term-PNKqJb4c.js","assets/memory-short-term-DmPq1-RB.js","assets/speech-BYIjhxox.js","assets/TestDummyMarker.vue_vue_type_script_setup_true_lang-7UKgQXIZ.js","assets/FieldInput.vue_vue_type_script_setup_true_lang-BHH_IiH5.js","assets/FieldRange.vue_vue_type_script_setup_true_lang-BeH9VX4J.js","assets/Textarea.vue_vue_type_script_setup_true_lang-akwsm8zZ.js","assets/index-BUi2PgJw.js","assets/alibaba-cloud-model-studio-B6gemIgl.js","assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-C9WOvHCP.js","assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BBijRr4z.js","assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DEakgvr1.js","assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-8eUb1l9O.js","assets/anthropic-Bi5WbaJz.js","assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-7OtTanLQ.js","assets/cloudflare-workers-ai-DSu08414.js","assets/deepseek-hdH9dlLT.js","assets/elevenlabs-CdMQrcRu.js","assets/featherless-ai-l43obo_f.js","assets/fireworks-ai-Bu1605cC.js","assets/google-generative-ai-CW8mDDFz.js","assets/microsoft-speech-gecFpY-y.js","assets/mistral-ai-VHZyWeLB.js","assets/moonshot-ai-BLeP7m0q.js","assets/novita-ai-CPkEAvZ_.js","assets/ollama-CE4_2BuN.js","assets/openai-BXyL4WiR.js","assets/openrouter-ai-C8x3jBUe.js","assets/together-ai-BzESm26r.js","assets/volcengine-lvTB42MY.js","assets/xai-DGl-MFDA.js","assets/index-BOm9MDgq.js","assets/filter-message-kXOD8_b1.js","assets/delays-D_eq9i1G.js","assets/emotions-DGp86i9c.js","assets/messages-SpcKwdH9.js"])))=>i.map(i=>d[i]); var eC=Object.defineProperty;var tC=(n,e,t)=>e in n?eC(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var fi=(n,e,t)=>tC(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 nC="modulepreload",iC=function(n){return"/"+n},uv={},je=function(e,t,i){let s=Promise.resolve();if(t&&t.length>0){let o=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));s=o(t.map(c=>{if(c=iC(c),c in uv)return;uv[c]=!0;const u=c.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${f}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":nC,u||(d.as="script"),d.crossOrigin="",d.href=c,l&&d.setAttribute("nonce",l),document.head.appendChild(d),u)return new Promise((h,p)=>{d.addEventListener("load",h),d.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${c}`)))})}))}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.2 * (c) 2025 Eduardo San Martin Morote * @license MIT - */let Cw;const Vh=n=>Cw=n,Rw=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 Rz(){const n=g0(!0),e=n.run(()=>et({}));let t=[],i=[];const s=M0({install(r){Vh(s),s._a=r,r.provide(Rw,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 Pw=()=>{};function hx(n,e,t,i=Pw){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 Pz=n=>n(),px=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 Iz=Symbol();function Lz(n){return!Hg(n)||!Object.prototype.hasOwnProperty.call(n,Iz)}const{assign:tr}=Object;function Dz(n){return!!(Pt(n)&&n.effect)}function Oz(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=lS(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=Iw(n,c,e,t,i,!0),l}function Iw(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)})}:Pw;function y(){o.stop(),f=[],d=[],i._s.delete(n)}const b=(P,x="")=>{if(px 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:T,after:Y,onError:ee});let K;try{K=P.apply(this&&this.$id===n?this:T,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[px]=!0,M[_m]=x,M},v={_p:i,$id:n,$onAction:hx.bind(null,d),$patch:g,$reset:m,$subscribe(P,x={}){const M=hx(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},T=bi(v);i._s.set(n,T);const S=(i._a&&i._a.runWithContext||Pz)(()=>i._e.run(()=>(o=g0()).run(()=>e({action:b}))));for(const P in S){const x=S[P];if(Pt(x)&&!Dz(x)||Rs(x))r||(p&&Lz(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(T,S),tr(ut(T),S),Object.defineProperty(T,"$state",{get:()=>i.state.value[n],set:P=>{g(x=>{tr(x,P)})}}),i._p.forEach(P=>{tr(T,o.run(()=>P({store:T,app:i._a,pinia:i,options:a})))}),p&&r&&t.hydrate&&t.hydrate(T.$state,p),c=!0,u=!0,T}/*! #__NO_SIDE_EFFECTS__ */function Nz(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(Rw,null):null),o&&Vh(o),o=Cw,o._s.has(n)||(s?Iw(n,e,i,o):Oz(n,i,o)),o._s.get(n)}return r.$id=n,r}function Uz(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]=cS(n,i))}return t}const Fz=n=>{const e={};Object.entries(Object.assign({"/src/layouts/default.vue":()=>je(()=>import("./default-_iAhyx9C.js"),__vite__mapDeps([0,1,2])),"/src/layouts/stage.vue":()=>je(()=>import("./stage-U8FCK4AA.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 Cw;const Vh=n=>Cw=n,Rw=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 Rz(){const n=g0(!0),e=n.run(()=>et({}));let t=[],i=[];const s=M0({install(r){Vh(s),s._a=r,r.provide(Rw,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 Pw=()=>{};function hx(n,e,t,i=Pw){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 Pz=n=>n(),px=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 Iz=Symbol();function Lz(n){return!Hg(n)||!Object.prototype.hasOwnProperty.call(n,Iz)}const{assign:tr}=Object;function Dz(n){return!!(Pt(n)&&n.effect)}function Oz(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=lS(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=Iw(n,c,e,t,i,!0),l}function Iw(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)})}:Pw;function y(){o.stop(),f=[],d=[],i._s.delete(n)}const b=(P,x="")=>{if(px 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:T,after:Y,onError:ee});let K;try{K=P.apply(this&&this.$id===n?this:T,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[px]=!0,M[_m]=x,M},v={_p:i,$id:n,$onAction:hx.bind(null,d),$patch:g,$reset:m,$subscribe(P,x={}){const M=hx(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},T=bi(v);i._s.set(n,T);const S=(i._a&&i._a.runWithContext||Pz)(()=>i._e.run(()=>(o=g0()).run(()=>e({action:b}))));for(const P in S){const x=S[P];if(Pt(x)&&!Dz(x)||Rs(x))r||(p&&Lz(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(T,S),tr(ut(T),S),Object.defineProperty(T,"$state",{get:()=>i.state.value[n],set:P=>{g(x=>{tr(x,P)})}}),i._p.forEach(P=>{tr(T,o.run(()=>P({store:T,app:i._a,pinia:i,options:a})))}),p&&r&&t.hydrate&&t.hydrate(T.$state,p),c=!0,u=!0,T}/*! #__NO_SIDE_EFFECTS__ */function Nz(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(Rw,null):null),o&&Vh(o),o=Cw,o._s.has(n)||(s?Iw(n,e,i,o):Oz(n,i,o)),o._s.get(n)}return r.$id=n,r}function Uz(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]=cS(n,i))}return t}const Fz=n=>{const e={};Object.entries(Object.assign({"/src/layouts/default.vue":()=>je(()=>import("./default-CDGo-Xl7.js"),__vite__mapDeps([0,1,2])),"/src/layouts/stage.vue":()=>je(()=>import("./stage-CsKnQfK8.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 Lw(n){return typeof n=="object"||"displayName"in n||"props"in n||"__vccOpts"in n}function kz(n){return n.__esModule||n[Symbol.toStringTag]==="Module"||n.default&&Lw(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,Dw=/#/g,Bz=/&/g,zz=/\//g,Vz=/=/g,Hz=/\?/g,Ow=/\+/g,Gz=/%5B/g,Wz=/%5D/g,Nw=/%5E/g,Xz=/%60/g,Uw=/%7B/g,$z=/%7C/g,Fw=/%7D/g,qz=/%20/g;function z_(n){return encodeURI(""+n).replace($z,"|").replace(Gz,"[").replace(Wz,"]")}function Yz(n){return z_(n).replace(Uw,"{").replace(Fw,"}").replace(Nw,"^")}function Wg(n){return z_(n).replace(Ow,"%2B").replace(qz,"+").replace(Dw,"%23").replace(Bz,"%26").replace(Xz,"`").replace(Uw,"{").replace(Fw,"}").replace(Nw,"^")}function jz(n){return Wg(n).replace(Vz,"%3D")}function Kz(n){return z_(n).replace(Dw,"%23").replace(Hz,"%3F")}function Zz(n){return n==null?"":Kz(n).replace(zz,"%2F")}function bc(n){try{return decodeURIComponent(""+n)}catch{}return""+n}const Jz=/\/$/,Qz=n=>n.replace(Jz,"");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=iV(i??e,t),{fullPath:i+(r&&"?")+r+o,path:i,query:s,hash:bc(o)}}function eV(n,e){const t=e.query?n(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function mx(n,e){return!e||!n.toLowerCase().startsWith(e.toLowerCase())?n:n.slice(e.length)||"/"}function tV(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])&&kw(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 kw(n,e){if(Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(!nV(n[t],e[t]))return!1;return!0}function nV(n,e){return Bi(n)?gx(n,e):Bi(e)?gx(e,n):n===e}function gx(n,e){return Bi(e)?n.length===e.length&&n.every((t,i)=>t===e[i]):n.length===1&&n[0]===e}function iV(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 sV(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),Qz(n)}const rV=/^[^#]+#/;function oV(n,e){return n.replace(rV,"#")+e}function aV(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 lV(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=aV(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 _x(n,e){return(history.state?history.state.position-e:-1)+n}const Xg=new Map;function cV(n,e){Xg.set(n,e)}function uV(n){const e=Xg.get(n);return Xg.delete(n),e}let fV=()=>location.protocol+"//"+location.host;function Bw(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),mx(l,"")}return mx(t,n)+i+s}function dV(n,e,t,i){let s=[],r=[],o=null;const a=({state:d})=>{const h=Bw(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 vx(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 hV(n){const{history:e,location:t}=window,i={value:Bw(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:fV()+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,vx(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({},vx(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 pV(n){n=sV(n);const e=hV(n),t=dV(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:oV.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 mV(n){return n=location.host?n||location.pathname+location.search:"",n.includes("#")||(n+="#"),pV(n)}function gV(n){return typeof n=="string"||n&&typeof n=="object"}function zw(n){return typeof n=="string"||typeof n=="symbol"}const Vw=Symbol("");var yx;(function(n){n[n.aborted=4]="aborted",n[n.cancelled=8]="cancelled",n[n.duplicated=16]="duplicated"})(yx||(yx={}));function Pa(n,e){return Mt(new Error,{type:n,[Vw]:!0},e)}function _s(n,e){return n instanceof Error&&Vw in n&&(e==null||!!(n.type&e))}const bx="[^/]+?",_V={sensitive:!1,strict:!1,start:!0,end:!0},vV=/[.+*?^${}()[\]/\\]/g;function yV(n,e){const t=Mt({},_V,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 Hw(n,e){let t=0;const i=n.score,s=e.score;for(;t0&&e[e.length-1]<0}const xV={type:0,value:""},MV=/[a-zA-Z0-9_]/;function SV(n){if(!n)return[[]];if(n==="/")return[[xV]];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(zw(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=CV(f,t);t.splice(d,0,f),f.record.name&&!Ex(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(Mx(d.params,h.keys.filter(b=>!b.optional).concat(h.parent?h.parent.keys.filter(b=>b.optional):[]).map(b=>b.name)),f.params&&Mx(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:AV(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 Mx(n,e){const t={};for(const i of e)i in n&&(t[i]=n[i]);return t}function Sx(n){const e={path:n.path,redirect:n.redirect,name:n.name,meta:n.meta||{},aliasOf:n.aliasOf,beforeEnter:n.beforeEnter,props:wV(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 wV(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 Ex(n){for(;n;){if(n.record.aliasOf)return!0;n=n.parent}return!1}function AV(n){return n.reduce((e,t)=>Mt(e,t.meta),{})}function Tx(n,e){const t={};for(const i in n)t[i]=i in e?e[i]:n[i];return t}function CV(n,e){let t=0,i=e.length;for(;t!==i;){const r=t+i>>1;Hw(n,e[r])<0?i=r:t=r+1}const s=RV(n);return s&&(i=e.lastIndexOf(s,i-1)),i}function RV(n){let e=n;for(;e=e.parent;)if(Gw(e)&&Hw(n,e)===0)return e}function Gw({record:n}){return!!(n.name||n.components&&Object.keys(n.components).length||n.redirect)}function PV(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 IV(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 LV=Symbol(""),Ax=Symbol(""),Gh=Symbol(""),Ww=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):gV(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(Lw(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=kz(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 Cx(n){const e=En(Gh),t=En(Ww),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=Rx(l[c-2]);return c>1&&Rx(u)===h&&f[f.length-1].path!==h?f.findIndex(Ra.bind(null,l[c-2])):d}),r=Ee(()=>s.value>-1&&FV(t.params,i.value.params)),o=Ee(()=>s.value>-1&&s.value===t.matched.length-1&&kw(t.params,i.value.params));function a(l={}){if(UV(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 DV(n){return n.length===1?n[0]:n}const OV=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:Cx,setup(n,{slots:e}){const t=bi(Cx(n)),{options:i}=En(Gh),s=Ee(()=>({[Px(n.activeClass,i.linkActiveClass,"router-link-active")]:t.isActive,[Px(n.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const r=e.default&&DV(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)}}}),NV=OV;function UV(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 FV(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 Rx(n){return n?n.aliasOf?n.aliasOf.path:n.path:""}const Px=(n,e,t)=>n??e??t,kV=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(Ax,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(Ax,Ee(()=>o.value+1)),dr(LV,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 Ix(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 Ix(t.default,{Component:g,route:c})||g}}});function Ix(n,e){if(!n)return null;const t=n(e);return t.length===1?t[0]:t}const Xw=kV;function BV(n){const e=TV(n.routes,n),t=n.parseQuery||PV,i=n.stringifyQuery||wx,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,Zz),d=vm.bind(null,bc);function h(X,ae){let fe,ce;return zw(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=eV(i,Mt({},X,{hash:Yz(Ue),path:ce.path})),z=s.createHref(k);return Mt({fullPath:k,hash:Ue,query:i===wx?IV(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 T(X){return v(Mt(y(X),{replace:!0}))}function E(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=E(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&&tV(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]=zV(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=E(ce);if(Ue){S(Mt(Ue,{replace:!0,force:!0}),ce).catch(Bl);return}c=ce;const k=l.value;na&&cV(_x(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&&uV(_x(X.fullPath,0))||(ce||!fe)&&history.state&&history.state.scroll||null;return Er().then(()=>Ue(X,ae,k)).then(z=>z&&lV(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:T,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",NV),X.component("RouterView",Xw),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(Ww,sS(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 zV(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 VV(){return En(Gh)}const HV=[{path:"/",name:"/",component:()=>je(()=>import("./index-CrclHGQ3.js"),__vite__mapDeps([3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,1,2,19,20,21,22])),meta:{layout:"stage",stageTransition:{name:"bubble-wave-out"}}},{path:"/:all(.*)",name:"/[...all]",component:()=>je(()=>import("./_...all_-D8yjOAQK.js"),[])},{path:"/audio",name:"/audio",component:()=>je(()=>import("./audio-DVqTW1PB.js"),[])},{path:"/devtools",children:[{path:"background-remove",name:"/devtools/background-remove",component:()=>je(()=>import("./background-remove-xa-QFjKj.js"),__vite__mapDeps([23,4,5,24]))},{path:"chat",name:"/devtools/chat",component:()=>je(()=>import("./chat-BJiWkk-g.js"),__vite__mapDeps([25,13,9]))},{path:"image",name:"/devtools/image",component:()=>je(()=>import("./image-CIQPT2z3.js"),__vite__mapDeps([26,27]))},{path:"vibrant",name:"/devtools/vibrant",component:()=>je(()=>import("./vibrant-Ck8ouQeR.js"),__vite__mapDeps([28,4,5,24,29]))}]},{path:"/queue",name:"/queue",component:()=>je(()=>import("./queue-D7nBskKs.js"),__vite__mapDeps([30,11]))},{path:"/settings",children:[{path:"",name:"/settings/",component:()=>je(()=>import("./index-CMXq_S_x.js"),__vite__mapDeps([31,4,5,32,33,21])),meta:{stageTransition:{name:"slide"}}},{path:"airi-card",children:[{path:"",name:"/settings/airi-card/",component:()=>je(()=>import("./index-B5H7zFR1.js"),__vite__mapDeps([34,4,5,24,32,14,15,10,9,8,35,36,37,38,21])),meta:{stageTransition:{name:"slide"}}},{path:"components",children:[{path:"CardDetailDialog",name:"/settings/airi-card/components/CardDetailDialog",component:()=>je(()=>import("./CardDetailDialog-Dxt-FHQW.js"),__vite__mapDeps([39,35,36,37,4,5,14,15,10,9,8]))},{path:"CardListItem",name:"/settings/airi-card/components/CardListItem",component:()=>je(()=>import("./CardListItem-CmKnCrTs.js"),__vite__mapDeps([40,38,4,5]))},{path:"DeleteCardDialog",name:"/settings/airi-card/components/DeleteCardDialog",component:()=>je(()=>import("./DeleteCardDialog-BfLGvfow.js"),__vite__mapDeps([41,36,37]))}]}]},{path:"appearance",children:[{path:"",name:"/settings/appearance/",component:()=>je(()=>import("./index-DgTAR4Sy.js"),__vite__mapDeps([42,4,5,32,43,18,17,37,21,44])),meta:{stageTransition:{name:"slide",pageSpecificAvailable:!0}}}]},{path:"memory",children:[{path:"",name:"/settings/memory/",component:()=>je(()=>import("./index-Cy4LPsSb.js"),__vite__mapDeps([45,4,5,32]))}]},{path:"models",children:[{path:"",name:"/settings/models/",component:()=>je(()=>import("./index-Cu7e5uZ2.js"),__vite__mapDeps([46,33,4,5,32,16,29,43,18,17,37,47,21,48])),meta:{stageTransition:{name:"slide",pageSpecificAvailable:!0}}}]},{path:"modules",children:[{path:"",name:"/settings/modules/",component:()=>je(()=>import("./index-DuLZCAM8.js"),__vite__mapDeps([49,4,5,32,50,33,47,21])),meta:{stageTransition:{name:"slide",pageSpecificAvailable:!0}}},{path:"consciousness",name:"/settings/modules/consciousness",component:()=>je(()=>import("./consciousness-qQlC4dPp.js"),__vite__mapDeps([51,4,5,52,17,53,32,15,10,9,21])),meta:{stageTransition:{name:"slide"}}},{path:"memory-long-term",name:"/settings/modules/memory-long-term",component:()=>je(()=>import("./memory-long-term-BkSIgiZH.js"),__vite__mapDeps([54,4,5,32]))},{path:"memory-short-term",name:"/settings/modules/memory-short-term",component:()=>je(()=>import("./memory-short-term-Dq-l2fpr.js"),__vite__mapDeps([55,4,5,32]))},{path:"speech",name:"/settings/modules/speech",component:()=>je(()=>import("./speech--gNAMctx.js"),__vite__mapDeps([56,57,4,5,58,53,59,52,17,60,19,32,10,9,8,21])),meta:{stageTransition:{name:"slide"}}}]},{path:"providers",children:[{path:"",name:"/settings/providers/",component:()=>je(()=>import("./index-Cs5RsFGh.js"),__vite__mapDeps([61,33,4,5,32,10,9,50,47,21])),meta:{stageTransition:{name:"slide",pageSpecificAvailable:!0}}},{path:"alibaba-cloud-model-studio",name:"/settings/providers/alibaba-cloud-model-studio",component:()=>je(()=>import("./alibaba-cloud-model-studio-BPTuNUid.js"),__vite__mapDeps([62,59,4,5,10,9,8,63,57,64,18,17,58,53,65,66,32]))},{path:"anthropic",name:"/settings/providers/anthropic",component:()=>je(()=>import("./anthropic-BVw1aKkH.js"),__vite__mapDeps([67,4,5,10,9,64,18,17,58,53,65,66,68,32]))},{path:"cloudflare-workers-ai",name:"/settings/providers/cloudflare-workers-ai",component:()=>je(()=>import("./cloudflare-workers-ai-CcKNsU55.js"),__vite__mapDeps([69,4,5,10,9,58,53,65,66,68,32]))},{path:"deepseek",name:"/settings/providers/deepseek",component:()=>je(()=>import("./deepseek-D7OL7kwG.js"),__vite__mapDeps([70,4,5,10,9,64,18,17,58,53,65,66,68,32]))},{path:"elevenlabs",name:"/settings/providers/elevenlabs",component:()=>je(()=>import("./elevenlabs-1fmL3c-0.js"),__vite__mapDeps([71,57,4,5,59,10,9,8,63,64,18,17,58,53,65,66,32]))},{path:"featherless-ai",name:"/settings/providers/featherless-ai",component:()=>je(()=>import("./featherless-ai-CcOpVhSb.js"),__vite__mapDeps([72,4,5,10,9,64,18,17,58,53,65,66,68,32]))},{path:"fireworks-ai",name:"/settings/providers/fireworks-ai",component:()=>je(()=>import("./fireworks-ai-DAA5zEq0.js"),__vite__mapDeps([73,4,5,10,9,64,18,17,58,53,65,66,68,32]))},{path:"google-generative-ai",name:"/settings/providers/google-generative-ai",component:()=>je(()=>import("./google-generative-ai-DdbM-cuq.js"),__vite__mapDeps([74,4,5,10,9,64,18,17,58,53,65,66,68,32]))},{path:"microsoft-speech",name:"/settings/providers/microsoft-speech",component:()=>je(()=>import("./microsoft-speech-DxiRqm6y.js"),__vite__mapDeps([75,58,53,4,5,10,9,8,63,57,64,18,17,65,66,32]))},{path:"mistral-ai",name:"/settings/providers/mistral-ai",component:()=>je(()=>import("./mistral-ai-CzsP5HyY.js"),__vite__mapDeps([76,4,5,10,9,64,18,17,58,53,65,66,68,32]))},{path:"moonshot-ai",name:"/settings/providers/moonshot-ai",component:()=>je(()=>import("./moonshot-ai-B-gxAO4v.js"),__vite__mapDeps([77,4,5,10,9,64,18,17,58,53,65,66,68,32]))},{path:"novita-ai",name:"/settings/providers/novita-ai",component:()=>je(()=>import("./novita-ai-DCHaCXXA.js"),__vite__mapDeps([78,4,5,10,9,64,18,17,58,53,65,66,68,32]))},{path:"ollama",name:"/settings/providers/ollama",component:()=>je(()=>import("./ollama-DVhvZ81j.js"),__vite__mapDeps([79,53,4,5,10,9,64,18,17,58,66,68,32]))},{path:"openai",name:"/settings/providers/openai",component:()=>je(()=>import("./openai-DeU27RZU.js"),__vite__mapDeps([80,4,5,10,9,64,18,17,58,53,65,66,68,32]))},{path:"openrouter-ai",name:"/settings/providers/openrouter-ai",component:()=>je(()=>import("./openrouter-ai-BENIJVm4.js"),__vite__mapDeps([81,4,5,10,9,64,18,17,58,53,65,66,68,32]))},{path:"together-ai",name:"/settings/providers/together-ai",component:()=>je(()=>import("./together-ai-CmQtGg2y.js"),__vite__mapDeps([82,4,5,10,9,64,18,17,58,53,65,66,68,32]))},{path:"volcengine",name:"/settings/providers/volcengine",component:()=>je(()=>import("./volcengine-DP5EEnId.js"),__vite__mapDeps([83,58,53,59,4,5,10,9,8,63,57,64,18,17,65,66,32]))},{path:"xai",name:"/settings/providers/xai",component:()=>je(()=>import("./xai-93geoyGl.js"),__vite__mapDeps([84,4,5,10,9,64,18,17,58,53,65,66,68,32]))}]},{path:"scene",children:[{path:"",name:"/settings/scene/",component:()=>je(()=>import("./index-DemghqgU.js"),__vite__mapDeps([85,33,4,5,32,47,21])),meta:{stageTransition:{name:"slide",pageSpecificAvailable:!0}}}]}]},{path:"/test",children:[{path:"filter-message",name:"/test/filter-message",component:()=>je(()=>import("./filter-message-CZTuPPrs.js"),__vite__mapDeps([86,4,5,60,19]))},{path:"queues",children:[{path:"delays",name:"/test/queues/delays",component:()=>je(()=>import("./delays-CbCH4HsM.js"),__vite__mapDeps([87,4,5,60,19,12,11,20]))},{path:"emotions",name:"/test/queues/emotions",component:()=>je(()=>import("./emotions-CgTD5sIw.js"),__vite__mapDeps([88,4,5,60,19,11,12]))},{path:"messages",name:"/test/queues/messages",component:()=>je(()=>import("./messages-Dpefqazf.js"),__vite__mapDeps([89,4,5,60,19,11,12]))}]}]}],$w=(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}}},GV={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},WV=n=>$w(GV[n.toLowerCase()],6),XV=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,$V=n=>{let e;return(e=n.match(XV))?$w(parseInt(e[1],16),e[1].length):void 0},hr="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",Vl=`${hr}%`,V_=`(?:${hr}%|${hr})`,qV=`(?:${hr}(deg|grad|rad|turn)|${hr})`,Ia="\\s*,\\s*",YV=new RegExp(`^rgba?\\(\\s*${hr}${Ia}${hr}${Ia}${hr}\\s*(?:,\\s*${V_}\\s*)?\\)$`),jV=new RegExp(`^rgba?\\(\\s*${Vl}${Ia}${Vl}${Ia}${Vl}\\s*(?:,\\s*${V_}\\s*)?\\)$`),KV=n=>{let e={mode:"rgb"},t;if(t=n.match(YV))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(jV))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},ZV=(n,e)=>n===void 0?void 0:typeof n!="object"?a6(n):n.mode!==void 0?n:e?{...n,mode:e}:void 0,qw=(n="rgb")=>e=>(e=ZV(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={},Yw={},Ld=[],jw={},JV=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=JV)}),Yw[n.mode]=n,(n.parse||[]).forEach(e=>{e6(e,n.mode)}),qw(n.mode)),QV=n=>Yw[n],e6=(n,e)=>{if(typeof n=="string"){if(!e)throw new Error("'mode' required when 'parser' is a string");jw[n]=e}else typeof n=="function"&&Ld.indexOf(n)<0&&Ld.push(n)},qg=/[^\x00-\x7F]|[a-zA-Z_]/,t6=/[^\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 n6={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*n6[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,Dw=/#/g,Bz=/&/g,zz=/\//g,Vz=/=/g,Hz=/\?/g,Ow=/\+/g,Gz=/%5B/g,Wz=/%5D/g,Nw=/%5E/g,Xz=/%60/g,Uw=/%7B/g,$z=/%7C/g,Fw=/%7D/g,qz=/%20/g;function z_(n){return encodeURI(""+n).replace($z,"|").replace(Gz,"[").replace(Wz,"]")}function Yz(n){return z_(n).replace(Uw,"{").replace(Fw,"}").replace(Nw,"^")}function Wg(n){return z_(n).replace(Ow,"%2B").replace(qz,"+").replace(Dw,"%23").replace(Bz,"%26").replace(Xz,"`").replace(Uw,"{").replace(Fw,"}").replace(Nw,"^")}function jz(n){return Wg(n).replace(Vz,"%3D")}function Kz(n){return z_(n).replace(Dw,"%23").replace(Hz,"%3F")}function Zz(n){return n==null?"":Kz(n).replace(zz,"%2F")}function bc(n){try{return decodeURIComponent(""+n)}catch{}return""+n}const Jz=/\/$/,Qz=n=>n.replace(Jz,"");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=iV(i??e,t),{fullPath:i+(r&&"?")+r+o,path:i,query:s,hash:bc(o)}}function eV(n,e){const t=e.query?n(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function mx(n,e){return!e||!n.toLowerCase().startsWith(e.toLowerCase())?n:n.slice(e.length)||"/"}function tV(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])&&kw(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 kw(n,e){if(Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(!nV(n[t],e[t]))return!1;return!0}function nV(n,e){return Bi(n)?gx(n,e):Bi(e)?gx(e,n):n===e}function gx(n,e){return Bi(e)?n.length===e.length&&n.every((t,i)=>t===e[i]):n.length===1&&n[0]===e}function iV(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 sV(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),Qz(n)}const rV=/^[^#]+#/;function oV(n,e){return n.replace(rV,"#")+e}function aV(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 lV(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=aV(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 _x(n,e){return(history.state?history.state.position-e:-1)+n}const Xg=new Map;function cV(n,e){Xg.set(n,e)}function uV(n){const e=Xg.get(n);return Xg.delete(n),e}let fV=()=>location.protocol+"//"+location.host;function Bw(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),mx(l,"")}return mx(t,n)+i+s}function dV(n,e,t,i){let s=[],r=[],o=null;const a=({state:d})=>{const h=Bw(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 vx(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 hV(n){const{history:e,location:t}=window,i={value:Bw(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:fV()+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,vx(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({},vx(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 pV(n){n=sV(n);const e=hV(n),t=dV(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:oV.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 mV(n){return n=location.host?n||location.pathname+location.search:"",n.includes("#")||(n+="#"),pV(n)}function gV(n){return typeof n=="string"||n&&typeof n=="object"}function zw(n){return typeof n=="string"||typeof n=="symbol"}const Vw=Symbol("");var yx;(function(n){n[n.aborted=4]="aborted",n[n.cancelled=8]="cancelled",n[n.duplicated=16]="duplicated"})(yx||(yx={}));function Pa(n,e){return Mt(new Error,{type:n,[Vw]:!0},e)}function _s(n,e){return n instanceof Error&&Vw in n&&(e==null||!!(n.type&e))}const bx="[^/]+?",_V={sensitive:!1,strict:!1,start:!0,end:!0},vV=/[.+*?^${}()[\]/\\]/g;function yV(n,e){const t=Mt({},_V,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 Hw(n,e){let t=0;const i=n.score,s=e.score;for(;t0&&e[e.length-1]<0}const xV={type:0,value:""},MV=/[a-zA-Z0-9_]/;function SV(n){if(!n)return[[]];if(n==="/")return[[xV]];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(zw(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=CV(f,t);t.splice(d,0,f),f.record.name&&!Ex(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(Mx(d.params,h.keys.filter(b=>!b.optional).concat(h.parent?h.parent.keys.filter(b=>b.optional):[]).map(b=>b.name)),f.params&&Mx(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:AV(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 Mx(n,e){const t={};for(const i of e)i in n&&(t[i]=n[i]);return t}function Sx(n){const e={path:n.path,redirect:n.redirect,name:n.name,meta:n.meta||{},aliasOf:n.aliasOf,beforeEnter:n.beforeEnter,props:wV(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 wV(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 Ex(n){for(;n;){if(n.record.aliasOf)return!0;n=n.parent}return!1}function AV(n){return n.reduce((e,t)=>Mt(e,t.meta),{})}function Tx(n,e){const t={};for(const i in n)t[i]=i in e?e[i]:n[i];return t}function CV(n,e){let t=0,i=e.length;for(;t!==i;){const r=t+i>>1;Hw(n,e[r])<0?i=r:t=r+1}const s=RV(n);return s&&(i=e.lastIndexOf(s,i-1)),i}function RV(n){let e=n;for(;e=e.parent;)if(Gw(e)&&Hw(n,e)===0)return e}function Gw({record:n}){return!!(n.name||n.components&&Object.keys(n.components).length||n.redirect)}function PV(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 IV(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 LV=Symbol(""),Ax=Symbol(""),Gh=Symbol(""),Ww=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):gV(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(Lw(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=kz(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 Cx(n){const e=En(Gh),t=En(Ww),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=Rx(l[c-2]);return c>1&&Rx(u)===h&&f[f.length-1].path!==h?f.findIndex(Ra.bind(null,l[c-2])):d}),r=Ee(()=>s.value>-1&&FV(t.params,i.value.params)),o=Ee(()=>s.value>-1&&s.value===t.matched.length-1&&kw(t.params,i.value.params));function a(l={}){if(UV(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 DV(n){return n.length===1?n[0]:n}const OV=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:Cx,setup(n,{slots:e}){const t=bi(Cx(n)),{options:i}=En(Gh),s=Ee(()=>({[Px(n.activeClass,i.linkActiveClass,"router-link-active")]:t.isActive,[Px(n.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const r=e.default&&DV(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)}}}),NV=OV;function UV(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 FV(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 Rx(n){return n?n.aliasOf?n.aliasOf.path:n.path:""}const Px=(n,e,t)=>n??e??t,kV=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(Ax,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(Ax,Ee(()=>o.value+1)),dr(LV,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 Ix(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 Ix(t.default,{Component:g,route:c})||g}}});function Ix(n,e){if(!n)return null;const t=n(e);return t.length===1?t[0]:t}const Xw=kV;function BV(n){const e=TV(n.routes,n),t=n.parseQuery||PV,i=n.stringifyQuery||wx,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,Zz),d=vm.bind(null,bc);function h(X,ae){let fe,ce;return zw(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=eV(i,Mt({},X,{hash:Yz(Ue),path:ce.path})),z=s.createHref(k);return Mt({fullPath:k,hash:Ue,query:i===wx?IV(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 T(X){return v(Mt(y(X),{replace:!0}))}function E(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=E(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&&tV(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]=zV(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=E(ce);if(Ue){S(Mt(Ue,{replace:!0,force:!0}),ce).catch(Bl);return}c=ce;const k=l.value;na&&cV(_x(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&&uV(_x(X.fullPath,0))||(ce||!fe)&&history.state&&history.state.scroll||null;return Er().then(()=>Ue(X,ae,k)).then(z=>z&&lV(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:T,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",NV),X.component("RouterView",Xw),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(Ww,sS(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 zV(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 VV(){return En(Gh)}const HV=[{path:"/",name:"/",component:()=>je(()=>import("./index-D8yxqLeR.js"),__vite__mapDeps([3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,1,2,19,20,21,22])),meta:{layout:"stage",stageTransition:{name:"bubble-wave-out"}}},{path:"/:all(.*)",name:"/[...all]",component:()=>je(()=>import("./_...all_-CTir8ssX.js"),[])},{path:"/audio",name:"/audio",component:()=>je(()=>import("./audio-D7a74pGw.js"),[])},{path:"/devtools",children:[{path:"background-remove",name:"/devtools/background-remove",component:()=>je(()=>import("./background-remove--UC_RV6n.js"),__vite__mapDeps([23,4,5,24]))},{path:"chat",name:"/devtools/chat",component:()=>je(()=>import("./chat-DmD3mlQa.js"),__vite__mapDeps([25,13,9]))},{path:"image",name:"/devtools/image",component:()=>je(()=>import("./image-C0IQeyre.js"),__vite__mapDeps([26,27]))},{path:"vibrant",name:"/devtools/vibrant",component:()=>je(()=>import("./vibrant-KanvtdV8.js"),__vite__mapDeps([28,4,5,24,29]))}]},{path:"/queue",name:"/queue",component:()=>je(()=>import("./queue-Bfgtzwnz.js"),__vite__mapDeps([30,11]))},{path:"/settings",children:[{path:"",name:"/settings/",component:()=>je(()=>import("./index-BL40lgIh.js"),__vite__mapDeps([31,4,5,32,33,21])),meta:{stageTransition:{name:"slide"}}},{path:"airi-card",children:[{path:"",name:"/settings/airi-card/",component:()=>je(()=>import("./index-C6pwynJz.js"),__vite__mapDeps([34,4,5,24,32,14,15,10,9,8,35,36,37,38,21])),meta:{stageTransition:{name:"slide"}}},{path:"components",children:[{path:"CardDetailDialog",name:"/settings/airi-card/components/CardDetailDialog",component:()=>je(()=>import("./CardDetailDialog-KFyFC3hN.js"),__vite__mapDeps([39,35,36,37,4,5,14,15,10,9,8]))},{path:"CardListItem",name:"/settings/airi-card/components/CardListItem",component:()=>je(()=>import("./CardListItem-D6WoT0h6.js"),__vite__mapDeps([40,38,4,5]))},{path:"DeleteCardDialog",name:"/settings/airi-card/components/DeleteCardDialog",component:()=>je(()=>import("./DeleteCardDialog-Cc50HfYA.js"),__vite__mapDeps([41,36,37]))}]}]},{path:"appearance",children:[{path:"",name:"/settings/appearance/",component:()=>je(()=>import("./index-DHX0Uek_.js"),__vite__mapDeps([42,4,5,32,43,18,17,37,21,44])),meta:{stageTransition:{name:"slide",pageSpecificAvailable:!0}}}]},{path:"memory",children:[{path:"",name:"/settings/memory/",component:()=>je(()=>import("./index-B9VZCkKy.js"),__vite__mapDeps([45,4,5,32]))}]},{path:"models",children:[{path:"",name:"/settings/models/",component:()=>je(()=>import("./index-CEzIWA5x.js"),__vite__mapDeps([46,33,4,5,32,16,29,43,18,17,37,47,21,48])),meta:{stageTransition:{name:"slide",pageSpecificAvailable:!0}}}]},{path:"modules",children:[{path:"",name:"/settings/modules/",component:()=>je(()=>import("./index-DvPtiAnj.js"),__vite__mapDeps([49,4,5,32,50,33,47,21])),meta:{stageTransition:{name:"slide",pageSpecificAvailable:!0}}},{path:"consciousness",name:"/settings/modules/consciousness",component:()=>je(()=>import("./consciousness-DFJwJ2-w.js"),__vite__mapDeps([51,4,5,52,17,53,32,15,10,9,21])),meta:{stageTransition:{name:"slide"}}},{path:"memory-long-term",name:"/settings/modules/memory-long-term",component:()=>je(()=>import("./memory-long-term-PNKqJb4c.js"),__vite__mapDeps([54,4,5,32]))},{path:"memory-short-term",name:"/settings/modules/memory-short-term",component:()=>je(()=>import("./memory-short-term-DmPq1-RB.js"),__vite__mapDeps([55,4,5,32]))},{path:"speech",name:"/settings/modules/speech",component:()=>je(()=>import("./speech-BYIjhxox.js"),__vite__mapDeps([56,57,4,5,58,53,59,52,17,60,19,32,10,9,8,21])),meta:{stageTransition:{name:"slide"}}}]},{path:"providers",children:[{path:"",name:"/settings/providers/",component:()=>je(()=>import("./index-BUi2PgJw.js"),__vite__mapDeps([61,33,4,5,32,10,9,50,47,21])),meta:{stageTransition:{name:"slide",pageSpecificAvailable:!0}}},{path:"alibaba-cloud-model-studio",name:"/settings/providers/alibaba-cloud-model-studio",component:()=>je(()=>import("./alibaba-cloud-model-studio-B6gemIgl.js"),__vite__mapDeps([62,59,4,5,10,9,8,63,57,64,18,17,58,53,65,66,32]))},{path:"anthropic",name:"/settings/providers/anthropic",component:()=>je(()=>import("./anthropic-Bi5WbaJz.js"),__vite__mapDeps([67,4,5,10,9,64,18,17,58,53,65,66,68,32]))},{path:"cloudflare-workers-ai",name:"/settings/providers/cloudflare-workers-ai",component:()=>je(()=>import("./cloudflare-workers-ai-DSu08414.js"),__vite__mapDeps([69,4,5,10,9,58,53,65,66,68,32]))},{path:"deepseek",name:"/settings/providers/deepseek",component:()=>je(()=>import("./deepseek-hdH9dlLT.js"),__vite__mapDeps([70,4,5,10,9,64,18,17,58,53,65,66,68,32]))},{path:"elevenlabs",name:"/settings/providers/elevenlabs",component:()=>je(()=>import("./elevenlabs-CdMQrcRu.js"),__vite__mapDeps([71,57,4,5,59,10,9,8,63,64,18,17,58,53,65,66,32]))},{path:"featherless-ai",name:"/settings/providers/featherless-ai",component:()=>je(()=>import("./featherless-ai-l43obo_f.js"),__vite__mapDeps([72,4,5,10,9,64,18,17,58,53,65,66,68,32]))},{path:"fireworks-ai",name:"/settings/providers/fireworks-ai",component:()=>je(()=>import("./fireworks-ai-Bu1605cC.js"),__vite__mapDeps([73,4,5,10,9,64,18,17,58,53,65,66,68,32]))},{path:"google-generative-ai",name:"/settings/providers/google-generative-ai",component:()=>je(()=>import("./google-generative-ai-CW8mDDFz.js"),__vite__mapDeps([74,4,5,10,9,64,18,17,58,53,65,66,68,32]))},{path:"microsoft-speech",name:"/settings/providers/microsoft-speech",component:()=>je(()=>import("./microsoft-speech-gecFpY-y.js"),__vite__mapDeps([75,58,53,4,5,10,9,8,63,57,64,18,17,65,66,32]))},{path:"mistral-ai",name:"/settings/providers/mistral-ai",component:()=>je(()=>import("./mistral-ai-VHZyWeLB.js"),__vite__mapDeps([76,4,5,10,9,64,18,17,58,53,65,66,68,32]))},{path:"moonshot-ai",name:"/settings/providers/moonshot-ai",component:()=>je(()=>import("./moonshot-ai-BLeP7m0q.js"),__vite__mapDeps([77,4,5,10,9,64,18,17,58,53,65,66,68,32]))},{path:"novita-ai",name:"/settings/providers/novita-ai",component:()=>je(()=>import("./novita-ai-CPkEAvZ_.js"),__vite__mapDeps([78,4,5,10,9,64,18,17,58,53,65,66,68,32]))},{path:"ollama",name:"/settings/providers/ollama",component:()=>je(()=>import("./ollama-CE4_2BuN.js"),__vite__mapDeps([79,53,4,5,10,9,64,18,17,58,66,68,32]))},{path:"openai",name:"/settings/providers/openai",component:()=>je(()=>import("./openai-BXyL4WiR.js"),__vite__mapDeps([80,4,5,10,9,64,18,17,58,53,65,66,68,32]))},{path:"openrouter-ai",name:"/settings/providers/openrouter-ai",component:()=>je(()=>import("./openrouter-ai-C8x3jBUe.js"),__vite__mapDeps([81,4,5,10,9,64,18,17,58,53,65,66,68,32]))},{path:"together-ai",name:"/settings/providers/together-ai",component:()=>je(()=>import("./together-ai-BzESm26r.js"),__vite__mapDeps([82,4,5,10,9,64,18,17,58,53,65,66,68,32]))},{path:"volcengine",name:"/settings/providers/volcengine",component:()=>je(()=>import("./volcengine-lvTB42MY.js"),__vite__mapDeps([83,58,53,59,4,5,10,9,8,63,57,64,18,17,65,66,32]))},{path:"xai",name:"/settings/providers/xai",component:()=>je(()=>import("./xai-DGl-MFDA.js"),__vite__mapDeps([84,4,5,10,9,64,18,17,58,53,65,66,68,32]))}]},{path:"scene",children:[{path:"",name:"/settings/scene/",component:()=>je(()=>import("./index-BOm9MDgq.js"),__vite__mapDeps([85,33,4,5,32,47,21])),meta:{stageTransition:{name:"slide",pageSpecificAvailable:!0}}}]}]},{path:"/test",children:[{path:"filter-message",name:"/test/filter-message",component:()=>je(()=>import("./filter-message-kXOD8_b1.js"),__vite__mapDeps([86,4,5,60,19]))},{path:"queues",children:[{path:"delays",name:"/test/queues/delays",component:()=>je(()=>import("./delays-D_eq9i1G.js"),__vite__mapDeps([87,4,5,60,19,12,11,20]))},{path:"emotions",name:"/test/queues/emotions",component:()=>je(()=>import("./emotions-DGp86i9c.js"),__vite__mapDeps([88,4,5,60,19,11,12]))},{path:"messages",name:"/test/queues/messages",component:()=>je(()=>import("./messages-SpcKwdH9.js"),__vite__mapDeps([89,4,5,60,19,11,12]))}]}]}],$w=(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}}},GV={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},WV=n=>$w(GV[n.toLowerCase()],6),XV=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,$V=n=>{let e;return(e=n.match(XV))?$w(parseInt(e[1],16),e[1].length):void 0},hr="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",Vl=`${hr}%`,V_=`(?:${hr}%|${hr})`,qV=`(?:${hr}(deg|grad|rad|turn)|${hr})`,Ia="\\s*,\\s*",YV=new RegExp(`^rgba?\\(\\s*${hr}${Ia}${hr}${Ia}${hr}\\s*(?:,\\s*${V_}\\s*)?\\)$`),jV=new RegExp(`^rgba?\\(\\s*${Vl}${Ia}${Vl}${Ia}${Vl}\\s*(?:,\\s*${V_}\\s*)?\\)$`),KV=n=>{let e={mode:"rgb"},t;if(t=n.match(YV))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(jV))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},ZV=(n,e)=>n===void 0?void 0:typeof n!="object"?a6(n):n.mode!==void 0?n:e?{...n,mode:e}:void 0,qw=(n="rgb")=>e=>(e=ZV(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={},Yw={},Ld=[],jw={},JV=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=JV)}),Yw[n.mode]=n,(n.parse||[]).forEach(e=>{e6(e,n.mode)}),qw(n.mode)),QV=n=>Yw[n],e6=(n,e)=>{if(typeof n=="string"){if(!e)throw new Error("'mode' required when 'parser' is a string");jw[n]=e}else typeof n=="function"&&Ld.indexOf(n)<0&&Ld.push(n)},qg=/[^\x00-\x7F]|[a-zA-Z_]/,t6=/[^\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 n6={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*n6[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 o6(n,e){n._i=0;let t=n[n._i++];if(!t||t.type!==_e.Function)return;let i=Kw(n,e);if(i)return i.unshift(t.value),i}const a6=n=>{if(typeof n!="string")return;const e=s6(n),t=e?o6(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,u6=(n,e,t)=>n+t*(e-n),f6=n=>{let e=[];for(let t=0;te=>{let t=f6(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=d6(u6),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:[l6,$V,KV,WV,c6,"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),Lx=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),Dx=({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},h6={...Ha,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:n=>Dx(Io(n)),xyz65:Dx},toMode:{rgb:n=>Lo(Lx(n)),xyz65:Lx}},_n=n=>(n=n%360)<0?n+360:n,p6=(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=>p6(n,e=>Math.abs(e)<=180?e:e-360*Math.sign(e)),ln=[-.14861,1.78277,-.29227,-.90649,1.97294,0],m6=Math.PI/180,g6=180/Math.PI;let Ox=ln[3]*ln[4],Nx=ln[1]*ln[4],Ux=ln[1]*ln[2]-ln[0]*ln[3];const _6=({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=(Ux*t+n*Ox-e*Nx)/(Ux+Ox-Nx),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)*g6-120),i!==void 0&&(a.alpha=i),a},v6=({h:n,s:e,l:t,alpha:i})=>{let s={mode:"rgb"};n=(n===void 0?0:n+120)*m6,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},y6=(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},b6={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:_6},toMode:{rgb:v6},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},Zw=Math.pow(29,3)/Math.pow(3,3),Jw=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)>Jw?Math.pow(n,3):(116*n-16)/Zw;const Qw=({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(Qw(n)),wm=n=>n>Jw?Math.cbrt(n):(Zw*n+16)/116,eA=({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=eA(Io(n));return n.r===n.b&&n.b===n.g&&(e.a=e.b=0),e},Od=1,tA=1,Mc=26/180*Math.PI,Nd=Math.cos(Mc),Ud=Math.sin(Mc),nA=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/nA)-1)/.0039},r=(Math.exp(.0435*e*tA*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:nA/Od*Math.log(1+.0039*n),c:Math.log(1+.075*o)/(.0435*tA*Od)};return a.c&&(a.h=_n((Math.atan2(r,s)+Mc)/Math.PI*180)),i!==void 0&&(a.alpha=i),a},Fx=n=>jg(br(n,"dlch")),kx=n=>xr(Kg(n),"dlab"),x6={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Fx,rgb:n=>$h(Fx(n))},fromMode:{lab65:kx,rgb:n=>kx(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}}},M6={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 S6({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 E6({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}},R6=new RegExp(`^hsla?\\(\\s*${qV}${Ia}${Vl}${Ia}${Vl}\\s*(?:,\\s*${V_}\\s*)?\\)$`),P6=n=>{let e=n.match(R6);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=C6(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 I6(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 iA={mode:"hsl",toMode:{rgb:w6},fromMode:{rgb:A6},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[I6,P6],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 sA({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 rA({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 sA({h:n,s:t===1?1:1-e/(1-t),v:1-t,alpha:i})}function D6(n){let e=rA(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 O6(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 N6={mode:"hwb",toMode:{rgb:L6},fromMode:{rgb:D6},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[O6],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:y6},average:{h:Ws}},aA=203,Yh=.1593017578125,lA=78.84375,jh=.8359375,Kh=18.8515625,Zh=18.6875;function Am(n){if(n<0)return 0;const e=Math.pow(n,1/lA);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),lA)}const Rm=n=>Math.max(n/aA,0),Bx=({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*aA,0),zx=({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},U6={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:Bx,rgb:n=>Lo(Bx(n))},fromMode:{xyz65:zx,rgb:n=>zx(Io(n))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:Ae,t:Ae,p:Ae,alpha:{use:Ae,fixup:on}}},F6=134.03437499999998,k6=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),F6)},Lm=(n=0)=>Math.max(n*203,0),cA=({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)-k6,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},B6=134.03437499999998,Vx=16295499532821565e-27,Dm=n=>{if(n<0)return 0;let e=Math.pow(n,1/B6);return 1e4*Math.pow((jh-e)/(Zh*e-Kh),1/Yh)},Om=n=>n/203,uA=({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+Vx)/(.44+.56*(n+Vx)),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},fA=n=>{let e=cA(Io(n));return n.r===n.b&&n.b===n.g&&(e.a=e.b=0),e},dA=n=>Lo(uA(n)),z6={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:fA,xyz65:cA},toMode:{rgb:dA,xyz65:uA},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:Ae,a:Ae,b:Ae,alpha:{use:Ae,fixup:on}}},Hx=({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},Gx=({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},V6={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Gx,rgb:n=>dA(Gx(n))},fromMode:{rgb:n=>Hx(fA(n)),jab:Hx},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),H_=Math.pow(6,3)/Math.pow(29,3);let Nm=n=>Math.pow(n,3)>H_?Math.pow(n,3):(116*n-16)/Jh;const G_=({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},hA=n=>Kc(G_(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>H_?Math.cbrt(n):(Jh*n+16)/116,W_=({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},pA=n=>{let e=W_(Zc(n));return n.r===n.b&&n.b===n.g&&(e.a=e.b=0),e};function H6(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 X_={mode:"lab",toMode:{xyz50:G_,rgb:hA},fromMode:{xyz50:W_,rgb:pA},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-100,100],b:[-100,100]},parse:[H6],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}}},G6={...X_,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Qw,rgb:$h},fromMode:{xyz65:eA,rgb:qh},ranges:{l:[0,100],a:[-86.182,98.234],b:[-107.86,94.477]}};function W6(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 $_={mode:"lch",toMode:{lab:xr,rgb:n=>hA(xr(n))},fromMode:{rgb:n=>br(pA(n)),lab:br},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[W6],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}},X6={...$_,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]}},mA=({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},gA=({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},_A=(n,e,t)=>4*n/(n+15*e+3*t),vA=(n,e,t)=>9*e/(n+15*e+3*t),$6=_A(Jt.X,Jt.Y,Jt.Z),q6=vA(Jt.X,Jt.Y,Jt.Z),Y6=n=>n<=H_?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=Y6(e/Jt.Y),r=_A(n,e,t),o=vA(n,e,t);!isFinite(r)||!isFinite(o)?s=r=o=0:(r=13*s*(r-$6),o=13*s*(o-q6));let a={mode:"luv",l:s,u:r,v:o};return i!==void 0&&(a.alpha=i),a},j6=(n,e,t)=>4*n/(n+15*e+3*t),K6=(n,e,t)=>9*e/(n+15*e+3*t),Z6=j6(Jt.X,Jt.Y,Jt.Z),J6=K6(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)+Z6,r=t/(13*n)+J6,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},Q6=n=>mA(Zg(Zc(n))),eH=n=>Kc(Jg(gA(n))),tH={mode:"lchuv",toMode:{luv:gA,rgb:eH},fromMode:{rgb:Q6,luv:mA},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}},nH={...Ha,mode:"lrgb",toMode:{rgb:Wa},fromMode:{rgb:Ga},parse:["srgb-linear"],serialize:"srgb-linear"},iH={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}}},yA=({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=yA(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 sH(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,T=3*d*_*_,E=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*T+c*E,F=a*S+l*P+c*x;u=u-M*L/(L*L-.5*M*F)}return u}function q_(n,e){let t=sH(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 rH(n,e,t,i,s,r=null){r||(r=q_(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,T=y*y*y,E=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*T+.2309699292*E-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*T-.3413193965*E-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*T+1.707614701*E-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 Y_(n,e,t=null){t||(t=q_(n,e));let i=t[0],s=t[1];return[s/i,s/(1-i)]}function bA(n,e,t){let i=q_(e,t),s=rH(e,t,n,1,n,i),r=Y_(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 Wx(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]=bA(e,t/r,i/r),c;if(rWx(Qh(n))},toMode:{oklab:Xx,rgb:n=>ep(Xx(n))}};function $x(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]=Y_(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 qx(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]=Y_(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 aH={...oA,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:$x,rgb:n=>$x(Qh(n))},toMode:{oklab:qx,rgb:n=>ep(qx(n))}};function lH(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 cH={...X_,mode:"oklab",toMode:{lrgb:Jc,rgb:ep},fromMode:{lrgb:yA,rgb:Qh},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[lH],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 uH(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 fH={...$_,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:[uH],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]}},Yx=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},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=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},dH={...Ha,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:n=>jx(Io(n)),xyz65:jx},toMode:{rgb:n=>Lo(Yx(n)),xyz65:Yx}},Fm=n=>{let e=Math.abs(n);return e>=1/512?Math.sign(n)*Math.pow(e,1/1.8):16*n},Kx=({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},Zx=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},hH={...Ha,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:Kx,rgb:n=>Kx(Zc(n))},toMode:{xyz50:Zx,rgb:n=>Kc(Zx(n))}},Jx=1.09929682680944,pH=.018053968510807,Bm=n=>{const e=Math.abs(n);return e>pH?(Math.sign(n)||1)*(Jx*Math.pow(e,.45)-(Jx-1)):4.5*n},Qx=({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},eM=1.09929682680944,mH=.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},gH={...Ha,mode:"rec2020",fromMode:{xyz65:Qx,rgb:n=>Qx(Io(n))},toMode:{xyz65:tM,rgb:n=>Lo(tM(n))},parse:["rec2020"],serialize:"rec2020"},_o=.0037930732552754493,xA=Math.cbrt(_o),Vm=n=>Math.cbrt(n)-xA,_H=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+xA,3),vH=({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},yH={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:vH},fromMode:{rgb:_H},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:Ae,y:Ae,b:Ae,alpha:{use:Ae,fixup:on}}},bH={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:Kc,lab:W_},fromMode:{rgb:Zc,lab:G_},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}}},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:"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},MH=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},SH={mode:"xyz65",toMode:{rgb:Lo,xyz50:xH},fromMode:{rgb:Io,xyz50:MH},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}}},EH=({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},TH=({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},wH={mode:"yiq",toMode:{rgb:TH},fromMode:{rgb:EH},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(h6);Et(b6);Et(x6);Et(M6);Et(T6);Et(iA);Et(oA);Et(N6);Et(U6);Et(z6);Et(V6);Et(X_);Et(G6);Et($_);Et(X6);Et(tH);Et(nH);Et(iH);Et(oH);Et(aH);Et(cH);Et(fH);Et(dH);Et(hH);Et(gH);Et(Ha);Et(yH);Et(bH);Et(SH);Et(wH);const e0=220.44,AH=qw("oklch"),nM=n=>{var e;return n?(e=AH(n))==null?void 0:e.h:e0},CH=Nz("settings",()=>{const n=et(),e=gs("settings/language","en-US"),t=gs("settings/stage/view/model-renderer","2d"),i=gs("settings/audio/input","false"),s=Ee(()=>{var E;return(E=n.value)==null?void 0:E.deviceId}),{audioInputs:r,ensurePermissions:o}=BB({constraints:{audio:!0}}),a=et(),l=et("/assets/live2d/models/hiyori_pro_zh.zip"),c=et("url"),u=et(!1),f=gs("settings/live2d/position",{x:0,y:0}),d=et({group:"Idle",index:0}),h=et([]),p=gs("settings/live2d/motion-map",{}),_=gs("settings/disable-transitions",!0),g=gs("settings/use-page-specific-transitions",!0),m=gs("settings/theme/colors/hue",e0),y=gs("settings/theme/colors/hue-dynamic",!1);function b(E=e0){m.value=E,y.value=!1}function v(E){b(nM(E))}function T(E){if(y.value)return!1;const S=nM(E);if(!S)return!1;const P=Math.abs(S-m.value);return P<.01||P>359.99}return $e(i,E=>{E==="false"&&(n.value=void 0),E==="true"&&o().then(()=>{n.value=r.value[0]})}),$e(r,()=>{i.value==="true"&&!n.value&&(n.value=r.value[0])},{immediate:!0}),{live2dModelFile:a,live2dModelUrl:l,live2dLoadSource:c,live2dCurrentMotion:d,live2dPosition:f,availableLive2dMotions:h,live2dMotionMap:p,loadingLive2dModel:u,disableTransitions:_,usePageSpecificTransitions:g,language:e,stageView:t,themeColorsHue:m,themeColorsHueDynamic:y,isAudioInputOn:i,selectedAudioDevice:n,selectedAudioDeviceId:s,setThemeColorsHue:b,applyPrimaryColorFrom:v,isColorSelectedForPrimary:T}}),RH=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:Mi({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},PH=Do(RH,[["__scopeId","data-v-df576df0"]]),IH=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:Mi({zIndex:((r=n.stageTransition)==null?void 0:r.zIndex)||100})},[(mn(!0),vi(jt,null,f2(t.value,(o,a)=>(mn(),vi("div",{key:a}))),128))],4)}}}),LH=Do(IH,[["__scopeId","data-v-0c29056c"]]),DH=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:Mi({zIndex:((o=n.stageTransition)==null?void 0:o.zIndex)??100})},null,6)}}}),OH=Do(DH,[["__scopeId","data-v-e62bf496"]]),NH=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:Mi({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},o[0]||(o[0]=[W2('
',5)]),4)}}}),UH=Do(NH,[["__scopeId","data-v-6d1179fc"]]),FH=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:Mi({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},null,4)}}}),kH=Do(FH,[["__scopeId","data-v-bf1d1566"]]),BH=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:Mi({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},null,4)}}}),zH=Do(BH,[["__scopeId","data-v-8ff7120f"]]),VH=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:Mi({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)}}}),HH=Do(VH,[["__scopeId","data-v-f4b1dc64"]]),GH=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=VV(),i=et(!1),s=et(),r=et(""),o=et(),a=De({slide:{component:kH,duration:2700},"slope-slide":{component:zH,duration:2700},arrow:{component:PH,duration:2700},"multiple-blocks-reveal":{component:UH,duration:2800},"fantasy-fall":{component:OH,duration:2700},"rectangles-rotate":{component:HH,duration:2700},"bubble-wave-out":{component:LH,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(T=>{T==="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(E=>setTimeout(E,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 T=g.exitDuration??0;setTimeout(async()=>{i.value=!1,r.value="",o.value=void 0,await u("after-leave",{transitionName:h.name}),_()},g.duration+T)}catch(T){console.error(T)}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,[d2(h.$slots,"default"),i.value?(mn(),vi(jt,{key:0},[a.value[r.value]?(mn(),Yl(u2(a.value[r.value].component),{key:0,"stage-transition":o.value},null,8,["stage-transition"])):Rv("",!0)],64)):Rv("",!0)],64))}});/*! diff --git a/assets/memory-long-term-BkSIgiZH.js b/assets/memory-long-term-BkSIgiZH.js deleted file mode 100644 index caef5457f52f1f891f761815a1cb894576bd2e8e..0000000000000000000000000000000000000000 --- a/assets/memory-long-term-BkSIgiZH.js +++ /dev/null @@ -1 +0,0 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import{_ as e}from"./PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js";import{d as o,x as s,o as r,u as m}from"./index-D8Nm21zW.js";const u=o({__name:"memory-long-term",setup(n){return(t,i)=>(r(),s(m(e),{title:t.$t("settings.pages.modules.memory-long-term.title"),subtitle:t.$t("settings.title")},null,8,["title","subtitle"]))}});export{u as default}; diff --git a/assets/memory-long-term-PNKqJb4c.js b/assets/memory-long-term-PNKqJb4c.js new file mode 100644 index 0000000000000000000000000000000000000000..3bd76c6b3545831ea638bf6692989adb7b9c049c --- /dev/null +++ b/assets/memory-long-term-PNKqJb4c.js @@ -0,0 +1 @@ +import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import{_ as e}from"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js";import{d as o,x as s,o as r,u as m}from"./index-_NYoebRU.js";const u=o({__name:"memory-long-term",setup(n){return(t,i)=>(r(),s(m(e),{title:t.$t("settings.pages.modules.memory-long-term.title"),subtitle:t.$t("settings.title")},null,8,["title","subtitle"]))}});export{u as default}; diff --git a/assets/memory-short-term-DmPq1-RB.js b/assets/memory-short-term-DmPq1-RB.js new file mode 100644 index 0000000000000000000000000000000000000000..6cedd86f0e407a02dc248df9a81dc33f97717129 --- /dev/null +++ b/assets/memory-short-term-DmPq1-RB.js @@ -0,0 +1 @@ +import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import{_ as e}from"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js";import{d as s,x as o,o as r,u as m}from"./index-_NYoebRU.js";const u=s({__name:"memory-short-term",setup(i){return(t,n)=>(r(),o(m(e),{title:t.$t("settings.pages.modules.memory-short-term.title"),subtitle:t.$t("settings.title")},null,8,["title","subtitle"]))}});export{u as default}; diff --git a/assets/memory-short-term-Dq-l2fpr.js b/assets/memory-short-term-Dq-l2fpr.js deleted file mode 100644 index e6380ed28ff341be32ded82f55185749f5770c20..0000000000000000000000000000000000000000 --- a/assets/memory-short-term-Dq-l2fpr.js +++ /dev/null @@ -1 +0,0 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import{_ as e}from"./PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js";import{d as s,x as o,o as r,u as m}from"./index-D8Nm21zW.js";const u=s({__name:"memory-short-term",setup(i){return(t,n)=>(r(),o(m(e),{title:t.$t("settings.pages.modules.memory-short-term.title"),subtitle:t.$t("settings.title")},null,8,["title","subtitle"]))}});export{u as default}; diff --git a/assets/messages-Dpefqazf.js b/assets/messages-SpcKwdH9.js similarity index 67% rename from assets/messages-Dpefqazf.js rename to assets/messages-SpcKwdH9.js index cfec2feb97ce1499449907c8fb6ce5ae73e39680..71f8349a88de9b4ac57cfae694aba758d0e7eee8 100644 --- a/assets/messages-Dpefqazf.js +++ b/assets/messages-SpcKwdH9.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import{_ as c}from"./Textarea.vue_vue_type_script_setup_true_lang-CP4Ap1fe.js";import{d as g,g as o,c as l,o as u,a as e,b as _,u as v,D as p,bx as b,by as x}from"./index-D8Nm21zW.js";import{u as k}from"./queue-CEzllKo3.js";import{u as h,l as w}from"./queues-DJEZsGUG.js";import"./Basic.vue_vue_type_script_setup_true_lang-CrXWH1a1.js";const y={flex:"","flex-col":"","gap-2":"","p-2":""},S={flex:"","flex-row":"","gap-2":""},V={"rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-4":""},M={"w-full":"",flex:"","flex-row":"","gap-4":""},Q={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},P=g({__name:"messages",setup(B){const s=o(""),r=o([]),t=o(!1),f=k({handlers:[async i=>{r.value.push(i.data)}]}),d=h(f);async function m(){t.value=!0,d.add(s.value),d.add(w),s.value="",t.value=!1}return(i,a)=>(u(),l("div",y,[e("div",S,[_(v(c),{modelValue:s.value,"onUpdate:modelValue":a[0]||(a[0]=n=>s.value=n),placeholder:"Message",p:"2",bg:"neutral-100 dark:neutral-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:m},null,8,["modelValue"]),e("button",V,p(t.value?"Processing...":"Send"),1)]),e("div",M,[e("div",Q,[a[1]||(a[1]=e("h3",{"font-semibold":""}," TTS Message ",-1)),(u(!0),l(b,null,x(r.value,n=>(u(),l("div",{key:n},[e("div",null,p(n),1)]))),128))])])]))}});export{P as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import{_ as c}from"./Textarea.vue_vue_type_script_setup_true_lang-akwsm8zZ.js";import{d as g,g as o,c as l,o as u,a as e,b as _,u as v,D as p,bx as b,by as x}from"./index-_NYoebRU.js";import{u as k}from"./queue-DeGTso58.js";import{u as h,l as w}from"./queues-R1s0xq50.js";import"./Basic.vue_vue_type_script_setup_true_lang-C4n90OG-.js";const y={flex:"","flex-col":"","gap-2":"","p-2":""},S={flex:"","flex-row":"","gap-2":""},V={"rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-4":""},M={"w-full":"",flex:"","flex-row":"","gap-4":""},Q={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},P=g({__name:"messages",setup(B){const s=o(""),r=o([]),t=o(!1),f=k({handlers:[async i=>{r.value.push(i.data)}]}),d=h(f);async function m(){t.value=!0,d.add(s.value),d.add(w),s.value="",t.value=!1}return(i,a)=>(u(),l("div",y,[e("div",S,[_(v(c),{modelValue:s.value,"onUpdate:modelValue":a[0]||(a[0]=n=>s.value=n),placeholder:"Message",p:"2",bg:"neutral-100 dark:neutral-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:m},null,8,["modelValue"]),e("button",V,p(t.value?"Processing...":"Send"),1)]),e("div",M,[e("div",Q,[a[1]||(a[1]=e("h3",{"font-semibold":""}," TTS Message ",-1)),(u(!0),l(b,null,x(r.value,n=>(u(),l("div",{key:n},[e("div",null,p(n),1)]))),128))])])]))}});export{P as default}; diff --git a/assets/microsoft-speech-DxiRqm6y.js b/assets/microsoft-speech-gecFpY-y.js similarity index 67% rename from assets/microsoft-speech-DxiRqm6y.js rename to assets/microsoft-speech-gecFpY-y.js index eb63a29271b48a048ee771ae027527ac17380c52..e4d6b2ac520d80b323bc0b8e9d4f5f2143a9743c 100644 --- a/assets/microsoft-speech-DxiRqm6y.js +++ b/assets/microsoft-speech-gecFpY-y.js @@ -1 +1 @@ -import{_ as P}from"./FieldInput.vue_vue_type_script_setup_true_lang-BNHdvI3g.js";import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import{d as $,q,s as B,g as v,h as f,r as K,x as M,o as T,y as g,b as h,u as n}from"./index-D8Nm21zW.js";import{u as z}from"./providers-DUDq6kdm.js";import{u as E}from"./speech-B27BwGQ-.js";import{_ as F,a as G}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-Cscdqs1L.js";import"./Input.vue_vue_type_script_setup_true_lang-DacRzqGb.js";import"./index-Be1NqeGb.js";import"./TestDummyMarker.vue_vue_type_script_setup_true_lang-CG5q9Jpo.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-Blzu2N2U.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-CYg3DjVq.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-CL9MLblt.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DFTTO3aS.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-Bq_0Y-1M.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js";const t="microsoft-speech",x="v1",oe=$({__name:"microsoft-speech",setup(H){const{t:S}=q(),C={pitch:0,speed:1,volume:0},p=E(),d=z(),{providers:r}=B(d),c=v(0),_=v(1),b=v(0),u=f({get:()=>{var o;return((o=r.value[t])==null?void 0:o.region)||"eastasia"},set:o=>{r.value[t]||(r.value[t]={}),r.value[t].region=o}}),U=f(()=>{var o;return!!((o=r.value[t])!=null&&o.apiKey)}),y=f(()=>p.availableVoices[t]||[]);async function k(o,e,l){const i=d.getProviderInstance(t);if(!i)throw new Error("Failed to initialize speech provider");const a=d.getProviderConfig(t),s=a.model||x,V={...a,region:u.value,disableSsml:!l};if(!l&&e){const w=y.value.find(m=>m.id===e);if(w){const m=p.generateSSML(o,w,{...a,pitch:c.value});return await p.speech(i,s,m,e,V)}}return await p.speech(i,s,o,e,V)}return(o,e)=>{const l=K("SpeechVoiceSettings");return T(),M(n(G),{"provider-id":t,"default-model":x,"additional-settings":C},{"basic-settings":g(()=>[h(n(P),{modelValue:u.value,"onUpdate:modelValue":e[0]||(e[0]=i=>u.value=i),label:n(S)("settings.pages.providers.provider.microsoft-speech.fields.field.region.label"),description:n(S)("settings.pages.providers.provider.microsoft-speech.fields.field.region.description"),placeholder:"eastasia",required:"",type:"text"},null,8,["modelValue","label","description"])]),"voice-settings":g(({voiceSettings:i,updateVoiceSettings:a})=>[h(l,{pitch:c.value,"onUpdate:pitch":e[1]||(e[1]=s=>c.value=s),speed:_.value,"onUpdate:speed":e[2]||(e[2]=s=>_.value=s),volume:b.value,"onUpdate:volume":e[3]||(e[3]=s=>b.value=s),settings:i,"show-pitch":!0,"show-speed":!0,"show-volume":!0,onUpdate:a},null,8,["pitch","speed","volume","settings","onUpdate"])]),playground:g(()=>[h(n(F),{"available-voices":y.value,"generate-speech":k,"api-key-configured":U.value,"default-text":"Hello! This is a test of the Microsoft Speech synthesis."},null,8,["available-voices","api-key-configured"])]),_:1})}}});export{oe as default}; +import{_ as P}from"./FieldInput.vue_vue_type_script_setup_true_lang-BHH_IiH5.js";import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import{d as $,q,s as B,g as v,h as f,r as K,x as M,o as T,y as g,b as h,u as n}from"./index-_NYoebRU.js";import{u as z}from"./providers-Bbs_o2SI.js";import{u as E}from"./speech-DTX8fpM-.js";import{_ as F,a as G}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-C9WOvHCP.js";import"./Input.vue_vue_type_script_setup_true_lang-DXXJ9lLc.js";import"./index-Be1NqeGb.js";import"./TestDummyMarker.vue_vue_type_script_setup_true_lang-7UKgQXIZ.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BBijRr4z.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-Dx_TCyI1.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Cx39i7VD.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DEakgvr1.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-8eUb1l9O.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js";const t="microsoft-speech",x="v1",oe=$({__name:"microsoft-speech",setup(H){const{t:S}=q(),C={pitch:0,speed:1,volume:0},p=E(),d=z(),{providers:r}=B(d),c=v(0),_=v(1),b=v(0),u=f({get:()=>{var o;return((o=r.value[t])==null?void 0:o.region)||"eastasia"},set:o=>{r.value[t]||(r.value[t]={}),r.value[t].region=o}}),U=f(()=>{var o;return!!((o=r.value[t])!=null&&o.apiKey)}),y=f(()=>p.availableVoices[t]||[]);async function k(o,e,l){const i=d.getProviderInstance(t);if(!i)throw new Error("Failed to initialize speech provider");const a=d.getProviderConfig(t),s=a.model||x,V={...a,region:u.value,disableSsml:!l};if(!l&&e){const w=y.value.find(m=>m.id===e);if(w){const m=p.generateSSML(o,w,{...a,pitch:c.value});return await p.speech(i,s,m,e,V)}}return await p.speech(i,s,o,e,V)}return(o,e)=>{const l=K("SpeechVoiceSettings");return T(),M(n(G),{"provider-id":t,"default-model":x,"additional-settings":C},{"basic-settings":g(()=>[h(n(P),{modelValue:u.value,"onUpdate:modelValue":e[0]||(e[0]=i=>u.value=i),label:n(S)("settings.pages.providers.provider.microsoft-speech.fields.field.region.label"),description:n(S)("settings.pages.providers.provider.microsoft-speech.fields.field.region.description"),placeholder:"eastasia",required:"",type:"text"},null,8,["modelValue","label","description"])]),"voice-settings":g(({voiceSettings:i,updateVoiceSettings:a})=>[h(l,{pitch:c.value,"onUpdate:pitch":e[1]||(e[1]=s=>c.value=s),speed:_.value,"onUpdate:speed":e[2]||(e[2]=s=>_.value=s),volume:b.value,"onUpdate:volume":e[3]||(e[3]=s=>b.value=s),settings:i,"show-pitch":!0,"show-speed":!0,"show-volume":!0,onUpdate:a},null,8,["pitch","speed","volume","settings","onUpdate"])]),playground:g(()=>[h(n(F),{"available-voices":y.value,"generate-speech":k,"api-key-configured":U.value,"default-text":"Hello! This is a test of the Microsoft Speech synthesis."},null,8,["available-voices","api-key-configured"])]),_:1})}}});export{oe as default}; diff --git a/assets/mistral-ai-CzsP5HyY.js b/assets/mistral-ai-VHZyWeLB.js similarity index 69% rename from assets/mistral-ai-CzsP5HyY.js rename to assets/mistral-ai-VHZyWeLB.js index 6a6e3cbb8ed181db08ed68b2ef72cf0fcbc5c795..99fbd64ee7e4294c36526eb5f3b0630c65b2a219 100644 --- a/assets/mistral-ai-CzsP5HyY.js +++ b/assets/mistral-ai-VHZyWeLB.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.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,u as t}from"./index-D8Nm21zW.js";import{u as w}from"./providers-DUDq6kdm.js";import{_ as z,a as C}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-Blzu2N2U.js";import{_ as M}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DFTTO3aS.js";import{_ as N,a as P}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-Bq_0Y-1M.js";import{_ as R}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-Ccg-E6bm.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-CYg3DjVq.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-CL9MLblt.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BNHdvI3g.js";import"./Input.vue_vue_type_script_setup_true_lang-DacRzqGb.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js";const a="mistral-ai",L=U({__name:"mistral-ai",setup(S){const{t:p}=V(),_=y(),d=w(),{providers:o}=$(d),n=v(()=>d.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}});k(()=>{var e,i;d.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: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:r.value,"onUpdate:modelValue":i[0]||(i[0]=g=>r.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:s.value,"onUpdate:modelValue":i[1]||(i[1]=u=>s.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{L as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.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,u as t}from"./index-_NYoebRU.js";import{u as w}from"./providers-Bbs_o2SI.js";import{_ as z,a as C}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BBijRr4z.js";import{_ as M}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DEakgvr1.js";import{_ as N,a as P}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-8eUb1l9O.js";import{_ as R}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-7OtTanLQ.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-Dx_TCyI1.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Cx39i7VD.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BHH_IiH5.js";import"./Input.vue_vue_type_script_setup_true_lang-DXXJ9lLc.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js";const a="mistral-ai",L=U({__name:"mistral-ai",setup(S){const{t:p}=V(),_=y(),d=w(),{providers:o}=$(d),n=v(()=>d.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}});k(()=>{var e,i;d.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: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:r.value,"onUpdate:modelValue":i[0]||(i[0]=g=>r.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:s.value,"onUpdate:modelValue":i[1]||(i[1]=u=>s.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{L as default}; diff --git a/assets/moonshot-ai-B-gxAO4v.js b/assets/moonshot-ai-BLeP7m0q.js similarity index 68% rename from assets/moonshot-ai-B-gxAO4v.js rename to assets/moonshot-ai-BLeP7m0q.js index dda6643f36a3bfc29b008865fbe0f55d0c5aa3c0..438e672b6451ce662a1a2950b3b39345c0e6b8d5 100644 --- a/assets/moonshot-ai-B-gxAO4v.js +++ b/assets/moonshot-ai-BLeP7m0q.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.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,u as t}from"./index-D8Nm21zW.js";import{u as w}from"./providers-DUDq6kdm.js";import{_ as z,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-Blzu2N2U.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DFTTO3aS.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-Bq_0Y-1M.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-Ccg-E6bm.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-CYg3DjVq.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-CL9MLblt.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BNHdvI3g.js";import"./Input.vue_vue_type_script_setup_true_lang-DacRzqGb.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js";const a="moonshot-ai",L=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{L as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.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,u as t}from"./index-_NYoebRU.js";import{u as w}from"./providers-Bbs_o2SI.js";import{_ as z,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BBijRr4z.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DEakgvr1.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-8eUb1l9O.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-7OtTanLQ.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-Dx_TCyI1.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Cx39i7VD.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BHH_IiH5.js";import"./Input.vue_vue_type_script_setup_true_lang-DXXJ9lLc.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js";const a="moonshot-ai",L=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{L as default}; diff --git a/assets/novita-ai-DCHaCXXA.js b/assets/novita-ai-CPkEAvZ_.js similarity index 69% rename from assets/novita-ai-DCHaCXXA.js rename to assets/novita-ai-CPkEAvZ_.js index e72c5ece202a98f2fc499383cbc3c1d93869d2fe..87d55f36acfb39c45663fb4280cd0843b8ee19af 100644 --- a/assets/novita-ai-DCHaCXXA.js +++ b/assets/novita-ai-CPkEAvZ_.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.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 p,b as l,u as t}from"./index-D8Nm21zW.js";import{u as w}from"./providers-DUDq6kdm.js";import{_ as z,a as C}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-Blzu2N2U.js";import{_ as M}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DFTTO3aS.js";import{_ as N,a as P}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-Bq_0Y-1M.js";import{_ as R}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-Ccg-E6bm.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-CYg3DjVq.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-CL9MLblt.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BNHdvI3g.js";import"./Input.vue_vue_type_script_setup_true_lang-DacRzqGb.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js";const a="novita-ai",L=U({__name:"novita-ai",setup(S){const{t:d}=V(),_=y(),m=w(),{providers:o}=$(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}});k(()=>{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)||""}),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{L as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.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 p,b as l,u as t}from"./index-_NYoebRU.js";import{u as w}from"./providers-Bbs_o2SI.js";import{_ as z,a as C}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BBijRr4z.js";import{_ as M}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DEakgvr1.js";import{_ as N,a as P}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-8eUb1l9O.js";import{_ as R}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-7OtTanLQ.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-Dx_TCyI1.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Cx39i7VD.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BHH_IiH5.js";import"./Input.vue_vue_type_script_setup_true_lang-DXXJ9lLc.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js";const a="novita-ai",L=U({__name:"novita-ai",setup(S){const{t:d}=V(),_=y(),m=w(),{providers:o}=$(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}});k(()=>{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)||""}),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{L as default}; diff --git a/assets/ollama-DVhvZ81j.js b/assets/ollama-CE4_2BuN.js similarity index 87% rename from assets/ollama-DVhvZ81j.js rename to assets/ollama-CE4_2BuN.js index 5243c7b67b17b55fa022ff98eb276934b015a9dd..a2e3a0d197e37adb87c323e96c4f54a706b154c3 100644 --- a/assets/ollama-DVhvZ81j.js +++ b/assets/ollama-CE4_2BuN.js @@ -1 +1 @@ -import{_ as P}from"./Input.vue_vue_type_script_setup_true_lang-DacRzqGb.js";import{d as w,bI as x,bJ as U,c as g,o as f,b as m,g as $,w as C,bw as N,a as _,A as D,bL 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,c9 as T,x as E,y as b,u as t}from"./index-D8Nm21zW.js";import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import{u as G}from"./providers-DUDq6kdm.js";import{a as J,_ as j}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-Blzu2N2U.js";import{_ as H,a as Q}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-Bq_0Y-1M.js";import{_ as W}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-Ccg-E6bm.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-CYg3DjVq.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-CL9MLblt.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BNHdvI3g.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js";const X={flex:"~ gap-2"},Y=w({__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=w({__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)}),(K,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",he=w({__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 K(){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(H),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":K},{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(j),{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{he as default}; +import{_ as P}from"./Input.vue_vue_type_script_setup_true_lang-DXXJ9lLc.js";import{d as w,bI as x,bJ as U,c as g,o as f,b as m,g as $,w as C,bw as N,a as _,A as D,bL 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,c9 as T,x as E,y as b,u as t}from"./index-_NYoebRU.js";import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import{u as G}from"./providers-Bbs_o2SI.js";import{a as J,_ as j}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BBijRr4z.js";import{_ as H,a as Q}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-8eUb1l9O.js";import{_ as W}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-7OtTanLQ.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-Dx_TCyI1.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Cx39i7VD.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BHH_IiH5.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js";const X={flex:"~ gap-2"},Y=w({__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=w({__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)}),(K,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",he=w({__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 K(){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(H),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":K},{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(j),{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{he as default}; diff --git a/assets/openai-DeU27RZU.js b/assets/openai-BXyL4WiR.js similarity index 70% rename from assets/openai-DeU27RZU.js rename to assets/openai-BXyL4WiR.js index 30561c9f6c0314d54cc9521d32afa8ac9669dd42..f75c17b20b3c50547dfefaca5c7e854a2453c5f5 100644 --- a/assets/openai-DeU27RZU.js +++ b/assets/openai-BXyL4WiR.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.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 n,b as l,u as t}from"./index-D8Nm21zW.js";import{u as I}from"./providers-DUDq6kdm.js";import{_ as w,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-Blzu2N2U.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DFTTO3aS.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-Bq_0Y-1M.js";import{_ as z}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-Ccg-E6bm.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-CYg3DjVq.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-CL9MLblt.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BNHdvI3g.js";import"./Input.vue_vue_type_script_setup_true_lang-DacRzqGb.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js";const e="openai",L=h({__name:"openai",setup(A){const{t:u}=U(),_=V(),c=I(),{providers:a}=k(c),m=v(()=>c.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}}),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,i;a.value[e]||(a.value[e]={baseUrl:"https://api.openai.com/v1/"}),s.value=((o=a.value[e])==null?void 0:o.apiKey)||"",r.value=((i=a.value[e])==null?void 0:i.baseUrl)||"https://api.openai.com/v1/"}),$([s,r],()=>{a.value[e]={...a.value[e],apiKey:s.value,baseUrl:r.value||"https://api.openai.com/v1/"}});function b(){a.value[e]={baseUrl:"https://api.openai.com/v1/"}}return(o,i)=>{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:n(()=>[l(t(R),null,{default:n(()=>[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:n(()=>{var p;return[l(t(N),{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=g=>s.value=g),"provider-name":((p=m.value)==null?void 0:p.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:n(()=>[l(t(M),{modelValue:r.value,"onUpdate:modelValue":i[1]||(i[1]=p=>r.value=p),placeholder:"https://api.openai.com/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});export{L as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.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 n,b as l,u as t}from"./index-_NYoebRU.js";import{u as I}from"./providers-Bbs_o2SI.js";import{_ as w,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BBijRr4z.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DEakgvr1.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-8eUb1l9O.js";import{_ as z}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-7OtTanLQ.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-Dx_TCyI1.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Cx39i7VD.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BHH_IiH5.js";import"./Input.vue_vue_type_script_setup_true_lang-DXXJ9lLc.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js";const e="openai",L=h({__name:"openai",setup(A){const{t:u}=U(),_=V(),c=I(),{providers:a}=k(c),m=v(()=>c.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}}),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,i;a.value[e]||(a.value[e]={baseUrl:"https://api.openai.com/v1/"}),s.value=((o=a.value[e])==null?void 0:o.apiKey)||"",r.value=((i=a.value[e])==null?void 0:i.baseUrl)||"https://api.openai.com/v1/"}),$([s,r],()=>{a.value[e]={...a.value[e],apiKey:s.value,baseUrl:r.value||"https://api.openai.com/v1/"}});function b(){a.value[e]={baseUrl:"https://api.openai.com/v1/"}}return(o,i)=>{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:n(()=>[l(t(R),null,{default:n(()=>[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:n(()=>{var p;return[l(t(N),{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=g=>s.value=g),"provider-name":((p=m.value)==null?void 0:p.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:n(()=>[l(t(M),{modelValue:r.value,"onUpdate:modelValue":i[1]||(i[1]=p=>r.value=p),placeholder:"https://api.openai.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/openrouter-ai-BENIJVm4.js b/assets/openrouter-ai-C8x3jBUe.js similarity index 72% rename from assets/openrouter-ai-BENIJVm4.js rename to assets/openrouter-ai-C8x3jBUe.js index 7aaa4db27024846d17c1e1790bae28e4c406f8b7..7a17e44fb8cb3d7beb80060b6ae64683baaccdc5 100644 --- a/assets/openrouter-ai-BENIJVm4.js +++ b/assets/openrouter-ai-C8x3jBUe.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.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,u as l}from"./index-D8Nm21zW.js";import{u as w}from"./providers-DUDq6kdm.js";import{_ as z,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-Blzu2N2U.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DFTTO3aS.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-Bq_0Y-1M.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-Ccg-E6bm.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-CYg3DjVq.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-CL9MLblt.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BNHdvI3g.js";import"./Input.vue_vue_type_script_setup_true_lang-DacRzqGb.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js";const a="openrouter-ai",Q=V({__name:"openrouter-ai",setup(B){const{t:c}=k(),b=y(),f=w(),{providers:o}=$(f),r=_(()=>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,s;return((e=o.value[a])==null?void 0:e.baseUrl)||((s=(t=r.value)==null?void 0:t.defaultOptions)==null?void 0:s.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});K(()=>{var e,t,s,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=(s=r.value)==null?void 0:s.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=r.value)==null?void 0:e.defaultOptions)==null?void 0:t.baseUrl)||""}});function U(){var e;o.value[a]={...(e=r.value)==null?void 0:e.defaultOptions}}return(e,t)=>{var s,u;return x(),h(l(S),{"provider-name":(s=r.value)==null?void 0:s.localizedName,"provider-icon":(u=r.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=r.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=r.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{Q as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.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,u as l}from"./index-_NYoebRU.js";import{u as w}from"./providers-Bbs_o2SI.js";import{_ as z,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BBijRr4z.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DEakgvr1.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-8eUb1l9O.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-7OtTanLQ.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-Dx_TCyI1.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Cx39i7VD.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BHH_IiH5.js";import"./Input.vue_vue_type_script_setup_true_lang-DXXJ9lLc.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js";const a="openrouter-ai",Q=V({__name:"openrouter-ai",setup(B){const{t:c}=k(),b=y(),f=w(),{providers:o}=$(f),r=_(()=>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,s;return((e=o.value[a])==null?void 0:e.baseUrl)||((s=(t=r.value)==null?void 0:t.defaultOptions)==null?void 0:s.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});K(()=>{var e,t,s,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=(s=r.value)==null?void 0:s.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=r.value)==null?void 0:e.defaultOptions)==null?void 0:t.baseUrl)||""}});function U(){var e;o.value[a]={...(e=r.value)==null?void 0:e.defaultOptions}}return(e,t)=>{var s,u;return x(),h(l(S),{"provider-name":(s=r.value)==null?void 0:s.localizedName,"provider-icon":(u=r.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=r.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=r.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{Q as default}; diff --git a/assets/providers-DUDq6kdm.js b/assets/providers-Bbs_o2SI.js similarity index 99% rename from assets/providers-DUDq6kdm.js rename to assets/providers-Bbs_o2SI.js index d80d6cd546ce53074ee1ccdcabe766b97a191545..aa2a0cfc306cd59f9349a08e45536f8e42854ef2 100644 --- a/assets/providers-DUDq6kdm.js +++ b/assets/providers-Bbs_o2SI.js @@ -1 +1 @@ -import{f as oe,bD as le,q as de,g as q,w as ce,h as w}from"./index-D8Nm21zW.js";import{r as Z,a as R,e as ee,o as k}from"./index-Be1NqeGb.js";const b=async a=>(a.fetch??globalThis.fetch)(Z("models",a.baseURL),{headers:R(a.headers,a.apiKey),signal:a.abortSignal}).then(ee).then(({data:i})=>i),_=a=>({chat:i=>Object.assign(a,{model:i})}),K=a=>({embed:i=>Object.assign(a,{model:i})}),f=a=>({model:()=>a}),pe=a=>({speech:i=>Object.assign(a,{model:i})}),ue=a=>({transcription:i=>Object.assign(a,{model:i})}),m=(a,i)=>({metadata:{id:a,...i}}),p=(...a)=>Object.assign(a[0],...a.slice(1)),ge=(a,i="https://api.anthropic.com/v1/")=>p(m("anthropic"),_({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),L=(a,i="https://api.deepseek.com/")=>p(m("deepseek"),_({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),G=(a,i="https://api.fireworks.ai/inference/v1/")=>p(m("fireworks"),_({apiKey:a,baseURL:i}),K({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),$=(a,i="https://generativelanguage.googleapis.com/v1beta/openai/")=>p(m("google-generative-ai"),_({apiKey:a,baseURL:i}),K({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),D=(a,i="https://api.mistral.ai/v1/")=>p(m("mistral"),_({apiKey:a,baseURL:i}),K({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),V=(a,i="https://api.moonshot.cn/v1/")=>p(m("moonshot"),_({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),N=(a,i="https://api.novita.ai/v3/openai/")=>p(m("novita"),_({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),S=(a,i="https://api.openai.com/v1/")=>p(m("openai"),_({apiKey:a,baseURL:i}),K({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i}),pe({apiKey:a,baseURL:i}),ue({apiKey:a,baseURL:i})),me=(a,i="")=>p(m("openrouter"),{chat:(d,o)=>{const h={apiKey:a,baseURL:i,model:d};return{...o?(({extraHeaders:n,models:v,provider:g})=>{n!=null&&(h.headers??(h.headers={}),Object.assign(h.headers,n));let c;return g!=null&&(c=k(g)),k({models:v,provider:c})})(o):{},...h}}},f({apiKey:a,baseURL:i})),ve=(a,i="https://api.perplexity.ai/")=>p(m("perplexity"),_({apiKey:a,baseURL:i})),W=(a,i="https://api.together.xyz/v1/")=>p(m("together-ai"),_({apiKey:a,baseURL:i}),K({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i,fetch:async(...d)=>globalThis.fetch(...d).then(async o=>o.json()).then(o=>Response.json({data:o,object:"list"}))})),_e=(a,i)=>{const d=`https://api.cloudflare.com/client/v4/accounts/${i}/ai/v1/`;return p(m("workers-ai"),_({apiKey:a,baseURL:d}),K({apiKey:a,baseURL:d}))},H=(a,i="https://api.x.ai/v1/")=>p(m("xai"),_({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),A=(a="http://localhost:11434/v1/")=>p(m("ollama"),_({baseURL:a}),K({baseURL:a}),f({baseURL:a}));var J=(a,i="http://localhost:5933/v1/")=>{const d=({applyTextNormalization:t,languageCode:n,nextRequestIds:v,nextText:g,previousRequestIds:c,previousText:y,pronunciationDictionaryLocators:x,seed:M,voiceSettings:C})=>({extraBody:k({applyTextNormalization:t,languageCode:n,nextRequestIds:v,nextText:g,previousRequestIds:c,previousText:y,pronunciationDictionaryLocators:x?x.map(B=>k(B)):void 0,seed:M,voiceSettings:k(C??{similarityBoost:.75,stability:.5})})});return p({speech:(t,n)=>({...n?d(n):{},apiKey:a,baseURL:i,model:`elevenlabs/${t}`})},{voice:t=>(i.endsWith("v1/")?i=i.slice(0,-3):i.endsWith("v1")&&(i=i.slice(0,-2)),{query:"provider=elevenlabs",...t?d(t):{},apiKey:a,baseURL:i})})},X=(a,i="http://localhost:5933/v1/")=>{const d=t=>{const{deploymentId:n,region:v,sampleRate:g}=t,c={deploymentId:n,region:v,sampleRate:g};return"disableSsml"in t?c.disableSsml=t.disableSsml:"lang"in t&&(c.lang=t.lang,c.gender=t.gender,c.voice=t.voice),{extraBody:k(c)}};return p({speech:(t,n)=>({...n?d(n):{},apiKey:a,baseURL:i,model:`microsoft/${t}`})},{voice:t=>(i.endsWith("v1/")?i=i.slice(0,-3):i.endsWith("v1")&&(i=i.slice(0,-2)),{query:`region=${t==null?void 0:t.region}&provider=microsoft`,...t?d(t):{},apiKey:a,baseURL:i})})},Q=(a,i="http://localhost:5933/v1/")=>{const d=t=>{var v,g;const n={app:{appid:(v=t.app)==null?void 0:v.appId,token:a}};return typeof t.app<"u"&&(n.app={...t.app,appid:(g=t.app)==null?void 0:g.appId,token:a}),typeof t.user<"u"&&(n.user=t.user),typeof t.audio<"u"&&(n.audio=t.audio),{extraBody:k(n)}};return p({speech:(t,n)=>({...n?d(n):{},apiKey:a,baseURL:i,model:`volcengine/${t}`})},{voice:t=>(i.endsWith("v1/")?i=i.slice(0,-3):i.endsWith("v1")&&(i=i.slice(0,-2)),{query:"provider=volcengine",...t?d(t):{},apiKey:a,baseURL:i})})},Y=(a,i="http://localhost:5933/v1/")=>{const d=t=>{const{sampleRate:n,volume:v,rate:g,pitch:c}=t,y={sampleRate:n,volume:v,rate:g,pitch:c};return Object.keys(y).forEach(x=>y[x]===void 0&&delete y[x]),{extraBody:k(y)}};return p({speech:(t,n)=>({...n?d(n):{},apiKey:a,baseURL:i,model:`alibaba/${t}`})},{voice:t=>{let n=i;return n.endsWith("v1/")?n=n.slice(0,-3):n.endsWith("v1")&&(n=n.slice(0,-2)),{query:"provider=alibaba",...t?d(t):{},apiKey:a,baseURL:n}}})},E=async a=>(a.fetch??globalThis.fetch)(Z(a.query?`api/voices?${a.query}`:"api/voices",a.baseURL),{headers:R({...a.headers},a.apiKey),method:"GET",signal:a.abortSignal}).then(ee).then(({voices:i})=>i);const he=[{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"}],xe=oe("providers",()=>{const a=le("settings/credentials/providers",{}),{t:i}=de();async function d(e){try{const r=await fetch("https://openrouter.ai/api/v1/models",{headers:{Authorization:`Bearer ${e.apiKey.trim()}`,"Content-Type":"application/json"}});if(!r.ok)throw new Error(`Failed to fetch OpenRouter models: ${r.statusText}`);return(await r.json()).data.map(s=>({id:s.id,name:s.name||s.id,provider:"openrouter-ai",description:s.description||"",contextLength:s.context_length,deprecated:!1}))}catch(r){throw console.error("Error fetching OpenRouter models:",r),r}}const o={"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=>me(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>d(e)},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},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=>A(e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...A(e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"ollama",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.baseUrl}},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",createProvider:e=>A(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}]},validators:{validateProviderConfig:e=>!!e.baseUrl}},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=>S(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...S(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"openai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},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=>ge(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}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"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=>$(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...$(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"google-generative-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},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=>H(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...H(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"xai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},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",createProvider:e=>L(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...L(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"deepseek",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},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=>J(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>he.map(e=>({id:e.model_id,name:e.name,provider:"elevenlabs",description:e.description,contextLength:0,deprecated:!1})),listVoices:async e=>{const r=J(e.apiKey.trim(),e.baseUrl.trim()),l=await E({...r.voice()}),s=l.findIndex(P=>P.name.includes("Aria")),u=l.findIndex(P=>P.name.includes("Bill")),j=s!==-1?s:0,F=u!==-1?u:l.length-1,I=Math.min(j,F),z=Math.max(j,F);return[...l.slice(0,I),...l.slice(z+1),...l.slice(I,z+1)].map(P=>({id:P.id,name:P.name,provider:"elevenlabs",previewURL:P.preview_audio_url,languages:P.languages}))}},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"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",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 r=X(e.apiKey.trim(),e.baseUrl.trim());return(await E({...r.voice({region:e.region})})).map(s=>{var u;return{id:s.id,name:s.name,provider:"microsoft-speech",previewURL:s.preview_audio_url,languages:s.languages,gender:(u=s.labels)==null?void 0:u.gender}})}},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"alibaba-cloud-model-studio":{id:"alibaba-cloud-model-studio",nameKey:"settings.pages.providers.provider.alibaba-cloud-model-studio.title",name:"Alibaba Cloud Model Studio",descriptionKey:"settings.pages.providers.provider.alibaba-cloud-model-studio.description",description:"bailian.console.aliyun.com",iconColor:"i-lobe-icons:alibabacloud",defaultOptions:{baseUrl:"https://unspeech.hyp3r.link/v1/"},createProvider:e=>Y(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listVoices:async e=>{const r=Y(e.apiKey.trim(),e.baseUrl.trim());return(await E({...r.voice()})).map(s=>{var u;return{id:s.id,name:s.name,provider:"alibaba-cloud-model-studio",previewURL:s.preview_audio_url,languages:s.languages,gender:(u=s.labels)==null?void 0:u.gender}})},listModels:async()=>[{id:"cozyvoice-v1",name:"CozyVoice",provider:"alibaba-cloud-model-studio",description:"",contextLength:0,deprecated:!1},{id:"cozyvoice-v2",name:"CozyVoice (New)",provider:"alibaba-cloud-model-studio",description:"",contextLength:0,deprecated:!1}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},volcengine:{id:"volcengine",nameKey:"settings.pages.providers.provider.volcengine.title",name:"settings.pages.providers.provider.volcengine.title",descriptionKey:"settings.pages.providers.provider.volcengine.description",description:"volcengine.com",iconColor:"i-lobe-icons:volcengine",defaultOptions:{baseUrl:"https://unspeech.hyp3r.link/v1/"},createProvider:e=>Q(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listVoices:async e=>{const r=Q(e.apiKey.trim(),e.baseUrl.trim());return(await E({...r.voice()})).map(s=>{var u;return{id:s.id,name:s.name,provider:"volcano-engine",previewURL:s.preview_audio_url,languages:s.languages,gender:(u=s.labels)==null?void 0:u.gender}})},listModels:async()=>[{id:"v1",name:"v1",provider:"volcano-engine",description:"",contextLength:0,deprecated:!1}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl&&!!e.app&&!!e.app.appId}},"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",createProvider:e=>W(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...W(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"together-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"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",createProvider:e=>N(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...N(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"novita-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"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=>G(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...G(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"fireworks-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"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=>S(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...S(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"featherless-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"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",createProvider:e=>_e(e.apiKey.trim(),e.accountId),capabilities:{listModels:async()=>[]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.accountId}},"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=>ve(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}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"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",createProvider:e=>D(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...D(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"mistral-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"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=>V(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...V(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"moonshot-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}}};async function h(e){const r=a.value[e];if(!r)return!1;const l=o[e];return l?await l.validators.validateProviderConfig(r):!1}const t=q({});function n(e){var r;if(!a.value[e]){const l=o[e];a.value[e]={baseUrl:((r=l.defaultOptions)==null?void 0:r.baseUrl)||""}}}Object.keys(o).forEach(n);async function v(){await Promise.all(Object.keys(o).map(async e=>{t.value[e]=await h(e)}))}v(),ce(a,v,{deep:!0});const g=w(()=>Object.keys(o).filter(e=>t.value[e])),c=q({}),y=q({}),x=q({});async function M(e){const r=a.value[e];if(!r)return[];const l=o[e];if(!l)return[];y.value[e]=!0,x.value[e]=null;try{const s=l.capabilities.listModels?await l.capabilities.listModels(r):[];return c.value[e]=s.map(u=>({id:u.id,name:u.name,description:u.description,contextLength:u.contextLength,deprecated:u.deprecated,provider:e})),c.value[e]}catch(s){return console.error(`Error fetching models for ${e}:`,s),x.value[e]=s instanceof Error?s.message:"Unknown error",[]}finally{y.value[e]=!1}}function C(e){return c.value[e]||[]}const B=w(()=>{const e=[];for(const r of g.value)e.push(...c.value[r]||[]);return e});async function ae(){for(const e of g.value)o[e].capabilities.listModels&&await M(e)}function T(e){const r=o[e];if(!r)throw new Error(`Provider metadata for ${e} not found`);return{...r,localizedName:i(r.nameKey,r.name),localizedDescription:i(r.descriptionKey,r.description)}}const ie=w(()=>Object.values(o).map(e=>({...e,localizedName:i(e.nameKey,e.name),localizedDescription:i(e.descriptionKey,e.description),configured:t.value[e.id]||!1})));function O(e){const r=a.value[e];if(!r)throw new Error(`Provider credentials for ${e} not found`);const l=o[e];if(!l)throw new Error(`Provider metadata for ${e} not found`);try{return l.createProvider(r)}catch(s){throw console.error(`Error creating provider instance for ${e}:`,s),s}}const U=w(()=>g.value.map(e=>T(e))),re=w(()=>U.value.filter(e=>{const r=O(e.id);return"chat"in r&&typeof r.chat=="function"})),te=w(()=>U.value.filter(e=>{const r=O(e.id);return"transcription"in r&&typeof r.transcription=="function"})),ne=w(()=>U.value.filter(e=>{const r=O(e.id);return"speech"in r&&typeof r.speech=="function"}));function se(e){return a.value[e]}return{providers:a,getProviderConfig:se,availableProviders:g,configuredProviders:t,providerMetadata:o,getProviderMetadata:T,allProvidersMetadata:ie,initializeProvider:n,validateProvider:h,availableModels:c,isLoadingModels:y,modelLoadError:x,fetchModelsForProvider:M,getModelsForProvider:C,allAvailableModels:B,loadModelsForConfiguredProviders:ae,getProviderInstance:O,availableProvidersMetadata:U,availableTextGenerationsProvidersMetadata:re,availableAudioSpeechProvidersMetadata:ne,availableAudioTranscriptionProvidersMetadata:te}});export{b as l,xe as u}; +import{f as oe,bD as le,q as de,g as q,w as ce,h as w}from"./index-_NYoebRU.js";import{r as Z,a as R,e as ee,o as k}from"./index-Be1NqeGb.js";const b=async a=>(a.fetch??globalThis.fetch)(Z("models",a.baseURL),{headers:R(a.headers,a.apiKey),signal:a.abortSignal}).then(ee).then(({data:i})=>i),_=a=>({chat:i=>Object.assign(a,{model:i})}),K=a=>({embed:i=>Object.assign(a,{model:i})}),f=a=>({model:()=>a}),pe=a=>({speech:i=>Object.assign(a,{model:i})}),ue=a=>({transcription:i=>Object.assign(a,{model:i})}),m=(a,i)=>({metadata:{id:a,...i}}),p=(...a)=>Object.assign(a[0],...a.slice(1)),ge=(a,i="https://api.anthropic.com/v1/")=>p(m("anthropic"),_({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),L=(a,i="https://api.deepseek.com/")=>p(m("deepseek"),_({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),G=(a,i="https://api.fireworks.ai/inference/v1/")=>p(m("fireworks"),_({apiKey:a,baseURL:i}),K({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),$=(a,i="https://generativelanguage.googleapis.com/v1beta/openai/")=>p(m("google-generative-ai"),_({apiKey:a,baseURL:i}),K({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),D=(a,i="https://api.mistral.ai/v1/")=>p(m("mistral"),_({apiKey:a,baseURL:i}),K({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),V=(a,i="https://api.moonshot.cn/v1/")=>p(m("moonshot"),_({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),N=(a,i="https://api.novita.ai/v3/openai/")=>p(m("novita"),_({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),S=(a,i="https://api.openai.com/v1/")=>p(m("openai"),_({apiKey:a,baseURL:i}),K({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i}),pe({apiKey:a,baseURL:i}),ue({apiKey:a,baseURL:i})),me=(a,i="")=>p(m("openrouter"),{chat:(d,o)=>{const h={apiKey:a,baseURL:i,model:d};return{...o?(({extraHeaders:n,models:v,provider:g})=>{n!=null&&(h.headers??(h.headers={}),Object.assign(h.headers,n));let c;return g!=null&&(c=k(g)),k({models:v,provider:c})})(o):{},...h}}},f({apiKey:a,baseURL:i})),ve=(a,i="https://api.perplexity.ai/")=>p(m("perplexity"),_({apiKey:a,baseURL:i})),W=(a,i="https://api.together.xyz/v1/")=>p(m("together-ai"),_({apiKey:a,baseURL:i}),K({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i,fetch:async(...d)=>globalThis.fetch(...d).then(async o=>o.json()).then(o=>Response.json({data:o,object:"list"}))})),_e=(a,i)=>{const d=`https://api.cloudflare.com/client/v4/accounts/${i}/ai/v1/`;return p(m("workers-ai"),_({apiKey:a,baseURL:d}),K({apiKey:a,baseURL:d}))},H=(a,i="https://api.x.ai/v1/")=>p(m("xai"),_({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),A=(a="http://localhost:11434/v1/")=>p(m("ollama"),_({baseURL:a}),K({baseURL:a}),f({baseURL:a}));var J=(a,i="http://localhost:5933/v1/")=>{const d=({applyTextNormalization:t,languageCode:n,nextRequestIds:v,nextText:g,previousRequestIds:c,previousText:y,pronunciationDictionaryLocators:x,seed:M,voiceSettings:C})=>({extraBody:k({applyTextNormalization:t,languageCode:n,nextRequestIds:v,nextText:g,previousRequestIds:c,previousText:y,pronunciationDictionaryLocators:x?x.map(B=>k(B)):void 0,seed:M,voiceSettings:k(C??{similarityBoost:.75,stability:.5})})});return p({speech:(t,n)=>({...n?d(n):{},apiKey:a,baseURL:i,model:`elevenlabs/${t}`})},{voice:t=>(i.endsWith("v1/")?i=i.slice(0,-3):i.endsWith("v1")&&(i=i.slice(0,-2)),{query:"provider=elevenlabs",...t?d(t):{},apiKey:a,baseURL:i})})},X=(a,i="http://localhost:5933/v1/")=>{const d=t=>{const{deploymentId:n,region:v,sampleRate:g}=t,c={deploymentId:n,region:v,sampleRate:g};return"disableSsml"in t?c.disableSsml=t.disableSsml:"lang"in t&&(c.lang=t.lang,c.gender=t.gender,c.voice=t.voice),{extraBody:k(c)}};return p({speech:(t,n)=>({...n?d(n):{},apiKey:a,baseURL:i,model:`microsoft/${t}`})},{voice:t=>(i.endsWith("v1/")?i=i.slice(0,-3):i.endsWith("v1")&&(i=i.slice(0,-2)),{query:`region=${t==null?void 0:t.region}&provider=microsoft`,...t?d(t):{},apiKey:a,baseURL:i})})},Q=(a,i="http://localhost:5933/v1/")=>{const d=t=>{var v,g;const n={app:{appid:(v=t.app)==null?void 0:v.appId,token:a}};return typeof t.app<"u"&&(n.app={...t.app,appid:(g=t.app)==null?void 0:g.appId,token:a}),typeof t.user<"u"&&(n.user=t.user),typeof t.audio<"u"&&(n.audio=t.audio),{extraBody:k(n)}};return p({speech:(t,n)=>({...n?d(n):{},apiKey:a,baseURL:i,model:`volcengine/${t}`})},{voice:t=>(i.endsWith("v1/")?i=i.slice(0,-3):i.endsWith("v1")&&(i=i.slice(0,-2)),{query:"provider=volcengine",...t?d(t):{},apiKey:a,baseURL:i})})},Y=(a,i="http://localhost:5933/v1/")=>{const d=t=>{const{sampleRate:n,volume:v,rate:g,pitch:c}=t,y={sampleRate:n,volume:v,rate:g,pitch:c};return Object.keys(y).forEach(x=>y[x]===void 0&&delete y[x]),{extraBody:k(y)}};return p({speech:(t,n)=>({...n?d(n):{},apiKey:a,baseURL:i,model:`alibaba/${t}`})},{voice:t=>{let n=i;return n.endsWith("v1/")?n=n.slice(0,-3):n.endsWith("v1")&&(n=n.slice(0,-2)),{query:"provider=alibaba",...t?d(t):{},apiKey:a,baseURL:n}}})},E=async a=>(a.fetch??globalThis.fetch)(Z(a.query?`api/voices?${a.query}`:"api/voices",a.baseURL),{headers:R({...a.headers},a.apiKey),method:"GET",signal:a.abortSignal}).then(ee).then(({voices:i})=>i);const he=[{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"}],xe=oe("providers",()=>{const a=le("settings/credentials/providers",{}),{t:i}=de();async function d(e){try{const r=await fetch("https://openrouter.ai/api/v1/models",{headers:{Authorization:`Bearer ${e.apiKey.trim()}`,"Content-Type":"application/json"}});if(!r.ok)throw new Error(`Failed to fetch OpenRouter models: ${r.statusText}`);return(await r.json()).data.map(s=>({id:s.id,name:s.name||s.id,provider:"openrouter-ai",description:s.description||"",contextLength:s.context_length,deprecated:!1}))}catch(r){throw console.error("Error fetching OpenRouter models:",r),r}}const o={"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=>me(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>d(e)},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},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=>A(e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...A(e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"ollama",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.baseUrl}},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",createProvider:e=>A(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}]},validators:{validateProviderConfig:e=>!!e.baseUrl}},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=>S(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...S(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"openai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},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=>ge(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}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"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=>$(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...$(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"google-generative-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},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=>H(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...H(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"xai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},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",createProvider:e=>L(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...L(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"deepseek",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},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=>J(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>he.map(e=>({id:e.model_id,name:e.name,provider:"elevenlabs",description:e.description,contextLength:0,deprecated:!1})),listVoices:async e=>{const r=J(e.apiKey.trim(),e.baseUrl.trim()),l=await E({...r.voice()}),s=l.findIndex(P=>P.name.includes("Aria")),u=l.findIndex(P=>P.name.includes("Bill")),j=s!==-1?s:0,F=u!==-1?u:l.length-1,I=Math.min(j,F),z=Math.max(j,F);return[...l.slice(0,I),...l.slice(z+1),...l.slice(I,z+1)].map(P=>({id:P.id,name:P.name,provider:"elevenlabs",previewURL:P.preview_audio_url,languages:P.languages}))}},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"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",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 r=X(e.apiKey.trim(),e.baseUrl.trim());return(await E({...r.voice({region:e.region})})).map(s=>{var u;return{id:s.id,name:s.name,provider:"microsoft-speech",previewURL:s.preview_audio_url,languages:s.languages,gender:(u=s.labels)==null?void 0:u.gender}})}},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"alibaba-cloud-model-studio":{id:"alibaba-cloud-model-studio",nameKey:"settings.pages.providers.provider.alibaba-cloud-model-studio.title",name:"Alibaba Cloud Model Studio",descriptionKey:"settings.pages.providers.provider.alibaba-cloud-model-studio.description",description:"bailian.console.aliyun.com",iconColor:"i-lobe-icons:alibabacloud",defaultOptions:{baseUrl:"https://unspeech.hyp3r.link/v1/"},createProvider:e=>Y(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listVoices:async e=>{const r=Y(e.apiKey.trim(),e.baseUrl.trim());return(await E({...r.voice()})).map(s=>{var u;return{id:s.id,name:s.name,provider:"alibaba-cloud-model-studio",previewURL:s.preview_audio_url,languages:s.languages,gender:(u=s.labels)==null?void 0:u.gender}})},listModels:async()=>[{id:"cozyvoice-v1",name:"CozyVoice",provider:"alibaba-cloud-model-studio",description:"",contextLength:0,deprecated:!1},{id:"cozyvoice-v2",name:"CozyVoice (New)",provider:"alibaba-cloud-model-studio",description:"",contextLength:0,deprecated:!1}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},volcengine:{id:"volcengine",nameKey:"settings.pages.providers.provider.volcengine.title",name:"settings.pages.providers.provider.volcengine.title",descriptionKey:"settings.pages.providers.provider.volcengine.description",description:"volcengine.com",iconColor:"i-lobe-icons:volcengine",defaultOptions:{baseUrl:"https://unspeech.hyp3r.link/v1/"},createProvider:e=>Q(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listVoices:async e=>{const r=Q(e.apiKey.trim(),e.baseUrl.trim());return(await E({...r.voice()})).map(s=>{var u;return{id:s.id,name:s.name,provider:"volcano-engine",previewURL:s.preview_audio_url,languages:s.languages,gender:(u=s.labels)==null?void 0:u.gender}})},listModels:async()=>[{id:"v1",name:"v1",provider:"volcano-engine",description:"",contextLength:0,deprecated:!1}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl&&!!e.app&&!!e.app.appId}},"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",createProvider:e=>W(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...W(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"together-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"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",createProvider:e=>N(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...N(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"novita-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"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=>G(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...G(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"fireworks-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"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=>S(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...S(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"featherless-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"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",createProvider:e=>_e(e.apiKey.trim(),e.accountId),capabilities:{listModels:async()=>[]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.accountId}},"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=>ve(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}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"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",createProvider:e=>D(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...D(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"mistral-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"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=>V(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...V(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"moonshot-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}}};async function h(e){const r=a.value[e];if(!r)return!1;const l=o[e];return l?await l.validators.validateProviderConfig(r):!1}const t=q({});function n(e){var r;if(!a.value[e]){const l=o[e];a.value[e]={baseUrl:((r=l.defaultOptions)==null?void 0:r.baseUrl)||""}}}Object.keys(o).forEach(n);async function v(){await Promise.all(Object.keys(o).map(async e=>{t.value[e]=await h(e)}))}v(),ce(a,v,{deep:!0});const g=w(()=>Object.keys(o).filter(e=>t.value[e])),c=q({}),y=q({}),x=q({});async function M(e){const r=a.value[e];if(!r)return[];const l=o[e];if(!l)return[];y.value[e]=!0,x.value[e]=null;try{const s=l.capabilities.listModels?await l.capabilities.listModels(r):[];return c.value[e]=s.map(u=>({id:u.id,name:u.name,description:u.description,contextLength:u.contextLength,deprecated:u.deprecated,provider:e})),c.value[e]}catch(s){return console.error(`Error fetching models for ${e}:`,s),x.value[e]=s instanceof Error?s.message:"Unknown error",[]}finally{y.value[e]=!1}}function C(e){return c.value[e]||[]}const B=w(()=>{const e=[];for(const r of g.value)e.push(...c.value[r]||[]);return e});async function ae(){for(const e of g.value)o[e].capabilities.listModels&&await M(e)}function T(e){const r=o[e];if(!r)throw new Error(`Provider metadata for ${e} not found`);return{...r,localizedName:i(r.nameKey,r.name),localizedDescription:i(r.descriptionKey,r.description)}}const ie=w(()=>Object.values(o).map(e=>({...e,localizedName:i(e.nameKey,e.name),localizedDescription:i(e.descriptionKey,e.description),configured:t.value[e.id]||!1})));function O(e){const r=a.value[e];if(!r)throw new Error(`Provider credentials for ${e} not found`);const l=o[e];if(!l)throw new Error(`Provider metadata for ${e} not found`);try{return l.createProvider(r)}catch(s){throw console.error(`Error creating provider instance for ${e}:`,s),s}}const U=w(()=>g.value.map(e=>T(e))),re=w(()=>U.value.filter(e=>{const r=O(e.id);return"chat"in r&&typeof r.chat=="function"})),te=w(()=>U.value.filter(e=>{const r=O(e.id);return"transcription"in r&&typeof r.transcription=="function"})),ne=w(()=>U.value.filter(e=>{const r=O(e.id);return"speech"in r&&typeof r.speech=="function"}));function se(e){return a.value[e]}return{providers:a,getProviderConfig:se,availableProviders:g,configuredProviders:t,providerMetadata:o,getProviderMetadata:T,allProvidersMetadata:ie,initializeProvider:n,validateProvider:h,availableModels:c,isLoadingModels:y,modelLoadError:x,fetchModelsForProvider:M,getModelsForProvider:C,allAvailableModels:B,loadModelsForConfiguredProviders:ae,getProviderInstance:O,availableProvidersMetadata:U,availableTextGenerationsProvidersMetadata:re,availableAudioSpeechProvidersMetadata:ne,availableAudioTranscriptionProvidersMetadata:te}});export{b as l,xe as u}; diff --git a/assets/queue-D7nBskKs.js b/assets/queue-Bfgtzwnz.js similarity index 90% rename from assets/queue-D7nBskKs.js rename to assets/queue-Bfgtzwnz.js index ed2e14bbf6a24cfcaf896277679b8838a7e9439d..6f02aa3d4bbc1c402eb1b95629b23d841d38647e 100644 --- a/assets/queue-D7nBskKs.js +++ b/assets/queue-Bfgtzwnz.js @@ -1 +1 @@ -import{u as o}from"./queue-CEzllKo3.js";import{d as v,g as h,l as g,c as k,o as w,a as I}from"./index-D8Nm21zW.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-DeGTso58.js";import{d as v,g as h,l as g,c as k,o as w,a as I}from"./index-_NYoebRU.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/queue-CEzllKo3.js b/assets/queue-DeGTso58.js similarity index 91% rename from assets/queue-CEzllKo3.js rename to assets/queue-DeGTso58.js index ed5ec1ff225959f9f5c721d3ee74b96e7d22e4d7..60ad3a8b146f9761d6266290d4e9c778dcda9e5d 100644 --- a/assets/queue-CEzllKo3.js +++ b/assets/queue-DeGTso58.js @@ -1 +1 @@ -import{g as l}from"./index-D8Nm21zW.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-_NYoebRU.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/queues-DJEZsGUG.js b/assets/queues-R1s0xq50.js similarity index 84% rename from assets/queues-DJEZsGUG.js rename to assets/queues-R1s0xq50.js index cad3a50236521329a24af12ea9f5afc14a311735..57ad6c10ec595523b68ef14aff6d9c6c9c836ac1 100644 --- a/assets/queues-DJEZsGUG.js +++ b/assets/queues-R1s0xq50.js @@ -1 +1 @@ -import{j as i}from"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import{u as s}from"./queue-CEzllKo3.js";import{g as d}from"./index-D8Nm21zW.js";const l="<|llm_inference_end|>";function y(o){function t(e){for(const n of i)if(e.includes(n))return{ok:!0,emotion:n};return{ok:!1,emotion:""}}return s({handlers:[async e=>{if(i.includes(e.data)){e.emit("emotion",e.data),await o.add(e.data);return}{const{ok:n,emotion:a}=t(e.data);n&&(e.emit("emotion",a),await o.add(a))}}]})}function k(){function o(e){if(!/<\|DELAY:\d+\|>/i.test(e))return{ok:!1,delay:0};const n=/<\|DELAY:(\d+)\|>/i.exec(e),a=n==null?void 0:n[1];if(!a)return{ok:!1,delay:0};const r=Number.parseFloat(a);return r<=0||Number.isNaN(r)?{ok:!0,delay:0}:{ok:!0,delay:r}}function t(e){return new Promise(n=>setTimeout(n,e))}return s({handlers:[async e=>{const{ok:n,delay:a}=o(e.data);n&&(e.emit("delay",a),await t(a*1e3))}]})}function p(o){const t=d("");return s({handlers:[async e=>{if(e.data===l){const a=t.value.trim();a&&await o.add(a),t.value="";return}const n=/[.?!]/;for(t.value+=e.data;t.value;){const a=n.exec(t.value);if(!a||typeof a.index>"u")break;const r=t.value.slice(0,a.index+1),u=t.value.slice(a.index+1);await o.add(r),t.value=u}}]})}export{y as a,k as b,l,p as u}; +import{j as i}from"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import{u as s}from"./queue-DeGTso58.js";import{g as d}from"./index-_NYoebRU.js";const l="<|llm_inference_end|>";function y(o){function t(e){for(const n of i)if(e.includes(n))return{ok:!0,emotion:n};return{ok:!1,emotion:""}}return s({handlers:[async e=>{if(i.includes(e.data)){e.emit("emotion",e.data),await o.add(e.data);return}{const{ok:n,emotion:a}=t(e.data);n&&(e.emit("emotion",a),await o.add(a))}}]})}function k(){function o(e){if(!/<\|DELAY:\d+\|>/i.test(e))return{ok:!1,delay:0};const n=/<\|DELAY:(\d+)\|>/i.exec(e),a=n==null?void 0:n[1];if(!a)return{ok:!1,delay:0};const r=Number.parseFloat(a);return r<=0||Number.isNaN(r)?{ok:!0,delay:0}:{ok:!0,delay:r}}function t(e){return new Promise(n=>setTimeout(n,e))}return s({handlers:[async e=>{const{ok:n,delay:a}=o(e.data);n&&(e.emit("delay",a),await t(a*1e3))}]})}function p(o){const t=d("");return s({handlers:[async e=>{if(e.data===l){const a=t.value.trim();a&&await o.add(a),t.value="";return}const n=/[.?!]/;for(t.value+=e.data;t.value;){const a=n.exec(t.value);if(!a||typeof a.index>"u")break;const r=t.value.slice(0,a.index+1),u=t.value.slice(a.index+1);await o.add(r),t.value=u}}]})}export{y as a,k as b,l,p as u}; diff --git a/assets/speech--gNAMctx.js b/assets/speech-BYIjhxox.js similarity index 97% rename from assets/speech--gNAMctx.js rename to assets/speech-BYIjhxox.js index 5e88b607e5b61c9c4140175204c8af54191e1d81..f202d69c285f1842ab064eb612756b94ff5dcdd9 100644 --- a/assets/speech--gNAMctx.js +++ b/assets/speech-BYIjhxox.js @@ -1 +1 @@ -import{d as D,g as V,l as ae,w as X,m as re,c as u,o as i,bx as H,by as K,a as e,n as ve,z as $,bI as W,bJ as Y,A as Q,bA as me,C as P,D as y,b as _,y as I,bn as Z,h as pe,c8 as fe,bE as ne,x as G,q as ge,s as te,H as xe,bw as be,u as t,bo as he,ad as F,bH as ye}from"./index-D8Nm21zW.js";import{_ as se,a as ke}from"./TestDummyMarker.vue_vue_type_script_setup_true_lang-CG5q9Jpo.js";import{_ as we}from"./FieldInput.vue_vue_type_script_setup_true_lang-BNHdvI3g.js";import{_ as le}from"./FieldRange.vue_vue_type_script_setup_true_lang-B670Jjy-.js";import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import{R as _e,a as Se}from"./RadioCardDetailManySelect-6Dh1XQsR.js";import{_ as Ve}from"./Textarea.vue_vue_type_script_setup_true_lang-CP4Ap1fe.js";import{_ as Me}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-CL9MLblt.js";import{_ as Ce}from"./Input.vue_vue_type_script_setup_true_lang-DacRzqGb.js";import{_ as $e}from"./PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js";import{u as Pe}from"./providers-DUDq6kdm.js";import{u as Ue,g as Le}from"./speech-B27BwGQ-.js";import{b as oe}from"./route-block-B_A1xBdJ.js";import"./Basic.vue_vue_type_script_setup_true_lang-CrXWH1a1.js";import"./index-Be1NqeGb.js";const qe=D({__name:"AudioSpectrum",props:{stream:null,bars:{default:32},minFreq:{default:60},maxFreq:{default:4e3}},setup(o){const l=o,g=V(Array.from({length:l.bars}).fill(0));ae(()=>{m()}),X(()=>l.stream,()=>{m()});function m(){if(!l.stream)return;const c=new(window.AudioContext||window.webkitAudioContext),f=c.createMediaStreamSource(l.stream),v=c.createAnalyser();v.fftSize=2048,f.connect(v);const b=v.frequencyBinCount,M=new Uint8Array(b),p=c.sampleRate/v.fftSize,k=Math.floor(l.minFreq/p),U=Math.floor(l.maxFreq/p),q=U-k,E=Math.floor(q/l.bars),T=()=>{try{requestAnimationFrame(T),v.getByteFrequencyData(M);const A=Array.from({length:l.bars}).fill(0);for(let z=0;zre(c.$slots,"default",{frequencies:g.value})}}),Ae={"h-full":"",flex:"","items-center":"","gap-1":""},Ee=5,Re=D({__name:"AudioSpectrumVisualizer",props:{frequencies:null,barsClass:null},setup(o){const l=o;function g(c,f){return .1+(1-.1)*(c/f)}function m(c,f){const v=g(f,l.frequencies.length);return Math.min(100,Math.max(10,c*100*Ee*v))}return(c,f)=>(i(),u("div",Ae,[(i(!0),u(H,null,K(o.frequencies,(v,b)=>(i(),u("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:$(o.barsClass),style:ve({height:`${m(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"},Ie={key:0,class:"i-solar:pause-circle-bold-duotone text-xl text-neutral-400 dark:text-neutral-500"},Ne={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"},Je={relative:""},Ge={key:0,class:"h-16 px-3 pb-2"},Ye=D({__name:"VoiceCard",props:W({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:W(["togglePlayback"],["update:voice-id","update:custom-voice-name"]),setup(o,{emit:l}){const g=o,m=l,c=Y(o,"voice-id"),f=Y(o,"custom-voice-name");function v(h){return h.previewURL||h.preview_audio_url}function b(h){var k,U,q;const p=[];if((k=h.labels)!=null&&k.gender&&p.push(h.labels.gender),(U=h.labels)!=null&&U.age&&p.push(h.labels.age),(q=h.labels)!=null&&q.accent&&p.push(h.labels.accent),h.languages&&h.languages.length>0){const E=h.languages.map(T=>T.name).join(", ");p.push(E)}return p}function M(){m("togglePlayback",g.voice)}return(h,p)=>(i(),u("label",{border:"2px solid",class:$(["scroll-snap-align-start form_voice-card relative flex flex-col overflow-hidden rounded-xl",[c.value===g.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===g.voice.id?"form_voice-card-active":""]]),transition:"all duration-200 ease-in-out"},[e("div",Te,[e("div",ze,[Q(e("input",{"onUpdate:modelValue":p[0]||(p[0]=k=>c.value=k),checked:c.value===g.voice.id,type:"radio",name:o.name,value:g.voice.id,class:"absolute cursor-pointer opacity-0"},null,8,Be),[[me,c.value]]),e("div",Fe,[e("div",{class:$(["size-5 border-2 rounded-full transition-colors duration-200",[c.value===g.voice.id?"border-primary-500 dark:border-primary-400":"border-neutral-300 dark:border-neutral-600"]])},[e("div",{class:$(["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===g.voice.id?"opacity-100 bg-primary-500 dark:bg-primary-400":"opacity-0"]])},null,2)],2)]),v(o.voice)?(i(),u("button",{key:0,absolute:"","right-0":"",top:"0","z-100":"",class:$(["translate-x-[-50%] translate-y-[50%]",[o.currentlyPlayingId===o.voice.id?"text-white dark:text-white":""]]),onClick:M},[o.currentlyPlayingId===o.voice.id?(i(),u("div",Ie)):(i(),u("div",Ne))],2)):(i(),u("div",De," No preview available ")),e("div",je,[e("div",Oe,[e("span",{class:$(["line-clamp-1 font-medium",[c.value===o.voice.id?"text-neutral-700 dark:text-neutral-300":"text-neutral-700 dark:text-neutral-400"]])},y(o.voice.name),3)]),b(o.voice).length>0?(i(),u("div",Qe,[(i(!0),u(H,null,K(b(o.voice),(k,U)=>(i(),u("span",{key:U,class:$(["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"]])},y(k),3))),128))])):P("",!0),o.voice.customizable&&c.value===o.voice.id?(i(),u("div",He,[_(Ce,{modelValue:f.value,"onUpdate:modelValue":p[1]||(p[1]=k=>f.value=k),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"])])):P("",!0),o.voice.description?(i(),u("div",{key:2,class:$(["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"]])},y(o.voice.description),3)):P("",!0)])])]),e("div",Je,[_(Me,null,{default:I(()=>[o.showVisualizer&&o.currentlyPlayingId===o.voice.id&&o.audioStream?(i(),u("div",Ge,[_(qe,{stream:o.audioStream,bars:24,"min-freq":60,"max-freq":4e3},{default:I(({frequencies:k})=>[_(Re,{frequencies:k,"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"])])):P("",!0)]),_:1})])],2))}}),Ke=Z(Ye,[["__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=D({__name:"VoiceCardManySelect",props:W({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,g=V(!1),m=V(),c=V(new Map),f=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 p=Y(o,"search-query"),k=Y(o,"voice-id"),U=pe(()=>{if(!p.value)return l.voices;const a=p.value.toLowerCase();return l.voices.filter(r=>{const n=r.name.toLowerCase().includes(a),x=r.description&&r.description.toLowerCase().includes(a),w=r.tags&&r.tags.some(S=>S.toLowerCase().includes(a)),L=r.labels&&Object.values(r.labels).some(S=>typeof S=="string"&&S.toLowerCase().includes(a)),C=r.languages&&r.languages.some(S=>S.name.toLowerCase().includes(a)||S.code.toLowerCase().includes(a));return n||x||w||L||C})});function q(a){return a.previewURL||a.preview_audio_url}function E(a){const r=q(a);if(!r)return null;if(c.value.has(a.id))return c.value.get(a.id)||null;const n=new Audio(r);return n.crossOrigin="anonymous",n.preload="auto",n.addEventListener("ended",()=>{if(m.value===a.id){m.value=void 0;const x=f.value.get(a.id);x&&(x.getTracks().forEach(w=>w.stop()),f.value.delete(a.id))}}),c.value.set(a.id,n),n}function T(a,r){try{if(f.value.has(r))return f.value.get(r)||null;const n=h();if(b.value.has(r)){const C=b.value.get(r),S=n.createMediaStreamDestination();C.connect(S);const j=S.stream;return f.value.set(r,j),j}const x=n.createMediaElementSource(a);b.value.set(r,x),x.connect(n.destination);const w=n.createMediaStreamDestination();x.connect(w);const L=w.stream;return f.value.set(r,L),L}catch(n){return console.error("Failed to create audio stream for visualizer:",n),null}}function A(a){try{if(!q(a))return;const n=E(a);if(!n)return;if(m.value===a.id){n.pause(),m.value=void 0;const x=f.value.get(a.id);x&&(x.getTracks().forEach(w=>w.stop()),f.value.delete(a.id));return}if(m.value){const x=c.value.get(m.value);x&&x.pause();const w=f.value.get(m.value);w&&(w.getTracks().forEach(L=>L.stop()),f.value.delete(m.value))}l.showVisualizer&&!f.value.has(a.id)&&T(n,a.id),n.currentTime=0,n.play().catch(x=>{console.error("Failed to play audio:",x)}),m.value=a.id}catch(r){console.error(r),m.value=void 0}}function z(){c.value.forEach(a=>{a.pause(),a.src=""}),c.value.clear(),f.value.forEach(a=>{a.getTracks().forEach(r=>r.stop())}),f.value.clear(),v.value.forEach(a=>{a.state!=="closed"&&a.close()}),v.value.clear(),b.value.clear(),m.value=void 0}X(p,()=>{if(m.value){const a=c.value.get(m.value);a&&a.pause();const r=f.value.get(m.value);r&&(r.getTracks().forEach(n=>n.stop()),f.value.delete(m.value)),m.value=void 0}}),fe(z);const B=V("");return(a,r)=>(i(),u("div",We,[o.searchable?(i(),u("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)),Q(e("input",{"onUpdate:modelValue":r[0]||(r[0]=n=>p.value=n),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),[[ne,p.value]])])):P("",!0),e("div",et,[p.value?(i(),u("div",tt,y(o.searchResultsText.replace("{count}",U.value.length.toString()).replace("{total}",o.voices.length.toString())),1)):P("",!0),p.value&&U.value.length===0?(i(),u("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,y(o.searchNoResultsTitle),1),e("span",at,y(o.searchNoResultsDescription.replace("{query}",p.value)),1)])])):P("",!0),e("div",rt,[e("div",{class:$(["scrollbar-hide grid auto-cols-[350px] grid-flow-col max-h-[calc(100dvh-7lh)] gap-4 overflow-x-auto",[g.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"}},[(i(!0),u(H,null,K(U.value,n=>(i(),G(Ke,{key:n.id,"voice-id":k.value,"onUpdate:voiceId":r[1]||(r[1]=x=>k.value=x),"custom-voice-name":B.value,"onUpdate:customVoiceName":r[2]||(r[2]=x=>B.value=x),name:"voice",voice:n,"currently-playing-id":m.value,"custom-input-placeholder":o.customInputPlaceholder,"show-visualizer":o.showVisualizer,"audio-stream":f.value.get(n.id),onTogglePlayback:A},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:$([g.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:$([g.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]=n=>g.value=!g.value)},[e("span",null,y(g.value?o.collapseButtonText:o.expandButtonText),1),e("div",{class:$([g.value?"rotate-180":"","text-lg"]),"i-solar:alt-arrow-down-bold-duotone":"",transition:"transform duration-200 ease-in-out"},null,2)],2)],2)])])]))}}),it=Z(nt,[["__scopeId","data-v-070104a7"]]),ut=D({__name:"Skeleton",props:{animation:{default:"pulse"}},setup(o){const l=o;return(g,m)=>(i(),u("div",{class:$(["skeleton",l.animation!=="none"?`skeleton-${l.animation}`:""]),bg:"neutral-200 dark:neutral-800",overflow:"hidden"},[re(g.$slots,"default",{},void 0,!0)],2))}}),O=Z(ut,[["__scopeId","data-v-f404da2a"]]),dt={flex:"~ col md:row gap-6"},ct={bg:"neutral-100 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-4",class:"w-full md:w-[40%]"},vt={flex:"~ col gap-4"},mt={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},pt={text:"neutral-400 dark:neutral-500"},ft={"max-w-full":""},gt={key:0,flex:"~ row gap-4",style:{"scrollbar-width":"none"},"min-w-0":"","of-x-scroll":"","scroll-smooth":"",role:"radiogroup"},xt={key:1},bt={key:0},ht={flex:"~ col gap-4"},yt={class:"text-lg md:text-2xl"},kt={text:"neutral-400 dark:neutral-400"},wt={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"},St={class:"flex flex-col"},Vt={class:"font-medium"},Mt={class:"text-sm text-red-600 dark:text-red-400"},Ct={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"},$t={class:"flex flex-col"},Pt={class:"font-medium"},Ut={class:"text-sm text-amber-600 dark:text-amber-400"},Lt={key:0},qt={flex:"~ col gap-4"},At={key:0},Et={class:"flex flex-col gap-4"},Rt={flex:"~ row gap-4"},Tt={key:1,class:"space-y-6"},zt={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"},Bt={class:"flex flex-col"},Ft={class:"text-sm text-red-600 dark:text-red-400"},It={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"},Nt={flex:"~ col gap-4"},Dt={key:4,class:"mt-2 space-y-6"},jt={key:0},Ot={flex:"~ col gap-4"},Qt={flex:"~ col gap-6",class:"w-full md:w-[60%]"},Ht={"w-full":"","rounded-xl":""},Jt={class:"mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400","w-full":""},Gt={class:"inline-flex items-center gap-4"},Yt={flex:"~ col gap-4"},Kt={flex:"~ row","gap-4":""},Wt=["disabled"],Xt={flex:"~ row","items-center":"","gap-2":""},Zt=["src"],es={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},ts=D({__name:"speech",setup(o){const{t:l}=ge(),g=Pe(),m=Ue(),{availableProviders:c,availableAudioSpeechProvidersMetadata:f}=te(g),{activeSpeechProvider:v,activeSpeechModel:b,activeSpeechVoice:M,activeSpeechVoiceId:h,pitch:p,isLoadingSpeechProviderVoices:k,supportsModelListing:U,providerModels:q,isLoadingActiveProviderModels:E,activeProviderModelError:T,modelSearchQuery:A,speechProviderError:z,ssmlEnabled:B,availableVoices:a}=te(m),r=V(""),n=V(!1),x=V("Hello, my name is AI Assistant"),w=V(""),L=V(!1),C=V(""),S=V(null),j=V("");ae(async()=>{await m.loadVoicesForProvider(v.value),await g.loadModelsForConfiguredProviders()}),X(v,async()=>{await m.loadVoicesForProvider(v.value),await g.loadModelsForConfiguredProviders()});async function ie(){if(!x.value.trim()&&!n.value||n.value&&!w.value.trim())return;if(!b.value){console.error("No model selected");return}if(!M.value){console.error("No voice selected");return}const R=g.getProviderInstance(v.value);if(!R){console.error("Failed to initialize speech provider");return}const s=g.getProviderConfig(v.value);L.value=!0,j.value="";try{C.value&&ee();const N=n.value?w.value:m.generateSSML(x.value,M.value,{...s,pitch:p.value}),J=await Le({...R.speech(b.value,s),input:N,voice:M.value.id});C.value=URL.createObjectURL(new Blob([J])),setTimeout(()=>{S.value&&S.value.play()},100)}catch(N){console.error("Error generating speech:",N),j.value=N instanceof Error?N.message:"An unknown error occurred"}finally{L.value=!1}}function ee(){S.value&&(S.value.pause(),S.value.currentTime=0),C.value&&(URL.revokeObjectURL(C.value),C.value="")}xe(()=>{C.value&&URL.revokeObjectURL(C.value)});function ue(R){M.value={id:R,name:R,description:R,previewURL:R,languages:[{code:"en",title:"English"}],provider:v.value,gender:"male"}}function de(R){b.value=R}return(R,s)=>{var J;const N=be("motion");return i(),u(H,null,[_(t($e),{title:t(l)("settings.pages.modules.speech.title"),subtitle:t(l)("settings.pages.modules.title")},null,8,["title","subtitle"]),e("div",dt,[e("div",ct,[e("div",null,[e("div",vt,[e("div",null,[e("h2",mt,y(t(l)("settings.pages.modules.speech.sections.section.provider-voice-selection.title")),1),e("div",pt,[e("span",null,y(t(l)("settings.pages.modules.speech.sections.section.provider-voice-selection.description")),1)])]),e("div",ft,[t(c).length>0?(i(),u("fieldset",gt,[(i(!0),u(H,null,K(t(f),d=>(i(),G(t(Se),{id:d.id,key:d.id,modelValue:t(v),"onUpdate:modelValue":s[0]||(s[0]=ce=>F(v)?v.value=ce:null),name:"speech-provider",value:d.id,title:d.localizedName,description:d.localizedDescription},null,8,["id","modelValue","value","title","description"]))),128))])):(i(),u("div",xt,[_(t(he),{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[13]||(s[13]=[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(U)?(i(),u("div",bt,[e("div",ht,[e("div",null,[e("h2",yt,y(t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),e("div",kt,[e("span",null,y(t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),t(E)?(i(),u("div",wt,[s[14]||(s[14]=e("div",{class:"mr-2 animate-spin"},[e("div",{"i-solar:spinner-line-duotone":"","text-xl":""})],-1)),e("span",null,y(t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.loading")),1)])):t(T)?(i(),u("div",_t,[s[15]||(s[15]=e("div",{"i-solar:close-circle-line-duotone":"",class:"text-2xl text-red-500 dark:text-red-400"},null,-1)),e("div",St,[e("span",Vt,y(t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.error")),1),e("span",Mt,y(t(T)),1)])])):t(q).length===0&&!t(E)?(i(),u("div",Ct,[s[16]||(s[16]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),e("div",$t,[e("span",Pt,y(t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models")),1),e("span",Ut,y(t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description")),1)])])):t(q).length>0?(i(),G(t(_e),{key:3,modelValue:t(b),"onUpdate:modelValue":s[1]||(s[1]=d=>F(b)?b.value=d:null),"search-query":t(A),"onUpdate:searchQuery":s[2]||(s[2]=d=>F(A)?A.value=d:null),items:t(q),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(A)}),"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":de},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"])):P("",!0)])])):P("",!0)])]),t(v)?(i(),u("div",Lt,[e("div",qt,[s[27]||(s[27]=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(k)?(i(),u("div",At,[e("div",Et,[_(t(O),{class:"w-full rounded-lg p-2.5 text-sm"},{default:I(()=>s[17]||(s[17]=[e("div",{class:"h-1lh"},null,-1)])),_:1}),e("div",Rt,[_(t(O),{class:"w-full rounded-lg p-4 text-sm"},{default:I(()=>s[18]||(s[18]=[e("div",{class:"h-1lh"},null,-1)])),_:1}),_(t(O),{class:"w-full rounded-lg p-4 text-sm"},{default:I(()=>s[19]||(s[19]=[e("div",{class:"h-1lh"},null,-1)])),_:1}),_(t(O),{class:"w-full rounded-lg p-4 text-sm"},{default:I(()=>s[20]||(s[20]=[e("div",{class:"h-1lh"},null,-1)])),_:1})]),_(t(O),{class:"w-full rounded-lg p-3 text-sm"},{default:I(()=>s[21]||(s[21]=[e("div",{class:"h-1lh"},null,-1)])),_:1})])])):t(a)[t(v)]&&t(a)[t(v)].length>0?(i(),u("div",Tt,[_(t(it),{"search-query":r.value,"onUpdate:searchQuery":s[3]||(s[3]=d=>r.value=d),"voice-id":t(h),"onUpdate:voiceId":s[4]||(s[4]=d=>F(h)?h.value=d:null),voices:(J=t(a)[t(v)])==null?void 0:J.map(d=>({id:d.id,name:d.name,description:d.description,previewURL:d.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":ue},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(z)?(i(),u("div",zt,[s[23]||(s[23]=e("div",{"i-solar:close-circle-line-duotone":"",class:"text-2xl text-red-500 dark:text-red-400"},null,-1)),e("div",Bt,[s[22]||(s[22]=e("span",{class:"font-medium"},"Error loading voices",-1)),e("span",Ft,y(t(z)),1)])])):(i(),u("div",It,s[24]||(s[24]=[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",Nt,[_(t(le),{modelValue:t(p),"onUpdate:modelValue":s[5]||(s[5]=d=>F(p)?p.value=d:null),label:"Pitch",description:"Tune the pitch of the voice",min:-100,max:100,step:1,"format-value":d=>`${d}%`},null,8,["modelValue","format-value"]),_(t(se),{modelValue:t(B),"onUpdate:modelValue":s[6]||(s[6]=d=>F(B)?B.value=d: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?(i(),u("div",Dt,[_(t(we),{modelValue:t(h),"onUpdate:modelValue":s[7]||(s[7]=d=>F(h)?h.value=d: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"?(i(),u("div",jt,[s[26]||(s[26]=e("label",{class:"mb-1 block text-sm font-medium"}," Model ",-1)),Q(e("select",{"onUpdate:modelValue":s[8]||(s[8]=d=>F(b)?b.value=d:null),class:"w-full border border-neutral-300 rounded bg-white px-3 py-2 dark:border-neutral-700 dark:bg-neutral-900"},s[25]||(s[25]=[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),[[ye,t(b)]])])):P("",!0),e("div",Ot,[_(t(le),{modelValue:t(p),"onUpdate:modelValue":s[9]||(s[9]=d=>F(p)?p.value=d:null),label:"Pitch",description:"Tune the pitch of the voice",min:-100,max:100,step:1,"format-value":d=>`${d}%`},null,8,["modelValue","format-value"])])])):P("",!0)])])):P("",!0)]),e("div",Qt,[e("div",Ht,[e("h2",Jt,[e("div",Gt,[_(t(ke)),e("div",null,y(t(l)("settings.pages.providers.provider.elevenlabs.playground.title")),1)])]),e("div",Yt,[_(t(se),{modelValue:n.value,"onUpdate:modelValue":s[10]||(s[10]=d=>n.value=d),label:"Use Custom SSML",description:"Enable to input raw SSML instead of plain text"},null,8,["modelValue"]),n.value?Q((i(),u("textarea",{key:1,"onUpdate:modelValue":s[12]||(s[12]=d=>w.value=d),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)),[[ne,w.value]]):(i(),G(t(Ve),{key:0,modelValue:x.value,"onUpdate:modelValue":s[11]||(s[11]=d=>x.value=d),"h-24":"","w-full":"",placeholder:t(l)("settings.pages.providers.provider.elevenlabs.playground.fields.field.input.placeholder")},null,8,["modelValue","placeholder"])),e("div",Kt,[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:L.value||!x.value.trim()&&!n.value||n.value&&!w.value.trim()||!t(M),class:$({"opacity-50 cursor-not-allowed":L.value||!x.value.trim()&&!n.value||n.value&&!w.value.trim()||!t(M)}),bg:"neutral-700 dark:neutral-300",onClick:ie},[e("div",Xt,[s[28]||(s[28]=e("div",{"i-solar:play-circle-bold-duotone":""},null,-1)),e("span",null,y(L.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,Wt),C.value?(i(),u("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:ee},s[29]||(s[29]=[e("div",{flex:"~ row","items-center":"","gap-2":""},[e("div",{"i-solar:stop-circle-bold-duotone":""}),e("span",null,"Stop")],-1)]))):P("",!0)]),C.value?(i(),u("audio",{key:2,ref_key:"audioPlayer",ref:S,src:C.value,controls:"",class:"mt-2 w-full"},null,8,Zt)):P("",!0)])])])]),Q((i(),u("div",es,s[30]||(s[30]=[e("div",{text:"60","i-solar:user-speak-rounded-bold-duotone":""},null,-1)]))),[[N]])],64)}}});typeof oe=="function"&&oe(ts);export{ts as default}; +import{d as D,g as V,l as ae,w as X,m as re,c as u,o as i,bx as H,by as K,a as e,n as ve,z as $,bI as W,bJ as Y,A as Q,bA as me,C as P,D as y,b as _,y as I,bn as Z,h as pe,c8 as fe,bE as ne,x as G,q as ge,s as te,H as xe,bw as be,u as t,bo as he,ad as F,bH as ye}from"./index-_NYoebRU.js";import{_ as se,a as ke}from"./TestDummyMarker.vue_vue_type_script_setup_true_lang-7UKgQXIZ.js";import{_ as we}from"./FieldInput.vue_vue_type_script_setup_true_lang-BHH_IiH5.js";import{_ as le}from"./FieldRange.vue_vue_type_script_setup_true_lang-BeH9VX4J.js";import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import{R as _e,a as Se}from"./RadioCardDetailManySelect-CC_vBTye.js";import{_ as Ve}from"./Textarea.vue_vue_type_script_setup_true_lang-akwsm8zZ.js";import{_ as Me}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-Cx39i7VD.js";import{_ as Ce}from"./Input.vue_vue_type_script_setup_true_lang-DXXJ9lLc.js";import{_ as $e}from"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js";import{u as Pe}from"./providers-Bbs_o2SI.js";import{u as Ue,g as Le}from"./speech-DTX8fpM-.js";import{b as oe}from"./route-block-B_A1xBdJ.js";import"./Basic.vue_vue_type_script_setup_true_lang-C4n90OG-.js";import"./index-Be1NqeGb.js";const qe=D({__name:"AudioSpectrum",props:{stream:null,bars:{default:32},minFreq:{default:60},maxFreq:{default:4e3}},setup(o){const l=o,g=V(Array.from({length:l.bars}).fill(0));ae(()=>{m()}),X(()=>l.stream,()=>{m()});function m(){if(!l.stream)return;const c=new(window.AudioContext||window.webkitAudioContext),f=c.createMediaStreamSource(l.stream),v=c.createAnalyser();v.fftSize=2048,f.connect(v);const b=v.frequencyBinCount,M=new Uint8Array(b),p=c.sampleRate/v.fftSize,k=Math.floor(l.minFreq/p),U=Math.floor(l.maxFreq/p),q=U-k,E=Math.floor(q/l.bars),T=()=>{try{requestAnimationFrame(T),v.getByteFrequencyData(M);const A=Array.from({length:l.bars}).fill(0);for(let z=0;zre(c.$slots,"default",{frequencies:g.value})}}),Ae={"h-full":"",flex:"","items-center":"","gap-1":""},Ee=5,Re=D({__name:"AudioSpectrumVisualizer",props:{frequencies:null,barsClass:null},setup(o){const l=o;function g(c,f){return .1+(1-.1)*(c/f)}function m(c,f){const v=g(f,l.frequencies.length);return Math.min(100,Math.max(10,c*100*Ee*v))}return(c,f)=>(i(),u("div",Ae,[(i(!0),u(H,null,K(o.frequencies,(v,b)=>(i(),u("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:$(o.barsClass),style:ve({height:`${m(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"},Ie={key:0,class:"i-solar:pause-circle-bold-duotone text-xl text-neutral-400 dark:text-neutral-500"},Ne={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"},Je={relative:""},Ge={key:0,class:"h-16 px-3 pb-2"},Ye=D({__name:"VoiceCard",props:W({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:W(["togglePlayback"],["update:voice-id","update:custom-voice-name"]),setup(o,{emit:l}){const g=o,m=l,c=Y(o,"voice-id"),f=Y(o,"custom-voice-name");function v(h){return h.previewURL||h.preview_audio_url}function b(h){var k,U,q;const p=[];if((k=h.labels)!=null&&k.gender&&p.push(h.labels.gender),(U=h.labels)!=null&&U.age&&p.push(h.labels.age),(q=h.labels)!=null&&q.accent&&p.push(h.labels.accent),h.languages&&h.languages.length>0){const E=h.languages.map(T=>T.name).join(", ");p.push(E)}return p}function M(){m("togglePlayback",g.voice)}return(h,p)=>(i(),u("label",{border:"2px solid",class:$(["scroll-snap-align-start form_voice-card relative flex flex-col overflow-hidden rounded-xl",[c.value===g.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===g.voice.id?"form_voice-card-active":""]]),transition:"all duration-200 ease-in-out"},[e("div",Te,[e("div",ze,[Q(e("input",{"onUpdate:modelValue":p[0]||(p[0]=k=>c.value=k),checked:c.value===g.voice.id,type:"radio",name:o.name,value:g.voice.id,class:"absolute cursor-pointer opacity-0"},null,8,Be),[[me,c.value]]),e("div",Fe,[e("div",{class:$(["size-5 border-2 rounded-full transition-colors duration-200",[c.value===g.voice.id?"border-primary-500 dark:border-primary-400":"border-neutral-300 dark:border-neutral-600"]])},[e("div",{class:$(["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===g.voice.id?"opacity-100 bg-primary-500 dark:bg-primary-400":"opacity-0"]])},null,2)],2)]),v(o.voice)?(i(),u("button",{key:0,absolute:"","right-0":"",top:"0","z-100":"",class:$(["translate-x-[-50%] translate-y-[50%]",[o.currentlyPlayingId===o.voice.id?"text-white dark:text-white":""]]),onClick:M},[o.currentlyPlayingId===o.voice.id?(i(),u("div",Ie)):(i(),u("div",Ne))],2)):(i(),u("div",De," No preview available ")),e("div",je,[e("div",Oe,[e("span",{class:$(["line-clamp-1 font-medium",[c.value===o.voice.id?"text-neutral-700 dark:text-neutral-300":"text-neutral-700 dark:text-neutral-400"]])},y(o.voice.name),3)]),b(o.voice).length>0?(i(),u("div",Qe,[(i(!0),u(H,null,K(b(o.voice),(k,U)=>(i(),u("span",{key:U,class:$(["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"]])},y(k),3))),128))])):P("",!0),o.voice.customizable&&c.value===o.voice.id?(i(),u("div",He,[_(Ce,{modelValue:f.value,"onUpdate:modelValue":p[1]||(p[1]=k=>f.value=k),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"])])):P("",!0),o.voice.description?(i(),u("div",{key:2,class:$(["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"]])},y(o.voice.description),3)):P("",!0)])])]),e("div",Je,[_(Me,null,{default:I(()=>[o.showVisualizer&&o.currentlyPlayingId===o.voice.id&&o.audioStream?(i(),u("div",Ge,[_(qe,{stream:o.audioStream,bars:24,"min-freq":60,"max-freq":4e3},{default:I(({frequencies:k})=>[_(Re,{frequencies:k,"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"])])):P("",!0)]),_:1})])],2))}}),Ke=Z(Ye,[["__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=D({__name:"VoiceCardManySelect",props:W({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,g=V(!1),m=V(),c=V(new Map),f=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 p=Y(o,"search-query"),k=Y(o,"voice-id"),U=pe(()=>{if(!p.value)return l.voices;const a=p.value.toLowerCase();return l.voices.filter(r=>{const n=r.name.toLowerCase().includes(a),x=r.description&&r.description.toLowerCase().includes(a),w=r.tags&&r.tags.some(S=>S.toLowerCase().includes(a)),L=r.labels&&Object.values(r.labels).some(S=>typeof S=="string"&&S.toLowerCase().includes(a)),C=r.languages&&r.languages.some(S=>S.name.toLowerCase().includes(a)||S.code.toLowerCase().includes(a));return n||x||w||L||C})});function q(a){return a.previewURL||a.preview_audio_url}function E(a){const r=q(a);if(!r)return null;if(c.value.has(a.id))return c.value.get(a.id)||null;const n=new Audio(r);return n.crossOrigin="anonymous",n.preload="auto",n.addEventListener("ended",()=>{if(m.value===a.id){m.value=void 0;const x=f.value.get(a.id);x&&(x.getTracks().forEach(w=>w.stop()),f.value.delete(a.id))}}),c.value.set(a.id,n),n}function T(a,r){try{if(f.value.has(r))return f.value.get(r)||null;const n=h();if(b.value.has(r)){const C=b.value.get(r),S=n.createMediaStreamDestination();C.connect(S);const j=S.stream;return f.value.set(r,j),j}const x=n.createMediaElementSource(a);b.value.set(r,x),x.connect(n.destination);const w=n.createMediaStreamDestination();x.connect(w);const L=w.stream;return f.value.set(r,L),L}catch(n){return console.error("Failed to create audio stream for visualizer:",n),null}}function A(a){try{if(!q(a))return;const n=E(a);if(!n)return;if(m.value===a.id){n.pause(),m.value=void 0;const x=f.value.get(a.id);x&&(x.getTracks().forEach(w=>w.stop()),f.value.delete(a.id));return}if(m.value){const x=c.value.get(m.value);x&&x.pause();const w=f.value.get(m.value);w&&(w.getTracks().forEach(L=>L.stop()),f.value.delete(m.value))}l.showVisualizer&&!f.value.has(a.id)&&T(n,a.id),n.currentTime=0,n.play().catch(x=>{console.error("Failed to play audio:",x)}),m.value=a.id}catch(r){console.error(r),m.value=void 0}}function z(){c.value.forEach(a=>{a.pause(),a.src=""}),c.value.clear(),f.value.forEach(a=>{a.getTracks().forEach(r=>r.stop())}),f.value.clear(),v.value.forEach(a=>{a.state!=="closed"&&a.close()}),v.value.clear(),b.value.clear(),m.value=void 0}X(p,()=>{if(m.value){const a=c.value.get(m.value);a&&a.pause();const r=f.value.get(m.value);r&&(r.getTracks().forEach(n=>n.stop()),f.value.delete(m.value)),m.value=void 0}}),fe(z);const B=V("");return(a,r)=>(i(),u("div",We,[o.searchable?(i(),u("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)),Q(e("input",{"onUpdate:modelValue":r[0]||(r[0]=n=>p.value=n),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),[[ne,p.value]])])):P("",!0),e("div",et,[p.value?(i(),u("div",tt,y(o.searchResultsText.replace("{count}",U.value.length.toString()).replace("{total}",o.voices.length.toString())),1)):P("",!0),p.value&&U.value.length===0?(i(),u("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,y(o.searchNoResultsTitle),1),e("span",at,y(o.searchNoResultsDescription.replace("{query}",p.value)),1)])])):P("",!0),e("div",rt,[e("div",{class:$(["scrollbar-hide grid auto-cols-[350px] grid-flow-col max-h-[calc(100dvh-7lh)] gap-4 overflow-x-auto",[g.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"}},[(i(!0),u(H,null,K(U.value,n=>(i(),G(Ke,{key:n.id,"voice-id":k.value,"onUpdate:voiceId":r[1]||(r[1]=x=>k.value=x),"custom-voice-name":B.value,"onUpdate:customVoiceName":r[2]||(r[2]=x=>B.value=x),name:"voice",voice:n,"currently-playing-id":m.value,"custom-input-placeholder":o.customInputPlaceholder,"show-visualizer":o.showVisualizer,"audio-stream":f.value.get(n.id),onTogglePlayback:A},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:$([g.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:$([g.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]=n=>g.value=!g.value)},[e("span",null,y(g.value?o.collapseButtonText:o.expandButtonText),1),e("div",{class:$([g.value?"rotate-180":"","text-lg"]),"i-solar:alt-arrow-down-bold-duotone":"",transition:"transform duration-200 ease-in-out"},null,2)],2)],2)])])]))}}),it=Z(nt,[["__scopeId","data-v-070104a7"]]),ut=D({__name:"Skeleton",props:{animation:{default:"pulse"}},setup(o){const l=o;return(g,m)=>(i(),u("div",{class:$(["skeleton",l.animation!=="none"?`skeleton-${l.animation}`:""]),bg:"neutral-200 dark:neutral-800",overflow:"hidden"},[re(g.$slots,"default",{},void 0,!0)],2))}}),O=Z(ut,[["__scopeId","data-v-f404da2a"]]),dt={flex:"~ col md:row gap-6"},ct={bg:"neutral-100 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-4",class:"w-full md:w-[40%]"},vt={flex:"~ col gap-4"},mt={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},pt={text:"neutral-400 dark:neutral-500"},ft={"max-w-full":""},gt={key:0,flex:"~ row gap-4",style:{"scrollbar-width":"none"},"min-w-0":"","of-x-scroll":"","scroll-smooth":"",role:"radiogroup"},xt={key:1},bt={key:0},ht={flex:"~ col gap-4"},yt={class:"text-lg md:text-2xl"},kt={text:"neutral-400 dark:neutral-400"},wt={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"},St={class:"flex flex-col"},Vt={class:"font-medium"},Mt={class:"text-sm text-red-600 dark:text-red-400"},Ct={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"},$t={class:"flex flex-col"},Pt={class:"font-medium"},Ut={class:"text-sm text-amber-600 dark:text-amber-400"},Lt={key:0},qt={flex:"~ col gap-4"},At={key:0},Et={class:"flex flex-col gap-4"},Rt={flex:"~ row gap-4"},Tt={key:1,class:"space-y-6"},zt={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"},Bt={class:"flex flex-col"},Ft={class:"text-sm text-red-600 dark:text-red-400"},It={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"},Nt={flex:"~ col gap-4"},Dt={key:4,class:"mt-2 space-y-6"},jt={key:0},Ot={flex:"~ col gap-4"},Qt={flex:"~ col gap-6",class:"w-full md:w-[60%]"},Ht={"w-full":"","rounded-xl":""},Jt={class:"mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400","w-full":""},Gt={class:"inline-flex items-center gap-4"},Yt={flex:"~ col gap-4"},Kt={flex:"~ row","gap-4":""},Wt=["disabled"],Xt={flex:"~ row","items-center":"","gap-2":""},Zt=["src"],es={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},ts=D({__name:"speech",setup(o){const{t:l}=ge(),g=Pe(),m=Ue(),{availableProviders:c,availableAudioSpeechProvidersMetadata:f}=te(g),{activeSpeechProvider:v,activeSpeechModel:b,activeSpeechVoice:M,activeSpeechVoiceId:h,pitch:p,isLoadingSpeechProviderVoices:k,supportsModelListing:U,providerModels:q,isLoadingActiveProviderModels:E,activeProviderModelError:T,modelSearchQuery:A,speechProviderError:z,ssmlEnabled:B,availableVoices:a}=te(m),r=V(""),n=V(!1),x=V("Hello, my name is AI Assistant"),w=V(""),L=V(!1),C=V(""),S=V(null),j=V("");ae(async()=>{await m.loadVoicesForProvider(v.value),await g.loadModelsForConfiguredProviders()}),X(v,async()=>{await m.loadVoicesForProvider(v.value),await g.loadModelsForConfiguredProviders()});async function ie(){if(!x.value.trim()&&!n.value||n.value&&!w.value.trim())return;if(!b.value){console.error("No model selected");return}if(!M.value){console.error("No voice selected");return}const R=g.getProviderInstance(v.value);if(!R){console.error("Failed to initialize speech provider");return}const s=g.getProviderConfig(v.value);L.value=!0,j.value="";try{C.value&&ee();const N=n.value?w.value:m.generateSSML(x.value,M.value,{...s,pitch:p.value}),J=await Le({...R.speech(b.value,s),input:N,voice:M.value.id});C.value=URL.createObjectURL(new Blob([J])),setTimeout(()=>{S.value&&S.value.play()},100)}catch(N){console.error("Error generating speech:",N),j.value=N instanceof Error?N.message:"An unknown error occurred"}finally{L.value=!1}}function ee(){S.value&&(S.value.pause(),S.value.currentTime=0),C.value&&(URL.revokeObjectURL(C.value),C.value="")}xe(()=>{C.value&&URL.revokeObjectURL(C.value)});function ue(R){M.value={id:R,name:R,description:R,previewURL:R,languages:[{code:"en",title:"English"}],provider:v.value,gender:"male"}}function de(R){b.value=R}return(R,s)=>{var J;const N=be("motion");return i(),u(H,null,[_(t($e),{title:t(l)("settings.pages.modules.speech.title"),subtitle:t(l)("settings.pages.modules.title")},null,8,["title","subtitle"]),e("div",dt,[e("div",ct,[e("div",null,[e("div",vt,[e("div",null,[e("h2",mt,y(t(l)("settings.pages.modules.speech.sections.section.provider-voice-selection.title")),1),e("div",pt,[e("span",null,y(t(l)("settings.pages.modules.speech.sections.section.provider-voice-selection.description")),1)])]),e("div",ft,[t(c).length>0?(i(),u("fieldset",gt,[(i(!0),u(H,null,K(t(f),d=>(i(),G(t(Se),{id:d.id,key:d.id,modelValue:t(v),"onUpdate:modelValue":s[0]||(s[0]=ce=>F(v)?v.value=ce:null),name:"speech-provider",value:d.id,title:d.localizedName,description:d.localizedDescription},null,8,["id","modelValue","value","title","description"]))),128))])):(i(),u("div",xt,[_(t(he),{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[13]||(s[13]=[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(U)?(i(),u("div",bt,[e("div",ht,[e("div",null,[e("h2",yt,y(t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),e("div",kt,[e("span",null,y(t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),t(E)?(i(),u("div",wt,[s[14]||(s[14]=e("div",{class:"mr-2 animate-spin"},[e("div",{"i-solar:spinner-line-duotone":"","text-xl":""})],-1)),e("span",null,y(t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.loading")),1)])):t(T)?(i(),u("div",_t,[s[15]||(s[15]=e("div",{"i-solar:close-circle-line-duotone":"",class:"text-2xl text-red-500 dark:text-red-400"},null,-1)),e("div",St,[e("span",Vt,y(t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.error")),1),e("span",Mt,y(t(T)),1)])])):t(q).length===0&&!t(E)?(i(),u("div",Ct,[s[16]||(s[16]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),e("div",$t,[e("span",Pt,y(t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models")),1),e("span",Ut,y(t(l)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description")),1)])])):t(q).length>0?(i(),G(t(_e),{key:3,modelValue:t(b),"onUpdate:modelValue":s[1]||(s[1]=d=>F(b)?b.value=d:null),"search-query":t(A),"onUpdate:searchQuery":s[2]||(s[2]=d=>F(A)?A.value=d:null),items:t(q),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(A)}),"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":de},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"])):P("",!0)])])):P("",!0)])]),t(v)?(i(),u("div",Lt,[e("div",qt,[s[27]||(s[27]=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(k)?(i(),u("div",At,[e("div",Et,[_(t(O),{class:"w-full rounded-lg p-2.5 text-sm"},{default:I(()=>s[17]||(s[17]=[e("div",{class:"h-1lh"},null,-1)])),_:1}),e("div",Rt,[_(t(O),{class:"w-full rounded-lg p-4 text-sm"},{default:I(()=>s[18]||(s[18]=[e("div",{class:"h-1lh"},null,-1)])),_:1}),_(t(O),{class:"w-full rounded-lg p-4 text-sm"},{default:I(()=>s[19]||(s[19]=[e("div",{class:"h-1lh"},null,-1)])),_:1}),_(t(O),{class:"w-full rounded-lg p-4 text-sm"},{default:I(()=>s[20]||(s[20]=[e("div",{class:"h-1lh"},null,-1)])),_:1})]),_(t(O),{class:"w-full rounded-lg p-3 text-sm"},{default:I(()=>s[21]||(s[21]=[e("div",{class:"h-1lh"},null,-1)])),_:1})])])):t(a)[t(v)]&&t(a)[t(v)].length>0?(i(),u("div",Tt,[_(t(it),{"search-query":r.value,"onUpdate:searchQuery":s[3]||(s[3]=d=>r.value=d),"voice-id":t(h),"onUpdate:voiceId":s[4]||(s[4]=d=>F(h)?h.value=d:null),voices:(J=t(a)[t(v)])==null?void 0:J.map(d=>({id:d.id,name:d.name,description:d.description,previewURL:d.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":ue},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(z)?(i(),u("div",zt,[s[23]||(s[23]=e("div",{"i-solar:close-circle-line-duotone":"",class:"text-2xl text-red-500 dark:text-red-400"},null,-1)),e("div",Bt,[s[22]||(s[22]=e("span",{class:"font-medium"},"Error loading voices",-1)),e("span",Ft,y(t(z)),1)])])):(i(),u("div",It,s[24]||(s[24]=[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",Nt,[_(t(le),{modelValue:t(p),"onUpdate:modelValue":s[5]||(s[5]=d=>F(p)?p.value=d:null),label:"Pitch",description:"Tune the pitch of the voice",min:-100,max:100,step:1,"format-value":d=>`${d}%`},null,8,["modelValue","format-value"]),_(t(se),{modelValue:t(B),"onUpdate:modelValue":s[6]||(s[6]=d=>F(B)?B.value=d: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?(i(),u("div",Dt,[_(t(we),{modelValue:t(h),"onUpdate:modelValue":s[7]||(s[7]=d=>F(h)?h.value=d: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"?(i(),u("div",jt,[s[26]||(s[26]=e("label",{class:"mb-1 block text-sm font-medium"}," Model ",-1)),Q(e("select",{"onUpdate:modelValue":s[8]||(s[8]=d=>F(b)?b.value=d:null),class:"w-full border border-neutral-300 rounded bg-white px-3 py-2 dark:border-neutral-700 dark:bg-neutral-900"},s[25]||(s[25]=[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),[[ye,t(b)]])])):P("",!0),e("div",Ot,[_(t(le),{modelValue:t(p),"onUpdate:modelValue":s[9]||(s[9]=d=>F(p)?p.value=d:null),label:"Pitch",description:"Tune the pitch of the voice",min:-100,max:100,step:1,"format-value":d=>`${d}%`},null,8,["modelValue","format-value"])])])):P("",!0)])])):P("",!0)]),e("div",Qt,[e("div",Ht,[e("h2",Jt,[e("div",Gt,[_(t(ke)),e("div",null,y(t(l)("settings.pages.providers.provider.elevenlabs.playground.title")),1)])]),e("div",Yt,[_(t(se),{modelValue:n.value,"onUpdate:modelValue":s[10]||(s[10]=d=>n.value=d),label:"Use Custom SSML",description:"Enable to input raw SSML instead of plain text"},null,8,["modelValue"]),n.value?Q((i(),u("textarea",{key:1,"onUpdate:modelValue":s[12]||(s[12]=d=>w.value=d),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)),[[ne,w.value]]):(i(),G(t(Ve),{key:0,modelValue:x.value,"onUpdate:modelValue":s[11]||(s[11]=d=>x.value=d),"h-24":"","w-full":"",placeholder:t(l)("settings.pages.providers.provider.elevenlabs.playground.fields.field.input.placeholder")},null,8,["modelValue","placeholder"])),e("div",Kt,[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:L.value||!x.value.trim()&&!n.value||n.value&&!w.value.trim()||!t(M),class:$({"opacity-50 cursor-not-allowed":L.value||!x.value.trim()&&!n.value||n.value&&!w.value.trim()||!t(M)}),bg:"neutral-700 dark:neutral-300",onClick:ie},[e("div",Xt,[s[28]||(s[28]=e("div",{"i-solar:play-circle-bold-duotone":""},null,-1)),e("span",null,y(L.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,Wt),C.value?(i(),u("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:ee},s[29]||(s[29]=[e("div",{flex:"~ row","items-center":"","gap-2":""},[e("div",{"i-solar:stop-circle-bold-duotone":""}),e("span",null,"Stop")],-1)]))):P("",!0)]),C.value?(i(),u("audio",{key:2,ref_key:"audioPlayer",ref:S,src:C.value,controls:"",class:"mt-2 w-full"},null,8,Zt)):P("",!0)])])])]),Q((i(),u("div",es,s[30]||(s[30]=[e("div",{text:"60","i-solar:user-speak-rounded-bold-duotone":""},null,-1)]))),[[N]])],64)}}});typeof oe=="function"&&oe(ts);export{ts as default}; diff --git a/assets/speech-B27BwGQ-.js b/assets/speech-DTX8fpM-.js similarity index 98% rename from assets/speech-B27BwGQ-.js rename to assets/speech-DTX8fpM-.js index 55fb2e296653b8b0f5d839af7dd2c1b84ceac594..722e240f5b1f850c524746a4587df29fbeefb65e 100644 --- a/assets/speech-B27BwGQ-.js +++ b/assets/speech-DTX8fpM-.js @@ -1,2 +1,2 @@ -import{f as te,bD as f,g as b,h as p,w as P,l as re}from"./index-D8Nm21zW.js";import{r as ne,a as ae,b as oe,d as se}from"./index-Be1NqeGb.js";import{u as ce}from"./providers-DUDq6kdm.js";const ie=async e=>(e.fetch??globalThis.fetch)(ne("audio/speech",e.baseURL),{body:oe(e),headers:ae({"Content-Type":"application/json",...e.headers},e.apiKey),method:"POST",signal:e.abortSignal}).then(se).then(async t=>t.arrayBuffer()),ue=/["&'<>`]/g,le=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,de=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,me=/[|\\{}()[\]^$+*?.]/g,U=new WeakMap;function N(e,t){if(e=e.replace(t.subset?ge(t.subset):ue,n),t.subset||t.escapeOnly)return e;return e.replace(le,r).replace(de,n);function r(a,s,l){return t.format((a.charCodeAt(0)-55296)*1024+a.charCodeAt(1)-56320+65536,l.charCodeAt(s+2),t)}function n(a,s,l){return t.format(a.charCodeAt(0),l.charCodeAt(s+1),t)}}function ge(e){let t=U.get(e);return t||(t=fe(e),U.set(e,t)),t}function fe(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:"€"},Se=["cent","copy","divide","gt","lt","not","para","times"],j={}.hasOwnProperty,L={};let S;for(S in C)j.call(C,S)&&(L[C[S]]=S);const xe=/[^\dA-Za-z]/;function Ee(e,t,r,n){const a=String.fromCharCode(e);if(j.call(L,a)){const s=L[a],l="&"+s;return r&&be.includes(s)&&!Se.includes(s)&&(!n||t&&t!==61&&xe.test(String.fromCharCode(t)))?l:l+";"}return""}function we(e,t,r){let n=he(e,t,r.omitOptionalSemicolons),a;if((r.useNamedReferences||r.useShortestReferences)&&(a=Ee(e,t,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!a)&&r.useShortestReferences){const s=ye(e,t,r.omitOptionalSemicolons);s.length/g,Te=[">"];function Le(e){return""}function Me(e){return""}const Re=[" ",` +import{f as te,bD as f,g as b,h as p,w as P,l as re}from"./index-_NYoebRU.js";import{r as ne,a as ae,b as oe,d as se}from"./index-Be1NqeGb.js";import{u as ce}from"./providers-Bbs_o2SI.js";const ie=async e=>(e.fetch??globalThis.fetch)(ne("audio/speech",e.baseURL),{body:oe(e),headers:ae({"Content-Type":"application/json",...e.headers},e.apiKey),method:"POST",signal:e.abortSignal}).then(se).then(async t=>t.arrayBuffer()),ue=/["&'<>`]/g,le=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,de=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,me=/[|\\{}()[\]^$+*?.]/g,U=new WeakMap;function N(e,t){if(e=e.replace(t.subset?ge(t.subset):ue,n),t.subset||t.escapeOnly)return e;return e.replace(le,r).replace(de,n);function r(a,s,l){return t.format((a.charCodeAt(0)-55296)*1024+a.charCodeAt(1)-56320+65536,l.charCodeAt(s+2),t)}function n(a,s,l){return t.format(a.charCodeAt(0),l.charCodeAt(s+1),t)}}function ge(e){let t=U.get(e);return t||(t=fe(e),U.set(e,t)),t}function fe(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:"€"},Se=["cent","copy","divide","gt","lt","not","para","times"],j={}.hasOwnProperty,L={};let S;for(S in C)j.call(C,S)&&(L[C[S]]=S);const xe=/[^\dA-Za-z]/;function Ee(e,t,r,n){const a=String.fromCharCode(e);if(j.call(L,a)){const s=L[a],l="&"+s;return r&&be.includes(s)&&!Se.includes(s)&&(!n||t&&t!==61&&xe.test(String.fromCharCode(t)))?l:l+";"}return""}function we(e,t,r){let n=he(e,t,r.omitOptionalSemicolons),a;if((r.useNamedReferences||r.useShortestReferences)&&(a=Ee(e,t,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!a)&&r.useShortestReferences){const s=ye(e,t,r.omitOptionalSemicolons);s.length/g,Te=[">"];function Le(e){return""}function Me(e){return""}const Re=[" ",` `," ",'"',"&","'","/","<","=",">"];function x(e){return y(e,Re)}function F(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 M(e,t){const r=String(e);let n=t.options.quote||'"';if(t.options.quoteSmart){const a=n==='"'?"'":'"';F(r,n)>F(r,a)&&(n=a)}return n+y(r,["<","&",n])+n}function $e(e,t){const r=x(e.name),n=e.public,a=e.system;let s=""}const Ue={}.hasOwnProperty;function Fe(e,t){const r=x(e.name),n=k(e,t),a=e.attributes||{},s=n?!1:t.options.closeEmptyElements,l=[];let h;for(h in a)if(Ue.call(a,h)){const g=a[h];g!=null&&l.push(x(h)+"="+M(g,t))}return"<"+r+(l.length===0?"":" "+l.join(" "))+(s?(t.options.tightClose?"":" ")+"/":"")+">"+n+(s?"":"")}const De=/\?>/g,Ne=[">"];function je(e){const t=x(e.name)||"x",r=y(e.value,Ne,De);return""}const Ie=["&","<"];function I(e){return y(e.value,Ie)}function ze(e,t){return t.options.allowDangerousXml?e.value:I(e)}const ke={}.hasOwnProperty,D={cdata:Le,comment:Me,doctype:$e,element:Fe,instruction:je,raw:ze,root:k,text:I};function z(e,t){const r=e&&e.type;if(!r)throw new Error("Expected node, not `"+e+"`");if(!ke.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=ce(),t=f("settings/speech/active-provider",""),r=f("settings/speech/active-model","eleven_multilingual_v2"),n=f("settings/speech/voice",""),a=b(),s=f("settings/speech/pitch",0),l=f("settings/speech/rate",1),h=f("settings/speech/ssml-enabled",!1),g=b(!1),E=b(null),v=b({}),B=f("settings/speech/language","en-US"),w=b(""),H=p(()=>e.availableProviders.filter(o=>O(o)).map(o=>e.getProviderMetadata(o))),V=p(()=>{var o;return((o=e.getProviderMetadata(t.value))==null?void 0:o.capabilities.listModels)!==void 0}),A=p(()=>e.getModelsForProvider(t.value)),Y=p(()=>e.isLoadingModels[t.value]||!1),X=p(()=>e.modelLoadError[t.value]||null),G=p(()=>{if(!w.value.trim())return A.value;const o=w.value.toLowerCase().trim();return A.value.filter(c=>c.name.toLowerCase().includes(o)||c.id.toLowerCase().includes(o)||c.description&&c.description.toLowerCase().includes(o))}),_=p(()=>["elevenlabs","microsoft-speech","azure-speech","google","alibaba-cloud-model-studio","volcengine"].includes(t.value));function O(o){return["elevenlabs","microsoft-speech","azure-speech","google","amazon","alibaba-cloud-model-studio","volcengine"].includes(o)}async function q(o){var c,i;if(!o||!O(o))return[];g.value=!0,E.value=null;try{const u=await((i=(c=e.getProviderMetadata(o).capabilities).listVoices)==null?void 0:i.call(c,e.getProviderConfig(o)))||[];return v.value[o]=u,u}catch(u){return console.error(`Error fetching voices for ${o}:`,u),E.value=u instanceof Error?u.message:"Unknown error",[]}finally{g.value=!1}}function K(o){return v.value[o]||[]}P(t,async o=>{o&&await q(o)}),re(()=>{q(t.value).then(()=>{var o;n.value&&(a.value=(o=v.value[t.value])==null?void 0:o.find(c=>c.id===n.value))})}),P(n,o=>{var c;o&&(a.value=(c=v.value[t.value])==null?void 0:c.find(i=>i.id===o))},{immediate:!0}),P(v,o=>{var c;n.value&&(a.value=(c=o[t.value])==null?void 0:c.find(i=>i.id===n.value))},{immediate:!0});async function Q(o,c,i,u,m={}){return await ie({...o.speech(c,{...m}),input:i,voice:u})}function Z(o,c,i){var $;const u=i==null?void 0:i.pitch,m=i==null?void 0:i.speed,d=i==null?void 0:i.volume,W={pitch:u!=null?u>0?`+${u}%`:`-${u}%`:void 0,rate:m!=null?m!==1?`${m}`:"1":void 0,volume:d!=null?d>0?`+${d}%`:`${d}%`:void 0},J=T("speak",{version:"1.0",xmlns:"http://www.w3.org/2001/10/synthesis","xml:lang":(($=c.languages[0])==null?void 0:$.code)||"en-US"},[T("voice",{name:c.id,gender:c.gender||"neutral"},[Object.entries(W).filter(([Ve,ee])=>ee!=null).length>0?T("prosody",{pitch:u!=null?u>0?`+${u}%`:`-${u}%`:void 0,rate:m!=null?m!==1?`${m}`:"1":void 0,volume:d!=null?d>0?`+${d}%`:`${d}%`:void 0},[o]):o])]);return Be(J)}return{activeSpeechProvider:t,activeSpeechModel:r,activeSpeechVoice:a,activeSpeechVoiceId:n,pitch:s,rate:l,ssmlEnabled:h,selectedLanguage:B,isLoadingSpeechProviderVoices:g,speechProviderError:E,availableVoices:v,modelSearchQuery:w,availableSpeechProvidersMetadata:H,supportsSSML:_,supportsModelListing:V,providerModels:A,isLoadingActiveProviderModels:Y,activeProviderModelError:X,filteredModels:G,speech:Q,loadVoicesForProvider:q,getVoicesForProvider:K,generateSSML:Z,isSpeechProvider:O}});export{F as c,ie as g,_e as s,Ke as u}; diff --git a/assets/stage-U8FCK4AA.js b/assets/stage-CsKnQfK8.js similarity index 84% rename from assets/stage-U8FCK4AA.js rename to assets/stage-CsKnQfK8.js index 6266befbc2042d28bfed4ae3f0f6cd9de9f3a3a7..6efeea27b3f3c12cd1acf5f661473afb86b9df46 100644 --- a/assets/stage-U8FCK4AA.js +++ b/assets/stage-CsKnQfK8.js @@ -1 +1 @@ -import{d as p,e as s,c,b as d,r as i,n as m,u as e,o as l}from"./index-D8Nm21zW.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,e as s,c,b as d,r as i,n as m,u as e,o as l}from"./index-_NYoebRU.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-CmQtGg2y.js b/assets/together-ai-BzESm26r.js similarity index 62% rename from assets/together-ai-CmQtGg2y.js rename to assets/together-ai-BzESm26r.js index 59017ef07569303faad3623d718cee37173eea23..5c3ec2e32fbded6b9df8b0474e79301fee808cab 100644 --- a/assets/together-ai-CmQtGg2y.js +++ b/assets/together-ai-BzESm26r.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.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,u as t}from"./index-D8Nm21zW.js";import{u as z}from"./providers-DUDq6kdm.js";import{_ as w,a as C}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-Blzu2N2U.js";import{_ as M}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DFTTO3aS.js";import{_ as N,a as P}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-Bq_0Y-1M.js";import{_ as R}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-Ccg-E6bm.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-CYg3DjVq.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-CL9MLblt.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BNHdvI3g.js";import"./Input.vue_vue_type_script_setup_true_lang-DacRzqGb.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js";const a="together-ai",L=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{L as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.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,u as t}from"./index-_NYoebRU.js";import{u as z}from"./providers-Bbs_o2SI.js";import{_ as w,a as C}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BBijRr4z.js";import{_ as M}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DEakgvr1.js";import{_ as N,a as P}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-8eUb1l9O.js";import{_ as R}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-7OtTanLQ.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-Dx_TCyI1.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Cx39i7VD.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BHH_IiH5.js";import"./Input.vue_vue_type_script_setup_true_lang-DXXJ9lLc.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js";const a="together-ai",L=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{L as default}; diff --git a/assets/useIconAnimation-D5irYuyi.js b/assets/useIconAnimation-Cb5gBMka.js similarity index 56% rename from assets/useIconAnimation-D5irYuyi.js rename to assets/useIconAnimation-Cb5gBMka.js index ae7357dae2ea12e7179d78c9292a89ed748bd01a..685c48e6e1e93201f2bcda42f583d4441bbb19e8 100644 --- a/assets/useIconAnimation-D5irYuyi.js +++ b/assets/useIconAnimation-Cb5gBMka.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import{g as t,v as u,h as r,l as c,H as m}from"./index-D8Nm21zW.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"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import{g as t,v as u,h as r,l as c,H as m}from"./index-_NYoebRU.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/vibrant-Ck8ouQeR.js b/assets/vibrant-KanvtdV8.js similarity index 84% rename from assets/vibrant-Ck8ouQeR.js rename to assets/vibrant-KanvtdV8.js index ae3caccde3973d8196c09376f8504d8fd3bc48fe..f9d2600f3efa74c1f8a0b6e2cc1bcd929d3feb9e 100644 --- a/assets/vibrant-Ck8ouQeR.js +++ b/assets/vibrant-KanvtdV8.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import{_ as g}from"./InputFile.vue_vue_type_script_setup_true_lang-aVfE3xzX.js";import{d as p,g as n,w as v,c as r,o,a as s,bx as _,by as b,D as h,b as k,u as w,C as x,n as y}from"./index-D8Nm21zW.js";import{V}from"./browser-CkchkNbv.js";const C={flex:"","flex-col":"","gap-4":""},j={border:"2 solid neutral-200 dark:neutral-800",bg:"neutral-50 dark:neutral-900","w-full":"",flex:"","gap-2":"","rounded-lg":"","p-4":""},L={border:"2 solid neutral-200 dark:neutral-800",bg:"neutral-50 dark:neutral-900","w-full":"",flex:"","gap-2":"","rounded-lg":"","p-4":""},N={flex:"","gap-2":""},O={"h-60":"",border:"2 solid neutral-200 dark:neutral-800",bg:"neutral-50 dark:neutral-900","rounded-lg":""},B=["src"],I=p({__name:"vibrant",setup(D){const u=n([]),t=n(),d=n([]),i=n([]);function c(l){const a=new Image;a.src=URL.createObjectURL(l),a.onload=f,t.value=a}async function f(){if(!t.value)return;const a=await new V(t.value).getPalette();d.value=Object.values(a).map(e=>e==null?void 0:e.hex).filter(e=>typeof e=="string"),i.value=Object.values(a).map(e=>JSON.stringify(e))}return v(u,l=>{c(l[0])},{deep:!0}),(l,a)=>(o(),r("div",C,[s("div",j,[(o(!0),r(_,null,b(d.value,(e,m)=>(o(),r("div",{key:m,style:y({backgroundColor:e}),"size-20":"","rounded-full":""},null,4))),128))]),s("div",L,h(i.value),1),s("div",N,[k(w(g),{modelValue:u.value,"onUpdate:modelValue":a[0]||(a[0]=e=>u.value=e),"h-60":"","w-full":""},null,8,["modelValue"])]),s("div",O,[t.value?(o(),r("img",{key:0,src:t.value.src,"h-full":"","w-full":"","object-contain":""},null,8,B)):x("",!0)])]))}});export{I as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import{_ as g}from"./InputFile.vue_vue_type_script_setup_true_lang-UdikYOzo.js";import{d as p,g as n,w as v,c as r,o,a as s,bx as _,by as b,D as h,b as k,u as w,C as x,n as y}from"./index-_NYoebRU.js";import{V}from"./browser-CkchkNbv.js";const C={flex:"","flex-col":"","gap-4":""},j={border:"2 solid neutral-200 dark:neutral-800",bg:"neutral-50 dark:neutral-900","w-full":"",flex:"","gap-2":"","rounded-lg":"","p-4":""},L={border:"2 solid neutral-200 dark:neutral-800",bg:"neutral-50 dark:neutral-900","w-full":"",flex:"","gap-2":"","rounded-lg":"","p-4":""},N={flex:"","gap-2":""},O={"h-60":"",border:"2 solid neutral-200 dark:neutral-800",bg:"neutral-50 dark:neutral-900","rounded-lg":""},B=["src"],I=p({__name:"vibrant",setup(D){const u=n([]),t=n(),d=n([]),i=n([]);function c(l){const a=new Image;a.src=URL.createObjectURL(l),a.onload=f,t.value=a}async function f(){if(!t.value)return;const a=await new V(t.value).getPalette();d.value=Object.values(a).map(e=>e==null?void 0:e.hex).filter(e=>typeof e=="string"),i.value=Object.values(a).map(e=>JSON.stringify(e))}return v(u,l=>{c(l[0])},{deep:!0}),(l,a)=>(o(),r("div",C,[s("div",j,[(o(!0),r(_,null,b(d.value,(e,m)=>(o(),r("div",{key:m,style:y({backgroundColor:e}),"size-20":"","rounded-full":""},null,4))),128))]),s("div",L,h(i.value),1),s("div",N,[k(w(g),{modelValue:u.value,"onUpdate:modelValue":a[0]||(a[0]=e=>u.value=e),"h-60":"","w-full":""},null,8,["modelValue"])]),s("div",O,[t.value?(o(),r("img",{key:0,src:t.value.src,"h-full":"","w-full":"","object-contain":""},null,8,B)):x("",!0)])]))}});export{I as default}; diff --git a/assets/volcengine-DP5EEnId.js b/assets/volcengine-lvTB42MY.js similarity index 70% rename from assets/volcengine-DP5EEnId.js rename to assets/volcengine-lvTB42MY.js index 00eb0a3e15a8a033d4bf7ab159312201bdd13e55..89c5f9f832a0178b2515336630bfb52a7034627d 100644 --- a/assets/volcengine-DP5EEnId.js +++ b/assets/volcengine-lvTB42MY.js @@ -1 +1 @@ -import{_ as V}from"./FieldInput.vue_vue_type_script_setup_true_lang-BNHdvI3g.js";import{_ as y}from"./FieldRange.vue_vue_type_script_setup_true_lang-B670Jjy-.js";import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.js";import{d as w,g as M,s as I,q as S,h as v,l as x,w as g,x as F,o as k,y as c,b as f,u as r,a as $}from"./index-D8Nm21zW.js";import{u as B}from"./providers-DUDq6kdm.js";import{u as R}from"./speech-B27BwGQ-.js";import{_ as q,a as E}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-Cscdqs1L.js";import"./Input.vue_vue_type_script_setup_true_lang-DacRzqGb.js";import"./index-Be1NqeGb.js";import"./TestDummyMarker.vue_vue_type_script_setup_true_lang-CG5q9Jpo.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-Blzu2N2U.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-CYg3DjVq.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-CL9MLblt.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DFTTO3aS.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-Bq_0Y-1M.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js";const K={flex:"~ col gap-4"},o="volcengine",_="v1",ee=w({__name:"volcengine",setup(L){const s=M(1),d=R(),a=B(),{providers:t}=I(a),{t:n}=S(),p=v({get:()=>{var e,i;return((i=(e=t.value[o])==null?void 0:e.app)==null?void 0:i.appId)||""},set:e=>{t.value[o]||(t.value[o]={}),t.value[o].app={appId:e}}}),b=v(()=>{var e;return!!((e=t.value[o])!=null&&e.apiKey)}),C=v(()=>d.availableVoices[o]||[]);async function h(e,i,l){const u=a.getProviderInstance(o);if(!u)throw new Error("Failed to initialize speech provider");const m=a.getProviderConfig(o),P=m.model||_;return await d.speech(u,P,e,i,{...m})}return x(async()=>{const e=a.getProviderConfig(o);await a.getProviderMetadata(o).validators.validateProviderConfig(e)?await d.loadVoicesForProvider(o):console.error("Failed to validate provider config",e)}),g(s,async()=>{const e=a.getProviderConfig(o);e.audio||(e.audio={}),e.audio.speedRatio=s.value}),g([t,p],async()=>{const e=a.getProviderConfig(o);await a.getProviderMetadata(o).validators.validateProviderConfig(e)?await d.loadVoicesForProvider(o):console.error("Failed to validate provider config",e)},{immediate:!0}),(e,i)=>(k(),F(r(E),{"provider-id":o,"default-model":_},{"basic-settings":c(()=>[$("div",K,[f(r(V),{modelValue:p.value,"onUpdate:modelValue":i[0]||(i[0]=l=>p.value=l),label:r(n)("settings.pages.providers.provider.volcengine.fields.field.appId.label"),description:r(n)("settings.pages.providers.provider.volcengine.fields.field.appId.description"),required:""},null,8,["modelValue","label","description"])])]),"voice-settings":c(()=>[f(r(y),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=l=>s.value=l),label:r(n)("settings.pages.providers.provider.common.fields.field.speed.label"),description:r(n)("settings.pages.providers.provider.common.fields.field.speed.description"),min:.5,max:2,step:.01},null,8,["modelValue","label","description"])]),playground:c(()=>[f(r(q),{"available-voices":C.value,"generate-speech":h,"api-key-configured":b.value,"default-text":"Hello! This is a test of the ElevenLabs voice synthesis."},null,8,["available-voices","api-key-configured"])]),_:1}))}});export{ee as default}; +import{_ as V}from"./FieldInput.vue_vue_type_script_setup_true_lang-BHH_IiH5.js";import{_ as y}from"./FieldRange.vue_vue_type_script_setup_true_lang-BeH9VX4J.js";import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.js";import{d as w,g as M,s as I,q as S,h as v,l as x,w as g,x as F,o as k,y as c,b as f,u as r,a as $}from"./index-_NYoebRU.js";import{u as B}from"./providers-Bbs_o2SI.js";import{u as R}from"./speech-DTX8fpM-.js";import{_ as q,a as E}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-C9WOvHCP.js";import"./Input.vue_vue_type_script_setup_true_lang-DXXJ9lLc.js";import"./index-Be1NqeGb.js";import"./TestDummyMarker.vue_vue_type_script_setup_true_lang-7UKgQXIZ.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BBijRr4z.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-Dx_TCyI1.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Cx39i7VD.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DEakgvr1.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-8eUb1l9O.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js";const K={flex:"~ col gap-4"},o="volcengine",_="v1",ee=w({__name:"volcengine",setup(L){const s=M(1),d=R(),a=B(),{providers:t}=I(a),{t:n}=S(),p=v({get:()=>{var e,i;return((i=(e=t.value[o])==null?void 0:e.app)==null?void 0:i.appId)||""},set:e=>{t.value[o]||(t.value[o]={}),t.value[o].app={appId:e}}}),b=v(()=>{var e;return!!((e=t.value[o])!=null&&e.apiKey)}),C=v(()=>d.availableVoices[o]||[]);async function h(e,i,l){const u=a.getProviderInstance(o);if(!u)throw new Error("Failed to initialize speech provider");const m=a.getProviderConfig(o),P=m.model||_;return await d.speech(u,P,e,i,{...m})}return x(async()=>{const e=a.getProviderConfig(o);await a.getProviderMetadata(o).validators.validateProviderConfig(e)?await d.loadVoicesForProvider(o):console.error("Failed to validate provider config",e)}),g(s,async()=>{const e=a.getProviderConfig(o);e.audio||(e.audio={}),e.audio.speedRatio=s.value}),g([t,p],async()=>{const e=a.getProviderConfig(o);await a.getProviderMetadata(o).validators.validateProviderConfig(e)?await d.loadVoicesForProvider(o):console.error("Failed to validate provider config",e)},{immediate:!0}),(e,i)=>(k(),F(r(E),{"provider-id":o,"default-model":_},{"basic-settings":c(()=>[$("div",K,[f(r(V),{modelValue:p.value,"onUpdate:modelValue":i[0]||(i[0]=l=>p.value=l),label:r(n)("settings.pages.providers.provider.volcengine.fields.field.appId.label"),description:r(n)("settings.pages.providers.provider.volcengine.fields.field.appId.description"),required:""},null,8,["modelValue","label","description"])])]),"voice-settings":c(()=>[f(r(y),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=l=>s.value=l),label:r(n)("settings.pages.providers.provider.common.fields.field.speed.label"),description:r(n)("settings.pages.providers.provider.common.fields.field.speed.description"),min:.5,max:2,step:.01},null,8,["modelValue","label","description"])]),playground:c(()=>[f(r(q),{"available-voices":C.value,"generate-speech":h,"api-key-configured":b.value,"default-text":"Hello! This is a test of the ElevenLabs voice synthesis."},null,8,["available-voices","api-key-configured"])]),_:1}))}});export{ee as default}; diff --git a/assets/xai-93geoyGl.js b/assets/xai-DGl-MFDA.js similarity index 68% rename from assets/xai-93geoyGl.js rename to assets/xai-DGl-MFDA.js index 85c7ccf9836ba9cbf06cc767f8758b995fc4f93d..779356e6e1f5b0a8e002ccb7d962a9b7a2cc24fb 100644 --- a/assets/xai-93geoyGl.js +++ b/assets/xai-DGl-MFDA.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_3380f248_lang-CUt5gv4H.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,u as t}from"./index-D8Nm21zW.js";import{u as w}from"./providers-DUDq6kdm.js";import{_ as z,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-Blzu2N2U.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DFTTO3aS.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-Bq_0Y-1M.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-Ccg-E6bm.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-CYg3DjVq.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-CL9MLblt.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BNHdvI3g.js";import"./Input.vue_vue_type_script_setup_true_lang-DacRzqGb.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-Bau-0jfN.js";const a="xai",L=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{L as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_b414abf5_lang-BW3slh_g.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,u as t}from"./index-_NYoebRU.js";import{u as w}from"./providers-Bbs_o2SI.js";import{_ as z,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-BBijRr4z.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DEakgvr1.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-8eUb1l9O.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-7OtTanLQ.js";import"./index-Be1NqeGb.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-Dx_TCyI1.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Cx39i7VD.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BHH_IiH5.js";import"./Input.vue_vue_type_script_setup_true_lang-DXXJ9lLc.js";import"./PageHeader.vue_vue_type_script_setup_true_lang-DWyenJIC.js";const a="xai",L=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{L as default}; diff --git a/index.html b/index.html index 84d8f58b9369533f16b5169c67f2dbaf089f979c..1bf74104cd32789b772a369912719fba467419c6 100644 --- a/index.html +++ b/index.html @@ -23,7 +23,7 @@ src="/remote-assets/page-external-data/js/script.js" > - +