diff --git a/assets/Basic.vue_vue_type_script_setup_true_lang-COgaiUVw.js b/assets/Basic.vue_vue_type_script_setup_true_lang-Dgb2JW4V.js similarity index 90% rename from assets/Basic.vue_vue_type_script_setup_true_lang-COgaiUVw.js rename to assets/Basic.vue_vue_type_script_setup_true_lang-Dgb2JW4V.js index eb38f18c27ad9e56b0e74b0ee43c1fdda1cade52..5b575c4b4e06965557aa1eb6378624f36afdbbf8 100644 --- a/assets/Basic.vue_vue_type_script_setup_true_lang-COgaiUVw.js +++ b/assets/Basic.vue_vue_type_script_setup_true_lang-Dgb2JW4V.js @@ -1 +1 @@ -import{d as c,cf as d,cg as f,e as s,w as p,bm as v,cd as x,o as h,c as y,a3 as _}from"./index-WDP_Z4A8.js";const w=c({__name:"Basic",props:{modelValue:{default:""},modelModifiers:{}},emits:d(["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{w as _}; +import{d as c,cf as d,cg as f,e as s,w as p,bm as v,cd as x,o as h,c as y,a3 as _}from"./index-8LjpXIG7.js";const w=c({__name:"Basic",props:{modelValue:{default:""},modelModifiers:{}},emits:d(["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{w as _}; diff --git a/assets/CardDetailDialog-BlSfmRlS.js b/assets/CardDetailDialog-BlSfmRlS.js deleted file mode 100644 index bd74fc6f6bb848072e8f4d747517edb6515bb3f9..0000000000000000000000000000000000000000 --- a/assets/CardDetailDialog-BlSfmRlS.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o}from"./CardDetailDialog.vue_vue_type_script_setup_true_lang-CpnZ7KCX.js";import"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-DmSmyxCs.js";import"./index-WDP_Z4A8.js";import"./index-DeGbjSQn.js";import"./floating-ui.core-CgBsuaUc.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import"./airi-card-Cgw9OiDq.js";import"./consciousness-CI5ipeHX.js";import"./providers-7GsMyC_3.js";import"./index-LHmcipjy.js";import"./speech-DRmXCXwq.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";export{o as default}; diff --git a/assets/CardDetailDialog-Ctii3ZR5.js b/assets/CardDetailDialog-Ctii3ZR5.js new file mode 100644 index 0000000000000000000000000000000000000000..26f1eee29d819789860190bec06169f554cc6bb9 --- /dev/null +++ b/assets/CardDetailDialog-Ctii3ZR5.js @@ -0,0 +1 @@ +import{_ as o}from"./CardDetailDialog.vue_vue_type_script_setup_true_lang-BUKUzwWl.js";import"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-CAMkB22k.js";import"./index-8LjpXIG7.js";import"./index-BuTdizGl.js";import"./floating-ui.core-CgBsuaUc.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import"./airi-card-COPhkSXD.js";import"./consciousness-DSqUYfGS.js";import"./providers-Dhn8Iy_2.js";import"./index-LHmcipjy.js";import"./speech-BUPJbslH.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";export{o as default}; diff --git a/assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-CpnZ7KCX.js b/assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-BUKUzwWl.js similarity index 94% rename from assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-CpnZ7KCX.js rename to assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-BUKUzwWl.js index 6ed125be1558e8d91982088f619ab2ab9e7d13a3..48ce576545c3a73a91d340088e932190a4a62501 100644 --- a/assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-CpnZ7KCX.js +++ b/assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-BUKUzwWl.js @@ -1 +1 @@ -import{a as O,_ as E}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-DmSmyxCs.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as U,$ as q,a0 as F,f as x,e as $,c as l,o as n,c6 as f,b as m,u as o,bl as k,a as e,W as v,ch as u,Y as i,X as L,c7 as D}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as R}from"./airi-card-Cgw9OiDq.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{n as W,I as X,$ as Y,P as G,B as J}from"./index-DeGbjSQn.js";const K={key:0,class:"w-full flex flex-col gap-5"},Q={flex:"~ col","gap-3":""},Z={flex:"~ row","items-center":"","justify-between":""},ee={flex:"~ row","items-center":"","gap-2":""},te={key:0,class:"flex items-center gap-1 rounded-full bg-primary-100 px-2 py-0.5 text-xs text-primary-600 font-medium dark:bg-primary-900/40 dark:text-primary-400"},ae={"mt-1":"","text-sm":"","text-neutral-500":"","dark:text-neutral-400":""},re={"font-medium":""},se={flex:"~ row","gap-2":""},oe={class:"mt-4"},le={class:"border-b border-neutral-200 dark:border-neutral-700"},ne={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":""},$e={truncate:"","font-medium":""},Le={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"},Oe=U({__name:"CardDetailDialog",props:{modelValue:{type:Boolean},cardId:null},emits:["update:modelValue"],setup(B,{emit:A}){const b=B,M=A,{t:d}=q(),w=R(),{removeCard:N}=w,{activeCardId:S}=F(w),a=x(()=>{if(b.cardId)return w.getCard(b.cardId)}),y=x(()=>{var t,c,r,g,j;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:((j=s.speech)==null?void 0:j.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===S.value),I=$(!1);function P(){I.value=!0,setTimeout(()=>{S.value=b.cardId,I.value=!1},300)}function T(s){return s==null?void 0:s.replace(/\{\{(.*?)\}\}/g,'{{ $1 }}').trim()}const _=$(!1);function z(){a.value&&(N(b.cardId),M("update:modelValue",!1)),_.value=!1}const V=$(""),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 n(),l(f,null,[m(o(W),{open:B.modelValue,"onUpdate:open":t[0]||(t[0]=r=>M("update:modelValue",r))},{default:k(()=>[m(o(X),null,{default:k(()=>[m(o(Y),{class:"data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50 backdrop-blur-sm"}),m(o(G),{class:"data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide fixed left-1/2 top-1/2 z-100 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?(n(),l("div",K,[e("div",Q,[e("div",Z,[e("div",null,[e("div",ee,[m(o(J),{"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?(n(),l("div",te,[t[3]||(t[3]=e("div",{"i-solar:check-circle-bold-duotone":"","text-xs":""},null,-1)),u(" "+i(o(d)("settings.pages.card.active_badge")),1)])):v("",!0)]),e("div",ae,[u(" v"+i(a.value.version)+" ",1),a.value.creator?(n(),l(f,{key:0},[u(" · "+i(o(d)("settings.pages.card.created_by"))+" ",1),e("span",re,i(a.value.creator),1)],64)):v("",!0)])]),e("div",se,[m(o(O),{variant:"primary",icon:h.value?"i-solar:check-circle-bold-duotone":"i-solar:play-circle-broken",label:h.value?o(d)("settings.pages.card.active"):o(d)("settings.pages.card.activate"),disabled:h.value,class:L({"animate-pulse":I.value}),onClick:P},null,8,["icon","label","disabled","class"])])]),e("div",oe,[e("div",le,[e("div",ne,[(n(!0),l(f,null,D(H.value,r=>(n(),l("button",{key:r.id,class:L(["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:L(r.icon)},null,2),u(" "+i(r.label),1)])],10,ie))),128))])])]),p.value==="notes"&&a.value.notes?(n(),l("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?(n(),l("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)?(n(),l("div",pe,[e("div",ge,[(n(!0),l(f,null,D(C.value,(r,g)=>(n(),l(f,{key:g},[r?(n(),l("div",xe,[e("h2",be,i(o(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"?(n(),l("div",he,[e("div",_e,[e("div",ke,[e("span",we,[t[4]||(t[4]=e("div",{"i-lucide:ghost":""},null,-1)),u(" "+i(o(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(o(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(o(d)("settings.pages.card.speech.voice")),1)]),e("div",$e,i(y.value.voice??"default"),1)])])])):v("",!0)])])):(n(),l("div",Le,[t[7]||(t[7]=e("div",{"i-solar:card-search-broken":"","mx-auto":"","mb-3":"","text-6xl":"","text-neutral-400":""},null,-1)),u(" "+i(o(d)("settings.pages.card.card_not_found")),1)]))]),_:1})]),_:1})]),_:1},8,["open"]),m(E,{modelValue:_.value,"onUpdate:modelValue":t[1]||(t[1]=r=>_.value=r),"card-name":(c=a.value)==null?void 0:c.name,onConfirm:z,onCancel:t[2]||(t[2]=r=>_.value=!1)},null,8,["modelValue","card-name"])],64)}}});export{Oe as _}; +import{a as O,_ as E}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-CAMkB22k.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import{d as U,$ as q,a0 as F,f as x,e as $,c as l,o as n,c6 as f,b as m,u as o,bl as k,a as e,W as v,ch as u,Y as i,X as L,c7 as D}from"./index-8LjpXIG7.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{u as R}from"./airi-card-COPhkSXD.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{n as W,I as X,$ as Y,P as G,B as J}from"./index-BuTdizGl.js";const K={key:0,class:"w-full flex flex-col gap-5"},Q={flex:"~ col","gap-3":""},Z={flex:"~ row","items-center":"","justify-between":""},ee={flex:"~ row","items-center":"","gap-2":""},te={key:0,class:"flex items-center gap-1 rounded-full bg-primary-100 px-2 py-0.5 text-xs text-primary-600 font-medium dark:bg-primary-900/40 dark:text-primary-400"},ae={"mt-1":"","text-sm":"","text-neutral-500":"","dark:text-neutral-400":""},re={"font-medium":""},se={flex:"~ row","gap-2":""},oe={class:"mt-4"},le={class:"border-b border-neutral-200 dark:border-neutral-700"},ne={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":""},$e={truncate:"","font-medium":""},Le={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"},Oe=U({__name:"CardDetailDialog",props:{modelValue:{type:Boolean},cardId:null},emits:["update:modelValue"],setup(B,{emit:A}){const b=B,M=A,{t:d}=q(),w=R(),{removeCard:N}=w,{activeCardId:S}=F(w),a=x(()=>{if(b.cardId)return w.getCard(b.cardId)}),y=x(()=>{var t,c,r,g,j;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:((j=s.speech)==null?void 0:j.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===S.value),I=$(!1);function P(){I.value=!0,setTimeout(()=>{S.value=b.cardId,I.value=!1},300)}function T(s){return s==null?void 0:s.replace(/\{\{(.*?)\}\}/g,'{{ $1 }}').trim()}const _=$(!1);function z(){a.value&&(N(b.cardId),M("update:modelValue",!1)),_.value=!1}const V=$(""),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 n(),l(f,null,[m(o(W),{open:B.modelValue,"onUpdate:open":t[0]||(t[0]=r=>M("update:modelValue",r))},{default:k(()=>[m(o(X),null,{default:k(()=>[m(o(Y),{class:"data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-100 bg-black/50 backdrop-blur-sm"}),m(o(G),{class:"data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide fixed left-1/2 top-1/2 z-100 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?(n(),l("div",K,[e("div",Q,[e("div",Z,[e("div",null,[e("div",ee,[m(o(J),{"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?(n(),l("div",te,[t[3]||(t[3]=e("div",{"i-solar:check-circle-bold-duotone":"","text-xs":""},null,-1)),u(" "+i(o(d)("settings.pages.card.active_badge")),1)])):v("",!0)]),e("div",ae,[u(" v"+i(a.value.version)+" ",1),a.value.creator?(n(),l(f,{key:0},[u(" · "+i(o(d)("settings.pages.card.created_by"))+" ",1),e("span",re,i(a.value.creator),1)],64)):v("",!0)])]),e("div",se,[m(o(O),{variant:"primary",icon:h.value?"i-solar:check-circle-bold-duotone":"i-solar:play-circle-broken",label:h.value?o(d)("settings.pages.card.active"):o(d)("settings.pages.card.activate"),disabled:h.value,class:L({"animate-pulse":I.value}),onClick:P},null,8,["icon","label","disabled","class"])])]),e("div",oe,[e("div",le,[e("div",ne,[(n(!0),l(f,null,D(H.value,r=>(n(),l("button",{key:r.id,class:L(["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:L(r.icon)},null,2),u(" "+i(r.label),1)])],10,ie))),128))])])]),p.value==="notes"&&a.value.notes?(n(),l("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?(n(),l("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)?(n(),l("div",pe,[e("div",ge,[(n(!0),l(f,null,D(C.value,(r,g)=>(n(),l(f,{key:g},[r?(n(),l("div",xe,[e("h2",be,i(o(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"?(n(),l("div",he,[e("div",_e,[e("div",ke,[e("span",we,[t[4]||(t[4]=e("div",{"i-lucide:ghost":""},null,-1)),u(" "+i(o(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(o(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(o(d)("settings.pages.card.speech.voice")),1)]),e("div",$e,i(y.value.voice??"default"),1)])])])):v("",!0)])])):(n(),l("div",Le,[t[7]||(t[7]=e("div",{"i-solar:card-search-broken":"","mx-auto":"","mb-3":"","text-6xl":"","text-neutral-400":""},null,-1)),u(" "+i(o(d)("settings.pages.card.card_not_found")),1)]))]),_:1})]),_:1})]),_:1},8,["open"]),m(E,{modelValue:_.value,"onUpdate:modelValue":t[1]||(t[1]=r=>_.value=r),"card-name":(c=a.value)==null?void 0:c.name,onConfirm:z,onCancel:t[2]||(t[2]=r=>_.value=!1)},null,8,["modelValue","card-name"])],64)}}});export{Oe as _}; diff --git a/assets/CardListItem-D2jkRHPP.js b/assets/CardListItem-D2jkRHPP.js deleted file mode 100644 index 4bd24efa9913f745254e734cd253347642444884..0000000000000000000000000000000000000000 --- a/assets/CardListItem-D2jkRHPP.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o}from"./CardListItem.vue_vue_type_script_setup_true_lang-BCZkjfDb.js";import"./index-WDP_Z4A8.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import"./floating-ui.core-CgBsuaUc.js";export{o as default}; diff --git a/assets/CardListItem-xxyYJeZ6.js b/assets/CardListItem-xxyYJeZ6.js new file mode 100644 index 0000000000000000000000000000000000000000..ab92f54d23106294219cc63d866e8307d85d9e18 --- /dev/null +++ b/assets/CardListItem-xxyYJeZ6.js @@ -0,0 +1 @@ +import{_ as o}from"./CardListItem.vue_vue_type_script_setup_true_lang-B1Jpvh2O.js";import"./index-8LjpXIG7.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import"./floating-ui.core-CgBsuaUc.js";export{o as default}; diff --git a/assets/CardListItem.vue_vue_type_script_setup_true_lang-BCZkjfDb.js b/assets/CardListItem.vue_vue_type_script_setup_true_lang-B1Jpvh2O.js similarity index 95% rename from assets/CardListItem.vue_vue_type_script_setup_true_lang-BCZkjfDb.js rename to assets/CardListItem.vue_vue_type_script_setup_true_lang-B1Jpvh2O.js index 87e702c31d6e9ea15c344e69088cf4c4e2d1230a..038070ab3e8d2f9e49d5d86fcb9795fa561fc07d 100644 --- a/assets/CardListItem.vue_vue_type_script_setup_true_lang-BCZkjfDb.js +++ b/assets/CardListItem.vue_vue_type_script_setup_true_lang-B1Jpvh2O.js @@ -1 +1 @@ -import{d as M,e as s,T as R,c as p,o as d,bh as W,a3 as F,c2 as H,bk as I,bl as N,a as t,W as v,Y as l,ck as k,X as h,u as V}from"./index-WDP_Z4A8.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";const D=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 $(c){if(!o.value)return;const u=o.value,b=u.getBoundingClientRect(),_=c.clientX-b.left,C=c.clientY-b.top,z=u.offsetWidth,B=u.offsetHeight,f=Math.abs(Math.floor(100/z*_)-100),m=Math.abs(Math.floor(100/B*C)-100),x=50+(f-50)/1.5,g=50+(m-50)/1.5,X=50+(f-50)/7,Y=50+(m-50)/7,P=(x-50)/1.5*.2*n.intensity,S=(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(${S}deg) rotateY(${P}deg) scale3d(${1+.015*n.intensity}, ${1+.015*n.intensity}, ${1+.015*n.intensity})`,e.value=`${x}% ${g}%`,i.value=`${X}% ${Y}%`,y.value=j}function w(){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:$,onMouseleave:w},[W(c.$slots,"default",{},void 0,!0)],36))}}),E=H(D,[["__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":""},T={"flex-1":"",truncate:"","text-lg":"","font-thin":""},q={key:0,"shrink-0":"","rounded-md":"","p-1":"",bg:"primary-100 dark:primary-900/40",text:"primary-600 dark:primary-400"},G={key:0,"line-clamp-3":"","min-h-40px":"","flex-1":"","text-sm":"",text:"neutral-500 dark:neutral-400"},J={"z-1":"",flex:"","items-center":"","justify-between":"","text-xs":"",text:"neutral-500 dark:neutral-400"},K={flex:"","items-center":"","gap-1.5":""},Q={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"],se=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: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",T,l(r.name),1),r.isActive?(d(),p("div",q,e[3]||(e[3]=[t("div",{"i-solar:check-circle-bold-duotone":"","text-sm":""},null,-1)]))):v("",!0)]),r.description?(d(),p("p",G,l(r.description),1)):v("",!0),t("div",J,[t("div",null,"v"+l(r.version),1),t("div",K,[t("div",Q,[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{se as _}; +import{d as M,e as s,T as R,c as p,o as d,bh as W,a3 as F,c2 as H,bk as I,bl as N,a as t,W as v,Y as l,ck as k,X as h,u as V}from"./index-8LjpXIG7.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";const D=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 $(c){if(!o.value)return;const u=o.value,b=u.getBoundingClientRect(),_=c.clientX-b.left,C=c.clientY-b.top,z=u.offsetWidth,B=u.offsetHeight,f=Math.abs(Math.floor(100/z*_)-100),m=Math.abs(Math.floor(100/B*C)-100),x=50+(f-50)/1.5,g=50+(m-50)/1.5,X=50+(f-50)/7,Y=50+(m-50)/7,P=(x-50)/1.5*.2*n.intensity,S=(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(${S}deg) rotateY(${P}deg) scale3d(${1+.015*n.intensity}, ${1+.015*n.intensity}, ${1+.015*n.intensity})`,e.value=`${x}% ${g}%`,i.value=`${X}% ${Y}%`,y.value=j}function w(){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:$,onMouseleave:w},[W(c.$slots,"default",{},void 0,!0)],36))}}),E=H(D,[["__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":""},T={"flex-1":"",truncate:"","text-lg":"","font-thin":""},q={key:0,"shrink-0":"","rounded-md":"","p-1":"",bg:"primary-100 dark:primary-900/40",text:"primary-600 dark:primary-400"},G={key:0,"line-clamp-3":"","min-h-40px":"","flex-1":"","text-sm":"",text:"neutral-500 dark:neutral-400"},J={"z-1":"",flex:"","items-center":"","justify-between":"","text-xs":"",text:"neutral-500 dark:neutral-400"},K={flex:"","items-center":"","gap-1.5":""},Q={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"],se=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: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",T,l(r.name),1),r.isActive?(d(),p("div",q,e[3]||(e[3]=[t("div",{"i-solar:check-circle-bold-duotone":"","text-sm":""},null,-1)]))):v("",!0)]),r.description?(d(),p("p",G,l(r.description),1)):v("",!0),t("div",J,[t("div",null,"v"+l(r.version),1),t("div",K,[t("div",Q,[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{se as _}; diff --git a/assets/CheckBar.vue_vue_type_script_setup_true_lang-D-J2slay.js b/assets/CheckBar.vue_vue_type_script_setup_true_lang-l1KC0wsx.js similarity index 94% rename from assets/CheckBar.vue_vue_type_script_setup_true_lang-D-J2slay.js rename to assets/CheckBar.vue_vue_type_script_setup_true_lang-l1KC0wsx.js index b38f5c17c6f9cfa1d047b3210fe1885efb44f68d..ac367388aabe3d28c8594a36c7e12301906fec2e 100644 --- a/assets/CheckBar.vue_vue_type_script_setup_true_lang-D-J2slay.js +++ b/assets/CheckBar.vue_vue_type_script_setup_true_lang-l1KC0wsx.js @@ -1 +1 @@ -import{d as r,cf as c,cg as m,c as a,o as n,bm as f,a as i,b as h,bn as k,ch as b,W as v,Y as s,cm as x,bl as p,X as d}from"./index-WDP_Z4A8.js";const y={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"},V=["aria-checked"],g={key:0,text:"sm neutral-500"},w=r({__name:"CheckBar",props:c({text:null,iconOn:null,iconOff:null,description:null},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=m(e,"modelValue");return(l,o)=>(n(),a("label",y,[f(i("input",{"onUpdate:modelValue":o[0]||(o[0]=u=>t.value=u),"aria-checked":t.value,type:"checkbox",hidden:""},null,8,V),[[k,t.value]]),i("div",null,[b(s(l.$t(e.text))+" ",1),e.description?(n(),a("div",g,s(l.$t(e.description)),1)):v("",!0)]),h(x,{name:"slide-away",mode:"out-in"},{default:p(()=>[t.value?(n(),a("div",{key:0,class:d(e.iconOn),transition:"all ease-in-out duration-250"},null,2)):(n(),a("div",{key:1,class:d(e.iconOff),transition:"all ease-in-out duration-250"},null,2))]),_:1})]))}});export{w as _}; +import{d as r,cf as c,cg as m,c as a,o as n,bm as f,a as i,b as h,bn as k,ch as b,W as v,Y as s,cm as x,bl as p,X as d}from"./index-8LjpXIG7.js";const y={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"},V=["aria-checked"],g={key:0,text:"sm neutral-500"},w=r({__name:"CheckBar",props:c({text:null,iconOn:null,iconOff:null,description:null},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=m(e,"modelValue");return(l,o)=>(n(),a("label",y,[f(i("input",{"onUpdate:modelValue":o[0]||(o[0]=u=>t.value=u),"aria-checked":t.value,type:"checkbox",hidden:""},null,8,V),[[k,t.value]]),i("div",null,[b(s(l.$t(e.text))+" ",1),e.description?(n(),a("div",g,s(l.$t(e.description)),1)):v("",!0)]),h(x,{name:"slide-away",mode:"out-in"},{default:p(()=>[t.value?(n(),a("div",{key:0,class:d(e.iconOn),transition:"all ease-in-out duration-250"},null,2)):(n(),a("div",{key:1,class:d(e.iconOff),transition:"all ease-in-out duration-250"},null,2))]),_:1})]))}});export{w as _}; diff --git a/assets/Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js b/assets/Collapsable.vue_vue_type_script_setup_true_lang-BOcCBViZ.js similarity index 82% rename from assets/Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js rename to assets/Collapsable.vue_vue_type_script_setup_true_lang-BOcCBViZ.js index cc1b5d8ff1081c305e539030a3f448a714e08f3b..60a8b736c492c17f60f72aefc3fded143315eb5a 100644 --- a/assets/Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js +++ b/assets/Collapsable.vue_vue_type_script_setup_true_lang-BOcCBViZ.js @@ -1 +1 @@ -import{_ as d}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{d as p,cf as m,cg as c,bK as f,c as b,o as v,bh as r,b as V,a as s,ch as g,Y as u,cu as i,cv as y,u as k,bl as x,W as C,ci as B}from"./index-WDP_Z4A8.js";const _={op50:""},P=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=c(o,"modelValue");f(()=>{t.default!=null&&(e.value=!!t.default)});function n(l){return e.value=l,l}return(l,a)=>(v(),b("div",null,[r(l.$slots,"trigger",i(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]=N=>e.value=!e.value)},[s("span",null,u(t.label??"Collapsable"),1),a[1]||(a[1]=g()),s("span",_,u(e.value?"▲":"▼"),1)])]),V(k(d),null,{default:x(()=>[e.value?r(l.$slots,"default",i(B({key:0},{visible:e.value,setVisible:n}))):C("",!0)]),_:3})]))}});export{P as _}; +import{_ as d}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-DyyWKgKi.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{d as p,cf as m,cg as c,bK as f,c as b,o as v,bh as r,b as V,a as s,ch as g,Y as u,cu as i,cv as y,u as k,bl as x,W as C,ci as B}from"./index-8LjpXIG7.js";const _={op50:""},P=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=c(o,"modelValue");f(()=>{t.default!=null&&(e.value=!!t.default)});function n(l){return e.value=l,l}return(l,a)=>(v(),b("div",null,[r(l.$slots,"trigger",i(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]=N=>e.value=!e.value)},[s("span",null,u(t.label??"Collapsable"),1),a[1]||(a[1]=g()),s("span",_,u(e.value?"▲":"▼"),1)])]),V(k(d),null,{default:x(()=>[e.value?r(l.$slots,"default",i(B({key:0},{visible:e.value,setVisible:n}))):C("",!0)]),_:3})]))}});export{P as _}; diff --git a/assets/ColorPalette.vue_vue_type_script_setup_true_lang-BWRGi3IC.js b/assets/ColorPalette.vue_vue_type_script_setup_true_lang-CcpMsyh5.js similarity index 84% rename from assets/ColorPalette.vue_vue_type_script_setup_true_lang-BWRGi3IC.js rename to assets/ColorPalette.vue_vue_type_script_setup_true_lang-CcpMsyh5.js index d38d4e9e6974ef0f6b41eff2181159f20317085f..c4c8cd09492fc868ee5ff8641bddde106b5b0f09 100644 --- a/assets/ColorPalette.vue_vue_type_script_setup_true_lang-BWRGi3IC.js +++ b/assets/ColorPalette.vue_vue_type_script_setup_true_lang-CcpMsyh5.js @@ -1 +1 @@ -import{_ as b}from"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import{d,bk as m,o as i,bl as l,a as s,X as u,bh as k,ch as f,Y as g,bj as y,c,W as C,c6 as h,c7 as v,b as n,u as e,a3 as x,cs as w}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{W as S,j as $,q as B,U as E,G as V,H as j}from"./index-DeGbjSQn.js";const z=["onClick"],F={flex:"","gap-1.5":""},G=d({__name:"Section",props:{title:null,icon:null,innerClass:null,expand:{type:Boolean,default:!0}},setup(t){return(r,p)=>(i(),m(b,{default:t.expand},{trigger:l(o=>[s("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)},[s("div",F,[s("div",{class:u(t.icon),"size-6":""},null,2),f(" "+g(t.title),1)]),s("div",{"i-solar:alt-arrow-down-bold-duotone":"",transition:"transform duration-250",class:u({"rotate-180":o.visible})},null,2)],8,z)]),default:l(()=>[s("div",{grid:"","gap-4":"","p-4":"",class:u(t.innerClass)},[k(r.$slots,"default")],2)]),_:3},8,["default"]))}}),H={key:0,flex:"","gap-2":""},O=d({__name:"ColorPalette",props:{colors:null},setup(t){const r=y();return(p,o)=>t.colors.length?(i(),c("div",H,[(i(!0),c(h,null,v(t.colors,({hex:a,name:_})=>(i(),m(e(j),{key:a||"default"},{default:l(()=>[n(e(S),null,{default:l(()=>[n(e($),{transition:"all ease-in-out duration-250","size-6":"","cursor-pointer":"","rounded-full":"","bg-primary-500":"",style:x(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"]),n(e(B),null,{default:l(()=>[n(e(E),{bg:"white dark:neutral-800","rounded-lg":"","px-3":"","py-1.5":"","text-sm":"","shadow-md":""},{default:l(()=>[f(g(_)+" ",1),n(e(V),{"fill-white":"","dark:fill-neutral-800":""})]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))])):C("",!0)}});export{G as _,O as a}; +import{_ as b}from"./Collapsable.vue_vue_type_script_setup_true_lang-BOcCBViZ.js";import{d,bk as m,o as i,bl as l,a as s,X as u,bh as k,ch as f,Y as g,bj as y,c,W as C,c6 as h,c7 as v,b as n,u as e,a3 as x,cs as w}from"./index-8LjpXIG7.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{W as S,j as $,q as B,U as E,G as V,H as j}from"./index-BuTdizGl.js";const z=["onClick"],F={flex:"","gap-1.5":""},G=d({__name:"Section",props:{title:null,icon:null,innerClass:null,expand:{type:Boolean,default:!0}},setup(t){return(r,p)=>(i(),m(b,{default:t.expand},{trigger:l(o=>[s("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)},[s("div",F,[s("div",{class:u(t.icon),"size-6":""},null,2),f(" "+g(t.title),1)]),s("div",{"i-solar:alt-arrow-down-bold-duotone":"",transition:"transform duration-250",class:u({"rotate-180":o.visible})},null,2)],8,z)]),default:l(()=>[s("div",{grid:"","gap-4":"","p-4":"",class:u(t.innerClass)},[k(r.$slots,"default")],2)]),_:3},8,["default"]))}}),H={key:0,flex:"","gap-2":""},O=d({__name:"ColorPalette",props:{colors:null},setup(t){const r=y();return(p,o)=>t.colors.length?(i(),c("div",H,[(i(!0),c(h,null,v(t.colors,({hex:a,name:_})=>(i(),m(e(j),{key:a||"default"},{default:l(()=>[n(e(S),null,{default:l(()=>[n(e($),{transition:"all ease-in-out duration-250","size-6":"","cursor-pointer":"","rounded-full":"","bg-primary-500":"",style:x(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"]),n(e(B),null,{default:l(()=>[n(e(E),{bg:"white dark:neutral-800","rounded-lg":"","px-3":"","py-1.5":"","text-sm":"","shadow-md":""},{default:l(()=>[f(g(_)+" ",1),n(e(V),{"fill-white":"","dark:fill-neutral-800":""})]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))])):C("",!0)}});export{G as _,O as a}; diff --git a/assets/DeleteCardDialog-CzcmecCM.js b/assets/DeleteCardDialog-CzcmecCM.js deleted file mode 100644 index 4021f8ae6c48f9395f1a0be33b79b903a92b0496..0000000000000000000000000000000000000000 --- a/assets/DeleteCardDialog-CzcmecCM.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-DmSmyxCs.js";import"./index-WDP_Z4A8.js";import"./index-DeGbjSQn.js";import"./floating-ui.core-CgBsuaUc.js";export{o as default}; diff --git a/assets/DeleteCardDialog-XzegND5V.js b/assets/DeleteCardDialog-XzegND5V.js new file mode 100644 index 0000000000000000000000000000000000000000..d055f9cecedf0716b037017b3c3200608fe6a09e --- /dev/null +++ b/assets/DeleteCardDialog-XzegND5V.js @@ -0,0 +1 @@ +import{_ as o}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-CAMkB22k.js";import"./index-8LjpXIG7.js";import"./index-BuTdizGl.js";import"./floating-ui.core-CgBsuaUc.js";export{o as default}; diff --git a/assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-DmSmyxCs.js b/assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-CAMkB22k.js similarity index 96% rename from assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-DmSmyxCs.js rename to assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-CAMkB22k.js index 0c3cdb4ec54829df95df3820d86598e97b470609..ed570ac71c97c7904e7adb56b37de0fe9a8d1a4f 100644 --- a/assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-DmSmyxCs.js +++ b/assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-CAMkB22k.js @@ -1 +1 @@ -import{d as y,f as g,c as d,o as r,X as p,a as m,W as h,bh as _,Y as i,$ as w,bk as C,bl as n,b as t,u as e,ch as k}from"./index-WDP_Z4A8.js";import{A as V,k as B,O as N,V as z,F as D,M as $,N as O,T as S}from"./index-DeGbjSQn.js";const T=["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},x=y({__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=g(()=>s.disabled||s.loading),o={primary:"bg-primary-500 hover:bg-primary-600 dark:bg-primary-400 dark:hover:bg-primary-500 focus:ring-primary-500/50 dark:focus:ring-primary-400/50 text-white",secondary:"bg-neutral-100 hover:bg-neutral-200 dark:bg-neutral-600 dark:hover:bg-neutral-500 focus:ring-neutral-300/50 dark:focus:ring-neutral-600/50 text-neutral-900 dark:text-neutral-100",danger:"bg-red-500 hover:bg-red-600 dark:bg-red-400 dark:hover:bg-red-500 focus:ring-red-600/50 dark:focus:ring-red-500/50 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=g(()=>["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"]);return(b,f)=>(r(),d("button",{disabled:l.value,class:p(u.value)},[m("div",j,[a.loading?(r(),d("div",A)):a.icon?(r(),d("div",{key:1,class:p(a.icon)},null,2)):h("",!0),a.label?(r(),d("span",F,i(a.label),1)):_(b.$slots,"default",{key:3})])],10,T))}}),I={class:"flex flex-row justify-end gap-3"},H=y({__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)=>(r(),C(e(S),{open:a.modelValue,"onUpdate:open":f[0]||(f[0]=v=>l("update:modelValue",v))},{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-100 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-100 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(()=>[k(i(e(o)("settings.pages.card.delete_card")),1)]),_:1}),t(e(D),{class:"mb-6"},{default:n(()=>[k(i(e(o)("settings.pages.card.delete_confirmation"))+" ",1),m("b",null,'"'+i(a.cardName||"")+'"',1)]),_:1}),m("div",I,[t(e($),{"as-child":""},{default:n(()=>[t(e(x),{variant:"secondary",label:e(o)("settings.pages.card.cancel"),onClick:c},null,8,["label"])]),_:1}),t(e(O),{"as-child":""},{default:n(()=>[t(e(x),{variant:"danger",label:e(o)("settings.pages.card.delete"),onClick:u},null,8,["label"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["open"]))}});export{H as _,x as a}; +import{d as y,f as g,c as d,o as r,X as p,a as m,W as h,bh as _,Y as i,$ as w,bk as C,bl as n,b as t,u as e,ch as k}from"./index-8LjpXIG7.js";import{A as V,k as B,O as N,V as z,F as D,M as $,N as O,T as S}from"./index-BuTdizGl.js";const T=["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},x=y({__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=g(()=>s.disabled||s.loading),o={primary:"bg-primary-500 hover:bg-primary-600 dark:bg-primary-400 dark:hover:bg-primary-500 focus:ring-primary-500/50 dark:focus:ring-primary-400/50 text-white",secondary:"bg-neutral-100 hover:bg-neutral-200 dark:bg-neutral-600 dark:hover:bg-neutral-500 focus:ring-neutral-300/50 dark:focus:ring-neutral-600/50 text-neutral-900 dark:text-neutral-100",danger:"bg-red-500 hover:bg-red-600 dark:bg-red-400 dark:hover:bg-red-500 focus:ring-red-600/50 dark:focus:ring-red-500/50 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=g(()=>["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"]);return(b,f)=>(r(),d("button",{disabled:l.value,class:p(u.value)},[m("div",j,[a.loading?(r(),d("div",A)):a.icon?(r(),d("div",{key:1,class:p(a.icon)},null,2)):h("",!0),a.label?(r(),d("span",F,i(a.label),1)):_(b.$slots,"default",{key:3})])],10,T))}}),I={class:"flex flex-row justify-end gap-3"},H=y({__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)=>(r(),C(e(S),{open:a.modelValue,"onUpdate:open":f[0]||(f[0]=v=>l("update:modelValue",v))},{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-100 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-100 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(()=>[k(i(e(o)("settings.pages.card.delete_card")),1)]),_:1}),t(e(D),{class:"mb-6"},{default:n(()=>[k(i(e(o)("settings.pages.card.delete_confirmation"))+" ",1),m("b",null,'"'+i(a.cardName||"")+'"',1)]),_:1}),m("div",I,[t(e($),{"as-child":""},{default:n(()=>[t(e(x),{variant:"secondary",label:e(o)("settings.pages.card.cancel"),onClick:c},null,8,["label"])]),_:1}),t(e(O),{"as-child":""},{default:n(()=>[t(e(x),{variant:"danger",label:e(o)("settings.pages.card.delete"),onClick:u},null,8,["label"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["open"]))}});export{H as _,x as a}; diff --git a/assets/FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js b/assets/FieldInput.vue_vue_type_script_setup_true_lang-DdnLISgI.js similarity index 87% rename from assets/FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js rename to assets/FieldInput.vue_vue_type_script_setup_true_lang-DdnLISgI.js index 3c6e87e1ac9531c57422dc83bc2e9c345a90e74c..c035e7dfa22644d4222de162fe8dab820b55cf77 100644 --- a/assets/FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js +++ b/assets/FieldInput.vue_vue_type_script_setup_true_lang-DdnLISgI.js @@ -1 +1 @@ -import{_ as c}from"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";import{d as u,cf as i,cg as p,c as o,o as d,a as l,b as m,ch as _,W as x,Y as n,X as f}from"./index-WDP_Z4A8.js";const V={"max-w-full":""},h={flex:"~ col gap-4"},y={class:"flex items-center gap-1 text-sm font-medium"},v={key:0,class:"text-red-500"},g={class:"text-xs text-neutral-500 dark:text-neutral-400","text-nowrap":""},B=u({__name:"FieldInput",props:i({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",y,[_(n(e.label)+" ",1),e.required!==!1?(d(),o("span",v,"*")):x("",!0)]),l("div",g,n(e.description),1)]),m(c,{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 c}from"./Input.vue_vue_type_script_setup_true_lang-CpaCGrgF.js";import{d as u,cf as i,cg as p,c as o,o as d,a as l,b as m,ch as _,W as x,Y as n,X as f}from"./index-8LjpXIG7.js";const V={"max-w-full":""},h={flex:"~ col gap-4"},y={class:"flex items-center gap-1 text-sm font-medium"},v={key:0,class:"text-red-500"},g={class:"text-xs text-neutral-500 dark:text-neutral-400","text-nowrap":""},B=u({__name:"FieldInput",props:i({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",y,[_(n(e.label)+" ",1),e.required!==!1?(d(),o("span",v,"*")):x("",!0)]),l("div",g,n(e.description),1)]),m(c,{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-BubMLR-2.js b/assets/FieldRange.vue_vue_type_script_setup_true_lang-Cdt76zqB.js similarity index 98% rename from assets/FieldRange.vue_vue_type_script_setup_true_lang-BubMLR-2.js rename to assets/FieldRange.vue_vue_type_script_setup_true_lang-Cdt76zqB.js index e76ee26bd87884d5bc328432dfdd64b0591a375a..42280fcfa39f5ced5058d4b90659fbc72556138e 100644 --- a/assets/FieldRange.vue_vue_type_script_setup_true_lang-BubMLR-2.js +++ b/assets/FieldRange.vue_vue_type_script_setup_true_lang-Cdt76zqB.js @@ -1 +1 @@ -import{d as c,c as g,o as d,a3 as M,bh as w,c2 as B,e as V,a8 as E,T as P,U as O,a as f,bk as b,bl as _,b as $,c6 as R,cE as N,ci as k,cF as D,cB as S,u as i,cA as L,cN as U,f as v,d1 as j,cx as z,d2 as H,w as K,c7 as Y,bq as G,d3 as W,W as X,c_ as J,ck as Q,cg as C,cf as q,Y as x,bm as Z,cd as ee}from"./index-WDP_Z4A8.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";const te=c({__name:"Volumed",props:{perspective:null,transform:null},setup(t){return(e,a)=>(d(),g("div",{class:"volumed",style:M({perspective:`${t.perspective}px`,transform:t.transform})},[w(e.$slots,"default",{},void 0,!0)],4))}}),ae=B(te,[["__scopeId","data-v-568551bc"]]),ne=c({__name:"CursorMomentum",props:{baseSpeed:{default:.1},friction:{default:.95},momentumFactor:{default:.005}},setup(t,{expose:e}){const a=t,o=V(1),l=V(0);let r=0;const n=E(()=>a.friction),u=E(()=>a.baseSpeed),m=E(()=>a.momentumFactor);function h(s){r||(r=s);const y=s-r;r=s,o.value=u.value+(o.value-u.value)*n.value,l.value+=o.value*y,requestAnimationFrame(h)}function p(s){const y=Math.sqrt(s.movementX**2+s.movementY**2);o.value+=y*m.value}return P(()=>{window.addEventListener("mousemove",p),requestAnimationFrame(h)}),O(()=>{window.removeEventListener("mousemove",p)}),e({momentum:o,currentValue:l}),(s,y)=>w(s.$slots,"default",{momentum:o.value,currentValue:l.value})}}),le=c({__name:"TestDummyMarkerFlat",props:{size:null},setup(t){return(e,a)=>(d(),g("div",{class:"test-dummy-flat",style:M({width:`${t.size}px`,height:`${t.size}px`})},a[0]||(a[0]=[f("div",{class:"marker"},null,-1)]),4))}}),oe=B(le,[["__scopeId","data-v-b4ef37ac"]]),Re=c({__name:"TestDummyMarker",setup(t){return(e,a)=>(d(),b(ne,{"base-speed":.1,friction:.95,"momentum-factor":5e-4},{default:_(({currentValue:o})=>[$(ae,{perspective:800,transform:"rotateX(45deg) translateY(3px)"},{default:_(()=>[$(oe,{size:24,style:M({transform:`rotate(${o}deg)`})},null,8,["style"])]),_:2},1024)]),_:1}))}});function T(t){return t?t.flatMap(e=>e.type===R?T(e.children):[e]):[]}const re=c({name:"PrimitiveSlot",inheritAttrs:!1,setup(t,{attrs:e,slots:a}){return()=>{var m;if(!a.default)return null;const o=T(a.default()),l=o.findIndex(h=>h.type!==N);if(l===-1)return o;const r=o[l];(m=r.props)==null||delete m.ref;const n=r.props?k(e,r.props):e,u=D({...r,props:{}},n);return o.length===1?u:(o[l]=u,o)}}}),se=["area","img","input"],A=c({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(t,{attrs:e,slots:a}){const o=t.asChild?"template":t.as;return typeof o=="string"&&se.includes(o)?()=>S(o,e):o!=="template"?()=>S(t.as,e,{default:a.default}):()=>S(re,e,{default:a.default})}}),ue=c({__name:"VisuallyHidden",props:{feature:{default:"focusable"},asChild:{type:Boolean},as:{default:"span"}},setup(t){return(e,a)=>(d(),b(i(A),{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:_(()=>[w(e.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}});function ie(t,e){const a=`${t}Context`,o=Symbol(a);return[n=>{const u=L(o,n);if(u||u===null)return u;throw new Error(`Injection \`${o.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`)},n=>(U(o,n),n)]}function I(){const t=z(),e=V(),a=v(()=>{var n,u;return["#text","#comment"].includes((n=e.value)==null?void 0:n.$el.nodeName)?(u=e.value)==null?void 0:u.$el.nextElementSibling:j(e)}),o=Object.assign({},t.exposed),l={};for(const n in t.props)Object.defineProperty(l,n,{enumerable:!0,configurable:!0,get:()=>t.props[n]});if(Object.keys(o).length>0)for(const n in o)Object.defineProperty(l,n,{enumerable:!0,configurable:!0,get:()=>o[n]});Object.defineProperty(l,"$el",{enumerable:!0,configurable:!0,get:()=>t.vnode.el}),t.exposed=l;function r(n){e.value=n,n&&(Object.defineProperty(l,"$el",{enumerable:!0,configurable:!0,get:()=>n instanceof Element?n:n.$el}),t.exposed=l)}return{forwardRef:r,currentRef:e,currentElement:a}}function de(){const t=V(),e=v(()=>{var a,o;return["#text","#comment"].includes((a=t.value)==null?void 0:a.$el.nodeName)?(o=t.value)==null?void 0:o.$el.nextElementSibling:j(t)});return{primitiveElement:t,currentElement:e}}function ce(t){return v(()=>{var e;return H(t)?!!((e=j(t))!=null&&e.closest("form")):!0})}const F=c({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:a,currentElement:o}=de(),l=v(()=>e.checked??e.value);return K(l,(r,n)=>{if(!o.value)return;const u=o.value,m=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(m,"value").set;if(p&&r!==n){const s=new Event("input",{bubbles:!0}),y=new Event("change",{bubbles:!0});p.call(u,r),u.dispatchEvent(s),u.dispatchEvent(y)}}),(r,n)=>(d(),b(ue,k({ref_key:"primitiveElement",ref:a},{...e,...r.$attrs},{as:"input"}),null,16))}}),me=c({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,a=v(()=>typeof e.value=="object"&&Array.isArray(e.value)&&e.value.length===0&&e.required),o=v(()=>typeof e.value=="string"||typeof e.value=="number"||typeof e.value=="boolean"?[{name:e.name,value:e.value}]:typeof e.value=="object"&&Array.isArray(e.value)?e.value.flatMap((l,r)=>typeof l=="object"?Object.entries(l).map(([n,u])=>({name:`[${e.name}][${r}][${n}]`,value:u})):{name:`[${e.name}][${r}]`,value:l}):e.value!==null&&typeof e.value=="object"&&!Array.isArray(e.value)?Object.entries(e.value).map(([l,r])=>({name:`[${e.name}][${l}]`,value:r})):[]);return(l,r)=>a.value?(d(),b(F,k({key:l.name},{...e,...l.$attrs},{name:l.name,value:l.value}),null,16,["name","value"])):(d(!0),g(R,{key:1},Y(o.value,n=>(d(),b(F,k({key:n.name,ref_for:!0},{...e,...l.$attrs},{name:n.name,value:n.value}),null,16,["name","value"]))),128))}}),[pe,fe]=ie("SwitchRoot"),ve=c({__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 a=t,o=e,{disabled:l}=G(a),r=W(a,"modelValue",o,{defaultValue:a.defaultValue,passive:a.modelValue===void 0});function n(){l.value||(r.value=!r.value)}const{forwardRef:u,currentElement:m}=I(),h=ce(m),p=v(()=>{var s;return a.id&&m.value?(s=document.querySelector(`[for="${a.id}"]`))==null?void 0:s.innerText:void 0});return fe({modelValue:r,toggleCheck:n,disabled:l}),(s,y)=>(d(),b(i(A),k(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"]||p.value,"aria-checked":i(r),"aria-required":s.required,"data-state":i(r)?"checked":"unchecked","data-disabled":i(l)?"":void 0,"as-child":s.asChild,as:s.as,disabled:i(l),onClick:n,onKeydown:J(Q(n,["prevent"]),["enter"])}),{default:_(()=>[w(s.$slots,"default",{modelValue:i(r)}),i(h)&&s.name?(d(),b(i(me),{key:0,type:"checkbox",name:s.name,disabled:i(l),required:s.required,value:s.value,checked:!!i(r)},null,8,["name","disabled","required","value","checked"])):X("",!0)]),_:3},16,["id","type","value","aria-label","aria-checked","aria-required","data-state","data-disabled","as-child","as","disabled","onKeydown"]))}}),he=c({__name:"SwitchThumb",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=pe();return I(),(a,o)=>{var l;return d(),b(i(A),{"data-state":(l=i(e).modelValue)!=null&&l.value?"checked":"unchecked","data-disabled":i(e).disabled.value?"":void 0,"as-child":a.asChild,as:a.as},{default:_(()=>[w(a.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"])}}}),ye=c({__name:"Checkbox",props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(t){const e=C(t,"modelValue");return(a,o)=>(d(),b(i(ve),{modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=l=>e.value=l),transition:"background duration-250 ease-in-out",outline:"focus-within:none",flex:"~",border:"neutral-300 dark:neutral-700 data-[state=checked]:primary-200 data-[state=unchecked]:neutral-300 focus-within:neutral-800",bg:"data-[state=checked]:primary-400 data-[state=unchecked]:neutral-300 data-[state=checked]:dark:primary-400/80 dark:data-[state=unchecked]:neutral-800",relative:"","h-7":"",w:"12.5","rounded-full":"",shadow:"sm focus-within:shadow-neutral-800 focus-within:[0_0_0_1px] "},{default:_(()=>[$(i(he),{"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"]))}}),be={flex:"~ col gap-4"},_e={flex:"~ row","items-center":"","gap-2":""},ge={flex:"1"},xe={class:"flex items-center gap-1 text-sm font-medium"},Ve={class:"text-xs text-neutral-500 dark:text-neutral-400"},Te=c({__name:"FieldCheckbox",props:q({label:null,description:null},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,a=C(t,"modelValue");return(o,l)=>(d(),g("label",be,[f("div",_e,[f("div",ge,[f("div",xe,x(e.label),1),f("div",Ve,x(e.description),1)]),$(ye,{modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=r=>a.value=r)},null,8,["modelValue"])])]))}}),$e=["min","max","step"],ke=c({__name:"Range",props:q({min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1},thumbColor:{default:"#9090906e"},trackColor:{default:"gray"},trackValueColor:{default:"red"}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,a=C(t,"modelValue"),o=v(()=>e.min*1e4),l=v(()=>e.max*1e4),r=v(()=>e.step*1e4),n=V(),u=v({get:()=>a.value*1e4,set:p=>{a.value=p/1e4,m()}});P(()=>{m()});function m(){n.value&&(n.value.style.setProperty("--value",n.value.value),n.value.style.setProperty("--min",n.value.min?n.value.min:e.min.toString()),n.value.style.setProperty("--max",n.value.max?n.value.max:e.max.toString()))}function h(p){const s=p.target;s.style.setProperty("--value",s.value)}return(p,s)=>Z((d(),g("input",{ref_key:"sliderRef",ref:n,"onUpdate:modelValue":s[0]||(s[0]=y=>u.value=y),type:"range",min:o.value,max:l.value,step:r.value,class:"slider-progress form_input-range",onInput:h},null,40,$e)),[[ee,u.value,void 0,{number:!0}]])}}),we=B(ke,[["__scopeId","data-v-d88ffd28"]]),Ce={flex:"~ col gap-4"},Ee={flex:"~ row","items-center":"","gap-2":""},Se={flex:"1"},Me={class:"flex items-center gap-1 text-sm font-medium"},Be={class:"text-xs text-neutral-500 dark:text-neutral-400"},je={"font-mono":""},qe={flex:"~ row","items-center":"","gap-2":""},Ie=c({__name:"FieldRange",props:q({min:null,max:null,step:null,label:null,description:null,formatValue:{type:Function}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,a=C(t,"modelValue");return(o,l)=>{var r;return d(),g("label",Ce,[f("div",Ee,[f("div",Se,[f("div",Me,x(t.label),1),f("div",Be,x(t.description),1)]),f("span",je,x(((r=e.formatValue)==null?void 0:r.call(e,a.value))||a.value),1)]),f("div",qe,[$(we,{modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=n=>a.value=n),min:t.min||0,max:t.max||1,step:t.step||.01,"w-full":""},null,8,["modelValue","min","max","step"])])])}}});export{Ie as _,Te as a,Re as b}; +import{d as c,c as g,o as d,a3 as M,bh as w,c2 as B,e as V,a8 as E,T as P,U as O,a as f,bk as b,bl as _,b as $,c6 as R,cE as N,ci as k,cF as D,cB as S,u as i,cA as L,cN as U,f as v,d1 as j,cx as z,d2 as H,w as K,c7 as Y,bq as G,d3 as W,W as X,c_ as J,ck as Q,cg as C,cf as q,Y as x,bm as Z,cd as ee}from"./index-8LjpXIG7.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";const te=c({__name:"Volumed",props:{perspective:null,transform:null},setup(t){return(e,a)=>(d(),g("div",{class:"volumed",style:M({perspective:`${t.perspective}px`,transform:t.transform})},[w(e.$slots,"default",{},void 0,!0)],4))}}),ae=B(te,[["__scopeId","data-v-568551bc"]]),ne=c({__name:"CursorMomentum",props:{baseSpeed:{default:.1},friction:{default:.95},momentumFactor:{default:.005}},setup(t,{expose:e}){const a=t,o=V(1),l=V(0);let r=0;const n=E(()=>a.friction),u=E(()=>a.baseSpeed),m=E(()=>a.momentumFactor);function h(s){r||(r=s);const y=s-r;r=s,o.value=u.value+(o.value-u.value)*n.value,l.value+=o.value*y,requestAnimationFrame(h)}function p(s){const y=Math.sqrt(s.movementX**2+s.movementY**2);o.value+=y*m.value}return P(()=>{window.addEventListener("mousemove",p),requestAnimationFrame(h)}),O(()=>{window.removeEventListener("mousemove",p)}),e({momentum:o,currentValue:l}),(s,y)=>w(s.$slots,"default",{momentum:o.value,currentValue:l.value})}}),le=c({__name:"TestDummyMarkerFlat",props:{size:null},setup(t){return(e,a)=>(d(),g("div",{class:"test-dummy-flat",style:M({width:`${t.size}px`,height:`${t.size}px`})},a[0]||(a[0]=[f("div",{class:"marker"},null,-1)]),4))}}),oe=B(le,[["__scopeId","data-v-b4ef37ac"]]),Re=c({__name:"TestDummyMarker",setup(t){return(e,a)=>(d(),b(ne,{"base-speed":.1,friction:.95,"momentum-factor":5e-4},{default:_(({currentValue:o})=>[$(ae,{perspective:800,transform:"rotateX(45deg) translateY(3px)"},{default:_(()=>[$(oe,{size:24,style:M({transform:`rotate(${o}deg)`})},null,8,["style"])]),_:2},1024)]),_:1}))}});function T(t){return t?t.flatMap(e=>e.type===R?T(e.children):[e]):[]}const re=c({name:"PrimitiveSlot",inheritAttrs:!1,setup(t,{attrs:e,slots:a}){return()=>{var m;if(!a.default)return null;const o=T(a.default()),l=o.findIndex(h=>h.type!==N);if(l===-1)return o;const r=o[l];(m=r.props)==null||delete m.ref;const n=r.props?k(e,r.props):e,u=D({...r,props:{}},n);return o.length===1?u:(o[l]=u,o)}}}),se=["area","img","input"],A=c({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(t,{attrs:e,slots:a}){const o=t.asChild?"template":t.as;return typeof o=="string"&&se.includes(o)?()=>S(o,e):o!=="template"?()=>S(t.as,e,{default:a.default}):()=>S(re,e,{default:a.default})}}),ue=c({__name:"VisuallyHidden",props:{feature:{default:"focusable"},asChild:{type:Boolean},as:{default:"span"}},setup(t){return(e,a)=>(d(),b(i(A),{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:_(()=>[w(e.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}});function ie(t,e){const a=`${t}Context`,o=Symbol(a);return[n=>{const u=L(o,n);if(u||u===null)return u;throw new Error(`Injection \`${o.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`)},n=>(U(o,n),n)]}function I(){const t=z(),e=V(),a=v(()=>{var n,u;return["#text","#comment"].includes((n=e.value)==null?void 0:n.$el.nodeName)?(u=e.value)==null?void 0:u.$el.nextElementSibling:j(e)}),o=Object.assign({},t.exposed),l={};for(const n in t.props)Object.defineProperty(l,n,{enumerable:!0,configurable:!0,get:()=>t.props[n]});if(Object.keys(o).length>0)for(const n in o)Object.defineProperty(l,n,{enumerable:!0,configurable:!0,get:()=>o[n]});Object.defineProperty(l,"$el",{enumerable:!0,configurable:!0,get:()=>t.vnode.el}),t.exposed=l;function r(n){e.value=n,n&&(Object.defineProperty(l,"$el",{enumerable:!0,configurable:!0,get:()=>n instanceof Element?n:n.$el}),t.exposed=l)}return{forwardRef:r,currentRef:e,currentElement:a}}function de(){const t=V(),e=v(()=>{var a,o;return["#text","#comment"].includes((a=t.value)==null?void 0:a.$el.nodeName)?(o=t.value)==null?void 0:o.$el.nextElementSibling:j(t)});return{primitiveElement:t,currentElement:e}}function ce(t){return v(()=>{var e;return H(t)?!!((e=j(t))!=null&&e.closest("form")):!0})}const F=c({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:a,currentElement:o}=de(),l=v(()=>e.checked??e.value);return K(l,(r,n)=>{if(!o.value)return;const u=o.value,m=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(m,"value").set;if(p&&r!==n){const s=new Event("input",{bubbles:!0}),y=new Event("change",{bubbles:!0});p.call(u,r),u.dispatchEvent(s),u.dispatchEvent(y)}}),(r,n)=>(d(),b(ue,k({ref_key:"primitiveElement",ref:a},{...e,...r.$attrs},{as:"input"}),null,16))}}),me=c({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,a=v(()=>typeof e.value=="object"&&Array.isArray(e.value)&&e.value.length===0&&e.required),o=v(()=>typeof e.value=="string"||typeof e.value=="number"||typeof e.value=="boolean"?[{name:e.name,value:e.value}]:typeof e.value=="object"&&Array.isArray(e.value)?e.value.flatMap((l,r)=>typeof l=="object"?Object.entries(l).map(([n,u])=>({name:`[${e.name}][${r}][${n}]`,value:u})):{name:`[${e.name}][${r}]`,value:l}):e.value!==null&&typeof e.value=="object"&&!Array.isArray(e.value)?Object.entries(e.value).map(([l,r])=>({name:`[${e.name}][${l}]`,value:r})):[]);return(l,r)=>a.value?(d(),b(F,k({key:l.name},{...e,...l.$attrs},{name:l.name,value:l.value}),null,16,["name","value"])):(d(!0),g(R,{key:1},Y(o.value,n=>(d(),b(F,k({key:n.name,ref_for:!0},{...e,...l.$attrs},{name:n.name,value:n.value}),null,16,["name","value"]))),128))}}),[pe,fe]=ie("SwitchRoot"),ve=c({__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 a=t,o=e,{disabled:l}=G(a),r=W(a,"modelValue",o,{defaultValue:a.defaultValue,passive:a.modelValue===void 0});function n(){l.value||(r.value=!r.value)}const{forwardRef:u,currentElement:m}=I(),h=ce(m),p=v(()=>{var s;return a.id&&m.value?(s=document.querySelector(`[for="${a.id}"]`))==null?void 0:s.innerText:void 0});return fe({modelValue:r,toggleCheck:n,disabled:l}),(s,y)=>(d(),b(i(A),k(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"]||p.value,"aria-checked":i(r),"aria-required":s.required,"data-state":i(r)?"checked":"unchecked","data-disabled":i(l)?"":void 0,"as-child":s.asChild,as:s.as,disabled:i(l),onClick:n,onKeydown:J(Q(n,["prevent"]),["enter"])}),{default:_(()=>[w(s.$slots,"default",{modelValue:i(r)}),i(h)&&s.name?(d(),b(i(me),{key:0,type:"checkbox",name:s.name,disabled:i(l),required:s.required,value:s.value,checked:!!i(r)},null,8,["name","disabled","required","value","checked"])):X("",!0)]),_:3},16,["id","type","value","aria-label","aria-checked","aria-required","data-state","data-disabled","as-child","as","disabled","onKeydown"]))}}),he=c({__name:"SwitchThumb",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=pe();return I(),(a,o)=>{var l;return d(),b(i(A),{"data-state":(l=i(e).modelValue)!=null&&l.value?"checked":"unchecked","data-disabled":i(e).disabled.value?"":void 0,"as-child":a.asChild,as:a.as},{default:_(()=>[w(a.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"])}}}),ye=c({__name:"Checkbox",props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(t){const e=C(t,"modelValue");return(a,o)=>(d(),b(i(ve),{modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=l=>e.value=l),transition:"background duration-250 ease-in-out",outline:"focus-within:none",flex:"~",border:"neutral-300 dark:neutral-700 data-[state=checked]:primary-200 data-[state=unchecked]:neutral-300 focus-within:neutral-800",bg:"data-[state=checked]:primary-400 data-[state=unchecked]:neutral-300 data-[state=checked]:dark:primary-400/80 dark:data-[state=unchecked]:neutral-800",relative:"","h-7":"",w:"12.5","rounded-full":"",shadow:"sm focus-within:shadow-neutral-800 focus-within:[0_0_0_1px] "},{default:_(()=>[$(i(he),{"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"]))}}),be={flex:"~ col gap-4"},_e={flex:"~ row","items-center":"","gap-2":""},ge={flex:"1"},xe={class:"flex items-center gap-1 text-sm font-medium"},Ve={class:"text-xs text-neutral-500 dark:text-neutral-400"},Te=c({__name:"FieldCheckbox",props:q({label:null,description:null},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,a=C(t,"modelValue");return(o,l)=>(d(),g("label",be,[f("div",_e,[f("div",ge,[f("div",xe,x(e.label),1),f("div",Ve,x(e.description),1)]),$(ye,{modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=r=>a.value=r)},null,8,["modelValue"])])]))}}),$e=["min","max","step"],ke=c({__name:"Range",props:q({min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1},thumbColor:{default:"#9090906e"},trackColor:{default:"gray"},trackValueColor:{default:"red"}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,a=C(t,"modelValue"),o=v(()=>e.min*1e4),l=v(()=>e.max*1e4),r=v(()=>e.step*1e4),n=V(),u=v({get:()=>a.value*1e4,set:p=>{a.value=p/1e4,m()}});P(()=>{m()});function m(){n.value&&(n.value.style.setProperty("--value",n.value.value),n.value.style.setProperty("--min",n.value.min?n.value.min:e.min.toString()),n.value.style.setProperty("--max",n.value.max?n.value.max:e.max.toString()))}function h(p){const s=p.target;s.style.setProperty("--value",s.value)}return(p,s)=>Z((d(),g("input",{ref_key:"sliderRef",ref:n,"onUpdate:modelValue":s[0]||(s[0]=y=>u.value=y),type:"range",min:o.value,max:l.value,step:r.value,class:"slider-progress form_input-range",onInput:h},null,40,$e)),[[ee,u.value,void 0,{number:!0}]])}}),we=B(ke,[["__scopeId","data-v-d88ffd28"]]),Ce={flex:"~ col gap-4"},Ee={flex:"~ row","items-center":"","gap-2":""},Se={flex:"1"},Me={class:"flex items-center gap-1 text-sm font-medium"},Be={class:"text-xs text-neutral-500 dark:text-neutral-400"},je={"font-mono":""},qe={flex:"~ row","items-center":"","gap-2":""},Ie=c({__name:"FieldRange",props:q({min:null,max:null,step:null,label:null,description:null,formatValue:{type:Function}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,a=C(t,"modelValue");return(o,l)=>{var r;return d(),g("label",Ce,[f("div",Ee,[f("div",Se,[f("div",Me,x(t.label),1),f("div",Be,x(t.description),1)]),f("span",je,x(((r=e.formatValue)==null?void 0:r.call(e,a.value))||a.value),1)]),f("div",qe,[$(we,{modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=n=>a.value=n),min:t.min||0,max:t.max||1,step:t.step||.01,"w-full":""},null,8,["modelValue","min","max","step"])])])}}});export{Ie as _,Te as a,Re as b}; diff --git a/assets/HeaderLink--5c4L7nq.js b/assets/HeaderLink-Ct9jmG8_.js similarity index 90% rename from assets/HeaderLink--5c4L7nq.js rename to assets/HeaderLink-Ct9jmG8_.js index 40654e0b622bbd5825a9cd7d2964765b5f0261f9..92a9d2ca82dba7a1e070c86da0b9e039bcf44f91 100644 --- a/assets/HeaderLink--5c4L7nq.js +++ b/assets/HeaderLink-Ct9jmG8_.js @@ -1 +1 @@ -import{d as n,ca as r,bk as l,u as e,c3 as _,o as s,bl as d,c as t,a,c2 as i}from"./index-WDP_Z4A8.js";const k="/assets/logo-dark-CO0kwKsz.svg",p="/assets/logo-D6zeZTFl.svg",u=["src"],m=["src"],g=n({__name:"HeaderLink",setup(x){const c=r();return(f,o)=>(s(),l(e(_),{to:"/",flex:"~","items-center":"","gap-2":"","px-2":"","text-nowrap":"","text-2xl":"","outline-none":""},{default:d(()=>[e(c)?(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,__:[0]}))}}),w=i(g,[["__scopeId","data-v-496b6cde"]]);export{w as H}; +import{d as n,ca as r,bk as l,u as e,c3 as _,o as s,bl as d,c as t,a,c2 as i}from"./index-8LjpXIG7.js";const k="/assets/logo-dark-CO0kwKsz.svg",p="/assets/logo-D6zeZTFl.svg",u=["src"],m=["src"],g=n({__name:"HeaderLink",setup(x){const c=r();return(f,o)=>(s(),l(e(_),{to:"/",flex:"~","items-center":"","gap-2":"","px-2":"","text-nowrap":"","text-2xl":"","outline-none":""},{default:d(()=>[e(c)?(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,__:[0]}))}}),w=i(g,[["__scopeId","data-v-496b6cde"]]);export{w as H}; diff --git a/assets/IconAnimation.vue_vue_type_script_setup_true_lang-Bo8-R3ZB.js b/assets/IconAnimation.vue_vue_type_script_setup_true_lang-CT2O6kWS.js similarity index 95% rename from assets/IconAnimation.vue_vue_type_script_setup_true_lang-Bo8-R3ZB.js rename to assets/IconAnimation.vue_vue_type_script_setup_true_lang-CT2O6kWS.js index 8b91dbfa6409caececfa1f96e66a7a89aaac3c00..7755d3a3840618366dd7883f4dee5d9ad7af2c2f 100644 --- a/assets/IconAnimation.vue_vue_type_script_setup_true_lang-Bo8-R3ZB.js +++ b/assets/IconAnimation.vue_vue_type_script_setup_true_lang-CT2O6kWS.js @@ -1 +1 @@ -import{d as m,e as s,w as p,f,c as h,o as x,a3 as l,a as u,X as y}from"./index-WDP_Z4A8.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=f(()=>({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(),h("div",{"pointer-events-none":"",fixed:"",w:"100dvw",h:"100dvh",style:l({zIndex:r.value?a.zIndex:void 0})},[u("div",{fixed:"","inset-0":"","bg-primary-500":"","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,e as s,w as p,f,c as h,o as x,a3 as l,a as u,X as y}from"./index-8LjpXIG7.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=f(()=>({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(),h("div",{"pointer-events-none":"",fixed:"",w:"100dvw",h:"100dvh",style:l({zIndex:r.value?a.zIndex:void 0})},[u("div",{fixed:"","inset-0":"","bg-primary-500":"","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/IconItem-CdLibJxT.js b/assets/IconItem-rhhSEiTz.js similarity index 87% rename from assets/IconItem-CdLibJxT.js rename to assets/IconItem-rhhSEiTz.js index ba44cdfede42a1b46540f0e7612f915acc5f4278..535c9f72430e01128e615224e5f4c65b3fade715 100644 --- a/assets/IconItem-CdLibJxT.js +++ b/assets/IconItem-rhhSEiTz.js @@ -1 +1 @@ -import{d as l,a2 as s,bk as c,o as n,bl as d,a as t,c as u,W as o,bh as m,Y as a,X as p,c2 as x}from"./index-WDP_Z4A8.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";const h={"z-1":"","flex-1":""},k={"text-lg":"","font-thin":"",class:"menu-icon-item-title",transition:"all ease-in-out duration-400"},v={text:"sm neutral-500 dark:neutral-400",class:"menu-icon-item-description",transition:"all ease-in-out duration-400"},_=l({__name:"IconItem",props:{title:null,description:null,icon:null,iconTemplate:{type:Boolean},to:null},setup(e){return(i,f)=>{const r=s("RouterLink");return n(),c(r,{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:e.to},{default:d(()=>[t("div",h,[t("div",k,a(e.title),1),t("div",v,[t("span",null,a(e.description),1)])]),typeof e.icon=="string"?(n(),u("div",{key:0,class:p(["menu-icon-item-icon",[e.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)):o("",!0),e.iconTemplate?m(i.$slots,"icon",{key:1},void 0,!0):o("",!0)]),_:3},8,["to"])}}}),y=x(_,[["__scopeId","data-v-b1037d36"]]);export{y as I}; +import{d as l,a2 as s,bk as c,o as n,bl as d,a as t,c as u,W as o,bh as m,Y as a,X as p,c2 as x}from"./index-8LjpXIG7.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";const h={"z-1":"","flex-1":""},k={"text-lg":"","font-thin":"",class:"menu-icon-item-title",transition:"all ease-in-out duration-400"},v={text:"sm neutral-500 dark:neutral-400",class:"menu-icon-item-description",transition:"all ease-in-out duration-400"},_=l({__name:"IconItem",props:{title:null,description:null,icon:null,iconTemplate:{type:Boolean},to:null},setup(e){return(i,f)=>{const r=s("RouterLink");return n(),c(r,{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:e.to},{default:d(()=>[t("div",h,[t("div",k,a(e.title),1),t("div",v,[t("span",null,a(e.description),1)])]),typeof e.icon=="string"?(n(),u("div",{key:0,class:p(["menu-icon-item-icon",[e.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)):o("",!0),e.iconTemplate?m(i.$slots,"icon",{key:1},void 0,!0):o("",!0)]),_:3},8,["to"])}}}),y=x(_,[["__scopeId","data-v-b1037d36"]]);export{y as I}; diff --git a/assets/IconStatusItem-B9Mlqc3P.js b/assets/IconStatusItem-BuPKAtbo.js similarity index 94% rename from assets/IconStatusItem-B9Mlqc3P.js rename to assets/IconStatusItem-BuPKAtbo.js index a990354b6d3830bbcf0fbd88354e0c43ce33cb84..3165fd34768491ebc924954f10aa22f341042bee 100644 --- a/assets/IconStatusItem-B9Mlqc3P.js +++ b/assets/IconStatusItem-BuPKAtbo.js @@ -1 +1 @@ -import{d as u,a2 as c,c as e,o as n,b as d,a as o,bl as m,W as a,Y as i,X as s,c2 as _}from"./index-WDP_Z4A8.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.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-thin":"",class:"menu-icon-status-item-title",transition:"all ease-in-out duration-400"},f={text:"sm neutral-500 dark:neutral-400",class:"menu-icon-status-item-description",transition:"all ease-in-out duration-400"},k=["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(I,C)=>{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",f,[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,k)):a("",!0)]),_:1},8,["to"]),o("div",x,[t.configured?(n(),e("div",v)):(n(),e("div",y))])])}}}),B=_(b,[["__scopeId","data-v-f23cce59"]]);export{B as I}; +import{d as u,a2 as c,c as e,o as n,b as d,a as o,bl as m,W as a,Y as i,X as s,c2 as _}from"./index-8LjpXIG7.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.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-thin":"",class:"menu-icon-status-item-title",transition:"all ease-in-out duration-400"},f={text:"sm neutral-500 dark:neutral-400",class:"menu-icon-status-item-description",transition:"all ease-in-out duration-400"},k=["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(I,C)=>{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",f,[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,k)):a("",!0)]),_:1},8,["to"]),o("div",x,[t.configured?(n(),e("div",v)):(n(),e("div",y))])])}}}),B=_(b,[["__scopeId","data-v-f23cce59"]]);export{B as I}; diff --git a/assets/Input.vue_vue_type_script_setup_true_lang-C4baR55j.js b/assets/Input.vue_vue_type_script_setup_true_lang-CpaCGrgF.js similarity index 91% rename from assets/Input.vue_vue_type_script_setup_true_lang-C4baR55j.js rename to assets/Input.vue_vue_type_script_setup_true_lang-CpaCGrgF.js index 2f63c21206da2803d3921d57e6da91aba9999dcb..f4b31a35806ec1f04d515530a43288d9fa5595f1 100644 --- a/assets/Input.vue_vue_type_script_setup_true_lang-C4baR55j.js +++ b/assets/Input.vue_vue_type_script_setup_true_lang-CpaCGrgF.js @@ -1 +1 @@ -import{d as r,cf as n,cg as u,bm as d,d0 as s,o as i,c as m}from"./index-WDP_Z4A8.js";const p=["type"],y=r({__name:"Input",props:n({type:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const l=e,t=u(e,"modelValue");return(c,a)=>d((i(),m("input",{"onUpdate:modelValue":a[0]||(a[0]=o=>t.value=o),type:l.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,p)),[[s,t.value]])}});export{y as _}; +import{d as r,cf as n,cg as u,bm as d,d0 as s,o as i,c as m}from"./index-8LjpXIG7.js";const p=["type"],y=r({__name:"Input",props:n({type:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const l=e,t=u(e,"modelValue");return(c,a)=>d((i(),m("input",{"onUpdate:modelValue":a[0]||(a[0]=o=>t.value=o),type:l.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,p)),[[s,t.value]])}});export{y as _}; diff --git a/assets/InputFile.vue_vue_type_script_setup_true_lang-Bt1GPBFc.js b/assets/InputFile.vue_vue_type_script_setup_true_lang-CAuLzFBg.js similarity index 96% rename from assets/InputFile.vue_vue_type_script_setup_true_lang-Bt1GPBFc.js rename to assets/InputFile.vue_vue_type_script_setup_true_lang-CAuLzFBg.js index 8dab1f75e36b7b9b95f72e6e7b106bb69a26019a..ef6f29625947d53980c45c9f4b3eba867b16af23 100644 --- a/assets/InputFile.vue_vue_type_script_setup_true_lang-Bt1GPBFc.js +++ b/assets/InputFile.vue_vue_type_script_setup_true_lang-CAuLzFBg.js @@ -1 +1 @@ -import{d as g,cf as b,cg as v,e as p,cj as y,c as i,o as n,X as m,u as t,a as l,bh as x}from"./index-WDP_Z4A8.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 c(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]=f=>a.value=!0),onDragleave:e[1]||(e[1]=f=>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:c},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,cf as b,cg as v,e as p,cj as y,c as i,o as n,X as m,u as t,a as l,bh as x}from"./index-8LjpXIG7.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 c(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]=f=>a.value=!0),onDragleave:e[1]||(e[1]=f=>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:c},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-DvSPvuiM.js b/assets/Model.vue_vue_type_script_setup_true_lang-BJUN66rj.js similarity index 95% rename from assets/Model.vue_vue_type_script_setup_true_lang-DvSPvuiM.js rename to assets/Model.vue_vue_type_script_setup_true_lang-BJUN66rj.js index e2d88bd4f229eec2e6de250f75872c861c3defd8..93927571c23cc9a625a43d6268bc116468711173 100644 --- a/assets/Model.vue_vue_type_script_setup_true_lang-DvSPvuiM.js +++ b/assets/Model.vue_vue_type_script_setup_true_lang-BJUN66rj.js @@ -1 +1 @@ -import{e as P,T as Y,A as ue,L as C,a as $,D as se,I as de,l as R,M as ce,b as z}from"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{cp as ve,d as j,e as p,w as d,T as q,U as N,c as X,o as G,bh as U,a8 as F,f as O,ca as fe,be as pe,bs as he,a0 as me,bj as ge,cq as Me,cr as we,c6 as ye,a as be,bi as Se}from"./index-WDP_Z4A8.js";import{r as xe}from"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";const Be=o=>Math.max(0,Math.min(1,o||0)),I=o=>Math.round(Be(o)*255),Fe=ve("rgb"),Ie=o=>{if(o===void 0)return;let t=I(o.r),l=I(o.g),c=I(o.b);return"#"+(1<<24|t<<16|l<<8|c).toString(16).slice(1)},Pe=o=>Ie(Fe(o)),Le=j({__name:"Canvas",props:{width:null,height:null},setup(o,{expose:t}){const l=o,c=p(),i=p(),e=p();async function v(r){C.registerTicker($),P.add(Y),i.value=new ue({width:l.width,height:l.height,backgroundAlpha:0,preserveDrawingBuffer:!0}),e.value=i.value.view,e.value.style.objectFit="contain",r.appendChild(i.value.view)}function y(){var r;i.value&&i.value.renderer.resize(l.width,l.height),(r=i.value)!=null&&r.view&&(i.value.view.width=l.width,i.value.view.height=l.height)}d([()=>l.width,()=>l.height],()=>y()),q(async()=>c.value&&await v(c.value)),N(()=>{var r;return(r=i.value)==null?void 0:r.destroy()});async function b(){return new Promise(h=>{if(!e.value||!i.value)return h(null);i.value.render(),e.value.toBlob(h)})}return t({captureFrame:b}),(r,h)=>(G(),X("div",{ref_key:"containerRef",ref:c,"h-full":"","w-full":""},[U(r.$slots,"default",{app:i.value})],512))}});function V(o,t,l){return(1-l)*o+l*t}function H(o,t){return o+Math.random()*(t-o)}function Ce(){let o=-1,t,l=-1;function c(i,e){(e>=o||et.app),c=F(()=>t.paused),i=F(()=>t.focusAt),e=p(),v=p(0),y=p(0),b=O(()=>Math.max(0,Math.min(100,t.mouthOpenSize))),r=fe(),h=pe(Se),W=O(()=>h.between("sm","md").value||h.smaller("sm").value),J=Ce(),D=he(new se({alpha:.2,blur:0,distance:20,rotation:45}));function K(){return e.value.internalModel.coreModel}function k(a){if(!a.value)return;let n=2.2;W.value&&(n=2.2);const m=t.height*.95/y.value*n,s=t.width*.95/v.value*n,g=Math.min(m,s);a.value.scale.set(g,g)}const{live2dModelFile:S,loadingLive2dModel:M,live2dCurrentMotion:Q,availableLive2dMotions:Z,live2dLoadSource:x,live2dModelUrl:A,themeColorsHue:ee,themeColorsHueDynamic:_}=me(ge()),ae=p({group:"Idle",index:0});async function te(){var T;if(!l.value)return;e.value&&(l.value.stage.removeChild(e.value),e.value.destroy(),e.value=void 0);const a=new C;x.value==="file"?await z.setupLive2DModel(a,[S.value],{autoInteract:!1}):x.value==="url"&&await z.setupLive2DModel(a,A.value,{autoInteract:!1}),e.value=a,l.value.stage.addChild(e.value),v.value=e.value.width,y.value=e.value.height,e.value.x=t.width/2,e.value.y=t.height,e.value.rotation=Math.PI,e.value.skew.x=Math.PI,e.value.anchor.set(.5,.5),k(e),e.value.on("hit",f=>{e.value&&f.includes("body")&&e.value.motion("tap_body")});const n=e.value.internalModel,m=n.coreModel,s=n.motionManager;m.setParameterValueById("ParamMouthOpenY",b.value),Z.value=Object.entries(s.definitions).flatMap(([f,u])=>u?u.map((ne,re)=>({motionName:f,motionIndex:re,fileName:ne.File})):[]).filter(Boolean),s.groups.idle&&((T=s.motionGroups[s.groups.idle])==null||T.forEach(f=>{f._motionData.curves.forEach(u=>{(u.id==="ParamEyeBallX"||u.id==="ParamEyeBallY")&&(u.id=`_${u.id}`)})}));const g=s.update;s.update=function(f,u){return g==null||g.call(this,f,u),s.state.currentGroup===s.groups.idle&&J.update(n,u),!0},s.on("motionStart",(f,u)=>{ae.value={group:f,index:u}}),S.value&&await R.setItem("live2dModel",S.value),M.value=!1}async function le(){if(!l.value)return;C.registerTicker($),P.add(Y),P.add(de);const a=await R.getItem("live2dModel");if(a){S.value=a,x.value="file",M.value=!0;return}if(A.value){x.value="url",M.value=!0;return}M.value=!1}async function oe(a,n){await e.value.motion(a,n,ce.FORCE)}const ie=Me(()=>{e.value&&(e.value.x=t.width/2,e.value.y=t.height,k(e))},100),E=p(),w=p(0);function B(){if(e.value){const a=getComputedStyle(E.value).backgroundColor;D.value.color=Number(Pe(a).replace("#","0x")),e.value.filters=[D.value]}}d([()=>t.width,()=>t.height],()=>ie()),d(r,B,{immediate:!0}),d([e,ee],B);function L(){B(),w.value=requestAnimationFrame(L)}return d(_,()=>{_.value?w.value=requestAnimationFrame(L):(cancelAnimationFrame(w.value),w.value=0)},{immediate:!0}),d(b,a=>K().setParameterValueById("ParamMouthOpenY",a)),d(l,le),d(Q,a=>oe(a.group,a.index)),d(c,a=>{var n,m;a?(n=l.value)==null||n.stop():(m=l.value)==null||m.start()}),d(i,a=>{e.value&&e.value.focus(a.x,a.y)}),we(M,a=>{a&&te()},{debounce:1e3}),q(B),N(()=>{var a;cancelAnimationFrame(w.value),e.value&&((a=l.value)==null||a.stage.removeChild(e.value))}),(a,n)=>(G(),X(ye,null,[be("div",{ref_key:"dropShadowColorComputer",ref:E,hidden:"",bg:"primary-400 dark:primary-500"},null,512),U(a.$slots,"default")],64))}});export{Te as _,Le as a,H as r}; +import{e as P,T as Y,A as ue,L as C,a as $,D as se,I as de,l as R,M as ce,b as z}from"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import{cp as ve,d as j,e as p,w as d,T as q,U as N,c as X,o as G,bh as U,a8 as F,f as O,ca as fe,be as pe,bs as he,a0 as me,bj as ge,cq as Me,cr as we,c6 as ye,a as be,bi as Se}from"./index-8LjpXIG7.js";import{r as xe}from"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";const Be=o=>Math.max(0,Math.min(1,o||0)),I=o=>Math.round(Be(o)*255),Fe=ve("rgb"),Ie=o=>{if(o===void 0)return;let t=I(o.r),l=I(o.g),c=I(o.b);return"#"+(1<<24|t<<16|l<<8|c).toString(16).slice(1)},Pe=o=>Ie(Fe(o)),Le=j({__name:"Canvas",props:{width:null,height:null},setup(o,{expose:t}){const l=o,c=p(),i=p(),e=p();async function v(r){C.registerTicker($),P.add(Y),i.value=new ue({width:l.width,height:l.height,backgroundAlpha:0,preserveDrawingBuffer:!0}),e.value=i.value.view,e.value.style.objectFit="contain",r.appendChild(i.value.view)}function y(){var r;i.value&&i.value.renderer.resize(l.width,l.height),(r=i.value)!=null&&r.view&&(i.value.view.width=l.width,i.value.view.height=l.height)}d([()=>l.width,()=>l.height],()=>y()),q(async()=>c.value&&await v(c.value)),N(()=>{var r;return(r=i.value)==null?void 0:r.destroy()});async function b(){return new Promise(h=>{if(!e.value||!i.value)return h(null);i.value.render(),e.value.toBlob(h)})}return t({captureFrame:b}),(r,h)=>(G(),X("div",{ref_key:"containerRef",ref:c,"h-full":"","w-full":""},[U(r.$slots,"default",{app:i.value})],512))}});function V(o,t,l){return(1-l)*o+l*t}function H(o,t){return o+Math.random()*(t-o)}function Ce(){let o=-1,t,l=-1;function c(i,e){(e>=o||et.app),c=F(()=>t.paused),i=F(()=>t.focusAt),e=p(),v=p(0),y=p(0),b=O(()=>Math.max(0,Math.min(100,t.mouthOpenSize))),r=fe(),h=pe(Se),W=O(()=>h.between("sm","md").value||h.smaller("sm").value),J=Ce(),D=he(new se({alpha:.2,blur:0,distance:20,rotation:45}));function K(){return e.value.internalModel.coreModel}function k(a){if(!a.value)return;let n=2.2;W.value&&(n=2.2);const m=t.height*.95/y.value*n,s=t.width*.95/v.value*n,g=Math.min(m,s);a.value.scale.set(g,g)}const{live2dModelFile:S,loadingLive2dModel:M,live2dCurrentMotion:Q,availableLive2dMotions:Z,live2dLoadSource:x,live2dModelUrl:A,themeColorsHue:ee,themeColorsHueDynamic:_}=me(ge()),ae=p({group:"Idle",index:0});async function te(){var T;if(!l.value)return;e.value&&(l.value.stage.removeChild(e.value),e.value.destroy(),e.value=void 0);const a=new C;x.value==="file"?await z.setupLive2DModel(a,[S.value],{autoInteract:!1}):x.value==="url"&&await z.setupLive2DModel(a,A.value,{autoInteract:!1}),e.value=a,l.value.stage.addChild(e.value),v.value=e.value.width,y.value=e.value.height,e.value.x=t.width/2,e.value.y=t.height,e.value.rotation=Math.PI,e.value.skew.x=Math.PI,e.value.anchor.set(.5,.5),k(e),e.value.on("hit",f=>{e.value&&f.includes("body")&&e.value.motion("tap_body")});const n=e.value.internalModel,m=n.coreModel,s=n.motionManager;m.setParameterValueById("ParamMouthOpenY",b.value),Z.value=Object.entries(s.definitions).flatMap(([f,u])=>u?u.map((ne,re)=>({motionName:f,motionIndex:re,fileName:ne.File})):[]).filter(Boolean),s.groups.idle&&((T=s.motionGroups[s.groups.idle])==null||T.forEach(f=>{f._motionData.curves.forEach(u=>{(u.id==="ParamEyeBallX"||u.id==="ParamEyeBallY")&&(u.id=`_${u.id}`)})}));const g=s.update;s.update=function(f,u){return g==null||g.call(this,f,u),s.state.currentGroup===s.groups.idle&&J.update(n,u),!0},s.on("motionStart",(f,u)=>{ae.value={group:f,index:u}}),S.value&&await R.setItem("live2dModel",S.value),M.value=!1}async function le(){if(!l.value)return;C.registerTicker($),P.add(Y),P.add(de);const a=await R.getItem("live2dModel");if(a){S.value=a,x.value="file",M.value=!0;return}if(A.value){x.value="url",M.value=!0;return}M.value=!1}async function oe(a,n){await e.value.motion(a,n,ce.FORCE)}const ie=Me(()=>{e.value&&(e.value.x=t.width/2,e.value.y=t.height,k(e))},100),E=p(),w=p(0);function B(){if(e.value){const a=getComputedStyle(E.value).backgroundColor;D.value.color=Number(Pe(a).replace("#","0x")),e.value.filters=[D.value]}}d([()=>t.width,()=>t.height],()=>ie()),d(r,B,{immediate:!0}),d([e,ee],B);function L(){B(),w.value=requestAnimationFrame(L)}return d(_,()=>{_.value?w.value=requestAnimationFrame(L):(cancelAnimationFrame(w.value),w.value=0)},{immediate:!0}),d(b,a=>K().setParameterValueById("ParamMouthOpenY",a)),d(l,le),d(Q,a=>oe(a.group,a.index)),d(c,a=>{var n,m;a?(n=l.value)==null||n.stop():(m=l.value)==null||m.start()}),d(i,a=>{e.value&&e.value.focus(a.x,a.y)}),we(M,a=>{a&&te()},{debounce:1e3}),q(B),N(()=>{var a;cancelAnimationFrame(w.value),e.value&&((a=l.value)==null||a.stage.removeChild(e.value))}),(a,n)=>(G(),X(ye,null,[be("div",{ref_key:"dropShadowColorComputer",ref:E,hidden:"",bg:"primary-400 dark:primary-500"},null,512),U(a.$slots,"default")],64))}});export{Te as _,Le as a,H as r}; diff --git a/assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js b/assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-wR1l1PPX.js similarity index 78% rename from assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js rename to assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-wR1l1PPX.js index 11bdba79ef8de4de7db1408213f1ecae7348133b..4cce1039d85b99abfab5f4ec1a94fb0fe18c7ad0 100644 --- a/assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js +++ b/assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-wR1l1PPX.js @@ -1 +1 @@ -import{_ as t}from"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{d as u,cf as n,$ as p,cg as m,f as c,bk as f,o as v,u as a}from"./index-WDP_Z4A8.js";const g=u({__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:d}=p(),o=m(e,"modelValue"),i=c(()=>l.description||`API Key for ${l.providerName}`);return(V,r)=>(v(),f(a(t),{modelValue:o.value,"onUpdate:modelValue":r[0]||(r[0]=s=>o.value=s),label:e.label||a(d)("settings.pages.providers.common.fields.field.api-key.label"),description:i.value,placeholder:e.placeholder,required:e.required,type:"password"},null,8,["modelValue","label","description","placeholder","required"]))}});export{g as _}; +import{_ as t}from"./FieldInput.vue_vue_type_script_setup_true_lang-DdnLISgI.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{d as u,cf as n,$ as p,cg as m,f as c,bk as f,o as v,u as a}from"./index-8LjpXIG7.js";const g=u({__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:d}=p(),o=m(e,"modelValue"),i=c(()=>l.description||`API Key for ${l.providerName}`);return(V,r)=>(v(),f(a(t),{modelValue:o.value,"onUpdate:modelValue":r[0]||(r[0]=s=>o.value=s),label:e.label||a(d)("settings.pages.providers.common.fields.field.api-key.label"),description:i.value,placeholder:e.placeholder,required:e.required,type:"password"},null,8,["modelValue","label","description","placeholder","required"]))}});export{g as _}; diff --git a/assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js b/assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CU_o_t3A.js similarity index 81% rename from assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js rename to assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CU_o_t3A.js index 3a1ab96acee3a7368598323b0c5c548cb669271f..06cbc64c3cf8441bf378be9dbd9de583342e0cd1 100644 --- a/assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js +++ b/assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CU_o_t3A.js @@ -1 +1 @@ -import{_ as p}from"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import{d,e as m,bk as u,o as c,bl as n,a as e,bh as f,Y as _,X as b,cf as v,cg as g,u as V}from"./index-WDP_Z4A8.js";import{_ as x}from"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";const h=["onClick"],B={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},k={"mt-4":""},U=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",B,[e("span",null,_(l.title||"Advanced"),1)]),e("div",{transform:"",transition:"transform duration-250",class:b({"rotate-180":s.visible})},i[0]||(i[0]=[e("div",{"i-solar:alt-arrow-down-bold-duotone":""},null,-1)]),2)],8,h)]),default:n(()=>[e("div",k,[f(o.$slots,"default")])]),_:3}))}}),$=d({__name:"ProviderBaseUrlInput",props:v({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(x),{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{U as _,$ as a}; +import{_ as p}from"./Collapsable.vue_vue_type_script_setup_true_lang-BOcCBViZ.js";import{d,e as m,bk as u,o as c,bl as n,a as e,bh as f,Y as _,X as b,cf as v,cg as g,u as V}from"./index-8LjpXIG7.js";import{_ as x}from"./FieldInput.vue_vue_type_script_setup_true_lang-DdnLISgI.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";const h=["onClick"],B={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},k={"mt-4":""},U=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",B,[e("span",null,_(l.title||"Advanced"),1)]),e("div",{transform:"",transition:"transform duration-250",class:b({"rotate-180":s.visible})},i[0]||(i[0]=[e("div",{"i-solar:alt-arrow-down-bold-duotone":""},null,-1)]),2)],8,h)]),default:n(()=>[e("div",k,[f(o.$slots,"default")])]),_:3}))}}),$=d({__name:"ProviderBaseUrlInput",props:v({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(x),{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{U as _,$ as a}; diff --git a/assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js b/assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-DTczYoOw.js similarity index 94% rename from assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js rename to assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-DTczYoOw.js index 65fdbd173b1f62bed6f9681396f90f838fbf970a..c35d256bbf80f7c3b93a7ef461482a524c7cce62 100644 --- a/assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js +++ b/assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-DTczYoOw.js @@ -1 +1 @@ -import{d as o,c as s,o as a,a as e,bh as i,W as u,Y as l}from"./index-WDP_Z4A8.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,bh as i,W as u,Y as l}from"./index-8LjpXIG7.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-DnYc9j82.js b/assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-D3mbXce4.js similarity index 90% rename from assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js rename to assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-D3mbXce4.js index 7b8669f882e2664cd2eecad7d1312c064b674495..b2bb13e4c536492810db1f1853ead99610a05ed7 100644 --- a/assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js +++ b/assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-D3mbXce4.js @@ -1 +1 @@ -import{d as a,c5 as i,c as o,o as t,bh as s,bm as c,a as l,X as d,c6 as p}from"./index-WDP_Z4A8.js";const m={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":""},_=a({__name:"ProviderSettingsLayout",props:{providerName:null,providerIcon:null,providerIconColor:null,onBack:{type:Function}},setup(e){return(n,u)=>{const r=i("motion");return t(),o(p,null,[s(n.$slots,"default"),c((t(),o("div",m,[l("div",{text:"60",class:d(e.providerIcon||e.providerIconColor)},null,2)])),[[r]])],64)}}});export{_}; +import{d as a,c5 as i,c as o,o as t,bh as s,bm as c,a as l,X as d,c6 as p}from"./index-8LjpXIG7.js";const m={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":""},_=a({__name:"ProviderSettingsLayout",props:{providerName:null,providerIcon:null,providerIconColor:null,onBack:{type:Function}},setup(e){return(n,u)=>{const r=i("motion");return t(),o(p,null,[s(n.$slots,"default"),c((t(),o("div",m,[l("div",{text:"60",class:d(e.providerIcon||e.providerIconColor)},null,2)])),[[r]])],64)}}});export{_}; diff --git a/assets/RadioCardSimple-BzEaEqwF.js b/assets/RadioCardSimple-DNdKoxoJ.js similarity index 96% rename from assets/RadioCardSimple-BzEaEqwF.js rename to assets/RadioCardSimple-DNdKoxoJ.js index c7c2dad71467b9e1405d07c09d839241c4f695fb..f83f9bb46d5bc63b9e3d5e6a8a3c1af5c9c35c79 100644 --- a/assets/RadioCardSimple-BzEaEqwF.js +++ b/assets/RadioCardSimple-DNdKoxoJ.js @@ -1 +1 @@ -import{d as g,cf as b,cg as w,e as f,c as n,o as d,X as o,bm as V,a as t,c9 as I,W as v,Y as c,b as $,bl as S,ck as k,u as B,c2 as C,f as T,cd as z,c6 as E,c7 as N,bk as D}from"./index-WDP_Z4A8.js";import{_ as P}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import{_ as U}from"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";const q=["checked","name","value"],L={class:"relative mr-3 mt-0.5 flex-shrink-0"},j={class:"w-full flex flex-col gap-2"},F={class:"flex items-center"},Q={key:0,class:"relative"},W=["title"],X={key:1,class:"mt-2"},Y=g({__name:"RadioCardDetail",props:b({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=f(!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,q),[[I,a.value]]),t("div",L,[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",j,[t("div",F,[t("span",{class:o(["line-clamp-1 font-thin",[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",Q,[$(B(P),null,{default:S(()=>[!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,W)):(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:"mt-0.5 inline-flex items-center text-xs text-primary-500 dark:text-primary-600",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",X,[$(B(U),{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))}}),A=C(Y,[["__scopeId","data-v-01e1298e"]]),G={class:"radio-card-detail-many-select"},H={key:0,class:"relative","inline-flex":"~","w-full":"","items-center":""},J=["placeholder"],K={class:"mt-4 space-y-2"},O={key:0,class:"text-sm text-neutral-500 dark:text-neutral-400"},Z={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"},_={class:"flex flex-col"},ee={class:"font-medium"},te={class:"text-sm text-amber-600 dark:text-amber-400"},ae={class:"relative"},le=g({__name:"RadioCardManySelect",props:b({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:b(["update:customValue"],["update:modelValue"]),setup(e,{emit:a}){const m=e,s=a,x=w(e,"modelValue"),r=f(""),i=f(!1),R=f(""),h=T(()=>{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 M(p){R.value=p,s("update:customValue",p)}return(p,l)=>(d(),n("div",G,[e.searchable?(d(),n("div",H,[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,J),[[z,r.value]])])):v("",!0),t("div",K,[r.value?(d(),n("div",O,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",Z,[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",_,[t("span",ee,c(e.searchNoResultsTitle),1),t("span",te,c(e.searchNoResultsDescription.replace("{query}",r.value)),1)])])):v("",!0),t("div",ae,[t("div",{class:o(["grid auto-cols-[350px] grid-flow-col max-h-[calc(100dvh-7lh)] gap-4 overflow-x-auto pb-4 scrollbar-none",[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(E,null,N(h.value,u=>(d(),D(A,{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=>M(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)])])]))}}),me=C(le,[["__scopeId","data-v-7ad6d626"]]),re=["checked","name","value"],oe={flex:"~ col","min-h-16":"","w-full":"","items-start":"","justify-center":"","pb-2":"","pl-5":"","pr-4":"","pt-2":""},de=g({__name:"RadioCardSimple",props:b({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:"absolute opacity-0 [&:checked+div]:border-primary-500 [&:checked+div_.radio-dot]:opacity-100 dark:[&:checked+div]:border-primary-400"},null,8,re),[[I,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",oe,[t("span",{class:o(["radio-item-name font-thin",[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))}}),ve=C(de,[["__scopeId","data-v-50bfb5e4"]]);export{me as R,ve as a}; +import{d as g,cf as b,cg as w,e as f,c as n,o as d,X as o,bm as V,a as t,c9 as I,W as v,Y as c,b as $,bl as S,ck as k,u as B,c2 as C,f as T,cd as z,c6 as E,c7 as N,bk as D}from"./index-8LjpXIG7.js";import{_ as P}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-DyyWKgKi.js";import{_ as U}from"./Input.vue_vue_type_script_setup_true_lang-CpaCGrgF.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";const q=["checked","name","value"],L={class:"relative mr-3 mt-0.5 flex-shrink-0"},j={class:"w-full flex flex-col gap-2"},F={class:"flex items-center"},Q={key:0,class:"relative"},W=["title"],X={key:1,class:"mt-2"},Y=g({__name:"RadioCardDetail",props:b({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=f(!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,q),[[I,a.value]]),t("div",L,[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",j,[t("div",F,[t("span",{class:o(["line-clamp-1 font-thin",[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",Q,[$(B(P),null,{default:S(()=>[!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,W)):(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:"mt-0.5 inline-flex items-center text-xs text-primary-500 dark:text-primary-600",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",X,[$(B(U),{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))}}),A=C(Y,[["__scopeId","data-v-01e1298e"]]),G={class:"radio-card-detail-many-select"},H={key:0,class:"relative","inline-flex":"~","w-full":"","items-center":""},J=["placeholder"],K={class:"mt-4 space-y-2"},O={key:0,class:"text-sm text-neutral-500 dark:text-neutral-400"},Z={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"},_={class:"flex flex-col"},ee={class:"font-medium"},te={class:"text-sm text-amber-600 dark:text-amber-400"},ae={class:"relative"},le=g({__name:"RadioCardManySelect",props:b({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:b(["update:customValue"],["update:modelValue"]),setup(e,{emit:a}){const m=e,s=a,x=w(e,"modelValue"),r=f(""),i=f(!1),R=f(""),h=T(()=>{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 M(p){R.value=p,s("update:customValue",p)}return(p,l)=>(d(),n("div",G,[e.searchable?(d(),n("div",H,[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,J),[[z,r.value]])])):v("",!0),t("div",K,[r.value?(d(),n("div",O,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",Z,[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",_,[t("span",ee,c(e.searchNoResultsTitle),1),t("span",te,c(e.searchNoResultsDescription.replace("{query}",r.value)),1)])])):v("",!0),t("div",ae,[t("div",{class:o(["grid auto-cols-[350px] grid-flow-col max-h-[calc(100dvh-7lh)] gap-4 overflow-x-auto pb-4 scrollbar-none",[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(E,null,N(h.value,u=>(d(),D(A,{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=>M(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)])])]))}}),me=C(le,[["__scopeId","data-v-7ad6d626"]]),re=["checked","name","value"],oe={flex:"~ col","min-h-16":"","w-full":"","items-start":"","justify-center":"","pb-2":"","pl-5":"","pr-4":"","pt-2":""},de=g({__name:"RadioCardSimple",props:b({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:"absolute opacity-0 [&:checked+div]:border-primary-500 [&:checked+div_.radio-dot]:opacity-100 dark:[&:checked+div]:border-primary-400"},null,8,re),[[I,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",oe,[t("span",{class:o(["radio-item-name font-thin",[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))}}),ve=C(de,[["__scopeId","data-v-50bfb5e4"]]);export{me as R,ve as a}; diff --git a/assets/Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js b/assets/Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js similarity index 99% rename from assets/Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js rename to assets/Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js index c1797dd9b260f661e086f0a64cc708d0e28bed77..aebc25f88d07f6ccf935f1d3a31b2a4674f8d766 100644 --- a/assets/Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js +++ b/assets/Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js @@ -1 +1 @@ -import{d as U,cY as je,cZ as Ve,a2 as te,c as ie,o as B,a as H,W as ce,c6 as qe,bk as le,bh as V,a3 as Z,c_ as Ge,X as ze,_ as Ue,c$ as Xe,bl as fe,b as Ye,ci as Ke,cu as Ze,cv as Qe}from"./index-WDP_Z4A8.js";import{c as Je,r as Q,o as et,j as tt,s as it,f as ot,d as st,a as nt}from"./floating-ui.core-CgBsuaUc.js";function m(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _(e){return m(e).getComputedStyle(e)}const ge=Math.min,O=Math.max,q=Math.round;function He(e){const t=_(e);let i=parseFloat(t.width),o=parseFloat(t.height);const s=e.offsetWidth,n=e.offsetHeight,r=q(i)!==s||q(o)!==n;return r&&(i=s,o=n),{width:i,height:o,fallback:r}}function N(e){return Be(e)?(e.nodeName||"").toLowerCase():""}let I;function Ae(){if(I)return I;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(I=e.brands.map(t=>t.brand+"/"+t.version).join(" "),I):navigator.userAgent}function b(e){return e instanceof m(e).HTMLElement}function C(e){return e instanceof m(e).Element}function Be(e){return e instanceof m(e).Node}function me(e){return typeof ShadowRoot>"u"?!1:e instanceof m(e).ShadowRoot||e instanceof ShadowRoot}function X(e){const{overflow:t,overflowX:i,overflowY:o,display:s}=_(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+i)&&!["inline","contents"].includes(s)}function rt(e){return["table","td","th"].includes(N(e))}function oe(e){const t=/firefox/i.test(Ae()),i=_(e),o=i.backdropFilter||i.WebkitBackdropFilter;return i.transform!=="none"||i.perspective!=="none"||!!o&&o!=="none"||t&&i.willChange==="filter"||t&&!!i.filter&&i.filter!=="none"||["transform","perspective"].some(s=>i.willChange.includes(s))||["paint","layout","strict","content"].some(s=>{const n=i.contain;return n!=null&&n.includes(s)})}function ke(){return!/^((?!chrome|android).)*safari/i.test(Ae())}function de(e){return["html","body","#document"].includes(N(e))}function Oe(e){return C(e)?e:e.contextElement}const Le={x:1,y:1};function k(e){const t=Oe(e);if(!b(t))return Le;const i=t.getBoundingClientRect(),{width:o,height:s,fallback:n}=He(t);let r=(n?q(i.width):i.width)/o,a=(n?q(i.height):i.height)/s;return r&&Number.isFinite(r)||(r=1),a&&Number.isFinite(a)||(a=1),{x:r,y:a}}function R(e,t,i,o){var s,n;t===void 0&&(t=!1),i===void 0&&(i=!1);const r=e.getBoundingClientRect(),a=Oe(e);let l=Le;t&&(o?C(o)&&(l=k(o)):l=k(e));const d=a?m(a):window,c=!ke()&&i;let h=(r.left+(c&&((s=d.visualViewport)==null?void 0:s.offsetLeft)||0))/l.x,u=(r.top+(c&&((n=d.visualViewport)==null?void 0:n.offsetTop)||0))/l.y,y=r.width/l.x,v=r.height/l.y;if(a){const g=m(a),T=o&&C(o)?m(o):o;let f=g.frameElement;for(;f&&o&&T!==g;){const $=k(f),F=f.getBoundingClientRect(),ue=getComputedStyle(f);F.x+=(f.clientLeft+parseFloat(ue.paddingLeft))*$.x,F.y+=(f.clientTop+parseFloat(ue.paddingTop))*$.y,h*=$.x,u*=$.y,y*=$.x,v*=$.y,h+=F.x,u+=F.y,f=m(f).frameElement}}return{width:y,height:v,top:u,right:h+y,bottom:u+v,left:h,x:h,y:u}}function P(e){return((Be(e)?e.ownerDocument:e.document)||window.document).documentElement}function Y(e){return C(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Me(e){return R(P(e)).left+Y(e).scrollLeft}function D(e){if(N(e)==="html")return e;const t=e.assignedSlot||e.parentNode||me(e)&&e.host||P(e);return me(t)?t.host:t}function Re(e){const t=D(e);return de(t)?t.ownerDocument.body:b(t)&&X(t)?t:Re(t)}function G(e,t){var i;t===void 0&&(t=[]);const o=Re(e),s=o===((i=e.ownerDocument)==null?void 0:i.body),n=m(o);return s?t.concat(n,n.visualViewport||[],X(o)?o:[]):t.concat(o,G(o))}function we(e,t,i){return t==="viewport"?Q(function(o,s){const n=m(o),r=P(o),a=n.visualViewport;let l=r.clientWidth,d=r.clientHeight,c=0,h=0;if(a){l=a.width,d=a.height;const u=ke();(u||!u&&s==="fixed")&&(c=a.offsetLeft,h=a.offsetTop)}return{width:l,height:d,x:c,y:h}}(e,i)):C(t)?Q(function(o,s){const n=R(o,!0,s==="fixed"),r=n.top+o.clientTop,a=n.left+o.clientLeft,l=b(o)?k(o):{x:1,y:1};return{width:o.clientWidth*l.x,height:o.clientHeight*l.y,x:a*l.x,y:r*l.y}}(t,i)):Q(function(o){const s=P(o),n=Y(o),r=o.ownerDocument.body,a=O(s.scrollWidth,s.clientWidth,r.scrollWidth,r.clientWidth),l=O(s.scrollHeight,s.clientHeight,r.scrollHeight,r.clientHeight);let d=-n.scrollLeft+Me(o);const c=-n.scrollTop;return _(r).direction==="rtl"&&(d+=O(s.clientWidth,r.clientWidth)-a),{width:a,height:l,x:d,y:c}}(P(e)))}function ye(e){return b(e)&&_(e).position!=="fixed"?e.offsetParent:null}function ve(e){const t=m(e);let i=ye(e);for(;i&&rt(i)&&_(i).position==="static";)i=ye(i);return i&&(N(i)==="html"||N(i)==="body"&&_(i).position==="static"&&!oe(i))?t:i||function(o){let s=D(o);for(;b(s)&&!de(s);){if(oe(s))return s;s=D(s)}return null}(e)||t}function at(e,t,i){const o=b(t),s=P(t),n=R(e,!0,i==="fixed",t);let r={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(o||!o&&i!=="fixed")if((N(t)!=="body"||X(s))&&(r=Y(t)),b(t)){const l=R(t,!0);a.x=l.x+t.clientLeft,a.y=l.y+t.clientTop}else s&&(a.x=Me(s));return{x:n.left+r.scrollLeft-a.x,y:n.top+r.scrollTop-a.y,width:n.width,height:n.height}}const lt={getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:o,strategy:s}=e;const n=i==="clippingAncestors"?function(d,c){const h=c.get(d);if(h)return h;let u=G(d).filter(T=>C(T)&&N(T)!=="body"),y=null;const v=_(d).position==="fixed";let g=v?D(d):d;for(;C(g)&&!de(g);){const T=_(g),f=oe(g);(v?f||y:f||T.position!=="static"||!y||!["absolute","fixed"].includes(y.position))?y=T:u=u.filter($=>$!==g),g=D(g)}return c.set(d,u),u}(t,this._c):[].concat(i),r=[...n,o],a=r[0],l=r.reduce((d,c)=>{const h=we(t,c,s);return d.top=O(h.top,d.top),d.right=ge(h.right,d.right),d.bottom=ge(h.bottom,d.bottom),d.left=O(h.left,d.left),d},we(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:i,strategy:o}=e;const s=b(i),n=P(i);if(i===n)return t;let r={scrollLeft:0,scrollTop:0},a={x:1,y:1};const l={x:0,y:0};if((s||!s&&o!=="fixed")&&((N(i)!=="body"||X(n))&&(r=Y(i)),b(i))){const d=R(i);a=k(i),l.x=d.x+i.clientLeft,l.y=d.y+i.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-r.scrollLeft*a.x+l.x,y:t.y*a.y-r.scrollTop*a.y+l.y}},isElement:C,getDimensions:function(e){return b(e)?He(e):e.getBoundingClientRect()},getOffsetParent:ve,getDocumentElement:P,getScale:k,async getElementRects(e){let{reference:t,floating:i,strategy:o}=e;const s=this.getOffsetParent||ve,n=this.getDimensions;return{reference:at(t,await s(i),o),floating:{x:0,y:0,...await n(i)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>_(e).direction==="rtl"},dt=(e,t,i)=>{const o=new Map,s={platform:lt,...i},n={...s.platform,_c:o};return Je(e,t,{...s,platform:n})},A={disabled:!1,distance:5,skidding:0,container:"body",boundary:void 0,instantMove:!1,disposeTimeout:150,popperTriggers:[],strategy:"absolute",preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,autoHideOnMousedown:!1,themes:{tooltip:{placement:"top",triggers:["hover","focus","touch"],hideTriggers:e=>[...e,"click"],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:"..."},dropdown:{placement:"bottom",triggers:["click"],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:"dropdown",triggers:["hover","focus"],popperTriggers:["hover"],delay:{show:0,hide:400}}}};function se(e,t){let i=A.themes[e]||{},o;do o=i[t],typeof o>"u"?i.$extend?i=A.themes[i.$extend]||{}:(i=null,o=A[t]):i=null;while(i);return o}function pt(e){const t=[e];let i=A.themes[e]||{};do i.$extend&&!i.$resetCss?(t.push(i.$extend),i=A.themes[i.$extend]||{}):i=null;while(i);return t.map(o=>`v-popper--theme-${o}`)}function $e(e){const t=[e];let i=A.themes[e]||{};do i.$extend?(t.push(i.$extend),i=A.themes[i.$extend]||{}):i=null;while(i);return t}let E=!1;if(typeof window<"u"){E=!1;try{const e=Object.defineProperty({},"passive",{get(){E=!0}});window.addEventListener("test",null,e)}catch{}}let De=!1;typeof window<"u"&&typeof navigator<"u"&&(De=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const ht=["auto","top","bottom","left","right"].reduce((e,t)=>e.concat([t,`${t}-start`,`${t}-end`]),[]),_e={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},be={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function Te(e,t){const i=e.indexOf(t);i!==-1&&e.splice(i,1)}function J(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}const w=[];let z=null;const Se={};function xe(e){let t=Se[e];return t||(t=Se[e]=[]),t}let ne=function(){};typeof window<"u"&&(ne=window.Element);function p(e){return function(t){return se(t.theme,e)}}const ee="__floating-vue__popper",Ee=()=>U({name:"VPopper",provide(){return{[ee]:{parentPopper:this}}},inject:{[ee]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:p("disabled")},positioningDisabled:{type:Boolean,default:p("positioningDisabled")},placement:{type:String,default:p("placement"),validator:e=>ht.includes(e)},delay:{type:[String,Number,Object],default:p("delay")},distance:{type:[Number,String],default:p("distance")},skidding:{type:[Number,String],default:p("skidding")},triggers:{type:Array,default:p("triggers")},showTriggers:{type:[Array,Function],default:p("showTriggers")},hideTriggers:{type:[Array,Function],default:p("hideTriggers")},popperTriggers:{type:Array,default:p("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:p("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:p("popperHideTriggers")},container:{type:[String,Object,ne,Boolean],default:p("container")},boundary:{type:[String,ne],default:p("boundary")},strategy:{type:String,validator:e=>["absolute","fixed"].includes(e),default:p("strategy")},autoHide:{type:[Boolean,Function],default:p("autoHide")},handleResize:{type:Boolean,default:p("handleResize")},instantMove:{type:Boolean,default:p("instantMove")},eagerMount:{type:Boolean,default:p("eagerMount")},popperClass:{type:[String,Array,Object],default:p("popperClass")},computeTransformOrigin:{type:Boolean,default:p("computeTransformOrigin")},autoMinSize:{type:Boolean,default:p("autoMinSize")},autoSize:{type:[Boolean,String],default:p("autoSize")},autoMaxSize:{type:Boolean,default:p("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:p("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:p("preventOverflow")},overflowPadding:{type:[Number,String],default:p("overflowPadding")},arrowPadding:{type:[Number,String],default:p("arrowPadding")},arrowOverflow:{type:Boolean,default:p("arrowOverflow")},flip:{type:Boolean,default:p("flip")},shift:{type:Boolean,default:p("shift")},shiftCrossAxis:{type:Boolean,default:p("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:p("noAutoFocus")},disposeTimeout:{type:Number,default:p("disposeTimeout")}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:"",strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},randomId:`popper_${[Math.random(),Date.now()].map(e=>e.toString(36).substring(2,10)).join("_")}`,shownChildren:new Set,lastAutoHide:!0,pendingHide:!1,containsGlobalTarget:!1,isDisposed:!0,mouseDownContains:!1}},computed:{popperId(){return this.ariaId!=null?this.ariaId:this.randomId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide=="function"?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:{...this.classes,popperClass:this.popperClass},result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var e;return(e=this[ee])==null?void 0:e.parentPopper},hasPopperShowTriggerHover(){var e,t;return((e=this.popperTriggers)==null?void 0:e.includes("hover"))||((t=this.popperShowTriggers)==null?void 0:t.includes("hover"))}},watch:{shown:"$_autoShowHide",disabled(e){e?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())},triggers:{handler:"$_refreshListeners",deep:!0},positioningDisabled:"$_refreshListeners",...["placement","distance","skidding","boundary","strategy","overflowPadding","arrowPadding","preventOverflow","shift","shiftCrossAxis","flip"].reduce((e,t)=>(e[t]="$_computePosition",e),{})},created(){this.autoMinSize&&console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'),this.autoMaxSize&&console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.")},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:e=null,skipDelay:t=!1,force:i=!1}={}){var o,s;(o=this.parentPopper)!=null&&o.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(i||!this.disabled)&&(((s=this.parentPopper)==null?void 0:s.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(e,t),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit("update:shown",!0))},hide({event:e=null,skipDelay:t=!1}={}){var i;if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:t}),this.parentPopper.lockedChild=null)},1e3));return}((i=this.parentPopper)==null?void 0:i.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.pendingHide=!1,this.$_scheduleHide(e,t),this.$emit("hide"),this.$emit("update:shown",!1)}},init(){var e;this.isDisposed&&(this.isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=((e=this.referenceNode)==null?void 0:e.call(this))??this.$el,this.$_targetNodes=this.targetNodes().filter(t=>t.nodeType===t.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(".v-popper__inner"),this.$_arrowNode=this.$_popperNode.querySelector(".v-popper__arrow-container"),this.$_swapTargetAttrs("title","data-original-title"),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.isDisposed||(this.isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs("data-original-title","title"))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit("resize"))},async $_computePosition(){if(this.isDisposed||this.positioningDisabled)return;const e={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&e.middleware.push(et({mainAxis:this.distance,crossAxis:this.skidding}));const t=this.placement.startsWith("auto");if(t?e.middleware.push(tt({alignment:this.placement.split("-")[1]??""})):e.placement=this.placement,this.preventOverflow&&(this.shift&&e.middleware.push(it({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!t&&this.flip&&e.middleware.push(ot({padding:this.overflowPadding,boundary:this.boundary}))),e.middleware.push(st({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&e.middleware.push({name:"arrowOverflow",fn:({placement:o,rects:s,middlewareData:n})=>{let r;const{centerOffset:a}=n.arrow;return o.startsWith("top")||o.startsWith("bottom")?r=Math.abs(a)>s.reference.width/2:r=Math.abs(a)>s.reference.height/2,{data:{overflow:r}}}}),this.autoMinSize||this.autoSize){const o=this.autoSize?this.autoSize:this.autoMinSize?"min":null;e.middleware.push({name:"autoSize",fn:({rects:s,placement:n,middlewareData:r})=>{var a;if((a=r.autoSize)!=null&&a.skip)return{};let l,d;return n.startsWith("top")||n.startsWith("bottom")?l=s.reference.width:d=s.reference.height,this.$_innerNode.style[o==="min"?"minWidth":o==="max"?"maxWidth":"width"]=l!=null?`${l}px`:null,this.$_innerNode.style[o==="min"?"minHeight":o==="max"?"maxHeight":"height"]=d!=null?`${d}px`:null,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,e.middleware.push(nt({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:o,availableHeight:s})=>{this.$_innerNode.style.maxWidth=o!=null?`${o}px`:null,this.$_innerNode.style.maxHeight=s!=null?`${s}px`:null}})));const i=await dt(this.$_referenceNode,this.$_popperNode,e);Object.assign(this.result,{x:i.x,y:i.y,placement:i.placement,strategy:i.strategy,arrow:{...i.middlewareData.arrow,...i.middlewareData.arrowOverflow}})},$_scheduleShow(e,t=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),z&&this.instantMove&&z.instantMove&&z!==this.parentPopper){z.$_applyHide(!0),this.$_applyShow(!0);return}t?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide(e,t=!1){if(this.shownChildren.size>0){this.pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(z=this),t?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay(e){const t=this.delay;return parseInt(t&&t[e]||t||0)},async $_applyShow(e=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=e,!this.isShown&&(this.$_ensureTeleport(),await J(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...G(this.$_referenceNode),...G(this.$_popperNode)],"scroll",()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){const t=this.$_referenceNode.getBoundingClientRect(),i=this.$_popperNode.querySelector(".v-popper__wrapper"),o=i.parentNode.getBoundingClientRect(),s=t.x+t.width/2-(o.left+i.offsetLeft),n=t.y+t.height/2-(o.top+i.offsetTop);this.result.transformOrigin=`${s}px ${n}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":""});const e=this.showGroup;if(e){let t;for(let i=0;i0){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e,Te(w,this),w.length===0&&document.body.classList.remove("v-popper--some-open");for(const i of $e(this.theme)){const o=xe(i);Te(o,this),o.length===0&&document.body.classList.remove(`v-popper--some-open--${i}`)}z===this&&(z=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);const t=this.disposeTimeout;t!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},t)),this.$_removeEventListeners("scroll"),this.$emit("apply-hide"),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await J(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.isDisposed)return;let e=this.container;if(typeof e=="string"?e=window.document.querySelector(e):e===!1&&(e=this.$_targetNodes[0].parentNode),!e)throw new Error("No container for popover: "+this.container);e.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){const e=i=>{this.isShown&&!this.$_hideInProgress||(i.usedByTooltip=!0,!this.$_preventShow&&this.show({event:i}))};this.$_registerTriggerListeners(this.$_targetNodes,_e,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],_e,this.popperTriggers,this.popperShowTriggers,e);const t=i=>{i.usedByTooltip||this.hide({event:i})};this.$_registerTriggerListeners(this.$_targetNodes,be,this.triggers,this.hideTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],be,this.popperTriggers,this.popperHideTriggers,t)},$_registerEventListeners(e,t,i){this.$_events.push({targetNodes:e,eventType:t,handler:i}),e.forEach(o=>o.addEventListener(t,i,E?{passive:!0}:void 0))},$_registerTriggerListeners(e,t,i,o,s){let n=i;o!=null&&(n=typeof o=="function"?o(n):o),n.forEach(r=>{const a=t[r];a&&this.$_registerEventListeners(e,a,s)})},$_removeEventListeners(e){const t=[];this.$_events.forEach(i=>{const{targetNodes:o,eventType:s,handler:n}=i;!e||e===s?o.forEach(r=>r.removeEventListener(s,n)):t.push(i)}),this.$_events=t},$_refreshListeners(){this.isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(e,t=!1){this.$_showFrameLocked||(this.hide({event:e}),e.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),t&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(e,t){for(const i of this.$_targetNodes){const o=i.getAttribute(e);o&&(i.removeAttribute(e),i.setAttribute(t,o))}},$_applyAttrsToTarget(e){for(const t of this.$_targetNodes)for(const i in e){const o=e[i];o==null?t.removeAttribute(i):t.setAttribute(i,o)}},$_updateParentShownChildren(e){let t=this.parentPopper;for(;t;)e?t.shownChildren.add(this.randomId):(t.shownChildren.delete(this.randomId),t.pendingHide&&t.hide()),t=t.parentPopper},$_isAimingPopper(){const e=this.$_referenceNode.getBoundingClientRect();if(L>=e.left&&L<=e.right&&M>=e.top&&M<=e.bottom){const t=this.$_popperNode.getBoundingClientRect(),i=L-S,o=M-x,s=t.left+t.width/2-S+(t.top+t.height/2)-x+t.width+t.height,n=S+i*s,r=x+o*s;return W(S,x,n,r,t.left,t.top,t.left,t.bottom)||W(S,x,n,r,t.left,t.top,t.right,t.top)||W(S,x,n,r,t.right,t.top,t.right,t.bottom)||W(S,x,n,r,t.left,t.bottom,t.right,t.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<"u"&&typeof window<"u"){if(De){const e=E?{passive:!0,capture:!0}:!0;document.addEventListener("touchstart",t=>Ce(t),e),document.addEventListener("touchend",t=>Pe(t,!0),e)}else window.addEventListener("mousedown",e=>Ce(e),!0),window.addEventListener("click",e=>Pe(e,!1),!0);window.addEventListener("resize",ft)}function Ce(e,t){for(let i=0;i=0;o--){const s=w[o];try{const n=s.containsGlobalTarget=s.mouseDownContains||s.popperNode().contains(e.target);s.pendingHide=!1,requestAnimationFrame(()=>{if(s.pendingHide=!1,!i[s.randomId]&&Ne(s,n,e)){if(s.$_handleGlobalClose(e,t),!e.closeAllPopover&&e.closePopover&&n){let a=s.parentPopper;for(;a;)i[a.randomId]=!0,a=a.parentPopper;return}let r=s.parentPopper;for(;r&&Ne(r,r.containsGlobalTarget,e);)r.$_handleGlobalClose(e,t),r=r.parentPopper}})}catch{}}}function Ne(e,t,i){return i.closeAllPopover||i.closePopover&&t||ct(e,i)&&!t}function ct(e,t){if(typeof e.autoHide=="function"){const i=e.autoHide(t);return e.lastAutoHide=i,i}return e.autoHide}function ft(){for(let e=0;e{S=L,x=M,L=e.clientX,M=e.clientY},E?{passive:!0}:void 0);function W(e,t,i,o,s,n,r,a){const l=((r-s)*(t-n)-(a-n)*(e-s))/((a-n)*(i-e)-(r-s)*(o-t)),d=((i-e)*(t-n)-(o-t)*(e-s))/((a-n)*(i-e)-(r-s)*(o-t));return l>=0&&l<=1&&d>=0&&d<=1}const gt={extends:Ee()},pe=(e,t)=>{const i=e.__vccOpts||e;for(const[o,s]of t)i[o]=s;return i};function mt(e,t,i,o,s,n){return B(),ie("div",{ref:"reference",class:ze(["v-popper",{"v-popper--shown":e.slotData.isShown}])},[V(e.$slots,"default",Ze(Qe(e.slotData)))],2)}const wt=pe(gt,[["render",mt]]);function yt(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var i=e.indexOf("Trident/");if(i>0){var o=e.indexOf("rv:");return parseInt(e.substring(o+3,e.indexOf(".",o)),10)}var s=e.indexOf("Edge/");return s>0?parseInt(e.substring(s+5,e.indexOf(".",s)),10):-1}let j;function re(){re.init||(re.init=!0,j=yt()!==-1)}var K={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){re(),Ue(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",j&&this.$el.appendChild(e),e.data="about:blank",j||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!j&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const vt=Xe();je("data-v-b329ee4c");const $t={class:"resize-observer",tabindex:"-1"};Ve();const _t=vt((e,t,i,o,s,n)=>(B(),le("div",$t)));K.render=_t;K.__scopeId="data-v-b329ee4c";K.__file="src/components/ResizeObserver.vue";const Fe=(e="theme")=>({computed:{themeClass(){return pt(this[e])}}}),bt=U({name:"VPopperContent",components:{ResizeObserver:K},mixins:[Fe()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:["hide","resize"],methods:{toPx(e){return e!=null&&!isNaN(e)?`${e}px`:null}}}),Tt=["id","aria-hidden","tabindex","data-popper-placement"],St={ref:"inner",class:"v-popper__inner"},xt=H("div",{class:"v-popper__arrow-outer"},null,-1),Ct=H("div",{class:"v-popper__arrow-inner"},null,-1),Pt=[xt,Ct];function Nt(e,t,i,o,s,n){const r=te("ResizeObserver");return B(),ie("div",{id:e.popperId,ref:"popover",class:ze(["v-popper__popper",[e.themeClass,e.classes.popperClass,{"v-popper__popper--shown":e.shown,"v-popper__popper--hidden":!e.shown,"v-popper__popper--show-from":e.classes.showFrom,"v-popper__popper--show-to":e.classes.showTo,"v-popper__popper--hide-from":e.classes.hideFrom,"v-popper__popper--hide-to":e.classes.hideTo,"v-popper__popper--skip-transition":e.skipTransition,"v-popper__popper--arrow-overflow":e.result&&e.result.arrow.overflow,"v-popper__popper--no-positioning":!e.result}]]),style:Z(e.result?{position:e.result.strategy,transform:`translate3d(${Math.round(e.result.x)}px,${Math.round(e.result.y)}px,0)`}:void 0),"aria-hidden":e.shown?"false":"true",tabindex:e.autoHide?0:void 0,"data-popper-placement":e.result?e.result.placement:void 0,onKeyup:t[2]||(t[2]=Ge(a=>e.autoHide&&e.$emit("hide"),["esc"]))},[H("div",{class:"v-popper__backdrop",onClick:t[0]||(t[0]=a=>e.autoHide&&e.$emit("hide"))}),H("div",{class:"v-popper__wrapper",style:Z(e.result?{transformOrigin:e.result.transformOrigin}:void 0)},[H("div",St,[e.mounted?(B(),ie(qe,{key:0},[H("div",null,[V(e.$slots,"default")]),e.handleResize?(B(),le(r,{key:0,onNotify:t[1]||(t[1]=a=>e.$emit("resize",a))})):ce("",!0)],64)):ce("",!0)],512),H("div",{ref:"arrow",class:"v-popper__arrow-container",style:Z(e.result?{left:e.toPx(e.result.arrow.x),top:e.toPx(e.result.arrow.y)}:void 0)},Pt,4)],4)],46,Tt)}const Ie=pe(bt,[["render",Nt]]),We={methods:{show(...e){return this.$refs.popper.show(...e)},hide(...e){return this.$refs.popper.hide(...e)},dispose(...e){return this.$refs.popper.dispose(...e)},onResize(...e){return this.$refs.popper.onResize(...e)}}};let ae=function(){};typeof window<"u"&&(ae=window.Element);const zt=U({name:"VPopperWrapper",components:{Popper:wt,PopperContent:Ie},mixins:[We,Fe("finalTheme")],props:{theme:{type:String,default:null},referenceNode:{type:Function,default:null},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:void 0},positioningDisabled:{type:Boolean,default:void 0},placement:{type:String,default:void 0},delay:{type:[String,Number,Object],default:void 0},distance:{type:[Number,String],default:void 0},skidding:{type:[Number,String],default:void 0},triggers:{type:Array,default:void 0},showTriggers:{type:[Array,Function],default:void 0},hideTriggers:{type:[Array,Function],default:void 0},popperTriggers:{type:Array,default:void 0},popperShowTriggers:{type:[Array,Function],default:void 0},popperHideTriggers:{type:[Array,Function],default:void 0},container:{type:[String,Object,ae,Boolean],default:void 0},boundary:{type:[String,ae],default:void 0},strategy:{type:String,default:void 0},autoHide:{type:[Boolean,Function],default:void 0},handleResize:{type:Boolean,default:void 0},instantMove:{type:Boolean,default:void 0},eagerMount:{type:Boolean,default:void 0},popperClass:{type:[String,Array,Object],default:void 0},computeTransformOrigin:{type:Boolean,default:void 0},autoMinSize:{type:Boolean,default:void 0},autoSize:{type:[Boolean,String],default:void 0},autoMaxSize:{type:Boolean,default:void 0},autoBoundaryMaxSize:{type:Boolean,default:void 0},preventOverflow:{type:Boolean,default:void 0},overflowPadding:{type:[Number,String],default:void 0},arrowPadding:{type:[Number,String],default:void 0},arrowOverflow:{type:Boolean,default:void 0},flip:{type:Boolean,default:void 0},shift:{type:Boolean,default:void 0},shiftCrossAxis:{type:Boolean,default:void 0},noAutoFocus:{type:Boolean,default:void 0},disposeTimeout:{type:Number,default:void 0}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},computed:{finalTheme(){return this.theme??this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(e=>e!==this.$refs.popperContent.$el)}}});function Ht(e,t,i,o,s,n){const r=te("PopperContent"),a=te("Popper");return B(),le(a,Ke({ref:"popper"},e.$props,{theme:e.finalTheme,"target-nodes":e.getTargetNodes,"popper-node":()=>e.$refs.popperContent.$el,class:[e.themeClass],onShow:t[0]||(t[0]=()=>e.$emit("show")),onHide:t[1]||(t[1]=()=>e.$emit("hide")),"onUpdate:shown":t[2]||(t[2]=l=>e.$emit("update:shown",l)),onApplyShow:t[3]||(t[3]=()=>e.$emit("apply-show")),onApplyHide:t[4]||(t[4]=()=>e.$emit("apply-hide")),onCloseGroup:t[5]||(t[5]=()=>e.$emit("close-group")),onCloseDirective:t[6]||(t[6]=()=>e.$emit("close-directive")),onAutoHide:t[7]||(t[7]=()=>e.$emit("auto-hide")),onResize:t[8]||(t[8]=()=>e.$emit("resize"))}),{default:fe(({popperId:l,isShown:d,shouldMountContent:c,skipTransition:h,autoHide:u,show:y,hide:v,handleResize:g,onResize:T,classes:f,result:$})=>[V(e.$slots,"default",{shown:d,show:y,hide:v}),Ye(r,{ref:"popperContent","popper-id":l,theme:e.finalTheme,shown:d,mounted:c,"skip-transition":h,"auto-hide":u,"handle-resize":g,classes:f,result:$,onHide:v,onResize:T},{default:fe(()=>[V(e.$slots,"popper",{shown:d,hide:v})]),_:2},1032,["popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:3},16,["theme","target-nodes","popper-node","class"])}const he=pe(zt,[["render",Ht]]),At={...he,name:"VDropdown",vPopperTheme:"dropdown"};({...he});({...he});U({name:"VTooltipDirective",components:{Popper:Ee(),PopperContent:Ie},mixins:[We],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:e=>se(e.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>se(e.theme,"loadingContent")},targetNodes:{type:Function,required:!0}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content=="function"},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(e){if(typeof this.content=="function"&&this.$_isShown&&(e||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;const t=++this.$_fetchId,i=this.content(this);i.then?i.then(o=>this.onResult(t,o)):this.onResult(t,i)}},onResult(e,t){e===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=t)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}});const Ot=At;export{Ot as k}; +import{d as U,cY as je,cZ as Ve,a2 as te,c as ie,o as B,a as H,W as ce,c6 as qe,bk as le,bh as V,a3 as Z,c_ as Ge,X as ze,_ as Ue,c$ as Xe,bl as fe,b as Ye,ci as Ke,cu as Ze,cv as Qe}from"./index-8LjpXIG7.js";import{c as Je,r as Q,o as et,j as tt,s as it,f as ot,d as st,a as nt}from"./floating-ui.core-CgBsuaUc.js";function m(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _(e){return m(e).getComputedStyle(e)}const ge=Math.min,O=Math.max,q=Math.round;function He(e){const t=_(e);let i=parseFloat(t.width),o=parseFloat(t.height);const s=e.offsetWidth,n=e.offsetHeight,r=q(i)!==s||q(o)!==n;return r&&(i=s,o=n),{width:i,height:o,fallback:r}}function N(e){return Be(e)?(e.nodeName||"").toLowerCase():""}let I;function Ae(){if(I)return I;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(I=e.brands.map(t=>t.brand+"/"+t.version).join(" "),I):navigator.userAgent}function b(e){return e instanceof m(e).HTMLElement}function C(e){return e instanceof m(e).Element}function Be(e){return e instanceof m(e).Node}function me(e){return typeof ShadowRoot>"u"?!1:e instanceof m(e).ShadowRoot||e instanceof ShadowRoot}function X(e){const{overflow:t,overflowX:i,overflowY:o,display:s}=_(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+i)&&!["inline","contents"].includes(s)}function rt(e){return["table","td","th"].includes(N(e))}function oe(e){const t=/firefox/i.test(Ae()),i=_(e),o=i.backdropFilter||i.WebkitBackdropFilter;return i.transform!=="none"||i.perspective!=="none"||!!o&&o!=="none"||t&&i.willChange==="filter"||t&&!!i.filter&&i.filter!=="none"||["transform","perspective"].some(s=>i.willChange.includes(s))||["paint","layout","strict","content"].some(s=>{const n=i.contain;return n!=null&&n.includes(s)})}function ke(){return!/^((?!chrome|android).)*safari/i.test(Ae())}function de(e){return["html","body","#document"].includes(N(e))}function Oe(e){return C(e)?e:e.contextElement}const Le={x:1,y:1};function k(e){const t=Oe(e);if(!b(t))return Le;const i=t.getBoundingClientRect(),{width:o,height:s,fallback:n}=He(t);let r=(n?q(i.width):i.width)/o,a=(n?q(i.height):i.height)/s;return r&&Number.isFinite(r)||(r=1),a&&Number.isFinite(a)||(a=1),{x:r,y:a}}function R(e,t,i,o){var s,n;t===void 0&&(t=!1),i===void 0&&(i=!1);const r=e.getBoundingClientRect(),a=Oe(e);let l=Le;t&&(o?C(o)&&(l=k(o)):l=k(e));const d=a?m(a):window,c=!ke()&&i;let h=(r.left+(c&&((s=d.visualViewport)==null?void 0:s.offsetLeft)||0))/l.x,u=(r.top+(c&&((n=d.visualViewport)==null?void 0:n.offsetTop)||0))/l.y,y=r.width/l.x,v=r.height/l.y;if(a){const g=m(a),T=o&&C(o)?m(o):o;let f=g.frameElement;for(;f&&o&&T!==g;){const $=k(f),F=f.getBoundingClientRect(),ue=getComputedStyle(f);F.x+=(f.clientLeft+parseFloat(ue.paddingLeft))*$.x,F.y+=(f.clientTop+parseFloat(ue.paddingTop))*$.y,h*=$.x,u*=$.y,y*=$.x,v*=$.y,h+=F.x,u+=F.y,f=m(f).frameElement}}return{width:y,height:v,top:u,right:h+y,bottom:u+v,left:h,x:h,y:u}}function P(e){return((Be(e)?e.ownerDocument:e.document)||window.document).documentElement}function Y(e){return C(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Me(e){return R(P(e)).left+Y(e).scrollLeft}function D(e){if(N(e)==="html")return e;const t=e.assignedSlot||e.parentNode||me(e)&&e.host||P(e);return me(t)?t.host:t}function Re(e){const t=D(e);return de(t)?t.ownerDocument.body:b(t)&&X(t)?t:Re(t)}function G(e,t){var i;t===void 0&&(t=[]);const o=Re(e),s=o===((i=e.ownerDocument)==null?void 0:i.body),n=m(o);return s?t.concat(n,n.visualViewport||[],X(o)?o:[]):t.concat(o,G(o))}function we(e,t,i){return t==="viewport"?Q(function(o,s){const n=m(o),r=P(o),a=n.visualViewport;let l=r.clientWidth,d=r.clientHeight,c=0,h=0;if(a){l=a.width,d=a.height;const u=ke();(u||!u&&s==="fixed")&&(c=a.offsetLeft,h=a.offsetTop)}return{width:l,height:d,x:c,y:h}}(e,i)):C(t)?Q(function(o,s){const n=R(o,!0,s==="fixed"),r=n.top+o.clientTop,a=n.left+o.clientLeft,l=b(o)?k(o):{x:1,y:1};return{width:o.clientWidth*l.x,height:o.clientHeight*l.y,x:a*l.x,y:r*l.y}}(t,i)):Q(function(o){const s=P(o),n=Y(o),r=o.ownerDocument.body,a=O(s.scrollWidth,s.clientWidth,r.scrollWidth,r.clientWidth),l=O(s.scrollHeight,s.clientHeight,r.scrollHeight,r.clientHeight);let d=-n.scrollLeft+Me(o);const c=-n.scrollTop;return _(r).direction==="rtl"&&(d+=O(s.clientWidth,r.clientWidth)-a),{width:a,height:l,x:d,y:c}}(P(e)))}function ye(e){return b(e)&&_(e).position!=="fixed"?e.offsetParent:null}function ve(e){const t=m(e);let i=ye(e);for(;i&&rt(i)&&_(i).position==="static";)i=ye(i);return i&&(N(i)==="html"||N(i)==="body"&&_(i).position==="static"&&!oe(i))?t:i||function(o){let s=D(o);for(;b(s)&&!de(s);){if(oe(s))return s;s=D(s)}return null}(e)||t}function at(e,t,i){const o=b(t),s=P(t),n=R(e,!0,i==="fixed",t);let r={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(o||!o&&i!=="fixed")if((N(t)!=="body"||X(s))&&(r=Y(t)),b(t)){const l=R(t,!0);a.x=l.x+t.clientLeft,a.y=l.y+t.clientTop}else s&&(a.x=Me(s));return{x:n.left+r.scrollLeft-a.x,y:n.top+r.scrollTop-a.y,width:n.width,height:n.height}}const lt={getClippingRect:function(e){let{element:t,boundary:i,rootBoundary:o,strategy:s}=e;const n=i==="clippingAncestors"?function(d,c){const h=c.get(d);if(h)return h;let u=G(d).filter(T=>C(T)&&N(T)!=="body"),y=null;const v=_(d).position==="fixed";let g=v?D(d):d;for(;C(g)&&!de(g);){const T=_(g),f=oe(g);(v?f||y:f||T.position!=="static"||!y||!["absolute","fixed"].includes(y.position))?y=T:u=u.filter($=>$!==g),g=D(g)}return c.set(d,u),u}(t,this._c):[].concat(i),r=[...n,o],a=r[0],l=r.reduce((d,c)=>{const h=we(t,c,s);return d.top=O(h.top,d.top),d.right=ge(h.right,d.right),d.bottom=ge(h.bottom,d.bottom),d.left=O(h.left,d.left),d},we(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:i,strategy:o}=e;const s=b(i),n=P(i);if(i===n)return t;let r={scrollLeft:0,scrollTop:0},a={x:1,y:1};const l={x:0,y:0};if((s||!s&&o!=="fixed")&&((N(i)!=="body"||X(n))&&(r=Y(i)),b(i))){const d=R(i);a=k(i),l.x=d.x+i.clientLeft,l.y=d.y+i.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-r.scrollLeft*a.x+l.x,y:t.y*a.y-r.scrollTop*a.y+l.y}},isElement:C,getDimensions:function(e){return b(e)?He(e):e.getBoundingClientRect()},getOffsetParent:ve,getDocumentElement:P,getScale:k,async getElementRects(e){let{reference:t,floating:i,strategy:o}=e;const s=this.getOffsetParent||ve,n=this.getDimensions;return{reference:at(t,await s(i),o),floating:{x:0,y:0,...await n(i)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>_(e).direction==="rtl"},dt=(e,t,i)=>{const o=new Map,s={platform:lt,...i},n={...s.platform,_c:o};return Je(e,t,{...s,platform:n})},A={disabled:!1,distance:5,skidding:0,container:"body",boundary:void 0,instantMove:!1,disposeTimeout:150,popperTriggers:[],strategy:"absolute",preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,autoHideOnMousedown:!1,themes:{tooltip:{placement:"top",triggers:["hover","focus","touch"],hideTriggers:e=>[...e,"click"],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:"..."},dropdown:{placement:"bottom",triggers:["click"],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:"dropdown",triggers:["hover","focus"],popperTriggers:["hover"],delay:{show:0,hide:400}}}};function se(e,t){let i=A.themes[e]||{},o;do o=i[t],typeof o>"u"?i.$extend?i=A.themes[i.$extend]||{}:(i=null,o=A[t]):i=null;while(i);return o}function pt(e){const t=[e];let i=A.themes[e]||{};do i.$extend&&!i.$resetCss?(t.push(i.$extend),i=A.themes[i.$extend]||{}):i=null;while(i);return t.map(o=>`v-popper--theme-${o}`)}function $e(e){const t=[e];let i=A.themes[e]||{};do i.$extend?(t.push(i.$extend),i=A.themes[i.$extend]||{}):i=null;while(i);return t}let E=!1;if(typeof window<"u"){E=!1;try{const e=Object.defineProperty({},"passive",{get(){E=!0}});window.addEventListener("test",null,e)}catch{}}let De=!1;typeof window<"u"&&typeof navigator<"u"&&(De=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const ht=["auto","top","bottom","left","right"].reduce((e,t)=>e.concat([t,`${t}-start`,`${t}-end`]),[]),_e={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},be={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function Te(e,t){const i=e.indexOf(t);i!==-1&&e.splice(i,1)}function J(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}const w=[];let z=null;const Se={};function xe(e){let t=Se[e];return t||(t=Se[e]=[]),t}let ne=function(){};typeof window<"u"&&(ne=window.Element);function p(e){return function(t){return se(t.theme,e)}}const ee="__floating-vue__popper",Ee=()=>U({name:"VPopper",provide(){return{[ee]:{parentPopper:this}}},inject:{[ee]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:p("disabled")},positioningDisabled:{type:Boolean,default:p("positioningDisabled")},placement:{type:String,default:p("placement"),validator:e=>ht.includes(e)},delay:{type:[String,Number,Object],default:p("delay")},distance:{type:[Number,String],default:p("distance")},skidding:{type:[Number,String],default:p("skidding")},triggers:{type:Array,default:p("triggers")},showTriggers:{type:[Array,Function],default:p("showTriggers")},hideTriggers:{type:[Array,Function],default:p("hideTriggers")},popperTriggers:{type:Array,default:p("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:p("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:p("popperHideTriggers")},container:{type:[String,Object,ne,Boolean],default:p("container")},boundary:{type:[String,ne],default:p("boundary")},strategy:{type:String,validator:e=>["absolute","fixed"].includes(e),default:p("strategy")},autoHide:{type:[Boolean,Function],default:p("autoHide")},handleResize:{type:Boolean,default:p("handleResize")},instantMove:{type:Boolean,default:p("instantMove")},eagerMount:{type:Boolean,default:p("eagerMount")},popperClass:{type:[String,Array,Object],default:p("popperClass")},computeTransformOrigin:{type:Boolean,default:p("computeTransformOrigin")},autoMinSize:{type:Boolean,default:p("autoMinSize")},autoSize:{type:[Boolean,String],default:p("autoSize")},autoMaxSize:{type:Boolean,default:p("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:p("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:p("preventOverflow")},overflowPadding:{type:[Number,String],default:p("overflowPadding")},arrowPadding:{type:[Number,String],default:p("arrowPadding")},arrowOverflow:{type:Boolean,default:p("arrowOverflow")},flip:{type:Boolean,default:p("flip")},shift:{type:Boolean,default:p("shift")},shiftCrossAxis:{type:Boolean,default:p("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:p("noAutoFocus")},disposeTimeout:{type:Number,default:p("disposeTimeout")}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:"",strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},randomId:`popper_${[Math.random(),Date.now()].map(e=>e.toString(36).substring(2,10)).join("_")}`,shownChildren:new Set,lastAutoHide:!0,pendingHide:!1,containsGlobalTarget:!1,isDisposed:!0,mouseDownContains:!1}},computed:{popperId(){return this.ariaId!=null?this.ariaId:this.randomId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide=="function"?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:{...this.classes,popperClass:this.popperClass},result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var e;return(e=this[ee])==null?void 0:e.parentPopper},hasPopperShowTriggerHover(){var e,t;return((e=this.popperTriggers)==null?void 0:e.includes("hover"))||((t=this.popperShowTriggers)==null?void 0:t.includes("hover"))}},watch:{shown:"$_autoShowHide",disabled(e){e?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())},triggers:{handler:"$_refreshListeners",deep:!0},positioningDisabled:"$_refreshListeners",...["placement","distance","skidding","boundary","strategy","overflowPadding","arrowPadding","preventOverflow","shift","shiftCrossAxis","flip"].reduce((e,t)=>(e[t]="$_computePosition",e),{})},created(){this.autoMinSize&&console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'),this.autoMaxSize&&console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.")},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:e=null,skipDelay:t=!1,force:i=!1}={}){var o,s;(o=this.parentPopper)!=null&&o.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(i||!this.disabled)&&(((s=this.parentPopper)==null?void 0:s.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(e,t),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit("update:shown",!0))},hide({event:e=null,skipDelay:t=!1}={}){var i;if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:t}),this.parentPopper.lockedChild=null)},1e3));return}((i=this.parentPopper)==null?void 0:i.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.pendingHide=!1,this.$_scheduleHide(e,t),this.$emit("hide"),this.$emit("update:shown",!1)}},init(){var e;this.isDisposed&&(this.isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=((e=this.referenceNode)==null?void 0:e.call(this))??this.$el,this.$_targetNodes=this.targetNodes().filter(t=>t.nodeType===t.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(".v-popper__inner"),this.$_arrowNode=this.$_popperNode.querySelector(".v-popper__arrow-container"),this.$_swapTargetAttrs("title","data-original-title"),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.isDisposed||(this.isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs("data-original-title","title"))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit("resize"))},async $_computePosition(){if(this.isDisposed||this.positioningDisabled)return;const e={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&e.middleware.push(et({mainAxis:this.distance,crossAxis:this.skidding}));const t=this.placement.startsWith("auto");if(t?e.middleware.push(tt({alignment:this.placement.split("-")[1]??""})):e.placement=this.placement,this.preventOverflow&&(this.shift&&e.middleware.push(it({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!t&&this.flip&&e.middleware.push(ot({padding:this.overflowPadding,boundary:this.boundary}))),e.middleware.push(st({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&e.middleware.push({name:"arrowOverflow",fn:({placement:o,rects:s,middlewareData:n})=>{let r;const{centerOffset:a}=n.arrow;return o.startsWith("top")||o.startsWith("bottom")?r=Math.abs(a)>s.reference.width/2:r=Math.abs(a)>s.reference.height/2,{data:{overflow:r}}}}),this.autoMinSize||this.autoSize){const o=this.autoSize?this.autoSize:this.autoMinSize?"min":null;e.middleware.push({name:"autoSize",fn:({rects:s,placement:n,middlewareData:r})=>{var a;if((a=r.autoSize)!=null&&a.skip)return{};let l,d;return n.startsWith("top")||n.startsWith("bottom")?l=s.reference.width:d=s.reference.height,this.$_innerNode.style[o==="min"?"minWidth":o==="max"?"maxWidth":"width"]=l!=null?`${l}px`:null,this.$_innerNode.style[o==="min"?"minHeight":o==="max"?"maxHeight":"height"]=d!=null?`${d}px`:null,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,e.middleware.push(nt({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:o,availableHeight:s})=>{this.$_innerNode.style.maxWidth=o!=null?`${o}px`:null,this.$_innerNode.style.maxHeight=s!=null?`${s}px`:null}})));const i=await dt(this.$_referenceNode,this.$_popperNode,e);Object.assign(this.result,{x:i.x,y:i.y,placement:i.placement,strategy:i.strategy,arrow:{...i.middlewareData.arrow,...i.middlewareData.arrowOverflow}})},$_scheduleShow(e,t=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),z&&this.instantMove&&z.instantMove&&z!==this.parentPopper){z.$_applyHide(!0),this.$_applyShow(!0);return}t?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide(e,t=!1){if(this.shownChildren.size>0){this.pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(z=this),t?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay(e){const t=this.delay;return parseInt(t&&t[e]||t||0)},async $_applyShow(e=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=e,!this.isShown&&(this.$_ensureTeleport(),await J(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...G(this.$_referenceNode),...G(this.$_popperNode)],"scroll",()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){const t=this.$_referenceNode.getBoundingClientRect(),i=this.$_popperNode.querySelector(".v-popper__wrapper"),o=i.parentNode.getBoundingClientRect(),s=t.x+t.width/2-(o.left+i.offsetLeft),n=t.y+t.height/2-(o.top+i.offsetTop);this.result.transformOrigin=`${s}px ${n}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":""});const e=this.showGroup;if(e){let t;for(let i=0;i0){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e,Te(w,this),w.length===0&&document.body.classList.remove("v-popper--some-open");for(const i of $e(this.theme)){const o=xe(i);Te(o,this),o.length===0&&document.body.classList.remove(`v-popper--some-open--${i}`)}z===this&&(z=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);const t=this.disposeTimeout;t!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},t)),this.$_removeEventListeners("scroll"),this.$emit("apply-hide"),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await J(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.isDisposed)return;let e=this.container;if(typeof e=="string"?e=window.document.querySelector(e):e===!1&&(e=this.$_targetNodes[0].parentNode),!e)throw new Error("No container for popover: "+this.container);e.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){const e=i=>{this.isShown&&!this.$_hideInProgress||(i.usedByTooltip=!0,!this.$_preventShow&&this.show({event:i}))};this.$_registerTriggerListeners(this.$_targetNodes,_e,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],_e,this.popperTriggers,this.popperShowTriggers,e);const t=i=>{i.usedByTooltip||this.hide({event:i})};this.$_registerTriggerListeners(this.$_targetNodes,be,this.triggers,this.hideTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],be,this.popperTriggers,this.popperHideTriggers,t)},$_registerEventListeners(e,t,i){this.$_events.push({targetNodes:e,eventType:t,handler:i}),e.forEach(o=>o.addEventListener(t,i,E?{passive:!0}:void 0))},$_registerTriggerListeners(e,t,i,o,s){let n=i;o!=null&&(n=typeof o=="function"?o(n):o),n.forEach(r=>{const a=t[r];a&&this.$_registerEventListeners(e,a,s)})},$_removeEventListeners(e){const t=[];this.$_events.forEach(i=>{const{targetNodes:o,eventType:s,handler:n}=i;!e||e===s?o.forEach(r=>r.removeEventListener(s,n)):t.push(i)}),this.$_events=t},$_refreshListeners(){this.isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(e,t=!1){this.$_showFrameLocked||(this.hide({event:e}),e.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),t&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(e,t){for(const i of this.$_targetNodes){const o=i.getAttribute(e);o&&(i.removeAttribute(e),i.setAttribute(t,o))}},$_applyAttrsToTarget(e){for(const t of this.$_targetNodes)for(const i in e){const o=e[i];o==null?t.removeAttribute(i):t.setAttribute(i,o)}},$_updateParentShownChildren(e){let t=this.parentPopper;for(;t;)e?t.shownChildren.add(this.randomId):(t.shownChildren.delete(this.randomId),t.pendingHide&&t.hide()),t=t.parentPopper},$_isAimingPopper(){const e=this.$_referenceNode.getBoundingClientRect();if(L>=e.left&&L<=e.right&&M>=e.top&&M<=e.bottom){const t=this.$_popperNode.getBoundingClientRect(),i=L-S,o=M-x,s=t.left+t.width/2-S+(t.top+t.height/2)-x+t.width+t.height,n=S+i*s,r=x+o*s;return W(S,x,n,r,t.left,t.top,t.left,t.bottom)||W(S,x,n,r,t.left,t.top,t.right,t.top)||W(S,x,n,r,t.right,t.top,t.right,t.bottom)||W(S,x,n,r,t.left,t.bottom,t.right,t.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<"u"&&typeof window<"u"){if(De){const e=E?{passive:!0,capture:!0}:!0;document.addEventListener("touchstart",t=>Ce(t),e),document.addEventListener("touchend",t=>Pe(t,!0),e)}else window.addEventListener("mousedown",e=>Ce(e),!0),window.addEventListener("click",e=>Pe(e,!1),!0);window.addEventListener("resize",ft)}function Ce(e,t){for(let i=0;i=0;o--){const s=w[o];try{const n=s.containsGlobalTarget=s.mouseDownContains||s.popperNode().contains(e.target);s.pendingHide=!1,requestAnimationFrame(()=>{if(s.pendingHide=!1,!i[s.randomId]&&Ne(s,n,e)){if(s.$_handleGlobalClose(e,t),!e.closeAllPopover&&e.closePopover&&n){let a=s.parentPopper;for(;a;)i[a.randomId]=!0,a=a.parentPopper;return}let r=s.parentPopper;for(;r&&Ne(r,r.containsGlobalTarget,e);)r.$_handleGlobalClose(e,t),r=r.parentPopper}})}catch{}}}function Ne(e,t,i){return i.closeAllPopover||i.closePopover&&t||ct(e,i)&&!t}function ct(e,t){if(typeof e.autoHide=="function"){const i=e.autoHide(t);return e.lastAutoHide=i,i}return e.autoHide}function ft(){for(let e=0;e{S=L,x=M,L=e.clientX,M=e.clientY},E?{passive:!0}:void 0);function W(e,t,i,o,s,n,r,a){const l=((r-s)*(t-n)-(a-n)*(e-s))/((a-n)*(i-e)-(r-s)*(o-t)),d=((i-e)*(t-n)-(o-t)*(e-s))/((a-n)*(i-e)-(r-s)*(o-t));return l>=0&&l<=1&&d>=0&&d<=1}const gt={extends:Ee()},pe=(e,t)=>{const i=e.__vccOpts||e;for(const[o,s]of t)i[o]=s;return i};function mt(e,t,i,o,s,n){return B(),ie("div",{ref:"reference",class:ze(["v-popper",{"v-popper--shown":e.slotData.isShown}])},[V(e.$slots,"default",Ze(Qe(e.slotData)))],2)}const wt=pe(gt,[["render",mt]]);function yt(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var i=e.indexOf("Trident/");if(i>0){var o=e.indexOf("rv:");return parseInt(e.substring(o+3,e.indexOf(".",o)),10)}var s=e.indexOf("Edge/");return s>0?parseInt(e.substring(s+5,e.indexOf(".",s)),10):-1}let j;function re(){re.init||(re.init=!0,j=yt()!==-1)}var K={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){re(),Ue(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",j&&this.$el.appendChild(e),e.data="about:blank",j||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!j&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const vt=Xe();je("data-v-b329ee4c");const $t={class:"resize-observer",tabindex:"-1"};Ve();const _t=vt((e,t,i,o,s,n)=>(B(),le("div",$t)));K.render=_t;K.__scopeId="data-v-b329ee4c";K.__file="src/components/ResizeObserver.vue";const Fe=(e="theme")=>({computed:{themeClass(){return pt(this[e])}}}),bt=U({name:"VPopperContent",components:{ResizeObserver:K},mixins:[Fe()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:["hide","resize"],methods:{toPx(e){return e!=null&&!isNaN(e)?`${e}px`:null}}}),Tt=["id","aria-hidden","tabindex","data-popper-placement"],St={ref:"inner",class:"v-popper__inner"},xt=H("div",{class:"v-popper__arrow-outer"},null,-1),Ct=H("div",{class:"v-popper__arrow-inner"},null,-1),Pt=[xt,Ct];function Nt(e,t,i,o,s,n){const r=te("ResizeObserver");return B(),ie("div",{id:e.popperId,ref:"popover",class:ze(["v-popper__popper",[e.themeClass,e.classes.popperClass,{"v-popper__popper--shown":e.shown,"v-popper__popper--hidden":!e.shown,"v-popper__popper--show-from":e.classes.showFrom,"v-popper__popper--show-to":e.classes.showTo,"v-popper__popper--hide-from":e.classes.hideFrom,"v-popper__popper--hide-to":e.classes.hideTo,"v-popper__popper--skip-transition":e.skipTransition,"v-popper__popper--arrow-overflow":e.result&&e.result.arrow.overflow,"v-popper__popper--no-positioning":!e.result}]]),style:Z(e.result?{position:e.result.strategy,transform:`translate3d(${Math.round(e.result.x)}px,${Math.round(e.result.y)}px,0)`}:void 0),"aria-hidden":e.shown?"false":"true",tabindex:e.autoHide?0:void 0,"data-popper-placement":e.result?e.result.placement:void 0,onKeyup:t[2]||(t[2]=Ge(a=>e.autoHide&&e.$emit("hide"),["esc"]))},[H("div",{class:"v-popper__backdrop",onClick:t[0]||(t[0]=a=>e.autoHide&&e.$emit("hide"))}),H("div",{class:"v-popper__wrapper",style:Z(e.result?{transformOrigin:e.result.transformOrigin}:void 0)},[H("div",St,[e.mounted?(B(),ie(qe,{key:0},[H("div",null,[V(e.$slots,"default")]),e.handleResize?(B(),le(r,{key:0,onNotify:t[1]||(t[1]=a=>e.$emit("resize",a))})):ce("",!0)],64)):ce("",!0)],512),H("div",{ref:"arrow",class:"v-popper__arrow-container",style:Z(e.result?{left:e.toPx(e.result.arrow.x),top:e.toPx(e.result.arrow.y)}:void 0)},Pt,4)],4)],46,Tt)}const Ie=pe(bt,[["render",Nt]]),We={methods:{show(...e){return this.$refs.popper.show(...e)},hide(...e){return this.$refs.popper.hide(...e)},dispose(...e){return this.$refs.popper.dispose(...e)},onResize(...e){return this.$refs.popper.onResize(...e)}}};let ae=function(){};typeof window<"u"&&(ae=window.Element);const zt=U({name:"VPopperWrapper",components:{Popper:wt,PopperContent:Ie},mixins:[We,Fe("finalTheme")],props:{theme:{type:String,default:null},referenceNode:{type:Function,default:null},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:void 0},positioningDisabled:{type:Boolean,default:void 0},placement:{type:String,default:void 0},delay:{type:[String,Number,Object],default:void 0},distance:{type:[Number,String],default:void 0},skidding:{type:[Number,String],default:void 0},triggers:{type:Array,default:void 0},showTriggers:{type:[Array,Function],default:void 0},hideTriggers:{type:[Array,Function],default:void 0},popperTriggers:{type:Array,default:void 0},popperShowTriggers:{type:[Array,Function],default:void 0},popperHideTriggers:{type:[Array,Function],default:void 0},container:{type:[String,Object,ae,Boolean],default:void 0},boundary:{type:[String,ae],default:void 0},strategy:{type:String,default:void 0},autoHide:{type:[Boolean,Function],default:void 0},handleResize:{type:Boolean,default:void 0},instantMove:{type:Boolean,default:void 0},eagerMount:{type:Boolean,default:void 0},popperClass:{type:[String,Array,Object],default:void 0},computeTransformOrigin:{type:Boolean,default:void 0},autoMinSize:{type:Boolean,default:void 0},autoSize:{type:[Boolean,String],default:void 0},autoMaxSize:{type:Boolean,default:void 0},autoBoundaryMaxSize:{type:Boolean,default:void 0},preventOverflow:{type:Boolean,default:void 0},overflowPadding:{type:[Number,String],default:void 0},arrowPadding:{type:[Number,String],default:void 0},arrowOverflow:{type:Boolean,default:void 0},flip:{type:Boolean,default:void 0},shift:{type:Boolean,default:void 0},shiftCrossAxis:{type:Boolean,default:void 0},noAutoFocus:{type:Boolean,default:void 0},disposeTimeout:{type:Number,default:void 0}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},computed:{finalTheme(){return this.theme??this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(e=>e!==this.$refs.popperContent.$el)}}});function Ht(e,t,i,o,s,n){const r=te("PopperContent"),a=te("Popper");return B(),le(a,Ke({ref:"popper"},e.$props,{theme:e.finalTheme,"target-nodes":e.getTargetNodes,"popper-node":()=>e.$refs.popperContent.$el,class:[e.themeClass],onShow:t[0]||(t[0]=()=>e.$emit("show")),onHide:t[1]||(t[1]=()=>e.$emit("hide")),"onUpdate:shown":t[2]||(t[2]=l=>e.$emit("update:shown",l)),onApplyShow:t[3]||(t[3]=()=>e.$emit("apply-show")),onApplyHide:t[4]||(t[4]=()=>e.$emit("apply-hide")),onCloseGroup:t[5]||(t[5]=()=>e.$emit("close-group")),onCloseDirective:t[6]||(t[6]=()=>e.$emit("close-directive")),onAutoHide:t[7]||(t[7]=()=>e.$emit("auto-hide")),onResize:t[8]||(t[8]=()=>e.$emit("resize"))}),{default:fe(({popperId:l,isShown:d,shouldMountContent:c,skipTransition:h,autoHide:u,show:y,hide:v,handleResize:g,onResize:T,classes:f,result:$})=>[V(e.$slots,"default",{shown:d,show:y,hide:v}),Ye(r,{ref:"popperContent","popper-id":l,theme:e.finalTheme,shown:d,mounted:c,"skip-transition":h,"auto-hide":u,"handle-resize":g,classes:f,result:$,onHide:v,onResize:T},{default:fe(()=>[V(e.$slots,"popper",{shown:d,hide:v})]),_:2},1032,["popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:3},16,["theme","target-nodes","popper-node","class"])}const he=pe(zt,[["render",Ht]]),At={...he,name:"VDropdown",vPopperTheme:"dropdown"};({...he});({...he});U({name:"VTooltipDirective",components:{Popper:Ee(),PopperContent:Ie},mixins:[We],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:e=>se(e.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>se(e.theme,"loadingContent")},targetNodes:{type:Function,required:!0}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content=="function"},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(e){if(typeof this.content=="function"&&this.$_isShown&&(e||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;const t=++this.$_fetchId,i=this.content(this);i.then?i.then(o=>this.onResult(t,o)):this.onResult(t,i)}},onResult(e,t){e===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=t)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}});const Ot=At;export{Ot as k}; diff --git a/assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-D8TYHcvp.js b/assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-CN3ASV_M.js similarity index 93% rename from assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-D8TYHcvp.js rename to assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-CN3ASV_M.js index 56eccf17fa8d9335bdbdbab43b6f29026febe763..4a7c000e72e626ced1db132e8b30faa05aad33f5 100644 --- a/assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-D8TYHcvp.js +++ b/assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-CN3ASV_M.js @@ -1 +1 @@ -import{d as B,c5 as ee,c as b,o as g,bh as $,bm as O,a,X as G,c6 as q,$ as H,e as u,w as K,U as W,b as T,u as s,Y as k,W as R,cd as D,cl as te,c7 as oe,V as ae,a0 as le,f as M,T as se,bk as re,bl as C,cu as E,cv as A,cq as ie}from"./index-WDP_Z4A8.js";import{b as ne,a as ue}from"./FieldRange.vue_vue_type_script_setup_true_lang-BubMLR-2.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as de,g as ce}from"./speech-DRmXCXwq.js";import{u as ve}from"./providers-7GsMyC_3.js";import{_ as pe,a as me}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import{_ as fe}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import{_ as ge,a as be}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.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":""},_e=B({__name:"ProviderSettingsLayout2",props:{providerName:null,providerIcon:null,providerIconColor:null,onBack:{type:Function}},setup(x){return(o,S)=>{const d=ee("motion");return g(),b(q,null,[$(o.$slots,"default"),O((g(),b("div",he,[a("div",{text:"60",class:G(x.providerIcon||x.providerIconColor)},null,2)])),[[d]])],64)}}}),xe={"w-full":"","rounded-xl":""},ye={class:"mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400","w-full":""},ke={class:"inline-flex items-center gap-4"},Se={flex:"~ col gap-4"},Ue=["placeholder"],we=["placeholder"],Ie={flex:"~ col gap-6"},Ve={grid:"~ cols-2 gap-4"},Te={class:"flex items-center gap-1 text-sm font-medium"},$e={class:"text-xs text-neutral-500 dark:text-neutral-400"},Le=["value"],Re={flex:"~ row","gap-4":""},Pe=["disabled"],Me={flex:"~ row","items-center":"","gap-2":""},Ce={flex:"~ row","items-center":"","gap-2":""},Oe={key:2,class:"mt-2 text-sm text-red-500"},ze={key:3,class:"mt-2 text-sm text-red-500"},Ke={key:4,class:"mt-2 text-sm text-red-500"},Be=["src"],at=B({__name:"SpeechPlayground",props:{defaultText:null,availableVoices:null,generateSpeech:{type:Function},apiKeyConfigured:{type:Boolean}},setup(x,{expose:o}){const S=x,{t:d}=H(),m=u(S.defaultText||"Hello! This is a test of the voice synthesis."),U=u(!1),t=u(""),v=u(""),f=u(null),i=u(!1),h=u(""),p=u("");K(()=>S.availableVoices,n=>{var r;n.length>0&&!p.value&&(p.value=((r=n[0])==null?void 0:r.id)||"")},{immediate:!0});async function _(){if(!(!m.value.trim()&&!i.value||i.value&&!h.value.trim()||!p.value)){U.value=!0,v.value="";try{t.value&&I();const n=i.value?h.value:m.value,r=await S.generateSpeech(n,p.value,i.value);t.value=URL.createObjectURL(new Blob([r])),setTimeout(()=>{f.value&&f.value.play()},100)}catch(n){console.error("Error generating speech:",n),v.value=n instanceof Error?n.message:"An unknown error occurred"}finally{U.value=!1}}}function I(){f.value&&(f.value.pause(),f.value.currentTime=0),t.value&&(URL.revokeObjectURL(t.value),t.value="")}return W(()=>{t.value&&URL.revokeObjectURL(t.value)}),o({testText:m,ssmlText:h,useSSML:i,selectedVoice:p,isGenerating:U,audioUrl:t,errorMessage:v,audioPlayer:f,generateTestSpeech:_,stopTestAudio:I}),(n,r)=>(g(),b("div",xe,[a("h2",ye,[a("div",ke,[T(s(ne)),a("div",null,k(s(d)("settings.pages.providers.provider.elevenlabs.playground.title")),1)])]),a("div",Se,[T(s(ue),{modelValue:i.value,"onUpdate:modelValue":r[0]||(r[0]=c=>i.value=c),label:s(d)("settings.pages.modules.speech.sections.section.voice-settings.use-ssml.label"),description:s(d)("settings.pages.modules.speech.sections.section.voice-settings.use-ssml.description")},null,8,["modelValue","label","description"]),i.value?O((g(),b("textarea",{key:1,"onUpdate:modelValue":r[2]||(r[2]=c=>h.value=c),placeholder:s(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,we)),[[D,h.value]]):O((g(),b("textarea",{key:0,"onUpdate:modelValue":r[1]||(r[1]=c=>m.value=c),placeholder:s(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,Ue)),[[D,m.value]]),a("div",Ie,[a("label",Ve,[a("div",null,[a("div",Te,k(s(d)("settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.label")),1),a("div",$e,k(s(d)("settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.description")),1)]),O(a("select",{"onUpdate:modelValue":r[3]||(r[3]=c=>p.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":""},[(g(!0),b(q,null,oe(x.availableVoices,c=>(g(),b("option",{key:c.id,value:c.id},k(c.name),9,Le))),128))],512),[[te,p.value]])])]),a("div",Re,[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||!m.value.trim()&&!i.value||i.value&&!h.value.trim()||!p.value||!x.apiKeyConfigured,class:G({"opacity-50 cursor-not-allowed":U.value||!m.value.trim()&&!i.value||i.value&&!h.value.trim()||!p.value||!x.apiKeyConfigured}),bg:"neutral-700 dark:neutral-300",onClick:_},[a("div",Me,[r[4]||(r[4]=a("div",{"i-solar:play-circle-bold-duotone":""},null,-1)),a("span",null,k(U.value?s(d)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating"):s(d)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.label")),1)])],10,Pe),t.value?(g(),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:I},[a("div",Ce,[r[5]||(r[5]=a("div",{"i-solar:stop-circle-bold-duotone":""},null,-1)),a("span",null,k(s(d)("settings.pages.modules.speech.sections.section.playground.buttons.stop.label")),1)])])):R("",!0)]),x.apiKeyConfigured?R("",!0):(g(),b("div",Oe,k(s(d)("settings.pages.providers.provider.elevenlabs.playground.validation.error-missing-api-key")),1)),p.value?R("",!0):(g(),b("div",ze,k(s(d)("settings.pages.modules.speech.sections.section.playground.select-voice.required")),1)),v.value?(g(),b("div",Ke,k(v.value),1)):R("",!0),t.value?(g(),b("audio",{key:5,ref_key:"audioPlayer",ref:f,src:t.value,controls:"",class:"mt-2 w-full"},null,8,Be)):R("",!0)]),$(n.$slots,"default")]))}}),Ne={flex:"~ col md:row gap-6"},je={flex:"~ col gap-6"},Fe={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},De={flex:"~ col gap-4"},Ee={flex:"~ col gap-6",class:"w-full md:w-[60%]"},Ae={"w-full":"","rounded-xl":""},lt=B({__name:"SpeechProviderSettings",props:{providerId:null,defaultModel:null,additionalSettings:null},setup(x){const o=x,{t:S}=H(),d=ae(),m=ve(),U=de(),{providers:t}=le(m),v=M(()=>m.getProviderMetadata(o.providerId)),f=M({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=M({get:()=>{var e,l,y;return((e=t.value[o.providerId])==null?void 0:e.baseUrl)||((y=(l=v.value)==null?void 0:l.defaultOptions)==null?void 0:y.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."),p=u(!1),_=u(""),I=u(""),n=u(null),r=u(!1),c=u(""),N=u(""),w=u({});function X(){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,l,y,V;m.initializeProvider(o.providerId),f.value=((e=t.value[o.providerId])==null?void 0:e.apiKey)||"",i.value=((l=t.value[o.providerId])==null?void 0:l.baseUrl)||((V=(y=v.value)==null?void 0:y.defaultOptions)==null?void 0:V.baseUrl)||"",X(),m.configuredProviders[o.providerId]&&U.loadVoicesForProvider(o.providerId)});const z=ie(()=>{var e,l;t.value[o.providerId]={...t.value[o.providerId],apiKey:f.value,baseUrl:i.value||((l=(e=v.value)==null?void 0:e.defaultOptions)==null?void 0:l.baseUrl)||"",voiceSettings:{...w.value}}},1e3);K([f,i],z),K(w,z,{deep:!0});async function Y(){if(!h.value.trim()&&!r.value||r.value&&!c.value.trim())return;const e=m.getProviderInstance(o.providerId);if(!e){console.error("Failed to initialize speech provider");return}if(!N.value){console.error("No active speech voice selected");return}p.value=!0,I.value="";try{_.value&&j();const l=o.defaultModel||"default",y=r.value?c.value:h.value,V=await ce({...e.speech(l,{voiceSettings:w.value}),input:y,voice:N.value});_.value=URL.createObjectURL(new Blob([V])),setTimeout(()=>{n.value&&n.value.play()},100)}catch(l){console.error("Error generating speech:",l),I.value=l instanceof Error?l.message:"An unknown error occurred"}finally{p.value=!1}}function j(){n.value&&(n.value.pause(),n.value.currentTime=0),_.value&&(URL.revokeObjectURL(_.value),_.value="")}W(()=>{_.value&&URL.revokeObjectURL(_.value)});function J(){var e,l;w.value={...((l=(e=v.value)==null?void 0:e.defaultOptions)==null?void 0:l.voiceSettings)||{}},z()}function Q(e,l){w.value[e]=l}const F=M(()=>({voiceSettings:w.value,updateVoiceSettings:Q,isGenerating:p.value,testText:h.value,useSSML:r.value,ssmlText:c.value,generateTestSpeech:Y,stopTestAudio:j,audioUrl:_.value,audioPlayer:n.value,errorMessage:I.value}));return(e,l)=>{var y,V;return g(),re(_e,{"provider-name":(y=v.value)==null?void 0:y.localizedName,"provider-icon":(V=v.value)==null?void 0:V.icon,"on-back":()=>s(d).back()},{default:C(()=>[a("div",Ne,[T(s(ge),{class:"w-full md:w-[40%]"},{default:C(()=>[T(s(be),{title:s(S)("settings.pages.providers.common.section.basic.title"),description:s(S)("settings.pages.providers.common.section.basic.description"),"on-reset":J},{default:C(()=>{var L;return[T(s(fe),{modelValue:f.value,"onUpdate:modelValue":l[0]||(l[0]=P=>f.value=P),"provider-name":(L=v.value)==null?void 0:L.localizedName,placeholder:"sk-"},null,8,["modelValue","provider-name"]),$(e.$slots,"basic-settings")]}),_:3},8,["title","description"]),a("div",je,[a("h2",Fe,k(s(S)("settings.pages.providers.common.section.voice.title")),1),a("div",De,[$(e.$slots,"voice-settings",E(A(F.value)))])]),T(s(pe),{title:s(S)("settings.pages.providers.common.section.advanced.title")},{default:C(()=>{var L,P;return[T(s(me),{modelValue:i.value,"onUpdate:modelValue":l[1]||(l[1]=Z=>i.value=Z),placeholder:((P=(L=v.value)==null?void 0:L.defaultOptions)==null?void 0:P.baseUrl)||"",required:""},null,8,["modelValue","placeholder"]),$(e.$slots,"advanced-settings")]}),_:3},8,["title"])]),_:3}),a("div",Ee,[a("div",Ae,[$(e.$slots,"playground",E(A(F.value)))])])])]),_:3},8,["provider-name","provider-icon","on-back"])}}});export{at as _,lt as a}; +import{d as B,c5 as ee,c as b,o as g,bh as $,bm as O,a,X as G,c6 as q,$ as H,e as u,w as K,U as W,b as T,u as s,Y as k,W as R,cd as D,cl as te,c7 as oe,V as ae,a0 as le,f as M,T as se,bk as re,bl as C,cu as E,cv as A,cq as ie}from"./index-8LjpXIG7.js";import{b as ne,a as ue}from"./FieldRange.vue_vue_type_script_setup_true_lang-Cdt76zqB.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{u as de,g as ce}from"./speech-BUPJbslH.js";import{u as ve}from"./providers-Dhn8Iy_2.js";import{_ as pe,a as me}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CU_o_t3A.js";import{_ as fe}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-wR1l1PPX.js";import{_ as ge,a as be}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-DTczYoOw.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":""},_e=B({__name:"ProviderSettingsLayout2",props:{providerName:null,providerIcon:null,providerIconColor:null,onBack:{type:Function}},setup(x){return(o,S)=>{const d=ee("motion");return g(),b(q,null,[$(o.$slots,"default"),O((g(),b("div",he,[a("div",{text:"60",class:G(x.providerIcon||x.providerIconColor)},null,2)])),[[d]])],64)}}}),xe={"w-full":"","rounded-xl":""},ye={class:"mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400","w-full":""},ke={class:"inline-flex items-center gap-4"},Se={flex:"~ col gap-4"},Ue=["placeholder"],we=["placeholder"],Ie={flex:"~ col gap-6"},Ve={grid:"~ cols-2 gap-4"},Te={class:"flex items-center gap-1 text-sm font-medium"},$e={class:"text-xs text-neutral-500 dark:text-neutral-400"},Le=["value"],Re={flex:"~ row","gap-4":""},Pe=["disabled"],Me={flex:"~ row","items-center":"","gap-2":""},Ce={flex:"~ row","items-center":"","gap-2":""},Oe={key:2,class:"mt-2 text-sm text-red-500"},ze={key:3,class:"mt-2 text-sm text-red-500"},Ke={key:4,class:"mt-2 text-sm text-red-500"},Be=["src"],at=B({__name:"SpeechPlayground",props:{defaultText:null,availableVoices:null,generateSpeech:{type:Function},apiKeyConfigured:{type:Boolean}},setup(x,{expose:o}){const S=x,{t:d}=H(),m=u(S.defaultText||"Hello! This is a test of the voice synthesis."),U=u(!1),t=u(""),v=u(""),f=u(null),i=u(!1),h=u(""),p=u("");K(()=>S.availableVoices,n=>{var r;n.length>0&&!p.value&&(p.value=((r=n[0])==null?void 0:r.id)||"")},{immediate:!0});async function _(){if(!(!m.value.trim()&&!i.value||i.value&&!h.value.trim()||!p.value)){U.value=!0,v.value="";try{t.value&&I();const n=i.value?h.value:m.value,r=await S.generateSpeech(n,p.value,i.value);t.value=URL.createObjectURL(new Blob([r])),setTimeout(()=>{f.value&&f.value.play()},100)}catch(n){console.error("Error generating speech:",n),v.value=n instanceof Error?n.message:"An unknown error occurred"}finally{U.value=!1}}}function I(){f.value&&(f.value.pause(),f.value.currentTime=0),t.value&&(URL.revokeObjectURL(t.value),t.value="")}return W(()=>{t.value&&URL.revokeObjectURL(t.value)}),o({testText:m,ssmlText:h,useSSML:i,selectedVoice:p,isGenerating:U,audioUrl:t,errorMessage:v,audioPlayer:f,generateTestSpeech:_,stopTestAudio:I}),(n,r)=>(g(),b("div",xe,[a("h2",ye,[a("div",ke,[T(s(ne)),a("div",null,k(s(d)("settings.pages.providers.provider.elevenlabs.playground.title")),1)])]),a("div",Se,[T(s(ue),{modelValue:i.value,"onUpdate:modelValue":r[0]||(r[0]=c=>i.value=c),label:s(d)("settings.pages.modules.speech.sections.section.voice-settings.use-ssml.label"),description:s(d)("settings.pages.modules.speech.sections.section.voice-settings.use-ssml.description")},null,8,["modelValue","label","description"]),i.value?O((g(),b("textarea",{key:1,"onUpdate:modelValue":r[2]||(r[2]=c=>h.value=c),placeholder:s(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,we)),[[D,h.value]]):O((g(),b("textarea",{key:0,"onUpdate:modelValue":r[1]||(r[1]=c=>m.value=c),placeholder:s(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,Ue)),[[D,m.value]]),a("div",Ie,[a("label",Ve,[a("div",null,[a("div",Te,k(s(d)("settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.label")),1),a("div",$e,k(s(d)("settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.description")),1)]),O(a("select",{"onUpdate:modelValue":r[3]||(r[3]=c=>p.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":""},[(g(!0),b(q,null,oe(x.availableVoices,c=>(g(),b("option",{key:c.id,value:c.id},k(c.name),9,Le))),128))],512),[[te,p.value]])])]),a("div",Re,[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||!m.value.trim()&&!i.value||i.value&&!h.value.trim()||!p.value||!x.apiKeyConfigured,class:G({"opacity-50 cursor-not-allowed":U.value||!m.value.trim()&&!i.value||i.value&&!h.value.trim()||!p.value||!x.apiKeyConfigured}),bg:"neutral-700 dark:neutral-300",onClick:_},[a("div",Me,[r[4]||(r[4]=a("div",{"i-solar:play-circle-bold-duotone":""},null,-1)),a("span",null,k(U.value?s(d)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating"):s(d)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.label")),1)])],10,Pe),t.value?(g(),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:I},[a("div",Ce,[r[5]||(r[5]=a("div",{"i-solar:stop-circle-bold-duotone":""},null,-1)),a("span",null,k(s(d)("settings.pages.modules.speech.sections.section.playground.buttons.stop.label")),1)])])):R("",!0)]),x.apiKeyConfigured?R("",!0):(g(),b("div",Oe,k(s(d)("settings.pages.providers.provider.elevenlabs.playground.validation.error-missing-api-key")),1)),p.value?R("",!0):(g(),b("div",ze,k(s(d)("settings.pages.modules.speech.sections.section.playground.select-voice.required")),1)),v.value?(g(),b("div",Ke,k(v.value),1)):R("",!0),t.value?(g(),b("audio",{key:5,ref_key:"audioPlayer",ref:f,src:t.value,controls:"",class:"mt-2 w-full"},null,8,Be)):R("",!0)]),$(n.$slots,"default")]))}}),Ne={flex:"~ col md:row gap-6"},je={flex:"~ col gap-6"},Fe={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},De={flex:"~ col gap-4"},Ee={flex:"~ col gap-6",class:"w-full md:w-[60%]"},Ae={"w-full":"","rounded-xl":""},lt=B({__name:"SpeechProviderSettings",props:{providerId:null,defaultModel:null,additionalSettings:null},setup(x){const o=x,{t:S}=H(),d=ae(),m=ve(),U=de(),{providers:t}=le(m),v=M(()=>m.getProviderMetadata(o.providerId)),f=M({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=M({get:()=>{var e,l,y;return((e=t.value[o.providerId])==null?void 0:e.baseUrl)||((y=(l=v.value)==null?void 0:l.defaultOptions)==null?void 0:y.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."),p=u(!1),_=u(""),I=u(""),n=u(null),r=u(!1),c=u(""),N=u(""),w=u({});function X(){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,l,y,V;m.initializeProvider(o.providerId),f.value=((e=t.value[o.providerId])==null?void 0:e.apiKey)||"",i.value=((l=t.value[o.providerId])==null?void 0:l.baseUrl)||((V=(y=v.value)==null?void 0:y.defaultOptions)==null?void 0:V.baseUrl)||"",X(),m.configuredProviders[o.providerId]&&U.loadVoicesForProvider(o.providerId)});const z=ie(()=>{var e,l;t.value[o.providerId]={...t.value[o.providerId],apiKey:f.value,baseUrl:i.value||((l=(e=v.value)==null?void 0:e.defaultOptions)==null?void 0:l.baseUrl)||"",voiceSettings:{...w.value}}},1e3);K([f,i],z),K(w,z,{deep:!0});async function Y(){if(!h.value.trim()&&!r.value||r.value&&!c.value.trim())return;const e=m.getProviderInstance(o.providerId);if(!e){console.error("Failed to initialize speech provider");return}if(!N.value){console.error("No active speech voice selected");return}p.value=!0,I.value="";try{_.value&&j();const l=o.defaultModel||"default",y=r.value?c.value:h.value,V=await ce({...e.speech(l,{voiceSettings:w.value}),input:y,voice:N.value});_.value=URL.createObjectURL(new Blob([V])),setTimeout(()=>{n.value&&n.value.play()},100)}catch(l){console.error("Error generating speech:",l),I.value=l instanceof Error?l.message:"An unknown error occurred"}finally{p.value=!1}}function j(){n.value&&(n.value.pause(),n.value.currentTime=0),_.value&&(URL.revokeObjectURL(_.value),_.value="")}W(()=>{_.value&&URL.revokeObjectURL(_.value)});function J(){var e,l;w.value={...((l=(e=v.value)==null?void 0:e.defaultOptions)==null?void 0:l.voiceSettings)||{}},z()}function Q(e,l){w.value[e]=l}const F=M(()=>({voiceSettings:w.value,updateVoiceSettings:Q,isGenerating:p.value,testText:h.value,useSSML:r.value,ssmlText:c.value,generateTestSpeech:Y,stopTestAudio:j,audioUrl:_.value,audioPlayer:n.value,errorMessage:I.value}));return(e,l)=>{var y,V;return g(),re(_e,{"provider-name":(y=v.value)==null?void 0:y.localizedName,"provider-icon":(V=v.value)==null?void 0:V.icon,"on-back":()=>s(d).back()},{default:C(()=>[a("div",Ne,[T(s(ge),{class:"w-full md:w-[40%]"},{default:C(()=>[T(s(be),{title:s(S)("settings.pages.providers.common.section.basic.title"),description:s(S)("settings.pages.providers.common.section.basic.description"),"on-reset":J},{default:C(()=>{var L;return[T(s(fe),{modelValue:f.value,"onUpdate:modelValue":l[0]||(l[0]=P=>f.value=P),"provider-name":(L=v.value)==null?void 0:L.localizedName,placeholder:"sk-"},null,8,["modelValue","provider-name"]),$(e.$slots,"basic-settings")]}),_:3},8,["title","description"]),a("div",je,[a("h2",Fe,k(s(S)("settings.pages.providers.common.section.voice.title")),1),a("div",De,[$(e.$slots,"voice-settings",E(A(F.value)))])]),T(s(pe),{title:s(S)("settings.pages.providers.common.section.advanced.title")},{default:C(()=>{var L,P;return[T(s(me),{modelValue:i.value,"onUpdate:modelValue":l[1]||(l[1]=Z=>i.value=Z),placeholder:((P=(L=v.value)==null?void 0:L.defaultOptions)==null?void 0:P.baseUrl)||"",required:""},null,8,["modelValue","placeholder"]),$(e.$slots,"advanced-settings")]}),_:3},8,["title"])]),_:3}),a("div",Ee,[a("div",Ae,[$(e.$slots,"playground",E(A(F.value)))])])])]),_:3},8,["provider-name","provider-icon","on-back"])}}});export{at as _,lt as a}; diff --git a/assets/Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js b/assets/Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js similarity index 97% rename from assets/Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js rename to assets/Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js index d83b8930d1719ef834485aa8677fc8082eba8d3e..3c01904fbbc761fe978ba7430560957ff35e3529 100644 --- a/assets/Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js +++ b/assets/Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-node-BWr47-4Z.js","assets/index-WDP_Z4A8.js","assets/index-zBe9gvvY.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 Nx=Object.defineProperty;var Lx=(r,t,e)=>t in r?Nx(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var $=(r,t,e)=>Lx(r,typeof t!="symbol"?t+"":t,e);import{a5 as kh,cO as vi,a6 as Bx,cP as cn}from"./index-WDP_Z4A8.js";/*! +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-node-Bhmxs8ab.js","assets/index-8LjpXIG7.js","assets/index-zBe9gvvY.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 Nx=Object.defineProperty;var Lx=(r,t,e)=>t in r?Nx(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var $=(r,t,e)=>Lx(r,typeof t!="symbol"?t+"":t,e);import{a5 as kh,cO as vi,a6 as Bx,cP as cn}from"./index-8LjpXIG7.js";/*! * @pixi/constants - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * @@ -3095,11 +3095,11 @@ https://github.com/nodeca/pako/blob/main/LICENSE \0`,et+=s(C,2),et+=F.magic,et+=s(S,2),et+=s(E,2),et+=s(k.crc32,4),et+=s(k.compressedSize,4),et+=s(k.uncompressedSize,4),et+=s(z.length,2),et+=s(it.length,2),{fileRecord:h.LOCAL_FILE_HEADER+et+z+it,dirRecord:h.CENTRAL_FILE_HEADER+s(V,2)+et+s(st.length,2)+"\0\0\0\0"+s(A,4)+s(d,4)+z+it+st}}var a=e("../utils"),l=e("../stream/GenericWorker"),u=e("../utf8"),c=e("../crc32"),h=e("../signature");function p(f,y,g,d){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=y,this.zipPlatform=g,this.encodeFileName=d,this.streamFiles=f,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(p,l),p.prototype.push=function(f){var y=f.meta.percent||0,g=this.entriesCount,d=this._sources.length;this.accumulate?this.contentBuffer.push(f):(this.bytesWritten+=f.data.length,l.prototype.push.call(this,{data:f.data,meta:{currentFile:this.currentFile,percent:g?(y+100*(g-d-1))/g:100}}))},p.prototype.openedSource=function(f){this.currentSourceOffset=this.bytesWritten,this.currentFile=f.file.name;var y=this.streamFiles&&!f.file.dir;if(y){var g=o(f,y,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:g.fileRecord,meta:{percent:0}})}else this.accumulate=!0},p.prototype.closedSource=function(f){this.accumulate=!1;var y=this.streamFiles&&!f.file.dir,g=o(f,y,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(g.dirRecord),y)this.push({data:function(d){return h.DATA_DESCRIPTOR+s(d.crc32,4)+s(d.compressedSize,4)+s(d.uncompressedSize,4)}(f),meta:{percent:100}});else for(this.push({data:g.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},p.prototype.flush=function(){for(var f=this.bytesWritten,y=0;y=this.index;l--)u=(u<<8)+this.byteAt(l);return this.index+=a,u},readString:function(a){return s.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},i.exports=o},{"../utils":32}],19:[function(e,i,n){var s=e("./Uint8ArrayReader");function o(a){s.call(this,a)}e("../utils").inherits(o,s),o.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},i.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,i,n){var s=e("./DataReader");function o(a){s.call(this,a)}e("../utils").inherits(o,s),o.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},o.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},o.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},o.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},i.exports=o},{"../utils":32,"./DataReader":18}],21:[function(e,i,n){var s=e("./ArrayReader");function o(a){s.call(this,a)}e("../utils").inherits(o,s),o.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},i.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(e,i,n){var s=e("../utils"),o=e("../support"),a=e("./ArrayReader"),l=e("./StringReader"),u=e("./NodeBufferReader"),c=e("./Uint8ArrayReader");i.exports=function(h){var p=s.getTypeOf(h);return s.checkSupport(p),p!=="string"||o.uint8array?p==="nodebuffer"?new u(h):o.uint8array?new c(s.transformTo("uint8array",h)):new a(s.transformTo("array",h)):new l(h)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,i,n){n.LOCAL_FILE_HEADER="PK",n.CENTRAL_FILE_HEADER="PK",n.CENTRAL_DIRECTORY_END="PK",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",n.ZIP64_CENTRAL_DIRECTORY_END="PK",n.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(e,i,n){var s=e("./GenericWorker"),o=e("../utils");function a(l){s.call(this,"ConvertWorker to "+l),this.destType=l}o.inherits(a,s),a.prototype.processChunk=function(l){this.push({data:o.transformTo(this.destType,l.data),meta:l.meta})},i.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(e,i,n){var s=e("./GenericWorker"),o=e("../crc32");function a(){s.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(a,s),a.prototype.processChunk=function(l){this.streamInfo.crc32=o(l.data,this.streamInfo.crc32||0),this.push(l)},i.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,i,n){var s=e("../utils"),o=e("./GenericWorker");function a(l){o.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}s.inherits(a,o),a.prototype.processChunk=function(l){if(l){var u=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=u+l.data.length}o.prototype.processChunk.call(this,l)},i.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(e,i,n){var s=e("../utils"),o=e("./GenericWorker");function a(l){o.call(this,"DataWorker");var u=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(c){u.dataIsReady=!0,u.data=c,u.max=c&&c.length||0,u.type=s.getTypeOf(c),u.isPaused||u._tickAndRepeat()},function(c){u.error(c)})}s.inherits(a,o),a.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,s.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(s.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,u=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,u);break;case"uint8array":l=this.data.subarray(this.index,u);break;case"array":case"nodebuffer":l=this.data.slice(this.index,u)}return this.index=u,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},i.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(e,i,n){function s(o){this.name=o||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}s.prototype={push:function(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,a){return this._listeners[o].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,a){if(this._listeners[o])for(var l=0;l "+o:o}},i.exports=s},{}],29:[function(e,i,n){var s=e("../utils"),o=e("./ConvertWorker"),a=e("./GenericWorker"),l=e("../base64"),u=e("../support"),c=e("../external"),h=null;if(u.nodestream)try{h=e("../nodejs/NodejsStreamOutputAdapter")}catch{}function p(y,g){return new c.Promise(function(d,m){var _=[],S=y._internalType,E=y._outputType,b=y._mimeType;y.on("data",function(F,x){_.push(F),g&&g(x)}).on("error",function(F){_=[],m(F)}).on("end",function(){try{var F=function(x,z,B){switch(x){case"blob":return s.newBlob(s.transformTo("arraybuffer",z),B);case"base64":return l.encode(z);default:return s.transformTo(x,z)}}(E,function(x,z){var B,tt=0,st=null,I=0;for(B=0;B"u")n.blob=!1;else{var s=new ArrayBuffer(0);try{n.blob=new Blob([s],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(s),n.blob=o.getBlob("application/zip").size===0}catch{n.blob=!1}}}try{n.nodestream=!!e("readable-stream").Readable}catch{n.nodestream=!1}},{"readable-stream":16}],31:[function(e,i,n){for(var s=e("./utils"),o=e("./support"),a=e("./nodejsUtils"),l=e("./stream/GenericWorker"),u=new Array(256),c=0;c<256;c++)u[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;u[254]=u[254]=1;function h(){l.call(this,"utf-8 decode"),this.leftOver=null}function p(){l.call(this,"utf-8 encode")}n.utf8encode=function(f){return o.nodebuffer?a.newBufferFrom(f,"utf-8"):function(y){var g,d,m,_,S,E=y.length,b=0;for(_=0;_>>6:(d<65536?g[S++]=224|d>>>12:(g[S++]=240|d>>>18,g[S++]=128|d>>>12&63),g[S++]=128|d>>>6&63),g[S++]=128|63&d);return g}(f)},n.utf8decode=function(f){return o.nodebuffer?s.transformTo("nodebuffer",f).toString("utf-8"):function(y){var g,d,m,_,S=y.length,E=new Array(2*S);for(g=d=0;g>10&1023,E[d++]=56320|1023&m)}return E.length!==d&&(E.subarray?E=E.subarray(0,d):E.length=d),s.applyFromCharCode(E)}(f=s.transformTo(o.uint8array?"uint8array":"array",f))},s.inherits(h,l),h.prototype.processChunk=function(f){var y=s.transformTo(o.uint8array?"uint8array":"array",f.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var g=y;(y=new Uint8Array(g.length+this.leftOver.length)).set(this.leftOver,0),y.set(g,this.leftOver.length)}else y=this.leftOver.concat(y);this.leftOver=null}var d=function(_,S){var E;for((S=S||_.length)>_.length&&(S=_.length),E=S-1;0<=E&&(192&_[E])==128;)E--;return E<0||E===0?S:E+u[_[E]]>S?E:S}(y),m=y;d!==y.length&&(o.uint8array?(m=y.subarray(0,d),this.leftOver=y.subarray(d,y.length)):(m=y.slice(0,d),this.leftOver=y.slice(d,y.length))),this.push({data:n.utf8decode(m),meta:f.meta})},h.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=h,s.inherits(p,l),p.prototype.processChunk=function(f){this.push({data:n.utf8encode(f.data),meta:f.meta})},n.Utf8EncodeWorker=p},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,i,n){var s=e("./support"),o=e("./base64"),a=e("./nodejsUtils"),l=e("./external");function u(g){return g}function c(g,d){for(var m=0;m>8;this.dir=!!(16&this.externalFileAttributes),f==0&&(this.dosPermissions=63&this.externalFileAttributes),f==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var f=s(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=f.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=f.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=f.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=f.readInt(4))}},readExtraFields:function(f){var y,g,d,m=f.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});f.index+4>>6:(f<65536?p[d++]=224|f>>>12:(p[d++]=240|f>>>18,p[d++]=128|f>>>12&63),p[d++]=128|f>>>6&63),p[d++]=128|63&f);return p},n.buf2binstring=function(h){return c(h,h.length)},n.binstring2buf=function(h){for(var p=new s.Buf8(h.length),f=0,y=p.length;f>10&1023,_[y++]=56320|1023&g)}return c(_,y)},n.utf8border=function(h,p){var f;for((p=p||h.length)>h.length&&(p=h.length),f=p-1;0<=f&&(192&h[f])==128;)f--;return f<0||f===0?p:f+l[h[f]]>p?f:p}},{"./common":41}],43:[function(e,i,n){i.exports=function(s,o,a,l){for(var u=65535&s|0,c=s>>>16&65535|0,h=0;a!==0;){for(a-=h=2e3>>1:o>>>1;a[l]=o}return a}();i.exports=function(o,a,l,u){var c=s,h=u+l;o^=-1;for(var p=u;p>>8^c[255&(o^a[p])];return-1^o}},{}],46:[function(e,i,n){var s,o=e("../utils/common"),a=e("./trees"),l=e("./adler32"),u=e("./crc32"),c=e("./messages"),h=0,p=4,f=0,y=-2,g=-1,d=4,m=2,_=8,S=9,E=286,b=30,F=19,x=2*E+1,z=15,B=3,tt=258,st=tt+B+1,I=42,Z=113,w=1,it=2,M=3,O=4;function D(v,K){return v.msg=c[K],K}function U(v){return(v<<1)-(4v.avail_out&&(q=v.avail_out),q!==0&&(o.arraySet(v.output,K.pending_buf,K.pending_out,q,v.next_out),v.next_out+=q,K.pending_out+=q,v.total_out+=q,v.avail_out-=q,K.pending-=q,K.pending===0&&(K.pending_out=0))}function A(v,K){a._tr_flush_block(v,0<=v.block_start?v.block_start:-1,v.strstart-v.block_start,K),v.block_start=v.strstart,C(v.strm)}function V(v,K){v.pending_buf[v.pending++]=K}function et(v,K){v.pending_buf[v.pending++]=K>>>8&255,v.pending_buf[v.pending++]=255&K}function J(v,K){var q,N,R=v.max_chain_length,X=v.strstart,ot=v.prev_length,lt=v.nice_match,rt=v.strstart>v.w_size-st?v.strstart-(v.w_size-st):0,ht=v.window,bt=v.w_mask,pt=v.prev,Ot=v.strstart+tt,ye=ht[X+ot-1],oe=ht[X+ot];v.prev_length>=v.good_match&&(R>>=2),lt>v.lookahead&&(lt=v.lookahead);do if(ht[(q=K)+ot]===oe&&ht[q+ot-1]===ye&&ht[q]===ht[X]&&ht[++q]===ht[X+1]){X+=2,q++;do;while(ht[++X]===ht[++q]&&ht[++X]===ht[++q]&&ht[++X]===ht[++q]&&ht[++X]===ht[++q]&&ht[++X]===ht[++q]&&ht[++X]===ht[++q]&&ht[++X]===ht[++q]&&ht[++X]===ht[++q]&&Xrt&&--R!=0);return ot<=v.lookahead?ot:v.lookahead}function yt(v){var K,q,N,R,X,ot,lt,rt,ht,bt,pt=v.w_size;do{if(R=v.window_size-v.lookahead-v.strstart,v.strstart>=pt+(pt-st)){for(o.arraySet(v.window,v.window,pt,pt,0),v.match_start-=pt,v.strstart-=pt,v.block_start-=pt,K=q=v.hash_size;N=v.head[--K],v.head[K]=pt<=N?N-pt:0,--q;);for(K=q=pt;N=v.prev[--K],v.prev[K]=pt<=N?N-pt:0,--q;);R+=pt}if(v.strm.avail_in===0)break;if(ot=v.strm,lt=v.window,rt=v.strstart+v.lookahead,ht=R,bt=void 0,bt=ot.avail_in,ht=B)for(X=v.strstart-v.insert,v.ins_h=v.window[X],v.ins_h=(v.ins_h<=B&&(v.ins_h=(v.ins_h<=B)if(N=a._tr_tally(v,v.strstart-v.match_start,v.match_length-B),v.lookahead-=v.match_length,v.match_length<=v.max_lazy_match&&v.lookahead>=B){for(v.match_length--;v.strstart++,v.ins_h=(v.ins_h<=B&&(v.ins_h=(v.ins_h<=B&&v.match_length<=v.prev_length){for(R=v.strstart+v.lookahead-B,N=a._tr_tally(v,v.strstart-1-v.prev_match,v.prev_length-B),v.lookahead-=v.prev_length-1,v.prev_length-=2;++v.strstart<=R&&(v.ins_h=(v.ins_h<v.pending_buf_size-5&&(q=v.pending_buf_size-5);;){if(v.lookahead<=1){if(yt(v),v.lookahead===0&&K===h)return w;if(v.lookahead===0)break}v.strstart+=v.lookahead,v.lookahead=0;var N=v.block_start+q;if((v.strstart===0||v.strstart>=N)&&(v.lookahead=v.strstart-N,v.strstart=N,A(v,!1),v.strm.avail_out===0)||v.strstart-v.block_start>=v.w_size-st&&(A(v,!1),v.strm.avail_out===0))return w}return v.insert=0,K===p?(A(v,!0),v.strm.avail_out===0?M:O):(v.strstart>v.block_start&&(A(v,!1),v.strm.avail_out),w)}),new _t(4,4,8,4,vt),new _t(4,5,16,8,vt),new _t(4,6,32,32,vt),new _t(4,4,16,16,dt),new _t(8,16,32,32,dt),new _t(8,16,128,128,dt),new _t(8,32,128,256,dt),new _t(32,128,258,1024,dt),new _t(32,258,258,4096,dt)],n.deflateInit=function(v,K){return he(v,K,_,15,8,0)},n.deflateInit2=he,n.deflateReset=ee,n.deflateResetKeep=Ct,n.deflateSetHeader=function(v,K){return v&&v.state?v.state.wrap!==2?y:(v.state.gzhead=K,f):y},n.deflate=function(v,K){var q,N,R,X;if(!v||!v.state||5>8&255),V(N,N.gzhead.time>>16&255),V(N,N.gzhead.time>>24&255),V(N,N.level===9?2:2<=N.strategy||N.level<2?4:0),V(N,255&N.gzhead.os),N.gzhead.extra&&N.gzhead.extra.length&&(V(N,255&N.gzhead.extra.length),V(N,N.gzhead.extra.length>>8&255)),N.gzhead.hcrc&&(v.adler=u(v.adler,N.pending_buf,N.pending,0)),N.gzindex=0,N.status=69):(V(N,0),V(N,0),V(N,0),V(N,0),V(N,0),V(N,N.level===9?2:2<=N.strategy||N.level<2?4:0),V(N,3),N.status=Z);else{var ot=_+(N.w_bits-8<<4)<<8;ot|=(2<=N.strategy||N.level<2?0:N.level<6?1:N.level===6?2:3)<<6,N.strstart!==0&&(ot|=32),ot+=31-ot%31,N.status=Z,et(N,ot),N.strstart!==0&&(et(N,v.adler>>>16),et(N,65535&v.adler)),v.adler=1}if(N.status===69)if(N.gzhead.extra){for(R=N.pending;N.gzindex<(65535&N.gzhead.extra.length)&&(N.pending!==N.pending_buf_size||(N.gzhead.hcrc&&N.pending>R&&(v.adler=u(v.adler,N.pending_buf,N.pending-R,R)),C(v),R=N.pending,N.pending!==N.pending_buf_size));)V(N,255&N.gzhead.extra[N.gzindex]),N.gzindex++;N.gzhead.hcrc&&N.pending>R&&(v.adler=u(v.adler,N.pending_buf,N.pending-R,R)),N.gzindex===N.gzhead.extra.length&&(N.gzindex=0,N.status=73)}else N.status=73;if(N.status===73)if(N.gzhead.name){R=N.pending;do{if(N.pending===N.pending_buf_size&&(N.gzhead.hcrc&&N.pending>R&&(v.adler=u(v.adler,N.pending_buf,N.pending-R,R)),C(v),R=N.pending,N.pending===N.pending_buf_size)){X=1;break}X=N.gzindexR&&(v.adler=u(v.adler,N.pending_buf,N.pending-R,R)),X===0&&(N.gzindex=0,N.status=91)}else N.status=91;if(N.status===91)if(N.gzhead.comment){R=N.pending;do{if(N.pending===N.pending_buf_size&&(N.gzhead.hcrc&&N.pending>R&&(v.adler=u(v.adler,N.pending_buf,N.pending-R,R)),C(v),R=N.pending,N.pending===N.pending_buf_size)){X=1;break}X=N.gzindexR&&(v.adler=u(v.adler,N.pending_buf,N.pending-R,R)),X===0&&(N.status=103)}else N.status=103;if(N.status===103&&(N.gzhead.hcrc?(N.pending+2>N.pending_buf_size&&C(v),N.pending+2<=N.pending_buf_size&&(V(N,255&v.adler),V(N,v.adler>>8&255),v.adler=0,N.status=Z)):N.status=Z),N.pending!==0){if(C(v),v.avail_out===0)return N.last_flush=-1,f}else if(v.avail_in===0&&U(K)<=U(q)&&K!==p)return D(v,-5);if(N.status===666&&v.avail_in!==0)return D(v,-5);if(v.avail_in!==0||N.lookahead!==0||K!==h&&N.status!==666){var lt=N.strategy===2?function(rt,ht){for(var bt;;){if(rt.lookahead===0&&(yt(rt),rt.lookahead===0)){if(ht===h)return w;break}if(rt.match_length=0,bt=a._tr_tally(rt,0,rt.window[rt.strstart]),rt.lookahead--,rt.strstart++,bt&&(A(rt,!1),rt.strm.avail_out===0))return w}return rt.insert=0,ht===p?(A(rt,!0),rt.strm.avail_out===0?M:O):rt.last_lit&&(A(rt,!1),rt.strm.avail_out===0)?w:it}(N,K):N.strategy===3?function(rt,ht){for(var bt,pt,Ot,ye,oe=rt.window;;){if(rt.lookahead<=tt){if(yt(rt),rt.lookahead<=tt&&ht===h)return w;if(rt.lookahead===0)break}if(rt.match_length=0,rt.lookahead>=B&&0rt.lookahead&&(rt.match_length=rt.lookahead)}if(rt.match_length>=B?(bt=a._tr_tally(rt,1,rt.match_length-B),rt.lookahead-=rt.match_length,rt.strstart+=rt.match_length,rt.match_length=0):(bt=a._tr_tally(rt,0,rt.window[rt.strstart]),rt.lookahead--,rt.strstart++),bt&&(A(rt,!1),rt.strm.avail_out===0))return w}return rt.insert=0,ht===p?(A(rt,!0),rt.strm.avail_out===0?M:O):rt.last_lit&&(A(rt,!1),rt.strm.avail_out===0)?w:it}(N,K):s[N.level].func(N,K);if(lt!==M&<!==O||(N.status=666),lt===w||lt===M)return v.avail_out===0&&(N.last_flush=-1),f;if(lt===it&&(K===1?a._tr_align(N):K!==5&&(a._tr_stored_block(N,0,0,!1),K===3&&(k(N.head),N.lookahead===0&&(N.strstart=0,N.block_start=0,N.insert=0))),C(v),v.avail_out===0))return N.last_flush=-1,f}return K!==p?f:N.wrap<=0?1:(N.wrap===2?(V(N,255&v.adler),V(N,v.adler>>8&255),V(N,v.adler>>16&255),V(N,v.adler>>24&255),V(N,255&v.total_in),V(N,v.total_in>>8&255),V(N,v.total_in>>16&255),V(N,v.total_in>>24&255)):(et(N,v.adler>>>16),et(N,65535&v.adler)),C(v),0=q.w_size&&(X===0&&(k(q.head),q.strstart=0,q.block_start=0,q.insert=0),ht=new o.Buf8(q.w_size),o.arraySet(ht,K,bt-q.w_size,q.w_size,0),K=ht,bt=q.w_size),ot=v.avail_in,lt=v.next_in,rt=v.input,v.avail_in=bt,v.next_in=0,v.input=K,yt(q);q.lookahead>=B;){for(N=q.strstart,R=q.lookahead-(B-1);q.ins_h=(q.ins_h<>>=B=z>>>24,S-=B,(B=z>>>16&255)===0)it[c++]=65535&z;else{if(!(16&B)){if((64&B)==0){z=E[(65535&z)+(_&(1<>>=B,S-=B),S<15&&(_+=w[l++]<>>=B=z>>>24,S-=B,!(16&(B=z>>>16&255))){if((64&B)==0){z=b[(65535&z)+(_&(1<>>=B,S-=B,(B=c-h)>3,_&=(1<<(S-=tt<<3))-1,s.next_in=l,s.next_out=c,s.avail_in=l>>24&255)+(I>>>8&65280)+((65280&I)<<8)+((255&I)<<24)}function _(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function S(I){var Z;return I&&I.state?(Z=I.state,I.total_in=I.total_out=Z.total=0,I.msg="",Z.wrap&&(I.adler=1&Z.wrap),Z.mode=y,Z.last=0,Z.havedict=0,Z.dmax=32768,Z.head=null,Z.hold=0,Z.bits=0,Z.lencode=Z.lendyn=new s.Buf32(g),Z.distcode=Z.distdyn=new s.Buf32(d),Z.sane=1,Z.back=-1,p):f}function E(I){var Z;return I&&I.state?((Z=I.state).wsize=0,Z.whave=0,Z.wnext=0,S(I)):f}function b(I,Z){var w,it;return I&&I.state?(it=I.state,Z<0?(w=0,Z=-Z):(w=1+(Z>>4),Z<48&&(Z&=15)),Z&&(Z<8||15=O.wsize?(s.arraySet(O.window,Z,w-O.wsize,O.wsize,0),O.wnext=0,O.whave=O.wsize):(it<(M=O.wsize-O.wnext)&&(M=it),s.arraySet(O.window,Z,w-it,M,O.wnext),(it-=M)?(s.arraySet(O.window,Z,w-it,it,0),O.wnext=it,O.whave=O.wsize):(O.wnext+=M,O.wnext===O.wsize&&(O.wnext=0),O.whave>>8&255,w.check=a(w.check,X,2,0),A=C=0,w.mode=2;break}if(w.flags=0,w.head&&(w.head.done=!1),!(1&w.wrap)||(((255&C)<<8)+(C>>8))%31){I.msg="incorrect header check",w.mode=30;break}if((15&C)!=8){I.msg="unknown compression method",w.mode=30;break}if(A-=4,v=8+(15&(C>>>=4)),w.wbits===0)w.wbits=v;else if(v>w.wbits){I.msg="invalid window size",w.mode=30;break}w.dmax=1<>8&1),512&w.flags&&(X[0]=255&C,X[1]=C>>>8&255,w.check=a(w.check,X,2,0)),A=C=0,w.mode=3;case 3:for(;A<32;){if(U===0)break t;U--,C+=it[O++]<>>8&255,X[2]=C>>>16&255,X[3]=C>>>24&255,w.check=a(w.check,X,4,0)),A=C=0,w.mode=4;case 4:for(;A<16;){if(U===0)break t;U--,C+=it[O++]<>8),512&w.flags&&(X[0]=255&C,X[1]=C>>>8&255,w.check=a(w.check,X,2,0)),A=C=0,w.mode=5;case 5:if(1024&w.flags){for(;A<16;){if(U===0)break t;U--,C+=it[O++]<>>8&255,w.check=a(w.check,X,2,0)),A=C=0}else w.head&&(w.head.extra=null);w.mode=6;case 6:if(1024&w.flags&&(U<(J=w.length)&&(J=U),J&&(w.head&&(v=w.head.extra_len-w.length,w.head.extra||(w.head.extra=new Array(w.head.extra_len)),s.arraySet(w.head.extra,it,O,J,v)),512&w.flags&&(w.check=a(w.check,it,J,O)),U-=J,O+=J,w.length-=J),w.length))break t;w.length=0,w.mode=7;case 7:if(2048&w.flags){if(U===0)break t;for(J=0;v=it[O+J++],w.head&&v&&w.length<65536&&(w.head.name+=String.fromCharCode(v)),v&&J>9&1,w.head.done=!0),I.adler=w.check=0,w.mode=12;break;case 10:for(;A<32;){if(U===0)break t;U--,C+=it[O++]<>>=7&A,A-=7&A,w.mode=27;break}for(;A<3;){if(U===0)break t;U--,C+=it[O++]<>>=1)){case 0:w.mode=14;break;case 1:if(tt(w),w.mode=20,Z!==6)break;C>>>=2,A-=2;break t;case 2:w.mode=17;break;case 3:I.msg="invalid block type",w.mode=30}C>>>=2,A-=2;break;case 14:for(C>>>=7&A,A-=7&A;A<32;){if(U===0)break t;U--,C+=it[O++]<>>16^65535)){I.msg="invalid stored block lengths",w.mode=30;break}if(w.length=65535&C,A=C=0,w.mode=15,Z===6)break t;case 15:w.mode=16;case 16:if(J=w.length){if(U>>=5,A-=5,w.ndist=1+(31&C),C>>>=5,A-=5,w.ncode=4+(15&C),C>>>=4,A-=4,286>>=3,A-=3}for(;w.have<19;)w.lens[ot[w.have++]]=0;if(w.lencode=w.lendyn,w.lenbits=7,q={bits:w.lenbits},K=u(0,w.lens,0,19,w.lencode,0,w.work,q),w.lenbits=q.bits,K){I.msg="invalid code lengths set",w.mode=30;break}w.have=0,w.mode=19;case 19:for(;w.have>>16&255,gt=65535&R,!((dt=R>>>24)<=A);){if(U===0)break t;U--,C+=it[O++]<>>=dt,A-=dt,w.lens[w.have++]=gt;else{if(gt===16){for(N=dt+2;A>>=dt,A-=dt,w.have===0){I.msg="invalid bit length repeat",w.mode=30;break}v=w.lens[w.have-1],J=3+(3&C),C>>>=2,A-=2}else if(gt===17){for(N=dt+3;A>>=dt)),C>>>=3,A-=3}else{for(N=dt+7;A>>=dt)),C>>>=7,A-=7}if(w.have+J>w.nlen+w.ndist){I.msg="invalid bit length repeat",w.mode=30;break}for(;J--;)w.lens[w.have++]=v}}if(w.mode===30)break;if(w.lens[256]===0){I.msg="invalid code -- missing end-of-block",w.mode=30;break}if(w.lenbits=9,q={bits:w.lenbits},K=u(c,w.lens,0,w.nlen,w.lencode,0,w.work,q),w.lenbits=q.bits,K){I.msg="invalid literal/lengths set",w.mode=30;break}if(w.distbits=6,w.distcode=w.distdyn,q={bits:w.distbits},K=u(h,w.lens,w.nlen,w.ndist,w.distcode,0,w.work,q),w.distbits=q.bits,K){I.msg="invalid distances set",w.mode=30;break}if(w.mode=20,Z===6)break t;case 20:w.mode=21;case 21:if(6<=U&&258<=k){I.next_out=D,I.avail_out=k,I.next_in=O,I.avail_in=U,w.hold=C,w.bits=A,l(I,et),D=I.next_out,M=I.output,k=I.avail_out,O=I.next_in,it=I.input,U=I.avail_in,C=w.hold,A=w.bits,w.mode===12&&(w.back=-1);break}for(w.back=0;_t=(R=w.lencode[C&(1<>>16&255,gt=65535&R,!((dt=R>>>24)<=A);){if(U===0)break t;U--,C+=it[O++]<>Ct)])>>>16&255,gt=65535&R,!(Ct+(dt=R>>>24)<=A);){if(U===0)break t;U--,C+=it[O++]<>>=Ct,A-=Ct,w.back+=Ct}if(C>>>=dt,A-=dt,w.back+=dt,w.length=gt,_t===0){w.mode=26;break}if(32&_t){w.back=-1,w.mode=12;break}if(64&_t){I.msg="invalid literal/length code",w.mode=30;break}w.extra=15&_t,w.mode=22;case 22:if(w.extra){for(N=w.extra;A>>=w.extra,A-=w.extra,w.back+=w.extra}w.was=w.length,w.mode=23;case 23:for(;_t=(R=w.distcode[C&(1<>>16&255,gt=65535&R,!((dt=R>>>24)<=A);){if(U===0)break t;U--,C+=it[O++]<>Ct)])>>>16&255,gt=65535&R,!(Ct+(dt=R>>>24)<=A);){if(U===0)break t;U--,C+=it[O++]<>>=Ct,A-=Ct,w.back+=Ct}if(C>>>=dt,A-=dt,w.back+=dt,64&_t){I.msg="invalid distance code",w.mode=30;break}w.offset=gt,w.extra=15&_t,w.mode=24;case 24:if(w.extra){for(N=w.extra;A>>=w.extra,A-=w.extra,w.back+=w.extra}if(w.offset>w.dmax){I.msg="invalid distance too far back",w.mode=30;break}w.mode=25;case 25:if(k===0)break t;if(J=et-k,w.offset>J){if((J=w.offset-J)>w.whave&&w.sane){I.msg="invalid distance too far back",w.mode=30;break}yt=J>w.wnext?(J-=w.wnext,w.wsize-J):w.wnext-J,J>w.length&&(J=w.length),vt=w.window}else vt=M,yt=D-w.offset,J=w.length;for(kx?(B=yt[vt+d[Z]],A[V+d[Z]]):(B=96,0),_=1<>D)+(S-=_)]=z<<24|B<<16|tt|0,S!==0;);for(_=1<>=1;if(_!==0?(C&=_-1,C+=_):C=0,Z++,--et[I]==0){if(I===it)break;I=h[p+d[Z]]}if(M>>7)]}function V(R,X){R.pending_buf[R.pending++]=255&X,R.pending_buf[R.pending++]=X>>>8&255}function et(R,X,ot){R.bi_valid>m-ot?(R.bi_buf|=X<>m-R.bi_valid,R.bi_valid+=ot-m):(R.bi_buf|=X<>>=1,ot<<=1,0<--X;);return ot>>>1}function vt(R,X,ot){var lt,rt,ht=new Array(d+1),bt=0;for(lt=1;lt<=d;lt++)ht[lt]=bt=bt+ot[lt-1]<<1;for(rt=0;rt<=X;rt++){var pt=R[2*rt+1];pt!==0&&(R[2*rt]=yt(ht[pt]++,pt))}}function dt(R){var X;for(X=0;X>1;1<=ot;ot--)Ct(R,ht,ot);for(rt=Ot;ot=R.heap[1],R.heap[1]=R.heap[R.heap_len--],Ct(R,ht,1),lt=R.heap[1],R.heap[--R.heap_max]=ot,R.heap[--R.heap_max]=lt,ht[2*rt]=ht[2*ot]+ht[2*lt],R.depth[rt]=(R.depth[ot]>=R.depth[lt]?R.depth[ot]:R.depth[lt])+1,ht[2*ot+1]=ht[2*lt+1]=rt,R.heap[1]=rt++,Ct(R,ht,1),2<=R.heap_len;);R.heap[--R.heap_max]=R.heap[1],function(oe,ir){var Zi,vr,Ji,Ae,tn,co,Kr=ir.dyn_tree,ps=ir.max_code,va=ir.stat_desc.static_tree,pu=ir.stat_desc.has_stree,oi=ir.stat_desc.extra_bits,_a=ir.stat_desc.extra_base,Cn=ir.stat_desc.max_length,An=0;for(Ae=0;Ae<=d;Ae++)oe.bl_count[Ae]=0;for(Kr[2*oe.heap[oe.heap_max]+1]=0,Zi=oe.heap_max+1;Zi>=7;rt>>=1)if(1&ye&&pt.dyn_ltree[2*Ot]!==0)return o;if(pt.dyn_ltree[18]!==0||pt.dyn_ltree[20]!==0||pt.dyn_ltree[26]!==0)return a;for(Ot=32;Ot>>3,(ht=R.static_len+3+7>>>3)<=rt&&(rt=ht)):rt=ht=ot+5,ot+4<=rt&&X!==-1?N(R,X,ot,lt):R.strategy===4||ht===rt?(et(R,2+(lt?1:0),3),ee(R,st,I)):(et(R,4+(lt?1:0),3),function(pt,Ot,ye,oe){var ir;for(et(pt,Ot-257,5),et(pt,ye-1,5),et(pt,oe-4,4),ir=0;ir>>8&255,R.pending_buf[R.d_buf+2*R.last_lit+1]=255&X,R.pending_buf[R.l_buf+R.last_lit]=255&ot,R.last_lit++,X===0?R.dyn_ltree[2*ot]++:(R.matches++,X--,R.dyn_ltree[2*(w[ot]+h+1)]++,R.dyn_dtree[2*A(X)]++),R.last_lit===R.lit_bufsize-1},n._tr_align=function(R){et(R,2,3),J(R,S,st),function(X){X.bi_valid===16?(V(X,X.bi_buf),X.bi_buf=0,X.bi_valid=0):8<=X.bi_valid&&(X.pending_buf[X.pending++]=255&X.bi_buf,X.bi_buf>>=8,X.bi_valid-=8)}(R)}},{"../utils/common":41}],53:[function(e,i,n){i.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,i,n){(function(s){(function(o,a){if(!o.setImmediate){var l,u,c,h,p=1,f={},y=!1,g=o.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(o);d=d&&d.setTimeout?d:o,l={}.toString.call(o.process)==="[object process]"?function(E){process.nextTick(function(){_(E)})}:function(){if(o.postMessage&&!o.importScripts){var E=!0,b=o.onmessage;return o.onmessage=function(){E=!1},o.postMessage("","*"),o.onmessage=b,E}}()?(h="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",S,!1):o.attachEvent("onmessage",S),function(E){o.postMessage(h+E,"*")}):o.MessageChannel?((c=new MessageChannel).port1.onmessage=function(E){_(E.data)},function(E){c.port2.postMessage(E)}):g&&"onreadystatechange"in g.createElement("script")?(u=g.documentElement,function(E){var b=g.createElement("script");b.onreadystatechange=function(){_(E),b.onreadystatechange=null,u.removeChild(b),b=null},u.appendChild(b)}):function(E){setTimeout(_,0,E)},d.setImmediate=function(E){typeof E!="function"&&(E=new Function(""+E));for(var b=new Array(arguments.length-1),F=0;F"u"?s===void 0?this:s:self)}).call(this,typeof vi<"u"?vi:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})}(Yu)),Yu.exports}var SC=xC();const TC=kh(SC);Oi.zipReader=(r,t)=>TC.loadAsync(r);const IC=Oi.createSettings;Oi.createSettings=async r=>{const t=Object.keys(r.files);return t.find(e=>EC(e))?IC(r):OC(t)};function EC(r){return r.endsWith("model3.json")}function CC(r){return r.endsWith(".moc3")}function AC(r){return r.split(/[\\/]/).pop()}function OC(r){const t=r.filter(u=>CC(u));if(t.length!==1){const u=t.length?`(${t.map(c=>`"${c}"`).join(",")})`:"";throw new Error(`Expected exactly one moc file, got ${t.length} ${u}`)}const e=t[0],i=AC(e).replace(/\.moc3?/,""),n=r.filter(u=>u.endsWith(".png"));if(!n.length)throw new Error("Textures not found");const s=r.filter(u=>u.endsWith(".mtn")||u.endsWith(".motion3.json")),o=r.find(u=>u.includes("physics")),a=r.find(u=>u.includes("pose")),l=new rs({url:`${i}.model3.json`,Version:3,FileReferences:{Moc:e,Textures:n,Physics:o,Pose:a,Motions:s.length?{"":s.map(u=>({File:u}))}:void 0}});return l.name=i,l._objectURL=`example://${l.url}`,l}Oi.readText=(r,t)=>{const e=r.file(t);if(!e)throw new Error(`Cannot find file: ${t}`);return e.async("text")};Oi.getFilePaths=r=>{const t=[];return r.forEach(e=>t.push(e)),Promise.resolve(t)};Oi.getFiles=(r,t)=>Promise.all(t.map(async e=>{const i=e.slice(e.lastIndexOf("/")+1),n=await r.file(e).async("blob");return new File([n],i)}));function Zt(r,t,e,i){function n(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(i.next(c))}catch(h){o(h)}}function l(c){try{u(i.throw(c))}catch(h){o(h)}}function u(c){c.done?s(c.value):n(c.value).then(a,l)}u((i=i.apply(r,t||[])).next())})}function hp(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],i=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Nt(r){return this instanceof Nt?(this.v=r,this):new Nt(r)}function fr(r,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=e.apply(r,t||[]),n,s=[];return n=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),n[Symbol.asyncIterator]=function(){return this},n;function o(f){return function(y){return Promise.resolve(y).then(f,h)}}function a(f,y){i[f]&&(n[f]=function(g){return new Promise(function(d,m){s.push([f,g,d,m])>1||l(f,g)})},y&&(n[f]=y(n[f])))}function l(f,y){try{u(i[f](y))}catch(g){p(s[0][3],g)}}function u(f){f.value instanceof Nt?Promise.resolve(f.value.v).then(c,h):p(s[0][2],f)}function c(f){l("next",f)}function h(f){l("throw",f)}function p(f,y){f(y),s.shift(),s.length&&l(s[0][0],s[0][1])}}function is(r){var t,e;return t={},i("next"),i("throw",function(n){throw n}),i("return"),t[Symbol.iterator]=function(){return this},t;function i(n,s){t[n]=r[n]?function(o){return(e=!e)?{value:Nt(r[n](o)),done:!1}:s?s(o):o}:s}}function wi(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 hp=="function"?hp(r):r[Symbol.iterator](),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(s){e[s]=r[s]&&function(o){return new Promise(function(a,l){o=r[s](o),n(a,l,o.done,o.value)})}}function n(s,o,a,l){Promise.resolve(l).then(function(u){s({value:u,done:a})},o)}}const FC=new TextDecoder("utf-8"),nh=r=>FC.decode(r),PC=new TextEncoder,sf=r=>PC.encode(r),MC=r=>typeof r=="number",Iv=r=>typeof r=="boolean",Ge=r=>typeof r=="function",pr=r=>r!=null&&Object(r)===r,ss=r=>pr(r)&&Ge(r.then),ua=r=>pr(r)&&Ge(r[Symbol.iterator]),ao=r=>pr(r)&&Ge(r[Symbol.asyncIterator]),sh=r=>pr(r)&&pr(r.schema),Ev=r=>pr(r)&&"done"in r&&"value"in r,Cv=r=>pr(r)&&Ge(r.stat)&&MC(r.fd),Av=r=>pr(r)&&of(r.body),ru=r=>"_getDOMStream"in r&&"_getNodeStream"in r,DC=r=>pr(r)&&Ge(r.abort)&&Ge(r.getWriter)&&!ru(r),of=r=>pr(r)&&Ge(r.cancel)&&Ge(r.getReader)&&!ru(r),RC=r=>pr(r)&&Ge(r.end)&&Ge(r.write)&&Iv(r.writable)&&!ru(r),Ov=r=>pr(r)&&Ge(r.read)&&Ge(r.pipe)&&Iv(r.readable)&&!ru(r),NC=r=>pr(r)&&Ge(r.clear)&&Ge(r.bytes)&&Ge(r.position)&&Ge(r.setPosition)&&Ge(r.capacity)&&Ge(r.getBufferIdentifier)&&Ge(r.createLong),af=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:ArrayBuffer;function LC(r){const t=r[0]?[r[0]]:[];let e,i,n,s;for(let o,a,l=0,u=0,c=r.length;++lc+h.byteLength,0);let n,s,o,a=0,l=-1;const u=Math.min(t||Number.POSITIVE_INFINITY,i);for(const c=e.length;++l_e(Int32Array,r),dp=r=>_e(BigInt64Array,r),le=r=>_e(Uint8Array,r),oh=r=>(r.next(),r);function*BC(r,t){const e=function*(n){yield n},i=typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof af?e(t):ua(t)?t:e(t);return yield*oh(function*(n){let s=null;do s=n.next(yield _e(r,s));while(!s.done)}(i[Symbol.iterator]())),new r}const kC=r=>BC(Uint8Array,r);function Fv(r,t){return fr(this,arguments,function*(){if(ss(t))return yield Nt(yield Nt(yield*is(wi(Fv(r,yield Nt(t))))));const i=function(o){return fr(this,arguments,function*(){yield yield Nt(yield Nt(o))})},n=function(o){return fr(this,arguments,function*(){yield Nt(yield*is(wi(oh(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 af?i(t):ua(t)?n(t):ao(t)?t:i(t);return yield Nt(yield*is(wi(oh(function(o){return fr(this,arguments,function*(){let a=null;do a=yield Nt(o.next(yield yield Nt(_e(r,a))));while(!a.done)})}(s[Symbol.asyncIterator]()))))),yield Nt(new r)})}const UC=r=>Fv(Uint8Array,r);function Pv(r,t,e){if(r!==0){e=e.slice(0,t);for(let i=-1,n=e.length;++i0)do if(r[e]!==t[e])return!1;while(++e(r.next(),r);function*jC(r){let t,e=!1,i=[],n,s,o,a=0;function l(){return s==="peek"?Si(i,o)[0]:([n,i,a]=Si(i,o),n)}({cmd:s,size:o}=(yield null)||{cmd:"read",size:0});const u=kC(r)[Symbol.iterator]();try{do if({done:t,value:n}=Number.isNaN(o-a)?u.next():u.next(o-a),!t&&n.byteLength>0&&(i.push(n),a+=n.byteLength),t||o<=a)do({cmd:s,size:o}=yield l());while(o0&&(n.push(s),l+=s.byteLength),e||a<=l)do({cmd:o,size:a}=yield yield Nt(u()));while(a0&&(n.push(le(s)),l+=s.byteLength),e||a<=l)do({cmd:o,size:a}=yield yield Nt(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 Zt(this,void 0,void 0,function*(){const{reader:e,source:i}=this;e&&(yield e.cancel(t).catch(()=>{})),i&&i.locked&&this.releaseLock()})}read(t){return Zt(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=le(e)),e})}}const Xu=(r,t)=>{const e=n=>i([t,n]);let i;return[t,e,new Promise(n=>(i=n)&&r.once(t,e))]};function WC(r){return fr(this,arguments,function*(){const e=[];let i="error",n=!1,s=null,o,a,l=0,u=[],c;function h(){return o==="peek"?Si(u,a)[0]:([c,u,l]=Si(u,a),c)}if({cmd:o,size:a}=(yield yield Nt(null))||{cmd:"read",size:0},r.isTTY)return yield yield Nt(new Uint8Array(0)),yield Nt(null);try{e[0]=Xu(r,"end"),e[1]=Xu(r,"error");do{if(e[2]=Xu(r,"readable"),[i,s]=yield Nt(Promise.race(e.map(f=>f[2]))),i==="error")break;if((n=i==="end")||(Number.isFinite(a-l)?(c=le(r.read(a-l)),c.byteLength0&&(u.push(c),l+=c.byteLength)),n||a<=l)do({cmd:o,size:a}=yield yield Nt(h()));while(a{for(const[m,_]of f)r.off(m,_);try{const m=r.destroy;m&&m.call(r,y),y=void 0}catch(m){y=m||y}finally{y!=null?d(y):g()}})}})}var ke;(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"})(ke||(ke={}));var er;(function(r){r[r.Sparse=0]="Sparse",r[r.Dense=1]="Dense"})(er||(er={}));var tr;(function(r){r[r.HALF=0]="HALF",r[r.SINGLE=1]="SINGLE",r[r.DOUBLE=2]="DOUBLE"})(tr||(tr={}));var Yr;(function(r){r[r.DAY=0]="DAY",r[r.MILLISECOND=1]="MILLISECOND"})(Yr||(Yr={}));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 Ti;(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"})(Ti||(Ti={}));const qu=2,mi=4,$i=4,me=4,an=new Int32Array(2),pp=new Float32Array(an.buffer),mp=new Float64Array(an.buffer),ka=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;var ah;(function(r){r[r.UTF8_BYTES=1]="UTF8_BYTES",r[r.UTF16_STRING=2]="UTF16_STRING"})(ah||(ah={}));let Js=class Mv{constructor(t){this.bytes_=t,this.position_=0,this.text_decoder_=new TextDecoder}static allocate(t){return new Mv(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){pp[0]=e,this.writeInt32(t,an[0])}writeFloat64(t,e){mp[0]=e,this.writeInt32(t,an[ka?0:1]),this.writeInt32(t+4,an[ka?1:0])}getBufferIdentifier(){if(this.bytes_.lengththis.minalign&&(this.minalign=t);const i=~(this.bb.capacity()-this.space+e)+1&t-1;for(;this.space=0&&this.vtable[e]==0;e--);const i=e+1;for(;e>=0;e--)this.addInt16(this.vtable[e]!=0?t-this.vtable[e]:0);const n=2;this.addInt16(t-this.object_start);const s=(i+n)*qu;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,mi+n),this.addOffset(t),n&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)}finishSizePrefixed(t,e){this.finish(t,e,!0)}requiredField(t,e){const i=this.bb.capacity()-t,n=i-this.bb.readInt32(i);if(!(e=0;i--)t.addInt32(e[i]);return t.endVector()}static startTypeIdsVector(t,e){t.startVector(4,e,4)}static endUnion(t){return t.endObject()}static createUnion(t,e,i){return cr.startUnion(t),cr.addMode(t,e),cr.addTypeIds(t,i),cr.endUnion(t)}}let xp=class Do{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 Do).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsUtf8(t,e){return t.setPosition(t.position()+me),(e||new Do).__init(t.readInt32(t.position())+t.position(),t)}static startUtf8(t){t.startObject(0)}static endUtf8(t){return t.endObject()}static createUtf8(t){return Do.startUtf8(t),Do.endUtf8(t)}};var xe;(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"})(xe||(xe={}));let Lr=class Ya{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 Ya).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsField(t,e){return t.setPosition(t.position()+me),(e||new Ya).__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):xe.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 Vi).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}children(t,e){const i=this.bb.__offset(this.bb_pos,14);return i?(e||new Ya).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+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 i=this.bb.__offset(this.bb_pos,16);return i?(e||new We).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+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,xe.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 i=e.length-1;i>=0;i--)t.addOffset(e[i]);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 i=e.length-1;i>=0;i--)t.addOffset(e[i]);return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endField(t){return t.endObject()}},ci=class Di{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 Di).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsSchema(t,e){return t.setPosition(t.position()+me),(e||new Di).__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):to.Little}fields(t,e){const i=this.bb.__offset(this.bb_pos,6);return i?(e||new Lr).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+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 i=this.bb.__offset(this.bb_pos,8);return i?(e||new We).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+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,to.Little)}static addFields(t,e){t.addFieldOffset(1,e,0)}static createFieldsVector(t,e){t.startVector(4,e.length,4);for(let i=e.length-1;i>=0;i--)t.addOffset(e[i]);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 i=e.length-1;i>=0;i--)t.addOffset(e[i]);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 i=e.length-1;i>=0;i--)t.addInt64(e[i]);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,i,n,s){return Di.startSchema(t),Di.addEndianness(t,e),Di.addFields(t,i),Di.addCustomMetadata(t,n),Di.addFeatures(t,s),Di.endSchema(t)}};var fe;(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"})(fe||(fe={}));var L;(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"})(L||(L={}));var Ui;(function(r){r[r.OFFSET=0]="OFFSET",r[r.DATA=1]="DATA",r[r.VALIDITY=2]="VALIDITY",r[r.TYPE=3]="TYPE"})(Ui||(Ui={}));const HC=void 0;function Qo(r){if(r===null)return"null";if(r===HC)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=>Qo(t))}]`:`[${r}]`:ArrayBuffer.isView(r)?`[${r}]`:JSON.stringify(r,(t,e)=>typeof e=="bigint"?`${e}`:e)}function we(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 Bv(r,t){return we(r/t)+we(r%t)/we(t)}const YC=Symbol.for("isArrowBigNum");function ii(r,...t){return t.length===0?Object.setPrototypeOf(_e(this.TypedArray,r),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(r,...t),this.constructor.prototype)}ii.prototype[YC]=!0;ii.prototype.toJSON=function(){return`"${Zo(this)}"`};ii.prototype.valueOf=function(r){return kv(this,r)};ii.prototype.toString=function(){return Zo(this)};ii.prototype[Symbol.toPrimitive]=function(r="default"){switch(r){case"number":return kv(this);case"string":return Zo(this);case"default":return QC(this)}return Zo(this)};function $s(...r){return ii.apply(this,r)}function Vs(...r){return ii.apply(this,r)}function Ko(...r){return ii.apply(this,r)}Object.setPrototypeOf($s.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(Vs.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(Ko.prototype,Object.create(Uint32Array.prototype));Object.assign($s.prototype,ii.prototype,{constructor:$s,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array});Object.assign(Vs.prototype,ii.prototype,{constructor:Vs,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array});Object.assign(Ko.prototype,ii.prototype,{constructor:Ko,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const XC=BigInt(4294967296)*BigInt(4294967296),qC=XC-BigInt(1);function kv(r,t){const{buffer:e,byteOffset:i,byteLength:n,signed:s}=r,o=new BigUint64Array(e,i,n/8),a=s&&o.at(-1)&BigInt(1)<=0)return Qu(r);t=t.slice();let i=1;for(let s=0;s(r.children=null,r.ArrayType=Array,r.OffsetArrayType=Int32Array,r[Symbol.toStringTag]="DataType"))(At.prototype);let yn=class extends At{constructor(){super(L.Null)}toString(){return"Null"}};jv=Symbol.toStringTag;yn[jv]=(r=>r[Symbol.toStringTag]="Null")(yn.prototype);let os=class extends At{constructor(t,e){super(L.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}`}};$v=Symbol.toStringTag;os[$v]=(r=>(r.isSigned=null,r.bitWidth=null,r[Symbol.toStringTag]="Int"))(os.prototype);class Jo extends os{constructor(){super(!0,32)}get ArrayType(){return Int32Array}}Object.defineProperty(Jo.prototype,"ArrayType",{value:Int32Array});let fl=class extends At{constructor(t){super(L.Float),this.precision=t}get ArrayType(){switch(this.precision){case tr.HALF:return Uint16Array;case tr.SINGLE:return Float32Array;case tr.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};Vv=Symbol.toStringTag;fl[Vv]=(r=>(r.precision=null,r[Symbol.toStringTag]="Float"))(fl.prototype);let dl=class extends At{constructor(){super(L.Binary)}toString(){return"Binary"}};Gv=Symbol.toStringTag;dl[Gv]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Binary"))(dl.prototype);let pl=class extends At{constructor(){super(L.LargeBinary)}toString(){return"LargeBinary"}};Wv=Symbol.toStringTag;pl[Wv]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeBinary"))(pl.prototype);let ml=class extends At{constructor(){super(L.Utf8)}toString(){return"Utf8"}};Hv=Symbol.toStringTag;ml[Hv]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Utf8"))(ml.prototype);let yl=class extends At{constructor(){super(L.LargeUtf8)}toString(){return"LargeUtf8"}};Yv=Symbol.toStringTag;yl[Yv]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeUtf8"))(yl.prototype);let gl=class extends At{constructor(){super(L.Bool)}toString(){return"Bool"}};Xv=Symbol.toStringTag;gl[Xv]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Bool"))(gl.prototype);let vl=class extends At{constructor(t,e,i=128){super(L.Decimal),this.scale=t,this.precision=e,this.bitWidth=i}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}};qv=Symbol.toStringTag;vl[qv]=(r=>(r.scale=null,r.precision=null,r.ArrayType=Uint32Array,r[Symbol.toStringTag]="Decimal"))(vl.prototype);let _l=class extends At{constructor(t){super(L.Date),this.unit=t}toString(){return`Date${(this.unit+1)*32}<${Yr[this.unit]}>`}get ArrayType(){return this.unit===Yr.DAY?Int32Array:BigInt64Array}};Qv=Symbol.toStringTag;_l[Qv]=(r=>(r.unit=null,r[Symbol.toStringTag]="Date"))(_l.prototype);let bl=class extends At{constructor(t,e){super(L.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`)}};Kv=Symbol.toStringTag;bl[Kv]=(r=>(r.unit=null,r.bitWidth=null,r[Symbol.toStringTag]="Time"))(bl.prototype);let wl=class extends At{constructor(t,e){super(L.Timestamp),this.unit=t,this.timezone=e}toString(){return`Timestamp<${Vt[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}};Zv=Symbol.toStringTag;wl[Zv]=(r=>(r.unit=null,r.timezone=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Timestamp"))(wl.prototype);let xl=class extends At{constructor(t){super(L.Interval),this.unit=t}toString(){return`Interval<${Ti[this.unit]}>`}};Jv=Symbol.toStringTag;xl[Jv]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Interval"))(xl.prototype);let Sl=class extends At{constructor(t){super(L.Duration),this.unit=t}toString(){return`Duration<${Vt[this.unit]}>`}};t_=Symbol.toStringTag;Sl[t_]=(r=>(r.unit=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Duration"))(Sl.prototype);let Tl=class extends At{constructor(t){super(L.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}};e_=Symbol.toStringTag;Tl[e_]=(r=>(r.children=null,r[Symbol.toStringTag]="List"))(Tl.prototype);let sr=class extends At{constructor(t){super(L.Struct),this.children=t}toString(){return`Struct<{${this.children.map(t=>`${t.name}:${t.type}`).join(", ")}}>`}};r_=Symbol.toStringTag;sr[r_]=(r=>(r.children=null,r[Symbol.toStringTag]="Struct"))(sr.prototype);let Il=class extends At{constructor(t,e,i){super(L.Union),this.mode=t,this.children=i,this.typeIds=e=Int32Array.from(e),this.typeIdToChildIndex=e.reduce((n,s,o)=>(n[s]=o)&&n||n,Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(t=>`${t.type}`).join(" | ")}>`}};i_=Symbol.toStringTag;Il[i_]=(r=>(r.mode=null,r.typeIds=null,r.children=null,r.typeIdToChildIndex=null,r.ArrayType=Int8Array,r[Symbol.toStringTag]="Union"))(Il.prototype);let El=class extends At{constructor(t){super(L.FixedSizeBinary),this.byteWidth=t}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};n_=Symbol.toStringTag;El[n_]=(r=>(r.byteWidth=null,r.ArrayType=Uint8Array,r[Symbol.toStringTag]="FixedSizeBinary"))(El.prototype);let Cl=class extends At{constructor(t,e){super(L.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}>`}};s_=Symbol.toStringTag;Cl[s_]=(r=>(r.children=null,r.listSize=null,r[Symbol.toStringTag]="FixedSizeList"))(Cl.prototype);let Al=class extends At{constructor(t,e=!1){var i,n,s;if(super(L.Map),this.children=[t],this.keysSorted=e,t&&(t.name="entries",!((i=t==null?void 0:t.type)===null||i===void 0)&&i.children)){const o=(n=t==null?void 0:t.type)===null||n===void 0?void 0:n.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(", ")}}>`}};o_=Symbol.toStringTag;Al[o_]=(r=>(r.children=null,r.keysSorted=null,r[Symbol.toStringTag]="Map_"))(Al.prototype);const ZC=(r=>()=>++r)(-1);let eo=class extends At{constructor(t,e,i,n){super(L.Dictionary),this.indices=e,this.dictionary=t,this.isOrdered=n||!1,this.id=i==null?ZC():we(i)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}};a_=Symbol.toStringTag;eo[a_]=(r=>(r.id=null,r.indices=null,r.isOrdered=null,r.dictionary=null,r[Symbol.toStringTag]="Dictionary"))(eo.prototype);function zi(r){const t=r;switch(r.typeId){case L.Decimal:return r.bitWidth/32;case L.Interval:return 1+t.unit;case L.FixedSizeList:return t.listSize;case L.FixedSizeBinary:return t.byteWidth;default:return 1}}let ie=class{visitMany(t,...e){return t.map((i,n)=>this.visit(i,...e.map(s=>s[n])))}visit(...t){return this.getVisitFn(t[0],!1).apply(this,t)}getVisitFn(t,e=!0){return JC(this,t,e)}getVisitFnByTypeId(t,e=!0){return Fs(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 JC(r,t,e=!0){return typeof t=="number"?Fs(r,t,e):typeof t=="string"&&t in L?Fs(r,L[t],e):t&&t instanceof At?Fs(r,Sp(t),e):t!=null&&t.type&&t.type instanceof At?Fs(r,Sp(t.type),e):Fs(r,L.NONE,e)}function Fs(r,t,e=!0){let i=null;switch(t){case L.Null:i=r.visitNull;break;case L.Bool:i=r.visitBool;break;case L.Int:i=r.visitInt;break;case L.Int8:i=r.visitInt8||r.visitInt;break;case L.Int16:i=r.visitInt16||r.visitInt;break;case L.Int32:i=r.visitInt32||r.visitInt;break;case L.Int64:i=r.visitInt64||r.visitInt;break;case L.Uint8:i=r.visitUint8||r.visitInt;break;case L.Uint16:i=r.visitUint16||r.visitInt;break;case L.Uint32:i=r.visitUint32||r.visitInt;break;case L.Uint64:i=r.visitUint64||r.visitInt;break;case L.Float:i=r.visitFloat;break;case L.Float16:i=r.visitFloat16||r.visitFloat;break;case L.Float32:i=r.visitFloat32||r.visitFloat;break;case L.Float64:i=r.visitFloat64||r.visitFloat;break;case L.Utf8:i=r.visitUtf8;break;case L.LargeUtf8:i=r.visitLargeUtf8;break;case L.Binary:i=r.visitBinary;break;case L.LargeBinary:i=r.visitLargeBinary;break;case L.FixedSizeBinary:i=r.visitFixedSizeBinary;break;case L.Date:i=r.visitDate;break;case L.DateDay:i=r.visitDateDay||r.visitDate;break;case L.DateMillisecond:i=r.visitDateMillisecond||r.visitDate;break;case L.Timestamp:i=r.visitTimestamp;break;case L.TimestampSecond:i=r.visitTimestampSecond||r.visitTimestamp;break;case L.TimestampMillisecond:i=r.visitTimestampMillisecond||r.visitTimestamp;break;case L.TimestampMicrosecond:i=r.visitTimestampMicrosecond||r.visitTimestamp;break;case L.TimestampNanosecond:i=r.visitTimestampNanosecond||r.visitTimestamp;break;case L.Time:i=r.visitTime;break;case L.TimeSecond:i=r.visitTimeSecond||r.visitTime;break;case L.TimeMillisecond:i=r.visitTimeMillisecond||r.visitTime;break;case L.TimeMicrosecond:i=r.visitTimeMicrosecond||r.visitTime;break;case L.TimeNanosecond:i=r.visitTimeNanosecond||r.visitTime;break;case L.Decimal:i=r.visitDecimal;break;case L.List:i=r.visitList;break;case L.Struct:i=r.visitStruct;break;case L.Union:i=r.visitUnion;break;case L.DenseUnion:i=r.visitDenseUnion||r.visitUnion;break;case L.SparseUnion:i=r.visitSparseUnion||r.visitUnion;break;case L.Dictionary:i=r.visitDictionary;break;case L.Interval:i=r.visitInterval;break;case L.IntervalDayTime:i=r.visitIntervalDayTime||r.visitInterval;break;case L.IntervalYearMonth:i=r.visitIntervalYearMonth||r.visitInterval;break;case L.Duration:i=r.visitDuration;break;case L.DurationSecond:i=r.visitDurationSecond||r.visitDuration;break;case L.DurationMillisecond:i=r.visitDurationMillisecond||r.visitDuration;break;case L.DurationMicrosecond:i=r.visitDurationMicrosecond||r.visitDuration;break;case L.DurationNanosecond:i=r.visitDurationNanosecond||r.visitDuration;break;case L.FixedSizeList:i=r.visitFixedSizeList;break;case L.Map:i=r.visitMap;break}if(typeof i=="function")return i;if(!e)return()=>null;throw new Error(`Unrecognized type '${L[t]}'`)}function Sp(r){switch(r.typeId){case L.Null:return L.Null;case L.Int:{const{bitWidth:t,isSigned:e}=r;switch(t){case 8:return e?L.Int8:L.Uint8;case 16:return e?L.Int16:L.Uint16;case 32:return e?L.Int32:L.Uint32;case 64:return e?L.Int64:L.Uint64}return L.Int}case L.Float:switch(r.precision){case tr.HALF:return L.Float16;case tr.SINGLE:return L.Float32;case tr.DOUBLE:return L.Float64}return L.Float;case L.Binary:return L.Binary;case L.LargeBinary:return L.LargeBinary;case L.Utf8:return L.Utf8;case L.LargeUtf8:return L.LargeUtf8;case L.Bool:return L.Bool;case L.Decimal:return L.Decimal;case L.Time:switch(r.unit){case Vt.SECOND:return L.TimeSecond;case Vt.MILLISECOND:return L.TimeMillisecond;case Vt.MICROSECOND:return L.TimeMicrosecond;case Vt.NANOSECOND:return L.TimeNanosecond}return L.Time;case L.Timestamp:switch(r.unit){case Vt.SECOND:return L.TimestampSecond;case Vt.MILLISECOND:return L.TimestampMillisecond;case Vt.MICROSECOND:return L.TimestampMicrosecond;case Vt.NANOSECOND:return L.TimestampNanosecond}return L.Timestamp;case L.Date:switch(r.unit){case Yr.DAY:return L.DateDay;case Yr.MILLISECOND:return L.DateMillisecond}return L.Date;case L.Interval:switch(r.unit){case Ti.DAY_TIME:return L.IntervalDayTime;case Ti.YEAR_MONTH:return L.IntervalYearMonth}return L.Interval;case L.Duration:switch(r.unit){case Vt.SECOND:return L.DurationSecond;case Vt.MILLISECOND:return L.DurationMillisecond;case Vt.MICROSECOND:return L.DurationMicrosecond;case Vt.NANOSECOND:return L.DurationNanosecond}return L.Duration;case L.Map:return L.Map;case L.List:return L.List;case L.Struct:return L.Struct;case L.Union:switch(r.mode){case er.Dense:return L.DenseUnion;case er.Sparse:return L.SparseUnion}return L.Union;case L.FixedSizeBinary:return L.FixedSizeBinary;case L.FixedSizeList:return L.FixedSizeList;case L.Dictionary:return L.Dictionary}throw new Error(`Unrecognized type '${L[r.typeId]}'`)}ie.prototype.visitInt8=null;ie.prototype.visitInt16=null;ie.prototype.visitInt32=null;ie.prototype.visitInt64=null;ie.prototype.visitUint8=null;ie.prototype.visitUint16=null;ie.prototype.visitUint32=null;ie.prototype.visitUint64=null;ie.prototype.visitFloat16=null;ie.prototype.visitFloat32=null;ie.prototype.visitFloat64=null;ie.prototype.visitDateDay=null;ie.prototype.visitDateMillisecond=null;ie.prototype.visitTimestampSecond=null;ie.prototype.visitTimestampMillisecond=null;ie.prototype.visitTimestampMicrosecond=null;ie.prototype.visitTimestampNanosecond=null;ie.prototype.visitTimeSecond=null;ie.prototype.visitTimeMillisecond=null;ie.prototype.visitTimeMicrosecond=null;ie.prototype.visitTimeNanosecond=null;ie.prototype.visitDenseUnion=null;ie.prototype.visitSparseUnion=null;ie.prototype.visitIntervalDayTime=null;ie.prototype.visitIntervalYearMonth=null;ie.prototype.visitDuration=null;ie.prototype.visitDurationSecond=null;ie.prototype.visitDurationMillisecond=null;ie.prototype.visitDurationMicrosecond=null;ie.prototype.visitDurationNanosecond=null;const l_=new Float64Array(1),_s=new Uint32Array(l_.buffer);function u_(r){const t=(r&31744)>>10,e=(r&1023)/1024,i=Math.pow(-1,(r&32768)>>15);switch(t){case 31:return i*(e?Number.NaN:1/0);case 0:return i*(e?6103515625e-14*e:0)}return i*Math.pow(2,t-15)*(1+e)}function tA(r){if(r!==r)return 32256;l_[0]=r;const t=(_s[1]&2147483648)>>16&65535;let e=_s[1]&2146435072,i=0;return e>=1089470464?_s[0]>0?e=31744:(e=(e&2080374784)>>16,i=(_s[1]&1048575)>>10):e<=1056964608?(i=1048576+(_s[1]&1048575),i=1048576+(i<<(e>>20)-998)>>21,e=0):(e=e-1056964608>>10,i=(_s[1]&1048575)+512>>10),t|e|i&65535}let Gt=class extends ie{};function Xt(r){return(t,e,i)=>{if(t.setValid(e,i!=null))return r(t,e,i)}}const eA=(r,t,e)=>{r[t]=Math.floor(e/864e5)},c_=(r,t,e,i)=>{if(e+1{const n=r+e;i?t[n>>3]|=1<>3]&=~(1<{r[t]=e},lf=({values:r},t,e)=>{r[t]=e},h_=({values:r},t,e)=>{r[t]=tA(e)},iA=(r,t,e)=>{switch(r.type.precision){case tr.HALF:return h_(r,t,e);case tr.SINGLE:case tr.DOUBLE:return lf(r,t,e)}},f_=({values:r},t,e)=>{eA(r,t,e.valueOf())},d_=({values:r},t,e)=>{r[t]=BigInt(e)},nA=({stride:r,values:t},e,i)=>{t.set(i.subarray(0,r),r*e)},p_=({values:r,valueOffsets:t},e,i)=>c_(r,t,e,i),m_=({values:r,valueOffsets:t},e,i)=>c_(r,t,e,sf(i)),sA=(r,t,e)=>{r.type.unit===Yr.DAY?f_(r,t,e):d_(r,t,e)},y_=({values:r},t,e)=>{r[t]=BigInt(e/1e3)},g_=({values:r},t,e)=>{r[t]=BigInt(e)},v_=({values:r},t,e)=>{r[t]=BigInt(e*1e3)},__=({values:r},t,e)=>{r[t]=BigInt(e*1e6)},oA=(r,t,e)=>{switch(r.type.unit){case Vt.SECOND:return y_(r,t,e);case Vt.MILLISECOND:return g_(r,t,e);case Vt.MICROSECOND:return v_(r,t,e);case Vt.NANOSECOND:return __(r,t,e)}},b_=({values:r},t,e)=>{r[t]=e},w_=({values:r},t,e)=>{r[t]=e},x_=({values:r},t,e)=>{r[t]=e},S_=({values:r},t,e)=>{r[t]=e},aA=(r,t,e)=>{switch(r.type.unit){case Vt.SECOND:return b_(r,t,e);case Vt.MILLISECOND:return w_(r,t,e);case Vt.MICROSECOND:return x_(r,t,e);case Vt.NANOSECOND:return S_(r,t,e)}},lA=({values:r,stride:t},e,i)=>{r.set(i.subarray(0,t),t*e)},uA=(r,t,e)=>{const i=r.children[0],n=r.valueOffsets,s=Xr.getVisitFn(i);if(Array.isArray(e))for(let o=-1,a=n[t],l=n[t+1];a{const i=r.children[0],{valueOffsets:n}=r,s=Xr.getVisitFn(i);let{[t]:o,[t+1]:a}=n;const l=e instanceof Map?e.entries():Object.entries(e);for(const u of l)if(s(i,o,u),++o>=a)break},hA=(r,t)=>(e,i,n,s)=>i&&e(i,r,t[s]),fA=(r,t)=>(e,i,n,s)=>i&&e(i,r,t.get(s)),dA=(r,t)=>(e,i,n,s)=>i&&e(i,r,t.get(n.name)),pA=(r,t)=>(e,i,n,s)=>i&&e(i,r,t[n.name]),mA=(r,t,e)=>{const i=r.type.children.map(s=>Xr.getVisitFn(s.type)),n=e instanceof Map?dA(t,e):e instanceof Me?fA(t,e):Array.isArray(e)?hA(t,e):pA(t,e);r.type.children.forEach((s,o)=>n(i[o],r.children[o],s,o))},yA=(r,t,e)=>{r.type.mode===er.Dense?T_(r,t,e):I_(r,t,e)},T_=(r,t,e)=>{const i=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[i];Xr.visit(n,r.valueOffsets[t],e)},I_=(r,t,e)=>{const i=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[i];Xr.visit(n,t,e)},gA=(r,t,e)=>{var i;(i=r.dictionary)===null||i===void 0||i.set(r.values[t],e)},vA=(r,t,e)=>{r.type.unit===Ti.DAY_TIME?E_(r,t,e):C_(r,t,e)},E_=({values:r},t,e)=>{r.set(e.subarray(0,2),2*t)},C_=({values:r},t,e)=>{r[t]=e[0]*12+e[1]%12},A_=({values:r},t,e)=>{r[t]=e},O_=({values:r},t,e)=>{r[t]=e},F_=({values:r},t,e)=>{r[t]=e},P_=({values:r},t,e)=>{r[t]=e},_A=(r,t,e)=>{switch(r.type.unit){case Vt.SECOND:return A_(r,t,e);case Vt.MILLISECOND:return O_(r,t,e);case Vt.MICROSECOND:return F_(r,t,e);case Vt.NANOSECOND:return P_(r,t,e)}},bA=(r,t,e)=>{const{stride:i}=r,n=r.children[0],s=Xr.getVisitFn(n);if(Array.isArray(e))for(let o=-1,a=t*i;++o`${Qo(t)}: ${Qo(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new wA(this[Zr],this[Gs])}},wA=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[Zr].type.children.findIndex(i=>i.name===e)!==-1}getOwnPropertyDescriptor(t,e){if(t[Zr].type.children.findIndex(i=>i.name===e)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e];const i=t[Zr].type.children.findIndex(n=>n.name===e);if(i!==-1){const n=mr.visit(t[Zr].children[i],t[Gs]);return Reflect.set(t,e,n),n}}set(t,e,i){const n=t[Zr].type.children.findIndex(s=>s.name===e);return n!==-1?(Xr.visit(t[Zr].children[n],t[Gs],i),Reflect.set(t,e,i)):Reflect.has(t,e)||typeof e=="symbol"?Reflect.set(t,e,i):!1}},Lt=class extends ie{};function Wt(r){return(t,e)=>t.getValid(e)?r(t,e):null}const SA=(r,t)=>864e5*r[t],TA=(r,t)=>null,M_=(r,t,e)=>{if(e+1>=t.length)return null;const i=we(t[e]),n=we(t[e+1]);return r.subarray(i,n)},IA=({offset:r,values:t},e)=>{const i=r+e;return(t[i>>3]&1<SA(r,t),R_=({values:r},t)=>we(r[t]),Sn=({stride:r,values:t},e)=>t[r*e],EA=({stride:r,values:t},e)=>u_(t[r*e]),N_=({values:r},t)=>r[t],CA=({stride:r,values:t},e)=>t.subarray(r*e,r*(e+1)),L_=({values:r,valueOffsets:t},e)=>M_(r,t,e),B_=({values:r,valueOffsets:t},e)=>{const i=M_(r,t,e);return i!==null?nh(i):null},AA=({values:r},t)=>r[t],OA=({type:r,values:t},e)=>r.precision!==tr.HALF?t[e]:u_(t[e]),FA=(r,t)=>r.type.unit===Yr.DAY?D_(r,t):R_(r,t),k_=({values:r},t)=>1e3*we(r[t]),U_=({values:r},t)=>we(r[t]),z_=({values:r},t)=>Bv(r[t],BigInt(1e3)),j_=({values:r},t)=>Bv(r[t],BigInt(1e6)),PA=(r,t)=>{switch(r.type.unit){case Vt.SECOND:return k_(r,t);case Vt.MILLISECOND:return U_(r,t);case Vt.MICROSECOND:return z_(r,t);case Vt.NANOSECOND:return j_(r,t)}},$_=({values:r},t)=>r[t],V_=({values:r},t)=>r[t],G_=({values:r},t)=>r[t],W_=({values:r},t)=>r[t],MA=(r,t)=>{switch(r.type.unit){case Vt.SECOND:return $_(r,t);case Vt.MILLISECOND:return V_(r,t);case Vt.MICROSECOND:return G_(r,t);case Vt.NANOSECOND:return W_(r,t)}},DA=({values:r,stride:t},e)=>KC.decimal(r.subarray(t*e,t*(e+1))),RA=(r,t)=>{const{valueOffsets:e,stride:i,children:n}=r,{[t*i]:s,[t*i+1]:o}=e,l=n[0].slice(s,o-s);return new Me([l])},NA=(r,t)=>{const{valueOffsets:e,children:i}=r,{[t]:n,[t+1]:s}=e,o=i[0];return new cf(o.slice(n,s-n))},LA=(r,t)=>new uf(r,t),BA=(r,t)=>r.type.mode===er.Dense?H_(r,t):Y_(r,t),H_=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[e];return mr.visit(i,r.valueOffsets[t])},Y_=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[e];return mr.visit(i,t)},kA=(r,t)=>{var e;return(e=r.dictionary)===null||e===void 0?void 0:e.get(r.values[t])},UA=(r,t)=>r.type.unit===Ti.DAY_TIME?X_(r,t):q_(r,t),X_=({values:r},t)=>r.subarray(2*t,2*(t+1)),q_=({values:r},t)=>{const e=r[t],i=new Int32Array(2);return i[0]=Math.trunc(e/12),i[1]=Math.trunc(e%12),i},Q_=({values:r},t)=>r[t],K_=({values:r},t)=>r[t],Z_=({values:r},t)=>r[t],J_=({values:r},t)=>r[t],zA=(r,t)=>{switch(r.type.unit){case Vt.SECOND:return Q_(r,t);case Vt.MILLISECOND:return K_(r,t);case Vt.MICROSECOND:return Z_(r,t);case Vt.NANOSECOND:return J_(r,t)}},jA=(r,t)=>{const{stride:e,children:i}=r,s=i[0].slice(t*e,e);return new Me([s])};Lt.prototype.visitNull=Wt(TA);Lt.prototype.visitBool=Wt(IA);Lt.prototype.visitInt=Wt(AA);Lt.prototype.visitInt8=Wt(Sn);Lt.prototype.visitInt16=Wt(Sn);Lt.prototype.visitInt32=Wt(Sn);Lt.prototype.visitInt64=Wt(N_);Lt.prototype.visitUint8=Wt(Sn);Lt.prototype.visitUint16=Wt(Sn);Lt.prototype.visitUint32=Wt(Sn);Lt.prototype.visitUint64=Wt(N_);Lt.prototype.visitFloat=Wt(OA);Lt.prototype.visitFloat16=Wt(EA);Lt.prototype.visitFloat32=Wt(Sn);Lt.prototype.visitFloat64=Wt(Sn);Lt.prototype.visitUtf8=Wt(B_);Lt.prototype.visitLargeUtf8=Wt(B_);Lt.prototype.visitBinary=Wt(L_);Lt.prototype.visitLargeBinary=Wt(L_);Lt.prototype.visitFixedSizeBinary=Wt(CA);Lt.prototype.visitDate=Wt(FA);Lt.prototype.visitDateDay=Wt(D_);Lt.prototype.visitDateMillisecond=Wt(R_);Lt.prototype.visitTimestamp=Wt(PA);Lt.prototype.visitTimestampSecond=Wt(k_);Lt.prototype.visitTimestampMillisecond=Wt(U_);Lt.prototype.visitTimestampMicrosecond=Wt(z_);Lt.prototype.visitTimestampNanosecond=Wt(j_);Lt.prototype.visitTime=Wt(MA);Lt.prototype.visitTimeSecond=Wt($_);Lt.prototype.visitTimeMillisecond=Wt(V_);Lt.prototype.visitTimeMicrosecond=Wt(G_);Lt.prototype.visitTimeNanosecond=Wt(W_);Lt.prototype.visitDecimal=Wt(DA);Lt.prototype.visitList=Wt(RA);Lt.prototype.visitStruct=Wt(LA);Lt.prototype.visitUnion=Wt(BA);Lt.prototype.visitDenseUnion=Wt(H_);Lt.prototype.visitSparseUnion=Wt(Y_);Lt.prototype.visitDictionary=Wt(kA);Lt.prototype.visitInterval=Wt(UA);Lt.prototype.visitIntervalDayTime=Wt(X_);Lt.prototype.visitIntervalYearMonth=Wt(q_);Lt.prototype.visitDuration=Wt(zA);Lt.prototype.visitDurationSecond=Wt(Q_);Lt.prototype.visitDurationMillisecond=Wt(K_);Lt.prototype.visitDurationMicrosecond=Wt(Z_);Lt.prototype.visitDurationNanosecond=Wt(J_);Lt.prototype.visitFixedSizeList=Wt(jA);Lt.prototype.visitMap=Wt(NA);const mr=new Lt,Ps=Symbol.for("keys"),Ws=Symbol.for("vals"),Ms=Symbol.for("kKeysAsStrings"),hh=Symbol.for("_kKeysAsStrings");let cf=class{constructor(t){return this[Ps]=new Me([t.children[0]]).memoize(),this[Ws]=t.children[1],new Proxy(this,new VA)}get[Ms](){return this[hh]||(this[hh]=Array.from(this[Ps].toArray(),String))}[Symbol.iterator](){return new $A(this[Ps],this[Ws])}get size(){return this[Ps].length}toArray(){return Object.values(this.toJSON())}toJSON(){const t=this[Ps],e=this[Ws],i={};for(let n=-1,s=t.length;++n`${Qo(t)}: ${Qo(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}},$A=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),mr.visit(this.vals,t)]})}},VA=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(t){return t[Ms]}has(t,e){return t[Ms].includes(e)}getOwnPropertyDescriptor(t,e){if(t[Ms].indexOf(e)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e];const i=t[Ms].indexOf(e);if(i!==-1){const n=mr.visit(Reflect.get(t,Ws),i);return Reflect.set(t,e,n),n}}set(t,e,i){const n=t[Ms].indexOf(e);return n!==-1?(Xr.visit(Reflect.get(t,Ws),n,i),Reflect.set(t,e,i)):Reflect.has(t,e)?Reflect.set(t,e,i):!1}};Object.defineProperties(cf.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[Ps]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Ws]:{writable:!0,enumerable:!1,configurable:!1,value:null},[hh]:{writable:!0,enumerable:!1,configurable:!1,value:null}});let Tp;function t0(r,t,e,i){const{length:n=0}=r;let s=typeof t!="number"?0:t,o=typeof e!="number"?n:e;return s<0&&(s=(s%n+n)%n),o<0&&(o=(o%n+n)%n),on&&(o=n),i?i(r,s,o):[s,o]}const hf=(r,t)=>r<0?t+r:r,Ip=r=>r!==r;function lo(r){if(typeof r!=="object"||r===null)return Ip(r)?Ip:e=>e===r;if(r instanceof Date){const e=r.valueOf();return i=>i instanceof Date?i.valueOf()===e:!1}return ArrayBuffer.isView(r)?e=>e?zC(r,e):!1:r instanceof Map?WA(r):Array.isArray(r)?GA(r):r instanceof Me?HA(r):YA(r,!0)}function GA(r){const t=[];for(let e=-1,i=r.length;++e!1;const i=[];for(let n=-1,s=e.length;++n{if(!e||typeof e!="object")return!1;switch(e.constructor){case Array:return XA(r,e);case Map:return Ep(r,e,e.keys());case cf:case uf:case Object:case void 0:return Ep(r,e,t||Object.keys(e))}return e instanceof Me?qA(r,e):!1}}function XA(r,t){const e=r.length;if(t.length!==e)return!1;for(let i=-1;++i>i}function Ol(r,t,e){const i=e.byteLength+7&-8;if(r>0||e.byteLength>3):Fl(new ff(e,r,t,null,e0)).subarray(0,i)),n}return e}function Fl(r){const t=[];let e=0,i=0,n=0;for(const o of r)o&&(n|=1<0)&&(t[e++]=n);const s=new Uint8Array(t.length+7&-8);return s.set(t),s}let ff=class{constructor(t,e,i,n,s){this.bytes=t,this.length=i,this.context=n,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,n=t+(t%8===0?0:8-t%8);return fh(r,t,n)+fh(r,i,e)+KA(r,n>>3,i-n>>3)}function KA(r,t,e){let i=0,n=Math.trunc(t);const s=new DataView(r.buffer,r.byteOffset,r.byteLength),o=e===void 0?r.byteLength:n+e;for(;o-n>=4;)i+=Ku(s.getUint32(n)),n+=4;for(;o-n>=2;)i+=Ku(s.getUint16(n)),n+=2;for(;o-n>=1;)i+=Ku(s.getUint8(n)),n+=1;return i}function Ku(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 ZA=-1;let Se=class dh{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 At.isSparseUnion(t)?this.children.some(e=>e.nullable):At.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:i,nullBitmap:n,typeIds:s}=this;return e&&(t+=e.byteLength),i&&(t+=i.byteLength),n&&(t+=n.byteLength),s&&(t+=s.byteLength),this.children.reduce((o,a)=>o+a.byteLength,t)}get nullCount(){if(At.isUnion(this.type))return this.children.reduce((i,n)=>i+n.nullCount,0);let t=this._nullCount,e;return t<=ZA&&(e=this.nullBitmap)&&(this._nullCount=t=e.length===0?0:this.length-fh(e,this.offset,this.offset+this.length)),t}constructor(t,e,i,n,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(i||0,0)),this._nullCount=Math.floor(Math.max(n||0,-1));let l;s instanceof dh?(this.stride=s.stride,this.values=s.values,this.typeIds=s.typeIds,this.nullBitmap=s.nullBitmap,this.valueOffsets=s.valueOffsets):(this.stride=zi(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(At.isUnion(e)){const i=e,n=this.children[i.typeIdToChildIndex[this.typeIds[t]]],s=i.mode===er.Dense?this.valueOffsets[t]:t;return n.getValid(s)}if(this.nullable&&this.nullCount>0){const i=this.offset+t;return(this.nullBitmap[i>>3]&1<>3;(!s||s.byteLength<=c)&&(s=new Uint8Array((o+a+63&-64)>>3).fill(255),this.nullCount>0?(s.set(Ol(o,a,this.nullBitmap),0),Object.assign(this,{nullBitmap:s})):Object.assign(this,{nullBitmap:s,_nullCount:0}));const h=s[c];i=(h&u)!==0,s[c]=e?h|u:h&~u}return i!==!!e&&(this._nullCount=this.nullCount+(e?-1:1)),e}clone(t=this.type,e=this.offset,i=this.length,n=this._nullCount,s=this,o=this.children){return new dh(t,e,i,n,s,o,this.dictionary)}slice(t,e){const{stride:i,typeId:n,children:s}=this,o=+(this._nullCount===0)-1,a=n===16?i:1,l=this._sliceBuffers(t,e,i,n);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===L.Null)return this.clone(this.type,0,t,0);const{length:e,nullCount:i}=this,n=new Uint8Array((t+63&-64)>>3).fill(255,0,e>>3);n[e>>3]=(1<0&&n.set(Ol(this.offset,e,this.nullBitmap),0);const s=this.buffers;return s[Ui.VALIDITY]=n,this.clone(this.type,0,t,i+(t-e),s)}_sliceBuffers(t,e,i,n){let s;const{buffers:o}=this;return(s=o[Ui.TYPE])&&(o[Ui.TYPE]=s.subarray(t,t+e)),(s=o[Ui.OFFSET])&&(o[Ui.OFFSET]=s.subarray(t,t+e+1))||(s=o[Ui.DATA])&&(o[Ui.DATA]=n===6?s:s.subarray(i*t,i*(t+e))),o}_sliceChildren(t,e,i){return t.map(n=>n.slice(e,i))}};Se.prototype.children=Object.freeze([]);class Bo extends ie{visit(t){return this.getVisitFn(t.type).call(this,t)}visitNull(t){const{["type"]:e,["offset"]:i=0,["length"]:n=0}=t;return new Se(e,i,n,n)}visitBool(t){const{["type"]:e,["offset"]:i=0}=t,n=le(t.nullBitmap),s=_e(e.ArrayType,t.data),{["length"]:o=s.length>>3,["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Se(e,i,o,a,[void 0,s,n])}visitInt(t){const{["type"]:e,["offset"]:i=0}=t,n=le(t.nullBitmap),s=_e(e.ArrayType,t.data),{["length"]:o=s.length,["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Se(e,i,o,a,[void 0,s,n])}visitFloat(t){const{["type"]:e,["offset"]:i=0}=t,n=le(t.nullBitmap),s=_e(e.ArrayType,t.data),{["length"]:o=s.length,["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Se(e,i,o,a,[void 0,s,n])}visitUtf8(t){const{["type"]:e,["offset"]:i=0}=t,n=le(t.data),s=le(t.nullBitmap),o=_o(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Se(e,i,a,l,[o,n,s])}visitLargeUtf8(t){const{["type"]:e,["offset"]:i=0}=t,n=le(t.data),s=le(t.nullBitmap),o=dp(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Se(e,i,a,l,[o,n,s])}visitBinary(t){const{["type"]:e,["offset"]:i=0}=t,n=le(t.data),s=le(t.nullBitmap),o=_o(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Se(e,i,a,l,[o,n,s])}visitLargeBinary(t){const{["type"]:e,["offset"]:i=0}=t,n=le(t.data),s=le(t.nullBitmap),o=dp(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Se(e,i,a,l,[o,n,s])}visitFixedSizeBinary(t){const{["type"]:e,["offset"]:i=0}=t,n=le(t.nullBitmap),s=_e(e.ArrayType,t.data),{["length"]:o=s.length/zi(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Se(e,i,o,a,[void 0,s,n])}visitDate(t){const{["type"]:e,["offset"]:i=0}=t,n=le(t.nullBitmap),s=_e(e.ArrayType,t.data),{["length"]:o=s.length/zi(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Se(e,i,o,a,[void 0,s,n])}visitTimestamp(t){const{["type"]:e,["offset"]:i=0}=t,n=le(t.nullBitmap),s=_e(e.ArrayType,t.data),{["length"]:o=s.length/zi(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Se(e,i,o,a,[void 0,s,n])}visitTime(t){const{["type"]:e,["offset"]:i=0}=t,n=le(t.nullBitmap),s=_e(e.ArrayType,t.data),{["length"]:o=s.length/zi(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Se(e,i,o,a,[void 0,s,n])}visitDecimal(t){const{["type"]:e,["offset"]:i=0}=t,n=le(t.nullBitmap),s=_e(e.ArrayType,t.data),{["length"]:o=s.length/zi(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Se(e,i,o,a,[void 0,s,n])}visitList(t){const{["type"]:e,["offset"]:i=0,["child"]:n}=t,s=le(t.nullBitmap),o=_o(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Se(e,i,a,l,[o,void 0,s],[n])}visitStruct(t){const{["type"]:e,["offset"]:i=0,["children"]:n=[]}=t,s=le(t.nullBitmap),{length:o=n.reduce((l,{length:u})=>Math.max(l,u),0),nullCount:a=t.nullBitmap?-1:0}=t;return new Se(e,i,o,a,[void 0,void 0,s],n)}visitUnion(t){const{["type"]:e,["offset"]:i=0,["children"]:n=[]}=t,s=_e(e.ArrayType,t.typeIds),{["length"]:o=s.length,["nullCount"]:a=-1}=t;if(At.isSparseUnion(e))return new Se(e,i,o,a,[void 0,void 0,void 0,s],n);const l=_o(t.valueOffsets);return new Se(e,i,o,a,[l,void 0,void 0,s],n)}visitDictionary(t){const{["type"]:e,["offset"]:i=0}=t,n=le(t.nullBitmap),s=_e(e.indices.ArrayType,t.data),{["dictionary"]:o=new Me([new Bo().visit({type:e.dictionary})])}=t,{["length"]:a=s.length,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Se(e,i,a,l,[void 0,s,n],[],o)}visitInterval(t){const{["type"]:e,["offset"]:i=0}=t,n=le(t.nullBitmap),s=_e(e.ArrayType,t.data),{["length"]:o=s.length/zi(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Se(e,i,o,a,[void 0,s,n])}visitDuration(t){const{["type"]:e,["offset"]:i=0}=t,n=le(t.nullBitmap),s=_e(e.ArrayType,t.data),{["length"]:o=s.length,["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Se(e,i,o,a,[void 0,s,n])}visitFixedSizeList(t){const{["type"]:e,["offset"]:i=0,["child"]:n=new Bo().visit({type:e.valueType})}=t,s=le(t.nullBitmap),{["length"]:o=n.length/zi(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Se(e,i,o,a,[void 0,void 0,s],[n])}visitMap(t){const{["type"]:e,["offset"]:i=0,["child"]:n=new Bo().visit({type:e.childType})}=t,s=le(t.nullBitmap),o=_o(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Se(e,i,a,l,[o,void 0,s],[n])}}const JA=new Bo;function se(r){return JA.visit(r)}let Cp=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 r0(r){return r.reduce((t,e)=>t+e.nullCount,0)}function i0(r){return r.reduce((t,e,i)=>(t[i+1]=t[i]+e.length,t),new Uint32Array(r.length+1))}function n0(r,t,e,i){const n=[];for(let s=-1,o=r.length;++s=i)break;if(e>=l+u)continue;if(l>=e&&l+u<=i){n.push(a);continue}const c=Math.max(0,e-l),h=Math.min(i-l,u);n.push(a.slice(c,h-c))}return n.length===0&&n.push(r[0].slice(0,0)),n}function df(r,t,e,i){let n=0,s=0,o=t.length-1;do{if(n>=o-1)return e0?0:-1}function rO(r,t){const{nullBitmap:e}=r;if(!e||r.nullCount<=0)return-1;let i=0;for(const n of new ff(e,r.offset+(t||0),r.length,e,e0)){if(!n)return i;++i}return-1}function Kt(r,t,e){if(t===void 0)return-1;if(t===null)switch(r.typeId){case L.Union:break;case L.Dictionary:break;default:return rO(r,e)}const i=mr.getVisitFn(r),n=lo(t);for(let s=(e||0)-1,o=r.length;++s{const n=r.data[i];return n.values.subarray(0,n.length)[Symbol.iterator]()});let e=0;return new Cp(r.data.length,i=>{const s=r.data[i].length,o=r.slice(e,e+s);return e+=s,new iO(o)})}let iO=class{constructor(t){this.vector=t,this.index=0}next(){return this.indexa.data):t;if(s.length===0||s.some(a=>!(a instanceof Se)))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}=u0[o.typeId],c=s[0];this.isValid=h=>pf(c,h),this.get=h=>a(c,h),this.set=(h,p)=>l(c,h,p),this.indexOf=h=>u(c,h),this._offsets=[0,c.length];break}default:Object.setPrototypeOf(this,c0[o.typeId]),this._offsets=i0(s);break}this.data=s,this.type=o,this.stride=zi(o),this.numChildren=(n=(i=o.children)===null||i===void 0?void 0:i.length)!==null&&n!==void 0?n:0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce((t,e)=>t+e.byteLength,0)}get nullable(){return tO(this.data)}get nullCount(){return r0(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${L[this.type.typeId]}Vector`}isValid(t){return!1}get(t){return null}at(t){return this.get(hf(t,this.length))}set(t,e){}indexOf(t,e){return-1}includes(t,e){return this.indexOf(t,e)>-1}[Symbol.iterator](){return mf.visit(this)}concat(...t){return new $n(this.data.concat(t.flatMap(e=>e.data).flat(Number.POSITIVE_INFINITY)))}slice(t,e){return new $n(t0(this,t,e,({data:i,_offsets:n},s,o)=>n0(i,n,s,o)))}toJSON(){return[...this]}toArray(){const{type:t,data:e,length:i,stride:n,ArrayType:s}=this;switch(t.typeId){case L.Int:case L.Float:case L.Decimal:case L.Time:case L.Timestamp:switch(e.length){case 0:return new s;case 1:return e[0].values.subarray(0,i*n);default:return e.reduce((o,{values:a,length:l})=>(o.array.set(a.subarray(0,l*n),o.offset),o.offset+=l*n,o),{array:new s(i*n),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(i=>i.name===t))}getChildAt(t){return t>-1&&te[t])):null}get isMemoized(){return At.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(At.isDictionary(this.type)){const t=new Ap(this.data[0].dictionary),e=this.data.map(i=>{const n=i.clone();return n.dictionary=t,n});return new $n(e)}return new Ap(this)}unmemoize(){if(At.isDictionary(this.type)&&this.isMemoized){const t=this.data[0].dictionary.unmemoize(),e=this.data.map(i=>{const n=i.clone();return n.dictionary=t,n});return new $n(e)}return this}};l0=Symbol.toStringTag;Me[l0]=(r=>{r.type=At.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(L).map(e=>L[e]).filter(e=>typeof e=="number"&&e!==L.NONE);for(const e of t){const i=mr.getVisitFnByTypeId(e),n=Xr.getVisitFnByTypeId(e),s=Ml.getVisitFnByTypeId(e);u0[e]={get:i,set:n,indexOf:s},c0[e]=Object.create(r,{isValid:{value:Pl(pf)},get:{value:Pl(mr.getVisitFnByTypeId(e))},set:{value:s0(Xr.getVisitFnByTypeId(e))},indexOf:{value:o0(Ml.getVisitFnByTypeId(e))}})}return"Vector"})(Me.prototype);let Ap=class h0 extends Me{constructor(t){super(t.data);const e=this.get,i=this.set,n=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){i.call(this,o,a),s[o]=a}}),Object.defineProperty(this,"slice",{value:(o,a)=>new h0(n.call(this,o,a))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new Me(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}};class ph{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,i,n){return t.prep(8,24),t.writeInt64(BigInt(n??0)),t.pad(4),t.writeInt32(i),t.writeInt64(BigInt(e??0)),t.offset()}}class _r{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 _r).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsFooter(t,e){return t.setPosition(t.position()+me),(e||new _r).__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):ke.V1}schema(t){const e=this.bb.__offset(this.bb_pos,6);return e?(t||new ci).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}dictionaries(t,e){const i=this.bb.__offset(this.bb_pos,8);return i?(e||new ph).__init(this.bb.__vector(this.bb_pos+i)+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 i=this.bb.__offset(this.bb_pos,10);return i?(e||new ph).__init(this.bb.__vector(this.bb_pos+i)+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 i=this.bb.__offset(this.bb_pos,12);return i?(e||new We).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+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,ke.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 i=e.length-1;i>=0;i--)t.addOffset(e[i]);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 Pe=class Vn{constructor(t=[],e,i,n=ke.V5){this.fields=t||[],this.metadata=e||new Map,i||(i=mh(this.fields)),this.dictionaries=i,this.metadataVersion=n}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),i=this.fields.filter(n=>e.has(n.name));return new Vn(i,this.metadata)}selectAt(t){const e=t.map(i=>this.fields[i]).filter(Boolean);return new Vn(e,this.metadata)}assign(...t){const e=t[0]instanceof Vn?t[0]:Array.isArray(t[0])?new Vn(t[0]):new Vn(t),i=[...this.fields],n=Ua(Ua(new Map,this.metadata),e.metadata),s=e.fields.filter(a=>{const l=i.findIndex(u=>u.name===a.name);return~l?(i[l]=a.clone({metadata:Ua(Ua(new Map,i[l].metadata),a.metadata)}))&&!1:!0}),o=mh(s,new Map);return new Vn([...i,...s],n,new Map([...this.dictionaries,...o]))}};Pe.prototype.fields=null;Pe.prototype.metadata=null;Pe.prototype.dictionaries=null;class Ce{static new(...t){let[e,i,n,s]=t;return t[0]&&typeof t[0]=="object"&&({name:e}=t[0],i===void 0&&(i=t[0].type),n===void 0&&(n=t[0].nullable),s===void 0&&(s=t[0].metadata)),new Ce(`${e}`,i,n,s)}constructor(t,e,i=!1,n){this.name=t,this.type=e,this.nullable=i,this.metadata=n||new Map}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}clone(...t){let[e,i,n,s]=t;return!t[0]||typeof t[0]!="object"?[e=this.name,i=this.type,n=this.nullable,s=this.metadata]=t:{name:e=this.name,type:i=this.type,nullable:n=this.nullable,metadata:s=this.metadata}=t[0],Ce.new(e,i,n,s)}}Ce.prototype.type=null;Ce.prototype.name=null;Ce.prototype.nullable=null;Ce.prototype.metadata=null;function Ua(r,t){return new Map([...r||new Map,...t||new Map])}function mh(r,t=new Map){for(let e=-1,i=r.length;++e0&&mh(s.children,t)}return t}var nO=Dv,sO=Js;class ta{static decode(t){t=new sO(le(t));const e=_r.getRootAsFooter(t),i=Pe.decode(e.schema(),new Map,e.version());return new oO(i,e)}static encode(t){const e=new nO,i=Pe.encode(e,t.schema);_r.startRecordBatchesVector(e,t.numRecordBatches);for(const o of[...t.recordBatches()].slice().reverse())gn.encode(e,o);const n=e.endVector();_r.startDictionariesVector(e,t.numDictionaries);for(const o of[...t.dictionaryBatches()].slice().reverse())gn.encode(e,o);const s=e.endVector();return _r.startFooter(e),_r.addSchema(e,i),_r.addVersion(e,ke.V5),_r.addRecordBatches(e,n),_r.addDictionaries(e,s),_r.finishFooterBuffer(e,_r.endFooter(e)),e.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}constructor(t,e=ke.V5,i,n){this.schema=t,this.version=e,i&&(this._recordBatches=i),n&&(this._dictionaryBatches=n)}*recordBatches(){for(let t,e=-1,i=this.numRecordBatches;++e=0&&t=0&&t=0&&t=0&&tthis._closedPromiseResolve=t)}get closed(){return this._closedPromise}cancel(t){return Zt(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(De);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(t){return kr.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,t)}toNodeStream(t){return kr.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,t)}throw(t){return Zt(this,void 0,void 0,function*(){return yield this.abort(t),De})}return(t){return Zt(this,void 0,void 0,function*(){return yield this.close(),De})}read(t){return Zt(this,void 0,void 0,function*(){return(yield this.next(t,"read")).value})}peek(t){return Zt(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,i)=>{this.resolvers.push({resolve:e,reject:i})}):Promise.resolve(De)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw new Error("AsyncQueue is closed")}}class Xa extends aO{write(t){if((t=le(t)).byteLength>0)return super.write(t)}toString(t=!1){return t?nh(this.toUint8Array(!0)):this.toUint8Array(!1).then(nh)}toUint8Array(t=!1){return t?Si(this._values)[0]:Zt(this,void 0,void 0,function*(){var e,i,n,s;const o=[];let a=0;try{for(var l=!0,u=wi(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){i={error:h}}finally{try{!l&&!e&&(n=u.return)&&(yield n.call(u))}finally{if(i)throw i.error}}return Si(o,a)[0]})}}class Dl{constructor(t){t&&(this.source=new lO(kr.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 ro{constructor(t){t instanceof ro?this.source=t.source:t instanceof Xa?this.source=new Rn(kr.fromAsyncIterable(t)):Ov(t)?this.source=new Rn(kr.fromNodeStream(t)):of(t)?this.source=new Rn(kr.fromDOMStream(t)):Av(t)?this.source=new Rn(kr.fromDOMStream(t.body)):ua(t)?this.source=new Rn(kr.fromIterable(t)):ss(t)?this.source=new Rn(kr.fromAsyncIterable(t)):ao(t)&&(this.source=new Rn(kr.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 lO{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)||De)}return(t){return Object.create(this.source.return&&this.source.return(t)||De)}}class Rn{constructor(t){this.source=t,this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}cancel(t){return Zt(this,void 0,void 0,function*(){yield this.return(t)})}get closed(){return this._closedPromise}read(t){return Zt(this,void 0,void 0,function*(){return(yield this.next(t,"read")).value})}peek(t){return Zt(this,void 0,void 0,function*(){return(yield this.next(t,"peek")).value})}next(t){return Zt(this,arguments,void 0,function*(e,i="read"){return yield this.source.next({cmd:i,size:e})})}throw(t){return Zt(this,void 0,void 0,function*(){const e=this.source.throw&&(yield this.source.throw(t))||De;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(e)})}return(t){return Zt(this,void 0,void 0,function*(){const e=this.source.return&&(yield this.source.return(t))||De;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(e)})}}class Fp extends Dl{constructor(t,e){super(),this.position=0,this.buffer=le(t),this.size=e===void 0?this.buffer.byteLength:e}readInt32(t){const{buffer:e,byteOffset:i}=this.readAt(t,4);return new DataView(e,i).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]),i=new Uint32Array([t.buffer[1]>>>16,t.buffer[1]&65535,t.buffer[0]>>>16,t.buffer[0]&65535]);let n=e[3]*i[3];this.buffer[0]=n&65535;let s=n>>>16;return n=e[2]*i[3],s+=n,n=e[3]*i[2]>>>0,s+=n,this.buffer[0]+=s<<16,this.buffer[1]=s>>>0>>16,this.buffer[1]+=e[1]*i[3]+e[2]*i[2]+e[3]*i[1],this.buffer[1]+=e[0]*i[3]+e[1]*i[2]+e[2]*i[1]+e[3]*i[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`${Bs(this.buffer[3])} ${Bs(this.buffer[2])} ${Bs(this.buffer[1])} ${Bs(this.buffer[0])}`}static multiply(t,e){return new Li(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new Li(new Uint32Array(t.buffer)).plus(e)}static from(t,e=new Uint32Array(4)){return Li.fromString(typeof t=="string"?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(4)){return Li.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(4)){const i=t.startsWith("-"),n=t.length,s=new Li(e);for(let o=i?1:0;o0&&this.readData(t,i)||new Uint8Array(0)}readOffsets(t,e){return this.readData(t,e)}readTypeIds(t,e){return this.readData(t,e)}readData(t,{length:e,offset:i}=this.nextBufferRange()){return this.bytes.subarray(i,i+e)}readDictionary(t){return this.dictionaries.get(t.id)}}class hO extends d0{constructor(t,e,i,n,s){super(new Uint8Array(0),e,i,n,s),this.sources=t}readNullBitmap(t,e,{offset:i}=this.nextBufferRange()){return e<=0?new Uint8Array(0):Fl(this.sources[i])}readOffsets(t,{offset:e}=this.nextBufferRange()){return _e(Uint8Array,_e(t.OffsetArrayType,this.sources[e]))}readTypeIds(t,{offset:e}=this.nextBufferRange()){return _e(Uint8Array,_e(t.ArrayType,this.sources[e]))}readData(t,{offset:e}=this.nextBufferRange()){const{sources:i}=this;return At.isTimestamp(t)||(At.isInt(t)||At.isTime(t))&&t.bitWidth===64||At.isDuration(t)||At.isDate(t)&&t.unit===Yr.MILLISECOND?_e(Uint8Array,ko.convertArray(i[e])):At.isDecimal(t)?_e(Uint8Array,cO.convertArray(i[e])):At.isBinary(t)||At.isLargeBinary(t)||At.isFixedSizeBinary(t)?fO(i[e]):At.isBool(t)?Fl(i[e]):At.isUtf8(t)||At.isLargeUtf8(t)?sf(i[e].join("")):_e(Uint8Array,_e(t.ArrayType,i[e].map(n=>+n)))}}function fO(r){const t=r.join(""),e=new Uint8Array(t.length/2);for(let i=0;i>1]=Number.parseInt(t.slice(i,i+2),16);return e}let Ut=class extends ie{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((i,n)=>this.compareFields(i,e[n]))}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 ar(r,t){return t instanceof r.constructor}function hs(r,t){return r===t||ar(r,t)}function Xi(r,t){return r===t||ar(r,t)&&r.bitWidth===t.bitWidth&&r.isSigned===t.isSigned}function nu(r,t){return r===t||ar(r,t)&&r.precision===t.precision}function dO(r,t){return r===t||ar(r,t)&&r.byteWidth===t.byteWidth}function vf(r,t){return r===t||ar(r,t)&&r.unit===t.unit}function ca(r,t){return r===t||ar(r,t)&&r.unit===t.unit&&r.timezone===t.timezone}function ha(r,t){return r===t||ar(r,t)&&r.unit===t.unit&&r.bitWidth===t.bitWidth}function pO(r,t){return r===t||ar(r,t)&&r.children.length===t.children.length&&vn.compareManyFields(r.children,t.children)}function mO(r,t){return r===t||ar(r,t)&&r.children.length===t.children.length&&vn.compareManyFields(r.children,t.children)}function _f(r,t){return r===t||ar(r,t)&&r.mode===t.mode&&r.typeIds.every((e,i)=>e===t.typeIds[i])&&vn.compareManyFields(r.children,t.children)}function yO(r,t){return r===t||ar(r,t)&&r.id===t.id&&r.isOrdered===t.isOrdered&&vn.visit(r.indices,t.indices)&&vn.visit(r.dictionary,t.dictionary)}function bf(r,t){return r===t||ar(r,t)&&r.unit===t.unit}function fa(r,t){return r===t||ar(r,t)&&r.unit===t.unit}function gO(r,t){return r===t||ar(r,t)&&r.listSize===t.listSize&&r.children.length===t.children.length&&vn.compareManyFields(r.children,t.children)}function vO(r,t){return r===t||ar(r,t)&&r.keysSorted===t.keysSorted&&r.children.length===t.children.length&&vn.compareManyFields(r.children,t.children)}Ut.prototype.visitNull=hs;Ut.prototype.visitBool=hs;Ut.prototype.visitInt=Xi;Ut.prototype.visitInt8=Xi;Ut.prototype.visitInt16=Xi;Ut.prototype.visitInt32=Xi;Ut.prototype.visitInt64=Xi;Ut.prototype.visitUint8=Xi;Ut.prototype.visitUint16=Xi;Ut.prototype.visitUint32=Xi;Ut.prototype.visitUint64=Xi;Ut.prototype.visitFloat=nu;Ut.prototype.visitFloat16=nu;Ut.prototype.visitFloat32=nu;Ut.prototype.visitFloat64=nu;Ut.prototype.visitUtf8=hs;Ut.prototype.visitLargeUtf8=hs;Ut.prototype.visitBinary=hs;Ut.prototype.visitLargeBinary=hs;Ut.prototype.visitFixedSizeBinary=dO;Ut.prototype.visitDate=vf;Ut.prototype.visitDateDay=vf;Ut.prototype.visitDateMillisecond=vf;Ut.prototype.visitTimestamp=ca;Ut.prototype.visitTimestampSecond=ca;Ut.prototype.visitTimestampMillisecond=ca;Ut.prototype.visitTimestampMicrosecond=ca;Ut.prototype.visitTimestampNanosecond=ca;Ut.prototype.visitTime=ha;Ut.prototype.visitTimeSecond=ha;Ut.prototype.visitTimeMillisecond=ha;Ut.prototype.visitTimeMicrosecond=ha;Ut.prototype.visitTimeNanosecond=ha;Ut.prototype.visitDecimal=hs;Ut.prototype.visitList=pO;Ut.prototype.visitStruct=mO;Ut.prototype.visitUnion=_f;Ut.prototype.visitDenseUnion=_f;Ut.prototype.visitSparseUnion=_f;Ut.prototype.visitDictionary=yO;Ut.prototype.visitInterval=bf;Ut.prototype.visitIntervalDayTime=bf;Ut.prototype.visitIntervalYearMonth=bf;Ut.prototype.visitDuration=fa;Ut.prototype.visitDurationSecond=fa;Ut.prototype.visitDurationMillisecond=fa;Ut.prototype.visitDurationMicrosecond=fa;Ut.prototype.visitDurationNanosecond=fa;Ut.prototype.visitFixedSizeList=gO;Ut.prototype.visitMap=vO;const vn=new Ut;function yh(r,t){return vn.compareSchemas(r,t)}function Zu(r,t){return _O(r,t.map(e=>e.data.concat()))}function _O(r,t){const e=[...r.fields],i=[],n={numBatches:t.reduce((h,p)=>Math.max(h,p.length),0)};let s=0,o=0,a=-1;const l=t.length;let u,c=[];for(;n.numBatches-- >0;){for(o=Number.POSITIVE_INFINITY,a=-1;++a0&&(i[s++]=se({type:new sr(e),length:o,nullCount:0,children:c.slice()})))}return[r=r.assign(e),i.map(h=>new hr(r,h))]}function bO(r,t,e,i,n){var s;const o=(t+63&-64)>>3;for(let a=-1,l=i.length;++a=t)c===t?e[a]=u:(e[a]=u.slice(0,t),n.numBatches=Math.max(n.numBatches,i[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:se({type:h.type,length:t,nullCount:t,nullBitmap:new Uint8Array(o)})}}return e}var p0;let _n=class Gn{constructor(...t){var e,i;if(t.length===0)return this.batches=[],this.schema=new Pe([]),this._offsets=[0],this;let n,s;t[0]instanceof Pe&&(n=t.shift()),t.at(-1)instanceof Uint32Array&&(s=t.pop());const o=l=>{if(l){if(l instanceof hr)return[l];if(l instanceof Gn)return l.batches;if(l instanceof Se){if(l.type instanceof sr)return[new hr(new Pe(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(f=>new Me([l[f]])),h=n??new Pe(u.map((f,y)=>new Ce(String(f),c[y].type,c[y].nullable))),[,p]=Zu(h,c);return p.length===0?[new hr(l)]:p}}}return[]},a=t.flatMap(l=>o(l));if(n=(i=n??((e=a[0])===null||e===void 0?void 0:e.schema))!==null&&i!==void 0?i:new Pe([]),!(n instanceof Pe))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");for(const l of a){if(!(l instanceof hr))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");if(!yh(n,l.schema))throw new TypeError("Table and inner RecordBatch schemas must be equivalent.")}this.schema=n,this.batches=a,this._offsets=s??i0(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=r0(this.data)),this._nullCount}isValid(t){return!1}get(t){return null}at(t){return this.get(hf(t,this.numRows))}set(t,e){}indexOf(t,e){return-1}[Symbol.iterator](){return this.batches.length>0?mf.visit(new Me(this.data)):new Array(0)[Symbol.iterator]()}toArray(){return[...this]}toString(){return`[ ${this.toArray().join(`, `)} -]`}concat(...t){const e=this.schema,i=this.data.concat(t.flatMap(({data:n})=>n));return new Gn(e,i.map(n=>new hr(e,n)))}slice(t,e){const i=this.schema;[t,e]=t0({length:this.numRows},t,e);const n=n0(this.data,this._offsets,t,e);return new Gn(i,n.map(s=>new hr(i,s)))}getChild(t){return this.getChildAt(this.schema.fields.findIndex(e=>e.name===t))}getChildAt(t){if(t>-1&&ti.children[t]);if(e.length===0){const{type:i}=this.schema.fields[t],n=se({type:i,length:0,nullCount:0});e.push(n._changeLengthAndBackfillNullBitmap(this.numRows))}return new Me(e)}return null}setChild(t,e){var i;return this.setChildAt((i=this.schema.fields)===null||i===void 0?void 0:i.findIndex(n=>n.name===t),e)}setChildAt(t,e){let i=this.schema,n=[...this.batches];if(t>-1&&tthis.getChildAt(u));[s[t],a[t]]=[o,e],[i,n]=Zu(i,a)}return new Gn(i,n)}select(t){const e=this.schema.fields.reduce((i,n,s)=>i.set(n.name,s),new Map);return this.selectAt(t.map(i=>e.get(i)).filter(i=>i>-1))}selectAt(t){const e=this.schema.selectAt(t),i=this.batches.map(n=>n.selectAt(t));return new Gn(e,i)}assign(t){const e=this.schema.fields,[i,n]=t.schema.fields.reduce((a,l,u)=>{const[c,h]=a,p=e.findIndex(f=>f.name===l.name);return~p?h[p]=u:c.push(u),a},[[],[]]),s=this.schema.assign(t.schema),o=[...e.map((a,l)=>[l,n[l]]).map(([a,l])=>l===void 0?this.getChildAt(a):t.getChildAt(l)),...i.map(a=>t.getChildAt(a))].filter(Boolean);return new Gn(...Zu(s,o))}};p0=Symbol.toStringTag;_n[p0]=(r=>(r.schema=null,r.batches=[],r._offsets=new Uint32Array([0]),r._nullCount=-1,r[Symbol.isConcatSpreadable]=!0,r.isValid=Pl(pf),r.get=Pl(mr.getVisitFn(L.Struct)),r.set=s0(Xr.getVisitFn(L.Struct)),r.indexOf=o0(Ml.getVisitFn(L.Struct)),"Table"))(_n.prototype);var m0;let hr=class Ro{constructor(...t){switch(t.length){case 2:{if([this.schema]=t,!(this.schema instanceof Pe))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");if([,this.data=se({nullCount:0,type:new sr(this.schema.fields),children:this.schema.fields.map(e=>se({type:e.type,nullCount:0}))})]=t,!(this.data instanceof Se))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");[this.schema,this.data]=Pp(this.schema,this.data.children);break}case 1:{const[e]=t,{fields:i,children:n,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]=Ce.new({name:u,type:e[u].type,nullable:!0}),l),{length:0,fields:new Array,children:new Array}),o=new Pe(i),a=se({type:new sr(i),length:s,children:n,nullCount:0});[this.schema,this.data]=Pp(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=y0(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 mr.visit(this.data,t)}at(t){return this.get(hf(t,this.numRows))}set(t,e){return Xr.visit(this.data,t,e)}indexOf(t,e){return Ml.visit(this.data,t,e)}[Symbol.iterator](){return mf.visit(new Me([this.data]))}toArray(){return[...this]}concat(...t){return new _n(this.schema,[this,...t])}slice(t,e){const[i]=new Me([this.data]).slice(t,e).data;return new Ro(this.schema,i)}getChild(t){var e;return this.getChildAt((e=this.schema.fields)===null||e===void 0?void 0:e.findIndex(i=>i.name===t))}getChildAt(t){return t>-1&&tn.name===t),e)}setChildAt(t,e){let i=this.schema,n=this.data;if(t>-1&&ta.name===s);~o&&(n[o]=this.data.children[o])}return new Ro(e,se({type:i,length:this.numRows,children:n}))}selectAt(t){const e=this.schema.selectAt(t),i=t.map(s=>this.data.children[s]).filter(Boolean),n=se({type:new sr(e.fields),length:this.numRows,children:i});return new Ro(e,n)}};m0=Symbol.toStringTag;hr[m0]=(r=>(r._nullCount=-1,r[Symbol.isConcatSpreadable]=!0,"RecordBatch"))(hr.prototype);function Pp(r,t,e=t.reduce((i,n)=>Math.max(i,n.length),0)){var i;const n=[...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)&&(n[a]=l.clone({nullable:!0}),s[a]=(i=u==null?void 0:u._changeLengthAndBackfillNullBitmap(e))!==null&&i!==void 0?i:se({type:l.type,length:e,nullCount:e,nullBitmap:new Uint8Array(o)}))}return[r.assign(n),se({type:new sr(n),length:e,children:s})]}function y0(r,t,e=new Map){var i,n;if(((i=r==null?void 0:r.length)!==null&&i!==void 0?i:0)>0&&(r==null?void 0:r.length)===(t==null?void 0:t.length))for(let s=-1,o=r.length;++sse({type:n.type})),i=se({type:new sr(t.fields),nullCount:0,children:e});super(t,i)}}let rn=class li{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 li).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsMessage(t,e){return t.setPosition(t.position()+me),(e||new li).__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):ke.V1}headerType(){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readUint8(this.bb_pos+t):fe.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 i=this.bb.__offset(this.bb_pos,12);return i?(e||new We).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+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,ke.V1)}static addHeaderType(t,e){t.addFieldInt8(1,e,fe.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 i=e.length-1;i>=0;i--)t.addOffset(e[i]);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,i,n,s,o){return li.startMessage(t),li.addVersion(t,e),li.addHeaderType(t,i),li.addHeader(t,n),li.addBodyLength(t,s),li.addCustomMetadata(t,o),li.endMessage(t)}};class wO extends ie{visit(t,e){return t==null||e==null?void 0:super.visit(t,e)}visitNull(t,e){return wp.startNull(e),wp.endNull(e)}visitInt(t,e){return Sr.startInt(e),Sr.addBitWidth(e,t.bitWidth),Sr.addIsSigned(e,t.isSigned),Sr.endInt(e)}visitFloat(t,e){return yi.startFloatingPoint(e),yi.addPrecision(e,t.precision),yi.endFloatingPoint(e)}visitBinary(t,e){return yp.startBinary(e),yp.endBinary(e)}visitLargeBinary(t,e){return vp.startLargeBinary(e),vp.endLargeBinary(e)}visitBool(t,e){return gp.startBool(e),gp.endBool(e)}visitUtf8(t,e){return xp.startUtf8(e),xp.endUtf8(e)}visitLargeUtf8(t,e){return _p.startLargeUtf8(e),_p.endLargeUtf8(e)}visitDecimal(t,e){return Is.startDecimal(e),Is.addScale(e,t.scale),Is.addPrecision(e,t.precision),Is.addBitWidth(e,t.bitWidth),Is.endDecimal(e)}visitDate(t,e){return $a.startDate(e),$a.addUnit(e,t.unit),$a.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 i=t.timezone&&e.createString(t.timezone)||void 0;return jr.startTimestamp(e),jr.addUnit(e,t.unit),i!==void 0&&jr.addTimezone(e,i),jr.endTimestamp(e)}visitInterval(t,e){return gi.startInterval(e),gi.addUnit(e,t.unit),gi.endInterval(e)}visitDuration(t,e){return Va.startDuration(e),Va.addUnit(e,t.unit),Va.endDuration(e)}visitList(t,e){return bp.startList(e),bp.endList(e)}visitStruct(t,e){return Qn.startStruct_(e),Qn.endStruct_(e)}visitUnion(t,e){cr.startTypeIdsVector(e,t.typeIds.length);const i=cr.createTypeIdsVector(e,t.typeIds);return cr.startUnion(e),cr.addMode(e,t.mode),cr.addTypeIds(e,i),cr.endUnion(e)}visitDictionary(t,e){const i=this.visit(t.indices,e);return Vi.startDictionaryEncoding(e),Vi.addId(e,BigInt(t.id)),Vi.addIsOrdered(e,t.isOrdered),i!==void 0&&Vi.addIndexType(e,i),Vi.endDictionaryEncoding(e)}visitFixedSizeBinary(t,e){return Ga.startFixedSizeBinary(e),Ga.addByteWidth(e,t.byteWidth),Ga.endFixedSizeBinary(e)}visitFixedSizeList(t,e){return Wa.startFixedSizeList(e),Wa.addListSize(e,t.listSize),Wa.endFixedSizeList(e)}visitMap(t,e){return Ha.startMap(e),Ha.addKeysSorted(e,t.keysSorted),Ha.endMap(e)}}const Ju=new wO;function xO(r,t=new Map){return new Pe(TO(r,t),qa(r.metadata),t)}function g0(r){return new Pr(r.count,v0(r.columns),_0(r.columns))}function SO(r){return new Ii(g0(r.data),r.id,r.isDelta)}function TO(r,t){return(r.fields||[]).filter(Boolean).map(e=>Ce.fromJSON(e,t))}function Mp(r,t){return(r.children||[]).filter(Boolean).map(e=>Ce.fromJSON(e,t))}function v0(r){return(r||[]).reduce((t,e)=>[...t,new bn(e.count,IO(e.VALIDITY)),...v0(e.children)],[])}function _0(r,t=[]){for(let e=-1,i=(r||[]).length;++et+ +(e===0),0)}function EO(r,t){let e,i,n,s,o,a;return!t||!(s=r.dictionary)?(o=Rp(r,Mp(r,t)),n=new Ce(r.name,o,r.nullable,qa(r.metadata))):t.has(e=s.id)?(i=(i=s.indexType)?Dp(i):new Jo,a=new eo(t.get(e),i,e,s.isOrdered),n=new Ce(r.name,a,r.nullable,qa(r.metadata))):(i=(i=s.indexType)?Dp(i):new Jo,t.set(e,o=Rp(r,Mp(r,t))),a=new eo(o,i,e,s.isOrdered),n=new Ce(r.name,a,r.nullable,qa(r.metadata))),n||null}function qa(r=[]){return new Map(r.map(({key:t,value:e})=>[t,e]))}function Dp(r){return new os(r.isSigned,r.bitWidth)}function Rp(r,t){const e=r.type.name;switch(e){case"NONE":return new yn;case"null":return new yn;case"binary":return new dl;case"largebinary":return new pl;case"utf8":return new ml;case"largeutf8":return new yl;case"bool":return new gl;case"list":return new Tl((t||[])[0]);case"struct":return new sr(t||[]);case"struct_":return new sr(t||[])}switch(e){case"int":{const i=r.type;return new os(i.isSigned,i.bitWidth)}case"floatingpoint":{const i=r.type;return new fl(tr[i.precision])}case"decimal":{const i=r.type;return new vl(i.scale,i.precision,i.bitWidth)}case"date":{const i=r.type;return new _l(Yr[i.unit])}case"time":{const i=r.type;return new bl(Vt[i.unit],i.bitWidth)}case"timestamp":{const i=r.type;return new wl(Vt[i.unit],i.timezone)}case"interval":{const i=r.type;return new xl(Ti[i.unit])}case"duration":{const i=r.type;return new Sl(Vt[i.unit])}case"union":{const i=r.type,[n,...s]=(i.mode+"").toLowerCase(),o=n.toUpperCase()+s.join("");return new Il(er[o],i.typeIds||[],t||[])}case"fixedsizebinary":{const i=r.type;return new El(i.byteWidth)}case"fixedsizelist":{const i=r.type;return new Cl(i.listSize,(t||[])[0])}case"map":{const i=r.type;return new Al((t||[])[0],i.keysSorted)}}throw new Error(`Unrecognized type: "${e}"`)}var CO=Dv,AO=Js;class or{static fromJSON(t,e){const i=new or(0,ke.V5,e);return i._createHeader=OO(t,e),i}static decode(t){t=new AO(le(t));const e=rn.getRootAsMessage(t),i=e.bodyLength(),n=e.version(),s=e.headerType(),o=new or(i,n,s);return o._createHeader=FO(e,s),o}static encode(t){const e=new CO;let i=-1;return t.isSchema()?i=Pe.encode(e,t.header()):t.isRecordBatch()?i=Pr.encode(e,t.header()):t.isDictionaryBatch()&&(i=Ii.encode(e,t.header())),rn.startMessage(e),rn.addVersion(e,ke.V5),rn.addHeader(e,i),rn.addHeaderType(e,t.headerType),rn.addBodyLength(e,BigInt(t.bodyLength)),rn.finishMessageBuffer(e,rn.endMessage(e)),e.asUint8Array()}static from(t,e=0){if(t instanceof Pe)return new or(0,ke.V5,fe.Schema,t);if(t instanceof Pr)return new or(e,ke.V5,fe.RecordBatch,t);if(t instanceof Ii)return new or(e,ke.V5,fe.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===fe.Schema}isRecordBatch(){return this.headerType===fe.RecordBatch}isDictionaryBatch(){return this.headerType===fe.DictionaryBatch}constructor(t,e,i,n){this._version=e,this._headerType=i,this.body=new Uint8Array(0),n&&(this._createHeader=()=>n),this._bodyLength=we(t)}}class Pr{get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}constructor(t,e,i){this._nodes=e,this._buffers=i,this._length=we(t)}}class Ii{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,i=!1){this._data=t,this._isDelta=i,this._id=we(e)}}class _i{constructor(t,e){this.offset=we(t),this.length=we(e)}}class bn{constructor(t,e){this.length=we(t),this.nullCount=we(e)}}function OO(r,t){return()=>{switch(t){case fe.Schema:return Pe.fromJSON(r);case fe.RecordBatch:return Pr.fromJSON(r);case fe.DictionaryBatch:return Ii.fromJSON(r)}throw new Error(`Unrecognized Message type: { name: ${fe[t]}, type: ${t} }`)}}function FO(r,t){return()=>{switch(t){case fe.Schema:return Pe.decode(r.header(new ci),new Map,r.version());case fe.RecordBatch:return Pr.decode(r.header(new ki),r.version());case fe.DictionaryBatch:return Ii.decode(r.header(new Ss),r.version())}throw new Error(`Unrecognized Message type: { name: ${fe[t]}, type: ${t} }`)}}Ce.encode=jO;Ce.decode=UO;Ce.fromJSON=EO;Pe.encode=zO;Pe.decode=PO;Pe.fromJSON=xO;Pr.encode=$O;Pr.decode=MO;Pr.fromJSON=g0;Ii.encode=VO;Ii.decode=DO;Ii.fromJSON=SO;bn.encode=GO;bn.decode=NO;_i.encode=WO;_i.decode=RO;function PO(r,t=new Map,e=ke.V5){const i=kO(r,t);return new Pe(i,Qa(r),t,e)}function MO(r,t=ke.V5){if(r.compression()!==null)throw new Error("Record batch compression not implemented");return new Pr(r.length(),LO(r),BO(r,t))}function DO(r,t=ke.V5){return new Ii(Pr.decode(r.data(),t),r.id(),r.isDelta())}function RO(r){return new _i(r.offset(),r.length())}function NO(r){return new bn(r.length(),r.nullCount())}function LO(r){const t=[];for(let e,i=-1,n=-1,s=r.nodesLength();++iCe.encode(r,s));ci.startFieldsVector(r,e.length);const i=ci.createFieldsVector(r,e),n=t.metadata&&t.metadata.size>0?ci.createCustomMetadataVector(r,[...t.metadata].map(([s,o])=>{const a=r.createString(`${s}`),l=r.createString(`${o}`);return We.startKeyValue(r),We.addKey(r,a),We.addValue(r,l),We.endKeyValue(r)})):-1;return ci.startSchema(r),ci.addFields(r,i),ci.addEndianness(r,HO?to.Little:to.Big),n!==-1&&ci.addCustomMetadata(r,n),ci.endSchema(r)}function jO(r,t){let e=-1,i=-1,n=-1;const s=t.type;let o=t.typeId;At.isDictionary(s)?(o=s.dictionary.typeId,n=Ju.visit(s,r),i=Ju.visit(s.dictionary,r)):i=Ju.visit(s,r);const a=(s.children||[]).map(c=>Ce.encode(r,c)),l=Lr.createChildrenVector(r,a),u=t.metadata&&t.metadata.size>0?Lr.createCustomMetadataVector(r,[...t.metadata].map(([c,h])=>{const p=r.createString(`${c}`),f=r.createString(`${h}`);return We.startKeyValue(r),We.addKey(r,p),We.addValue(r,f),We.endKeyValue(r)})):-1;return t.name&&(e=r.createString(t.name)),Lr.startField(r),Lr.addType(r,i),Lr.addTypeType(r,o),Lr.addChildren(r,l),Lr.addNullable(r,!!t.nullable),e!==-1&&Lr.addName(r,e),n!==-1&&Lr.addDictionary(r,n),u!==-1&&Lr.addCustomMetadata(r,u),Lr.endField(r)}function $O(r,t){const e=t.nodes||[],i=t.buffers||[];ki.startNodesVector(r,e.length);for(const o of e.slice().reverse())bn.encode(r,o);const n=r.endVector();ki.startBuffersVector(r,i.length);for(const o of i.slice().reverse())_i.encode(r,o);const s=r.endVector();return ki.startRecordBatch(r),ki.addLength(r,BigInt(t.length)),ki.addNodes(r,n),ki.addBuffers(r,s),ki.endRecordBatch(r)}function VO(r,t){const e=Pr.encode(r,t.data);return Ss.startDictionaryBatch(r),Ss.addId(r,BigInt(t.id)),Ss.addIsDelta(r,t.isDelta),Ss.addData(r,e),Ss.endDictionaryBatch(r)}function GO(r,t){return Lv.createFieldNode(r,BigInt(t.length),BigInt(t.nullCount))}function WO(r,t){return Nv.createBuffer(r,BigInt(t.offset),BigInt(t.length))}const HO=(()=>{const r=new ArrayBuffer(2);return new DataView(r).setInt16(0,256,!0),new Int16Array(r)[0]===256})(),xf=r=>`Expected ${fe[r]} Message in stream, but was null or length 0.`,Sf=r=>`Header pointer of flatbuffer-encoded ${fe[r]} Message is null or length 0.`,b0=(r,t)=>`Expected to read ${r} metadata bytes, but only read ${t}.`,w0=(r,t)=>`Expected to read ${r} bytes for message body, but only read ${t}.`;class x0{constructor(t){this.source=t instanceof Dl?t:new Dl(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?De: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(xf(t));return e.value}readMessageBody(t){if(t<=0)return new Uint8Array(0);const e=le(this.source.read(t));if(e.byteLength[...n,...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(xf(t));return e.value}readSchema(){const t=fe.Schema,e=this.readMessage(t),i=e==null?void 0:e.header();if(!e||!i)throw new Error(Sf(t));return i}}const su=4,gh="ARROW1",ea=new Uint8Array(gh.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 kr.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return kr.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 Vr?t:sh(t)?JO(t):Cv(t)?r2(t):ss(t)?Zt(this,void 0,void 0,function*(){return yield Vr.from(yield t)}):Av(t)||of(t)||Ov(t)||ao(t)?e2(new ro(t)):t2(new Dl(t))}static readAll(t){return t instanceof Vr?t.isSync()?kp(t):Up(t):sh(t)||ArrayBuffer.isView(t)||ua(t)||Ev(t)?kp(t):Up(t)}}class Nl extends Vr{constructor(t){super(t),this._impl=t}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return fr(this,arguments,function*(){yield Nt(yield*is(wi(this[Symbol.iterator]())))})}}class Ll extends Vr{constructor(t){super(t),this._impl=t}readAll(){return Zt(this,void 0,void 0,function*(){var t,e,i,n;const s=new Array;try{for(var o=!0,a=wi(this),l;l=yield a.next(),t=l.done,!t;o=!0){n=l.value,o=!1;const u=n;s.push(u)}}catch(u){e={error:u}}finally{try{!o&&!t&&(i=a.return)&&(yield i.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 T0 extends Nl{constructor(t){super(t),this._impl=t}}class QO extends Ll{constructor(t){super(t),this._impl=t}}class I0{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 i=this._loadVectors(t,e,this.schema.fields),n=se({type:new sr(this.schema.fields),length:t.length,children:i});return new hr(this.schema,n)}_loadDictionaryBatch(t,e){const{id:i,isDelta:n}=t,{dictionaries:s,schema:o}=this,a=s.get(i),l=o.dictionaries.get(i),u=this._loadVectors(t.data,e,[l]);return(a&&n?a.concat(new Me(u)):new Me(u)).memoize()}_loadVectors(t,e,i){return new d0(e,t.nodes,t.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(i)}}class Bl extends I0{constructor(t,e){super(e),this._reader=sh(t)?new XO(this._handle=t):new x0(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=C0(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):De}return(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(t):De}next(){if(this.closed)return De;let t;const{_reader:e}=this;for(;t=this._readNextMessageAndValidate();)if(t.isSchema())this.reset(t.header());else if(t.isRecordBatch()){this._recordBatchIndex++;const i=t.header(),n=e.readMessageBody(t.bodyLength);return{done:!1,value:this._loadRecordBatch(i,n)}}else if(t.isDictionaryBatch()){this._dictionaryIndex++;const i=t.header(),n=e.readMessageBody(t.bodyLength),s=this._loadDictionaryBatch(i,n);this.dictionaries.set(i.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new wf(this.schema)}):this.return()}_readNextMessageAndValidate(t){return this._reader.readMessage(t)}}class kl extends I0{constructor(t,e){super(e),this._reader=new YO(this._handle=t)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return Zt(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 Zt(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=C0(this,t),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(t){return Zt(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(t):De})}return(t){return Zt(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(t):De})}next(){return Zt(this,void 0,void 0,function*(){if(this.closed)return De;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 i=t.header(),n=yield e.readMessageBody(t.bodyLength);return{done:!1,value:this._loadRecordBatch(i,n)}}else if(t.isDictionaryBatch()){this._dictionaryIndex++;const i=t.header(),n=yield e.readMessageBody(t.bodyLength),s=this._loadDictionaryBatch(i,n);this.dictionaries.set(i.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new wf(this.schema)}):yield this.return()})}_readNextMessageAndValidate(t){return Zt(this,void 0,void 0,function*(){return yield this._reader.readMessage(t)})}}class E0 extends Bl{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 Fp?t:new Fp(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 i=(e=this._footer)===null||e===void 0?void 0:e.getRecordBatch(t);if(i&&this._handle.seek(i.offset)){const n=this._reader.readMessage(fe.RecordBatch);if(n!=null&&n.isRecordBatch()){const s=n.header(),o=this._reader.readMessageBody(n.bodyLength);return this._loadRecordBatch(s,o)}}return null}_readDictionaryBatch(t){var e;const i=(e=this._footer)===null||e===void 0?void 0:e.getDictionaryBatch(t);if(i&&this._handle.seek(i.offset)){const n=this._reader.readMessage(fe.DictionaryBatch);if(n!=null&&n.isDictionaryBatch()){const s=n.header(),o=this._reader.readMessageBody(n.bodyLength),a=this._loadDictionaryBatch(s,o);this.dictionaries.set(s.id,a)}}}_readFooter(){const{_handle:t}=this,e=t.size-S0,i=t.readInt32(e),n=t.readAt(e-i,i);return ta.decode(n)}_readNextMessageAndValidate(t){var e;if(this._footer||this.open(),this._footer&&this._recordBatchIndexsuper.open}});return Zt(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(const i of this._footer.dictionaryBatches())i&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield e.open.call(this,t)})}readRecordBatch(t){return Zt(this,void 0,void 0,function*(){var e;if(this.closed)return null;this._footer||(yield this.open());const i=(e=this._footer)===null||e===void 0?void 0:e.getRecordBatch(t);if(i&&(yield this._handle.seek(i.offset))){const n=yield this._reader.readMessage(fe.RecordBatch);if(n!=null&&n.isRecordBatch()){const s=n.header(),o=yield this._reader.readMessageBody(n.bodyLength);return this._loadRecordBatch(s,o)}}return null})}_readDictionaryBatch(t){return Zt(this,void 0,void 0,function*(){var e;const i=(e=this._footer)===null||e===void 0?void 0:e.getDictionaryBatch(t);if(i&&(yield this._handle.seek(i.offset))){const n=yield this._reader.readMessage(fe.DictionaryBatch);if(n!=null&&n.isDictionaryBatch()){const s=n.header(),o=yield this._reader.readMessageBody(n.bodyLength),a=this._loadDictionaryBatch(s,o);this.dictionaries.set(s.id,a)}}})}_readFooter(){return Zt(this,void 0,void 0,function*(){const{_handle:t}=this;t._pending&&(yield t._pending);const e=t.size-S0,i=yield t.readInt32(e),n=yield t.readAt(e-i,i);return ta.decode(n)})}_readNextMessageAndValidate(t){return Zt(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex=4?Tf(t)?new T0(new E0(r.read())):new Nl(new Bl(r)):new Nl(new Bl(function*(){}()))}function e2(r){return Zt(this,void 0,void 0,function*(){const t=yield r.peek(da+7&-8);return t&&t.byteLength>=4?Tf(t)?new T0(new E0(yield r.read())):new Ll(new kl(r)):new Ll(new kl(function(){return fr(this,arguments,function*(){})}()))})}function r2(r){return Zt(this,void 0,void 0,function*(){const{size:t}=yield r.stat(),e=new Rl(r,t);return t>=qO&&Tf(yield e.readAt(0,da+7&-8))?new QO(new KO(e)):new Ll(new kl(e))})}class Ne extends ie{static assemble(...t){const e=n=>n.flatMap(s=>Array.isArray(s)?e(s):s instanceof hr?s.data.children:s.data),i=new Ne;return i.visitMany(e(t)),i}constructor(){super(),this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}visit(t){if(t instanceof Me)return this.visitMany(t.data),this;const{type:e}=t;if(!At.isDictionary(e)){const{length:i}=t;if(i>2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");if(At.isUnion(e))this.nodes.push(new bn(i,0));else{const{nullCount:n}=t;At.isNull(e)||ei.call(this,n<=0?new Uint8Array(0):Ol(t.offset,i,t.nullBitmap)),this.nodes.push(new bn(i,n))}}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 ei(r){const t=r.byteLength+7&-8;return this.buffers.push(r),this.bufferRegions.push(new _i(this._byteLength,t)),this._byteLength+=t,this}function i2(r){var t;const{type:e,length:i,typeIds:n,valueOffsets:s}=r;if(ei.call(this,n),e.mode===er.Sparse)return vh.call(this,r);if(e.mode===er.Dense){if(r.offset<=0)return ei.call(this,s),vh.call(this,r);{const o=new Int32Array(i),a=Object.create(null),l=Object.create(null);for(let u,c,h=-1;++h{const h=e.typeIds[c],p=a[h],f=l[h];return u.slice(p,Math.min(i,f))}))}}return this}function n2(r){let t;return r.nullCount>=r.length?ei.call(this,new Uint8Array(0)):(t=r.values)instanceof Uint8Array?ei.call(this,Ol(r.offset,r.length,t)):ei.call(this,Fl(r.values))}function qi(r){return ei.call(this,r.values.subarray(0,r.length*r.stride))}function ou(r){const{length:t,values:e,valueOffsets:i}=r,n=we(i[0]),s=we(i[t]),o=Math.min(s-n,e.byteLength-n);return ei.call(this,Pv(-n,t+1,i)),ei.call(this,e.subarray(n,n+o)),this}function If(r){const{length:t,valueOffsets:e}=r;if(e){const{[0]:i,[t]:n}=e;return ei.call(this,Pv(-i,t+1,e)),this.visit(r.children[0].slice(i,n-i))}return this.visit(r.children[0])}function vh(r){return this.visitMany(r.type.children.map((t,e)=>r.children[e]).filter(Boolean))[0]}Ne.prototype.visitBool=n2;Ne.prototype.visitInt=qi;Ne.prototype.visitFloat=qi;Ne.prototype.visitUtf8=ou;Ne.prototype.visitLargeUtf8=ou;Ne.prototype.visitBinary=ou;Ne.prototype.visitLargeBinary=ou;Ne.prototype.visitFixedSizeBinary=qi;Ne.prototype.visitDate=qi;Ne.prototype.visitTimestamp=qi;Ne.prototype.visitTime=qi;Ne.prototype.visitDecimal=qi;Ne.prototype.visitList=If;Ne.prototype.visitStruct=vh;Ne.prototype.visitUnion=i2;Ne.prototype.visitInterval=qi;Ne.prototype.visitDuration=qi;Ne.prototype.visitFixedSizeList=If;Ne.prototype.visitMap=If;class A0 extends yf{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 Xa,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,pr(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 ss(t)?t.then(e=>this.writeAll(e)):ao(t)?Of(this,t):Af(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 Xa?this._sink=t:(this._sink=new Xa,t&&DC(t)?this.toDOMStream({type:"bytes"}).pipeTo(t):t&&RC(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||!yh(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 _n&&!(e=t.schema))return this.finish()&&void 0;if(t instanceof hr&&!(e=t.schema))return this.finish()&&void 0}else throw new Error("RecordBatchWriter is closed");if(e&&!yh(e,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,e)}t instanceof hr?t instanceof wf||this._writeRecordBatch(t):t instanceof _n?this.writeAll(t.batches):ua(t)&&this.writeAll(t)}_writeMessage(t,e=8){const i=e-1,n=or.encode(t),s=n.byteLength,o=this._writeLegacyIpcFormat?4:8,a=s+o+i&~i,l=a-s-o;return t.headerType===fe.RecordBatch?this._recordBatchBlocks.push(new gn(a,t.bodyLength,this._position)):t.headerType===fe.DictionaryBatch&&this._dictionaryBlocks.push(new gn(a,t.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(a-o)),s>0&&this._write(n),this._writePadding(l)}_write(t){if(this._started){const e=le(t);e&&e.byteLength>0&&(this._sink.write(e),this._position+=e.byteLength)}return this}_writeSchema(t){return this._writeMessage(or.from(t))}_writeFooter(t){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(ea)}_writePadding(t){return t>0?this._write(new Uint8Array(t)):this}_writeRecordBatch(t){const{byteLength:e,nodes:i,bufferRegions:n,buffers:s}=Ne.assemble(t),o=new Pr(t.numRows,i,n),a=or.from(o,e);return this._writeDictionaries(t)._writeMessage(a)._writeBodyBuffers(s)}_writeDictionaryBatch(t,e,i=!1){const{byteLength:n,nodes:s,bufferRegions:o,buffers:a}=Ne.assemble(new Me([t])),l=new Pr(t.length,s,o),u=new Ii(l,e,i),c=or.from(u,n);return this._writeMessage(c)._writeBodyBuffers(a)}_writeBodyBuffers(t){let e,i,n;for(let s=-1,o=t.length;++s0&&(this._write(e),(n=(i+7&-8)-i)>0&&this._writePadding(n));return this}_writeDictionaries(t){var e,i;for(const[n,s]of t.dictionaries){const o=(e=s==null?void 0:s.data)!==null&&e!==void 0?e:[],a=this._seenDictionaries.get(n),l=(i=this._dictionaryDeltaOffsets.get(n))!==null&&i!==void 0?i:0;if(!a||a.data[0]!==o[0])for(const[u,c]of o.entries())this._writeDictionaryBatch(c,n,u>0);else if(li.writeAll(n)):ao(t)?Of(i,t):Af(i,t)}}class Cf extends A0{static writeAll(t){const e=new Cf;return ss(t)?t.then(i=>e.writeAll(i)):ao(t)?Of(e,t):Af(e,t)}constructor(){super(),this._autoDestroy=!0}_writeSchema(t){return this._writeMagic()._writePadding(2)}_writeDictionaryBatch(t,e,i=!1){if(!i&&this._seenDictionaries.has(e))throw new Error("The Arrow File format does not support replacement dictionaries. ");return super._writeDictionaryBatch(t,e,i)}_writeFooter(t){const e=ta.encode(new ta(t,ke.V5,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(t)._write(e)._write(Int32Array.of(e.byteLength))._writeMagic()}}function Af(r,t){let e=t;t instanceof _n&&(e=t.batches,r.reset(void 0,t.schema));for(const i of e)r.write(i);return r.finish()}function Of(r,t){return Zt(this,void 0,void 0,function*(){var e,i,n,s,o,a,l;try{for(e=!0,i=wi(t);n=yield i.next(),s=n.done,!s;e=!0){l=n.value,e=!1;const u=l;r.write(u)}}catch(u){o={error:u}}finally{try{!e&&!s&&(a=i.return)&&(yield a.call(i))}finally{if(o)throw o.error}}return r.finish()})}function s2(r,t="stream"){return(t==="stream"?Ef:Cf).writeAll(r).toUint8Array(!0)}var o2=Object.create,O0=Object.defineProperty,a2=Object.getOwnPropertyDescriptor,l2=Object.getOwnPropertyNames,u2=Object.getPrototypeOf,c2=Object.prototype.hasOwnProperty,h2=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),f2=(r,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of l2(t))!c2.call(r,n)&&n!==e&&O0(r,n,{get:()=>t[n],enumerable:!(i=a2(t,n))||i.enumerable});return r},d2=(r,t,e)=>(e=r!=null?o2(u2(r)):{},f2(!r||!r.__esModule?O0(e,"default",{value:r,enumerable:!0}):e,r)),p2=h2((r,t)=>{t.exports=Worker}),F0=(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))(F0||{}),m2=(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))(m2||{}),y2=(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))(y2||{}),g2=(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))(g2||{}),v2=(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))(v2||{}),_2=(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))(_2||{}),b2=class{log(r){}},P0=class{constructor(r=2){this.level=r}log(r){r.level>=this.level&&console.log(r)}},w2=(r=>(r[r.SUCCESS=0]="SUCCESS",r))(w2||{}),x2=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=Vr.from(t);return console.assert(e.isSync(),"Reader is not sync"),console.assert(e.isFile(),"Reader is not file"),new _n(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 i=new M0(this._bindings,this._conn,e),n=await Vr.from(i);return console.assert(n.isAsync()),console.assert(n.isStream()),n}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 S2(this._bindings,this._conn,t)}async insertArrowTable(r,t){let e=s2(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)}},M0=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}},S2=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=Vr.from(t);return console.assert(e.isSync()),console.assert(e.isFile()),new _n(e)}async send(...r){let t=await this.bindings.sendPrepared(this.connectionId,this.statementId,r),e=new M0(this.bindings,this.connectionId,t),i=await Vr.from(e);return console.assert(i.isAsync()),console.assert(i.isStream()),i}},T2=(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))(T2||{}),I2=(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))(I2||{}),ue=class{constructor(r,t){this.promiseResolver=()=>{},this.promiseRejecter=()=>{},this.type=r,this.data=t,this.promise=new Promise((e,i)=>{this.promiseResolver=e,this.promiseRejecter=i})}};function Ka(r){switch(r.typeId){case L.Binary:return{sqlType:"binary"};case L.Bool:return{sqlType:"bool"};case L.Date:return{sqlType:"date"};case L.DateDay:return{sqlType:"date32[d]"};case L.DateMillisecond:return{sqlType:"date64[ms]"};case L.Decimal:{let t=r;return{sqlType:"decimal",precision:t.precision,scale:t.scale}}case L.Float:return{sqlType:"float"};case L.Float16:return{sqlType:"float16"};case L.Float32:return{sqlType:"float32"};case L.Float64:return{sqlType:"float64"};case L.Int:return{sqlType:"int32"};case L.Int16:return{sqlType:"int16"};case L.Int32:return{sqlType:"int32"};case L.Int64:return{sqlType:"int64"};case L.Uint16:return{sqlType:"uint16"};case L.Uint32:return{sqlType:"uint32"};case L.Uint64:return{sqlType:"uint64"};case L.Uint8:return{sqlType:"uint8"};case L.IntervalDayTime:return{sqlType:"interval[dt]"};case L.IntervalYearMonth:return{sqlType:"interval[m]"};case L.List:return{sqlType:"list",valueType:Ka(r.valueType)};case L.FixedSizeBinary:return{sqlType:"fixedsizebinary",byteWidth:r.byteWidth};case L.Null:return{sqlType:"null"};case L.Utf8:return{sqlType:"utf8"};case L.Struct:return{sqlType:"struct",fields:r.children.map(t=>_h(t.name,t.type))};case L.Map:{let t=r;return{sqlType:"map",keyType:Ka(t.keyType),valueType:Ka(t.valueType)}}case L.Time:return{sqlType:"time[s]"};case L.TimeMicrosecond:return{sqlType:"time[us]"};case L.TimeMillisecond:return{sqlType:"time[ms]"};case L.TimeNanosecond:return{sqlType:"time[ns]"};case L.TimeSecond:return{sqlType:"time[s]"};case L.Timestamp:return{sqlType:"timestamp",timezone:r.timezone||void 0};case L.TimestampSecond:return{sqlType:"timestamp[s]",timezone:r.timezone||void 0};case L.TimestampMicrosecond:return{sqlType:"timestamp[us]",timezone:r.timezone||void 0};case L.TimestampNanosecond:return{sqlType:"timestamp[ns]",timezone:r.timezone||void 0};case L.TimestampMillisecond:return{sqlType:"timestamp[ms]",timezone:r.timezone||void 0}}throw new Error("unsupported arrow type: ".concat(r.toString()))}function _h(r,t){let e=Ka(t);return e.name=r,e}var E2=new TextEncoder,C2=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 n of this._onInstantiationProgress)n(e.data);return}}let i=this._pendingRequests.get(e.requestId);if(!i){console.warn("unassociated response: [".concat(e.requestId,", ").concat(e.type.toString(),"]"));return}if(this._pendingRequests.delete(e.requestId),e.type=="ERROR"){let n=new Error(e.data.message);n.name=e.data.name,(t=Object.getOwnPropertyDescriptor(n,"stack"))!=null&&t.writable&&(n.stack=e.data.stack),i.promiseRejecter(n);return}switch(i.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"){i.promiseResolver(e.data);return}break;case"INSTANTIATE":if(this._onInstantiationProgress=[],e.type=="OK"){i.promiseResolver(e.data);return}break;case"GLOB_FILE_INFOS":if(e.type=="FILE_INFOS"){i.promiseResolver(e.data);return}break;case"GET_VERSION":if(e.type=="VERSION_STRING"){i.promiseResolver(e.data);return}break;case"GET_FEATURE_FLAGS":if(e.type=="FEATURE_FLAGS"){i.promiseResolver(e.data);return}break;case"GET_TABLE_NAMES":if(e.type=="TABLE_NAMES"){i.promiseResolver(e.data);return}break;case"TOKENIZE":if(e.type=="SCRIPT_TOKENS"){i.promiseResolver(e.data);return}break;case"COPY_FILE_TO_BUFFER":if(e.type=="FILE_BUFFER"){i.promiseResolver(e.data);return}break;case"EXPORT_FILE_STATISTICS":if(e.type=="FILE_STATISTICS"){i.promiseResolver(e.data);return}break;case"CONNECT":if(e.type=="CONNECTION_INFO"){i.promiseResolver(e.data);return}break;case"RUN_PREPARED":case"RUN_QUERY":if(e.type=="QUERY_RESULT"){i.promiseResolver(e.data);return}break;case"SEND_PREPARED":if(e.type=="QUERY_RESULT_HEADER"){i.promiseResolver(e.data);return}break;case"START_PENDING_QUERY":if(e.type=="QUERY_RESULT_HEADER_OR_NULL"){i.promiseResolver(e.data);return}break;case"POLL_PENDING_QUERY":if(e.type=="QUERY_RESULT_HEADER_OR_NULL"){i.promiseResolver(e.data);return}break;case"CANCEL_PENDING_QUERY":if(this._onInstantiationProgress=[],e.type=="SUCCESS"){i.promiseResolver(e.data);return}break;case"FETCH_QUERY_RESULTS":if(e.type=="QUERY_RESULT_CHUNK"){i.promiseResolver(e.data);return}break;case"CREATE_PREPARED":if(e.type=="PREPARED_STATEMENT_ID"){i.promiseResolver(e.data);return}break}i.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 ue("RESET",null);return await this.postTask(r)}async ping(){let r=new ue("PING",null);await this.postTask(r)}async dropFile(r){let t=new ue("DROP_FILE",r);return await this.postTask(t)}async dropFiles(){let r=new ue("DROP_FILES",null);return await this.postTask(r)}async flushFiles(){let r=new ue("FLUSH_FILES",null);return await this.postTask(r)}async instantiate(r,t=null,e=i=>{}){this._onInstantiationProgress.push(e);let i=new ue("INSTANTIATE",[r,t]);return await this.postTask(i)}async getVersion(){let r=new ue("GET_VERSION",null);return await this.postTask(r)}async getFeatureFlags(){let r=new ue("GET_FEATURE_FLAGS",null);return await this.postTask(r)}async open(r){let t=new ue("OPEN",r);await this.postTask(t)}async tokenize(r){let t=new ue("TOKENIZE",r);return await this.postTask(t)}async connectInternal(){let r=new ue("CONNECT",null);return await this.postTask(r)}async connect(){let r=await this.connectInternal();return new x2(this,r)}async disconnect(r){let t=new ue("DISCONNECT",r);await this.postTask(t)}async runQuery(r,t){let e=new ue("RUN_QUERY",[r,t]);return await this.postTask(e)}async startPendingQuery(r,t,e=!1){let i=new ue("START_PENDING_QUERY",[r,t,e]);return await this.postTask(i)}async pollPendingQuery(r){let t=new ue("POLL_PENDING_QUERY",r);return await this.postTask(t)}async cancelPendingQuery(r){let t=new ue("CANCEL_PENDING_QUERY",r);return await this.postTask(t)}async fetchQueryResults(r){let t=new ue("FETCH_QUERY_RESULTS",r);return await this.postTask(t)}async getTableNames(r,t){let e=new ue("GET_TABLE_NAMES",[r,t]);return await this.postTask(e)}async createPrepared(r,t){let e=new ue("CREATE_PREPARED",[r,t]);return await this.postTask(e)}async closePrepared(r,t){let e=new ue("CLOSE_PREPARED",[r,t]);await this.postTask(e)}async runPrepared(r,t,e){let i=new ue("RUN_PREPARED",[r,t,e]);return await this.postTask(i)}async sendPrepared(r,t,e){let i=new ue("SEND_PREPARED",[r,t,e]);return await this.postTask(i)}async globFiles(r){let t=new ue("GLOB_FILE_INFOS",r);return await this.postTask(t)}async registerFileText(r,t){let e=E2.encode(t);await this.registerFileBuffer(r,e)}async registerFileURL(r,t,e,i){t===void 0&&(t=r);let n=new ue("REGISTER_FILE_URL",[r,t,e,i]);await this.postTask(n)}async registerEmptyFileBuffer(r){}async registerFileBuffer(r,t){let e=new ue("REGISTER_FILE_BUFFER",[r,t]);await this.postTask(e,[t.buffer])}async registerFileHandle(r,t,e,i){let n=new ue("REGISTER_FILE_HANDLE",[r,t,e,i]);await this.postTask(n,[])}async registerOPFSFileName(r){let t=new ue("REGISTER_OPFS_FILE_NAME",[r]);await this.postTask(t,[])}async collectFileStatistics(r,t){let e=new ue("COLLECT_FILE_STATISTICS",[r,t]);await this.postTask(e,[])}async exportFileStatistics(r){let t=new ue("EXPORT_FILE_STATISTICS",r);return await this.postTask(t,[])}async copyFileToBuffer(r){let t=new ue("COPY_FILE_TO_BUFFER",r);return await this.postTask(t)}async copyFileToPath(r,t){let e=new ue("COPY_FILE_TO_PATH",[r,t]);await this.postTask(e)}async insertArrowFromIPCStream(r,t,e){if(t.length==0)return;let i=new ue("INSERT_ARROW_FROM_IPC_STREAM",[r,t,e]);await this.postTask(i,[t.buffer])}async insertCSVFromPath(r,t,e){if(e.columns!==void 0){let n=[];for(let s in e.columns){let o=e.columns[s];n.push(_h(s,o))}e.columnsFlat=n,delete e.columns}let i=new ue("IMPORT_CSV_FROM_PATH",[r,t,e]);await this.postTask(i)}async insertJSONFromPath(r,t,e){if(e.columns!==void 0){let n=[];for(let s in e.columns){let o=e.columns[s];n.push(_h(s,o))}e.columnsFlat=n,delete e.columns}let i=new ue("IMPORT_JSON_FROM_PATH",[r,t,e]);await this.postTask(i)}};function A2(){let r=new TextDecoder;return t=>(typeof SharedArrayBuffer<"u"&&t.buffer instanceof SharedArrayBuffer&&(t=new Uint8Array(t)),r.decode(t))}A2();var O2=(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))(O2||{}),F2=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])),P2=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])),M2=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])),D2=()=>(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])),R2={version:"1.29.1-dev68.0"},Ff=R2.version.split(".");Ff[0];Ff[1];Ff[2];var N2=()=>typeof navigator>"u",tc=null,ec=null,rc=null,ic=null,nc=null;async function L2(){return tc==null&&(tc=typeof BigInt64Array<"u"),ec==null&&(ec=await P2()),rc==null&&(rc=await D2()),ic==null&&(ic=await M2()),nc==null&&(nc=await F2()),{bigInt64Array:tc,crossOriginIsolated:N2()||globalThis.crossOriginIsolated||!1,wasmExceptions:ec,wasmSIMD:ic,wasmThreads:rc,wasmBulkMemory:nc}}async function zp(r){let t=await L2();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}}d2(p2());const sc={},No={};function Uo(r,t){try{const i=(sc[r]||(sc[r]=new Intl.DateTimeFormat("en-GB",{timeZone:r,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return i in No?No[i]:jp(i,i.split(":"))}catch{if(r in No)return No[r];const e=r==null?void 0:r.match(B2);return e?jp(r,e.slice(1)):NaN}}const B2=/([+-]\d\d):?(\d\d)?/;function jp(r,t){const e=+t[0],i=+(t[1]||0);return No[r]=e>0?e*60+i:e*60-i}class Cr extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Uo(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)),D0(this),bh(this)):this.setTime(Date.now())}static tz(t,...e){return e.length?new Cr(...e,t):new Cr(Date.now(),t)}withTimeZone(t){return new Cr(+this,t)}getTimezoneOffset(){return-Uo(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),bh(this),+this}[Symbol.for("constructDateFrom")](t){return new Cr(+new Date(t),this.timeZone)}}const $p=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(r=>{if(!$p.test(r))return;const t=r.replace($p,"$1UTC");Cr.prototype[t]&&(r.startsWith("get")?Cr.prototype[r]=function(){return this.internal[t]()}:(Cr.prototype[r]=function(){return Date.prototype[t].apply(this.internal,arguments),k2(this),+this},Cr.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),bh(this),+this}))});function bh(r){r.internal.setTime(+r),r.internal.setUTCMinutes(r.internal.getUTCMinutes()-r.getTimezoneOffset())}function k2(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()),D0(r)}function D0(r){const t=Uo(r.timeZone,r),e=new Date(+r);e.setUTCHours(e.getUTCHours()-1);const i=-new Date(+r).getTimezoneOffset(),n=-new Date(+e).getTimezoneOffset(),s=i-n,o=Date.prototype.getHours.apply(r)!==r.internal.getUTCHours();s&&o&&r.internal.setUTCMinutes(r.internal.getUTCMinutes()+s);const a=i-t;a&&Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+a);const l=Uo(r.timeZone,r),c=-new Date(+r).getTimezoneOffset()-l,h=l!==t,p=c-a;if(h&&p){Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+p);const f=Uo(r.timeZone,r),y=l-f;y&&(r.internal.setUTCMinutes(r.internal.getUTCMinutes()+y),Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+y))}}const U2=new TextDecoder("utf-8"),z2=r=>U2.decode(r),j2=new TextEncoder,R0=r=>j2.encode(r),fi=r=>typeof r=="function",pa=r=>r!=null&&Object(r)===r,$2=r=>pa(r)&&fi(r.then),N0=r=>pa(r)&&fi(r[Symbol.iterator]),V2=r=>pa(r)&&fi(r[Symbol.asyncIterator]),G2=r=>pa(r)&&"done"in r&&"value"in r,W2=r=>pa(r)&&fi(r.clear)&&fi(r.bytes)&&fi(r.position)&&fi(r.setPosition)&&fi(r.capacity)&&fi(r.getBufferIdentifier)&&fi(r.createLong),Pf=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:ArrayBuffer;function H2(r){const t=r[0]?[r[0]]:[];let e,i,n,s;for(let o,a,l=0,u=0,c=r.length;++lc+h.byteLength,0);let n,s,o,a=0,l=-1;const u=Math.min(t||Number.POSITIVE_INFINITY,i);for(const c=e.length;++lrr(Int8Array,r),q2=r=>rr(Int16Array,r),Q2=r=>rr(Int32Array,r),K2=r=>rr(BigInt64Array,r),Z2=r=>rr(Uint8Array,r),J2=r=>rr(Uint16Array,r),tF=r=>rr(Uint32Array,r),eF=r=>rr(BigUint64Array,r),rF=r=>rr(Float32Array,r),iF=r=>rr(Float64Array,r),nF=r=>rr(Uint8ClampedArray,r),xh=r=>(r.next(),r);function*Fi(r,t){const e=function*(n){yield n},i=typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof Pf?e(t):N0(t)?t:e(t);return yield*xh(function*(n){let s=null;do s=n.next(yield rr(r,s));while(!s.done)}(i[Symbol.iterator]())),new r}const sF=r=>Fi(Int8Array,r),oF=r=>Fi(Int16Array,r),aF=r=>Fi(Int32Array,r),lF=r=>Fi(Uint8Array,r),uF=r=>Fi(Uint16Array,r),cF=r=>Fi(Uint32Array,r),hF=r=>Fi(Float32Array,r),fF=r=>Fi(Float64Array,r),dF=r=>Fi(Uint8ClampedArray,r);function ni(r,t){return fr(this,arguments,function*(){if($2(t))return yield Nt(yield Nt(yield*is(wi(ni(r,yield Nt(t))))));const i=function(o){return fr(this,arguments,function*(){yield yield Nt(yield Nt(o))})},n=function(o){return fr(this,arguments,function*(){yield Nt(yield*is(wi(xh(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 Pf?i(t):N0(t)?n(t):V2(t)?t:i(t);return yield Nt(yield*is(wi(xh(function(o){return fr(this,arguments,function*(){let a=null;do a=yield Nt(o.next(yield yield Nt(rr(r,a))));while(!a.done)})}(s[Symbol.asyncIterator]()))))),yield Nt(new r)})}const pF=r=>ni(Int8Array,r),mF=r=>ni(Int16Array,r),yF=r=>ni(Int32Array,r),gF=r=>ni(Uint8Array,r),vF=r=>ni(Uint16Array,r),_F=r=>ni(Uint32Array,r),bF=r=>ni(Float32Array,r),wF=r=>ni(Float64Array,r),xF=r=>ni(Uint8ClampedArray,r);function SF(r,t,e){if(r!==0){e=e.slice(0,t);for(let i=-1,n=e.length;++i0)do if(r[e]!==t[e])return!1;while(++eno(t))}]`:`[${r}]`:ArrayBuffer.isView(r)?`[${r}]`:JSON.stringify(r,(t,e)=>typeof e=="bigint"?`${e}`:e)}const EF=Object.freeze(Object.defineProperty({__proto__:null,valueToString:no},Symbol.toStringTag,{value:"Module"}));function Or(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 B0(r,t){return Or(r/t)+Or(r%t)/Or(t)}const k0=Symbol.for("isArrowBigNum");function si(r,...t){return t.length===0?Object.setPrototypeOf(rr(this.TypedArray,r),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(r,...t),this.constructor.prototype)}si.prototype[k0]=!0;si.prototype.toJSON=function(){return`"${so(this)}"`};si.prototype.valueOf=function(r){return Mf(this,r)};si.prototype.toString=function(){return so(this)};si.prototype[Symbol.toPrimitive]=function(r="default"){switch(r){case"number":return Mf(this);case"string":return so(this);case"default":return U0(this)}return so(this)};function Hs(...r){return si.apply(this,r)}function Ys(...r){return si.apply(this,r)}function ra(...r){return si.apply(this,r)}Object.setPrototypeOf(Hs.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(Ys.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(ra.prototype,Object.create(Uint32Array.prototype));Object.assign(Hs.prototype,si.prototype,{constructor:Hs,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array});Object.assign(Ys.prototype,si.prototype,{constructor:Ys,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array});Object.assign(ra.prototype,si.prototype,{constructor:ra,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const CF=BigInt(4294967296)*BigInt(4294967296),AF=CF-BigInt(1);function Mf(r,t){const{buffer:e,byteOffset:i,byteLength:n,signed:s}=r,o=new BigUint64Array(e,i,n/8),a=s&&o.at(-1)&BigInt(1)<0){const c=BigInt("1".padEnd(t+1,"0")),h=l/c,p=a?-(l%c):l%c,f=Or(h),y=`${p}`.padStart(t,"0");return+`${a&&f===0?"-":""}${f}.${y}`}return Or(l)}function so(r){if(r.byteLength===8)return`${new r.BigIntArray(r.buffer,r.byteOffset,1)[0]}`;if(!r.signed)return oc(r);let t=new Uint16Array(r.buffer,r.byteOffset,r.byteLength/2);if(new Int16Array([t.at(-1)])[0]>=0)return oc(r);t=t.slice();let i=1;for(let s=0;s(r.children=null,r.ArrayType=Array,r.OffsetArrayType=Int32Array,r[Symbol.toStringTag]="DataType"))(Et.prototype);class Vp extends Et{constructor(){super(W.Null)}toString(){return"Null"}}j0=Symbol.toStringTag;Vp[j0]=(r=>r[Symbol.toStringTag]="Null")(Vp.prototype);class Gp extends Et{constructor(t,e){super(W.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}`}}$0=Symbol.toStringTag;Gp[$0]=(r=>(r.isSigned=null,r.bitWidth=null,r[Symbol.toStringTag]="Int"))(Gp.prototype);class Wp extends Et{constructor(t){super(W.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}`}}V0=Symbol.toStringTag;Wp[V0]=(r=>(r.precision=null,r[Symbol.toStringTag]="Float"))(Wp.prototype);class Hp extends Et{constructor(){super(W.Binary)}toString(){return"Binary"}}G0=Symbol.toStringTag;Hp[G0]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Binary"))(Hp.prototype);class Yp extends Et{constructor(){super(W.LargeBinary)}toString(){return"LargeBinary"}}W0=Symbol.toStringTag;Yp[W0]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeBinary"))(Yp.prototype);class Xp extends Et{constructor(){super(W.Utf8)}toString(){return"Utf8"}}H0=Symbol.toStringTag;Xp[H0]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Utf8"))(Xp.prototype);class qp extends Et{constructor(){super(W.LargeUtf8)}toString(){return"LargeUtf8"}}Y0=Symbol.toStringTag;qp[Y0]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeUtf8"))(qp.prototype);class Qp extends Et{constructor(){super(W.Bool)}toString(){return"Bool"}}X0=Symbol.toStringTag;Qp[X0]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Bool"))(Qp.prototype);class Kp extends Et{constructor(t,e,i=128){super(W.Decimal),this.scale=t,this.precision=e,this.bitWidth=i}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}}q0=Symbol.toStringTag;Kp[q0]=(r=>(r.scale=null,r.precision=null,r.ArrayType=Uint32Array,r[Symbol.toStringTag]="Decimal"))(Kp.prototype);class Zp extends Et{constructor(t){super(W.Date),this.unit=t}toString(){return`Date${(this.unit+1)*32}<${wn[this.unit]}>`}get ArrayType(){return this.unit===wn.DAY?Int32Array:BigInt64Array}}Q0=Symbol.toStringTag;Zp[Q0]=(r=>(r.unit=null,r[Symbol.toStringTag]="Date"))(Zp.prototype);class Jp extends Et{constructor(t,e){super(W.Time),this.unit=t,this.bitWidth=e}toString(){return`Time${this.bitWidth}<${Jt[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}}K0=Symbol.toStringTag;Jp[K0]=(r=>(r.unit=null,r.bitWidth=null,r[Symbol.toStringTag]="Time"))(Jp.prototype);class tm extends Et{constructor(t,e){super(W.Timestamp),this.unit=t,this.timezone=e}toString(){return`Timestamp<${Jt[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}}Z0=Symbol.toStringTag;tm[Z0]=(r=>(r.unit=null,r.timezone=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Timestamp"))(tm.prototype);class em extends Et{constructor(t){super(W.Interval),this.unit=t}toString(){return`Interval<${Gr[this.unit]}>`}}J0=Symbol.toStringTag;em[J0]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Interval"))(em.prototype);class rm extends Et{constructor(t){super(W.Duration),this.unit=t}toString(){return`Duration<${Jt[this.unit]}>`}}tb=Symbol.toStringTag;rm[tb]=(r=>(r.unit=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Duration"))(rm.prototype);class im extends Et{constructor(t){super(W.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}}eb=Symbol.toStringTag;im[eb]=(r=>(r.children=null,r[Symbol.toStringTag]="List"))(im.prototype);class Sh extends Et{constructor(t){super(W.Struct),this.children=t}toString(){return`Struct<{${this.children.map(t=>`${t.name}:${t.type}`).join(", ")}}>`}}rb=Symbol.toStringTag;Sh[rb]=(r=>(r.children=null,r[Symbol.toStringTag]="Struct"))(Sh.prototype);class nm extends Et{constructor(t,e,i){super(W.Union),this.mode=t,this.children=i,this.typeIds=e=Int32Array.from(e),this.typeIdToChildIndex=e.reduce((n,s,o)=>(n[s]=o)&&n||n,Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(t=>`${t.type}`).join(" | ")}>`}}ib=Symbol.toStringTag;nm[ib]=(r=>(r.mode=null,r.typeIds=null,r.children=null,r.typeIdToChildIndex=null,r.ArrayType=Int8Array,r[Symbol.toStringTag]="Union"))(nm.prototype);class sm extends Et{constructor(t){super(W.FixedSizeBinary),this.byteWidth=t}toString(){return`FixedSizeBinary[${this.byteWidth}]`}}nb=Symbol.toStringTag;sm[nb]=(r=>(r.byteWidth=null,r.ArrayType=Uint8Array,r[Symbol.toStringTag]="FixedSizeBinary"))(sm.prototype);class om extends Et{constructor(t,e){super(W.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}>`}}sb=Symbol.toStringTag;om[sb]=(r=>(r.children=null,r.listSize=null,r[Symbol.toStringTag]="FixedSizeList"))(om.prototype);class am extends Et{constructor(t,e=!1){var i,n,s;if(super(W.Map),this.children=[t],this.keysSorted=e,t&&(t.name="entries",!((i=t==null?void 0:t.type)===null||i===void 0)&&i.children)){const o=(n=t==null?void 0:t.type)===null||n===void 0?void 0:n.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(", ")}}>`}}ob=Symbol.toStringTag;am[ob]=(r=>(r.children=null,r.keysSorted=null,r[Symbol.toStringTag]="Map_"))(am.prototype);const FF=(r=>()=>++r)(-1);class lm extends Et{constructor(t,e,i,n){super(W.Dictionary),this.indices=e,this.dictionary=t,this.isOrdered=n||!1,this.id=i==null?FF():Or(i)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}}ab=Symbol.toStringTag;lm[ab]=(r=>(r.id=null,r.indices=null,r.isOrdered=null,r.dictionary=null,r[Symbol.toStringTag]="Dictionary"))(lm.prototype);function lb(r){const t=r;switch(r.typeId){case W.Decimal:return r.bitWidth/32;case W.Interval:return t.unit===Gr.MONTH_DAY_NANO?4:1+t.unit;case W.FixedSizeList:return t.listSize;case W.FixedSizeBinary:return t.byteWidth;default:return 1}}class ae{visitMany(t,...e){return t.map((i,n)=>this.visit(i,...e.map(s=>s[n])))}visit(...t){return this.getVisitFn(t[0],!1).apply(this,t)}getVisitFn(t,e=!0){return PF(this,t,e)}getVisitFnByTypeId(t,e=!0){return Ds(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 PF(r,t,e=!0){return typeof t=="number"?Ds(r,t,e):typeof t=="string"&&t in W?Ds(r,W[t],e):t&&t instanceof Et?Ds(r,um(t),e):t!=null&&t.type&&t.type instanceof Et?Ds(r,um(t.type),e):Ds(r,W.NONE,e)}function Ds(r,t,e=!0){let i=null;switch(t){case W.Null:i=r.visitNull;break;case W.Bool:i=r.visitBool;break;case W.Int:i=r.visitInt;break;case W.Int8:i=r.visitInt8||r.visitInt;break;case W.Int16:i=r.visitInt16||r.visitInt;break;case W.Int32:i=r.visitInt32||r.visitInt;break;case W.Int64:i=r.visitInt64||r.visitInt;break;case W.Uint8:i=r.visitUint8||r.visitInt;break;case W.Uint16:i=r.visitUint16||r.visitInt;break;case W.Uint32:i=r.visitUint32||r.visitInt;break;case W.Uint64:i=r.visitUint64||r.visitInt;break;case W.Float:i=r.visitFloat;break;case W.Float16:i=r.visitFloat16||r.visitFloat;break;case W.Float32:i=r.visitFloat32||r.visitFloat;break;case W.Float64:i=r.visitFloat64||r.visitFloat;break;case W.Utf8:i=r.visitUtf8;break;case W.LargeUtf8:i=r.visitLargeUtf8;break;case W.Binary:i=r.visitBinary;break;case W.LargeBinary:i=r.visitLargeBinary;break;case W.FixedSizeBinary:i=r.visitFixedSizeBinary;break;case W.Date:i=r.visitDate;break;case W.DateDay:i=r.visitDateDay||r.visitDate;break;case W.DateMillisecond:i=r.visitDateMillisecond||r.visitDate;break;case W.Timestamp:i=r.visitTimestamp;break;case W.TimestampSecond:i=r.visitTimestampSecond||r.visitTimestamp;break;case W.TimestampMillisecond:i=r.visitTimestampMillisecond||r.visitTimestamp;break;case W.TimestampMicrosecond:i=r.visitTimestampMicrosecond||r.visitTimestamp;break;case W.TimestampNanosecond:i=r.visitTimestampNanosecond||r.visitTimestamp;break;case W.Time:i=r.visitTime;break;case W.TimeSecond:i=r.visitTimeSecond||r.visitTime;break;case W.TimeMillisecond:i=r.visitTimeMillisecond||r.visitTime;break;case W.TimeMicrosecond:i=r.visitTimeMicrosecond||r.visitTime;break;case W.TimeNanosecond:i=r.visitTimeNanosecond||r.visitTime;break;case W.Decimal:i=r.visitDecimal;break;case W.List:i=r.visitList;break;case W.Struct:i=r.visitStruct;break;case W.Union:i=r.visitUnion;break;case W.DenseUnion:i=r.visitDenseUnion||r.visitUnion;break;case W.SparseUnion:i=r.visitSparseUnion||r.visitUnion;break;case W.Dictionary:i=r.visitDictionary;break;case W.Interval:i=r.visitInterval;break;case W.IntervalDayTime:i=r.visitIntervalDayTime||r.visitInterval;break;case W.IntervalYearMonth:i=r.visitIntervalYearMonth||r.visitInterval;break;case W.IntervalMonthDayNano:i=r.visitIntervalMonthDayNano||r.visitInterval;break;case W.Duration:i=r.visitDuration;break;case W.DurationSecond:i=r.visitDurationSecond||r.visitDuration;break;case W.DurationMillisecond:i=r.visitDurationMillisecond||r.visitDuration;break;case W.DurationMicrosecond:i=r.visitDurationMicrosecond||r.visitDuration;break;case W.DurationNanosecond:i=r.visitDurationNanosecond||r.visitDuration;break;case W.FixedSizeList:i=r.visitFixedSizeList;break;case W.Map:i=r.visitMap;break}if(typeof i=="function")return i;if(!e)return()=>null;throw new Error(`Unrecognized type '${W[t]}'`)}function um(r){switch(r.typeId){case W.Null:return W.Null;case W.Int:{const{bitWidth:t,isSigned:e}=r;switch(t){case 8:return e?W.Int8:W.Uint8;case 16:return e?W.Int16:W.Uint16;case 32:return e?W.Int32:W.Uint32;case 64:return e?W.Int64:W.Uint64}return W.Int}case W.Float:switch(r.precision){case Ar.HALF:return W.Float16;case Ar.SINGLE:return W.Float32;case Ar.DOUBLE:return W.Float64}return W.Float;case W.Binary:return W.Binary;case W.LargeBinary:return W.LargeBinary;case W.Utf8:return W.Utf8;case W.LargeUtf8:return W.LargeUtf8;case W.Bool:return W.Bool;case W.Decimal:return W.Decimal;case W.Time:switch(r.unit){case Jt.SECOND:return W.TimeSecond;case Jt.MILLISECOND:return W.TimeMillisecond;case Jt.MICROSECOND:return W.TimeMicrosecond;case Jt.NANOSECOND:return W.TimeNanosecond}return W.Time;case W.Timestamp:switch(r.unit){case Jt.SECOND:return W.TimestampSecond;case Jt.MILLISECOND:return W.TimestampMillisecond;case Jt.MICROSECOND:return W.TimestampMicrosecond;case Jt.NANOSECOND:return W.TimestampNanosecond}return W.Timestamp;case W.Date:switch(r.unit){case wn.DAY:return W.DateDay;case wn.MILLISECOND:return W.DateMillisecond}return W.Date;case W.Interval:switch(r.unit){case Gr.DAY_TIME:return W.IntervalDayTime;case Gr.YEAR_MONTH:return W.IntervalYearMonth;case Gr.MONTH_DAY_NANO:return W.IntervalMonthDayNano}return W.Interval;case W.Duration:switch(r.unit){case Jt.SECOND:return W.DurationSecond;case Jt.MILLISECOND:return W.DurationMillisecond;case Jt.MICROSECOND:return W.DurationMicrosecond;case Jt.NANOSECOND:return W.DurationNanosecond}return W.Duration;case W.Map:return W.Map;case W.List:return W.List;case W.Struct:return W.Struct;case W.Union:switch(r.mode){case Ei.Dense:return W.DenseUnion;case Ei.Sparse:return W.SparseUnion}return W.Union;case W.FixedSizeBinary:return W.FixedSizeBinary;case W.FixedSizeList:return W.FixedSizeList;case W.Dictionary:return W.Dictionary}throw new Error(`Unrecognized type '${W[r.typeId]}'`)}ae.prototype.visitInt8=null;ae.prototype.visitInt16=null;ae.prototype.visitInt32=null;ae.prototype.visitInt64=null;ae.prototype.visitUint8=null;ae.prototype.visitUint16=null;ae.prototype.visitUint32=null;ae.prototype.visitUint64=null;ae.prototype.visitFloat16=null;ae.prototype.visitFloat32=null;ae.prototype.visitFloat64=null;ae.prototype.visitDateDay=null;ae.prototype.visitDateMillisecond=null;ae.prototype.visitTimestampSecond=null;ae.prototype.visitTimestampMillisecond=null;ae.prototype.visitTimestampMicrosecond=null;ae.prototype.visitTimestampNanosecond=null;ae.prototype.visitTimeSecond=null;ae.prototype.visitTimeMillisecond=null;ae.prototype.visitTimeMicrosecond=null;ae.prototype.visitTimeNanosecond=null;ae.prototype.visitDenseUnion=null;ae.prototype.visitSparseUnion=null;ae.prototype.visitIntervalDayTime=null;ae.prototype.visitIntervalYearMonth=null;ae.prototype.visitIntervalMonthDayNano=null;ae.prototype.visitDuration=null;ae.prototype.visitDurationSecond=null;ae.prototype.visitDurationMillisecond=null;ae.prototype.visitDurationMicrosecond=null;ae.prototype.visitDurationNanosecond=null;const ub=new Float64Array(1),bs=new Uint32Array(ub.buffer);function Df(r){const t=(r&31744)>>10,e=(r&1023)/1024,i=Math.pow(-1,(r&32768)>>15);switch(t){case 31:return i*(e?Number.NaN:1/0);case 0:return i*(e?6103515625e-14*e:0)}return i*Math.pow(2,t-15)*(1+e)}function cb(r){if(r!==r)return 32256;ub[0]=r;const t=(bs[1]&2147483648)>>16&65535;let e=bs[1]&2146435072,i=0;return e>=1089470464?bs[0]>0?e=31744:(e=(e&2080374784)>>16,i=(bs[1]&1048575)>>10):e<=1056964608?(i=1048576+(bs[1]&1048575),i=1048576+(i<<(e>>20)-998)>>21,e=0):(e=e-1056964608>>10,i=(bs[1]&1048575)+512>>10),t|e|i&65535}const MF=Object.freeze(Object.defineProperty({__proto__:null,float64ToUint16:cb,uint16ToFloat64:Df},Symbol.toStringTag,{value:"Module"}));class zt extends ae{}function Yt(r){return(t,e,i)=>{if(t.setValid(e,i!=null))return r(t,e,i)}}const DF=(r,t,e)=>{r[t]=Math.floor(e/864e5)},hb=(r,t,e,i)=>{if(e+1{const n=r+e;i?t[n>>3]|=1<>3]&=~(1<{r[t]=e},Rf=({values:r},t,e)=>{r[t]=e},fb=({values:r},t,e)=>{r[t]=cb(e)},NF=(r,t,e)=>{switch(r.type.precision){case Ar.HALF:return fb(r,t,e);case Ar.SINGLE:case Ar.DOUBLE:return Rf(r,t,e)}},db=({values:r},t,e)=>{DF(r,t,e.valueOf())},pb=({values:r},t,e)=>{r[t]=BigInt(e)},LF=({stride:r,values:t},e,i)=>{t.set(i.subarray(0,r),r*e)},mb=({values:r,valueOffsets:t},e,i)=>hb(r,t,e,i),yb=({values:r,valueOffsets:t},e,i)=>hb(r,t,e,R0(i)),BF=(r,t,e)=>{r.type.unit===wn.DAY?db(r,t,e):pb(r,t,e)},gb=({values:r},t,e)=>{r[t]=BigInt(e/1e3)},vb=({values:r},t,e)=>{r[t]=BigInt(e)},_b=({values:r},t,e)=>{r[t]=BigInt(e*1e3)},bb=({values:r},t,e)=>{r[t]=BigInt(e*1e6)},kF=(r,t,e)=>{switch(r.type.unit){case Jt.SECOND:return gb(r,t,e);case Jt.MILLISECOND:return vb(r,t,e);case Jt.MICROSECOND:return _b(r,t,e);case Jt.NANOSECOND:return bb(r,t,e)}},wb=({values:r},t,e)=>{r[t]=e},xb=({values:r},t,e)=>{r[t]=e},Sb=({values:r},t,e)=>{r[t]=e},Tb=({values:r},t,e)=>{r[t]=e},UF=(r,t,e)=>{switch(r.type.unit){case Jt.SECOND:return wb(r,t,e);case Jt.MILLISECOND:return xb(r,t,e);case Jt.MICROSECOND:return Sb(r,t,e);case Jt.NANOSECOND:return Tb(r,t,e)}},zF=({values:r,stride:t},e,i)=>{r.set(i.subarray(0,t),t*e)},jF=(r,t,e)=>{const i=r.children[0],n=r.valueOffsets,s=Ci.getVisitFn(i);if(Array.isArray(e))for(let o=-1,a=n[t],l=n[t+1];a{const i=r.children[0],{valueOffsets:n}=r,s=Ci.getVisitFn(i);let{[t]:o,[t+1]:a}=n;const l=e instanceof Map?e.entries():Object.entries(e);for(const u of l)if(s(i,o,u),++o>=a)break},VF=(r,t)=>(e,i,n,s)=>i&&e(i,r,t[s]),GF=(r,t)=>(e,i,n,s)=>i&&e(i,r,t.get(s)),WF=(r,t)=>(e,i,n,s)=>i&&e(i,r,t.get(n.name)),HF=(r,t)=>(e,i,n,s)=>i&&e(i,r,t[n.name]),YF=(r,t,e)=>{const i=r.type.children.map(s=>Ci.getVisitFn(s.type)),n=e instanceof Map?WF(t,e):e instanceof Qe?GF(t,e):Array.isArray(e)?VF(t,e):HF(t,e);r.type.children.forEach((s,o)=>n(i[o],r.children[o],s,o))},XF=(r,t,e)=>{r.type.mode===Ei.Dense?Ib(r,t,e):Eb(r,t,e)},Ib=(r,t,e)=>{const i=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[i];Ci.visit(n,r.valueOffsets[t],e)},Eb=(r,t,e)=>{const i=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[i];Ci.visit(n,t,e)},qF=(r,t,e)=>{var i;(i=r.dictionary)===null||i===void 0||i.set(r.values[t],e)},QF=(r,t,e)=>{switch(r.type.unit){case Gr.YEAR_MONTH:return Ab(r,t,e);case Gr.DAY_TIME:return Cb(r,t,e);case Gr.MONTH_DAY_NANO:return Ob(r,t,e)}},Cb=({values:r},t,e)=>{r.set(e.subarray(0,2),2*t)},Ab=({values:r},t,e)=>{r[t]=e[0]*12+e[1]%12},Ob=({values:r,stride:t},e,i)=>{r.set(i.subarray(0,t),t*e)},Fb=({values:r},t,e)=>{r[t]=e},Pb=({values:r},t,e)=>{r[t]=e},Mb=({values:r},t,e)=>{r[t]=e},Db=({values:r},t,e)=>{r[t]=e},KF=(r,t,e)=>{switch(r.type.unit){case Jt.SECOND:return Fb(r,t,e);case Jt.MILLISECOND:return Pb(r,t,e);case Jt.MICROSECOND:return Mb(r,t,e);case Jt.NANOSECOND:return Db(r,t,e)}},ZF=(r,t,e)=>{const{stride:i}=r,n=r.children[0],s=Ci.getVisitFn(n);if(Array.isArray(e))for(let o=-1,a=t*i;++o`${no(t)}: ${no(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new JF(this[Jr],this[Xs])}}class JF{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[Jr].type.children.some(i=>i.name===e)}getOwnPropertyDescriptor(t,e){if(t[Jr].type.children.some(i=>i.name===e))return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e];const i=t[Jr].type.children.findIndex(n=>n.name===e);if(i!==-1){const n=qr.visit(t[Jr].children[i],t[Xs]);return Reflect.set(t,e,n),n}}set(t,e,i){const n=t[Jr].type.children.findIndex(s=>s.name===e);return n!==-1?(Ci.visit(t[Jr].children[n],t[Xs],i),Reflect.set(t,e,i)):Reflect.has(t,e)||typeof e=="symbol"?Reflect.set(t,e,i):!1}}const eP=new tP;class Pt extends ae{}function jt(r){return(t,e)=>t.getValid(e)?r(t,e):null}const rP=(r,t)=>864e5*r[t],iP=(r,t)=>null,Rb=(r,t,e)=>{if(e+1>=t.length)return null;const i=Or(t[e]),n=Or(t[e+1]);return r.subarray(i,n)},nP=({offset:r,values:t},e)=>{const i=r+e;return(t[i>>3]&1<rP(r,t),Lb=({values:r},t)=>Or(r[t]),Tn=({stride:r,values:t},e)=>t[r*e],sP=({stride:r,values:t},e)=>Df(t[r*e]),Bb=({values:r},t)=>r[t],oP=({stride:r,values:t},e)=>t.subarray(r*e,r*(e+1)),kb=({values:r,valueOffsets:t},e)=>Rb(r,t,e),Ub=({values:r,valueOffsets:t},e)=>{const i=Rb(r,t,e);return i!==null?z2(i):null},aP=({values:r},t)=>r[t],lP=({type:r,values:t},e)=>r.precision!==Ar.HALF?t[e]:Df(t[e]),uP=(r,t)=>r.type.unit===wn.DAY?Nb(r,t):Lb(r,t),zb=({values:r},t)=>1e3*Or(r[t]),jb=({values:r},t)=>Or(r[t]),$b=({values:r},t)=>B0(r[t],BigInt(1e3)),Vb=({values:r},t)=>B0(r[t],BigInt(1e6)),cP=(r,t)=>{switch(r.type.unit){case Jt.SECOND:return zb(r,t);case Jt.MILLISECOND:return jb(r,t);case Jt.MICROSECOND:return $b(r,t);case Jt.NANOSECOND:return Vb(r,t)}},Gb=({values:r},t)=>r[t],Wb=({values:r},t)=>r[t],Hb=({values:r},t)=>r[t],Yb=({values:r},t)=>r[t],hP=(r,t)=>{switch(r.type.unit){case Jt.SECOND:return Gb(r,t);case Jt.MILLISECOND:return Wb(r,t);case Jt.MICROSECOND:return Hb(r,t);case Jt.NANOSECOND:return Yb(r,t)}},fP=({values:r,stride:t},e)=>au.decimal(r.subarray(t*e,t*(e+1))),dP=(r,t)=>{const{valueOffsets:e,stride:i,children:n}=r,{[t*i]:s,[t*i+1]:o}=e,l=n[0].slice(s,o-s);return new Qe([l])},pP=(r,t)=>{const{valueOffsets:e,children:i}=r,{[t]:n,[t+1]:s}=e,o=i[0];return new Lf(o.slice(n,s-n))},mP=(r,t)=>new Nf(r,t),yP=(r,t)=>r.type.mode===Ei.Dense?Xb(r,t):qb(r,t),Xb=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[e];return qr.visit(i,r.valueOffsets[t])},qb=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[e];return qr.visit(i,t)},gP=(r,t)=>{var e;return(e=r.dictionary)===null||e===void 0?void 0:e.get(r.values[t])},vP=(r,t)=>r.type.unit===Gr.MONTH_DAY_NANO?Zb(r,t):r.type.unit===Gr.DAY_TIME?Qb(r,t):Kb(r,t),Qb=({values:r},t)=>r.subarray(2*t,2*(t+1)),Kb=({values:r},t)=>{const e=r[t],i=new Int32Array(2);return i[0]=Math.trunc(e/12),i[1]=Math.trunc(e%12),i},Zb=({values:r},t)=>r.subarray(4*t,4*(t+1)),Jb=({values:r},t)=>r[t],tw=({values:r},t)=>r[t],ew=({values:r},t)=>r[t],rw=({values:r},t)=>r[t],_P=(r,t)=>{switch(r.type.unit){case Jt.SECOND:return Jb(r,t);case Jt.MILLISECOND:return tw(r,t);case Jt.MICROSECOND:return ew(r,t);case Jt.NANOSECOND:return rw(r,t)}},bP=(r,t)=>{const{stride:e,children:i}=r,s=i[0].slice(t*e,e);return new Qe([s])};Pt.prototype.visitNull=jt(iP);Pt.prototype.visitBool=jt(nP);Pt.prototype.visitInt=jt(aP);Pt.prototype.visitInt8=jt(Tn);Pt.prototype.visitInt16=jt(Tn);Pt.prototype.visitInt32=jt(Tn);Pt.prototype.visitInt64=jt(Bb);Pt.prototype.visitUint8=jt(Tn);Pt.prototype.visitUint16=jt(Tn);Pt.prototype.visitUint32=jt(Tn);Pt.prototype.visitUint64=jt(Bb);Pt.prototype.visitFloat=jt(lP);Pt.prototype.visitFloat16=jt(sP);Pt.prototype.visitFloat32=jt(Tn);Pt.prototype.visitFloat64=jt(Tn);Pt.prototype.visitUtf8=jt(Ub);Pt.prototype.visitLargeUtf8=jt(Ub);Pt.prototype.visitBinary=jt(kb);Pt.prototype.visitLargeBinary=jt(kb);Pt.prototype.visitFixedSizeBinary=jt(oP);Pt.prototype.visitDate=jt(uP);Pt.prototype.visitDateDay=jt(Nb);Pt.prototype.visitDateMillisecond=jt(Lb);Pt.prototype.visitTimestamp=jt(cP);Pt.prototype.visitTimestampSecond=jt(zb);Pt.prototype.visitTimestampMillisecond=jt(jb);Pt.prototype.visitTimestampMicrosecond=jt($b);Pt.prototype.visitTimestampNanosecond=jt(Vb);Pt.prototype.visitTime=jt(hP);Pt.prototype.visitTimeSecond=jt(Gb);Pt.prototype.visitTimeMillisecond=jt(Wb);Pt.prototype.visitTimeMicrosecond=jt(Hb);Pt.prototype.visitTimeNanosecond=jt(Yb);Pt.prototype.visitDecimal=jt(fP);Pt.prototype.visitList=jt(dP);Pt.prototype.visitStruct=jt(mP);Pt.prototype.visitUnion=jt(yP);Pt.prototype.visitDenseUnion=jt(Xb);Pt.prototype.visitSparseUnion=jt(qb);Pt.prototype.visitDictionary=jt(gP);Pt.prototype.visitInterval=jt(vP);Pt.prototype.visitIntervalDayTime=jt(Qb);Pt.prototype.visitIntervalYearMonth=jt(Kb);Pt.prototype.visitIntervalMonthDayNano=jt(Zb);Pt.prototype.visitDuration=jt(_P);Pt.prototype.visitDurationSecond=jt(Jb);Pt.prototype.visitDurationMillisecond=jt(tw);Pt.prototype.visitDurationMicrosecond=jt(ew);Pt.prototype.visitDurationNanosecond=jt(rw);Pt.prototype.visitFixedSizeList=jt(bP);Pt.prototype.visitMap=jt(pP);const qr=new Pt,Rs=Symbol.for("keys"),qs=Symbol.for("vals"),Ns=Symbol.for("kKeysAsStrings"),Th=Symbol.for("_kKeysAsStrings");class Lf{constructor(t){return this[Rs]=new Qe([t.children[0]]).memoize(),this[qs]=t.children[1],new Proxy(this,new xP)}get[Ns](){return this[Th]||(this[Th]=Array.from(this[Rs].toArray(),String))}[Symbol.iterator](){return new wP(this[Rs],this[qs])}get size(){return this[Rs].length}toArray(){return Object.values(this.toJSON())}toJSON(){const t=this[Rs],e=this[qs],i={};for(let n=-1,s=t.length;++n`${no(t)}: ${no(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}}class wP{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),qr.visit(this.vals,t)]})}}class xP{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(t){return t[Ns]}has(t,e){return t[Ns].includes(e)}getOwnPropertyDescriptor(t,e){if(t[Ns].indexOf(e)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e];const i=t[Ns].indexOf(e);if(i!==-1){const n=qr.visit(Reflect.get(t,qs),i);return Reflect.set(t,e,n),n}}set(t,e,i){const n=t[Ns].indexOf(e);return n!==-1?(Ci.visit(Reflect.get(t,qs),n,i),Reflect.set(t,e,i)):Reflect.has(t,e)?Reflect.set(t,e,i):!1}}Object.defineProperties(Lf.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[Rs]:{writable:!0,enumerable:!1,configurable:!1,value:null},[qs]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Th]:{writable:!0,enumerable:!1,configurable:!1,value:null}});let cm;function iw(r,t,e,i){const{length:n=0}=r;let s=typeof t!="number"?0:t,o=typeof e!="number"?n:e;return s<0&&(s=(s%n+n)%n),o<0&&(o=(o%n+n)%n),on&&(o=n),i?i(r,s,o):[s,o]}const nw=(r,t)=>r<0?t+r:r,hm=r=>r!==r;function fs(r){if(typeof r!=="object"||r===null)return hm(r)?hm:e=>e===r;if(r instanceof Date){const e=r.valueOf();return i=>i instanceof Date?i.valueOf()===e:!1}return ArrayBuffer.isView(r)?e=>e?L0(r,e):!1:r instanceof Map?TP(r):Array.isArray(r)?SP(r):r instanceof Qe?IP(r):EP(r,!0)}function SP(r){const t=[];for(let e=-1,i=r.length;++e!1;const i=[];for(let n=-1,s=e.length;++n{if(!e||typeof e!="object")return!1;switch(e.constructor){case Array:return CP(r,e);case Map:return fm(r,e,e.keys());case Lf:case Nf:case Object:case void 0:return fm(r,e,t||Object.keys(e))}return e instanceof Qe?AP(r,e):!1}}function CP(r,t){const e=r.length;if(t.length!==e)return!1;for(let i=-1;++i>i}function FP(r,t,e){return e?!!(r[t>>3]|=1<>3]&=~(1<0||e.byteLength>3):ow(new uu(e,r,t,null,Bf)).subarray(0,i)),n}return e}function ow(r){const t=[];let e=0,i=0,n=0;for(const o of r)o&&(n|=1<0)&&(t[e++]=n);const s=new Uint8Array(t.length+7&-8);return s.set(t),s}class uu{constructor(t,e,i,n,s){this.bytes=t,this.length=i,this.context=n,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,n=t+(t%8===0?0:8-t%8);return Ul(r,t,n)+Ul(r,i,e)+aw(r,n>>3,i-n>>3)}function aw(r,t,e){let i=0,n=Math.trunc(t);const s=new DataView(r.buffer,r.byteOffset,r.byteLength),o=e===void 0?r.byteLength:n+e;for(;o-n>=4;)i+=Za(s.getUint32(n)),n+=4;for(;o-n>=2;)i+=Za(s.getUint16(n)),n+=2;for(;o-n>=1;)i+=Za(s.getUint8(n)),n+=1;return i}function Za(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 PP=Object.freeze(Object.defineProperty({__proto__:null,BitIterator:uu,getBit:sw,getBool:Bf,packBools:ow,popcnt_array:aw,popcnt_bit_range:Ul,popcnt_uint32:Za,setBool:FP,truncateBitmap:Ih},Symbol.toStringTag,{value:"Module"})),MP=-1;class ia{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 Et.isSparseUnion(t)?this.children.some(e=>e.nullable):Et.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:i,nullBitmap:n,typeIds:s}=this;return e&&(t+=e.byteLength),i&&(t+=i.byteLength),n&&(t+=n.byteLength),s&&(t+=s.byteLength),this.children.reduce((o,a)=>o+a.byteLength,t)}get nullCount(){if(Et.isUnion(this.type))return this.children.reduce((i,n)=>i+n.nullCount,0);let t=this._nullCount,e;return t<=MP&&(e=this.nullBitmap)&&(this._nullCount=t=e.length===0?0:this.length-Ul(e,this.offset,this.offset+this.length)),t}constructor(t,e,i,n,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(i||0,0)),this._nullCount=Math.floor(Math.max(n||0,-1));let l;s instanceof ia?(this.stride=s.stride,this.values=s.values,this.typeIds=s.typeIds,this.nullBitmap=s.nullBitmap,this.valueOffsets=s.valueOffsets):(this.stride=lb(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(Et.isUnion(e)){const i=e,n=this.children[i.typeIdToChildIndex[this.typeIds[t]]],s=i.mode===Ei.Dense?this.valueOffsets[t]:t;return n.getValid(s)}if(this.nullable&&this.nullCount>0){const i=this.offset+t;return(this.nullBitmap[i>>3]&1<>3;(!s||s.byteLength<=c)&&(s=new Uint8Array((o+a+63&-64)>>3).fill(255),this.nullCount>0?(s.set(Ih(o,a,this.nullBitmap),0),Object.assign(this,{nullBitmap:s})):Object.assign(this,{nullBitmap:s,_nullCount:0}));const h=s[c];i=(h&u)!==0,s[c]=e?h|u:h&~u}return i!==!!e&&(this._nullCount=this.nullCount+(e?-1:1)),e}clone(t=this.type,e=this.offset,i=this.length,n=this._nullCount,s=this,o=this.children){return new ia(t,e,i,n,s,o,this.dictionary)}slice(t,e){const{stride:i,typeId:n,children:s}=this,o=+(this._nullCount===0)-1,a=n===16?i:1,l=this._sliceBuffers(t,e,i,n);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===W.Null)return this.clone(this.type,0,t,0);const{length:e,nullCount:i}=this,n=new Uint8Array((t+63&-64)>>3).fill(255,0,e>>3);n[e>>3]=(1<0&&n.set(Ih(this.offset,e,this.nullBitmap),0);const s=this.buffers;return s[ji.VALIDITY]=n,this.clone(this.type,0,t,i+(t-e),s)}_sliceBuffers(t,e,i,n){let s;const{buffers:o}=this;return(s=o[ji.TYPE])&&(o[ji.TYPE]=s.subarray(t,t+e)),(s=o[ji.OFFSET])&&(o[ji.OFFSET]=s.subarray(t,t+e+1))||(s=o[ji.DATA])&&(o[ji.DATA]=n===6?s:s.subarray(i*t,i*(t+e))),o}_sliceChildren(t,e,i){return t.map(n=>n.slice(e,i))}}ia.prototype.children=Object.freeze([]);class dm{constructor(t=0,e){this.numChunks=t,this.getChunkIterator=e,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndext.nullable)}function RP(r){return r.reduce((t,e)=>t+e.nullCount,0)}function NP(r){return r.reduce((t,e,i)=>(t[i+1]=t[i]+e.length,t),new Uint32Array(r.length+1))}function LP(r,t,e,i){const n=[];for(let s=-1,o=r.length;++s=i)break;if(e>=l+u)continue;if(l>=e&&l+u<=i){n.push(a);continue}const c=Math.max(0,e-l),h=Math.min(i-l,u);n.push(a.slice(c,h-c))}return n.length===0&&n.push(r[0].slice(0,0)),n}function kf(r,t,e,i){let n=0,s=0,o=t.length-1;do{if(n>=o-1)return e0?0:-1}function zP(r,t){const{nullBitmap:e}=r;if(!e||r.nullCount<=0)return-1;let i=0;for(const n of new uu(e,r.offset+(t||0),r.length,e,Bf)){if(!n)return i;++i}return-1}function Qt(r,t,e){if(t===void 0)return-1;if(t===null)switch(r.typeId){case W.Union:break;case W.Dictionary:break;default:return zP(r,e)}const i=qr.getVisitFn(r),n=fs(t);for(let s=(e||0)-1,o=r.length;++s{const n=r.data[i];return n.values.subarray(0,n.length)[Symbol.iterator]()});let e=0;return new dm(r.data.length,i=>{const s=r.data[i].length,o=r.slice(e,e+s);return e+=s,new jP(o)})}class jP{constructor(t){this.vector=t,this.index=0}next(){return this.indexa.data):t;if(s.length===0||s.some(a=>!(a instanceof ia)))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}=hw[o.typeId],c=s[0];this.isValid=h=>lw(c,h),this.get=h=>a(c,h),this.set=(h,p)=>l(c,h,p),this.indexOf=h=>u(c,h),this._offsets=[0,c.length];break}default:Object.setPrototypeOf(this,fw[o.typeId]),this._offsets=NP(s);break}this.data=s,this.type=o,this.stride=lb(o),this.numChildren=(n=(i=o.children)===null||i===void 0?void 0:i.length)!==null&&n!==void 0?n:0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce((t,e)=>t+e.byteLength,0)}get nullable(){return DP(this.data)}get nullCount(){return RP(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${W[this.type.typeId]}Vector`}isValid(t){return!1}get(t){return null}at(t){return this.get(nw(t,this.length))}set(t,e){}indexOf(t,e){return-1}includes(t,e){return this.indexOf(t,e)>-1}[Symbol.iterator](){return $P.visit(this)}concat(...t){return new Qe(this.data.concat(t.flatMap(e=>e.data).flat(Number.POSITIVE_INFINITY)))}slice(t,e){return new Qe(iw(this,t,e,({data:i,_offsets:n},s,o)=>LP(i,n,s,o)))}toJSON(){return[...this]}toArray(){const{type:t,data:e,length:i,stride:n,ArrayType:s}=this;switch(t.typeId){case W.Int:case W.Float:case W.Decimal:case W.Time:case W.Timestamp:switch(e.length){case 0:return new s;case 1:return e[0].values.subarray(0,i*n);default:return e.reduce((o,{values:a,length:l})=>(o.array.set(a.subarray(0,l*n),o.offset),o.offset+=l*n,o),{array:new s(i*n),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(i=>i.name===t))}getChildAt(t){return t>-1&&te[t])):null}get isMemoized(){return Et.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(Et.isDictionary(this.type)){const t=new zl(this.data[0].dictionary),e=this.data.map(i=>{const n=i.clone();return n.dictionary=t,n});return new Qe(e)}return new zl(this)}unmemoize(){if(Et.isDictionary(this.type)&&this.isMemoized){const t=this.data[0].dictionary.unmemoize(),e=this.data.map(i=>{const n=i.clone();return n.dictionary=t,n});return new Qe(e)}return this}}cw=Symbol.toStringTag;Qe[cw]=(r=>{r.type=Et.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(W).map(e=>W[e]).filter(e=>typeof e=="number"&&e!==W.NONE);for(const e of t){const i=qr.getVisitFnByTypeId(e),n=Ci.getVisitFnByTypeId(e),s=mm.getVisitFnByTypeId(e);hw[e]={get:i,set:n,indexOf:s},fw[e]=Object.create(r,{isValid:{value:pm(lw)},get:{value:pm(qr.getVisitFnByTypeId(e))},set:{value:BP(Ci.getVisitFnByTypeId(e))},indexOf:{value:kP(mm.getVisitFnByTypeId(e))}})}return"Vector"})(Qe.prototype);class zl extends Qe{constructor(t){super(t.data);const e=this.get,i=this.set,n=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){i.call(this,o,a),s[o]=a}}),Object.defineProperty(this,"slice",{value:(o,a)=>new zl(n.call(this,o,a))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new Qe(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}}const VP=65536;function ks(r){return r<0&&(r=4294967295+r+1),`0x${r.toString(16)}`}const oo=8,Uf=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8];class zf{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]),i=new Uint32Array([t.buffer[1]>>>16,t.buffer[1]&65535,t.buffer[0]>>>16,t.buffer[0]&65535]);let n=e[3]*i[3];this.buffer[0]=n&65535;let s=n>>>16;return n=e[2]*i[3],s+=n,n=e[3]*i[2]>>>0,s+=n,this.buffer[0]+=s<<16,this.buffer[1]=s>>>0>>16,this.buffer[1]+=e[1]*i[3]+e[2]*i[2]+e[3]*i[1],this.buffer[1]+=e[0]*i[3]+e[1]*i[2]+e[2]*i[1]+e[3]*i[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`${ks(this.buffer[3])} ${ks(this.buffer[2])} ${ks(this.buffer[1])} ${ks(this.buffer[0])}`}static multiply(t,e){return new hi(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new hi(new Uint32Array(t.buffer)).plus(e)}static from(t,e=new Uint32Array(4)){return hi.fromString(typeof t=="string"?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(4)){return hi.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(4)){const i=t.startsWith("-"),n=t.length,s=new hi(e);for(let o=i?1:0;o>BigInt(32))):o+=2}return n}function YP(r){const t=r.length,e=new Array(t/2);for(let i=0,n=0;i>>0);i[s++]={months:r[n],days:r[n+1],nanoseconds:t?`${o}`:o}}return i}const qP=Object.freeze(Object.defineProperty({__proto__:null,toIntervalDayTimeInt32Array:WP,toIntervalDayTimeObjects:YP,toIntervalMonthDayNanoInt32Array:HP,toIntervalMonthDayNanoObjects:XP},Symbol.toStringTag,{value:"Module"}));class Rt extends ae{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((i,n)=>this.compareFields(i,e[n]))}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 lr(r,t){return t instanceof r.constructor}function ds(r,t){return r===t||lr(r,t)}function Ki(r,t){return r===t||lr(r,t)&&r.bitWidth===t.bitWidth&&r.isSigned===t.isSigned}function cu(r,t){return r===t||lr(r,t)&&r.precision===t.precision}function QP(r,t){return r===t||lr(r,t)&&r.byteWidth===t.byteWidth}function jf(r,t){return r===t||lr(r,t)&&r.unit===t.unit}function ma(r,t){return r===t||lr(r,t)&&r.unit===t.unit&&r.timezone===t.timezone}function ya(r,t){return r===t||lr(r,t)&&r.unit===t.unit&&r.bitWidth===t.bitWidth}function KP(r,t){return r===t||lr(r,t)&&r.children.length===t.children.length&&Ai.compareManyFields(r.children,t.children)}function ZP(r,t){return r===t||lr(r,t)&&r.children.length===t.children.length&&Ai.compareManyFields(r.children,t.children)}function $f(r,t){return r===t||lr(r,t)&&r.mode===t.mode&&r.typeIds.every((e,i)=>e===t.typeIds[i])&&Ai.compareManyFields(r.children,t.children)}function JP(r,t){return r===t||lr(r,t)&&r.id===t.id&&r.isOrdered===t.isOrdered&&Ai.visit(r.indices,t.indices)&&Ai.visit(r.dictionary,t.dictionary)}function hu(r,t){return r===t||lr(r,t)&&r.unit===t.unit}function ga(r,t){return r===t||lr(r,t)&&r.unit===t.unit}function tM(r,t){return r===t||lr(r,t)&&r.listSize===t.listSize&&r.children.length===t.children.length&&Ai.compareManyFields(r.children,t.children)}function eM(r,t){return r===t||lr(r,t)&&r.keysSorted===t.keysSorted&&r.children.length===t.children.length&&Ai.compareManyFields(r.children,t.children)}Rt.prototype.visitNull=ds;Rt.prototype.visitBool=ds;Rt.prototype.visitInt=Ki;Rt.prototype.visitInt8=Ki;Rt.prototype.visitInt16=Ki;Rt.prototype.visitInt32=Ki;Rt.prototype.visitInt64=Ki;Rt.prototype.visitUint8=Ki;Rt.prototype.visitUint16=Ki;Rt.prototype.visitUint32=Ki;Rt.prototype.visitUint64=Ki;Rt.prototype.visitFloat=cu;Rt.prototype.visitFloat16=cu;Rt.prototype.visitFloat32=cu;Rt.prototype.visitFloat64=cu;Rt.prototype.visitUtf8=ds;Rt.prototype.visitLargeUtf8=ds;Rt.prototype.visitBinary=ds;Rt.prototype.visitLargeBinary=ds;Rt.prototype.visitFixedSizeBinary=QP;Rt.prototype.visitDate=jf;Rt.prototype.visitDateDay=jf;Rt.prototype.visitDateMillisecond=jf;Rt.prototype.visitTimestamp=ma;Rt.prototype.visitTimestampSecond=ma;Rt.prototype.visitTimestampMillisecond=ma;Rt.prototype.visitTimestampMicrosecond=ma;Rt.prototype.visitTimestampNanosecond=ma;Rt.prototype.visitTime=ya;Rt.prototype.visitTimeSecond=ya;Rt.prototype.visitTimeMillisecond=ya;Rt.prototype.visitTimeMicrosecond=ya;Rt.prototype.visitTimeNanosecond=ya;Rt.prototype.visitDecimal=ds;Rt.prototype.visitList=KP;Rt.prototype.visitStruct=ZP;Rt.prototype.visitUnion=$f;Rt.prototype.visitDenseUnion=$f;Rt.prototype.visitSparseUnion=$f;Rt.prototype.visitDictionary=JP;Rt.prototype.visitInterval=hu;Rt.prototype.visitIntervalDayTime=hu;Rt.prototype.visitIntervalYearMonth=hu;Rt.prototype.visitIntervalMonthDayNano=hu;Rt.prototype.visitDuration=ga;Rt.prototype.visitDurationSecond=ga;Rt.prototype.visitDurationMillisecond=ga;Rt.prototype.visitDurationMicrosecond=ga;Rt.prototype.visitDurationNanosecond=ga;Rt.prototype.visitFixedSizeList=tM;Rt.prototype.visitMap=eM;const Ai=new Rt;function rM(r,t){return Ai.compareSchemas(r,t)}function iM(r,t){return Ai.compareFields(r,t)}function nM(r,t){return Ai.visit(r,t)}const ym=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},OF),GP),PP),MF),TF),OP),EF),qP),{compareSchemas:rM,compareFields:iM,compareTypes:nM}),dw=6048e5,sM=864e5,gm=Symbol.for("constructDateFrom");function Wi(r,t){return typeof r=="function"?r(t):r&&typeof r=="object"&&gm in r?r[gm](t):r instanceof Date?new r.constructor(t):new Date(t)}function Qr(r,t){return Wi(t||r,r)}let oM={};function fu(){return oM}function na(r,t){var a,l,u,c;const e=fu(),i=(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,n=Qr(r,t==null?void 0:t.in),s=n.getDay(),o=(s=s.getTime()?i+1:e.getTime()>=a.getTime()?i:i-1}function vm(r){const t=Qr(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 aM(r,...t){const e=Wi.bind(null,t.find(i=>typeof i=="object"));return t.map(e)}function _m(r,t){const e=Qr(r,t==null?void 0:t.in);return e.setHours(0,0,0,0),e}function lM(r,t,e){const[i,n]=aM(e==null?void 0:e.in,r,t),s=_m(i),o=_m(n),a=+s-vm(s),l=+o-vm(o);return Math.round((a-l)/sM)}function uM(r,t){const e=pw(r,t),i=Wi(r,0);return i.setFullYear(e,0,4),i.setHours(0,0,0,0),jl(i)}function cM(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function hM(r){return!(!cM(r)&&typeof r!="number"||isNaN(+Qr(r)))}function fM(r,t){const e=Qr(r,t==null?void 0:t.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const dM={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"}},pM=(r,t,e)=>{let i;const n=dM[r];return typeof n=="string"?i=n:t===1?i=n.one:i=n.other.replace("{{count}}",t.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+i:i+" ago":i};function ac(r){return(t={})=>{const e=t.width?String(t.width):r.defaultWidth;return r.formats[e]||r.formats[r.defaultWidth]}}const mM={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},yM={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},gM={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},vM={date:ac({formats:mM,defaultWidth:"full"}),time:ac({formats:yM,defaultWidth:"full"}),dateTime:ac({formats:gM,defaultWidth:"full"})},_M={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},bM=(r,t,e,i)=>_M[r];function bo(r){return(t,e)=>{const i=e!=null&&e.context?String(e.context):"standalone";let n;if(i==="formatting"&&r.formattingValues){const o=r.defaultFormattingWidth||r.defaultWidth,a=e!=null&&e.width?String(e.width):o;n=r.formattingValues[a]||r.formattingValues[o]}else{const o=r.defaultWidth,a=e!=null&&e.width?String(e.width):r.defaultWidth;n=r.values[a]||r.values[o]}const s=r.argumentCallback?r.argumentCallback(t):t;return n[s]}}const wM={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},xM={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},SM={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"]},TM={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"]},IM={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"}},EM={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"}},CM=(r,t)=>{const e=Number(r),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},AM={ordinalNumber:CM,era:bo({values:wM,defaultWidth:"wide"}),quarter:bo({values:xM,defaultWidth:"wide",argumentCallback:r=>r-1}),month:bo({values:SM,defaultWidth:"wide"}),day:bo({values:TM,defaultWidth:"wide"}),dayPeriod:bo({values:IM,defaultWidth:"wide",formattingValues:EM,defaultFormattingWidth:"wide"})};function wo(r){return(t,e={})=>{const i=e.width,n=i&&r.matchPatterns[i]||r.matchPatterns[r.defaultMatchWidth],s=t.match(n);if(!s)return null;const o=s[0],a=i&&r.parsePatterns[i]||r.parsePatterns[r.defaultParseWidth],l=Array.isArray(a)?FM(a,h=>h.test(o)):OM(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 OM(r,t){for(const e in r)if(Object.prototype.hasOwnProperty.call(r,e)&&t(r[e]))return e}function FM(r,t){for(let e=0;e{const i=t.match(r.matchPattern);if(!i)return null;const n=i[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(n.length);return{value:o,rest:a}}}const MM=/^(\d+)(th|st|nd|rd)?/i,DM=/\d+/i,RM={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},NM={any:[/^b/i,/^(a|c)/i]},LM={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},BM={any:[/1/i,/2/i,/3/i,/4/i]},kM={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},UM={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]},zM={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},jM={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]},$M={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},VM={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}},GM={ordinalNumber:PM({matchPattern:MM,parsePattern:DM,valueCallback:r=>parseInt(r,10)}),era:wo({matchPatterns:RM,defaultMatchWidth:"wide",parsePatterns:NM,defaultParseWidth:"any"}),quarter:wo({matchPatterns:LM,defaultMatchWidth:"wide",parsePatterns:BM,defaultParseWidth:"any",valueCallback:r=>r+1}),month:wo({matchPatterns:kM,defaultMatchWidth:"wide",parsePatterns:UM,defaultParseWidth:"any"}),day:wo({matchPatterns:zM,defaultMatchWidth:"wide",parsePatterns:jM,defaultParseWidth:"any"}),dayPeriod:wo({matchPatterns:$M,defaultMatchWidth:"any",parsePatterns:VM,defaultParseWidth:"any"})},WM={code:"en-US",formatDistance:pM,formatLong:vM,formatRelative:bM,localize:AM,match:GM,options:{weekStartsOn:0,firstWeekContainsDate:1}};function HM(r,t){const e=Qr(r,t==null?void 0:t.in);return lM(e,fM(e))+1}function YM(r,t){const e=Qr(r,t==null?void 0:t.in),i=+jl(e)-+uM(e);return Math.round(i/dw)+1}function mw(r,t){var c,h,p,f;const e=Qr(r,t==null?void 0:t.in),i=e.getFullYear(),n=fu(),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)??n.firstWeekContainsDate??((f=(p=n.locale)==null?void 0:p.options)==null?void 0:f.firstWeekContainsDate)??1,o=Wi((t==null?void 0:t.in)||r,0);o.setFullYear(i+1,0,s),o.setHours(0,0,0,0);const a=na(o,t),l=Wi((t==null?void 0:t.in)||r,0);l.setFullYear(i,0,s),l.setHours(0,0,0,0);const u=na(l,t);return+e>=+a?i+1:+e>=+u?i:i-1}function XM(r,t){var a,l,u,c;const e=fu(),i=(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,n=mw(r,t),s=Wi((t==null?void 0:t.in)||r,0);return s.setFullYear(n,0,i),s.setHours(0,0,0,0),na(s,t)}function qM(r,t){const e=Qr(r,t==null?void 0:t.in),i=+na(e,t)-+XM(e,t);return Math.round(i/dw)+1}function ve(r,t){const e=r<0?"-":"",i=Math.abs(r).toString().padStart(t,"0");return e+i}const nn={y(r,t){const e=r.getFullYear(),i=e>0?e:1-e;return ve(t==="yy"?i%100:i,t.length)},M(r,t){const e=r.getMonth();return t==="M"?String(e+1):ve(e+1,2)},d(r,t){return ve(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 ve(r.getHours()%12||12,t.length)},H(r,t){return ve(r.getHours(),t.length)},m(r,t){return ve(r.getMinutes(),t.length)},s(r,t){return ve(r.getSeconds(),t.length)},S(r,t){const e=t.length,i=r.getMilliseconds(),n=Math.trunc(i*Math.pow(10,e-3));return ve(n,t.length)}},ws={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},bm={G:function(r,t,e){const i=r.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(i,{width:"abbreviated"});case"GGGGG":return e.era(i,{width:"narrow"});case"GGGG":default:return e.era(i,{width:"wide"})}},y:function(r,t,e){if(t==="yo"){const i=r.getFullYear(),n=i>0?i:1-i;return e.ordinalNumber(n,{unit:"year"})}return nn.y(r,t)},Y:function(r,t,e,i){const n=mw(r,i),s=n>0?n:1-n;if(t==="YY"){const o=s%100;return ve(o,2)}return t==="Yo"?e.ordinalNumber(s,{unit:"year"}):ve(s,t.length)},R:function(r,t){const e=pw(r);return ve(e,t.length)},u:function(r,t){const e=r.getFullYear();return ve(e,t.length)},Q:function(r,t,e){const i=Math.ceil((r.getMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return ve(i,2);case"Qo":return e.ordinalNumber(i,{unit:"quarter"});case"QQQ":return e.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(i,{width:"wide",context:"formatting"})}},q:function(r,t,e){const i=Math.ceil((r.getMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return ve(i,2);case"qo":return e.ordinalNumber(i,{unit:"quarter"});case"qqq":return e.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(i,{width:"wide",context:"standalone"})}},M:function(r,t,e){const i=r.getMonth();switch(t){case"M":case"MM":return nn.M(r,t);case"Mo":return e.ordinalNumber(i+1,{unit:"month"});case"MMM":return e.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(i,{width:"wide",context:"formatting"})}},L:function(r,t,e){const i=r.getMonth();switch(t){case"L":return String(i+1);case"LL":return ve(i+1,2);case"Lo":return e.ordinalNumber(i+1,{unit:"month"});case"LLL":return e.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(i,{width:"wide",context:"standalone"})}},w:function(r,t,e,i){const n=qM(r,i);return t==="wo"?e.ordinalNumber(n,{unit:"week"}):ve(n,t.length)},I:function(r,t,e){const i=YM(r);return t==="Io"?e.ordinalNumber(i,{unit:"week"}):ve(i,t.length)},d:function(r,t,e){return t==="do"?e.ordinalNumber(r.getDate(),{unit:"date"}):nn.d(r,t)},D:function(r,t,e){const i=HM(r);return t==="Do"?e.ordinalNumber(i,{unit:"dayOfYear"}):ve(i,t.length)},E:function(r,t,e){const i=r.getDay();switch(t){case"E":case"EE":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"})}},e:function(r,t,e,i){const n=r.getDay(),s=(n-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return ve(s,2);case"eo":return e.ordinalNumber(s,{unit:"day"});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"})}},c:function(r,t,e,i){const n=r.getDay(),s=(n-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return ve(s,t.length);case"co":return e.ordinalNumber(s,{unit:"day"});case"ccc":return e.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(n,{width:"narrow",context:"standalone"});case"cccccc":return e.day(n,{width:"short",context:"standalone"});case"cccc":default:return e.day(n,{width:"wide",context:"standalone"})}},i:function(r,t,e){const i=r.getDay(),n=i===0?7:i;switch(t){case"i":return String(n);case"ii":return ve(n,t.length);case"io":return e.ordinalNumber(n,{unit:"day"});case"iii":return e.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(i,{width:"short",context:"formatting"});case"iiii":default:return e.day(i,{width:"wide",context:"formatting"})}},a:function(r,t,e){const n=r.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(r,t,e){const i=r.getHours();let n;switch(i===12?n=ws.noon:i===0?n=ws.midnight:n=i/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(r,t,e){const i=r.getHours();let n;switch(i>=17?n=ws.evening:i>=12?n=ws.afternoon:i>=4?n=ws.morning:n=ws.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(r,t,e){if(t==="ho"){let i=r.getHours()%12;return i===0&&(i=12),e.ordinalNumber(i,{unit:"hour"})}return nn.h(r,t)},H:function(r,t,e){return t==="Ho"?e.ordinalNumber(r.getHours(),{unit:"hour"}):nn.H(r,t)},K:function(r,t,e){const i=r.getHours()%12;return t==="Ko"?e.ordinalNumber(i,{unit:"hour"}):ve(i,t.length)},k:function(r,t,e){let i=r.getHours();return i===0&&(i=24),t==="ko"?e.ordinalNumber(i,{unit:"hour"}):ve(i,t.length)},m:function(r,t,e){return t==="mo"?e.ordinalNumber(r.getMinutes(),{unit:"minute"}):nn.m(r,t)},s:function(r,t,e){return t==="so"?e.ordinalNumber(r.getSeconds(),{unit:"second"}):nn.s(r,t)},S:function(r,t){return nn.S(r,t)},X:function(r,t,e){const i=r.getTimezoneOffset();if(i===0)return"Z";switch(t){case"X":return xm(i);case"XXXX":case"XX":return Wn(i);case"XXXXX":case"XXX":default:return Wn(i,":")}},x:function(r,t,e){const i=r.getTimezoneOffset();switch(t){case"x":return xm(i);case"xxxx":case"xx":return Wn(i);case"xxxxx":case"xxx":default:return Wn(i,":")}},O:function(r,t,e){const i=r.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+wm(i,":");case"OOOO":default:return"GMT"+Wn(i,":")}},z:function(r,t,e){const i=r.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+wm(i,":");case"zzzz":default:return"GMT"+Wn(i,":")}},t:function(r,t,e){const i=Math.trunc(+r/1e3);return ve(i,t.length)},T:function(r,t,e){return ve(+r,t.length)}};function wm(r,t=""){const e=r>0?"-":"+",i=Math.abs(r),n=Math.trunc(i/60),s=i%60;return s===0?e+String(n):e+String(n)+t+ve(s,2)}function xm(r,t){return r%60===0?(r>0?"-":"+")+ve(Math.abs(r)/60,2):Wn(r,t)}function Wn(r,t=""){const e=r>0?"-":"+",i=Math.abs(r),n=ve(Math.trunc(i/60),2),s=ve(i%60,2);return e+n+t+s}const Sm=(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"})}},yw=(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"})}},QM=(r,t)=>{const e=r.match(/(P+)(p+)?/)||[],i=e[1],n=e[2];if(!n)return Sm(r,t);let s;switch(i){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}}",Sm(i,t)).replace("{{time}}",yw(n,t))},KM={p:yw,P:QM},ZM=/^D+$/,JM=/^Y+$/,tD=["D","DD","YY","YYYY"];function eD(r){return ZM.test(r)}function rD(r){return JM.test(r)}function iD(r,t,e){const i=nD(r,t,e);if(console.warn(i),tD.includes(r))throw new RangeError(i)}function nD(r,t,e){const i=r[0]==="Y"?"years":"days of the month";return`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${t}\`) for formatting ${i} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const sD=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,oD=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,aD=/^'([^]*?)'?$/,lD=/''/g,uD=/[a-zA-Z]/;function gw(r,t,e){var c,h,p,f;const i=fu(),n=i.locale??WM,s=i.firstWeekContainsDate??((h=(c=i.locale)==null?void 0:c.options)==null?void 0:h.firstWeekContainsDate)??1,o=i.weekStartsOn??((f=(p=i.locale)==null?void 0:p.options)==null?void 0:f.weekStartsOn)??0,a=Qr(r,e==null?void 0:e.in);if(!hM(a))throw new RangeError("Invalid time value");let l=t.match(oD).map(y=>{const g=y[0];if(g==="p"||g==="P"){const d=KM[g];return d(y,n.formatLong)}return y}).join("").match(sD).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const g=y[0];if(g==="'")return{isToken:!1,value:cD(y)};if(bm[g])return{isToken:!0,value:y};if(g.match(uD))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:y}});n.localize.preprocessor&&(l=n.localize.preprocessor(a,l));const u={firstWeekContainsDate:s,weekStartsOn:o,locale:n};return l.map(y=>{if(!y.isToken)return y.value;const g=y.value;(rD(g)||eD(g))&&iD(g,t,String(r));const d=bm[g[0]];return d(a,g,n.localize,u)}).join("")}function cD(r){const t=r.match(aD);return t?t[1].replace(lD,"'"):r}function hD(r,t){return Qr(r*1e3,t==null?void 0:t.in)}function fD(r,t){const e=dD(t)?new t(0):Wi(t,0);return e.setFullYear(r.getFullYear(),r.getMonth(),r.getDate()),e.setHours(r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()),e}function dD(r){var t;return typeof r=="function"&&((t=r.prototype)==null?void 0:t.constructor)===r}function pD(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 gr(r){return r==null}function mD(r){return r!=null}async function Eh(){if(typeof window<"u"&&window!==null)return"browser";try{const r=await cn(()=>import("./__vite-browser-external-FmFgRqLi.js"),[]);return typeof r<"u"&&r.versions!=null&&r.versions.node!=null?"node":"unknown"}catch{return"unknown"}}function yD(r){return gr(r)?!1:Et.isInt(r.type)&&!vw(r)||gD(r)}function gD(r){return gr(r)?!1:Et.isInt(r.type)&&r.type.isSigned===!1}function vD(r){return gr(r)?!1:Et.isFloat(r.type)??!1}function _D(r){return gr(r)?!1:Et.isDecimal(r.type)}function bD(r){return gr(r)?!1:Et.isBool(r.type)}function wD(r){return gr(r)?!1:Et.isDuration(r.type)}function vw(r){return gr(r)?!1:Et.isInt(r.type)&&r.metadata.get("ARROW:extension:name")==="period"}function xD(r){return gr(r)?!1:Et.isTimestamp(r.type)}function SD(r){return gr(r)?!1:Et.isDate(r.type)}function TD(r){return gr(r)?!1:Et.isTime(r.type)}function ID(r){return gr(r)?!1:Et.isList(r.type)||Et.isFixedSizeList(r.type)}function ED(r){return gr(r)?!1:Et.isStruct(r.type)||Et.isMap(r.type)}function CD(r){return gr(r)?!1:Et.isStruct(r.type)&&r.metadata.get("ARROW:extension:name")==="interval"||Et.isInterval(r.type)}function AD(r,t){let e;if(t===Jt.MILLISECOND)e=1e3;else if(t===Jt.MICROSECOND)e=1e3*1e3;else if(t===Jt.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 OD(r,t){var i;const e=AD(r,((i=t==null?void 0:t.type)==null?void 0:i.unit)??Jt.SECOND);return hD(e)}function FD(r,t){const e=OD(r,t);return gw(e,e.getMilliseconds()===0?"HH:mm:ss":"HH:mm:ss.SSS")}function PD(r){const t="yyyy-MM-dd";return r instanceof Date||typeof r=="number"&&Number.isFinite(r)?gw(r,t):(console.warn(`Unsupported date value: ${r}`),String(r))}function MD(r,t){var n;if(!(r instanceof Date||typeof r=="number"&&Number.isFinite(r)))return console.warn(`Unsupported datetime value: ${r}`),null;let e;const i=(n=t==null?void 0:t.type)==null?void 0:n.timezone;return typeof r=="number"?i?e=new Cr(r,i):e=new Cr(r):i?e=new Cr(r,i):e=new Cr(r),fD(e,Date)}function DD(r,t){var a;const e=((a=t==null?void 0:t.type)==null?void 0:a.scale)||0;let i=ym.bigNumToString(new ym.BN(r)).padStart(e,"0");if(e===0)return i;let n="";i.startsWith("-")&&(n="-",i=i.slice(1));const s=i.slice(0,-e)||"0",o=pD(i.slice(-e),"0")||"";return`${n}${s}${o?`.${o}`:""}`}function RD(r){const t=r[0],e=r[1],i=[];return t!==0&&i.push(`${t} year${t>1?"s":""}`),e!==0&&i.push(`${e} month${e>1?"s":""}`),i.length?i.join(" "):"0 months"}function ND(r,t){var i,n,s,o;if(Et.isInterval(t==null?void 0:t.type))return RD(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"?"]":")",p=Ch(u.left,(n=(i=t.type)==null?void 0:i.children)==null?void 0:n[0]),f=Ch(u.right,(o=(s=t.type)==null?void 0:s.children)==null?void 0:o[1]);return`${c+p}, ${f+h}`}return String(r)}function LD(r,t){return(t==null?void 0:t.type)instanceof Sh?JSON.parse(JSON.stringify(r,(e,i)=>{if(mD(i))return typeof i=="bigint"?Number(i):i})):JSON.parse(JSON.stringify(r,(e,i)=>typeof i=="bigint"?Number(i):i))}function Ch(r,t){if(gr(r))return null;const e=r instanceof Date||Number.isFinite(r);if(e&&SD(t))return PD(r);if(typeof r=="bigint"&&TD(t))return FD(Number(r),t);if(e&&xD(t))return MD(r,t);if(vw(t))throw new Error("Period type is not supported yet");if(CD(t))return ND(r,t);if(wD(t))throw new Error("Duration type is not supported yet");return _D(t)?DD(r,t):vD(t)&&Number.isFinite(r)||yD(t)?r:ED(t)||ID(t)?LD(r,t):bD(t)?!!r:String(r)}function Tm(r){return((r.toArray()||[]).map(i=>i.toJSON())||[]).map(i=>(r.schema.fields.forEach(n=>i[n.name]=Ch(i[n.name],n)),i))}var sa=(r=>(r.ORIGIN_PRIVATE_FS="origin-private-fs",r.NODE_FS="node-fs",r))(sa||{});async function _w(r){const t=Bx(r,{logger:!1});let e,i;const n=await Eh();if(n==="browser"){if(typeof t.bundles>"u"){const{getBundles:l}=await cn(async()=>{const{getBundles:u}=await import("./default-browser-BrgSDbLD.js");return{getBundles:u}},[]);t.bundles=await l()}i=await zp(await t.bundles),e=new Worker(i.mainWorker)}else if(n==="node"){if(typeof t.bundles>"u"){const{getBundles:c}=await cn(async()=>{const{getBundles:h}=await import("./default-node-BWr47-4Z.js");return{getBundles:h}},__vite__mapDeps([0,1,2]));t.bundles=await c()}i=await zp(await t.bundles);let l=i.mainWorker;l.startsWith("/@fs/")&&(l=l.replace("/@fs/","file://"));const u=await cn(()=>import("./index-Cp8iQ_hy.js"),[]);e=new u.default(l,{type:"module"})}else throw new Error(`Unsupported environment: ${n}`);let s;t.logger===!0?s=new P0:t.logger===!1?s=new b2:s=t.logger;const o=new C2(s,e);if(await o.instantiate(i.mainModule,i.pthreadWorker),t.storage)switch(t.storage.type){case sa.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 sa.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 f=await a.query(l);return Tm(f)}const c=await a.prepare(l),h=await c.query(...u),p=Tm(h);return c.close(),p},close:async()=>{await a.close(),await o.terminate(),await e.terminate()}}}async function BD(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 kD(r,t,e){await(await r).conn.send(`SAVEPOINT ${t}`);try{const i=await e(r);return await(await r).conn.send(`RELEASE SAVEPOINT ${t}`),i}catch(i){throw await(await r).conn.send(`ROLLBACK TO SAVEPOINT ${t}`),i}}const xt=Symbol.for("drizzle:entityKind");function at(r,t){if(!r||typeof r!="object")return!1;if(r instanceof t)return!0;if(!Object.prototype.hasOwnProperty.call(t,xt))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(xt in e&&e[xt]===t[xt])return!0;e=Object.getPrototypeOf(e)}return!1}var Nm;Nm=xt;class Ke{constructor(t,e){$(this,"name");$(this,"keyAsName");$(this,"primary");$(this,"notNull");$(this,"default");$(this,"defaultFn");$(this,"onUpdateFn");$(this,"hasDefault");$(this,"isUnique");$(this,"uniqueName");$(this,"uniqueType");$(this,"dataType");$(this,"columnType");$(this,"enumValues");$(this,"generated");$(this,"generatedIdentity");$(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"}}$(Ke,Nm,"Column");const Qs=Symbol.for("drizzle:Name");function UD(r,t){return`${r[Qs]}_${t.join("_")}_unique`}var Lm,Bm;class Fr extends(Bm=Ke,Lm=xt,Bm){constructor(t,e){e.uniqueName||(e.uniqueName=UD(t,[e.name])),super(t,e),this.table=t}}$(Fr,Lm,"PgColumn");const Im=Symbol.for("drizzle:isPgEnum");function zD(r){return!!r&&typeof r=="function"&&Im in r&&r[Im]===!0}var km;km=xt;class dr{constructor(t,e,i,n=!1,s=[]){this._={brand:"Subquery",sql:t,selectedFields:e,alias:i,isWith:n,usedTables:s}}}$(dr,km,"Subquery");var Um,zm;class Vf extends(zm=dr,Um=xt,zm){}$(Vf,Um,"WithSubquery");const Mr={startActiveSpan(r,t){return t()}},He=Symbol.for("drizzle:ViewBaseConfig"),Ks=Symbol.for("drizzle:Schema"),Ah=Symbol.for("drizzle:Columns"),Em=Symbol.for("drizzle:ExtraConfigColumns"),lc=Symbol.for("drizzle:OriginalName"),uc=Symbol.for("drizzle:BaseName"),$l=Symbol.for("drizzle:IsAlias"),Cm=Symbol.for("drizzle:ExtraConfigBuilder"),jD=Symbol.for("drizzle:IsDrizzleTable");var jm,$m,Vm,Gm,Wm,Hm,Ym,Xm,qm,Qm;Qm=xt,qm=Qs,Xm=lc,Ym=Ks,Hm=Ah,Wm=Em,Gm=uc,Vm=$l,$m=jD,jm=Cm;class St{constructor(t,e,i){$(this,qm);$(this,Xm);$(this,Ym);$(this,Hm);$(this,Wm);$(this,Gm);$(this,Vm,!1);$(this,$m,!0);$(this,jm);this[Qs]=this[lc]=t,this[Ks]=e,this[uc]=i}}$(St,Qm,"Table"),$(St,"Symbol",{Name:Qs,Schema:Ks,OriginalName:lc,Columns:Ah,ExtraConfigColumns:Em,BaseName:uc,IsAlias:$l,ExtraConfigBuilder:Cm});function Kn(r){return r[Qs]}function oa(r){return`${r[Ks]??"public"}.${r[Qs]}`}function bw(r){return r!=null&&typeof r.getSQL=="function"}function $D(r){var e;const t={sql:"",params:[]};for(const i of r)t.sql+=i.sql,t.params.push(...i.params),(e=i.typings)!=null&&e.length&&(t.typings||(t.typings=[]),t.typings.push(...i.typings));return t}var Km;Km=xt;class Ye{constructor(t){$(this,"value");this.value=Array.isArray(t)?t:[t]}getSQL(){return new Ft([this])}}$(Ye,Km,"StringChunk");var Zm;Zm=xt;const Xn=class Xn{constructor(t){$(this,"decoder",ww);$(this,"shouldInlineParams",!1);$(this,"usedTables",[]);this.queryChunks=t;for(const e of t)if(at(e,St)){const i=e[St.Symbol.Schema];this.usedTables.push(i===void 0?e[St.Symbol.Name]:i+"."+e[St.Symbol.Name])}}append(t){return this.queryChunks.push(...t.queryChunks),this}toQuery(t){return Mr.startActiveSpan("drizzle.buildSQL",e=>{const i=this.buildQueryFromSourceParams(this.queryChunks,t);return e==null||e.setAttributes({"drizzle.query.text":i.sql,"drizzle.query.params":JSON.stringify(i.params)}),i})}buildQueryFromSourceParams(t,e){const i=Object.assign({},e,{inlineParams:e.inlineParams||this.shouldInlineParams,paramStartIndex:e.paramStartIndex||{value:0}}),{casing:n,escapeName:s,escapeParam:o,prepareTyping:a,inlineParams:l,paramStartIndex:u}=i;return $D(t.map(c=>{var h;if(at(c,Ye))return{sql:c.value.join(""),params:[]};if(at(c,Vl))return{sql:s(c.value),params:[]};if(c===void 0)return{sql:"",params:[]};if(Array.isArray(c)){const p=[new Ye("(")];for(const[f,y]of c.entries())p.push(y),fr},xw={mapToDriverValue:r=>r};({...ww,...xw});var ty;ty=xt;class Hi{constructor(t,e=xw){$(this,"brand");this.value=t,this.encoder=e}getSQL(){return new Ft([this])}}$(Hi,ty,"Param");function H(r,...t){const e=[];(t.length>0||r.length>0&&r[0]!=="")&&e.push(new Ye(r[0]));for(const[i,n]of t.entries())e.push(n,new Ye(r[i+1]));return new Ft(e)}(r=>{function t(){return new Ft([])}r.empty=t;function e(l){return new Ft(l)}r.fromList=e;function i(l){return new Ft([new Ye(l)])}r.raw=i;function n(l,u){const c=[];for(const[h,p]of l.entries())h>0&&u!==void 0&&c.push(u),c.push(p);return new Ft(c)}r.join=n;function s(l){return new Vl(l)}r.identifier=s;function o(l){return new as(l)}r.placeholder=o;function a(l,u){return new Hi(l,u)}r.param=a})(H||(H={}));(r=>{var e;e=xt;const i=class i{constructor(s,o){$(this,"isSelectionField",!1);this.sql=s,this.fieldAlias=o}getSQL(){return this.sql}clone(){return new i(this.sql,this.fieldAlias)}};$(i,e,"SQL.Aliased");let t=i;r.Aliased=t})(Ft||(Ft={}));var ey;ey=xt;class as{constructor(t){this.name=t}getSQL(){return new Ft([this])}}$(as,ey,"Placeholder");function Am(r,t){return r.map(e=>{if(at(e,as)){if(!(e.name in t))throw new Error(`No value for placeholder "${e.name}" was provided`);return t[e.name]}if(at(e,Hi)&&at(e.value,as)){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 GD=Symbol.for("drizzle:IsDrizzleView");var ry,iy,ny;ny=xt,iy=He,ry=GD;class In{constructor({name:t,schema:e,selectedFields:i,query:n}){$(this,iy);$(this,ry,!0);this[He]={name:t,originalName:t,schema:e,selectedFields:i,query:n,isExisting:!n,isAlias:!1}}getSQL(){return new Ft([this])}}$(In,ny,"View");Ke.prototype.getSQL=function(){return new Ft([this])};St.prototype.getSQL=function(){return new Ft([this])};dr.prototype.getSQL=function(){return new Ft([this])};var sy;sy=xt;class aa{constructor(t){this.table=t}get(t,e){return e==="table"?this.table:t[e]}}$(aa,sy,"ColumnAliasProxyHandler");var oy;oy=xt;class du{constructor(t,e){this.alias=t,this.replaceOriginalName=e}get(t,e){if(e===St.Symbol.IsAlias)return!0;if(e===St.Symbol.Name)return this.alias;if(this.replaceOriginalName&&e===St.Symbol.OriginalName)return this.alias;if(e===He)return{...t[He],name:this.alias,isAlias:!0};if(e===St.Symbol.Columns){const n=t[St.Symbol.Columns];if(!n)return n;const s={};return Object.keys(n).map(o=>{s[o]=new Proxy(n[o],new aa(new Proxy(t,this)))}),s}const i=t[e];return at(i,Ke)?new Proxy(i,new aa(new Proxy(t,this))):i}}$(du,oy,"TableAliasProxyHandler");function cc(r,t){return new Proxy(r,new du(t,!1))}function Bi(r,t){return new Proxy(r,new aa(new Proxy(r.table,new du(t,!1))))}function Sw(r,t){return new Ft.Aliased(Gl(r.sql,t),r.fieldAlias)}function Gl(r,t){return H.join(r.queryChunks.map(e=>at(e,Ke)?Bi(e,t):at(e,Ft)?Gl(e,t):at(e,Ft.Aliased)?Sw(e,t):e))}var ay,ly;class Gf extends(ly=Error,ay=xt,ly){constructor({message:t,cause:e}){super(t),this.name="DrizzleError",this.cause=e}}$(Gf,ay,"DrizzleError");var uy,cy;class Tw extends(cy=Gf,uy=xt,cy){constructor(){super({message:"Rollback"})}}$(Tw,uy,"TransactionRollbackError");var hy;hy=xt;class Iw{write(t){console.log(t)}}$(Iw,hy,"ConsoleLogWriter");var fy;fy=xt;class Ew{constructor(t){$(this,"writer");this.writer=(t==null?void 0:t.writer)??new Iw}logQuery(t,e){const i=e.map(s=>{try{return JSON.stringify(s)}catch{return String(s)}}),n=i.length?` -- params: [${i.join(", ")}]`:"";this.writer.write(`Query: ${t}${n}`)}}$(Ew,fy,"DefaultLogger");var dy;dy=xt;class Cw{logQuery(){}}$(Cw,dy,"NoopLogger");var py,my;my=xt,py=Symbol.toStringTag;class En{constructor(){$(this,py,"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)}}$(En,my,"QueryPromise");function ls(r,t){return Object.entries(r).reduce((e,[i,n])=>{if(typeof i!="string")return e;const s=t?[...t,i]:[i];return at(n,Ke)||at(n,Ft)||at(n,Ft.Aliased)?e.push({path:s,field:n}):at(n,St)?e.push(...ls(n[St.Symbol.Columns],s)):e.push(...ls(n,s)),e},[])}function Wf(r,t){const e=Object.keys(r),i=Object.keys(t);if(e.length!==i.length)return!1;for(const[n,s]of e.entries())if(s!==i[n])return!1;return!0}function Aw(r,t){const e=Object.entries(t).filter(([,i])=>i!==void 0).map(([i,n])=>at(n,Ft)||at(n,Ke)?[i,n]:[i,new Hi(n,r[St.Symbol.Columns][i])]);if(e.length===0)throw new Error("No values to set");return Object.fromEntries(e)}function WD(r,t){for(const e of t)for(const i of Object.getOwnPropertyNames(e.prototype))i!=="constructor"&&Object.defineProperty(r.prototype,i,Object.getOwnPropertyDescriptor(e.prototype,i)||Object.create(null))}function HD(r){return r[St.Symbol.Columns]}function Yn(r){return at(r,dr)?r._.alias:at(r,In)?r[He].name:at(r,Ft)?void 0:r[St.Symbol.IsAlias]?r[St.Symbol.Name]:r[St.Symbol.BaseName]}function YD(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 yy,gy;class Ow extends(gy=Fr,yy=xt,gy){getSQLType(){return"date"}mapFromDriverValue(t){return new Date(t)}mapToDriverValue(t){return t.toISOString()}}$(Ow,yy,"PgDate");var vy,_y;class Fw extends(_y=Fr,vy=xt,_y){getSQLType(){return"date"}}$(Fw,vy,"PgDateString");var by,wy;class Pw extends(wy=Fr,by=xt,wy){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}}$(Pw,by,"PgJson");var xy,Sy;class Mw extends(Sy=Fr,xy=xt,Sy){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}}$(Mw,xy,"PgJsonb");var Ty,Iy;class Dw extends(Iy=Fr,Ty=xt,Iy){constructor(e,i){super(e,i);$(this,"precision");$(this,"scale");this.precision=i.precision,this.scale=i.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})`}}$(Dw,Ty,"PgNumeric");var Ey,Cy;class Rw extends(Cy=Fr,Ey=xt,Cy){constructor(e,i){super(e,i);$(this,"withTimezone");$(this,"precision");this.withTimezone=i.withTimezone,this.precision=i.precision}getSQLType(){return`time${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}}$(Rw,Ey,"PgTime");var Ay,Oy;class Nw extends(Oy=Fr,Ay=xt,Oy){constructor(e,i){super(e,i);$(this,"withTimezone");$(this,"precision");$(this,"mapFromDriverValue",e=>new Date(this.withTimezone?e:e+"+0000"));$(this,"mapToDriverValue",e=>e.toISOString());this.withTimezone=i.withTimezone,this.precision=i.precision}getSQLType(){return`timestamp${this.precision===void 0?"":` (${this.precision})`}${this.withTimezone?" with time zone":""}`}}$(Nw,Ay,"PgTimestamp");var Fy,Py;class Lw extends(Py=Fr,Fy=xt,Py){constructor(e,i){super(e,i);$(this,"withTimezone");$(this,"precision");this.withTimezone=i.withTimezone,this.precision=i.precision}getSQLType(){return`timestamp${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}}$(Lw,Fy,"PgTimestampString");var My,Dy;class Bw extends(Dy=Fr,My=xt,Dy){getSQLType(){return"uuid"}}$(Bw,My,"PgUUID");const Om=Symbol.for("drizzle:PgInlineForeignKeys"),Fm=Symbol.for("drizzle:EnableRLS");var Ry,Ny,Ly,By,ky,Uy;class br extends(Uy=St,ky=xt,By=Om,Ly=Fm,Ny=St.Symbol.ExtraConfigBuilder,Ry=St.Symbol.ExtraConfigColumns,Uy){constructor(){super(...arguments);$(this,By,[]);$(this,Ly,!1);$(this,Ny);$(this,Ry,{})}}$(br,ky,"PgTable"),$(br,"Symbol",Object.assign({},St.Symbol,{InlineForeignKeys:Om,EnableRLS:Fm}));var zy;zy=xt;class kw{constructor(t,e){$(this,"columns");$(this,"name");this.columns=t,this.name=e}build(t){return new Uw(t,this.columns,this.name)}}$(kw,zy,"PgPrimaryKeyBuilder");var jy;jy=xt;class Uw{constructor(t,e,i){$(this,"columns");$(this,"name");this.table=t,this.columns=e,this.name=i}getName(){return this.name??`${this.table[br.Symbol.Name]}_${this.columns.map(t=>t.name).join("_")}_pk`}}$(Uw,jy,"PgPrimaryKey");function yr(r,t){return VD(t)&&!bw(r)&&!at(r,Hi)&&!at(r,as)&&!at(r,Ke)&&!at(r,St)&&!at(r,In)?new Hi(r,t):r}const zw=(r,t)=>H`${r} = ${yr(t,r)}`,XD=(r,t)=>H`${r} <> ${yr(t,r)}`;function Oh(...r){const t=r.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new Ft(t):new Ft([new Ye("("),H.join(t,new Ye(" and ")),new Ye(")")])}function qD(...r){const t=r.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new Ft(t):new Ft([new Ye("("),H.join(t,new Ye(" or ")),new Ye(")")])}function QD(r){return H`not ${r}`}const KD=(r,t)=>H`${r} > ${yr(t,r)}`,ZD=(r,t)=>H`${r} >= ${yr(t,r)}`,JD=(r,t)=>H`${r} < ${yr(t,r)}`,tR=(r,t)=>H`${r} <= ${yr(t,r)}`;function eR(r,t){return Array.isArray(t)?t.length===0?H`false`:H`${r} in ${t.map(e=>yr(e,r))}`:H`${r} in ${yr(t,r)}`}function rR(r,t){return Array.isArray(t)?t.length===0?H`true`:H`${r} not in ${t.map(e=>yr(e,r))}`:H`${r} not in ${yr(t,r)}`}function iR(r){return H`${r} is null`}function nR(r){return H`${r} is not null`}function sR(r){return H`exists ${r}`}function oR(r){return H`not exists ${r}`}function aR(r,t,e){return H`${r} between ${yr(t,r)} and ${yr(e,r)}`}function lR(r,t,e){return H`${r} not between ${yr(t,r)} and ${yr(e,r)}`}function uR(r,t){return H`${r} like ${t}`}function cR(r,t){return H`${r} not like ${t}`}function hR(r,t){return H`${r} ilike ${t}`}function fR(r,t){return H`${r} not ilike ${t}`}function dR(r){return H`${r} asc`}function pR(r){return H`${r} desc`}var $y;$y=xt;class Hf{constructor(t,e,i){$(this,"referencedTableName");$(this,"fieldName");this.sourceTable=t,this.referencedTable=e,this.relationName=i,this.referencedTableName=e[St.Symbol.Name]}}$(Hf,$y,"Relation");var Vy;Vy=xt;class jw{constructor(t,e){this.table=t,this.config=e}}$(jw,Vy,"Relations");var Gy,Wy;const Yl=class Yl extends(Wy=Hf,Gy=xt,Wy){constructor(t,e,i,n){super(t,e,i==null?void 0:i.relationName),this.config=i,this.isNullable=n}withFieldName(t){const e=new Yl(this.sourceTable,this.referencedTable,this.config,this.isNullable);return e.fieldName=t,e}};$(Yl,Gy,"One");let us=Yl;var Hy,Yy;const Xl=class Xl extends(Yy=Hf,Hy=xt,Yy){constructor(t,e,i){super(t,e,i==null?void 0:i.relationName),this.config=i}withFieldName(t){const e=new Xl(this.sourceTable,this.referencedTable,this.config);return e.fieldName=t,e}};$(Xl,Hy,"Many");let Wl=Xl;function mR(){return{and:Oh,between:aR,eq:zw,exists:sR,gt:KD,gte:ZD,ilike:hR,inArray:eR,isNull:iR,isNotNull:nR,like:uR,lt:JD,lte:tR,ne:XD,not:QD,notBetween:lR,notExists:oR,notLike:cR,notIlike:fR,notInArray:rR,or:qD,sql:H}}function yR(){return{sql:H,asc:dR,desc:pR}}function gR(r,t){var s;Object.keys(r).length===1&&"default"in r&&!at(r.default,St)&&(r=r.default);const e={},i={},n={};for(const[o,a]of Object.entries(r))if(at(a,St)){const l=oa(a),u=i[l];e[l]=o,n[o]={tsName:o,dbName:a[St.Symbol.Name],schema:a[St.Symbol.Schema],columns:a[St.Symbol.Columns],relations:(u==null?void 0:u.relations)??{},primaryKey:(u==null?void 0:u.primaryKey)??[]};for(const h of Object.values(a[St.Symbol.Columns]))h.primary&&n[o].primaryKey.push(h);const c=(s=a[St.Symbol.ExtraConfigBuilder])==null?void 0:s.call(a,a[St.Symbol.ExtraConfigColumns]);if(c)for(const h of Object.values(c))at(h,kw)&&n[o].primaryKey.push(...h.columns)}else if(at(a,jw)){const l=oa(a.table),u=e[l],c=a.config(t(a.table));let h;for(const[p,f]of Object.entries(c))if(u){const y=n[u];y.relations[p]=f}else l in i||(i[l]={relations:{},primaryKey:h}),i[l].relations[p]=f}return{tables:n,tableNamesMap:e}}function vR(r){return function(e,i){return new us(r,e,i,(i==null?void 0:i.fields.reduce((n,s)=>n&&s.notNull,!0))??!1)}}function _R(r){return function(e,i){return new Wl(r,e,i)}}function bR(r,t,e){if(at(e,us)&&e.config)return{fields:e.config.fields,references:e.config.references};const i=t[oa(e.referencedTable)];if(!i)throw new Error(`Table "${e.referencedTable[St.Symbol.Name]}" not found in schema`);const n=r[i];if(!n)throw new Error(`Table "${i}" not found in schema`);const s=e.sourceTable,o=t[oa(s)];if(!o)throw new Error(`Table "${s[St.Symbol.Name]}" not found in schema`);const a=[];for(const l of Object.values(n.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 "${i}"`):new Error(`There are multiple relations between "${i}" and "${e.sourceTable[St.Symbol.Name]}". Please specify relation name`);if(a[0]&&at(a[0],us)&&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 wR(r){return{one:vR(r),many:_R(r)}}function Fh(r,t,e,i,n=s=>s){const s={};for(const[o,a]of i.entries())if(a.isJson){const l=t.relations[a.tsKey],u=e[o],c=typeof u=="string"?JSON.parse(u):u;s[a.tsKey]=at(l,us)?c&&Fh(r,r[a.relationTableTsKey],c,a.selection,n):c.map(h=>Fh(r,r[a.relationTableTsKey],h,a.selection,n))}else{const l=n(e[o]),u=a.field;let c;at(u,Ke)?c=u:at(u,Ft)?c=u.decoder:c=u.sql.decoder,s[a.tsKey]=l===null?null:c.mapFromDriverValue(l)}return s}var Xy;Xy=xt;const ql=class ql{constructor(t){$(this,"config");this.config={...t}}get(t,e){if(e==="_")return{...t._,selectedFields:new Proxy(t._.selectedFields,this)};if(e===He)return{...t[He],selectedFields:new Proxy(t[He].selectedFields,this)};if(typeof e=="symbol")return t[e];const n=(at(t,dr)?t._.selectedFields:at(t,In)?t[He].selectedFields:t)[e];if(at(n,Ft.Aliased)){if(this.config.sqlAliasedBehavior==="sql"&&!n.isSelectionField)return n.sql;const s=n.clone();return s.isSelectionField=!0,s}if(at(n,Ft)){if(this.config.sqlBehavior==="sql")return n;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 at(n,Ke)?this.config.alias?new Proxy(n,new aa(new Proxy(n.table,new du(this.config.alias,this.config.replaceOriginalName??!1)))):n:typeof n!="object"||n===null?n:new Proxy(n,new ql(this.config))}};$(ql,Xy,"SelectionProxyHandler");let Je=ql;function xR(r){return(r.replace(/['\u2019]/g,"").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[]).map(e=>e.toLowerCase()).join("_")}function SR(r){return(r.replace(/['\u2019]/g,"").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[]).reduce((e,i,n)=>{const s=n===0?i.toLowerCase():`${i[0].toUpperCase()}${i.slice(1)}`;return e+s},"")}function TR(r){return r}var qy;qy=xt;class $w{constructor(t){$(this,"cache",{});$(this,"cachedTables",{});$(this,"convert");this.convert=t==="snake_case"?xR:t==="camelCase"?SR:TR}getColumnCasing(t){if(!t.keyAsName)return t.name;const e=t.table[St.Symbol.Schema]??"public",i=t.table[St.Symbol.OriginalName],n=`${e}.${i}.${t.name}`;return this.cache[n]||this.cacheTable(t.table),this.cache[n]}cacheTable(t){const e=t[St.Symbol.Schema]??"public",i=t[St.Symbol.OriginalName],n=`${e}.${i}`;if(!this.cachedTables[n]){for(const s of Object.values(t[St.Symbol.Columns])){const o=`${n}.${s.name}`;this.cache[o]=this.convert(s.name)}this.cachedTables[n]=!0}}clearCache(){this.cache={},this.cachedTables={}}}$($w,qy,"CasingCache");var Qy,Ky;class Yf extends(Ky=In,Qy=xt,Ky){}$(Yf,Qy,"PgViewBase");var Zy;Zy=xt;class zo{constructor(t){$(this,"casing");this.casing=new $w(t==null?void 0:t.casing)}async migrate(t,e,i){const n=typeof i=="string"?"__drizzle_migrations":i.migrationsTable??"__drizzle_migrations",s=typeof i=="string"?"drizzle":i.migrationsSchema??"drizzle",o=H` +]`}concat(...t){const e=this.schema,i=this.data.concat(t.flatMap(({data:n})=>n));return new Gn(e,i.map(n=>new hr(e,n)))}slice(t,e){const i=this.schema;[t,e]=t0({length:this.numRows},t,e);const n=n0(this.data,this._offsets,t,e);return new Gn(i,n.map(s=>new hr(i,s)))}getChild(t){return this.getChildAt(this.schema.fields.findIndex(e=>e.name===t))}getChildAt(t){if(t>-1&&ti.children[t]);if(e.length===0){const{type:i}=this.schema.fields[t],n=se({type:i,length:0,nullCount:0});e.push(n._changeLengthAndBackfillNullBitmap(this.numRows))}return new Me(e)}return null}setChild(t,e){var i;return this.setChildAt((i=this.schema.fields)===null||i===void 0?void 0:i.findIndex(n=>n.name===t),e)}setChildAt(t,e){let i=this.schema,n=[...this.batches];if(t>-1&&tthis.getChildAt(u));[s[t],a[t]]=[o,e],[i,n]=Zu(i,a)}return new Gn(i,n)}select(t){const e=this.schema.fields.reduce((i,n,s)=>i.set(n.name,s),new Map);return this.selectAt(t.map(i=>e.get(i)).filter(i=>i>-1))}selectAt(t){const e=this.schema.selectAt(t),i=this.batches.map(n=>n.selectAt(t));return new Gn(e,i)}assign(t){const e=this.schema.fields,[i,n]=t.schema.fields.reduce((a,l,u)=>{const[c,h]=a,p=e.findIndex(f=>f.name===l.name);return~p?h[p]=u:c.push(u),a},[[],[]]),s=this.schema.assign(t.schema),o=[...e.map((a,l)=>[l,n[l]]).map(([a,l])=>l===void 0?this.getChildAt(a):t.getChildAt(l)),...i.map(a=>t.getChildAt(a))].filter(Boolean);return new Gn(...Zu(s,o))}};p0=Symbol.toStringTag;_n[p0]=(r=>(r.schema=null,r.batches=[],r._offsets=new Uint32Array([0]),r._nullCount=-1,r[Symbol.isConcatSpreadable]=!0,r.isValid=Pl(pf),r.get=Pl(mr.getVisitFn(L.Struct)),r.set=s0(Xr.getVisitFn(L.Struct)),r.indexOf=o0(Ml.getVisitFn(L.Struct)),"Table"))(_n.prototype);var m0;let hr=class Ro{constructor(...t){switch(t.length){case 2:{if([this.schema]=t,!(this.schema instanceof Pe))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");if([,this.data=se({nullCount:0,type:new sr(this.schema.fields),children:this.schema.fields.map(e=>se({type:e.type,nullCount:0}))})]=t,!(this.data instanceof Se))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");[this.schema,this.data]=Pp(this.schema,this.data.children);break}case 1:{const[e]=t,{fields:i,children:n,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]=Ce.new({name:u,type:e[u].type,nullable:!0}),l),{length:0,fields:new Array,children:new Array}),o=new Pe(i),a=se({type:new sr(i),length:s,children:n,nullCount:0});[this.schema,this.data]=Pp(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=y0(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 mr.visit(this.data,t)}at(t){return this.get(hf(t,this.numRows))}set(t,e){return Xr.visit(this.data,t,e)}indexOf(t,e){return Ml.visit(this.data,t,e)}[Symbol.iterator](){return mf.visit(new Me([this.data]))}toArray(){return[...this]}concat(...t){return new _n(this.schema,[this,...t])}slice(t,e){const[i]=new Me([this.data]).slice(t,e).data;return new Ro(this.schema,i)}getChild(t){var e;return this.getChildAt((e=this.schema.fields)===null||e===void 0?void 0:e.findIndex(i=>i.name===t))}getChildAt(t){return t>-1&&tn.name===t),e)}setChildAt(t,e){let i=this.schema,n=this.data;if(t>-1&&ta.name===s);~o&&(n[o]=this.data.children[o])}return new Ro(e,se({type:i,length:this.numRows,children:n}))}selectAt(t){const e=this.schema.selectAt(t),i=t.map(s=>this.data.children[s]).filter(Boolean),n=se({type:new sr(e.fields),length:this.numRows,children:i});return new Ro(e,n)}};m0=Symbol.toStringTag;hr[m0]=(r=>(r._nullCount=-1,r[Symbol.isConcatSpreadable]=!0,"RecordBatch"))(hr.prototype);function Pp(r,t,e=t.reduce((i,n)=>Math.max(i,n.length),0)){var i;const n=[...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)&&(n[a]=l.clone({nullable:!0}),s[a]=(i=u==null?void 0:u._changeLengthAndBackfillNullBitmap(e))!==null&&i!==void 0?i:se({type:l.type,length:e,nullCount:e,nullBitmap:new Uint8Array(o)}))}return[r.assign(n),se({type:new sr(n),length:e,children:s})]}function y0(r,t,e=new Map){var i,n;if(((i=r==null?void 0:r.length)!==null&&i!==void 0?i:0)>0&&(r==null?void 0:r.length)===(t==null?void 0:t.length))for(let s=-1,o=r.length;++sse({type:n.type})),i=se({type:new sr(t.fields),nullCount:0,children:e});super(t,i)}}let rn=class li{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 li).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsMessage(t,e){return t.setPosition(t.position()+me),(e||new li).__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):ke.V1}headerType(){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readUint8(this.bb_pos+t):fe.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 i=this.bb.__offset(this.bb_pos,12);return i?(e||new We).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+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,ke.V1)}static addHeaderType(t,e){t.addFieldInt8(1,e,fe.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 i=e.length-1;i>=0;i--)t.addOffset(e[i]);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,i,n,s,o){return li.startMessage(t),li.addVersion(t,e),li.addHeaderType(t,i),li.addHeader(t,n),li.addBodyLength(t,s),li.addCustomMetadata(t,o),li.endMessage(t)}};class wO extends ie{visit(t,e){return t==null||e==null?void 0:super.visit(t,e)}visitNull(t,e){return wp.startNull(e),wp.endNull(e)}visitInt(t,e){return Sr.startInt(e),Sr.addBitWidth(e,t.bitWidth),Sr.addIsSigned(e,t.isSigned),Sr.endInt(e)}visitFloat(t,e){return yi.startFloatingPoint(e),yi.addPrecision(e,t.precision),yi.endFloatingPoint(e)}visitBinary(t,e){return yp.startBinary(e),yp.endBinary(e)}visitLargeBinary(t,e){return vp.startLargeBinary(e),vp.endLargeBinary(e)}visitBool(t,e){return gp.startBool(e),gp.endBool(e)}visitUtf8(t,e){return xp.startUtf8(e),xp.endUtf8(e)}visitLargeUtf8(t,e){return _p.startLargeUtf8(e),_p.endLargeUtf8(e)}visitDecimal(t,e){return Is.startDecimal(e),Is.addScale(e,t.scale),Is.addPrecision(e,t.precision),Is.addBitWidth(e,t.bitWidth),Is.endDecimal(e)}visitDate(t,e){return $a.startDate(e),$a.addUnit(e,t.unit),$a.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 i=t.timezone&&e.createString(t.timezone)||void 0;return jr.startTimestamp(e),jr.addUnit(e,t.unit),i!==void 0&&jr.addTimezone(e,i),jr.endTimestamp(e)}visitInterval(t,e){return gi.startInterval(e),gi.addUnit(e,t.unit),gi.endInterval(e)}visitDuration(t,e){return Va.startDuration(e),Va.addUnit(e,t.unit),Va.endDuration(e)}visitList(t,e){return bp.startList(e),bp.endList(e)}visitStruct(t,e){return Qn.startStruct_(e),Qn.endStruct_(e)}visitUnion(t,e){cr.startTypeIdsVector(e,t.typeIds.length);const i=cr.createTypeIdsVector(e,t.typeIds);return cr.startUnion(e),cr.addMode(e,t.mode),cr.addTypeIds(e,i),cr.endUnion(e)}visitDictionary(t,e){const i=this.visit(t.indices,e);return Vi.startDictionaryEncoding(e),Vi.addId(e,BigInt(t.id)),Vi.addIsOrdered(e,t.isOrdered),i!==void 0&&Vi.addIndexType(e,i),Vi.endDictionaryEncoding(e)}visitFixedSizeBinary(t,e){return Ga.startFixedSizeBinary(e),Ga.addByteWidth(e,t.byteWidth),Ga.endFixedSizeBinary(e)}visitFixedSizeList(t,e){return Wa.startFixedSizeList(e),Wa.addListSize(e,t.listSize),Wa.endFixedSizeList(e)}visitMap(t,e){return Ha.startMap(e),Ha.addKeysSorted(e,t.keysSorted),Ha.endMap(e)}}const Ju=new wO;function xO(r,t=new Map){return new Pe(TO(r,t),qa(r.metadata),t)}function g0(r){return new Pr(r.count,v0(r.columns),_0(r.columns))}function SO(r){return new Ii(g0(r.data),r.id,r.isDelta)}function TO(r,t){return(r.fields||[]).filter(Boolean).map(e=>Ce.fromJSON(e,t))}function Mp(r,t){return(r.children||[]).filter(Boolean).map(e=>Ce.fromJSON(e,t))}function v0(r){return(r||[]).reduce((t,e)=>[...t,new bn(e.count,IO(e.VALIDITY)),...v0(e.children)],[])}function _0(r,t=[]){for(let e=-1,i=(r||[]).length;++et+ +(e===0),0)}function EO(r,t){let e,i,n,s,o,a;return!t||!(s=r.dictionary)?(o=Rp(r,Mp(r,t)),n=new Ce(r.name,o,r.nullable,qa(r.metadata))):t.has(e=s.id)?(i=(i=s.indexType)?Dp(i):new Jo,a=new eo(t.get(e),i,e,s.isOrdered),n=new Ce(r.name,a,r.nullable,qa(r.metadata))):(i=(i=s.indexType)?Dp(i):new Jo,t.set(e,o=Rp(r,Mp(r,t))),a=new eo(o,i,e,s.isOrdered),n=new Ce(r.name,a,r.nullable,qa(r.metadata))),n||null}function qa(r=[]){return new Map(r.map(({key:t,value:e})=>[t,e]))}function Dp(r){return new os(r.isSigned,r.bitWidth)}function Rp(r,t){const e=r.type.name;switch(e){case"NONE":return new yn;case"null":return new yn;case"binary":return new dl;case"largebinary":return new pl;case"utf8":return new ml;case"largeutf8":return new yl;case"bool":return new gl;case"list":return new Tl((t||[])[0]);case"struct":return new sr(t||[]);case"struct_":return new sr(t||[])}switch(e){case"int":{const i=r.type;return new os(i.isSigned,i.bitWidth)}case"floatingpoint":{const i=r.type;return new fl(tr[i.precision])}case"decimal":{const i=r.type;return new vl(i.scale,i.precision,i.bitWidth)}case"date":{const i=r.type;return new _l(Yr[i.unit])}case"time":{const i=r.type;return new bl(Vt[i.unit],i.bitWidth)}case"timestamp":{const i=r.type;return new wl(Vt[i.unit],i.timezone)}case"interval":{const i=r.type;return new xl(Ti[i.unit])}case"duration":{const i=r.type;return new Sl(Vt[i.unit])}case"union":{const i=r.type,[n,...s]=(i.mode+"").toLowerCase(),o=n.toUpperCase()+s.join("");return new Il(er[o],i.typeIds||[],t||[])}case"fixedsizebinary":{const i=r.type;return new El(i.byteWidth)}case"fixedsizelist":{const i=r.type;return new Cl(i.listSize,(t||[])[0])}case"map":{const i=r.type;return new Al((t||[])[0],i.keysSorted)}}throw new Error(`Unrecognized type: "${e}"`)}var CO=Dv,AO=Js;class or{static fromJSON(t,e){const i=new or(0,ke.V5,e);return i._createHeader=OO(t,e),i}static decode(t){t=new AO(le(t));const e=rn.getRootAsMessage(t),i=e.bodyLength(),n=e.version(),s=e.headerType(),o=new or(i,n,s);return o._createHeader=FO(e,s),o}static encode(t){const e=new CO;let i=-1;return t.isSchema()?i=Pe.encode(e,t.header()):t.isRecordBatch()?i=Pr.encode(e,t.header()):t.isDictionaryBatch()&&(i=Ii.encode(e,t.header())),rn.startMessage(e),rn.addVersion(e,ke.V5),rn.addHeader(e,i),rn.addHeaderType(e,t.headerType),rn.addBodyLength(e,BigInt(t.bodyLength)),rn.finishMessageBuffer(e,rn.endMessage(e)),e.asUint8Array()}static from(t,e=0){if(t instanceof Pe)return new or(0,ke.V5,fe.Schema,t);if(t instanceof Pr)return new or(e,ke.V5,fe.RecordBatch,t);if(t instanceof Ii)return new or(e,ke.V5,fe.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===fe.Schema}isRecordBatch(){return this.headerType===fe.RecordBatch}isDictionaryBatch(){return this.headerType===fe.DictionaryBatch}constructor(t,e,i,n){this._version=e,this._headerType=i,this.body=new Uint8Array(0),n&&(this._createHeader=()=>n),this._bodyLength=we(t)}}class Pr{get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}constructor(t,e,i){this._nodes=e,this._buffers=i,this._length=we(t)}}class Ii{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,i=!1){this._data=t,this._isDelta=i,this._id=we(e)}}class _i{constructor(t,e){this.offset=we(t),this.length=we(e)}}class bn{constructor(t,e){this.length=we(t),this.nullCount=we(e)}}function OO(r,t){return()=>{switch(t){case fe.Schema:return Pe.fromJSON(r);case fe.RecordBatch:return Pr.fromJSON(r);case fe.DictionaryBatch:return Ii.fromJSON(r)}throw new Error(`Unrecognized Message type: { name: ${fe[t]}, type: ${t} }`)}}function FO(r,t){return()=>{switch(t){case fe.Schema:return Pe.decode(r.header(new ci),new Map,r.version());case fe.RecordBatch:return Pr.decode(r.header(new ki),r.version());case fe.DictionaryBatch:return Ii.decode(r.header(new Ss),r.version())}throw new Error(`Unrecognized Message type: { name: ${fe[t]}, type: ${t} }`)}}Ce.encode=jO;Ce.decode=UO;Ce.fromJSON=EO;Pe.encode=zO;Pe.decode=PO;Pe.fromJSON=xO;Pr.encode=$O;Pr.decode=MO;Pr.fromJSON=g0;Ii.encode=VO;Ii.decode=DO;Ii.fromJSON=SO;bn.encode=GO;bn.decode=NO;_i.encode=WO;_i.decode=RO;function PO(r,t=new Map,e=ke.V5){const i=kO(r,t);return new Pe(i,Qa(r),t,e)}function MO(r,t=ke.V5){if(r.compression()!==null)throw new Error("Record batch compression not implemented");return new Pr(r.length(),LO(r),BO(r,t))}function DO(r,t=ke.V5){return new Ii(Pr.decode(r.data(),t),r.id(),r.isDelta())}function RO(r){return new _i(r.offset(),r.length())}function NO(r){return new bn(r.length(),r.nullCount())}function LO(r){const t=[];for(let e,i=-1,n=-1,s=r.nodesLength();++iCe.encode(r,s));ci.startFieldsVector(r,e.length);const i=ci.createFieldsVector(r,e),n=t.metadata&&t.metadata.size>0?ci.createCustomMetadataVector(r,[...t.metadata].map(([s,o])=>{const a=r.createString(`${s}`),l=r.createString(`${o}`);return We.startKeyValue(r),We.addKey(r,a),We.addValue(r,l),We.endKeyValue(r)})):-1;return ci.startSchema(r),ci.addFields(r,i),ci.addEndianness(r,HO?to.Little:to.Big),n!==-1&&ci.addCustomMetadata(r,n),ci.endSchema(r)}function jO(r,t){let e=-1,i=-1,n=-1;const s=t.type;let o=t.typeId;At.isDictionary(s)?(o=s.dictionary.typeId,n=Ju.visit(s,r),i=Ju.visit(s.dictionary,r)):i=Ju.visit(s,r);const a=(s.children||[]).map(c=>Ce.encode(r,c)),l=Lr.createChildrenVector(r,a),u=t.metadata&&t.metadata.size>0?Lr.createCustomMetadataVector(r,[...t.metadata].map(([c,h])=>{const p=r.createString(`${c}`),f=r.createString(`${h}`);return We.startKeyValue(r),We.addKey(r,p),We.addValue(r,f),We.endKeyValue(r)})):-1;return t.name&&(e=r.createString(t.name)),Lr.startField(r),Lr.addType(r,i),Lr.addTypeType(r,o),Lr.addChildren(r,l),Lr.addNullable(r,!!t.nullable),e!==-1&&Lr.addName(r,e),n!==-1&&Lr.addDictionary(r,n),u!==-1&&Lr.addCustomMetadata(r,u),Lr.endField(r)}function $O(r,t){const e=t.nodes||[],i=t.buffers||[];ki.startNodesVector(r,e.length);for(const o of e.slice().reverse())bn.encode(r,o);const n=r.endVector();ki.startBuffersVector(r,i.length);for(const o of i.slice().reverse())_i.encode(r,o);const s=r.endVector();return ki.startRecordBatch(r),ki.addLength(r,BigInt(t.length)),ki.addNodes(r,n),ki.addBuffers(r,s),ki.endRecordBatch(r)}function VO(r,t){const e=Pr.encode(r,t.data);return Ss.startDictionaryBatch(r),Ss.addId(r,BigInt(t.id)),Ss.addIsDelta(r,t.isDelta),Ss.addData(r,e),Ss.endDictionaryBatch(r)}function GO(r,t){return Lv.createFieldNode(r,BigInt(t.length),BigInt(t.nullCount))}function WO(r,t){return Nv.createBuffer(r,BigInt(t.offset),BigInt(t.length))}const HO=(()=>{const r=new ArrayBuffer(2);return new DataView(r).setInt16(0,256,!0),new Int16Array(r)[0]===256})(),xf=r=>`Expected ${fe[r]} Message in stream, but was null or length 0.`,Sf=r=>`Header pointer of flatbuffer-encoded ${fe[r]} Message is null or length 0.`,b0=(r,t)=>`Expected to read ${r} metadata bytes, but only read ${t}.`,w0=(r,t)=>`Expected to read ${r} bytes for message body, but only read ${t}.`;class x0{constructor(t){this.source=t instanceof Dl?t:new Dl(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?De: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(xf(t));return e.value}readMessageBody(t){if(t<=0)return new Uint8Array(0);const e=le(this.source.read(t));if(e.byteLength[...n,...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(xf(t));return e.value}readSchema(){const t=fe.Schema,e=this.readMessage(t),i=e==null?void 0:e.header();if(!e||!i)throw new Error(Sf(t));return i}}const su=4,gh="ARROW1",ea=new Uint8Array(gh.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 kr.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return kr.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 Vr?t:sh(t)?JO(t):Cv(t)?r2(t):ss(t)?Zt(this,void 0,void 0,function*(){return yield Vr.from(yield t)}):Av(t)||of(t)||Ov(t)||ao(t)?e2(new ro(t)):t2(new Dl(t))}static readAll(t){return t instanceof Vr?t.isSync()?kp(t):Up(t):sh(t)||ArrayBuffer.isView(t)||ua(t)||Ev(t)?kp(t):Up(t)}}class Nl extends Vr{constructor(t){super(t),this._impl=t}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return fr(this,arguments,function*(){yield Nt(yield*is(wi(this[Symbol.iterator]())))})}}class Ll extends Vr{constructor(t){super(t),this._impl=t}readAll(){return Zt(this,void 0,void 0,function*(){var t,e,i,n;const s=new Array;try{for(var o=!0,a=wi(this),l;l=yield a.next(),t=l.done,!t;o=!0){n=l.value,o=!1;const u=n;s.push(u)}}catch(u){e={error:u}}finally{try{!o&&!t&&(i=a.return)&&(yield i.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 T0 extends Nl{constructor(t){super(t),this._impl=t}}class QO extends Ll{constructor(t){super(t),this._impl=t}}class I0{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 i=this._loadVectors(t,e,this.schema.fields),n=se({type:new sr(this.schema.fields),length:t.length,children:i});return new hr(this.schema,n)}_loadDictionaryBatch(t,e){const{id:i,isDelta:n}=t,{dictionaries:s,schema:o}=this,a=s.get(i),l=o.dictionaries.get(i),u=this._loadVectors(t.data,e,[l]);return(a&&n?a.concat(new Me(u)):new Me(u)).memoize()}_loadVectors(t,e,i){return new d0(e,t.nodes,t.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(i)}}class Bl extends I0{constructor(t,e){super(e),this._reader=sh(t)?new XO(this._handle=t):new x0(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=C0(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):De}return(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(t):De}next(){if(this.closed)return De;let t;const{_reader:e}=this;for(;t=this._readNextMessageAndValidate();)if(t.isSchema())this.reset(t.header());else if(t.isRecordBatch()){this._recordBatchIndex++;const i=t.header(),n=e.readMessageBody(t.bodyLength);return{done:!1,value:this._loadRecordBatch(i,n)}}else if(t.isDictionaryBatch()){this._dictionaryIndex++;const i=t.header(),n=e.readMessageBody(t.bodyLength),s=this._loadDictionaryBatch(i,n);this.dictionaries.set(i.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new wf(this.schema)}):this.return()}_readNextMessageAndValidate(t){return this._reader.readMessage(t)}}class kl extends I0{constructor(t,e){super(e),this._reader=new YO(this._handle=t)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return Zt(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 Zt(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=C0(this,t),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(t){return Zt(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(t):De})}return(t){return Zt(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(t):De})}next(){return Zt(this,void 0,void 0,function*(){if(this.closed)return De;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 i=t.header(),n=yield e.readMessageBody(t.bodyLength);return{done:!1,value:this._loadRecordBatch(i,n)}}else if(t.isDictionaryBatch()){this._dictionaryIndex++;const i=t.header(),n=yield e.readMessageBody(t.bodyLength),s=this._loadDictionaryBatch(i,n);this.dictionaries.set(i.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new wf(this.schema)}):yield this.return()})}_readNextMessageAndValidate(t){return Zt(this,void 0,void 0,function*(){return yield this._reader.readMessage(t)})}}class E0 extends Bl{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 Fp?t:new Fp(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 i=(e=this._footer)===null||e===void 0?void 0:e.getRecordBatch(t);if(i&&this._handle.seek(i.offset)){const n=this._reader.readMessage(fe.RecordBatch);if(n!=null&&n.isRecordBatch()){const s=n.header(),o=this._reader.readMessageBody(n.bodyLength);return this._loadRecordBatch(s,o)}}return null}_readDictionaryBatch(t){var e;const i=(e=this._footer)===null||e===void 0?void 0:e.getDictionaryBatch(t);if(i&&this._handle.seek(i.offset)){const n=this._reader.readMessage(fe.DictionaryBatch);if(n!=null&&n.isDictionaryBatch()){const s=n.header(),o=this._reader.readMessageBody(n.bodyLength),a=this._loadDictionaryBatch(s,o);this.dictionaries.set(s.id,a)}}}_readFooter(){const{_handle:t}=this,e=t.size-S0,i=t.readInt32(e),n=t.readAt(e-i,i);return ta.decode(n)}_readNextMessageAndValidate(t){var e;if(this._footer||this.open(),this._footer&&this._recordBatchIndexsuper.open}});return Zt(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(const i of this._footer.dictionaryBatches())i&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield e.open.call(this,t)})}readRecordBatch(t){return Zt(this,void 0,void 0,function*(){var e;if(this.closed)return null;this._footer||(yield this.open());const i=(e=this._footer)===null||e===void 0?void 0:e.getRecordBatch(t);if(i&&(yield this._handle.seek(i.offset))){const n=yield this._reader.readMessage(fe.RecordBatch);if(n!=null&&n.isRecordBatch()){const s=n.header(),o=yield this._reader.readMessageBody(n.bodyLength);return this._loadRecordBatch(s,o)}}return null})}_readDictionaryBatch(t){return Zt(this,void 0,void 0,function*(){var e;const i=(e=this._footer)===null||e===void 0?void 0:e.getDictionaryBatch(t);if(i&&(yield this._handle.seek(i.offset))){const n=yield this._reader.readMessage(fe.DictionaryBatch);if(n!=null&&n.isDictionaryBatch()){const s=n.header(),o=yield this._reader.readMessageBody(n.bodyLength),a=this._loadDictionaryBatch(s,o);this.dictionaries.set(s.id,a)}}})}_readFooter(){return Zt(this,void 0,void 0,function*(){const{_handle:t}=this;t._pending&&(yield t._pending);const e=t.size-S0,i=yield t.readInt32(e),n=yield t.readAt(e-i,i);return ta.decode(n)})}_readNextMessageAndValidate(t){return Zt(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex=4?Tf(t)?new T0(new E0(r.read())):new Nl(new Bl(r)):new Nl(new Bl(function*(){}()))}function e2(r){return Zt(this,void 0,void 0,function*(){const t=yield r.peek(da+7&-8);return t&&t.byteLength>=4?Tf(t)?new T0(new E0(yield r.read())):new Ll(new kl(r)):new Ll(new kl(function(){return fr(this,arguments,function*(){})}()))})}function r2(r){return Zt(this,void 0,void 0,function*(){const{size:t}=yield r.stat(),e=new Rl(r,t);return t>=qO&&Tf(yield e.readAt(0,da+7&-8))?new QO(new KO(e)):new Ll(new kl(e))})}class Ne extends ie{static assemble(...t){const e=n=>n.flatMap(s=>Array.isArray(s)?e(s):s instanceof hr?s.data.children:s.data),i=new Ne;return i.visitMany(e(t)),i}constructor(){super(),this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}visit(t){if(t instanceof Me)return this.visitMany(t.data),this;const{type:e}=t;if(!At.isDictionary(e)){const{length:i}=t;if(i>2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");if(At.isUnion(e))this.nodes.push(new bn(i,0));else{const{nullCount:n}=t;At.isNull(e)||ei.call(this,n<=0?new Uint8Array(0):Ol(t.offset,i,t.nullBitmap)),this.nodes.push(new bn(i,n))}}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 ei(r){const t=r.byteLength+7&-8;return this.buffers.push(r),this.bufferRegions.push(new _i(this._byteLength,t)),this._byteLength+=t,this}function i2(r){var t;const{type:e,length:i,typeIds:n,valueOffsets:s}=r;if(ei.call(this,n),e.mode===er.Sparse)return vh.call(this,r);if(e.mode===er.Dense){if(r.offset<=0)return ei.call(this,s),vh.call(this,r);{const o=new Int32Array(i),a=Object.create(null),l=Object.create(null);for(let u,c,h=-1;++h{const h=e.typeIds[c],p=a[h],f=l[h];return u.slice(p,Math.min(i,f))}))}}return this}function n2(r){let t;return r.nullCount>=r.length?ei.call(this,new Uint8Array(0)):(t=r.values)instanceof Uint8Array?ei.call(this,Ol(r.offset,r.length,t)):ei.call(this,Fl(r.values))}function qi(r){return ei.call(this,r.values.subarray(0,r.length*r.stride))}function ou(r){const{length:t,values:e,valueOffsets:i}=r,n=we(i[0]),s=we(i[t]),o=Math.min(s-n,e.byteLength-n);return ei.call(this,Pv(-n,t+1,i)),ei.call(this,e.subarray(n,n+o)),this}function If(r){const{length:t,valueOffsets:e}=r;if(e){const{[0]:i,[t]:n}=e;return ei.call(this,Pv(-i,t+1,e)),this.visit(r.children[0].slice(i,n-i))}return this.visit(r.children[0])}function vh(r){return this.visitMany(r.type.children.map((t,e)=>r.children[e]).filter(Boolean))[0]}Ne.prototype.visitBool=n2;Ne.prototype.visitInt=qi;Ne.prototype.visitFloat=qi;Ne.prototype.visitUtf8=ou;Ne.prototype.visitLargeUtf8=ou;Ne.prototype.visitBinary=ou;Ne.prototype.visitLargeBinary=ou;Ne.prototype.visitFixedSizeBinary=qi;Ne.prototype.visitDate=qi;Ne.prototype.visitTimestamp=qi;Ne.prototype.visitTime=qi;Ne.prototype.visitDecimal=qi;Ne.prototype.visitList=If;Ne.prototype.visitStruct=vh;Ne.prototype.visitUnion=i2;Ne.prototype.visitInterval=qi;Ne.prototype.visitDuration=qi;Ne.prototype.visitFixedSizeList=If;Ne.prototype.visitMap=If;class A0 extends yf{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 Xa,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,pr(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 ss(t)?t.then(e=>this.writeAll(e)):ao(t)?Of(this,t):Af(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 Xa?this._sink=t:(this._sink=new Xa,t&&DC(t)?this.toDOMStream({type:"bytes"}).pipeTo(t):t&&RC(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||!yh(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 _n&&!(e=t.schema))return this.finish()&&void 0;if(t instanceof hr&&!(e=t.schema))return this.finish()&&void 0}else throw new Error("RecordBatchWriter is closed");if(e&&!yh(e,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,e)}t instanceof hr?t instanceof wf||this._writeRecordBatch(t):t instanceof _n?this.writeAll(t.batches):ua(t)&&this.writeAll(t)}_writeMessage(t,e=8){const i=e-1,n=or.encode(t),s=n.byteLength,o=this._writeLegacyIpcFormat?4:8,a=s+o+i&~i,l=a-s-o;return t.headerType===fe.RecordBatch?this._recordBatchBlocks.push(new gn(a,t.bodyLength,this._position)):t.headerType===fe.DictionaryBatch&&this._dictionaryBlocks.push(new gn(a,t.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(a-o)),s>0&&this._write(n),this._writePadding(l)}_write(t){if(this._started){const e=le(t);e&&e.byteLength>0&&(this._sink.write(e),this._position+=e.byteLength)}return this}_writeSchema(t){return this._writeMessage(or.from(t))}_writeFooter(t){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(ea)}_writePadding(t){return t>0?this._write(new Uint8Array(t)):this}_writeRecordBatch(t){const{byteLength:e,nodes:i,bufferRegions:n,buffers:s}=Ne.assemble(t),o=new Pr(t.numRows,i,n),a=or.from(o,e);return this._writeDictionaries(t)._writeMessage(a)._writeBodyBuffers(s)}_writeDictionaryBatch(t,e,i=!1){const{byteLength:n,nodes:s,bufferRegions:o,buffers:a}=Ne.assemble(new Me([t])),l=new Pr(t.length,s,o),u=new Ii(l,e,i),c=or.from(u,n);return this._writeMessage(c)._writeBodyBuffers(a)}_writeBodyBuffers(t){let e,i,n;for(let s=-1,o=t.length;++s0&&(this._write(e),(n=(i+7&-8)-i)>0&&this._writePadding(n));return this}_writeDictionaries(t){var e,i;for(const[n,s]of t.dictionaries){const o=(e=s==null?void 0:s.data)!==null&&e!==void 0?e:[],a=this._seenDictionaries.get(n),l=(i=this._dictionaryDeltaOffsets.get(n))!==null&&i!==void 0?i:0;if(!a||a.data[0]!==o[0])for(const[u,c]of o.entries())this._writeDictionaryBatch(c,n,u>0);else if(li.writeAll(n)):ao(t)?Of(i,t):Af(i,t)}}class Cf extends A0{static writeAll(t){const e=new Cf;return ss(t)?t.then(i=>e.writeAll(i)):ao(t)?Of(e,t):Af(e,t)}constructor(){super(),this._autoDestroy=!0}_writeSchema(t){return this._writeMagic()._writePadding(2)}_writeDictionaryBatch(t,e,i=!1){if(!i&&this._seenDictionaries.has(e))throw new Error("The Arrow File format does not support replacement dictionaries. ");return super._writeDictionaryBatch(t,e,i)}_writeFooter(t){const e=ta.encode(new ta(t,ke.V5,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(t)._write(e)._write(Int32Array.of(e.byteLength))._writeMagic()}}function Af(r,t){let e=t;t instanceof _n&&(e=t.batches,r.reset(void 0,t.schema));for(const i of e)r.write(i);return r.finish()}function Of(r,t){return Zt(this,void 0,void 0,function*(){var e,i,n,s,o,a,l;try{for(e=!0,i=wi(t);n=yield i.next(),s=n.done,!s;e=!0){l=n.value,e=!1;const u=l;r.write(u)}}catch(u){o={error:u}}finally{try{!e&&!s&&(a=i.return)&&(yield a.call(i))}finally{if(o)throw o.error}}return r.finish()})}function s2(r,t="stream"){return(t==="stream"?Ef:Cf).writeAll(r).toUint8Array(!0)}var o2=Object.create,O0=Object.defineProperty,a2=Object.getOwnPropertyDescriptor,l2=Object.getOwnPropertyNames,u2=Object.getPrototypeOf,c2=Object.prototype.hasOwnProperty,h2=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),f2=(r,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of l2(t))!c2.call(r,n)&&n!==e&&O0(r,n,{get:()=>t[n],enumerable:!(i=a2(t,n))||i.enumerable});return r},d2=(r,t,e)=>(e=r!=null?o2(u2(r)):{},f2(!r||!r.__esModule?O0(e,"default",{value:r,enumerable:!0}):e,r)),p2=h2((r,t)=>{t.exports=Worker}),F0=(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))(F0||{}),m2=(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))(m2||{}),y2=(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))(y2||{}),g2=(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))(g2||{}),v2=(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))(v2||{}),_2=(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))(_2||{}),b2=class{log(r){}},P0=class{constructor(r=2){this.level=r}log(r){r.level>=this.level&&console.log(r)}},w2=(r=>(r[r.SUCCESS=0]="SUCCESS",r))(w2||{}),x2=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=Vr.from(t);return console.assert(e.isSync(),"Reader is not sync"),console.assert(e.isFile(),"Reader is not file"),new _n(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 i=new M0(this._bindings,this._conn,e),n=await Vr.from(i);return console.assert(n.isAsync()),console.assert(n.isStream()),n}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 S2(this._bindings,this._conn,t)}async insertArrowTable(r,t){let e=s2(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)}},M0=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}},S2=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=Vr.from(t);return console.assert(e.isSync()),console.assert(e.isFile()),new _n(e)}async send(...r){let t=await this.bindings.sendPrepared(this.connectionId,this.statementId,r),e=new M0(this.bindings,this.connectionId,t),i=await Vr.from(e);return console.assert(i.isAsync()),console.assert(i.isStream()),i}},T2=(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))(T2||{}),I2=(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))(I2||{}),ue=class{constructor(r,t){this.promiseResolver=()=>{},this.promiseRejecter=()=>{},this.type=r,this.data=t,this.promise=new Promise((e,i)=>{this.promiseResolver=e,this.promiseRejecter=i})}};function Ka(r){switch(r.typeId){case L.Binary:return{sqlType:"binary"};case L.Bool:return{sqlType:"bool"};case L.Date:return{sqlType:"date"};case L.DateDay:return{sqlType:"date32[d]"};case L.DateMillisecond:return{sqlType:"date64[ms]"};case L.Decimal:{let t=r;return{sqlType:"decimal",precision:t.precision,scale:t.scale}}case L.Float:return{sqlType:"float"};case L.Float16:return{sqlType:"float16"};case L.Float32:return{sqlType:"float32"};case L.Float64:return{sqlType:"float64"};case L.Int:return{sqlType:"int32"};case L.Int16:return{sqlType:"int16"};case L.Int32:return{sqlType:"int32"};case L.Int64:return{sqlType:"int64"};case L.Uint16:return{sqlType:"uint16"};case L.Uint32:return{sqlType:"uint32"};case L.Uint64:return{sqlType:"uint64"};case L.Uint8:return{sqlType:"uint8"};case L.IntervalDayTime:return{sqlType:"interval[dt]"};case L.IntervalYearMonth:return{sqlType:"interval[m]"};case L.List:return{sqlType:"list",valueType:Ka(r.valueType)};case L.FixedSizeBinary:return{sqlType:"fixedsizebinary",byteWidth:r.byteWidth};case L.Null:return{sqlType:"null"};case L.Utf8:return{sqlType:"utf8"};case L.Struct:return{sqlType:"struct",fields:r.children.map(t=>_h(t.name,t.type))};case L.Map:{let t=r;return{sqlType:"map",keyType:Ka(t.keyType),valueType:Ka(t.valueType)}}case L.Time:return{sqlType:"time[s]"};case L.TimeMicrosecond:return{sqlType:"time[us]"};case L.TimeMillisecond:return{sqlType:"time[ms]"};case L.TimeNanosecond:return{sqlType:"time[ns]"};case L.TimeSecond:return{sqlType:"time[s]"};case L.Timestamp:return{sqlType:"timestamp",timezone:r.timezone||void 0};case L.TimestampSecond:return{sqlType:"timestamp[s]",timezone:r.timezone||void 0};case L.TimestampMicrosecond:return{sqlType:"timestamp[us]",timezone:r.timezone||void 0};case L.TimestampNanosecond:return{sqlType:"timestamp[ns]",timezone:r.timezone||void 0};case L.TimestampMillisecond:return{sqlType:"timestamp[ms]",timezone:r.timezone||void 0}}throw new Error("unsupported arrow type: ".concat(r.toString()))}function _h(r,t){let e=Ka(t);return e.name=r,e}var E2=new TextEncoder,C2=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 n of this._onInstantiationProgress)n(e.data);return}}let i=this._pendingRequests.get(e.requestId);if(!i){console.warn("unassociated response: [".concat(e.requestId,", ").concat(e.type.toString(),"]"));return}if(this._pendingRequests.delete(e.requestId),e.type=="ERROR"){let n=new Error(e.data.message);n.name=e.data.name,(t=Object.getOwnPropertyDescriptor(n,"stack"))!=null&&t.writable&&(n.stack=e.data.stack),i.promiseRejecter(n);return}switch(i.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"){i.promiseResolver(e.data);return}break;case"INSTANTIATE":if(this._onInstantiationProgress=[],e.type=="OK"){i.promiseResolver(e.data);return}break;case"GLOB_FILE_INFOS":if(e.type=="FILE_INFOS"){i.promiseResolver(e.data);return}break;case"GET_VERSION":if(e.type=="VERSION_STRING"){i.promiseResolver(e.data);return}break;case"GET_FEATURE_FLAGS":if(e.type=="FEATURE_FLAGS"){i.promiseResolver(e.data);return}break;case"GET_TABLE_NAMES":if(e.type=="TABLE_NAMES"){i.promiseResolver(e.data);return}break;case"TOKENIZE":if(e.type=="SCRIPT_TOKENS"){i.promiseResolver(e.data);return}break;case"COPY_FILE_TO_BUFFER":if(e.type=="FILE_BUFFER"){i.promiseResolver(e.data);return}break;case"EXPORT_FILE_STATISTICS":if(e.type=="FILE_STATISTICS"){i.promiseResolver(e.data);return}break;case"CONNECT":if(e.type=="CONNECTION_INFO"){i.promiseResolver(e.data);return}break;case"RUN_PREPARED":case"RUN_QUERY":if(e.type=="QUERY_RESULT"){i.promiseResolver(e.data);return}break;case"SEND_PREPARED":if(e.type=="QUERY_RESULT_HEADER"){i.promiseResolver(e.data);return}break;case"START_PENDING_QUERY":if(e.type=="QUERY_RESULT_HEADER_OR_NULL"){i.promiseResolver(e.data);return}break;case"POLL_PENDING_QUERY":if(e.type=="QUERY_RESULT_HEADER_OR_NULL"){i.promiseResolver(e.data);return}break;case"CANCEL_PENDING_QUERY":if(this._onInstantiationProgress=[],e.type=="SUCCESS"){i.promiseResolver(e.data);return}break;case"FETCH_QUERY_RESULTS":if(e.type=="QUERY_RESULT_CHUNK"){i.promiseResolver(e.data);return}break;case"CREATE_PREPARED":if(e.type=="PREPARED_STATEMENT_ID"){i.promiseResolver(e.data);return}break}i.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 ue("RESET",null);return await this.postTask(r)}async ping(){let r=new ue("PING",null);await this.postTask(r)}async dropFile(r){let t=new ue("DROP_FILE",r);return await this.postTask(t)}async dropFiles(){let r=new ue("DROP_FILES",null);return await this.postTask(r)}async flushFiles(){let r=new ue("FLUSH_FILES",null);return await this.postTask(r)}async instantiate(r,t=null,e=i=>{}){this._onInstantiationProgress.push(e);let i=new ue("INSTANTIATE",[r,t]);return await this.postTask(i)}async getVersion(){let r=new ue("GET_VERSION",null);return await this.postTask(r)}async getFeatureFlags(){let r=new ue("GET_FEATURE_FLAGS",null);return await this.postTask(r)}async open(r){let t=new ue("OPEN",r);await this.postTask(t)}async tokenize(r){let t=new ue("TOKENIZE",r);return await this.postTask(t)}async connectInternal(){let r=new ue("CONNECT",null);return await this.postTask(r)}async connect(){let r=await this.connectInternal();return new x2(this,r)}async disconnect(r){let t=new ue("DISCONNECT",r);await this.postTask(t)}async runQuery(r,t){let e=new ue("RUN_QUERY",[r,t]);return await this.postTask(e)}async startPendingQuery(r,t,e=!1){let i=new ue("START_PENDING_QUERY",[r,t,e]);return await this.postTask(i)}async pollPendingQuery(r){let t=new ue("POLL_PENDING_QUERY",r);return await this.postTask(t)}async cancelPendingQuery(r){let t=new ue("CANCEL_PENDING_QUERY",r);return await this.postTask(t)}async fetchQueryResults(r){let t=new ue("FETCH_QUERY_RESULTS",r);return await this.postTask(t)}async getTableNames(r,t){let e=new ue("GET_TABLE_NAMES",[r,t]);return await this.postTask(e)}async createPrepared(r,t){let e=new ue("CREATE_PREPARED",[r,t]);return await this.postTask(e)}async closePrepared(r,t){let e=new ue("CLOSE_PREPARED",[r,t]);await this.postTask(e)}async runPrepared(r,t,e){let i=new ue("RUN_PREPARED",[r,t,e]);return await this.postTask(i)}async sendPrepared(r,t,e){let i=new ue("SEND_PREPARED",[r,t,e]);return await this.postTask(i)}async globFiles(r){let t=new ue("GLOB_FILE_INFOS",r);return await this.postTask(t)}async registerFileText(r,t){let e=E2.encode(t);await this.registerFileBuffer(r,e)}async registerFileURL(r,t,e,i){t===void 0&&(t=r);let n=new ue("REGISTER_FILE_URL",[r,t,e,i]);await this.postTask(n)}async registerEmptyFileBuffer(r){}async registerFileBuffer(r,t){let e=new ue("REGISTER_FILE_BUFFER",[r,t]);await this.postTask(e,[t.buffer])}async registerFileHandle(r,t,e,i){let n=new ue("REGISTER_FILE_HANDLE",[r,t,e,i]);await this.postTask(n,[])}async registerOPFSFileName(r){let t=new ue("REGISTER_OPFS_FILE_NAME",[r]);await this.postTask(t,[])}async collectFileStatistics(r,t){let e=new ue("COLLECT_FILE_STATISTICS",[r,t]);await this.postTask(e,[])}async exportFileStatistics(r){let t=new ue("EXPORT_FILE_STATISTICS",r);return await this.postTask(t,[])}async copyFileToBuffer(r){let t=new ue("COPY_FILE_TO_BUFFER",r);return await this.postTask(t)}async copyFileToPath(r,t){let e=new ue("COPY_FILE_TO_PATH",[r,t]);await this.postTask(e)}async insertArrowFromIPCStream(r,t,e){if(t.length==0)return;let i=new ue("INSERT_ARROW_FROM_IPC_STREAM",[r,t,e]);await this.postTask(i,[t.buffer])}async insertCSVFromPath(r,t,e){if(e.columns!==void 0){let n=[];for(let s in e.columns){let o=e.columns[s];n.push(_h(s,o))}e.columnsFlat=n,delete e.columns}let i=new ue("IMPORT_CSV_FROM_PATH",[r,t,e]);await this.postTask(i)}async insertJSONFromPath(r,t,e){if(e.columns!==void 0){let n=[];for(let s in e.columns){let o=e.columns[s];n.push(_h(s,o))}e.columnsFlat=n,delete e.columns}let i=new ue("IMPORT_JSON_FROM_PATH",[r,t,e]);await this.postTask(i)}};function A2(){let r=new TextDecoder;return t=>(typeof SharedArrayBuffer<"u"&&t.buffer instanceof SharedArrayBuffer&&(t=new Uint8Array(t)),r.decode(t))}A2();var O2=(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))(O2||{}),F2=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])),P2=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])),M2=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])),D2=()=>(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])),R2={version:"1.29.1-dev68.0"},Ff=R2.version.split(".");Ff[0];Ff[1];Ff[2];var N2=()=>typeof navigator>"u",tc=null,ec=null,rc=null,ic=null,nc=null;async function L2(){return tc==null&&(tc=typeof BigInt64Array<"u"),ec==null&&(ec=await P2()),rc==null&&(rc=await D2()),ic==null&&(ic=await M2()),nc==null&&(nc=await F2()),{bigInt64Array:tc,crossOriginIsolated:N2()||globalThis.crossOriginIsolated||!1,wasmExceptions:ec,wasmSIMD:ic,wasmThreads:rc,wasmBulkMemory:nc}}async function zp(r){let t=await L2();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}}d2(p2());const sc={},No={};function Uo(r,t){try{const i=(sc[r]||(sc[r]=new Intl.DateTimeFormat("en-GB",{timeZone:r,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return i in No?No[i]:jp(i,i.split(":"))}catch{if(r in No)return No[r];const e=r==null?void 0:r.match(B2);return e?jp(r,e.slice(1)):NaN}}const B2=/([+-]\d\d):?(\d\d)?/;function jp(r,t){const e=+t[0],i=+(t[1]||0);return No[r]=e>0?e*60+i:e*60-i}class Cr extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Uo(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)),D0(this),bh(this)):this.setTime(Date.now())}static tz(t,...e){return e.length?new Cr(...e,t):new Cr(Date.now(),t)}withTimeZone(t){return new Cr(+this,t)}getTimezoneOffset(){return-Uo(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),bh(this),+this}[Symbol.for("constructDateFrom")](t){return new Cr(+new Date(t),this.timeZone)}}const $p=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(r=>{if(!$p.test(r))return;const t=r.replace($p,"$1UTC");Cr.prototype[t]&&(r.startsWith("get")?Cr.prototype[r]=function(){return this.internal[t]()}:(Cr.prototype[r]=function(){return Date.prototype[t].apply(this.internal,arguments),k2(this),+this},Cr.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),bh(this),+this}))});function bh(r){r.internal.setTime(+r),r.internal.setUTCMinutes(r.internal.getUTCMinutes()-r.getTimezoneOffset())}function k2(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()),D0(r)}function D0(r){const t=Uo(r.timeZone,r),e=new Date(+r);e.setUTCHours(e.getUTCHours()-1);const i=-new Date(+r).getTimezoneOffset(),n=-new Date(+e).getTimezoneOffset(),s=i-n,o=Date.prototype.getHours.apply(r)!==r.internal.getUTCHours();s&&o&&r.internal.setUTCMinutes(r.internal.getUTCMinutes()+s);const a=i-t;a&&Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+a);const l=Uo(r.timeZone,r),c=-new Date(+r).getTimezoneOffset()-l,h=l!==t,p=c-a;if(h&&p){Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+p);const f=Uo(r.timeZone,r),y=l-f;y&&(r.internal.setUTCMinutes(r.internal.getUTCMinutes()+y),Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+y))}}const U2=new TextDecoder("utf-8"),z2=r=>U2.decode(r),j2=new TextEncoder,R0=r=>j2.encode(r),fi=r=>typeof r=="function",pa=r=>r!=null&&Object(r)===r,$2=r=>pa(r)&&fi(r.then),N0=r=>pa(r)&&fi(r[Symbol.iterator]),V2=r=>pa(r)&&fi(r[Symbol.asyncIterator]),G2=r=>pa(r)&&"done"in r&&"value"in r,W2=r=>pa(r)&&fi(r.clear)&&fi(r.bytes)&&fi(r.position)&&fi(r.setPosition)&&fi(r.capacity)&&fi(r.getBufferIdentifier)&&fi(r.createLong),Pf=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:ArrayBuffer;function H2(r){const t=r[0]?[r[0]]:[];let e,i,n,s;for(let o,a,l=0,u=0,c=r.length;++lc+h.byteLength,0);let n,s,o,a=0,l=-1;const u=Math.min(t||Number.POSITIVE_INFINITY,i);for(const c=e.length;++lrr(Int8Array,r),q2=r=>rr(Int16Array,r),Q2=r=>rr(Int32Array,r),K2=r=>rr(BigInt64Array,r),Z2=r=>rr(Uint8Array,r),J2=r=>rr(Uint16Array,r),tF=r=>rr(Uint32Array,r),eF=r=>rr(BigUint64Array,r),rF=r=>rr(Float32Array,r),iF=r=>rr(Float64Array,r),nF=r=>rr(Uint8ClampedArray,r),xh=r=>(r.next(),r);function*Fi(r,t){const e=function*(n){yield n},i=typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof Pf?e(t):N0(t)?t:e(t);return yield*xh(function*(n){let s=null;do s=n.next(yield rr(r,s));while(!s.done)}(i[Symbol.iterator]())),new r}const sF=r=>Fi(Int8Array,r),oF=r=>Fi(Int16Array,r),aF=r=>Fi(Int32Array,r),lF=r=>Fi(Uint8Array,r),uF=r=>Fi(Uint16Array,r),cF=r=>Fi(Uint32Array,r),hF=r=>Fi(Float32Array,r),fF=r=>Fi(Float64Array,r),dF=r=>Fi(Uint8ClampedArray,r);function ni(r,t){return fr(this,arguments,function*(){if($2(t))return yield Nt(yield Nt(yield*is(wi(ni(r,yield Nt(t))))));const i=function(o){return fr(this,arguments,function*(){yield yield Nt(yield Nt(o))})},n=function(o){return fr(this,arguments,function*(){yield Nt(yield*is(wi(xh(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 Pf?i(t):N0(t)?n(t):V2(t)?t:i(t);return yield Nt(yield*is(wi(xh(function(o){return fr(this,arguments,function*(){let a=null;do a=yield Nt(o.next(yield yield Nt(rr(r,a))));while(!a.done)})}(s[Symbol.asyncIterator]()))))),yield Nt(new r)})}const pF=r=>ni(Int8Array,r),mF=r=>ni(Int16Array,r),yF=r=>ni(Int32Array,r),gF=r=>ni(Uint8Array,r),vF=r=>ni(Uint16Array,r),_F=r=>ni(Uint32Array,r),bF=r=>ni(Float32Array,r),wF=r=>ni(Float64Array,r),xF=r=>ni(Uint8ClampedArray,r);function SF(r,t,e){if(r!==0){e=e.slice(0,t);for(let i=-1,n=e.length;++i0)do if(r[e]!==t[e])return!1;while(++eno(t))}]`:`[${r}]`:ArrayBuffer.isView(r)?`[${r}]`:JSON.stringify(r,(t,e)=>typeof e=="bigint"?`${e}`:e)}const EF=Object.freeze(Object.defineProperty({__proto__:null,valueToString:no},Symbol.toStringTag,{value:"Module"}));function Or(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 B0(r,t){return Or(r/t)+Or(r%t)/Or(t)}const k0=Symbol.for("isArrowBigNum");function si(r,...t){return t.length===0?Object.setPrototypeOf(rr(this.TypedArray,r),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(r,...t),this.constructor.prototype)}si.prototype[k0]=!0;si.prototype.toJSON=function(){return`"${so(this)}"`};si.prototype.valueOf=function(r){return Mf(this,r)};si.prototype.toString=function(){return so(this)};si.prototype[Symbol.toPrimitive]=function(r="default"){switch(r){case"number":return Mf(this);case"string":return so(this);case"default":return U0(this)}return so(this)};function Hs(...r){return si.apply(this,r)}function Ys(...r){return si.apply(this,r)}function ra(...r){return si.apply(this,r)}Object.setPrototypeOf(Hs.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(Ys.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(ra.prototype,Object.create(Uint32Array.prototype));Object.assign(Hs.prototype,si.prototype,{constructor:Hs,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array});Object.assign(Ys.prototype,si.prototype,{constructor:Ys,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array});Object.assign(ra.prototype,si.prototype,{constructor:ra,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const CF=BigInt(4294967296)*BigInt(4294967296),AF=CF-BigInt(1);function Mf(r,t){const{buffer:e,byteOffset:i,byteLength:n,signed:s}=r,o=new BigUint64Array(e,i,n/8),a=s&&o.at(-1)&BigInt(1)<0){const c=BigInt("1".padEnd(t+1,"0")),h=l/c,p=a?-(l%c):l%c,f=Or(h),y=`${p}`.padStart(t,"0");return+`${a&&f===0?"-":""}${f}.${y}`}return Or(l)}function so(r){if(r.byteLength===8)return`${new r.BigIntArray(r.buffer,r.byteOffset,1)[0]}`;if(!r.signed)return oc(r);let t=new Uint16Array(r.buffer,r.byteOffset,r.byteLength/2);if(new Int16Array([t.at(-1)])[0]>=0)return oc(r);t=t.slice();let i=1;for(let s=0;s(r.children=null,r.ArrayType=Array,r.OffsetArrayType=Int32Array,r[Symbol.toStringTag]="DataType"))(Et.prototype);class Vp extends Et{constructor(){super(W.Null)}toString(){return"Null"}}j0=Symbol.toStringTag;Vp[j0]=(r=>r[Symbol.toStringTag]="Null")(Vp.prototype);class Gp extends Et{constructor(t,e){super(W.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}`}}$0=Symbol.toStringTag;Gp[$0]=(r=>(r.isSigned=null,r.bitWidth=null,r[Symbol.toStringTag]="Int"))(Gp.prototype);class Wp extends Et{constructor(t){super(W.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}`}}V0=Symbol.toStringTag;Wp[V0]=(r=>(r.precision=null,r[Symbol.toStringTag]="Float"))(Wp.prototype);class Hp extends Et{constructor(){super(W.Binary)}toString(){return"Binary"}}G0=Symbol.toStringTag;Hp[G0]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Binary"))(Hp.prototype);class Yp extends Et{constructor(){super(W.LargeBinary)}toString(){return"LargeBinary"}}W0=Symbol.toStringTag;Yp[W0]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeBinary"))(Yp.prototype);class Xp extends Et{constructor(){super(W.Utf8)}toString(){return"Utf8"}}H0=Symbol.toStringTag;Xp[H0]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Utf8"))(Xp.prototype);class qp extends Et{constructor(){super(W.LargeUtf8)}toString(){return"LargeUtf8"}}Y0=Symbol.toStringTag;qp[Y0]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeUtf8"))(qp.prototype);class Qp extends Et{constructor(){super(W.Bool)}toString(){return"Bool"}}X0=Symbol.toStringTag;Qp[X0]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Bool"))(Qp.prototype);class Kp extends Et{constructor(t,e,i=128){super(W.Decimal),this.scale=t,this.precision=e,this.bitWidth=i}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}}q0=Symbol.toStringTag;Kp[q0]=(r=>(r.scale=null,r.precision=null,r.ArrayType=Uint32Array,r[Symbol.toStringTag]="Decimal"))(Kp.prototype);class Zp extends Et{constructor(t){super(W.Date),this.unit=t}toString(){return`Date${(this.unit+1)*32}<${wn[this.unit]}>`}get ArrayType(){return this.unit===wn.DAY?Int32Array:BigInt64Array}}Q0=Symbol.toStringTag;Zp[Q0]=(r=>(r.unit=null,r[Symbol.toStringTag]="Date"))(Zp.prototype);class Jp extends Et{constructor(t,e){super(W.Time),this.unit=t,this.bitWidth=e}toString(){return`Time${this.bitWidth}<${Jt[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}}K0=Symbol.toStringTag;Jp[K0]=(r=>(r.unit=null,r.bitWidth=null,r[Symbol.toStringTag]="Time"))(Jp.prototype);class tm extends Et{constructor(t,e){super(W.Timestamp),this.unit=t,this.timezone=e}toString(){return`Timestamp<${Jt[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}}Z0=Symbol.toStringTag;tm[Z0]=(r=>(r.unit=null,r.timezone=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Timestamp"))(tm.prototype);class em extends Et{constructor(t){super(W.Interval),this.unit=t}toString(){return`Interval<${Gr[this.unit]}>`}}J0=Symbol.toStringTag;em[J0]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Interval"))(em.prototype);class rm extends Et{constructor(t){super(W.Duration),this.unit=t}toString(){return`Duration<${Jt[this.unit]}>`}}tb=Symbol.toStringTag;rm[tb]=(r=>(r.unit=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Duration"))(rm.prototype);class im extends Et{constructor(t){super(W.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}}eb=Symbol.toStringTag;im[eb]=(r=>(r.children=null,r[Symbol.toStringTag]="List"))(im.prototype);class Sh extends Et{constructor(t){super(W.Struct),this.children=t}toString(){return`Struct<{${this.children.map(t=>`${t.name}:${t.type}`).join(", ")}}>`}}rb=Symbol.toStringTag;Sh[rb]=(r=>(r.children=null,r[Symbol.toStringTag]="Struct"))(Sh.prototype);class nm extends Et{constructor(t,e,i){super(W.Union),this.mode=t,this.children=i,this.typeIds=e=Int32Array.from(e),this.typeIdToChildIndex=e.reduce((n,s,o)=>(n[s]=o)&&n||n,Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(t=>`${t.type}`).join(" | ")}>`}}ib=Symbol.toStringTag;nm[ib]=(r=>(r.mode=null,r.typeIds=null,r.children=null,r.typeIdToChildIndex=null,r.ArrayType=Int8Array,r[Symbol.toStringTag]="Union"))(nm.prototype);class sm extends Et{constructor(t){super(W.FixedSizeBinary),this.byteWidth=t}toString(){return`FixedSizeBinary[${this.byteWidth}]`}}nb=Symbol.toStringTag;sm[nb]=(r=>(r.byteWidth=null,r.ArrayType=Uint8Array,r[Symbol.toStringTag]="FixedSizeBinary"))(sm.prototype);class om extends Et{constructor(t,e){super(W.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}>`}}sb=Symbol.toStringTag;om[sb]=(r=>(r.children=null,r.listSize=null,r[Symbol.toStringTag]="FixedSizeList"))(om.prototype);class am extends Et{constructor(t,e=!1){var i,n,s;if(super(W.Map),this.children=[t],this.keysSorted=e,t&&(t.name="entries",!((i=t==null?void 0:t.type)===null||i===void 0)&&i.children)){const o=(n=t==null?void 0:t.type)===null||n===void 0?void 0:n.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(", ")}}>`}}ob=Symbol.toStringTag;am[ob]=(r=>(r.children=null,r.keysSorted=null,r[Symbol.toStringTag]="Map_"))(am.prototype);const FF=(r=>()=>++r)(-1);class lm extends Et{constructor(t,e,i,n){super(W.Dictionary),this.indices=e,this.dictionary=t,this.isOrdered=n||!1,this.id=i==null?FF():Or(i)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}}ab=Symbol.toStringTag;lm[ab]=(r=>(r.id=null,r.indices=null,r.isOrdered=null,r.dictionary=null,r[Symbol.toStringTag]="Dictionary"))(lm.prototype);function lb(r){const t=r;switch(r.typeId){case W.Decimal:return r.bitWidth/32;case W.Interval:return t.unit===Gr.MONTH_DAY_NANO?4:1+t.unit;case W.FixedSizeList:return t.listSize;case W.FixedSizeBinary:return t.byteWidth;default:return 1}}class ae{visitMany(t,...e){return t.map((i,n)=>this.visit(i,...e.map(s=>s[n])))}visit(...t){return this.getVisitFn(t[0],!1).apply(this,t)}getVisitFn(t,e=!0){return PF(this,t,e)}getVisitFnByTypeId(t,e=!0){return Ds(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 PF(r,t,e=!0){return typeof t=="number"?Ds(r,t,e):typeof t=="string"&&t in W?Ds(r,W[t],e):t&&t instanceof Et?Ds(r,um(t),e):t!=null&&t.type&&t.type instanceof Et?Ds(r,um(t.type),e):Ds(r,W.NONE,e)}function Ds(r,t,e=!0){let i=null;switch(t){case W.Null:i=r.visitNull;break;case W.Bool:i=r.visitBool;break;case W.Int:i=r.visitInt;break;case W.Int8:i=r.visitInt8||r.visitInt;break;case W.Int16:i=r.visitInt16||r.visitInt;break;case W.Int32:i=r.visitInt32||r.visitInt;break;case W.Int64:i=r.visitInt64||r.visitInt;break;case W.Uint8:i=r.visitUint8||r.visitInt;break;case W.Uint16:i=r.visitUint16||r.visitInt;break;case W.Uint32:i=r.visitUint32||r.visitInt;break;case W.Uint64:i=r.visitUint64||r.visitInt;break;case W.Float:i=r.visitFloat;break;case W.Float16:i=r.visitFloat16||r.visitFloat;break;case W.Float32:i=r.visitFloat32||r.visitFloat;break;case W.Float64:i=r.visitFloat64||r.visitFloat;break;case W.Utf8:i=r.visitUtf8;break;case W.LargeUtf8:i=r.visitLargeUtf8;break;case W.Binary:i=r.visitBinary;break;case W.LargeBinary:i=r.visitLargeBinary;break;case W.FixedSizeBinary:i=r.visitFixedSizeBinary;break;case W.Date:i=r.visitDate;break;case W.DateDay:i=r.visitDateDay||r.visitDate;break;case W.DateMillisecond:i=r.visitDateMillisecond||r.visitDate;break;case W.Timestamp:i=r.visitTimestamp;break;case W.TimestampSecond:i=r.visitTimestampSecond||r.visitTimestamp;break;case W.TimestampMillisecond:i=r.visitTimestampMillisecond||r.visitTimestamp;break;case W.TimestampMicrosecond:i=r.visitTimestampMicrosecond||r.visitTimestamp;break;case W.TimestampNanosecond:i=r.visitTimestampNanosecond||r.visitTimestamp;break;case W.Time:i=r.visitTime;break;case W.TimeSecond:i=r.visitTimeSecond||r.visitTime;break;case W.TimeMillisecond:i=r.visitTimeMillisecond||r.visitTime;break;case W.TimeMicrosecond:i=r.visitTimeMicrosecond||r.visitTime;break;case W.TimeNanosecond:i=r.visitTimeNanosecond||r.visitTime;break;case W.Decimal:i=r.visitDecimal;break;case W.List:i=r.visitList;break;case W.Struct:i=r.visitStruct;break;case W.Union:i=r.visitUnion;break;case W.DenseUnion:i=r.visitDenseUnion||r.visitUnion;break;case W.SparseUnion:i=r.visitSparseUnion||r.visitUnion;break;case W.Dictionary:i=r.visitDictionary;break;case W.Interval:i=r.visitInterval;break;case W.IntervalDayTime:i=r.visitIntervalDayTime||r.visitInterval;break;case W.IntervalYearMonth:i=r.visitIntervalYearMonth||r.visitInterval;break;case W.IntervalMonthDayNano:i=r.visitIntervalMonthDayNano||r.visitInterval;break;case W.Duration:i=r.visitDuration;break;case W.DurationSecond:i=r.visitDurationSecond||r.visitDuration;break;case W.DurationMillisecond:i=r.visitDurationMillisecond||r.visitDuration;break;case W.DurationMicrosecond:i=r.visitDurationMicrosecond||r.visitDuration;break;case W.DurationNanosecond:i=r.visitDurationNanosecond||r.visitDuration;break;case W.FixedSizeList:i=r.visitFixedSizeList;break;case W.Map:i=r.visitMap;break}if(typeof i=="function")return i;if(!e)return()=>null;throw new Error(`Unrecognized type '${W[t]}'`)}function um(r){switch(r.typeId){case W.Null:return W.Null;case W.Int:{const{bitWidth:t,isSigned:e}=r;switch(t){case 8:return e?W.Int8:W.Uint8;case 16:return e?W.Int16:W.Uint16;case 32:return e?W.Int32:W.Uint32;case 64:return e?W.Int64:W.Uint64}return W.Int}case W.Float:switch(r.precision){case Ar.HALF:return W.Float16;case Ar.SINGLE:return W.Float32;case Ar.DOUBLE:return W.Float64}return W.Float;case W.Binary:return W.Binary;case W.LargeBinary:return W.LargeBinary;case W.Utf8:return W.Utf8;case W.LargeUtf8:return W.LargeUtf8;case W.Bool:return W.Bool;case W.Decimal:return W.Decimal;case W.Time:switch(r.unit){case Jt.SECOND:return W.TimeSecond;case Jt.MILLISECOND:return W.TimeMillisecond;case Jt.MICROSECOND:return W.TimeMicrosecond;case Jt.NANOSECOND:return W.TimeNanosecond}return W.Time;case W.Timestamp:switch(r.unit){case Jt.SECOND:return W.TimestampSecond;case Jt.MILLISECOND:return W.TimestampMillisecond;case Jt.MICROSECOND:return W.TimestampMicrosecond;case Jt.NANOSECOND:return W.TimestampNanosecond}return W.Timestamp;case W.Date:switch(r.unit){case wn.DAY:return W.DateDay;case wn.MILLISECOND:return W.DateMillisecond}return W.Date;case W.Interval:switch(r.unit){case Gr.DAY_TIME:return W.IntervalDayTime;case Gr.YEAR_MONTH:return W.IntervalYearMonth;case Gr.MONTH_DAY_NANO:return W.IntervalMonthDayNano}return W.Interval;case W.Duration:switch(r.unit){case Jt.SECOND:return W.DurationSecond;case Jt.MILLISECOND:return W.DurationMillisecond;case Jt.MICROSECOND:return W.DurationMicrosecond;case Jt.NANOSECOND:return W.DurationNanosecond}return W.Duration;case W.Map:return W.Map;case W.List:return W.List;case W.Struct:return W.Struct;case W.Union:switch(r.mode){case Ei.Dense:return W.DenseUnion;case Ei.Sparse:return W.SparseUnion}return W.Union;case W.FixedSizeBinary:return W.FixedSizeBinary;case W.FixedSizeList:return W.FixedSizeList;case W.Dictionary:return W.Dictionary}throw new Error(`Unrecognized type '${W[r.typeId]}'`)}ae.prototype.visitInt8=null;ae.prototype.visitInt16=null;ae.prototype.visitInt32=null;ae.prototype.visitInt64=null;ae.prototype.visitUint8=null;ae.prototype.visitUint16=null;ae.prototype.visitUint32=null;ae.prototype.visitUint64=null;ae.prototype.visitFloat16=null;ae.prototype.visitFloat32=null;ae.prototype.visitFloat64=null;ae.prototype.visitDateDay=null;ae.prototype.visitDateMillisecond=null;ae.prototype.visitTimestampSecond=null;ae.prototype.visitTimestampMillisecond=null;ae.prototype.visitTimestampMicrosecond=null;ae.prototype.visitTimestampNanosecond=null;ae.prototype.visitTimeSecond=null;ae.prototype.visitTimeMillisecond=null;ae.prototype.visitTimeMicrosecond=null;ae.prototype.visitTimeNanosecond=null;ae.prototype.visitDenseUnion=null;ae.prototype.visitSparseUnion=null;ae.prototype.visitIntervalDayTime=null;ae.prototype.visitIntervalYearMonth=null;ae.prototype.visitIntervalMonthDayNano=null;ae.prototype.visitDuration=null;ae.prototype.visitDurationSecond=null;ae.prototype.visitDurationMillisecond=null;ae.prototype.visitDurationMicrosecond=null;ae.prototype.visitDurationNanosecond=null;const ub=new Float64Array(1),bs=new Uint32Array(ub.buffer);function Df(r){const t=(r&31744)>>10,e=(r&1023)/1024,i=Math.pow(-1,(r&32768)>>15);switch(t){case 31:return i*(e?Number.NaN:1/0);case 0:return i*(e?6103515625e-14*e:0)}return i*Math.pow(2,t-15)*(1+e)}function cb(r){if(r!==r)return 32256;ub[0]=r;const t=(bs[1]&2147483648)>>16&65535;let e=bs[1]&2146435072,i=0;return e>=1089470464?bs[0]>0?e=31744:(e=(e&2080374784)>>16,i=(bs[1]&1048575)>>10):e<=1056964608?(i=1048576+(bs[1]&1048575),i=1048576+(i<<(e>>20)-998)>>21,e=0):(e=e-1056964608>>10,i=(bs[1]&1048575)+512>>10),t|e|i&65535}const MF=Object.freeze(Object.defineProperty({__proto__:null,float64ToUint16:cb,uint16ToFloat64:Df},Symbol.toStringTag,{value:"Module"}));class zt extends ae{}function Yt(r){return(t,e,i)=>{if(t.setValid(e,i!=null))return r(t,e,i)}}const DF=(r,t,e)=>{r[t]=Math.floor(e/864e5)},hb=(r,t,e,i)=>{if(e+1{const n=r+e;i?t[n>>3]|=1<>3]&=~(1<{r[t]=e},Rf=({values:r},t,e)=>{r[t]=e},fb=({values:r},t,e)=>{r[t]=cb(e)},NF=(r,t,e)=>{switch(r.type.precision){case Ar.HALF:return fb(r,t,e);case Ar.SINGLE:case Ar.DOUBLE:return Rf(r,t,e)}},db=({values:r},t,e)=>{DF(r,t,e.valueOf())},pb=({values:r},t,e)=>{r[t]=BigInt(e)},LF=({stride:r,values:t},e,i)=>{t.set(i.subarray(0,r),r*e)},mb=({values:r,valueOffsets:t},e,i)=>hb(r,t,e,i),yb=({values:r,valueOffsets:t},e,i)=>hb(r,t,e,R0(i)),BF=(r,t,e)=>{r.type.unit===wn.DAY?db(r,t,e):pb(r,t,e)},gb=({values:r},t,e)=>{r[t]=BigInt(e/1e3)},vb=({values:r},t,e)=>{r[t]=BigInt(e)},_b=({values:r},t,e)=>{r[t]=BigInt(e*1e3)},bb=({values:r},t,e)=>{r[t]=BigInt(e*1e6)},kF=(r,t,e)=>{switch(r.type.unit){case Jt.SECOND:return gb(r,t,e);case Jt.MILLISECOND:return vb(r,t,e);case Jt.MICROSECOND:return _b(r,t,e);case Jt.NANOSECOND:return bb(r,t,e)}},wb=({values:r},t,e)=>{r[t]=e},xb=({values:r},t,e)=>{r[t]=e},Sb=({values:r},t,e)=>{r[t]=e},Tb=({values:r},t,e)=>{r[t]=e},UF=(r,t,e)=>{switch(r.type.unit){case Jt.SECOND:return wb(r,t,e);case Jt.MILLISECOND:return xb(r,t,e);case Jt.MICROSECOND:return Sb(r,t,e);case Jt.NANOSECOND:return Tb(r,t,e)}},zF=({values:r,stride:t},e,i)=>{r.set(i.subarray(0,t),t*e)},jF=(r,t,e)=>{const i=r.children[0],n=r.valueOffsets,s=Ci.getVisitFn(i);if(Array.isArray(e))for(let o=-1,a=n[t],l=n[t+1];a{const i=r.children[0],{valueOffsets:n}=r,s=Ci.getVisitFn(i);let{[t]:o,[t+1]:a}=n;const l=e instanceof Map?e.entries():Object.entries(e);for(const u of l)if(s(i,o,u),++o>=a)break},VF=(r,t)=>(e,i,n,s)=>i&&e(i,r,t[s]),GF=(r,t)=>(e,i,n,s)=>i&&e(i,r,t.get(s)),WF=(r,t)=>(e,i,n,s)=>i&&e(i,r,t.get(n.name)),HF=(r,t)=>(e,i,n,s)=>i&&e(i,r,t[n.name]),YF=(r,t,e)=>{const i=r.type.children.map(s=>Ci.getVisitFn(s.type)),n=e instanceof Map?WF(t,e):e instanceof Qe?GF(t,e):Array.isArray(e)?VF(t,e):HF(t,e);r.type.children.forEach((s,o)=>n(i[o],r.children[o],s,o))},XF=(r,t,e)=>{r.type.mode===Ei.Dense?Ib(r,t,e):Eb(r,t,e)},Ib=(r,t,e)=>{const i=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[i];Ci.visit(n,r.valueOffsets[t],e)},Eb=(r,t,e)=>{const i=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[i];Ci.visit(n,t,e)},qF=(r,t,e)=>{var i;(i=r.dictionary)===null||i===void 0||i.set(r.values[t],e)},QF=(r,t,e)=>{switch(r.type.unit){case Gr.YEAR_MONTH:return Ab(r,t,e);case Gr.DAY_TIME:return Cb(r,t,e);case Gr.MONTH_DAY_NANO:return Ob(r,t,e)}},Cb=({values:r},t,e)=>{r.set(e.subarray(0,2),2*t)},Ab=({values:r},t,e)=>{r[t]=e[0]*12+e[1]%12},Ob=({values:r,stride:t},e,i)=>{r.set(i.subarray(0,t),t*e)},Fb=({values:r},t,e)=>{r[t]=e},Pb=({values:r},t,e)=>{r[t]=e},Mb=({values:r},t,e)=>{r[t]=e},Db=({values:r},t,e)=>{r[t]=e},KF=(r,t,e)=>{switch(r.type.unit){case Jt.SECOND:return Fb(r,t,e);case Jt.MILLISECOND:return Pb(r,t,e);case Jt.MICROSECOND:return Mb(r,t,e);case Jt.NANOSECOND:return Db(r,t,e)}},ZF=(r,t,e)=>{const{stride:i}=r,n=r.children[0],s=Ci.getVisitFn(n);if(Array.isArray(e))for(let o=-1,a=t*i;++o`${no(t)}: ${no(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new JF(this[Jr],this[Xs])}}class JF{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[Jr].type.children.some(i=>i.name===e)}getOwnPropertyDescriptor(t,e){if(t[Jr].type.children.some(i=>i.name===e))return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e];const i=t[Jr].type.children.findIndex(n=>n.name===e);if(i!==-1){const n=qr.visit(t[Jr].children[i],t[Xs]);return Reflect.set(t,e,n),n}}set(t,e,i){const n=t[Jr].type.children.findIndex(s=>s.name===e);return n!==-1?(Ci.visit(t[Jr].children[n],t[Xs],i),Reflect.set(t,e,i)):Reflect.has(t,e)||typeof e=="symbol"?Reflect.set(t,e,i):!1}}const eP=new tP;class Pt extends ae{}function jt(r){return(t,e)=>t.getValid(e)?r(t,e):null}const rP=(r,t)=>864e5*r[t],iP=(r,t)=>null,Rb=(r,t,e)=>{if(e+1>=t.length)return null;const i=Or(t[e]),n=Or(t[e+1]);return r.subarray(i,n)},nP=({offset:r,values:t},e)=>{const i=r+e;return(t[i>>3]&1<rP(r,t),Lb=({values:r},t)=>Or(r[t]),Tn=({stride:r,values:t},e)=>t[r*e],sP=({stride:r,values:t},e)=>Df(t[r*e]),Bb=({values:r},t)=>r[t],oP=({stride:r,values:t},e)=>t.subarray(r*e,r*(e+1)),kb=({values:r,valueOffsets:t},e)=>Rb(r,t,e),Ub=({values:r,valueOffsets:t},e)=>{const i=Rb(r,t,e);return i!==null?z2(i):null},aP=({values:r},t)=>r[t],lP=({type:r,values:t},e)=>r.precision!==Ar.HALF?t[e]:Df(t[e]),uP=(r,t)=>r.type.unit===wn.DAY?Nb(r,t):Lb(r,t),zb=({values:r},t)=>1e3*Or(r[t]),jb=({values:r},t)=>Or(r[t]),$b=({values:r},t)=>B0(r[t],BigInt(1e3)),Vb=({values:r},t)=>B0(r[t],BigInt(1e6)),cP=(r,t)=>{switch(r.type.unit){case Jt.SECOND:return zb(r,t);case Jt.MILLISECOND:return jb(r,t);case Jt.MICROSECOND:return $b(r,t);case Jt.NANOSECOND:return Vb(r,t)}},Gb=({values:r},t)=>r[t],Wb=({values:r},t)=>r[t],Hb=({values:r},t)=>r[t],Yb=({values:r},t)=>r[t],hP=(r,t)=>{switch(r.type.unit){case Jt.SECOND:return Gb(r,t);case Jt.MILLISECOND:return Wb(r,t);case Jt.MICROSECOND:return Hb(r,t);case Jt.NANOSECOND:return Yb(r,t)}},fP=({values:r,stride:t},e)=>au.decimal(r.subarray(t*e,t*(e+1))),dP=(r,t)=>{const{valueOffsets:e,stride:i,children:n}=r,{[t*i]:s,[t*i+1]:o}=e,l=n[0].slice(s,o-s);return new Qe([l])},pP=(r,t)=>{const{valueOffsets:e,children:i}=r,{[t]:n,[t+1]:s}=e,o=i[0];return new Lf(o.slice(n,s-n))},mP=(r,t)=>new Nf(r,t),yP=(r,t)=>r.type.mode===Ei.Dense?Xb(r,t):qb(r,t),Xb=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[e];return qr.visit(i,r.valueOffsets[t])},qb=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[e];return qr.visit(i,t)},gP=(r,t)=>{var e;return(e=r.dictionary)===null||e===void 0?void 0:e.get(r.values[t])},vP=(r,t)=>r.type.unit===Gr.MONTH_DAY_NANO?Zb(r,t):r.type.unit===Gr.DAY_TIME?Qb(r,t):Kb(r,t),Qb=({values:r},t)=>r.subarray(2*t,2*(t+1)),Kb=({values:r},t)=>{const e=r[t],i=new Int32Array(2);return i[0]=Math.trunc(e/12),i[1]=Math.trunc(e%12),i},Zb=({values:r},t)=>r.subarray(4*t,4*(t+1)),Jb=({values:r},t)=>r[t],tw=({values:r},t)=>r[t],ew=({values:r},t)=>r[t],rw=({values:r},t)=>r[t],_P=(r,t)=>{switch(r.type.unit){case Jt.SECOND:return Jb(r,t);case Jt.MILLISECOND:return tw(r,t);case Jt.MICROSECOND:return ew(r,t);case Jt.NANOSECOND:return rw(r,t)}},bP=(r,t)=>{const{stride:e,children:i}=r,s=i[0].slice(t*e,e);return new Qe([s])};Pt.prototype.visitNull=jt(iP);Pt.prototype.visitBool=jt(nP);Pt.prototype.visitInt=jt(aP);Pt.prototype.visitInt8=jt(Tn);Pt.prototype.visitInt16=jt(Tn);Pt.prototype.visitInt32=jt(Tn);Pt.prototype.visitInt64=jt(Bb);Pt.prototype.visitUint8=jt(Tn);Pt.prototype.visitUint16=jt(Tn);Pt.prototype.visitUint32=jt(Tn);Pt.prototype.visitUint64=jt(Bb);Pt.prototype.visitFloat=jt(lP);Pt.prototype.visitFloat16=jt(sP);Pt.prototype.visitFloat32=jt(Tn);Pt.prototype.visitFloat64=jt(Tn);Pt.prototype.visitUtf8=jt(Ub);Pt.prototype.visitLargeUtf8=jt(Ub);Pt.prototype.visitBinary=jt(kb);Pt.prototype.visitLargeBinary=jt(kb);Pt.prototype.visitFixedSizeBinary=jt(oP);Pt.prototype.visitDate=jt(uP);Pt.prototype.visitDateDay=jt(Nb);Pt.prototype.visitDateMillisecond=jt(Lb);Pt.prototype.visitTimestamp=jt(cP);Pt.prototype.visitTimestampSecond=jt(zb);Pt.prototype.visitTimestampMillisecond=jt(jb);Pt.prototype.visitTimestampMicrosecond=jt($b);Pt.prototype.visitTimestampNanosecond=jt(Vb);Pt.prototype.visitTime=jt(hP);Pt.prototype.visitTimeSecond=jt(Gb);Pt.prototype.visitTimeMillisecond=jt(Wb);Pt.prototype.visitTimeMicrosecond=jt(Hb);Pt.prototype.visitTimeNanosecond=jt(Yb);Pt.prototype.visitDecimal=jt(fP);Pt.prototype.visitList=jt(dP);Pt.prototype.visitStruct=jt(mP);Pt.prototype.visitUnion=jt(yP);Pt.prototype.visitDenseUnion=jt(Xb);Pt.prototype.visitSparseUnion=jt(qb);Pt.prototype.visitDictionary=jt(gP);Pt.prototype.visitInterval=jt(vP);Pt.prototype.visitIntervalDayTime=jt(Qb);Pt.prototype.visitIntervalYearMonth=jt(Kb);Pt.prototype.visitIntervalMonthDayNano=jt(Zb);Pt.prototype.visitDuration=jt(_P);Pt.prototype.visitDurationSecond=jt(Jb);Pt.prototype.visitDurationMillisecond=jt(tw);Pt.prototype.visitDurationMicrosecond=jt(ew);Pt.prototype.visitDurationNanosecond=jt(rw);Pt.prototype.visitFixedSizeList=jt(bP);Pt.prototype.visitMap=jt(pP);const qr=new Pt,Rs=Symbol.for("keys"),qs=Symbol.for("vals"),Ns=Symbol.for("kKeysAsStrings"),Th=Symbol.for("_kKeysAsStrings");class Lf{constructor(t){return this[Rs]=new Qe([t.children[0]]).memoize(),this[qs]=t.children[1],new Proxy(this,new xP)}get[Ns](){return this[Th]||(this[Th]=Array.from(this[Rs].toArray(),String))}[Symbol.iterator](){return new wP(this[Rs],this[qs])}get size(){return this[Rs].length}toArray(){return Object.values(this.toJSON())}toJSON(){const t=this[Rs],e=this[qs],i={};for(let n=-1,s=t.length;++n`${no(t)}: ${no(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}}class wP{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),qr.visit(this.vals,t)]})}}class xP{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(t){return t[Ns]}has(t,e){return t[Ns].includes(e)}getOwnPropertyDescriptor(t,e){if(t[Ns].indexOf(e)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e];const i=t[Ns].indexOf(e);if(i!==-1){const n=qr.visit(Reflect.get(t,qs),i);return Reflect.set(t,e,n),n}}set(t,e,i){const n=t[Ns].indexOf(e);return n!==-1?(Ci.visit(Reflect.get(t,qs),n,i),Reflect.set(t,e,i)):Reflect.has(t,e)?Reflect.set(t,e,i):!1}}Object.defineProperties(Lf.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[Rs]:{writable:!0,enumerable:!1,configurable:!1,value:null},[qs]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Th]:{writable:!0,enumerable:!1,configurable:!1,value:null}});let cm;function iw(r,t,e,i){const{length:n=0}=r;let s=typeof t!="number"?0:t,o=typeof e!="number"?n:e;return s<0&&(s=(s%n+n)%n),o<0&&(o=(o%n+n)%n),on&&(o=n),i?i(r,s,o):[s,o]}const nw=(r,t)=>r<0?t+r:r,hm=r=>r!==r;function fs(r){if(typeof r!=="object"||r===null)return hm(r)?hm:e=>e===r;if(r instanceof Date){const e=r.valueOf();return i=>i instanceof Date?i.valueOf()===e:!1}return ArrayBuffer.isView(r)?e=>e?L0(r,e):!1:r instanceof Map?TP(r):Array.isArray(r)?SP(r):r instanceof Qe?IP(r):EP(r,!0)}function SP(r){const t=[];for(let e=-1,i=r.length;++e!1;const i=[];for(let n=-1,s=e.length;++n{if(!e||typeof e!="object")return!1;switch(e.constructor){case Array:return CP(r,e);case Map:return fm(r,e,e.keys());case Lf:case Nf:case Object:case void 0:return fm(r,e,t||Object.keys(e))}return e instanceof Qe?AP(r,e):!1}}function CP(r,t){const e=r.length;if(t.length!==e)return!1;for(let i=-1;++i>i}function FP(r,t,e){return e?!!(r[t>>3]|=1<>3]&=~(1<0||e.byteLength>3):ow(new uu(e,r,t,null,Bf)).subarray(0,i)),n}return e}function ow(r){const t=[];let e=0,i=0,n=0;for(const o of r)o&&(n|=1<0)&&(t[e++]=n);const s=new Uint8Array(t.length+7&-8);return s.set(t),s}class uu{constructor(t,e,i,n,s){this.bytes=t,this.length=i,this.context=n,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,n=t+(t%8===0?0:8-t%8);return Ul(r,t,n)+Ul(r,i,e)+aw(r,n>>3,i-n>>3)}function aw(r,t,e){let i=0,n=Math.trunc(t);const s=new DataView(r.buffer,r.byteOffset,r.byteLength),o=e===void 0?r.byteLength:n+e;for(;o-n>=4;)i+=Za(s.getUint32(n)),n+=4;for(;o-n>=2;)i+=Za(s.getUint16(n)),n+=2;for(;o-n>=1;)i+=Za(s.getUint8(n)),n+=1;return i}function Za(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 PP=Object.freeze(Object.defineProperty({__proto__:null,BitIterator:uu,getBit:sw,getBool:Bf,packBools:ow,popcnt_array:aw,popcnt_bit_range:Ul,popcnt_uint32:Za,setBool:FP,truncateBitmap:Ih},Symbol.toStringTag,{value:"Module"})),MP=-1;class ia{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 Et.isSparseUnion(t)?this.children.some(e=>e.nullable):Et.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:i,nullBitmap:n,typeIds:s}=this;return e&&(t+=e.byteLength),i&&(t+=i.byteLength),n&&(t+=n.byteLength),s&&(t+=s.byteLength),this.children.reduce((o,a)=>o+a.byteLength,t)}get nullCount(){if(Et.isUnion(this.type))return this.children.reduce((i,n)=>i+n.nullCount,0);let t=this._nullCount,e;return t<=MP&&(e=this.nullBitmap)&&(this._nullCount=t=e.length===0?0:this.length-Ul(e,this.offset,this.offset+this.length)),t}constructor(t,e,i,n,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(i||0,0)),this._nullCount=Math.floor(Math.max(n||0,-1));let l;s instanceof ia?(this.stride=s.stride,this.values=s.values,this.typeIds=s.typeIds,this.nullBitmap=s.nullBitmap,this.valueOffsets=s.valueOffsets):(this.stride=lb(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(Et.isUnion(e)){const i=e,n=this.children[i.typeIdToChildIndex[this.typeIds[t]]],s=i.mode===Ei.Dense?this.valueOffsets[t]:t;return n.getValid(s)}if(this.nullable&&this.nullCount>0){const i=this.offset+t;return(this.nullBitmap[i>>3]&1<>3;(!s||s.byteLength<=c)&&(s=new Uint8Array((o+a+63&-64)>>3).fill(255),this.nullCount>0?(s.set(Ih(o,a,this.nullBitmap),0),Object.assign(this,{nullBitmap:s})):Object.assign(this,{nullBitmap:s,_nullCount:0}));const h=s[c];i=(h&u)!==0,s[c]=e?h|u:h&~u}return i!==!!e&&(this._nullCount=this.nullCount+(e?-1:1)),e}clone(t=this.type,e=this.offset,i=this.length,n=this._nullCount,s=this,o=this.children){return new ia(t,e,i,n,s,o,this.dictionary)}slice(t,e){const{stride:i,typeId:n,children:s}=this,o=+(this._nullCount===0)-1,a=n===16?i:1,l=this._sliceBuffers(t,e,i,n);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===W.Null)return this.clone(this.type,0,t,0);const{length:e,nullCount:i}=this,n=new Uint8Array((t+63&-64)>>3).fill(255,0,e>>3);n[e>>3]=(1<0&&n.set(Ih(this.offset,e,this.nullBitmap),0);const s=this.buffers;return s[ji.VALIDITY]=n,this.clone(this.type,0,t,i+(t-e),s)}_sliceBuffers(t,e,i,n){let s;const{buffers:o}=this;return(s=o[ji.TYPE])&&(o[ji.TYPE]=s.subarray(t,t+e)),(s=o[ji.OFFSET])&&(o[ji.OFFSET]=s.subarray(t,t+e+1))||(s=o[ji.DATA])&&(o[ji.DATA]=n===6?s:s.subarray(i*t,i*(t+e))),o}_sliceChildren(t,e,i){return t.map(n=>n.slice(e,i))}}ia.prototype.children=Object.freeze([]);class dm{constructor(t=0,e){this.numChunks=t,this.getChunkIterator=e,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndext.nullable)}function RP(r){return r.reduce((t,e)=>t+e.nullCount,0)}function NP(r){return r.reduce((t,e,i)=>(t[i+1]=t[i]+e.length,t),new Uint32Array(r.length+1))}function LP(r,t,e,i){const n=[];for(let s=-1,o=r.length;++s=i)break;if(e>=l+u)continue;if(l>=e&&l+u<=i){n.push(a);continue}const c=Math.max(0,e-l),h=Math.min(i-l,u);n.push(a.slice(c,h-c))}return n.length===0&&n.push(r[0].slice(0,0)),n}function kf(r,t,e,i){let n=0,s=0,o=t.length-1;do{if(n>=o-1)return e0?0:-1}function zP(r,t){const{nullBitmap:e}=r;if(!e||r.nullCount<=0)return-1;let i=0;for(const n of new uu(e,r.offset+(t||0),r.length,e,Bf)){if(!n)return i;++i}return-1}function Qt(r,t,e){if(t===void 0)return-1;if(t===null)switch(r.typeId){case W.Union:break;case W.Dictionary:break;default:return zP(r,e)}const i=qr.getVisitFn(r),n=fs(t);for(let s=(e||0)-1,o=r.length;++s{const n=r.data[i];return n.values.subarray(0,n.length)[Symbol.iterator]()});let e=0;return new dm(r.data.length,i=>{const s=r.data[i].length,o=r.slice(e,e+s);return e+=s,new jP(o)})}class jP{constructor(t){this.vector=t,this.index=0}next(){return this.indexa.data):t;if(s.length===0||s.some(a=>!(a instanceof ia)))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}=hw[o.typeId],c=s[0];this.isValid=h=>lw(c,h),this.get=h=>a(c,h),this.set=(h,p)=>l(c,h,p),this.indexOf=h=>u(c,h),this._offsets=[0,c.length];break}default:Object.setPrototypeOf(this,fw[o.typeId]),this._offsets=NP(s);break}this.data=s,this.type=o,this.stride=lb(o),this.numChildren=(n=(i=o.children)===null||i===void 0?void 0:i.length)!==null&&n!==void 0?n:0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce((t,e)=>t+e.byteLength,0)}get nullable(){return DP(this.data)}get nullCount(){return RP(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${W[this.type.typeId]}Vector`}isValid(t){return!1}get(t){return null}at(t){return this.get(nw(t,this.length))}set(t,e){}indexOf(t,e){return-1}includes(t,e){return this.indexOf(t,e)>-1}[Symbol.iterator](){return $P.visit(this)}concat(...t){return new Qe(this.data.concat(t.flatMap(e=>e.data).flat(Number.POSITIVE_INFINITY)))}slice(t,e){return new Qe(iw(this,t,e,({data:i,_offsets:n},s,o)=>LP(i,n,s,o)))}toJSON(){return[...this]}toArray(){const{type:t,data:e,length:i,stride:n,ArrayType:s}=this;switch(t.typeId){case W.Int:case W.Float:case W.Decimal:case W.Time:case W.Timestamp:switch(e.length){case 0:return new s;case 1:return e[0].values.subarray(0,i*n);default:return e.reduce((o,{values:a,length:l})=>(o.array.set(a.subarray(0,l*n),o.offset),o.offset+=l*n,o),{array:new s(i*n),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(i=>i.name===t))}getChildAt(t){return t>-1&&te[t])):null}get isMemoized(){return Et.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(Et.isDictionary(this.type)){const t=new zl(this.data[0].dictionary),e=this.data.map(i=>{const n=i.clone();return n.dictionary=t,n});return new Qe(e)}return new zl(this)}unmemoize(){if(Et.isDictionary(this.type)&&this.isMemoized){const t=this.data[0].dictionary.unmemoize(),e=this.data.map(i=>{const n=i.clone();return n.dictionary=t,n});return new Qe(e)}return this}}cw=Symbol.toStringTag;Qe[cw]=(r=>{r.type=Et.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(W).map(e=>W[e]).filter(e=>typeof e=="number"&&e!==W.NONE);for(const e of t){const i=qr.getVisitFnByTypeId(e),n=Ci.getVisitFnByTypeId(e),s=mm.getVisitFnByTypeId(e);hw[e]={get:i,set:n,indexOf:s},fw[e]=Object.create(r,{isValid:{value:pm(lw)},get:{value:pm(qr.getVisitFnByTypeId(e))},set:{value:BP(Ci.getVisitFnByTypeId(e))},indexOf:{value:kP(mm.getVisitFnByTypeId(e))}})}return"Vector"})(Qe.prototype);class zl extends Qe{constructor(t){super(t.data);const e=this.get,i=this.set,n=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){i.call(this,o,a),s[o]=a}}),Object.defineProperty(this,"slice",{value:(o,a)=>new zl(n.call(this,o,a))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new Qe(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}}const VP=65536;function ks(r){return r<0&&(r=4294967295+r+1),`0x${r.toString(16)}`}const oo=8,Uf=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8];class zf{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]),i=new Uint32Array([t.buffer[1]>>>16,t.buffer[1]&65535,t.buffer[0]>>>16,t.buffer[0]&65535]);let n=e[3]*i[3];this.buffer[0]=n&65535;let s=n>>>16;return n=e[2]*i[3],s+=n,n=e[3]*i[2]>>>0,s+=n,this.buffer[0]+=s<<16,this.buffer[1]=s>>>0>>16,this.buffer[1]+=e[1]*i[3]+e[2]*i[2]+e[3]*i[1],this.buffer[1]+=e[0]*i[3]+e[1]*i[2]+e[2]*i[1]+e[3]*i[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`${ks(this.buffer[3])} ${ks(this.buffer[2])} ${ks(this.buffer[1])} ${ks(this.buffer[0])}`}static multiply(t,e){return new hi(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new hi(new Uint32Array(t.buffer)).plus(e)}static from(t,e=new Uint32Array(4)){return hi.fromString(typeof t=="string"?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(4)){return hi.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(4)){const i=t.startsWith("-"),n=t.length,s=new hi(e);for(let o=i?1:0;o>BigInt(32))):o+=2}return n}function YP(r){const t=r.length,e=new Array(t/2);for(let i=0,n=0;i>>0);i[s++]={months:r[n],days:r[n+1],nanoseconds:t?`${o}`:o}}return i}const qP=Object.freeze(Object.defineProperty({__proto__:null,toIntervalDayTimeInt32Array:WP,toIntervalDayTimeObjects:YP,toIntervalMonthDayNanoInt32Array:HP,toIntervalMonthDayNanoObjects:XP},Symbol.toStringTag,{value:"Module"}));class Rt extends ae{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((i,n)=>this.compareFields(i,e[n]))}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 lr(r,t){return t instanceof r.constructor}function ds(r,t){return r===t||lr(r,t)}function Ki(r,t){return r===t||lr(r,t)&&r.bitWidth===t.bitWidth&&r.isSigned===t.isSigned}function cu(r,t){return r===t||lr(r,t)&&r.precision===t.precision}function QP(r,t){return r===t||lr(r,t)&&r.byteWidth===t.byteWidth}function jf(r,t){return r===t||lr(r,t)&&r.unit===t.unit}function ma(r,t){return r===t||lr(r,t)&&r.unit===t.unit&&r.timezone===t.timezone}function ya(r,t){return r===t||lr(r,t)&&r.unit===t.unit&&r.bitWidth===t.bitWidth}function KP(r,t){return r===t||lr(r,t)&&r.children.length===t.children.length&&Ai.compareManyFields(r.children,t.children)}function ZP(r,t){return r===t||lr(r,t)&&r.children.length===t.children.length&&Ai.compareManyFields(r.children,t.children)}function $f(r,t){return r===t||lr(r,t)&&r.mode===t.mode&&r.typeIds.every((e,i)=>e===t.typeIds[i])&&Ai.compareManyFields(r.children,t.children)}function JP(r,t){return r===t||lr(r,t)&&r.id===t.id&&r.isOrdered===t.isOrdered&&Ai.visit(r.indices,t.indices)&&Ai.visit(r.dictionary,t.dictionary)}function hu(r,t){return r===t||lr(r,t)&&r.unit===t.unit}function ga(r,t){return r===t||lr(r,t)&&r.unit===t.unit}function tM(r,t){return r===t||lr(r,t)&&r.listSize===t.listSize&&r.children.length===t.children.length&&Ai.compareManyFields(r.children,t.children)}function eM(r,t){return r===t||lr(r,t)&&r.keysSorted===t.keysSorted&&r.children.length===t.children.length&&Ai.compareManyFields(r.children,t.children)}Rt.prototype.visitNull=ds;Rt.prototype.visitBool=ds;Rt.prototype.visitInt=Ki;Rt.prototype.visitInt8=Ki;Rt.prototype.visitInt16=Ki;Rt.prototype.visitInt32=Ki;Rt.prototype.visitInt64=Ki;Rt.prototype.visitUint8=Ki;Rt.prototype.visitUint16=Ki;Rt.prototype.visitUint32=Ki;Rt.prototype.visitUint64=Ki;Rt.prototype.visitFloat=cu;Rt.prototype.visitFloat16=cu;Rt.prototype.visitFloat32=cu;Rt.prototype.visitFloat64=cu;Rt.prototype.visitUtf8=ds;Rt.prototype.visitLargeUtf8=ds;Rt.prototype.visitBinary=ds;Rt.prototype.visitLargeBinary=ds;Rt.prototype.visitFixedSizeBinary=QP;Rt.prototype.visitDate=jf;Rt.prototype.visitDateDay=jf;Rt.prototype.visitDateMillisecond=jf;Rt.prototype.visitTimestamp=ma;Rt.prototype.visitTimestampSecond=ma;Rt.prototype.visitTimestampMillisecond=ma;Rt.prototype.visitTimestampMicrosecond=ma;Rt.prototype.visitTimestampNanosecond=ma;Rt.prototype.visitTime=ya;Rt.prototype.visitTimeSecond=ya;Rt.prototype.visitTimeMillisecond=ya;Rt.prototype.visitTimeMicrosecond=ya;Rt.prototype.visitTimeNanosecond=ya;Rt.prototype.visitDecimal=ds;Rt.prototype.visitList=KP;Rt.prototype.visitStruct=ZP;Rt.prototype.visitUnion=$f;Rt.prototype.visitDenseUnion=$f;Rt.prototype.visitSparseUnion=$f;Rt.prototype.visitDictionary=JP;Rt.prototype.visitInterval=hu;Rt.prototype.visitIntervalDayTime=hu;Rt.prototype.visitIntervalYearMonth=hu;Rt.prototype.visitIntervalMonthDayNano=hu;Rt.prototype.visitDuration=ga;Rt.prototype.visitDurationSecond=ga;Rt.prototype.visitDurationMillisecond=ga;Rt.prototype.visitDurationMicrosecond=ga;Rt.prototype.visitDurationNanosecond=ga;Rt.prototype.visitFixedSizeList=tM;Rt.prototype.visitMap=eM;const Ai=new Rt;function rM(r,t){return Ai.compareSchemas(r,t)}function iM(r,t){return Ai.compareFields(r,t)}function nM(r,t){return Ai.visit(r,t)}const ym=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},OF),GP),PP),MF),TF),OP),EF),qP),{compareSchemas:rM,compareFields:iM,compareTypes:nM}),dw=6048e5,sM=864e5,gm=Symbol.for("constructDateFrom");function Wi(r,t){return typeof r=="function"?r(t):r&&typeof r=="object"&&gm in r?r[gm](t):r instanceof Date?new r.constructor(t):new Date(t)}function Qr(r,t){return Wi(t||r,r)}let oM={};function fu(){return oM}function na(r,t){var a,l,u,c;const e=fu(),i=(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,n=Qr(r,t==null?void 0:t.in),s=n.getDay(),o=(s=s.getTime()?i+1:e.getTime()>=a.getTime()?i:i-1}function vm(r){const t=Qr(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 aM(r,...t){const e=Wi.bind(null,t.find(i=>typeof i=="object"));return t.map(e)}function _m(r,t){const e=Qr(r,t==null?void 0:t.in);return e.setHours(0,0,0,0),e}function lM(r,t,e){const[i,n]=aM(e==null?void 0:e.in,r,t),s=_m(i),o=_m(n),a=+s-vm(s),l=+o-vm(o);return Math.round((a-l)/sM)}function uM(r,t){const e=pw(r,t),i=Wi(r,0);return i.setFullYear(e,0,4),i.setHours(0,0,0,0),jl(i)}function cM(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function hM(r){return!(!cM(r)&&typeof r!="number"||isNaN(+Qr(r)))}function fM(r,t){const e=Qr(r,t==null?void 0:t.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const dM={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"}},pM=(r,t,e)=>{let i;const n=dM[r];return typeof n=="string"?i=n:t===1?i=n.one:i=n.other.replace("{{count}}",t.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+i:i+" ago":i};function ac(r){return(t={})=>{const e=t.width?String(t.width):r.defaultWidth;return r.formats[e]||r.formats[r.defaultWidth]}}const mM={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},yM={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},gM={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},vM={date:ac({formats:mM,defaultWidth:"full"}),time:ac({formats:yM,defaultWidth:"full"}),dateTime:ac({formats:gM,defaultWidth:"full"})},_M={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},bM=(r,t,e,i)=>_M[r];function bo(r){return(t,e)=>{const i=e!=null&&e.context?String(e.context):"standalone";let n;if(i==="formatting"&&r.formattingValues){const o=r.defaultFormattingWidth||r.defaultWidth,a=e!=null&&e.width?String(e.width):o;n=r.formattingValues[a]||r.formattingValues[o]}else{const o=r.defaultWidth,a=e!=null&&e.width?String(e.width):r.defaultWidth;n=r.values[a]||r.values[o]}const s=r.argumentCallback?r.argumentCallback(t):t;return n[s]}}const wM={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},xM={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},SM={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"]},TM={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"]},IM={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"}},EM={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"}},CM=(r,t)=>{const e=Number(r),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},AM={ordinalNumber:CM,era:bo({values:wM,defaultWidth:"wide"}),quarter:bo({values:xM,defaultWidth:"wide",argumentCallback:r=>r-1}),month:bo({values:SM,defaultWidth:"wide"}),day:bo({values:TM,defaultWidth:"wide"}),dayPeriod:bo({values:IM,defaultWidth:"wide",formattingValues:EM,defaultFormattingWidth:"wide"})};function wo(r){return(t,e={})=>{const i=e.width,n=i&&r.matchPatterns[i]||r.matchPatterns[r.defaultMatchWidth],s=t.match(n);if(!s)return null;const o=s[0],a=i&&r.parsePatterns[i]||r.parsePatterns[r.defaultParseWidth],l=Array.isArray(a)?FM(a,h=>h.test(o)):OM(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 OM(r,t){for(const e in r)if(Object.prototype.hasOwnProperty.call(r,e)&&t(r[e]))return e}function FM(r,t){for(let e=0;e{const i=t.match(r.matchPattern);if(!i)return null;const n=i[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(n.length);return{value:o,rest:a}}}const MM=/^(\d+)(th|st|nd|rd)?/i,DM=/\d+/i,RM={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},NM={any:[/^b/i,/^(a|c)/i]},LM={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},BM={any:[/1/i,/2/i,/3/i,/4/i]},kM={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},UM={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]},zM={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},jM={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]},$M={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},VM={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}},GM={ordinalNumber:PM({matchPattern:MM,parsePattern:DM,valueCallback:r=>parseInt(r,10)}),era:wo({matchPatterns:RM,defaultMatchWidth:"wide",parsePatterns:NM,defaultParseWidth:"any"}),quarter:wo({matchPatterns:LM,defaultMatchWidth:"wide",parsePatterns:BM,defaultParseWidth:"any",valueCallback:r=>r+1}),month:wo({matchPatterns:kM,defaultMatchWidth:"wide",parsePatterns:UM,defaultParseWidth:"any"}),day:wo({matchPatterns:zM,defaultMatchWidth:"wide",parsePatterns:jM,defaultParseWidth:"any"}),dayPeriod:wo({matchPatterns:$M,defaultMatchWidth:"any",parsePatterns:VM,defaultParseWidth:"any"})},WM={code:"en-US",formatDistance:pM,formatLong:vM,formatRelative:bM,localize:AM,match:GM,options:{weekStartsOn:0,firstWeekContainsDate:1}};function HM(r,t){const e=Qr(r,t==null?void 0:t.in);return lM(e,fM(e))+1}function YM(r,t){const e=Qr(r,t==null?void 0:t.in),i=+jl(e)-+uM(e);return Math.round(i/dw)+1}function mw(r,t){var c,h,p,f;const e=Qr(r,t==null?void 0:t.in),i=e.getFullYear(),n=fu(),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)??n.firstWeekContainsDate??((f=(p=n.locale)==null?void 0:p.options)==null?void 0:f.firstWeekContainsDate)??1,o=Wi((t==null?void 0:t.in)||r,0);o.setFullYear(i+1,0,s),o.setHours(0,0,0,0);const a=na(o,t),l=Wi((t==null?void 0:t.in)||r,0);l.setFullYear(i,0,s),l.setHours(0,0,0,0);const u=na(l,t);return+e>=+a?i+1:+e>=+u?i:i-1}function XM(r,t){var a,l,u,c;const e=fu(),i=(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,n=mw(r,t),s=Wi((t==null?void 0:t.in)||r,0);return s.setFullYear(n,0,i),s.setHours(0,0,0,0),na(s,t)}function qM(r,t){const e=Qr(r,t==null?void 0:t.in),i=+na(e,t)-+XM(e,t);return Math.round(i/dw)+1}function ve(r,t){const e=r<0?"-":"",i=Math.abs(r).toString().padStart(t,"0");return e+i}const nn={y(r,t){const e=r.getFullYear(),i=e>0?e:1-e;return ve(t==="yy"?i%100:i,t.length)},M(r,t){const e=r.getMonth();return t==="M"?String(e+1):ve(e+1,2)},d(r,t){return ve(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 ve(r.getHours()%12||12,t.length)},H(r,t){return ve(r.getHours(),t.length)},m(r,t){return ve(r.getMinutes(),t.length)},s(r,t){return ve(r.getSeconds(),t.length)},S(r,t){const e=t.length,i=r.getMilliseconds(),n=Math.trunc(i*Math.pow(10,e-3));return ve(n,t.length)}},ws={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},bm={G:function(r,t,e){const i=r.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(i,{width:"abbreviated"});case"GGGGG":return e.era(i,{width:"narrow"});case"GGGG":default:return e.era(i,{width:"wide"})}},y:function(r,t,e){if(t==="yo"){const i=r.getFullYear(),n=i>0?i:1-i;return e.ordinalNumber(n,{unit:"year"})}return nn.y(r,t)},Y:function(r,t,e,i){const n=mw(r,i),s=n>0?n:1-n;if(t==="YY"){const o=s%100;return ve(o,2)}return t==="Yo"?e.ordinalNumber(s,{unit:"year"}):ve(s,t.length)},R:function(r,t){const e=pw(r);return ve(e,t.length)},u:function(r,t){const e=r.getFullYear();return ve(e,t.length)},Q:function(r,t,e){const i=Math.ceil((r.getMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return ve(i,2);case"Qo":return e.ordinalNumber(i,{unit:"quarter"});case"QQQ":return e.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(i,{width:"wide",context:"formatting"})}},q:function(r,t,e){const i=Math.ceil((r.getMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return ve(i,2);case"qo":return e.ordinalNumber(i,{unit:"quarter"});case"qqq":return e.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(i,{width:"wide",context:"standalone"})}},M:function(r,t,e){const i=r.getMonth();switch(t){case"M":case"MM":return nn.M(r,t);case"Mo":return e.ordinalNumber(i+1,{unit:"month"});case"MMM":return e.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(i,{width:"wide",context:"formatting"})}},L:function(r,t,e){const i=r.getMonth();switch(t){case"L":return String(i+1);case"LL":return ve(i+1,2);case"Lo":return e.ordinalNumber(i+1,{unit:"month"});case"LLL":return e.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(i,{width:"wide",context:"standalone"})}},w:function(r,t,e,i){const n=qM(r,i);return t==="wo"?e.ordinalNumber(n,{unit:"week"}):ve(n,t.length)},I:function(r,t,e){const i=YM(r);return t==="Io"?e.ordinalNumber(i,{unit:"week"}):ve(i,t.length)},d:function(r,t,e){return t==="do"?e.ordinalNumber(r.getDate(),{unit:"date"}):nn.d(r,t)},D:function(r,t,e){const i=HM(r);return t==="Do"?e.ordinalNumber(i,{unit:"dayOfYear"}):ve(i,t.length)},E:function(r,t,e){const i=r.getDay();switch(t){case"E":case"EE":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"})}},e:function(r,t,e,i){const n=r.getDay(),s=(n-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return ve(s,2);case"eo":return e.ordinalNumber(s,{unit:"day"});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"})}},c:function(r,t,e,i){const n=r.getDay(),s=(n-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return ve(s,t.length);case"co":return e.ordinalNumber(s,{unit:"day"});case"ccc":return e.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(n,{width:"narrow",context:"standalone"});case"cccccc":return e.day(n,{width:"short",context:"standalone"});case"cccc":default:return e.day(n,{width:"wide",context:"standalone"})}},i:function(r,t,e){const i=r.getDay(),n=i===0?7:i;switch(t){case"i":return String(n);case"ii":return ve(n,t.length);case"io":return e.ordinalNumber(n,{unit:"day"});case"iii":return e.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(i,{width:"short",context:"formatting"});case"iiii":default:return e.day(i,{width:"wide",context:"formatting"})}},a:function(r,t,e){const n=r.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(r,t,e){const i=r.getHours();let n;switch(i===12?n=ws.noon:i===0?n=ws.midnight:n=i/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(r,t,e){const i=r.getHours();let n;switch(i>=17?n=ws.evening:i>=12?n=ws.afternoon:i>=4?n=ws.morning:n=ws.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(r,t,e){if(t==="ho"){let i=r.getHours()%12;return i===0&&(i=12),e.ordinalNumber(i,{unit:"hour"})}return nn.h(r,t)},H:function(r,t,e){return t==="Ho"?e.ordinalNumber(r.getHours(),{unit:"hour"}):nn.H(r,t)},K:function(r,t,e){const i=r.getHours()%12;return t==="Ko"?e.ordinalNumber(i,{unit:"hour"}):ve(i,t.length)},k:function(r,t,e){let i=r.getHours();return i===0&&(i=24),t==="ko"?e.ordinalNumber(i,{unit:"hour"}):ve(i,t.length)},m:function(r,t,e){return t==="mo"?e.ordinalNumber(r.getMinutes(),{unit:"minute"}):nn.m(r,t)},s:function(r,t,e){return t==="so"?e.ordinalNumber(r.getSeconds(),{unit:"second"}):nn.s(r,t)},S:function(r,t){return nn.S(r,t)},X:function(r,t,e){const i=r.getTimezoneOffset();if(i===0)return"Z";switch(t){case"X":return xm(i);case"XXXX":case"XX":return Wn(i);case"XXXXX":case"XXX":default:return Wn(i,":")}},x:function(r,t,e){const i=r.getTimezoneOffset();switch(t){case"x":return xm(i);case"xxxx":case"xx":return Wn(i);case"xxxxx":case"xxx":default:return Wn(i,":")}},O:function(r,t,e){const i=r.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+wm(i,":");case"OOOO":default:return"GMT"+Wn(i,":")}},z:function(r,t,e){const i=r.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+wm(i,":");case"zzzz":default:return"GMT"+Wn(i,":")}},t:function(r,t,e){const i=Math.trunc(+r/1e3);return ve(i,t.length)},T:function(r,t,e){return ve(+r,t.length)}};function wm(r,t=""){const e=r>0?"-":"+",i=Math.abs(r),n=Math.trunc(i/60),s=i%60;return s===0?e+String(n):e+String(n)+t+ve(s,2)}function xm(r,t){return r%60===0?(r>0?"-":"+")+ve(Math.abs(r)/60,2):Wn(r,t)}function Wn(r,t=""){const e=r>0?"-":"+",i=Math.abs(r),n=ve(Math.trunc(i/60),2),s=ve(i%60,2);return e+n+t+s}const Sm=(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"})}},yw=(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"})}},QM=(r,t)=>{const e=r.match(/(P+)(p+)?/)||[],i=e[1],n=e[2];if(!n)return Sm(r,t);let s;switch(i){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}}",Sm(i,t)).replace("{{time}}",yw(n,t))},KM={p:yw,P:QM},ZM=/^D+$/,JM=/^Y+$/,tD=["D","DD","YY","YYYY"];function eD(r){return ZM.test(r)}function rD(r){return JM.test(r)}function iD(r,t,e){const i=nD(r,t,e);if(console.warn(i),tD.includes(r))throw new RangeError(i)}function nD(r,t,e){const i=r[0]==="Y"?"years":"days of the month";return`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${t}\`) for formatting ${i} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const sD=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,oD=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,aD=/^'([^]*?)'?$/,lD=/''/g,uD=/[a-zA-Z]/;function gw(r,t,e){var c,h,p,f;const i=fu(),n=i.locale??WM,s=i.firstWeekContainsDate??((h=(c=i.locale)==null?void 0:c.options)==null?void 0:h.firstWeekContainsDate)??1,o=i.weekStartsOn??((f=(p=i.locale)==null?void 0:p.options)==null?void 0:f.weekStartsOn)??0,a=Qr(r,e==null?void 0:e.in);if(!hM(a))throw new RangeError("Invalid time value");let l=t.match(oD).map(y=>{const g=y[0];if(g==="p"||g==="P"){const d=KM[g];return d(y,n.formatLong)}return y}).join("").match(sD).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const g=y[0];if(g==="'")return{isToken:!1,value:cD(y)};if(bm[g])return{isToken:!0,value:y};if(g.match(uD))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:y}});n.localize.preprocessor&&(l=n.localize.preprocessor(a,l));const u={firstWeekContainsDate:s,weekStartsOn:o,locale:n};return l.map(y=>{if(!y.isToken)return y.value;const g=y.value;(rD(g)||eD(g))&&iD(g,t,String(r));const d=bm[g[0]];return d(a,g,n.localize,u)}).join("")}function cD(r){const t=r.match(aD);return t?t[1].replace(lD,"'"):r}function hD(r,t){return Qr(r*1e3,t==null?void 0:t.in)}function fD(r,t){const e=dD(t)?new t(0):Wi(t,0);return e.setFullYear(r.getFullYear(),r.getMonth(),r.getDate()),e.setHours(r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()),e}function dD(r){var t;return typeof r=="function"&&((t=r.prototype)==null?void 0:t.constructor)===r}function pD(r,t){let e=r.length;switch(typeof t){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}case"object":for(;e>0&&t.includes(r[e-1]);)e--}return r.substring(0,e)}function gr(r){return r==null}function mD(r){return r!=null}async function Eh(){if(typeof window<"u"&&window!==null)return"browser";try{const r=await cn(()=>import("./__vite-browser-external-FmFgRqLi.js"),[]);return typeof r<"u"&&r.versions!=null&&r.versions.node!=null?"node":"unknown"}catch{return"unknown"}}function yD(r){return gr(r)?!1:Et.isInt(r.type)&&!vw(r)||gD(r)}function gD(r){return gr(r)?!1:Et.isInt(r.type)&&r.type.isSigned===!1}function vD(r){return gr(r)?!1:Et.isFloat(r.type)??!1}function _D(r){return gr(r)?!1:Et.isDecimal(r.type)}function bD(r){return gr(r)?!1:Et.isBool(r.type)}function wD(r){return gr(r)?!1:Et.isDuration(r.type)}function vw(r){return gr(r)?!1:Et.isInt(r.type)&&r.metadata.get("ARROW:extension:name")==="period"}function xD(r){return gr(r)?!1:Et.isTimestamp(r.type)}function SD(r){return gr(r)?!1:Et.isDate(r.type)}function TD(r){return gr(r)?!1:Et.isTime(r.type)}function ID(r){return gr(r)?!1:Et.isList(r.type)||Et.isFixedSizeList(r.type)}function ED(r){return gr(r)?!1:Et.isStruct(r.type)||Et.isMap(r.type)}function CD(r){return gr(r)?!1:Et.isStruct(r.type)&&r.metadata.get("ARROW:extension:name")==="interval"||Et.isInterval(r.type)}function AD(r,t){let e;if(t===Jt.MILLISECOND)e=1e3;else if(t===Jt.MICROSECOND)e=1e3*1e3;else if(t===Jt.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 OD(r,t){var i;const e=AD(r,((i=t==null?void 0:t.type)==null?void 0:i.unit)??Jt.SECOND);return hD(e)}function FD(r,t){const e=OD(r,t);return gw(e,e.getMilliseconds()===0?"HH:mm:ss":"HH:mm:ss.SSS")}function PD(r){const t="yyyy-MM-dd";return r instanceof Date||typeof r=="number"&&Number.isFinite(r)?gw(r,t):(console.warn(`Unsupported date value: ${r}`),String(r))}function MD(r,t){var n;if(!(r instanceof Date||typeof r=="number"&&Number.isFinite(r)))return console.warn(`Unsupported datetime value: ${r}`),null;let e;const i=(n=t==null?void 0:t.type)==null?void 0:n.timezone;return typeof r=="number"?i?e=new Cr(r,i):e=new Cr(r):i?e=new Cr(r,i):e=new Cr(r),fD(e,Date)}function DD(r,t){var a;const e=((a=t==null?void 0:t.type)==null?void 0:a.scale)||0;let i=ym.bigNumToString(new ym.BN(r)).padStart(e,"0");if(e===0)return i;let n="";i.startsWith("-")&&(n="-",i=i.slice(1));const s=i.slice(0,-e)||"0",o=pD(i.slice(-e),"0")||"";return`${n}${s}${o?`.${o}`:""}`}function RD(r){const t=r[0],e=r[1],i=[];return t!==0&&i.push(`${t} year${t>1?"s":""}`),e!==0&&i.push(`${e} month${e>1?"s":""}`),i.length?i.join(" "):"0 months"}function ND(r,t){var i,n,s,o;if(Et.isInterval(t==null?void 0:t.type))return RD(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"?"]":")",p=Ch(u.left,(n=(i=t.type)==null?void 0:i.children)==null?void 0:n[0]),f=Ch(u.right,(o=(s=t.type)==null?void 0:s.children)==null?void 0:o[1]);return`${c+p}, ${f+h}`}return String(r)}function LD(r,t){return(t==null?void 0:t.type)instanceof Sh?JSON.parse(JSON.stringify(r,(e,i)=>{if(mD(i))return typeof i=="bigint"?Number(i):i})):JSON.parse(JSON.stringify(r,(e,i)=>typeof i=="bigint"?Number(i):i))}function Ch(r,t){if(gr(r))return null;const e=r instanceof Date||Number.isFinite(r);if(e&&SD(t))return PD(r);if(typeof r=="bigint"&&TD(t))return FD(Number(r),t);if(e&&xD(t))return MD(r,t);if(vw(t))throw new Error("Period type is not supported yet");if(CD(t))return ND(r,t);if(wD(t))throw new Error("Duration type is not supported yet");return _D(t)?DD(r,t):vD(t)&&Number.isFinite(r)||yD(t)?r:ED(t)||ID(t)?LD(r,t):bD(t)?!!r:String(r)}function Tm(r){return((r.toArray()||[]).map(i=>i.toJSON())||[]).map(i=>(r.schema.fields.forEach(n=>i[n.name]=Ch(i[n.name],n)),i))}var sa=(r=>(r.ORIGIN_PRIVATE_FS="origin-private-fs",r.NODE_FS="node-fs",r))(sa||{});async function _w(r){const t=Bx(r,{logger:!1});let e,i;const n=await Eh();if(n==="browser"){if(typeof t.bundles>"u"){const{getBundles:u}=await cn(async()=>{const{getBundles:c}=await import("./default-browser-BrgSDbLD.js");return{getBundles:c}},[]);t.bundles=await u()}i=await zp(await t.bundles),e=new Worker(i.mainWorker)}else if(n==="node"){if(typeof t.bundles>"u"){const{getBundles:h}=await cn(async()=>{const{getBundles:p}=await import("./default-node-Bhmxs8ab.js");return{getBundles:p}},__vite__mapDeps([0,1,2]));t.bundles=await h()}i=await zp(await t.bundles);let u=i.mainWorker;u.startsWith("/@fs/")&&(u=u.replace("/@fs/","file://"));const c=await cn(()=>import("./index-Cp8iQ_hy.js"),[]);e=new c.default(u,{type:"module"})}else throw new Error(`Unsupported environment: ${n}`);let s;t.logger===!0?s=new P0:t.logger===!1?s=new b2:s=t.logger;const o=new C2(s,e);if(await o.instantiate(i.mainModule,i.pthreadWorker),t.storage)switch(t.storage.type){case sa.ORIGIN_PRIVATE_FS:{try{let u=t.storage.path;u.startsWith("/")&&(u=u.slice(1)),await o.open({path:`opfs://${u}`,accessMode:t.storage.accessMode})}catch(u){throw await o.terminate(),await e.terminate(),u}break}case sa.NODE_FS:{try{await o.open({path:t.storage.path,accessMode:t.storage.accessMode,useDirectIO:!0})}catch(u){throw await o.terminate(),await e.terminate(),u}break}}const a=await o.connect();async function l(u,c=[]){if(!c||c.length===0){const f=await a.query(u);return{_results:f,_schema:f.schema,columns:f.schema.fields,rows:Tm(f)}}const h=await a.prepare(u),p=await h.query(...c);return h.close(),{_results:p,_schema:p.schema,columns:p.schema.fields,rows:Tm(p)}}return{worker:e,db:o,conn:a,query:async(u,c=[])=>l(u,c).then(h=>h.rows),queryWithColumns:async(u,c=[])=>l(u,c),close:async()=>{await a.close(),await o.terminate(),await e.terminate()}}}async function BD(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 kD(r,t,e){await(await r).conn.send(`SAVEPOINT ${t}`);try{const i=await e(r);return await(await r).conn.send(`RELEASE SAVEPOINT ${t}`),i}catch(i){throw await(await r).conn.send(`ROLLBACK TO SAVEPOINT ${t}`),i}}const xt=Symbol.for("drizzle:entityKind");function at(r,t){if(!r||typeof r!="object")return!1;if(r instanceof t)return!0;if(!Object.prototype.hasOwnProperty.call(t,xt))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(xt in e&&e[xt]===t[xt])return!0;e=Object.getPrototypeOf(e)}return!1}var Nm;Nm=xt;class Ke{constructor(t,e){$(this,"name");$(this,"keyAsName");$(this,"primary");$(this,"notNull");$(this,"default");$(this,"defaultFn");$(this,"onUpdateFn");$(this,"hasDefault");$(this,"isUnique");$(this,"uniqueName");$(this,"uniqueType");$(this,"dataType");$(this,"columnType");$(this,"enumValues");$(this,"generated");$(this,"generatedIdentity");$(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"}}$(Ke,Nm,"Column");const Qs=Symbol.for("drizzle:Name");function UD(r,t){return`${r[Qs]}_${t.join("_")}_unique`}var Lm,Bm;class Fr extends(Bm=Ke,Lm=xt,Bm){constructor(t,e){e.uniqueName||(e.uniqueName=UD(t,[e.name])),super(t,e),this.table=t}}$(Fr,Lm,"PgColumn");const Im=Symbol.for("drizzle:isPgEnum");function zD(r){return!!r&&typeof r=="function"&&Im in r&&r[Im]===!0}var km;km=xt;class dr{constructor(t,e,i,n=!1,s=[]){this._={brand:"Subquery",sql:t,selectedFields:e,alias:i,isWith:n,usedTables:s}}}$(dr,km,"Subquery");var Um,zm;class Vf extends(zm=dr,Um=xt,zm){}$(Vf,Um,"WithSubquery");const Mr={startActiveSpan(r,t){return t()}},He=Symbol.for("drizzle:ViewBaseConfig"),Ks=Symbol.for("drizzle:Schema"),Ah=Symbol.for("drizzle:Columns"),Em=Symbol.for("drizzle:ExtraConfigColumns"),lc=Symbol.for("drizzle:OriginalName"),uc=Symbol.for("drizzle:BaseName"),$l=Symbol.for("drizzle:IsAlias"),Cm=Symbol.for("drizzle:ExtraConfigBuilder"),jD=Symbol.for("drizzle:IsDrizzleTable");var jm,$m,Vm,Gm,Wm,Hm,Ym,Xm,qm,Qm;Qm=xt,qm=Qs,Xm=lc,Ym=Ks,Hm=Ah,Wm=Em,Gm=uc,Vm=$l,$m=jD,jm=Cm;class St{constructor(t,e,i){$(this,qm);$(this,Xm);$(this,Ym);$(this,Hm);$(this,Wm);$(this,Gm);$(this,Vm,!1);$(this,$m,!0);$(this,jm);this[Qs]=this[lc]=t,this[Ks]=e,this[uc]=i}}$(St,Qm,"Table"),$(St,"Symbol",{Name:Qs,Schema:Ks,OriginalName:lc,Columns:Ah,ExtraConfigColumns:Em,BaseName:uc,IsAlias:$l,ExtraConfigBuilder:Cm});function Kn(r){return r[Qs]}function oa(r){return`${r[Ks]??"public"}.${r[Qs]}`}function bw(r){return r!=null&&typeof r.getSQL=="function"}function $D(r){var e;const t={sql:"",params:[]};for(const i of r)t.sql+=i.sql,t.params.push(...i.params),(e=i.typings)!=null&&e.length&&(t.typings||(t.typings=[]),t.typings.push(...i.typings));return t}var Km;Km=xt;class Ye{constructor(t){$(this,"value");this.value=Array.isArray(t)?t:[t]}getSQL(){return new Ft([this])}}$(Ye,Km,"StringChunk");var Zm;Zm=xt;const Xn=class Xn{constructor(t){$(this,"decoder",ww);$(this,"shouldInlineParams",!1);$(this,"usedTables",[]);this.queryChunks=t;for(const e of t)if(at(e,St)){const i=e[St.Symbol.Schema];this.usedTables.push(i===void 0?e[St.Symbol.Name]:i+"."+e[St.Symbol.Name])}}append(t){return this.queryChunks.push(...t.queryChunks),this}toQuery(t){return Mr.startActiveSpan("drizzle.buildSQL",e=>{const i=this.buildQueryFromSourceParams(this.queryChunks,t);return e==null||e.setAttributes({"drizzle.query.text":i.sql,"drizzle.query.params":JSON.stringify(i.params)}),i})}buildQueryFromSourceParams(t,e){const i=Object.assign({},e,{inlineParams:e.inlineParams||this.shouldInlineParams,paramStartIndex:e.paramStartIndex||{value:0}}),{casing:n,escapeName:s,escapeParam:o,prepareTyping:a,inlineParams:l,paramStartIndex:u}=i;return $D(t.map(c=>{var h;if(at(c,Ye))return{sql:c.value.join(""),params:[]};if(at(c,Vl))return{sql:s(c.value),params:[]};if(c===void 0)return{sql:"",params:[]};if(Array.isArray(c)){const p=[new Ye("(")];for(const[f,y]of c.entries())p.push(y),fr},xw={mapToDriverValue:r=>r};({...ww,...xw});var ty;ty=xt;class Hi{constructor(t,e=xw){$(this,"brand");this.value=t,this.encoder=e}getSQL(){return new Ft([this])}}$(Hi,ty,"Param");function H(r,...t){const e=[];(t.length>0||r.length>0&&r[0]!=="")&&e.push(new Ye(r[0]));for(const[i,n]of t.entries())e.push(n,new Ye(r[i+1]));return new Ft(e)}(r=>{function t(){return new Ft([])}r.empty=t;function e(l){return new Ft(l)}r.fromList=e;function i(l){return new Ft([new Ye(l)])}r.raw=i;function n(l,u){const c=[];for(const[h,p]of l.entries())h>0&&u!==void 0&&c.push(u),c.push(p);return new Ft(c)}r.join=n;function s(l){return new Vl(l)}r.identifier=s;function o(l){return new as(l)}r.placeholder=o;function a(l,u){return new Hi(l,u)}r.param=a})(H||(H={}));(r=>{var e;e=xt;const i=class i{constructor(s,o){$(this,"isSelectionField",!1);this.sql=s,this.fieldAlias=o}getSQL(){return this.sql}clone(){return new i(this.sql,this.fieldAlias)}};$(i,e,"SQL.Aliased");let t=i;r.Aliased=t})(Ft||(Ft={}));var ey;ey=xt;class as{constructor(t){this.name=t}getSQL(){return new Ft([this])}}$(as,ey,"Placeholder");function Am(r,t){return r.map(e=>{if(at(e,as)){if(!(e.name in t))throw new Error(`No value for placeholder "${e.name}" was provided`);return t[e.name]}if(at(e,Hi)&&at(e.value,as)){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 GD=Symbol.for("drizzle:IsDrizzleView");var ry,iy,ny;ny=xt,iy=He,ry=GD;class In{constructor({name:t,schema:e,selectedFields:i,query:n}){$(this,iy);$(this,ry,!0);this[He]={name:t,originalName:t,schema:e,selectedFields:i,query:n,isExisting:!n,isAlias:!1}}getSQL(){return new Ft([this])}}$(In,ny,"View");Ke.prototype.getSQL=function(){return new Ft([this])};St.prototype.getSQL=function(){return new Ft([this])};dr.prototype.getSQL=function(){return new Ft([this])};var sy;sy=xt;class aa{constructor(t){this.table=t}get(t,e){return e==="table"?this.table:t[e]}}$(aa,sy,"ColumnAliasProxyHandler");var oy;oy=xt;class du{constructor(t,e){this.alias=t,this.replaceOriginalName=e}get(t,e){if(e===St.Symbol.IsAlias)return!0;if(e===St.Symbol.Name)return this.alias;if(this.replaceOriginalName&&e===St.Symbol.OriginalName)return this.alias;if(e===He)return{...t[He],name:this.alias,isAlias:!0};if(e===St.Symbol.Columns){const n=t[St.Symbol.Columns];if(!n)return n;const s={};return Object.keys(n).map(o=>{s[o]=new Proxy(n[o],new aa(new Proxy(t,this)))}),s}const i=t[e];return at(i,Ke)?new Proxy(i,new aa(new Proxy(t,this))):i}}$(du,oy,"TableAliasProxyHandler");function cc(r,t){return new Proxy(r,new du(t,!1))}function Bi(r,t){return new Proxy(r,new aa(new Proxy(r.table,new du(t,!1))))}function Sw(r,t){return new Ft.Aliased(Gl(r.sql,t),r.fieldAlias)}function Gl(r,t){return H.join(r.queryChunks.map(e=>at(e,Ke)?Bi(e,t):at(e,Ft)?Gl(e,t):at(e,Ft.Aliased)?Sw(e,t):e))}var ay,ly;class Gf extends(ly=Error,ay=xt,ly){constructor({message:t,cause:e}){super(t),this.name="DrizzleError",this.cause=e}}$(Gf,ay,"DrizzleError");var uy,cy;class Tw extends(cy=Gf,uy=xt,cy){constructor(){super({message:"Rollback"})}}$(Tw,uy,"TransactionRollbackError");var hy;hy=xt;class Iw{write(t){console.log(t)}}$(Iw,hy,"ConsoleLogWriter");var fy;fy=xt;class Ew{constructor(t){$(this,"writer");this.writer=(t==null?void 0:t.writer)??new Iw}logQuery(t,e){const i=e.map(s=>{try{return JSON.stringify(s)}catch{return String(s)}}),n=i.length?` -- params: [${i.join(", ")}]`:"";this.writer.write(`Query: ${t}${n}`)}}$(Ew,fy,"DefaultLogger");var dy;dy=xt;class Cw{logQuery(){}}$(Cw,dy,"NoopLogger");var py,my;my=xt,py=Symbol.toStringTag;class En{constructor(){$(this,py,"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)}}$(En,my,"QueryPromise");function ls(r,t){return Object.entries(r).reduce((e,[i,n])=>{if(typeof i!="string")return e;const s=t?[...t,i]:[i];return at(n,Ke)||at(n,Ft)||at(n,Ft.Aliased)?e.push({path:s,field:n}):at(n,St)?e.push(...ls(n[St.Symbol.Columns],s)):e.push(...ls(n,s)),e},[])}function Wf(r,t){const e=Object.keys(r),i=Object.keys(t);if(e.length!==i.length)return!1;for(const[n,s]of e.entries())if(s!==i[n])return!1;return!0}function Aw(r,t){const e=Object.entries(t).filter(([,i])=>i!==void 0).map(([i,n])=>at(n,Ft)||at(n,Ke)?[i,n]:[i,new Hi(n,r[St.Symbol.Columns][i])]);if(e.length===0)throw new Error("No values to set");return Object.fromEntries(e)}function WD(r,t){for(const e of t)for(const i of Object.getOwnPropertyNames(e.prototype))i!=="constructor"&&Object.defineProperty(r.prototype,i,Object.getOwnPropertyDescriptor(e.prototype,i)||Object.create(null))}function HD(r){return r[St.Symbol.Columns]}function Yn(r){return at(r,dr)?r._.alias:at(r,In)?r[He].name:at(r,Ft)?void 0:r[St.Symbol.IsAlias]?r[St.Symbol.Name]:r[St.Symbol.BaseName]}function YD(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 yy,gy;class Ow extends(gy=Fr,yy=xt,gy){getSQLType(){return"date"}mapFromDriverValue(t){return new Date(t)}mapToDriverValue(t){return t.toISOString()}}$(Ow,yy,"PgDate");var vy,_y;class Fw extends(_y=Fr,vy=xt,_y){getSQLType(){return"date"}}$(Fw,vy,"PgDateString");var by,wy;class Pw extends(wy=Fr,by=xt,wy){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}}$(Pw,by,"PgJson");var xy,Sy;class Mw extends(Sy=Fr,xy=xt,Sy){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}}$(Mw,xy,"PgJsonb");var Ty,Iy;class Dw extends(Iy=Fr,Ty=xt,Iy){constructor(e,i){super(e,i);$(this,"precision");$(this,"scale");this.precision=i.precision,this.scale=i.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})`}}$(Dw,Ty,"PgNumeric");var Ey,Cy;class Rw extends(Cy=Fr,Ey=xt,Cy){constructor(e,i){super(e,i);$(this,"withTimezone");$(this,"precision");this.withTimezone=i.withTimezone,this.precision=i.precision}getSQLType(){return`time${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}}$(Rw,Ey,"PgTime");var Ay,Oy;class Nw extends(Oy=Fr,Ay=xt,Oy){constructor(e,i){super(e,i);$(this,"withTimezone");$(this,"precision");$(this,"mapFromDriverValue",e=>new Date(this.withTimezone?e:e+"+0000"));$(this,"mapToDriverValue",e=>e.toISOString());this.withTimezone=i.withTimezone,this.precision=i.precision}getSQLType(){return`timestamp${this.precision===void 0?"":` (${this.precision})`}${this.withTimezone?" with time zone":""}`}}$(Nw,Ay,"PgTimestamp");var Fy,Py;class Lw extends(Py=Fr,Fy=xt,Py){constructor(e,i){super(e,i);$(this,"withTimezone");$(this,"precision");this.withTimezone=i.withTimezone,this.precision=i.precision}getSQLType(){return`timestamp${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}}$(Lw,Fy,"PgTimestampString");var My,Dy;class Bw extends(Dy=Fr,My=xt,Dy){getSQLType(){return"uuid"}}$(Bw,My,"PgUUID");const Om=Symbol.for("drizzle:PgInlineForeignKeys"),Fm=Symbol.for("drizzle:EnableRLS");var Ry,Ny,Ly,By,ky,Uy;class br extends(Uy=St,ky=xt,By=Om,Ly=Fm,Ny=St.Symbol.ExtraConfigBuilder,Ry=St.Symbol.ExtraConfigColumns,Uy){constructor(){super(...arguments);$(this,By,[]);$(this,Ly,!1);$(this,Ny);$(this,Ry,{})}}$(br,ky,"PgTable"),$(br,"Symbol",Object.assign({},St.Symbol,{InlineForeignKeys:Om,EnableRLS:Fm}));var zy;zy=xt;class kw{constructor(t,e){$(this,"columns");$(this,"name");this.columns=t,this.name=e}build(t){return new Uw(t,this.columns,this.name)}}$(kw,zy,"PgPrimaryKeyBuilder");var jy;jy=xt;class Uw{constructor(t,e,i){$(this,"columns");$(this,"name");this.table=t,this.columns=e,this.name=i}getName(){return this.name??`${this.table[br.Symbol.Name]}_${this.columns.map(t=>t.name).join("_")}_pk`}}$(Uw,jy,"PgPrimaryKey");function yr(r,t){return VD(t)&&!bw(r)&&!at(r,Hi)&&!at(r,as)&&!at(r,Ke)&&!at(r,St)&&!at(r,In)?new Hi(r,t):r}const zw=(r,t)=>H`${r} = ${yr(t,r)}`,XD=(r,t)=>H`${r} <> ${yr(t,r)}`;function Oh(...r){const t=r.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new Ft(t):new Ft([new Ye("("),H.join(t,new Ye(" and ")),new Ye(")")])}function qD(...r){const t=r.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new Ft(t):new Ft([new Ye("("),H.join(t,new Ye(" or ")),new Ye(")")])}function QD(r){return H`not ${r}`}const KD=(r,t)=>H`${r} > ${yr(t,r)}`,ZD=(r,t)=>H`${r} >= ${yr(t,r)}`,JD=(r,t)=>H`${r} < ${yr(t,r)}`,tR=(r,t)=>H`${r} <= ${yr(t,r)}`;function eR(r,t){return Array.isArray(t)?t.length===0?H`false`:H`${r} in ${t.map(e=>yr(e,r))}`:H`${r} in ${yr(t,r)}`}function rR(r,t){return Array.isArray(t)?t.length===0?H`true`:H`${r} not in ${t.map(e=>yr(e,r))}`:H`${r} not in ${yr(t,r)}`}function iR(r){return H`${r} is null`}function nR(r){return H`${r} is not null`}function sR(r){return H`exists ${r}`}function oR(r){return H`not exists ${r}`}function aR(r,t,e){return H`${r} between ${yr(t,r)} and ${yr(e,r)}`}function lR(r,t,e){return H`${r} not between ${yr(t,r)} and ${yr(e,r)}`}function uR(r,t){return H`${r} like ${t}`}function cR(r,t){return H`${r} not like ${t}`}function hR(r,t){return H`${r} ilike ${t}`}function fR(r,t){return H`${r} not ilike ${t}`}function dR(r){return H`${r} asc`}function pR(r){return H`${r} desc`}var $y;$y=xt;class Hf{constructor(t,e,i){$(this,"referencedTableName");$(this,"fieldName");this.sourceTable=t,this.referencedTable=e,this.relationName=i,this.referencedTableName=e[St.Symbol.Name]}}$(Hf,$y,"Relation");var Vy;Vy=xt;class jw{constructor(t,e){this.table=t,this.config=e}}$(jw,Vy,"Relations");var Gy,Wy;const Yl=class Yl extends(Wy=Hf,Gy=xt,Wy){constructor(t,e,i,n){super(t,e,i==null?void 0:i.relationName),this.config=i,this.isNullable=n}withFieldName(t){const e=new Yl(this.sourceTable,this.referencedTable,this.config,this.isNullable);return e.fieldName=t,e}};$(Yl,Gy,"One");let us=Yl;var Hy,Yy;const Xl=class Xl extends(Yy=Hf,Hy=xt,Yy){constructor(t,e,i){super(t,e,i==null?void 0:i.relationName),this.config=i}withFieldName(t){const e=new Xl(this.sourceTable,this.referencedTable,this.config);return e.fieldName=t,e}};$(Xl,Hy,"Many");let Wl=Xl;function mR(){return{and:Oh,between:aR,eq:zw,exists:sR,gt:KD,gte:ZD,ilike:hR,inArray:eR,isNull:iR,isNotNull:nR,like:uR,lt:JD,lte:tR,ne:XD,not:QD,notBetween:lR,notExists:oR,notLike:cR,notIlike:fR,notInArray:rR,or:qD,sql:H}}function yR(){return{sql:H,asc:dR,desc:pR}}function gR(r,t){var s;Object.keys(r).length===1&&"default"in r&&!at(r.default,St)&&(r=r.default);const e={},i={},n={};for(const[o,a]of Object.entries(r))if(at(a,St)){const l=oa(a),u=i[l];e[l]=o,n[o]={tsName:o,dbName:a[St.Symbol.Name],schema:a[St.Symbol.Schema],columns:a[St.Symbol.Columns],relations:(u==null?void 0:u.relations)??{},primaryKey:(u==null?void 0:u.primaryKey)??[]};for(const h of Object.values(a[St.Symbol.Columns]))h.primary&&n[o].primaryKey.push(h);const c=(s=a[St.Symbol.ExtraConfigBuilder])==null?void 0:s.call(a,a[St.Symbol.ExtraConfigColumns]);if(c)for(const h of Object.values(c))at(h,kw)&&n[o].primaryKey.push(...h.columns)}else if(at(a,jw)){const l=oa(a.table),u=e[l],c=a.config(t(a.table));let h;for(const[p,f]of Object.entries(c))if(u){const y=n[u];y.relations[p]=f}else l in i||(i[l]={relations:{},primaryKey:h}),i[l].relations[p]=f}return{tables:n,tableNamesMap:e}}function vR(r){return function(e,i){return new us(r,e,i,(i==null?void 0:i.fields.reduce((n,s)=>n&&s.notNull,!0))??!1)}}function _R(r){return function(e,i){return new Wl(r,e,i)}}function bR(r,t,e){if(at(e,us)&&e.config)return{fields:e.config.fields,references:e.config.references};const i=t[oa(e.referencedTable)];if(!i)throw new Error(`Table "${e.referencedTable[St.Symbol.Name]}" not found in schema`);const n=r[i];if(!n)throw new Error(`Table "${i}" not found in schema`);const s=e.sourceTable,o=t[oa(s)];if(!o)throw new Error(`Table "${s[St.Symbol.Name]}" not found in schema`);const a=[];for(const l of Object.values(n.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 "${i}"`):new Error(`There are multiple relations between "${i}" and "${e.sourceTable[St.Symbol.Name]}". Please specify relation name`);if(a[0]&&at(a[0],us)&&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 wR(r){return{one:vR(r),many:_R(r)}}function Fh(r,t,e,i,n=s=>s){const s={};for(const[o,a]of i.entries())if(a.isJson){const l=t.relations[a.tsKey],u=e[o],c=typeof u=="string"?JSON.parse(u):u;s[a.tsKey]=at(l,us)?c&&Fh(r,r[a.relationTableTsKey],c,a.selection,n):c.map(h=>Fh(r,r[a.relationTableTsKey],h,a.selection,n))}else{const l=n(e[o]),u=a.field;let c;at(u,Ke)?c=u:at(u,Ft)?c=u.decoder:c=u.sql.decoder,s[a.tsKey]=l===null?null:c.mapFromDriverValue(l)}return s}var Xy;Xy=xt;const ql=class ql{constructor(t){$(this,"config");this.config={...t}}get(t,e){if(e==="_")return{...t._,selectedFields:new Proxy(t._.selectedFields,this)};if(e===He)return{...t[He],selectedFields:new Proxy(t[He].selectedFields,this)};if(typeof e=="symbol")return t[e];const n=(at(t,dr)?t._.selectedFields:at(t,In)?t[He].selectedFields:t)[e];if(at(n,Ft.Aliased)){if(this.config.sqlAliasedBehavior==="sql"&&!n.isSelectionField)return n.sql;const s=n.clone();return s.isSelectionField=!0,s}if(at(n,Ft)){if(this.config.sqlBehavior==="sql")return n;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 at(n,Ke)?this.config.alias?new Proxy(n,new aa(new Proxy(n.table,new du(this.config.alias,this.config.replaceOriginalName??!1)))):n:typeof n!="object"||n===null?n:new Proxy(n,new ql(this.config))}};$(ql,Xy,"SelectionProxyHandler");let Je=ql;function xR(r){return(r.replace(/['\u2019]/g,"").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[]).map(e=>e.toLowerCase()).join("_")}function SR(r){return(r.replace(/['\u2019]/g,"").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[]).reduce((e,i,n)=>{const s=n===0?i.toLowerCase():`${i[0].toUpperCase()}${i.slice(1)}`;return e+s},"")}function TR(r){return r}var qy;qy=xt;class $w{constructor(t){$(this,"cache",{});$(this,"cachedTables",{});$(this,"convert");this.convert=t==="snake_case"?xR:t==="camelCase"?SR:TR}getColumnCasing(t){if(!t.keyAsName)return t.name;const e=t.table[St.Symbol.Schema]??"public",i=t.table[St.Symbol.OriginalName],n=`${e}.${i}.${t.name}`;return this.cache[n]||this.cacheTable(t.table),this.cache[n]}cacheTable(t){const e=t[St.Symbol.Schema]??"public",i=t[St.Symbol.OriginalName],n=`${e}.${i}`;if(!this.cachedTables[n]){for(const s of Object.values(t[St.Symbol.Columns])){const o=`${n}.${s.name}`;this.cache[o]=this.convert(s.name)}this.cachedTables[n]=!0}}clearCache(){this.cache={},this.cachedTables={}}}$($w,qy,"CasingCache");var Qy,Ky;class Yf extends(Ky=In,Qy=xt,Ky){}$(Yf,Qy,"PgViewBase");var Zy;Zy=xt;class zo{constructor(t){$(this,"casing");this.casing=new $w(t==null?void 0:t.casing)}async migrate(t,e,i){const n=typeof i=="string"?"__drizzle_migrations":i.migrationsTable??"__drizzle_migrations",s=typeof i=="string"?"drizzle":i.migrationsSchema??"drizzle",o=H` CREATE TABLE IF NOT EXISTS ${H.identifier(s)}.${H.identifier(n)} ( id SERIAL PRIMARY KEY, hash text NOT NULL, created_at bigint ) `;await e.execute(H`CREATE SCHEMA IF NOT EXISTS ${H.identifier(s)}`),await e.execute(o);const l=(await e.all(H`select id, hash, created_at from ${H.identifier(s)}.${H.identifier(n)} 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=i[o])==null?void 0:a.onUpdateFn)!==void 0}),s=n.length;return H.join(n.flatMap((o,a)=>{const l=i[o],u=e[o]??H.param(l.onUpdateFn(),l),c=H`${H.identifier(this.casing.getColumnCasing(l))} = ${u}`;return a{const a=[];if(at(s,Ft.Aliased)&&s.isSelectionField)a.push(H.identifier(s.fieldAlias));else if(at(s,Ft.Aliased)||at(s,Ft)){const l=at(s,Ft.Aliased)?s.sql:s;e?a.push(new Ft(l.queryChunks.map(u=>at(u,Fr)?H.identifier(this.casing.getColumnCasing(u)):u))):a.push(l),at(s,Ft.Aliased)&&a.push(H` as ${H.identifier(s.fieldAlias)}`)}else at(s,Ke)&&(e?a.push(H.identifier(this.casing.getColumnCasing(s))):a.push(s));return oa==null?void 0:a.some(({alias:M})=>M===(it[St.Symbol.IsAlias]?Kn(it):it[St.Symbol.BaseName])))(w.field.table)){const it=Kn(w.field.table);throw new Error(`Your "${w.path.join("->")}" field references a column "${it}"."${w.field.name}", but the table "${it}" is not part of the query! Did you forget to join it?`)}const d=!a||a.length===0,m=this.buildWithCTE(t);let _;f&&(_=f===!0?H` distinct`:H` distinct on (${H.join(f.on,H`, `)})`);const S=this.buildSelection(g,{isSingleTable:d}),E=this.buildFromTable(o),b=this.buildJoins(a),F=n?H` where ${n}`:void 0,x=s?H` having ${s}`:void 0;let z;l&&l.length>0&&(z=H` order by ${H.join(l,H`, `)}`);let B;u&&u.length>0&&(B=H` group by ${H.join(u,H`, `)}`);const tt=typeof c=="object"||typeof c=="number"&&c>=0?H` limit ${c}`:void 0,st=h?H` offset ${h}`:void 0,I=H.empty();if(p){const w=H` for ${H.raw(p.strength)}`;p.config.of&&w.append(H` of ${H.join(Array.isArray(p.config.of)?p.config.of:[p.config.of],H`, `)}`),p.config.noWait?w.append(H` nowait`):p.config.skipLocked&&w.append(H` skip locked`),I.append(w)}const Z=H`${m}select${_} ${S} from ${E}${b}${F}${B}${x}${z}${tt}${st}${I}`;return y.length>0?this.buildSetOperations(Z,y):Z}buildSetOperations(t,e){const[i,...n]=e;if(!i)throw new Error("Cannot pass undefined values to any set operator");return n.length===0?this.buildSetOperationQuery({leftSelect:t,setOperator:i}):this.buildSetOperations(this.buildSetOperationQuery({leftSelect:t,setOperator:i}),n)}buildSetOperationQuery({leftSelect:t,setOperator:{type:e,isAll:i,rightSelect:n,limit:s,orderBy:o,offset:a}}){const l=H`(${t.getSQL()}) `,u=H`(${n.getSQL()})`;let c;if(o&&o.length>0){const y=[];for(const g of o)if(at(g,Fr))y.push(H.identifier(g.name));else if(at(g,Ft)){for(let d=0;d=0?H` limit ${s}`:void 0,p=H.raw(`${e} ${i?"all ":""}`),f=a?H` offset ${a}`:void 0;return H`${l}${p}${u}${c}${h}${f}`}buildInsertQuery({table:t,values:e,onConflict:i,returning:n,withList:s,select:o,overridingSystemValue_:a}){const l=[],u=t[St.Symbol.Columns],c=Object.entries(u).filter(([m,_])=>!_.shouldDisableInsert()),h=c.map(([,m])=>H.identifier(this.casing.getColumnCasing(m)));if(o){const m=e;at(m,Ft)?l.push(m):l.push(m.getSQL())}else{const m=e;l.push(H.raw("values "));for(const[_,S]of m.entries()){const E=[];for(const[b,F]of c){const x=S[b];if(x===void 0||at(x,Hi)&&x.value===void 0)if(F.defaultFn!==void 0){const z=F.defaultFn(),B=at(z,Ft)?z:H.param(z,F);E.push(B)}else if(!F.default&&F.onUpdateFn!==void 0){const z=F.onUpdateFn(),B=at(z,Ft)?z:H.param(z,F);E.push(B)}else E.push(H`default`);else E.push(x)}l.push(E),_({dbKey:S.name,tsKey:_,field:Bi(S,a),relationTableTsKey:void 0,isJson:!1,selection:[]}));else{const m=Object.fromEntries(Object.entries(s.columns).map(([x,z])=>[x,Bi(z,a)]));if(o.where){const x=typeof o.where=="function"?o.where(m,mR()):o.where;y=x&&Gl(x,a)}const _=[];let S=[];if(o.columns){let x=!1;for(const[z,B]of Object.entries(o.columns))B!==void 0&&z in s.columns&&(!x&&B===!0&&(x=!0),S.push(z));S.length>0&&(S=x?S.filter(z=>{var B;return((B=o.columns)==null?void 0:B[z])===!0}):Object.keys(s.columns).filter(z=>!S.includes(z)))}else S=Object.keys(s.columns);for(const x of S){const z=s.columns[x];_.push({tsKey:x,value:z})}let E=[];o.with&&(E=Object.entries(o.with).filter(x=>!!x[1]).map(([x,z])=>({tsKey:x,queryConfig:z,relation:s.relations[x]})));let b;if(o.extras){b=typeof o.extras=="function"?o.extras(m,{sql:H}):o.extras;for(const[x,z]of Object.entries(b))_.push({tsKey:x,value:Sw(z,a)})}for(const{tsKey:x,value:z}of _)c.push({dbKey:at(z,Ft.Aliased)?z.fieldAlias:s.columns[x].name,tsKey:x,field:at(z,Ke)?Bi(z,a):z,relationTableTsKey:void 0,isJson:!1,selection:[]});let F=typeof o.orderBy=="function"?o.orderBy(m,yR()):o.orderBy??[];Array.isArray(F)||(F=[F]),f=F.map(x=>at(x,Ke)?Bi(x,a):Gl(x,a)),h=o.limit,p=o.offset;for(const{tsKey:x,queryConfig:z,relation:B}of E){const tt=bR(e,i,B),st=oa(B.referencedTable),I=i[st],Z=`${a}_${x}`,w=Oh(...tt.fields.map((O,D)=>zw(Bi(tt.references[D],Z),Bi(O,a)))),it=this.buildRelationalQueryWithoutPK({fullSchema:t,schema:e,tableNamesMap:i,table:t[I],tableConfig:e[I],queryConfig:at(B,us)?z===!0?{limit:1}:{...z,limit:1}:z,tableAlias:Z,joinOn:w,nestedQueryRelation:B}),M=H`${H.identifier(Z)}.${H.identifier("data")}`.as(x);g.push({on:H`true`,table:new dr(it.sql,{},Z),alias:Z,joinType:"left",lateral:!0}),c.push({dbKey:x,tsKey:x,field:M,relationTableTsKey:I,isJson:!0,selection:it.selection})}}if(c.length===0)throw new Gf({message:`No fields selected for table "${s.tsName}" ("${a}")`});let d;if(y=Oh(u,y),l){let m=H`json_build_array(${H.join(c.map(({field:E,tsKey:b,isJson:F})=>F?H`${H.identifier(`${a}_${b}`)}.${H.identifier("data")}`:at(E,Ft.Aliased)?E.sql:E),H`, `)})`;at(l,Wl)&&(m=H`coalesce(json_agg(${m}${f.length>0?H` order by ${H.join(f,H`, `)}`:void 0}), '[]'::json)`);const _=[{dbKey:"data",tsKey:"data",field:m.as("data"),isJson:!0,relationTableTsKey:s.tsName,selection:c}];h!==void 0||p!==void 0||f.length>0?(d=this.buildSelectQuery({table:cc(n,a),fields:{},fieldsFlat:[{path:[],field:H.raw("*")}],where:y,limit:h,offset:p,orderBy:f,setOperators:[]}),y=void 0,h=void 0,p=void 0,f=[]):d=cc(n,a),d=this.buildSelectQuery({table:at(d,br)?d:new dr(d,{},a),fields:{},fieldsFlat:_.map(({field:E})=>({path:[],field:at(E,Ke)?Bi(E,a):E})),joins:g,where:y,limit:h,offset:p,orderBy:f,setOperators:[]})}else d=this.buildSelectQuery({table:cc(n,a),fields:{},fieldsFlat:c.map(({field:m})=>({path:[],field:at(m,Ke)?Bi(m,a):m})),joins:g,where:y,limit:h,offset:p,orderBy:f,setOperators:[]});return{tableTsKey:s.tsName,sql:d,selection:c}}}$(zo,Zy,"PgDialect");var Jy;Jy=xt;class Vw{getSelectedFields(){return this._.selectedFields}}$(Vw,Jy,"TypedQueryBuilder");var tg;tg=xt;class Tr{constructor(t){$(this,"fields");$(this,"session");$(this,"dialect");$(this,"withList",[]);$(this,"distinct");$(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,i=t;let n;return this.fields?n=this.fields:at(i,dr)?n=Object.fromEntries(Object.keys(i._.selectedFields).map(s=>[s,i[s]])):at(i,Yf)?n=i[He].selectedFields:at(i,Ft)?n={}:n=HD(i),new Xf({table:i,fields:n,isPartialSelect:e,session:this.session,dialect:this.dialect,withList:this.withList,distinct:this.distinct}).setToken(this.authToken)}}$(Tr,tg,"PgSelectBuilder");var eg,rg;class Gw extends(rg=Vw,eg=xt,rg){constructor({table:e,fields:i,isPartialSelect:n,session:s,dialect:o,withList:a,distinct:l}){super();$(this,"_");$(this,"config");$(this,"joinsNotNullableMap");$(this,"tableName");$(this,"isPartialSelect");$(this,"session");$(this,"dialect");$(this,"cacheConfig");$(this,"usedTables",new Set);$(this,"leftJoin",this.createJoin("left",!1));$(this,"leftJoinLateral",this.createJoin("left",!0));$(this,"rightJoin",this.createJoin("right",!1));$(this,"innerJoin",this.createJoin("inner",!1));$(this,"innerJoinLateral",this.createJoin("inner",!0));$(this,"fullJoin",this.createJoin("full",!1));$(this,"crossJoin",this.createJoin("cross",!1));$(this,"crossJoinLateral",this.createJoin("cross",!0));$(this,"union",this.createSetOperator("union",!1));$(this,"unionAll",this.createSetOperator("union",!0));$(this,"intersect",this.createSetOperator("intersect",!1));$(this,"intersectAll",this.createSetOperator("intersect",!0));$(this,"except",this.createSetOperator("except",!1));$(this,"exceptAll",this.createSetOperator("except",!0));this.config={withList:a,table:e,fields:{...i},distinct:l,setOperators:[]},this.isPartialSelect=n,this.session=s,this.dialect=o,this._={selectedFields:i,config:this.config},this.tableName=Yn(e),this.joinsNotNullableMap=typeof this.tableName=="string"?{[this.tableName]:!0}:{};for(const u of Zn(e))this.usedTables.add(u)}getUsedTables(){return[...this.usedTables]}createJoin(e,i){return(n,s)=>{var l;const o=this.tableName,a=Yn(n);for(const u of Zn(n))this.usedTables.add(u);if(typeof a=="string"&&((l=this.config.joins)!=null&&l.some(u=>u.alias===a)))throw new Error(`Alias "${a}" is already used in this query`);if(!this.isPartialSelect&&(Object.keys(this.joinsNotNullableMap).length===1&&typeof o=="string"&&(this.config.fields={[o]:this.config.fields}),typeof a=="string"&&!at(n,Ft))){const u=at(n,dr)?n._.selectedFields:at(n,In)?n[He].selectedFields:n[St.Symbol.Columns];this.config.fields[a]=u}if(typeof s=="function"&&(s=s(new Proxy(this.config.fields,new Je({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.joins||(this.config.joins=[]),this.config.joins.push({on:s,table:n,joinType:e,alias:a,lateral:i}),typeof a=="string")switch(e){case"left":{this.joinsNotNullableMap[a]=!1;break}case"right":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([u])=>[u,!1])),this.joinsNotNullableMap[a]=!0;break}case"cross":case"inner":{this.joinsNotNullableMap[a]=!0;break}case"full":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([u])=>[u,!1])),this.joinsNotNullableMap[a]=!1;break}}return this}}createSetOperator(e,i){return n=>{const s=typeof n=="function"?n(IR()):n;if(!Wf(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:i,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 Je({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.where=e,this}having(e){return typeof e=="function"&&(e=e(new Proxy(this.config.fields,new Je({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.having=e,this}groupBy(...e){if(typeof e[0]=="function"){const i=e[0](new Proxy(this.config.fields,new Je({sqlAliasedBehavior:"alias",sqlBehavior:"sql"})));this.config.groupBy=Array.isArray(i)?i:[i]}else this.config.groupBy=e;return this}orderBy(...e){if(typeof e[0]=="function"){const i=e[0](new Proxy(this.config.fields,new Je({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),n=Array.isArray(i)?i:[i];this.config.setOperators.length>0?this.config.setOperators.at(-1).orderBy=n:this.config.orderBy=n}else{const i=e;this.config.setOperators.length>0?this.config.setOperators.at(-1).orderBy=i:this.config.orderBy=i}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,i={}){return this.config.lockingClause={strength:e,config:i},this}getSQL(){return this.dialect.buildSelectQuery(this.config)}toSQL(){const{typings:e,...i}=this.dialect.sqlToQuery(this.getSQL());return i}as(e){const i=[];if(i.push(...Zn(this.config.table)),this.config.joins)for(const n of this.config.joins)i.push(...Zn(n.table));return new Proxy(new dr(this.getSQL(),this.config.fields,e,!1,[...new Set(i)]),new Je({alias:e,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}getSelectedFields(){return new Proxy(this.config.fields,new Je({alias:this.tableName,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}$dynamic(){return this}$withCache(e){return this.cacheConfig=e===void 0?{config:{},enable:!0,autoInvalidate:!0}:e===!1?{enable:!1}:{enable:!0,autoInvalidate:!0,...e},this}}$(Gw,eg,"PgSelectQueryBuilder");var ig,ng;class Xf extends(ng=Gw,ig=xt,ng){constructor(){super(...arguments);$(this,"authToken");$(this,"execute",e=>Mr.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken)))}_prepare(e){const{session:i,config:n,dialect:s,joinsNotNullableMap:o,authToken:a,cacheConfig:l,usedTables:u}=this;if(!i)throw new Error("Cannot execute a query on a query builder. Please use a database instance instead.");const{fields:c}=n;return Mr.startActiveSpan("drizzle.prepareQuery",()=>{const h=ls(c),p=i.prepareQuery(s.sqlToQuery(this.getSQL()),h,e,!0,void 0,{type:"select",tables:[...u]},l);return p.joinsNotNullableMap=o,p.setToken(a)})}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}}$(Xf,ig,"PgSelect");WD(Xf,[En]);function uo(r,t){return(e,i,...n)=>{const s=[i,...n].map(o=>({type:r,isAll:t,rightSelect:o}));for(const o of s)if(!Wf(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 IR=()=>({union:ER,unionAll:CR,intersect:AR,intersectAll:OR,except:FR,exceptAll:PR}),ER=uo("union",!1),CR=uo("union",!0),AR=uo("intersect",!1),OR=uo("intersect",!0),FR=uo("except",!1),PR=uo("except",!0);var sg;sg=xt;class qf{constructor(t){$(this,"dialect");$(this,"dialectConfig");$(this,"$with",(t,e)=>{const i=this;return{as:s=>(typeof s=="function"&&(s=s(i)),new Proxy(new Vf(s.getSQL(),e??("getSelectedFields"in s?s.getSelectedFields()??{}:{}),t,!0),new Je({alias:t,sqlAliasedBehavior:"alias",sqlBehavior:"error"})))}});this.dialect=at(t,zo)?t:void 0,this.dialectConfig=at(t,zo)?void 0:t}with(...t){const e=this;function i(o){return new Tr({fields:o??void 0,session:void 0,dialect:e.getDialect(),withList:t})}function n(o){return new Tr({fields:o??void 0,session:void 0,dialect:e.getDialect(),distinct:!0})}function s(o,a){return new Tr({fields:a??void 0,session:void 0,dialect:e.getDialect(),distinct:{on:o}})}return{select:i,selectDistinct:n,selectDistinctOn:s}}select(t){return new Tr({fields:t??void 0,session:void 0,dialect:this.getDialect()})}selectDistinct(t){return new Tr({fields:t??void 0,session:void 0,dialect:this.getDialect(),distinct:!0})}selectDistinctOn(t,e){return new Tr({fields:e??void 0,session:void 0,dialect:this.getDialect(),distinct:{on:t}})}getDialect(){return this.dialect||(this.dialect=new zo(this.dialectConfig)),this.dialect}}$(qf,sg,"PgQueryBuilder");function Zn(r){return at(r,br)?[r[Ks]?`${r[Ks]}.${r[St.Symbol.BaseName]}`:r[St.Symbol.BaseName]]:at(r,dr)?r._.usedTables??[]:at(r,Ft)?r.usedTables??[]:[]}var og,ag;class Ph extends(ag=En,og=xt,ag){constructor(e,i,n,s){super();$(this,"config");$(this,"cacheConfig");$(this,"authToken");$(this,"execute",e=>Mr.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken)));this.session=i,this.dialect=n,this.config={table:e,withList:s}}where(e){return this.config.where=e,this}returning(e=this.config.table[St.Symbol.Columns]){return this.config.returningFields=e,this.config.returning=ls(e),this}getSQL(){return this.dialect.buildDeleteQuery(this.config)}toSQL(){const{typings:e,...i}=this.dialect.sqlToQuery(this.getSQL());return i}_prepare(e){return Mr.startActiveSpan("drizzle.prepareQuery",()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0,void 0,{type:"delete",tables:Zn(this.config.table)},this.cacheConfig))}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new Je({alias:Kn(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}$(Ph,og,"PgDelete");var lg;lg=xt;class Mh{constructor(t,e,i,n,s){$(this,"authToken");this.table=t,this.session=e,this.dialect=i,this.withList=n,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(i=>{const n={},s=this.table[St.Symbol.Columns];for(const o of Object.keys(i)){const a=i[o];n[o]=at(a,Ft)?a:new Hi(a,s[o])}return n});return new Dh(this.table,e,this.session,this.dialect,this.withList,!1,this.overridingSystemValue_).setToken(this.authToken)}select(t){const e=typeof t=="function"?t(new qf):t;if(!at(e,Ft)&&!Wf(this.table[Ah],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 Dh(this.table,e,this.session,this.dialect,this.withList,!0)}}$(Mh,lg,"PgInsertBuilder");var ug,cg;class Dh extends(cg=En,ug=xt,cg){constructor(e,i,n,s,o,a,l){super();$(this,"config");$(this,"cacheConfig");$(this,"authToken");$(this,"execute",e=>Mr.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken)));this.session=n,this.dialect=s,this.config={table:e,values:i,withList:o,select:a,overridingSystemValue_:l}}returning(e=this.config.table[St.Symbol.Columns]){return this.config.returningFields=e,this.config.returning=ls(e),this}onConflictDoNothing(e={}){if(e.target===void 0)this.config.onConflict=H`do nothing`;else{let i="";i=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 n=e.where?H` where ${e.where}`:void 0;this.config.onConflict=H`(${H.raw(i)})${n} 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 i=e.where?H` where ${e.where}`:void 0,n=e.targetWhere?H` where ${e.targetWhere}`:void 0,s=e.setWhere?H` where ${e.setWhere}`:void 0,o=this.dialect.buildUpdateSet(this.config.table,Aw(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=H`(${H.raw(a)})${n} do update set ${o}${i}${s}`,this}getSQL(){return this.dialect.buildInsertQuery(this.config)}toSQL(){const{typings:e,...i}=this.dialect.sqlToQuery(this.getSQL());return i}_prepare(e){return Mr.startActiveSpan("drizzle.prepareQuery",()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0,void 0,{type:"insert",tables:Zn(this.config.table)},this.cacheConfig))}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new Je({alias:Kn(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}$(Dh,ug,"PgInsert");var hg,fg;class Ww extends(fg=En,hg=xt,fg){constructor(e,i,n){super();$(this,"config");$(this,"authToken");$(this,"execute",e=>Mr.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken)));this.session=i,this.dialect=n,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,...i}=this.dialect.sqlToQuery(this.getSQL());return i}_prepare(e){return Mr.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}}$(Ww,hg,"PgRefreshMaterializedView");var dg;dg=xt;class Rh{constructor(t,e,i,n){$(this,"authToken");this.table=t,this.session=e,this.dialect=i,this.withList=n}setToken(t){return this.authToken=t,this}set(t){return new Hw(this.table,Aw(this.table,t),this.session,this.dialect,this.withList).setToken(this.authToken)}}$(Rh,dg,"PgUpdateBuilder");var pg,mg;class Hw extends(mg=En,pg=xt,mg){constructor(e,i,n,s,o){super();$(this,"config");$(this,"tableName");$(this,"joinsNotNullableMap");$(this,"cacheConfig");$(this,"leftJoin",this.createJoin("left"));$(this,"rightJoin",this.createJoin("right"));$(this,"innerJoin",this.createJoin("inner"));$(this,"fullJoin",this.createJoin("full"));$(this,"authToken");$(this,"execute",e=>this._prepare().execute(e,this.authToken));this.session=n,this.dialect=s,this.config={set:i,table:e,withList:o,joins:[]},this.tableName=Yn(e),this.joinsNotNullableMap=typeof this.tableName=="string"?{[this.tableName]:!0}:{}}from(e){const i=e,n=Yn(i);return typeof n=="string"&&(this.joinsNotNullableMap[n]=!0),this.config.from=i,this}getTableLikeFields(e){return at(e,br)?e[St.Symbol.Columns]:at(e,dr)?e._.selectedFields:e[He].selectedFields}createJoin(e){return(i,n)=>{const s=Yn(i);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 n=="function"){const o=this.config.from&&!at(this.config.from,Ft)?this.getTableLikeFields(this.config.from):void 0;n=n(new Proxy(this.config.table[St.Symbol.Columns],new Je({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})),o&&new Proxy(o,new Je({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))}if(this.config.joins.push({on:n,table:i,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[St.Symbol.Columns]),this.config.from)){const i=Yn(this.config.from);if(typeof i=="string"&&this.config.from&&!at(this.config.from,Ft)){const n=this.getTableLikeFields(this.config.from);e[i]=n}for(const n of this.config.joins){const s=Yn(n.table);if(typeof s=="string"&&!at(n.table,Ft)){const o=this.getTableLikeFields(n.table);e[s]=o}}}return this.config.returningFields=e,this.config.returning=ls(e),this}getSQL(){return this.dialect.buildUpdateQuery(this.config)}toSQL(){const{typings:e,...i}=this.dialect.sqlToQuery(this.getSQL());return i}_prepare(e){const i=this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0,void 0,{type:"insert",tables:Zn(this.config.table)},this.cacheConfig);return i.joinsNotNullableMap=this.joinsNotNullableMap,i}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new Je({alias:Kn(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}$(Hw,pg,"PgUpdate");var yg,gg,vg;const $o=class $o extends(vg=Ft,gg=xt,yg=Symbol.toStringTag,vg){constructor(e){super($o.buildEmbeddedCount(e.source,e.filters).queryChunks);$(this,"sql");$(this,"token");$(this,yg,"PgCountBuilder");$(this,"session");this.params=e,this.mapWith(Number),this.session=e.session,this.sql=$o.buildCount(e.source,e.filters)}static buildEmbeddedCount(e,i){return H`(select count(*) from ${e}${H.raw(" where ").if(i)}${i})`}static buildCount(e,i){return H`select count(*) as count from ${e}${H.raw(" where ").if(i)}${i};`}setToken(e){return this.token=e,this}then(e,i){return Promise.resolve(this.session.count(this.sql,this.token)).then(e,i)}catch(e){return this.then(void 0,e)}finally(e){return this.then(i=>(e==null||e(),i),i=>{throw e==null||e(),i})}};$($o,gg,"PgCountBuilder");let Nh=$o;var _g;_g=xt;class Yw{constructor(t,e,i,n,s,o,a){this.fullSchema=t,this.schema=e,this.tableNamesMap=i,this.table=n,this.tableConfig=s,this.dialect=o,this.session=a}findMany(t){return new Lh(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,t||{},"many")}findFirst(t){return new Lh(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,t?{...t,limit:1}:{limit:1},"first")}}$(Yw,_g,"PgRelationalQueryBuilder");var bg,wg;class Lh extends(wg=En,bg=xt,wg){constructor(e,i,n,s,o,a,l,u,c){super();$(this,"authToken");this.fullSchema=e,this.schema=i,this.tableNamesMap=n,this.table=s,this.tableConfig=o,this.dialect=a,this.session=l,this.config=u,this.mode=c}_prepare(e){return Mr.startActiveSpan("drizzle.prepareQuery",()=>{const{query:i,builtQuery:n}=this._toSQL();return this.session.prepareQuery(n,void 0,e,!0,(s,o)=>{const a=s.map(l=>Fh(this.schema,this.tableConfig,l,i.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(),i=this.dialect.sqlToQuery(e.sql);return{query:e,builtQuery:i}}toSQL(){return this._toSQL().builtQuery}setToken(e){return this.authToken=e,this}execute(){return Mr.startActiveSpan("drizzle.operation",()=>this._prepare().execute(void 0,this.authToken))}}$(Lh,bg,"PgRelationalQuery");var xg,Sg;class Xw extends(Sg=En,xg=xt,Sg){constructor(t,e,i,n){super(),this.execute=t,this.sql=e,this.query=i,this.mapBatchResult=n}getSQL(){return this.sql}getQuery(){return this.query}mapResult(t,e){return e?this.mapBatchResult(t):t}_prepare(){return this}isResponseInArrayMode(){return!1}}$(Xw,xg,"PgRaw");var Tg;Tg=xt;class Qf{constructor(t,e,i){$(this,"query");$(this,"$with",(t,e)=>{const i=this;return{as:s=>(typeof s=="function"&&(s=s(new qf(i.dialect))),new Proxy(new Vf(s.getSQL(),e??("getSelectedFields"in s?s.getSelectedFields()??{}:{}),t,!0),new Je({alias:t,sqlAliasedBehavior:"alias",sqlBehavior:"error"})))}});$(this,"$cache");$(this,"authToken");if(this.dialect=t,this.session=e,this._=i?{schema:i.schema,fullSchema:i.fullSchema,tableNamesMap:i.tableNamesMap,session:e}:{schema:void 0,fullSchema:{},tableNamesMap:{},session:e},this.query={},this._.schema)for(const[n,s]of Object.entries(this._.schema))this.query[n]=new Yw(i.fullSchema,this._.schema,this._.tableNamesMap,i.fullSchema[n],s,t,e);this.$cache={invalidate:async n=>{}}}$count(t,e){return new Nh({source:t,filters:e,session:this.session})}with(...t){const e=this;function i(u){return new Tr({fields:u??void 0,session:e.session,dialect:e.dialect,withList:t})}function n(u){return new Tr({fields:u??void 0,session:e.session,dialect:e.dialect,withList:t,distinct:!0})}function s(u,c){return new Tr({fields:c??void 0,session:e.session,dialect:e.dialect,withList:t,distinct:{on:u}})}function o(u){return new Rh(u,e.session,e.dialect,t)}function a(u){return new Mh(u,e.session,e.dialect,t)}function l(u){return new Ph(u,e.session,e.dialect,t)}return{select:i,selectDistinct:n,selectDistinctOn:s,update:o,insert:a,delete:l}}select(t){return new Tr({fields:t??void 0,session:this.session,dialect:this.dialect})}selectDistinct(t){return new Tr({fields:t??void 0,session:this.session,dialect:this.dialect,distinct:!0})}selectDistinctOn(t,e){return new Tr({fields:e??void 0,session:this.session,dialect:this.dialect,distinct:{on:t}})}update(t){return new Rh(t,this.session,this.dialect)}insert(t){return new Mh(t,this.session,this.dialect)}delete(t){return new Ph(t,this.session,this.dialect)}refreshMaterializedView(t){return new Ww(t,this.session,this.dialect)}execute(t){const e=typeof t=="string"?H.raw(t):t.getSQL(),i=this.dialect.sqlToQuery(e),n=this.session.prepareQuery(i,void 0,void 0,!1);return new Xw(()=>n.execute(void 0,this.authToken),e,i,s=>n.mapResult(s,!0))}transaction(t,e){return this.session.transaction(t,e)}}$(Qf,Tg,"PgDatabase");var Ig;Ig=xt;class qw{}$(qw,Ig,"Cache");var Eg,Cg;class Qw extends(Cg=qw,Eg=xt,Cg){strategy(){return"all"}async get(t){}async put(t,e,i,n){}async onMutate(t){}}$(Qw,Eg,"NoopCache");async function Pm(r,t){const e=`${r}-${JSON.stringify(t)}`,n=new TextEncoder().encode(e),s=await crypto.subtle.digest("SHA-256",n);return[...new Uint8Array(s)].map(l=>l.toString(16).padStart(2,"0")).join("")}class un extends Error{constructor(t,e,i){super(`Failed query: ${t} -params: ${e}`),this.query=t,this.params=e,this.cause=i,Error.captureStackTrace(this,un),i&&(this.cause=i)}}var Ag;Ag=xt;class Kw{constructor(t,e,i,n){$(this,"authToken");$(this,"joinsNotNullableMap");var s;this.query=t,this.cache=e,this.queryMetadata=i,this.cacheConfig=n,e&&e.strategy()==="all"&&n===void 0&&(this.cacheConfig={enable:!0,autoInvalidate:!0}),(s=this.cacheConfig)!=null&&s.enable||(this.cacheConfig=void 0)}getQuery(){return this.query}mapResult(t,e){return t}setToken(t){return this.authToken=t,this}async queryWithCache(t,e,i){if(this.cache===void 0||at(this.cache,Qw)||this.queryMetadata===void 0)try{return await i()}catch(n){throw new un(t,e,n)}if(this.cacheConfig&&!this.cacheConfig.enable)try{return await i()}catch(n){throw new un(t,e,n)}if((this.queryMetadata.type==="insert"||this.queryMetadata.type==="update"||this.queryMetadata.type==="delete")&&this.queryMetadata.tables.length>0)try{const[n]=await Promise.all([i(),this.cache.onMutate({tables:this.queryMetadata.tables})]);return n}catch(n){throw new un(t,e,n)}if(!this.cacheConfig)try{return await i()}catch(n){throw new un(t,e,n)}if(this.queryMetadata.type==="select"){const n=await this.cache.get(this.cacheConfig.tag??await Pm(t,e),this.queryMetadata.tables,this.cacheConfig.tag!==void 0,this.cacheConfig.autoInvalidate);if(n===void 0){let s;try{s=await i()}catch(o){throw new un(t,e,o)}return await this.cache.put(this.cacheConfig.tag??await Pm(t,e),s,this.cacheConfig.autoInvalidate?this.queryMetadata.tables:[],this.cacheConfig.tag!==void 0,this.cacheConfig.config),s}return n}try{return await i()}catch(n){throw new un(t,e,n)}}}$(Kw,Ag,"PgPreparedQuery");var Og;Og=xt;class Zw{constructor(t){this.dialect=t}execute(t,e){return Mr.startActiveSpan("drizzle.operation",()=>Mr.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 i=await this.execute(t,e);return Number(i[0].count)}}$(Zw,Og,"PgSession");var Fg,Pg;class Jw extends(Pg=Qf,Fg=xt,Pg){constructor(t,e,i,n=0){super(t,e,i),this.schema=i,this.nestedIndex=n}rollback(){throw new Tw}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"),H.raw(e.join(" "))}setTransaction(t){return this.session.execute(H`set transaction ${this.getTransactionConfigSQL(t)}`)}}$(Jw,Fg,"PgTransaction");function Mm(r){return typeof r=="string"&&/^true$/i.test(r)}function MR(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 i=e.searchParams.get("logger");i&&Mm(i)&&(t.logger=!0);const n=e.searchParams.get("storage");switch(n){case sa.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:sa.ORIGIN_PRIVATE_FS,path:e.pathname.startsWith("/")?e.pathname.slice(1):e.pathname,...s&&Mm(s)&&{accessMode:F0.READ_WRITE}};break}case null:break;default:console.warn(`Unknown storage type "${n}"`);break}return t}var Mg,Dg;class tx extends(Dg=Kw,Mg=xt,Dg){constructor(t,e,i,n,s,o){super({sql:e,params:i}),this.client=t,this.queryString=e,this.params=i,this.logger=n,this.fields=s,this.customResultMapper=o}async execute(t={}){const e=Am(this.params,t);this.logger.logQuery(this.queryString,e);const{fields:i,queryString:n,client:s,customResultMapper:o}=this,a=await s;return a.query(n,e)}async all(t={}){const e=Am(this.params,t);return this.logger.logQuery(this.queryString,e),(await this.client).query(this.queryString,e)}}$(tx,Mg,"DuckDBWasmPreparedQuery");var Rg,Ng;const Ql=class Ql extends(Ng=Zw,Rg=xt,Ng){constructor(e,i,n,s={}){super(i);$(this,"logger");this.client=e,this.schema=n,this.options=s,this.logger=s.logger??new Cw}prepareQuery(e,i,n,s,o){return new tx(this.client,e.sql,e.params,this.logger,i,o)}async query(e,i){return this.logger.logQuery(e,i),(await this.client).query(e,i)}async queryObjects(e,i){return this.logger.logQuery(e,i),(await this.client).query(e,i)}transaction(e,i){return BD(this.client,async n=>{const s=new Ql(n,this.dialect,this.schema,this.options),o=new Bh(this.dialect,s,this.schema);return i&&await o.setTransaction(i),e(o)})}};$(Ql,Rg,"DuckDBWasmSession");let Hl=Ql;var Lg,Bg;const Kl=class Kl extends(Bg=Jw,Lg=xt,Bg){constructor(e,i,n,s=0){super(e,i,n,s);$(this,"dialect");$(this,"session");this.dialect=e,this.session=i}async transaction(e){return kD(this.session.client,"",async i=>{const n=new Hl(i,this.dialect,this.schema,this.session.options),s=new Kl(this.dialect,n,this.schema);return e(s)})}};$(Kl,Lg,"DuckDBWasmTransaction");let Bh=Kl;var kg,Ug;class ex extends(Ug=Qf,kg=xt,Ug){}$(ex,kg,"DuckDBWasmDatabase");function jo(r,t={}){const e=new zo({casing:t.casing});let i;t.logger===!0?i=new Ew:t.logger!==!1&&(i=t.logger);let n;if(t.schema){const a=gR(t.schema,wR);n={fullSchema:t.schema,schema:a.tables,tableNamesMap:a.tableNamesMap}}const s=new Hl(r,e,n,{logger:i}),o=new ex(e,s,n);return o.$client=r,o}function Dm(r,t){const e=MR(r);let i;return e.bundles==="import-url"?i=(async()=>{const s=await Eh();switch(s){case"browser":return(await cn(async()=>{const{getImportUrlBundles:o}=await import("./import-url-browser-CPN8ipMD.js");return{getImportUrlBundles:o}},__vite__mapDeps([3,4]))).getImportUrlBundles();case"node":return await(await cn(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}"`)}})():i=(async()=>{const s=await Eh();switch(s){case"browser":return(await cn(async()=>{const{getBundles:o}=await import("./default-browser-BrgSDbLD.js");return{getBundles:o}},[])).getBundles();case"node":return await(await cn(async()=>{const{getBundles:o}=await import("./default-node-BWr47-4Z.js");return{getBundles:o}},__vite__mapDeps([0,1,2]))).getBundles();default:throw new Error(`Unsupported environment: "${s}"`)}})(),jo(_w({bundles:i,logger:e.logger?new P0:void 0,storage:e.storage}),t)}function Rm(...r){if(typeof r[0]=="string")return Dm(r[0],r[1]);if(YD(r[0])){const{connection:t,client:e,...i}=r[0];if(e)return jo(e,i);if(typeof t=="string")return Dm(t,i);if(typeof t>"u")throw new Error("connection option is required");return jo(_w({bundles:t.bundles,logger:t.logger,storage:t.storage}),i)}return jo(r[0],r[1])}(r=>{function t(e){return jo({options:{parsers:{},serializers:{}}},e)}r.mock=t})(Rm||(Rm={}));export{H1 as A,UR as D,BR as I,TC as J,hI as L,xc as M,LR as T,di as a,Re as b,Rm as d,la as e,kR as l}; +params: ${e}`),this.query=t,this.params=e,this.cause=i,Error.captureStackTrace(this,un),i&&(this.cause=i)}}var Ag;Ag=xt;class Kw{constructor(t,e,i,n){$(this,"authToken");$(this,"joinsNotNullableMap");var s;this.query=t,this.cache=e,this.queryMetadata=i,this.cacheConfig=n,e&&e.strategy()==="all"&&n===void 0&&(this.cacheConfig={enable:!0,autoInvalidate:!0}),(s=this.cacheConfig)!=null&&s.enable||(this.cacheConfig=void 0)}getQuery(){return this.query}mapResult(t,e){return t}setToken(t){return this.authToken=t,this}async queryWithCache(t,e,i){if(this.cache===void 0||at(this.cache,Qw)||this.queryMetadata===void 0)try{return await i()}catch(n){throw new un(t,e,n)}if(this.cacheConfig&&!this.cacheConfig.enable)try{return await i()}catch(n){throw new un(t,e,n)}if((this.queryMetadata.type==="insert"||this.queryMetadata.type==="update"||this.queryMetadata.type==="delete")&&this.queryMetadata.tables.length>0)try{const[n]=await Promise.all([i(),this.cache.onMutate({tables:this.queryMetadata.tables})]);return n}catch(n){throw new un(t,e,n)}if(!this.cacheConfig)try{return await i()}catch(n){throw new un(t,e,n)}if(this.queryMetadata.type==="select"){const n=await this.cache.get(this.cacheConfig.tag??await Pm(t,e),this.queryMetadata.tables,this.cacheConfig.tag!==void 0,this.cacheConfig.autoInvalidate);if(n===void 0){let s;try{s=await i()}catch(o){throw new un(t,e,o)}return await this.cache.put(this.cacheConfig.tag??await Pm(t,e),s,this.cacheConfig.autoInvalidate?this.queryMetadata.tables:[],this.cacheConfig.tag!==void 0,this.cacheConfig.config),s}return n}try{return await i()}catch(n){throw new un(t,e,n)}}}$(Kw,Ag,"PgPreparedQuery");var Og;Og=xt;class Zw{constructor(t){this.dialect=t}execute(t,e){return Mr.startActiveSpan("drizzle.operation",()=>Mr.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 i=await this.execute(t,e);return Number(i[0].count)}}$(Zw,Og,"PgSession");var Fg,Pg;class Jw extends(Pg=Qf,Fg=xt,Pg){constructor(t,e,i,n=0){super(t,e,i),this.schema=i,this.nestedIndex=n}rollback(){throw new Tw}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"),H.raw(e.join(" "))}setTransaction(t){return this.session.execute(H`set transaction ${this.getTransactionConfigSQL(t)}`)}}$(Jw,Fg,"PgTransaction");function Mm(r){return typeof r=="string"&&/^true$/i.test(r)}function MR(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 i=e.searchParams.get("logger");i&&Mm(i)&&(t.logger=!0);const n=e.searchParams.get("storage");switch(n){case sa.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:sa.ORIGIN_PRIVATE_FS,path:e.pathname.startsWith("/")?e.pathname.slice(1):e.pathname,...s&&Mm(s)&&{accessMode:F0.READ_WRITE}};break}case null:break;default:console.warn(`Unknown storage type "${n}"`);break}return t}var Mg,Dg;class tx extends(Dg=Kw,Mg=xt,Dg){constructor(t,e,i,n,s,o){super({sql:e,params:i}),this.client=t,this.queryString=e,this.params=i,this.logger=n,this.fields=s,this.customResultMapper=o}async execute(t={}){const e=Am(this.params,t);this.logger.logQuery(this.queryString,e);const{fields:i,queryString:n,client:s,customResultMapper:o}=this,a=await s;return a.query(n,e)}async all(t={}){const e=Am(this.params,t);return this.logger.logQuery(this.queryString,e),(await this.client).query(this.queryString,e)}}$(tx,Mg,"DuckDBWasmPreparedQuery");var Rg,Ng;const Ql=class Ql extends(Ng=Zw,Rg=xt,Ng){constructor(e,i,n,s={}){super(i);$(this,"logger");this.client=e,this.schema=n,this.options=s,this.logger=s.logger??new Cw}prepareQuery(e,i,n,s,o){return new tx(this.client,e.sql,e.params,this.logger,i,o)}async query(e,i){return this.logger.logQuery(e,i),(await this.client).query(e,i)}async queryObjects(e,i){return this.logger.logQuery(e,i),(await this.client).query(e,i)}transaction(e,i){return BD(this.client,async n=>{const s=new Ql(n,this.dialect,this.schema,this.options),o=new Bh(this.dialect,s,this.schema);return i&&await o.setTransaction(i),e(o)})}};$(Ql,Rg,"DuckDBWasmSession");let Hl=Ql;var Lg,Bg;const Kl=class Kl extends(Bg=Jw,Lg=xt,Bg){constructor(e,i,n,s=0){super(e,i,n,s);$(this,"dialect");$(this,"session");this.dialect=e,this.session=i}async transaction(e){return kD(this.session.client,"",async i=>{const n=new Hl(i,this.dialect,this.schema,this.session.options),s=new Kl(this.dialect,n,this.schema);return e(s)})}};$(Kl,Lg,"DuckDBWasmTransaction");let Bh=Kl;var kg,Ug;class ex extends(Ug=Qf,kg=xt,Ug){}$(ex,kg,"DuckDBWasmDatabase");function jo(r,t={}){const e=new zo({casing:t.casing});let i;t.logger===!0?i=new Ew:t.logger!==!1&&(i=t.logger);let n;if(t.schema){const a=gR(t.schema,wR);n={fullSchema:t.schema,schema:a.tables,tableNamesMap:a.tableNamesMap}}const s=new Hl(r,e,n,{logger:i}),o=new ex(e,s,n);return o.$client=r,o}function Dm(r,t){const e=MR(r);let i;return e.bundles==="import-url"?i=(async()=>{const s=await Eh();switch(s){case"browser":return(await cn(async()=>{const{getImportUrlBundles:o}=await import("./import-url-browser-CPN8ipMD.js");return{getImportUrlBundles:o}},__vite__mapDeps([3,4]))).getImportUrlBundles();case"node":return await(await cn(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}"`)}})():i=(async()=>{const s=await Eh();switch(s){case"browser":return(await cn(async()=>{const{getBundles:o}=await import("./default-browser-BrgSDbLD.js");return{getBundles:o}},[])).getBundles();case"node":return await(await cn(async()=>{const{getBundles:o}=await import("./default-node-Bhmxs8ab.js");return{getBundles:o}},__vite__mapDeps([0,1,2]))).getBundles();default:throw new Error(`Unsupported environment: "${s}"`)}})(),jo(_w({bundles:i,logger:e.logger?new P0:void 0,storage:e.storage}),t)}function Rm(...r){if(typeof r[0]=="string")return Dm(r[0],r[1]);if(YD(r[0])){const{connection:t,client:e,...i}=r[0];if(e)return jo(e,i);if(typeof t=="string")return Dm(t,i);if(typeof t>"u")throw new Error("connection option is required");return jo(_w({bundles:t.bundles,logger:t.logger,storage:t.storage}),i)}return jo(r[0],r[1])}(r=>{function t(e){return jo({options:{parsers:{},serializers:{}}},e)}r.mock=t})(Rm||(Rm={}));export{H1 as A,UR as D,BR as I,TC as J,hI as L,xc as M,LR as T,di as a,Re as b,Rm as d,la as e,kR as l}; diff --git a/assets/Textarea.vue_vue_type_script_setup_true_lang-Bht7lS1m.js b/assets/Textarea.vue_vue_type_script_setup_true_lang-B9_K8yo0.js similarity index 75% rename from assets/Textarea.vue_vue_type_script_setup_true_lang-Bht7lS1m.js rename to assets/Textarea.vue_vue_type_script_setup_true_lang-B9_K8yo0.js index 08f370561e66dda12ef490ad7f4709843f45dc20..163e7f3d759b3a8ba9258b9158dc04d223359847 100644 --- a/assets/Textarea.vue_vue_type_script_setup_true_lang-Bht7lS1m.js +++ b/assets/Textarea.vue_vue_type_script_setup_true_lang-B9_K8yo0.js @@ -1 +1 @@ -import{_ as r}from"./Basic.vue_vue_type_script_setup_true_lang-COgaiUVw.js";import{d as t,cg as u,bk as d,o as n}from"./index-WDP_Z4A8.js";const p=t({__name:"Textarea",props:{modelValue:{default:""},modelModifiers:{}},emits:["update:modelValue"],setup(l){const e=u(l,"modelValue");return(s,a)=>(n(),d(r,{modelValue:e.value,"onUpdate:modelValue":a[0]||(a[0]=o=>e.value=o),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-sm":"","outline-none":"",shadow:"sm",bg:"neutral-50 dark:neutral-950 focus:neutral-50 dark:focus:neutral-900"},null,8,["modelValue"]))}});export{p as _}; +import{_ as r}from"./Basic.vue_vue_type_script_setup_true_lang-Dgb2JW4V.js";import{d as t,cg as u,bk as d,o as n}from"./index-8LjpXIG7.js";const p=t({__name:"Textarea",props:{modelValue:{default:""},modelModifiers:{}},emits:["update:modelValue"],setup(l){const e=u(l,"modelValue");return(s,a)=>(n(),d(r,{modelValue:e.value,"onUpdate:modelValue":a[0]||(a[0]=o=>e.value=o),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-sm":"","outline-none":"",shadow:"sm",bg:"neutral-50 dark:neutral-950 focus:neutral-50 dark:focus:neutral-900"},null,8,["modelValue"]))}});export{p as _}; diff --git a/assets/TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js b/assets/TransitionVertical.vue_vue_type_script_setup_true_lang-DyyWKgKi.js similarity index 96% rename from assets/TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js rename to assets/TransitionVertical.vue_vue_type_script_setup_true_lang-DyyWKgKi.js index 128506d9994a0b2036a4b80e83248f29d4ff5b89..2431f540bb318ed6e28d5ae3415b27b7c7d38dbd 100644 --- a/assets/TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js +++ b/assets/TransitionVertical.vue_vue_type_script_setup_true_lang-DyyWKgKi.js @@ -1 +1 @@ -import{d as l,bk as m,o as T,cm as b,bl as B,bh as v}from"./index-WDP_Z4A8.js";const n="0px",W=l({__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)=>(T(),m(b,{css:!1,onEnter:u,onLeave:f},{default:B(()=>[v(o.$slots,"default")]),_:3}))}});export{W as _}; +import{d as l,bk as m,o as T,cm as b,bl as B,bh as v}from"./index-8LjpXIG7.js";const n="0px",W=l({__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)=>(T(),m(b,{css:!1,onEnter:u,onLeave:f},{default:B(()=>[v(o.$slots,"default")]),_:3}))}});export{W as _}; diff --git a/assets/_...all_-ZSCTB34-.js b/assets/_...all_-DKgiSZB7.js similarity index 63% rename from assets/_...all_-ZSCTB34-.js rename to assets/_...all_-DKgiSZB7.js index 8a6884efef46535af68c5f9b7adcfd927cb9199a..03f74a4f1908f459e84b30211f6e1498a829eaf0 100644 --- a/assets/_...all_-ZSCTB34-.js +++ b/assets/_...all_-DKgiSZB7.js @@ -1 +1 @@ -import{c2 as e,c,o as n}from"./index-WDP_Z4A8.js";const o={};function _(t,r){return n(),c("div",null," 404 - Page not found ")}const s=e(o,[["render",_]]);export{s as default}; +import{c2 as e,c,o as n}from"./index-8LjpXIG7.js";const o={};function _(t,r){return n(),c("div",null," 404 - Page not found ")}const s=e(o,[["render",_]]);export{s as default}; diff --git a/assets/airi-card-Cgw9OiDq.js b/assets/airi-card-COPhkSXD.js similarity index 94% rename from assets/airi-card-Cgw9OiDq.js rename to assets/airi-card-COPhkSXD.js index 02bd147d1fa812b862afe41ca3f212e727f7790e..6a6b473fb17e1d8093154d96aa2eade3331900f3 100644 --- a/assets/airi-card-Cgw9OiDq.js +++ b/assets/airi-card-COPhkSXD.js @@ -1,4 +1,4 @@ -import{a4 as W,cc as L,f as g,a0 as O,T as D,$ as G,w as H}from"./index-WDP_Z4A8.js";import{c as N}from"./emotions-DWNSb738.js";import{u as b}from"./consciousness-CI5ipeHX.js";import{u as k}from"./speech-DRmXCXwq.js";function q(a,u){return{role:"system",content:[a,N.map(n=>`- ${n}`).join(` +import{a4 as W,cc as L,f as g,a0 as O,T as D,$ as G,w as H}from"./index-8LjpXIG7.js";import{c as N}from"./emotions-DWNSb738.js";import{u as b}from"./consciousness-DSqUYfGS.js";import{u as k}from"./speech-BUPJbslH.js";function q(a,u){return{role:"system",content:[a,N.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=b(),R=k(),{activeModel:l}=O(P),{activeSpeechVoiceId:m,activeSpeechModel:p}=O(R),$=s=>{const e=crypto.randomUUID();return a.value.set(e,f(s)),e},B=s=>{a.value.delete(s)},V=s=>a.value.get(s);function v(s){var t,r,i,c,d,h,_,y,S,x,C,M,I,w,E,A,T,U,j;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:((_=(h=e.modules)==null?void 0:h.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:(T=(A=e.modules)==null?void 0:A.speech)==null?void 0:T.language},vrm:(U=e.modules)==null?void 0:U.vrm,live2d:(j=e.modules)==null?void 0:j.live2d},agents:e.agents??{}}:{modules:o,agents:{}}}function f(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-AJxwqJ9S.js b/assets/alibaba-cloud-model-studio-CNfGTHJE.js similarity index 71% rename from assets/alibaba-cloud-model-studio-AJxwqJ9S.js rename to assets/alibaba-cloud-model-studio-CNfGTHJE.js index 904aff48b9b7a6749162630d41de98693230f36c..f6bc1ca42c57a110880ad737aef12564a9c4c3ee 100644 --- a/assets/alibaba-cloud-model-studio-AJxwqJ9S.js +++ b/assets/alibaba-cloud-model-studio-CNfGTHJE.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as x,e as m,a0 as k,$,f as V,T as F,w as v,bk as B,o as I,bl as y,b as c,u as i,a as T}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as U}from"./providers-7GsMyC_3.js";import{u as E}from"./speech-DRmXCXwq.js";import{_ as f}from"./FieldRange.vue_vue_type_script_setup_true_lang-BubMLR-2.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as K,a as L}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-D8TYHcvp.js";import{b as P}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";const N={flex:"~ col gap-4"},o="alibaba-cloud-model-studio",_="cosyvoice-v1",z=x({__name:"alibaba-cloud-model-studio",setup(G){const u={speed:1},d=m(0),l=m(1),n=m(0),p=E(),a=U(),{providers:g}=k(a),{t:s}=$(),h=V(()=>{var e;return!!((e=g.value[o])!=null&&e.apiKey)}),w=V(()=>p.availableVoices[o]||[]);async function M(e,r,t){const b=a.getProviderInstance(o);if(!b)throw new Error("Failed to initialize speech provider");const C=a.getProviderConfig(o),S=C.model||_;return await p.speech(b,S,e,r,{...C,...u})}return F(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)=>(I(),B(i(L),{"provider-id":o,"default-model":_,"additional-settings":u},{"voice-settings":y(()=>[T("div",N,[c(i(f),{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(f),{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(f),{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:y(()=>[c(i(K),{"available-voices":w.value,"generate-speech":M,"api-key-configured":h.value,"default-text":"Hello! This is a test of the ElevenLabs voice synthesis."},null,8,["available-voices","api-key-configured"])]),_:1}))}});typeof P=="function"&&P(z);export{z as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import{d as x,e as m,a0 as k,$,f as V,T as F,w as v,bk as B,o as I,bl as y,b as c,u as i,a as T}from"./index-8LjpXIG7.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{u as U}from"./providers-Dhn8Iy_2.js";import{u as E}from"./speech-BUPJbslH.js";import{_ as f}from"./FieldRange.vue_vue_type_script_setup_true_lang-Cdt76zqB.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{_ as K,a as L}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-CN3ASV_M.js";import{b as P}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CU_o_t3A.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BOcCBViZ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-DyyWKgKi.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-DdnLISgI.js";import"./Input.vue_vue_type_script_setup_true_lang-CpaCGrgF.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-wR1l1PPX.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-DTczYoOw.js";const N={flex:"~ col gap-4"},o="alibaba-cloud-model-studio",_="cosyvoice-v1",z=x({__name:"alibaba-cloud-model-studio",setup(G){const u={speed:1},d=m(0),l=m(1),n=m(0),p=E(),a=U(),{providers:g}=k(a),{t:s}=$(),h=V(()=>{var e;return!!((e=g.value[o])!=null&&e.apiKey)}),w=V(()=>p.availableVoices[o]||[]);async function M(e,r,t){const b=a.getProviderInstance(o);if(!b)throw new Error("Failed to initialize speech provider");const C=a.getProviderConfig(o),S=C.model||_;return await p.speech(b,S,e,r,{...C,...u})}return F(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)=>(I(),B(i(L),{"provider-id":o,"default-model":_,"additional-settings":u},{"voice-settings":y(()=>[T("div",N,[c(i(f),{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(f),{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(f),{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:y(()=>[c(i(K),{"available-voices":w.value,"generate-speech":M,"api-key-configured":h.value,"default-text":"Hello! This is a test of the ElevenLabs voice synthesis."},null,8,["available-voices","api-key-configured"])]),_:1}))}});typeof P=="function"&&P(z);export{z as default}; diff --git a/assets/anthropic-CRbvwdIi.js b/assets/anthropic-D75II3Mv.js similarity index 77% rename from assets/anthropic-CRbvwdIi.js rename to assets/anthropic-D75II3Mv.js index 3468e47a3c7b3d4273308958753fa47a845304f9..397f8a276eb3167f6c224297a13a3b57831bb2d9 100644 --- a/assets/anthropic-CRbvwdIi.js +++ b/assets/anthropic-D75II3Mv.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as S,$ as x,V as U,a0 as V,f as v,T as w,w as C,bk as K,o as R,bl as c,a as i,b as l,ch as p,u as a}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as $}from"./providers-7GsMyC_3.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as O,a as A}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import{_ as I}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import{_ as N,a as T}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";const e="anthropic",z=S({__name:"anthropic",setup(M){const{t:u}=x(),g=U(),h=$(),{providers:o}=V(h),m=v(()=>h.getProviderMetadata(e)),s=v({get:()=>{var t;return((t=o.value[e])==null?void 0:t.apiKey)||""},set:t=>{o.value[e]||(o.value[e]={}),o.value[e].apiKey=t}}),n=v({get:()=>{var t;return((t=o.value[e])==null?void 0:t.baseUrl)||"https://api.anthropic.com/v1/"},set:t=>{o.value[e]||(o.value[e]={}),o.value[e].baseUrl=t}});w(()=>{var t,r;o.value[e]||(o.value[e]={baseUrl:"https://api.anthropic.com/v1/"}),s.value=((t=o.value[e])==null?void 0:t.apiKey)||"",n.value=((r=o.value[e])==null?void 0:r.baseUrl)||"https://api.anthropic.com/v1/"}),C([s,n],()=>{o.value[e]={...o.value[e],apiKey:s.value,baseUrl:n.value||"https://api.anthropic.com/v1/"}});function y(){o.value[e]={baseUrl:"https://api.anthropic.com/v1/"}}return(t,r)=>{var f,b;return R(),K(a(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":()=>a(g).back()},{default:c(()=>[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-semibold":"",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(a(N),null,{default:c(()=>[l(a(T),{title:a(u)("settings.pages.providers.common.section.basic.title"),description:a(u)("settings.pages.providers.common.section.basic.description"),"on-reset":y},{default:c(()=>{var d;return[l(a(I),{modelValue:s.value,"onUpdate:modelValue":r[0]||(r[0]=k=>s.value=k),"provider-name":((d=m.value)==null?void 0:d.localizedName)||"Anthropic",placeholder:"sk-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(a(O),{title:a(u)("settings.pages.providers.common.section.advanced.title")},{default:c(()=>[l(a(A),{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,__:[2]},8,["provider-name","provider-icon","on-back"])}}});typeof _=="function"&&_(z);export{z as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import{d as S,$ as x,V as U,a0 as V,f as v,T as w,w as C,bk as K,o as R,bl as c,a as i,b as l,ch as p,u as a}from"./index-8LjpXIG7.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{u as $}from"./providers-Dhn8Iy_2.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{_ as O,a as A}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CU_o_t3A.js";import{_ as I}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-wR1l1PPX.js";import{_ as N,a as T}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-DTczYoOw.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-D3mbXce4.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BOcCBViZ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-DyyWKgKi.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-DdnLISgI.js";import"./Input.vue_vue_type_script_setup_true_lang-CpaCGrgF.js";const e="anthropic",z=S({__name:"anthropic",setup(M){const{t:u}=x(),g=U(),h=$(),{providers:o}=V(h),m=v(()=>h.getProviderMetadata(e)),s=v({get:()=>{var t;return((t=o.value[e])==null?void 0:t.apiKey)||""},set:t=>{o.value[e]||(o.value[e]={}),o.value[e].apiKey=t}}),n=v({get:()=>{var t;return((t=o.value[e])==null?void 0:t.baseUrl)||"https://api.anthropic.com/v1/"},set:t=>{o.value[e]||(o.value[e]={}),o.value[e].baseUrl=t}});w(()=>{var t,r;o.value[e]||(o.value[e]={baseUrl:"https://api.anthropic.com/v1/"}),s.value=((t=o.value[e])==null?void 0:t.apiKey)||"",n.value=((r=o.value[e])==null?void 0:r.baseUrl)||"https://api.anthropic.com/v1/"}),C([s,n],()=>{o.value[e]={...o.value[e],apiKey:s.value,baseUrl:n.value||"https://api.anthropic.com/v1/"}});function y(){o.value[e]={baseUrl:"https://api.anthropic.com/v1/"}}return(t,r)=>{var f,b;return R(),K(a(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":()=>a(g).back()},{default:c(()=>[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-semibold":"",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(a(N),null,{default:c(()=>[l(a(T),{title:a(u)("settings.pages.providers.common.section.basic.title"),description:a(u)("settings.pages.providers.common.section.basic.description"),"on-reset":y},{default:c(()=>{var d;return[l(a(I),{modelValue:s.value,"onUpdate:modelValue":r[0]||(r[0]=k=>s.value=k),"provider-name":((d=m.value)==null?void 0:d.localizedName)||"Anthropic",placeholder:"sk-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(a(O),{title:a(u)("settings.pages.providers.common.section.advanced.title")},{default:c(()=>[l(a(A),{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,__:[2]},8,["provider-name","provider-icon","on-back"])}}});typeof _=="function"&&_(z);export{z as default}; diff --git a/assets/audio-DU0_kfqA.js b/assets/audio-D7Ph9Plm.js similarity index 88% rename from assets/audio-DU0_kfqA.js rename to assets/audio-D7Ph9Plm.js index 6215be0a8b24689f6446df244eca95612c75ef57..a4acd0d5984069102d4a41bf400a777330b19986 100644 --- a/assets/audio-DU0_kfqA.js +++ b/assets/audio-D7Ph9Plm.js @@ -1 +1 @@ -import{d as s,e as f,c as d,o as p,a as t}from"./index-WDP_Z4A8.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,e as f,c as d,o as p,a as t}from"./index-8LjpXIG7.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-C-QrXCNT.js b/assets/background-remove-DCzY1Ywz.js similarity index 99% rename from assets/background-remove-C-QrXCNT.js rename to assets/background-remove-DCzY1Ywz.js index cfe22b49121e7858f96026ce5f283bd4925ba7a9..2a964bf2f3c48d6fe7011ea94ed2ef5af661c4de 100644 --- a/assets/background-remove-C-QrXCNT.js +++ b/assets/background-remove-DCzY1Ywz.js @@ -1,4 +1,4 @@ -var _v=Object.defineProperty;var gv=(e,r,t)=>r in e?_v(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var Y=(e,r,t)=>gv(e,typeof r!="symbol"?r+"":r,t);import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as wv}from"./InputFile.vue_vue_type_script_setup_true_lang-Bt1GPBFc.js";import{d as bv,e as zs,f as Mv,T as yv,c as Tn,o as En,a as Vr,b as vv,Y as Ef,c6 as Pf,c7 as Cf,W as Sf,a3 as xv,u as Tv}from"./index-WDP_Z4A8.js";import"./floating-ui.core-CgBsuaUc.js";const la=new Map,kn=[],Ev=(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}}},Cv=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 Pv(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)})]},Sv="1.22.0";let $f="warning";const Ts={wasm:{},webgl:{},webgpu:{},versions:{common:Sv},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}`);$f=e}},get logLevel(){return $f}};Object.defineProperty(Ts,"logLevel",{enumerable:!0});const $v=Ts,kv=(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 c=0,d=p,_=p*2,f=-1;i==="RGBA"?(c=0,d=p,_=p*2,f=p*3):i==="RGB"?(c=0,d=p,_=p*2):i==="RBG"&&(c=0,_=p,d=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 c=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 d=4;let _=0,f=1,v=2,$=3,g=0,w=c,C=c*2,E=-1;a==="RGBA"?(g=0,w=c,C=c*2,E=c*3):a==="RGB"?(g=0,w=c,C=c*2):a==="RBG"&&(g=0,C=c,w=c*2),s=t.createImageData(o,n);for(let x=0;x{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 c=4,d=0,_=1,f=2,v=3,$=0,g=u,w=u*2,C=-1;a==="RGB"&&(c=3,d=0,_=1,f=2,v=-1),l==="RGBA"?C=u*3:l==="RBG"?($=0,w=u,g=u*2):l==="BGR"&&(w=0,g=u,$=u*2);for(let x=0;x{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 c=u(p);if(c!=null){let d=e.height,_=e.width;if(r!==void 0&&r.resizedHeight!==void 0&&r.resizedWidth!==void 0&&(d=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=d,a.width=_}else a.tensorFormat="RGBA",a.height=d,a.width=_;c.drawImage(e,0,0),i=c.getImageData(0,0,_,d).data}else throw new Error("Can not access image data")}else if(s){let p,c;if(r!==void 0&&r.resizedWidth!==void 0&&r.resizedHeight!==void 0?(p=r.resizedHeight,c=r.resizedWidth):(p=e.height,c=e.width),r!==void 0&&(a=r),a.format="RGBA",a.height=p,a.width=c,r!==void 0){const d=l();d.width=c,d.height=p;const _=u(d);if(_!=null)_.putImageData(e,0,0),i=_.getImageData(0,0,c,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 c=u(p);if(c!=null){const d=e.height,_=e.width;return c.drawImage(e,0,0,_,d),i=c.getImageData(0,0,_,d).data,a.height=d,a.width=_,Al(i,a)}else throw new Error("Can not access image data")}else{if(n)return new Promise((p,c)=>{const d=l(),_=u(d);if(!e||!_)return c();const f=new Image;f.crossOrigin="Anonymous",f.src=e,f.onload=()=>{d.width=f.width,d.height=f.height,_.drawImage(f,0,0,d.width,d.height);const v=_.getImageData(0,0,d.width,d.height);a.height=d.height,a.width=d.width,p(Al(v.data,a))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(i!==void 0)return Al(i,a);throw new Error("Input data provided is not supported - aborted tensor creation")},Fv=(e,r)=>{const{width:t,height:s,download:o,dispose:n}=r,i=[1,s,t,4];return new us({location:"texture",type:"float32",texture:e,dims:i,download:o,dispose:n})},Ov=(e,r)=>{const{dataType:t,dims:s,download:o,dispose:n}=r;return new us({location:"gpu-buffer",type:t??"float32",gpuBuffer:e,dims:s,download:o,dispose:n})},Dv=(e,r)=>{const{dataType:t,dims:s,download:o,dispose:n}=r;return new us({location:"ml-tensor",type:t??"float32",mlTensor:e,dims:s,download:o,dispose:n})},Lv=(e,r,t)=>new us({location:"cpu-pinned",type:e,data:r,dims:t??[r.length]}),ro=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 kf=!1;const zv=()=>{if(!kf){kf=!0;const e=typeof BigInt64Array<"u"&&BigInt64Array.from,r=typeof BigUint64Array<"u"&&BigUint64Array.from,t=globalThis.Float16Array,s=typeof t<"u"&&t.from;e&&(ro.set("int64",BigInt64Array),ua.set(BigInt64Array,"int64")),r&&(ro.set("uint64",BigUint64Array),ua.set(BigUint64Array,"uint64")),s?(ro.set("float16",t),ua.set(t,"float16")):ro.set("float16",Uint16Array)}},Bv=e=>{let r=1;for(let t=0;t{switch(e.location){case"cpu":return new us(e.type,e.data,r);case"cpu-pinned":return new us({location:"cpu-pinned",data:e.data,type:e.type,dims:r});case"texture":return new us({location:"texture",texture:e.texture,type:e.type,dims:r});case"gpu-buffer":return new us({location:"gpu-buffer",gpuBuffer:e.gpuBuffer,type:e.type,dims:r});case"ml-tensor":return new us({location:"ml-tensor",mlTensor:e.mlTensor,type:e.type,dims:r});default:throw new Error(`tensorReshape: tensor location ${e.location} is not supported`)}};let us=class{constructor(r,t,s){zv();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=ro.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=ro.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=Bv(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 Av(r,t)}static fromTexture(r,t){return Fv(r,t)}static fromGpuBuffer(r,t){return Ov(r,t)}static fromMLTensor(r,t){return Dv(r,t)}static fromPinnedBuffer(r,t,s){return Lv(r,t,s)}toDataURL(r){return kv(this,r)}toImageData(r){return Iv(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 Rv(this,r)}};const eo=us,db=(e,r)=>{(typeof Ts.trace>"u"?!Ts.wasm.trace:!Ts.trace)||console.timeStamp(`${e}::ORT::${r}`)},pb=(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 Ts.trace>"u"?!Ts.wasm.trace:!Ts.trace)||pb("BEGIN",e)},Fu=e=>{(typeof Ts.trace>"u"?!Ts.wasm.trace:!Ts.trace)||pb("END",e)};let jv=class hb{constructor(r){this.handler=r}async run(r,t,s){Au();const o={};let n={};if(typeof r!="object"||r===null||r instanceof eo||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 eo)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 c of this.outputNames)if(p.indexOf(c)!==-1){const d=t[c];(d===null||d instanceof eo)&&(u=!0,i=!1,o[c]=d)}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 eo?l[u]=p:l[u]=new eo(p.type,p.data,p.dims)}return Fu(),l}async release(){return this.handler.dispose()}static async create(r,t,s,o){Au();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 c=0,d=r.byteLength;if(typeof t=="object"&&t!==null)i=t;else if(typeof t=="number"){if(c=t,!Number.isSafeInteger(c))throw new RangeError("'byteOffset' must be an integer.");if(c<0||c>=p.byteLength)throw new RangeError(`'byteOffset' is out of range [0, ${p.byteLength}).`);if(d=r.byteLength-c,typeof s=="number"){if(d=s,!Number.isSafeInteger(d))throw new RangeError("'byteLength' must be an integer.");if(d<=0||c+d>p.byteLength)throw new RangeError(`'byteLength' is out of range (0, ${p.byteLength-c}].`);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,c,d)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");const[a,l]=await Cv(i),u=await a.createInferenceSessionHandler(n,l);return Fu(),new hb(u)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}get inputMetadata(){return this.handler.inputMetadata}get outputMetadata(){return this.handler.outputMetadata}};const Nv=jv,Vv=Object.freeze(Object.defineProperty({__proto__:null,InferenceSession:Nv,TRACE:db,TRACE_FUNC_BEGIN:Au,TRACE_FUNC_END:Fu,Tensor:eo,env:$v,registerBackend:Ev},Symbol.toStringTag,{value:"Module"}));/*! +var _v=Object.defineProperty;var gv=(e,r,t)=>r in e?_v(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var Y=(e,r,t)=>gv(e,typeof r!="symbol"?r+"":r,t);import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{_ as wv}from"./InputFile.vue_vue_type_script_setup_true_lang-CAuLzFBg.js";import{d as bv,e as zs,f as Mv,T as yv,c as Tn,o as En,a as Vr,b as vv,Y as Ef,c6 as Pf,c7 as Cf,W as Sf,a3 as xv,u as Tv}from"./index-8LjpXIG7.js";import"./floating-ui.core-CgBsuaUc.js";const la=new Map,kn=[],Ev=(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}}},Cv=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 Pv(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)})]},Sv="1.22.0";let $f="warning";const Ts={wasm:{},webgl:{},webgpu:{},versions:{common:Sv},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}`);$f=e}},get logLevel(){return $f}};Object.defineProperty(Ts,"logLevel",{enumerable:!0});const $v=Ts,kv=(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 c=0,d=p,_=p*2,f=-1;i==="RGBA"?(c=0,d=p,_=p*2,f=p*3):i==="RGB"?(c=0,d=p,_=p*2):i==="RBG"&&(c=0,_=p,d=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 c=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 d=4;let _=0,f=1,v=2,$=3,g=0,w=c,C=c*2,E=-1;a==="RGBA"?(g=0,w=c,C=c*2,E=c*3):a==="RGB"?(g=0,w=c,C=c*2):a==="RBG"&&(g=0,C=c,w=c*2),s=t.createImageData(o,n);for(let x=0;x{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 c=4,d=0,_=1,f=2,v=3,$=0,g=u,w=u*2,C=-1;a==="RGB"&&(c=3,d=0,_=1,f=2,v=-1),l==="RGBA"?C=u*3:l==="RBG"?($=0,w=u,g=u*2):l==="BGR"&&(w=0,g=u,$=u*2);for(let x=0;x{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 c=u(p);if(c!=null){let d=e.height,_=e.width;if(r!==void 0&&r.resizedHeight!==void 0&&r.resizedWidth!==void 0&&(d=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=d,a.width=_}else a.tensorFormat="RGBA",a.height=d,a.width=_;c.drawImage(e,0,0),i=c.getImageData(0,0,_,d).data}else throw new Error("Can not access image data")}else if(s){let p,c;if(r!==void 0&&r.resizedWidth!==void 0&&r.resizedHeight!==void 0?(p=r.resizedHeight,c=r.resizedWidth):(p=e.height,c=e.width),r!==void 0&&(a=r),a.format="RGBA",a.height=p,a.width=c,r!==void 0){const d=l();d.width=c,d.height=p;const _=u(d);if(_!=null)_.putImageData(e,0,0),i=_.getImageData(0,0,c,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 c=u(p);if(c!=null){const d=e.height,_=e.width;return c.drawImage(e,0,0,_,d),i=c.getImageData(0,0,_,d).data,a.height=d,a.width=_,Al(i,a)}else throw new Error("Can not access image data")}else{if(n)return new Promise((p,c)=>{const d=l(),_=u(d);if(!e||!_)return c();const f=new Image;f.crossOrigin="Anonymous",f.src=e,f.onload=()=>{d.width=f.width,d.height=f.height,_.drawImage(f,0,0,d.width,d.height);const v=_.getImageData(0,0,d.width,d.height);a.height=d.height,a.width=d.width,p(Al(v.data,a))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(i!==void 0)return Al(i,a);throw new Error("Input data provided is not supported - aborted tensor creation")},Fv=(e,r)=>{const{width:t,height:s,download:o,dispose:n}=r,i=[1,s,t,4];return new us({location:"texture",type:"float32",texture:e,dims:i,download:o,dispose:n})},Ov=(e,r)=>{const{dataType:t,dims:s,download:o,dispose:n}=r;return new us({location:"gpu-buffer",type:t??"float32",gpuBuffer:e,dims:s,download:o,dispose:n})},Dv=(e,r)=>{const{dataType:t,dims:s,download:o,dispose:n}=r;return new us({location:"ml-tensor",type:t??"float32",mlTensor:e,dims:s,download:o,dispose:n})},Lv=(e,r,t)=>new us({location:"cpu-pinned",type:e,data:r,dims:t??[r.length]}),ro=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 kf=!1;const zv=()=>{if(!kf){kf=!0;const e=typeof BigInt64Array<"u"&&BigInt64Array.from,r=typeof BigUint64Array<"u"&&BigUint64Array.from,t=globalThis.Float16Array,s=typeof t<"u"&&t.from;e&&(ro.set("int64",BigInt64Array),ua.set(BigInt64Array,"int64")),r&&(ro.set("uint64",BigUint64Array),ua.set(BigUint64Array,"uint64")),s?(ro.set("float16",t),ua.set(t,"float16")):ro.set("float16",Uint16Array)}},Bv=e=>{let r=1;for(let t=0;t{switch(e.location){case"cpu":return new us(e.type,e.data,r);case"cpu-pinned":return new us({location:"cpu-pinned",data:e.data,type:e.type,dims:r});case"texture":return new us({location:"texture",texture:e.texture,type:e.type,dims:r});case"gpu-buffer":return new us({location:"gpu-buffer",gpuBuffer:e.gpuBuffer,type:e.type,dims:r});case"ml-tensor":return new us({location:"ml-tensor",mlTensor:e.mlTensor,type:e.type,dims:r});default:throw new Error(`tensorReshape: tensor location ${e.location} is not supported`)}};let us=class{constructor(r,t,s){zv();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=ro.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=ro.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=Bv(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 Av(r,t)}static fromTexture(r,t){return Fv(r,t)}static fromGpuBuffer(r,t){return Ov(r,t)}static fromMLTensor(r,t){return Dv(r,t)}static fromPinnedBuffer(r,t,s){return Lv(r,t,s)}toDataURL(r){return kv(this,r)}toImageData(r){return Iv(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 Rv(this,r)}};const eo=us,db=(e,r)=>{(typeof Ts.trace>"u"?!Ts.wasm.trace:!Ts.trace)||console.timeStamp(`${e}::ORT::${r}`)},pb=(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 Ts.trace>"u"?!Ts.wasm.trace:!Ts.trace)||pb("BEGIN",e)},Fu=e=>{(typeof Ts.trace>"u"?!Ts.wasm.trace:!Ts.trace)||pb("END",e)};let jv=class hb{constructor(r){this.handler=r}async run(r,t,s){Au();const o={};let n={};if(typeof r!="object"||r===null||r instanceof eo||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 eo)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 c of this.outputNames)if(p.indexOf(c)!==-1){const d=t[c];(d===null||d instanceof eo)&&(u=!0,i=!1,o[c]=d)}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 eo?l[u]=p:l[u]=new eo(p.type,p.data,p.dims)}return Fu(),l}async release(){return this.handler.dispose()}static async create(r,t,s,o){Au();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 c=0,d=r.byteLength;if(typeof t=="object"&&t!==null)i=t;else if(typeof t=="number"){if(c=t,!Number.isSafeInteger(c))throw new RangeError("'byteOffset' must be an integer.");if(c<0||c>=p.byteLength)throw new RangeError(`'byteOffset' is out of range [0, ${p.byteLength}).`);if(d=r.byteLength-c,typeof s=="number"){if(d=s,!Number.isSafeInteger(d))throw new RangeError("'byteLength' must be an integer.");if(d<=0||c+d>p.byteLength)throw new RangeError(`'byteLength' is out of range (0, ${p.byteLength-c}].`);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,c,d)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");const[a,l]=await Cv(i),u=await a.createInferenceSessionHandler(n,l);return Fu(),new hb(u)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}get inputMetadata(){return this.handler.inputMetadata}get outputMetadata(){return this.handler.outputMetadata}};const Nv=jv,Vv=Object.freeze(Object.defineProperty({__proto__:null,InferenceSession:Nv,TRACE:db,TRACE_FUNC_BEGIN:Au,TRACE_FUNC_END:Fu,Tensor:eo,env:$v,registerBackend:Ev},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-mn0JV4Kp.js b/assets/chat-CystJIYZ.js similarity index 99% rename from assets/chat-mn0JV4Kp.js rename to assets/chat-CystJIYZ.js index cc4d3348db975532398a14cad39b85a6bd0a49c9..78e807e8a75209d1d361eb6f908d54fdd74ee40d 100644 --- a/assets/chat-mn0JV4Kp.js +++ b/assets/chat-CystJIYZ.js @@ -1 +1 @@ -import{d as P,cc as W,e as S,c as h,o as y,a as i,bm as C,cd as E,u as M,bI as A,c6 as q,c7 as z,bd as D,W as U,Y as $}from"./index-WDP_Z4A8.js";import{s as K}from"./index-Dpfqqu9L.js";import"./index-LHmcipjy.js";var B=()=>{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);Y.run(g,()=>{const s=[...new Set([...x.__internal__call_context,...v.__internal__call_context])];N.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=O.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=>{O.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 Q(){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 G({listeners:e.steps})}}}async function X(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=P({__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(Q(),[[[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=>D(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 X(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(q,null,z(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 P,cc as W,e as S,c as h,o as y,a as i,bm as C,cd as E,u as M,bI as A,c6 as q,c7 as z,bd as D,W as U,Y as $}from"./index-8LjpXIG7.js";import{s as K}from"./index-Dpfqqu9L.js";import"./index-LHmcipjy.js";var B=()=>{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);Y.run(g,()=>{const s=[...new Set([...x.__internal__call_context,...v.__internal__call_context])];N.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=O.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=>{O.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 Q(){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 G({listeners:e.steps})}}}async function X(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=P({__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(Q(),[[[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=>D(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 X(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(q,null,z(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-Nzt67BKJ.js b/assets/cloudflare-workers-ai-DSn9aJzJ.js similarity index 78% rename from assets/cloudflare-workers-ai-Nzt67BKJ.js rename to assets/cloudflare-workers-ai-DSn9aJzJ.js index 59020e8481d304976caedbde30e07ad10f85fdb5..6b7af6355a1bab6e0378900b1542437ce6e6724c 100644 --- a/assets/cloudflare-workers-ai-Nzt67BKJ.js +++ b/assets/cloudflare-workers-ai-DSn9aJzJ.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as k,cf as y,cg as $,bk as I,o as h,u as l,$ as M,V as q,a0 as x,f as v,T as K,w as P,bl as f,b as c}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as z}from"./providers-7GsMyC_3.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as A}from"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import{_ as B}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import{_ as C,a as N}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";import{_ as R}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js";import{b as V}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";const S=k({__name:"ProviderAccountIdInput",props:y({placeholder:null,required:{type:Boolean},label:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(p){const r=p,u=$(p,"modelValue");return(n,e)=>(h(),I(l(A),{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",U=k({__name:"cloudflare-workers-ai",setup(p){const{t:r}=M(),u=q(),n=z(),{providers:e}=x(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}});K(()=>{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)||""}),P([s,d],()=>{e.value[a]={...e.value[a],apiKey:s.value,accountId:d.value}});function w(){var o;e.value[a]={...(o=t.value)==null?void 0:o.defaultOptions}}return(o,i)=>{var _,g;return h(),I(l(R),{"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(C),null,{default:f(()=>[c(l(N),{title:l(r)("settings.pages.providers.common.section.basic.title"),description:l(r)("settings.pages.providers.common.section.basic.description"),"on-reset":w},{default:f(()=>{var b;return[c(l(B),{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(S),{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"])}}});typeof V=="function"&&V(U);export{U as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import{d as k,cf as y,cg as $,bk as I,o as h,u as l,$ as M,V as q,a0 as x,f as v,T as K,w as P,bl as f,b as c}from"./index-8LjpXIG7.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{u as z}from"./providers-Dhn8Iy_2.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{_ as A}from"./FieldInput.vue_vue_type_script_setup_true_lang-DdnLISgI.js";import{_ as B}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-wR1l1PPX.js";import{_ as C,a as N}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-DTczYoOw.js";import{_ as R}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-D3mbXce4.js";import{b as V}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Input.vue_vue_type_script_setup_true_lang-CpaCGrgF.js";const S=k({__name:"ProviderAccountIdInput",props:y({placeholder:null,required:{type:Boolean},label:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(p){const r=p,u=$(p,"modelValue");return(n,e)=>(h(),I(l(A),{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",U=k({__name:"cloudflare-workers-ai",setup(p){const{t:r}=M(),u=q(),n=z(),{providers:e}=x(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}});K(()=>{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)||""}),P([s,d],()=>{e.value[a]={...e.value[a],apiKey:s.value,accountId:d.value}});function w(){var o;e.value[a]={...(o=t.value)==null?void 0:o.defaultOptions}}return(o,i)=>{var _,g;return h(),I(l(R),{"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(C),null,{default:f(()=>[c(l(N),{title:l(r)("settings.pages.providers.common.section.basic.title"),description:l(r)("settings.pages.providers.common.section.basic.description"),"on-reset":w},{default:f(()=>{var b;return[c(l(B),{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(S),{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"])}}});typeof V=="function"&&V(U);export{U as default}; diff --git a/assets/color-scheme-DFRftciY.js b/assets/color-scheme-D40fyZmU.js similarity index 90% rename from assets/color-scheme-DFRftciY.js rename to assets/color-scheme-D40fyZmU.js index 33ac9f0b1bdaea0d8bf678515b874c7f40add384..463c6f0a78f00a15ea11ce8cf7d2df41a128c7e4 100644 --- a/assets/color-scheme-DFRftciY.js +++ b/assets/color-scheme-D40fyZmU.js @@ -1 +1 @@ -import{d as D,cf as V,cg as E,bm as i,c as n,o as r,X as w,cd as $,c2 as v,bj as F,$ as H,c5 as S,bk as y,bl as b,a as e,Y as m,ch as M,u as o,bn as j,b as g,c6 as f,c7 as R}from"./index-WDP_Z4A8.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as C,a as I}from"./ColorPalette.vue_vue_type_script_setup_true_lang-BWRGi3IC.js";import{b as B}from"./route-block-B_A1xBdJ.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./index-DeGbjSQn.js";const N=["disabled"],T=D({__name:"ColorHueRange",props:V({disabled:{type:Boolean},class:null},{colorValue:{type:String,default:""},colorValueModifiers:{}}),emits:["update:colorValue"],setup(c){const s=c,p=E(c,"colorValue");return(l,t)=>i((r(),n("input",{"onUpdate:modelValue":t[0]||(t[0]=a=>p.value=a),type:"range",min:"0",max:"360",step:"0.01",class:w(["color-hue-range",[s.disabled?"opacity-25 cursor-not-allowed":"cursor-pointer",s.class||""]]),transition:"all ease-in-out duration-250",disabled:s.disabled},null,10,N)),[[$,p.value]])}}),U=v(T,[["__scopeId","data-v-ae80cb9d"]]),z=[[],["#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"]],L={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"},O={"text-lg":"","font-semibold":""},P={relative:"",flex:"","cursor-pointer":"","items-center":"","gap-2":""},X={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"},Y={"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"},q={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"},G=["duration","delay"],J={"font-medium":""},K={text:"sm neutral-500"},Q={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=D({__name:"color-scheme",setup(c){const s=F(),{t:p}=H();return(l,t)=>{const a=S("motion");return r(),n(f,null,[i((r(),y(o(C),{"mb-2":"",title:o(p)("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:b(()=>[i((r(),n("div",L,[e("span",O,m(l.$t("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.label")),1),e("label",P,[i(e("input",{"onUpdate:modelValue":t[0]||(t[0]=d=>o(s).themeColorsHueDynamic=d),type:"checkbox",class:"peer sr-only"},null,512),[[j,o(s).themeColorsHueDynamic]]),t[2]||(t[2]=e("div",{class:"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 peer-checked:bg-primary-500 after:transition-all after:content-[''] peer-checked:after:translate-x-full peer-checked:after:border-white"},null,-1)),M(" "+m(l.$t("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.rgb-on.title")),1)])])),[[a]]),i(g(o(U),{modelValue:o(s).themeColorsHue,"onUpdate:modelValue":t[1]||(t[1]=d=>o(s).themeColorsHue=d),initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+6*10,delay:6*50,disabled:o(s).themeColorsHueDynamic},null,8,["modelValue","disabled"]),[[a]]),i((r(),n("div",X,[t[4]||(t[4]=e("span",{"bg-primary-50":""},"50",-1)),t[5]||(t[5]=e("span",{"bg-primary-100":""},"100",-1)),t[6]||(t[6]=e("span",{"bg-primary-200":""},"200",-1)),t[7]||(t[7]=e("span",{"bg-primary-300":""},"300",-1)),t[8]||(t[8]=e("span",{"bg-primary-400":""},"400",-1)),t[9]||(t[9]=e("span",{"bg-primary-500":""},"500",-1)),i((r(),n("div",Y,t[3]||(t[3]=[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)]))),[[a]])])),[[a]]),i((r(),n("div",q,t[10]||(t[10]=[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)]))),[[a]])]),_:1},8,["title"])),[[a]]),i((r(),y(o(C),{"mb-2":"",title:o(p)("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:b(()=>[(r(!0),n(f,null,R(l.$tm("settings.pages.themes.sections.section.theme-presets.presets"),({title:d,description:h,colors:x},u)=>i((r(),n("div",{key:u,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+u*10,delay:11*50+u*50,transition:"all ease-in-out duration-250"},[e("div",null,[e("span",J,m(l.$rt(d)),1),e("div",K,m(l.$rt(h)),1)]),g(I,{colors:x.map((_,k)=>({hex:o(z)[u][k],name:l.$rt(_)}))},null,8,["colors"])],8,G)),[[a]])),128))]),_:1},8,["title"])),[[a]]),i((r(),n("div",Q,t[11]||(t[11]=[e("div",{text:"60","i-solar:pallete-2-bold-duotone":""},null,-1)]))),[[a]])],64)}}});typeof B=="function"&&B(A);const de=v(A,[["__scopeId","data-v-29f357ba"]]);export{de as default}; +import{d as D,cf as V,cg as E,bm as i,c as n,o as r,X as w,cd as $,c2 as v,bj as F,$ as H,c5 as S,bk as y,bl as b,a as e,Y as m,ch as M,u as o,bn as j,b as g,c6 as f,c7 as R}from"./index-8LjpXIG7.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{_ as C,a as I}from"./ColorPalette.vue_vue_type_script_setup_true_lang-CcpMsyh5.js";import{b as B}from"./route-block-B_A1xBdJ.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BOcCBViZ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-DyyWKgKi.js";import"./index-BuTdizGl.js";const N=["disabled"],T=D({__name:"ColorHueRange",props:V({disabled:{type:Boolean},class:null},{colorValue:{type:String,default:""},colorValueModifiers:{}}),emits:["update:colorValue"],setup(c){const s=c,p=E(c,"colorValue");return(l,t)=>i((r(),n("input",{"onUpdate:modelValue":t[0]||(t[0]=a=>p.value=a),type:"range",min:"0",max:"360",step:"0.01",class:w(["color-hue-range",[s.disabled?"opacity-25 cursor-not-allowed":"cursor-pointer",s.class||""]]),transition:"all ease-in-out duration-250",disabled:s.disabled},null,10,N)),[[$,p.value]])}}),U=v(T,[["__scopeId","data-v-ae80cb9d"]]),z=[[],["#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"]],L={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"},O={"text-lg":"","font-semibold":""},P={relative:"",flex:"","cursor-pointer":"","items-center":"","gap-2":""},X={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"},Y={"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"},q={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"},G=["duration","delay"],J={"font-medium":""},K={text:"sm neutral-500"},Q={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=D({__name:"color-scheme",setup(c){const s=F(),{t:p}=H();return(l,t)=>{const a=S("motion");return r(),n(f,null,[i((r(),y(o(C),{"mb-2":"",title:o(p)("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:b(()=>[i((r(),n("div",L,[e("span",O,m(l.$t("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.label")),1),e("label",P,[i(e("input",{"onUpdate:modelValue":t[0]||(t[0]=d=>o(s).themeColorsHueDynamic=d),type:"checkbox",class:"peer sr-only"},null,512),[[j,o(s).themeColorsHueDynamic]]),t[2]||(t[2]=e("div",{class:"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 peer-checked:bg-primary-500 after:transition-all after:content-[''] peer-checked:after:translate-x-full peer-checked:after:border-white"},null,-1)),M(" "+m(l.$t("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.rgb-on.title")),1)])])),[[a]]),i(g(o(U),{modelValue:o(s).themeColorsHue,"onUpdate:modelValue":t[1]||(t[1]=d=>o(s).themeColorsHue=d),initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+6*10,delay:6*50,disabled:o(s).themeColorsHueDynamic},null,8,["modelValue","disabled"]),[[a]]),i((r(),n("div",X,[t[4]||(t[4]=e("span",{"bg-primary-50":""},"50",-1)),t[5]||(t[5]=e("span",{"bg-primary-100":""},"100",-1)),t[6]||(t[6]=e("span",{"bg-primary-200":""},"200",-1)),t[7]||(t[7]=e("span",{"bg-primary-300":""},"300",-1)),t[8]||(t[8]=e("span",{"bg-primary-400":""},"400",-1)),t[9]||(t[9]=e("span",{"bg-primary-500":""},"500",-1)),i((r(),n("div",Y,t[3]||(t[3]=[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)]))),[[a]])])),[[a]]),i((r(),n("div",q,t[10]||(t[10]=[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)]))),[[a]])]),_:1},8,["title"])),[[a]]),i((r(),y(o(C),{"mb-2":"",title:o(p)("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:b(()=>[(r(!0),n(f,null,R(l.$tm("settings.pages.themes.sections.section.theme-presets.presets"),({title:d,description:h,colors:x},u)=>i((r(),n("div",{key:u,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+u*10,delay:11*50+u*50,transition:"all ease-in-out duration-250"},[e("div",null,[e("span",J,m(l.$rt(d)),1),e("div",K,m(l.$rt(h)),1)]),g(I,{colors:x.map((_,k)=>({hex:o(z)[u][k],name:l.$rt(_)}))},null,8,["colors"])],8,G)),[[a]])),128))]),_:1},8,["title"])),[[a]]),i((r(),n("div",Q,t[11]||(t[11]=[e("div",{text:"60","i-solar:pallete-2-bold-duotone":""},null,-1)]))),[[a]])],64)}}});typeof B=="function"&&B(A);const de=v(A,[["__scopeId","data-v-29f357ba"]]);export{de as default}; diff --git a/assets/consciousness-DTcES_Z6.js b/assets/consciousness-B5gyBbNc.js similarity index 93% rename from assets/consciousness-DTcES_Z6.js rename to assets/consciousness-B5gyBbNc.js index 22fa920396004ff5e7afd024f075b3ba938607bb..bebab4e43610b8d0266591393ddb4643a3b0e64b 100644 --- a/assets/consciousness-DTcES_Z6.js +++ b/assets/consciousness-B5gyBbNc.js @@ -1 +1 @@ -import{d as R,a0 as b,$ as U,T as z,c5 as B,c as r,o as n,a as s,bm as f,W as k,Y as i,u as e,c6 as y,c7 as D,b as q,bl as T,c3 as j,bk as M,bI as u,cd as E}from"./index-WDP_Z4A8.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as F}from"./consciousness-CI5ipeHX.js";import{u as I}from"./providers-7GsMyC_3.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{R as Q,a as A}from"./RadioCardSimple-BzEaEqwF.js";import{b as w}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";const W={bg:"neutral-50 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-4"},Y={flex:"~ col gap-4"},$={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-500"},G={text:"neutral-400 dark:neutral-400"},H={"max-w-full":""},J={key:0,flex:"~ row gap-4",style:{"scrollbar-width":"none"},"min-w-0":"","of-x-scroll":"","scroll-smooth":"",role:"radiogroup"},K={key:1},O={key:0},X={flex:"~ col gap-4"},Z={class:"text-lg md:text-2xl"},ee={text:"neutral-400 dark:neutral-400"},se={key:0,class:"flex items-center justify-center py-4"},te={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"},oe={class:"flex flex-col"},ie={class:"font-medium"},le={class:"text-sm text-red-600 dark:text-red-400"},ne={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"},re={class:"flex flex-col"},de={class:"font-medium"},ae={class:"text-sm text-amber-600 dark:text-amber-400"},ce={key:1},ue={flex:"~ col gap-4"},pe={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},me={text:"neutral-400 dark:neutral-500"},xe={class:"flex items-center gap-3 border border-primary-200 rounded-lg bg-primary-50 p-4 dark:border-primary-800 dark:bg-primary-900/20"},ve={class:"flex flex-col"},ge={class:"font-medium"},_e={class:"text-sm text-primary-600 dark:text-primary-400"},he={class:"mt-2"},be={class:"mb-1 block text-sm font-medium"},fe=["placeholder"],ke={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":""},ye=R({__name:"consciousness",setup(Me){const V=I(),x=F(),{availableProviders:C,allChatProvidersMetadata:P}=b(V),{activeProvider:a,activeModel:d,customModelName:S,modelSearchQuery:c,supportsModelListing:v,providerModels:p,isLoadingActiveProviderModels:g,activeProviderModelError:_}=b(x),{t}=U();z(async()=>{await x.loadModelsForProvider(a.value)});function N(h){S.value=h}return(h,o)=>{const L=B("motion");return n(),r(y,null,[s("div",W,[s("div",null,[s("div",Y,[s("div",null,[s("h2",$,i(e(t)("settings.pages.providers.title")),1),s("div",G,[s("span",null,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.description")),1)])]),s("div",H,[e(C).length>0?(n(),r("fieldset",J,[(n(!0),r(y,null,D(e(P),l=>(n(),M(e(A),{id:l.id,key:l.id,modelValue:e(a),"onUpdate:modelValue":o[0]||(o[0]=m=>u(a)?a.value=m:null),name:"provider",value:l.id,title:l.localizedName,description:l.localizedDescription},null,8,["id","modelValue","value","title","description"]))),128))])):(n(),r("div",K,[q(e(j),{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:T(()=>o[4]||(o[4]=[s("div",{"i-solar:warning-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1),s("div",{class:"flex flex-col"},[s("span",{class:"font-medium"},"No Providers Configured"),s("span",{class:"text-sm text-neutral-400 dark:text-neutral-500"},"Click here to set up your LLM providers")],-1),s("div",{"i-solar:arrow-right-line-duotone":"",class:"ml-auto text-xl text-neutral-400 dark:text-neutral-500"},null,-1)])),_:1,__:[4]})]))])])]),e(a)&&e(v)?(n(),r("div",O,[s("div",X,[s("div",null,[s("h2",Z,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),s("div",ee,[s("span",null,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),e(g)?(n(),r("div",se,[o[5]||(o[5]=s("div",{class:"mr-2 animate-spin"},[s("div",{"i-solar:spinner-line-duotone":"","text-xl":""})],-1)),s("span",null,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.loading")),1)])):e(_)?(n(),r("div",te,[o[6]||(o[6]=s("div",{"i-solar:close-circle-line-duotone":"",class:"text-2xl text-red-500 dark:text-red-400"},null,-1)),s("div",oe,[s("span",ie,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.error")),1),s("span",le,i(e(_)),1)])])):e(p).length===0&&!e(g)?(n(),r("div",ne,[o[7]||(o[7]=s("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),s("div",re,[s("span",de,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models")),1),s("span",ae,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description")),1)])])):e(p).length>0?(n(),M(e(Q),{key:3,modelValue:e(d),"onUpdate:modelValue":o[1]||(o[1]=l=>u(d)?d.value=l:null),"search-query":e(c),"onUpdate:searchQuery":o[2]||(o[2]=l=>u(c)?c.value=l:null),items:e(p).sort((l,m)=>l.id===e(d)?-1:m.id===e(d)?1:0),searchable:!0,"search-placeholder":e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder"),"search-no-results-title":e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results"),"search-no-results-description":e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description",{query:e(c)}),"search-results-text":e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results",{count:"{count}",total:"{total}"}),"custom-input-placeholder":e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder"),"expand-button-text":e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.expand"),"collapse-button-text":e(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)])])):e(a)&&!e(v)?(n(),r("div",ce,[s("div",ue,[s("div",null,[s("h2",pe,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),s("div",me,[s("span",null,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),s("div",xe,[o[8]||(o[8]=s("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-primary-500 dark:text-primary-400"},null,-1)),s("div",ve,[s("span",ge,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported")),1),s("span",_e,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported_description")),1)])]),s("div",he,[s("label",be,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_name")),1),f(s("input",{"onUpdate:modelValue":o[3]||(o[3]=l=>u(d)?d.value=l: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:e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_placeholder")},null,8,fe),[[E,e(d)]])])])])):k("",!0)]),f((n(),r("div",ke,o[9]||(o[9]=[s("div",{text:"60","i-solar:ghost-bold-duotone":""},null,-1)]))),[[L]])],64)}}});typeof w=="function"&&w(ye);export{ye as default}; +import{d as R,a0 as b,$ as U,T as z,c5 as B,c as r,o as n,a as s,bm as f,W as k,Y as i,u as e,c6 as y,c7 as D,b as q,bl as T,c3 as j,bk as M,bI as u,cd as E}from"./index-8LjpXIG7.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{u as F}from"./consciousness-DSqUYfGS.js";import{u as I}from"./providers-Dhn8Iy_2.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{R as Q,a as A}from"./RadioCardSimple-DNdKoxoJ.js";import{b as w}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-DyyWKgKi.js";import"./Input.vue_vue_type_script_setup_true_lang-CpaCGrgF.js";const W={bg:"neutral-50 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-4"},Y={flex:"~ col gap-4"},$={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-500"},G={text:"neutral-400 dark:neutral-400"},H={"max-w-full":""},J={key:0,flex:"~ row gap-4",style:{"scrollbar-width":"none"},"min-w-0":"","of-x-scroll":"","scroll-smooth":"",role:"radiogroup"},K={key:1},O={key:0},X={flex:"~ col gap-4"},Z={class:"text-lg md:text-2xl"},ee={text:"neutral-400 dark:neutral-400"},se={key:0,class:"flex items-center justify-center py-4"},te={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"},oe={class:"flex flex-col"},ie={class:"font-medium"},le={class:"text-sm text-red-600 dark:text-red-400"},ne={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"},re={class:"flex flex-col"},de={class:"font-medium"},ae={class:"text-sm text-amber-600 dark:text-amber-400"},ce={key:1},ue={flex:"~ col gap-4"},pe={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},me={text:"neutral-400 dark:neutral-500"},xe={class:"flex items-center gap-3 border border-primary-200 rounded-lg bg-primary-50 p-4 dark:border-primary-800 dark:bg-primary-900/20"},ve={class:"flex flex-col"},ge={class:"font-medium"},_e={class:"text-sm text-primary-600 dark:text-primary-400"},he={class:"mt-2"},be={class:"mb-1 block text-sm font-medium"},fe=["placeholder"],ke={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":""},ye=R({__name:"consciousness",setup(Me){const V=I(),x=F(),{availableProviders:C,allChatProvidersMetadata:P}=b(V),{activeProvider:a,activeModel:d,customModelName:S,modelSearchQuery:c,supportsModelListing:v,providerModels:p,isLoadingActiveProviderModels:g,activeProviderModelError:_}=b(x),{t}=U();z(async()=>{await x.loadModelsForProvider(a.value)});function N(h){S.value=h}return(h,o)=>{const L=B("motion");return n(),r(y,null,[s("div",W,[s("div",null,[s("div",Y,[s("div",null,[s("h2",$,i(e(t)("settings.pages.providers.title")),1),s("div",G,[s("span",null,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.description")),1)])]),s("div",H,[e(C).length>0?(n(),r("fieldset",J,[(n(!0),r(y,null,D(e(P),l=>(n(),M(e(A),{id:l.id,key:l.id,modelValue:e(a),"onUpdate:modelValue":o[0]||(o[0]=m=>u(a)?a.value=m:null),name:"provider",value:l.id,title:l.localizedName,description:l.localizedDescription},null,8,["id","modelValue","value","title","description"]))),128))])):(n(),r("div",K,[q(e(j),{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:T(()=>o[4]||(o[4]=[s("div",{"i-solar:warning-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1),s("div",{class:"flex flex-col"},[s("span",{class:"font-medium"},"No Providers Configured"),s("span",{class:"text-sm text-neutral-400 dark:text-neutral-500"},"Click here to set up your LLM providers")],-1),s("div",{"i-solar:arrow-right-line-duotone":"",class:"ml-auto text-xl text-neutral-400 dark:text-neutral-500"},null,-1)])),_:1,__:[4]})]))])])]),e(a)&&e(v)?(n(),r("div",O,[s("div",X,[s("div",null,[s("h2",Z,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),s("div",ee,[s("span",null,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),e(g)?(n(),r("div",se,[o[5]||(o[5]=s("div",{class:"mr-2 animate-spin"},[s("div",{"i-solar:spinner-line-duotone":"","text-xl":""})],-1)),s("span",null,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.loading")),1)])):e(_)?(n(),r("div",te,[o[6]||(o[6]=s("div",{"i-solar:close-circle-line-duotone":"",class:"text-2xl text-red-500 dark:text-red-400"},null,-1)),s("div",oe,[s("span",ie,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.error")),1),s("span",le,i(e(_)),1)])])):e(p).length===0&&!e(g)?(n(),r("div",ne,[o[7]||(o[7]=s("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),s("div",re,[s("span",de,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models")),1),s("span",ae,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description")),1)])])):e(p).length>0?(n(),M(e(Q),{key:3,modelValue:e(d),"onUpdate:modelValue":o[1]||(o[1]=l=>u(d)?d.value=l:null),"search-query":e(c),"onUpdate:searchQuery":o[2]||(o[2]=l=>u(c)?c.value=l:null),items:e(p).sort((l,m)=>l.id===e(d)?-1:m.id===e(d)?1:0),searchable:!0,"search-placeholder":e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder"),"search-no-results-title":e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results"),"search-no-results-description":e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description",{query:e(c)}),"search-results-text":e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results",{count:"{count}",total:"{total}"}),"custom-input-placeholder":e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder"),"expand-button-text":e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.expand"),"collapse-button-text":e(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)])])):e(a)&&!e(v)?(n(),r("div",ce,[s("div",ue,[s("div",null,[s("h2",pe,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),s("div",me,[s("span",null,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),s("div",xe,[o[8]||(o[8]=s("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-primary-500 dark:text-primary-400"},null,-1)),s("div",ve,[s("span",ge,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported")),1),s("span",_e,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported_description")),1)])]),s("div",he,[s("label",be,i(e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_name")),1),f(s("input",{"onUpdate:modelValue":o[3]||(o[3]=l=>u(d)?d.value=l: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:e(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_placeholder")},null,8,fe),[[E,e(d)]])])])])):k("",!0)]),f((n(),r("div",ke,o[9]||(o[9]=[s("div",{text:"60","i-solar:ghost-bold-duotone":""},null,-1)]))),[[L]])],64)}}});typeof w=="function"&&w(ye);export{ye as default}; diff --git a/assets/consciousness-CI5ipeHX.js b/assets/consciousness-DSqUYfGS.js similarity index 90% rename from assets/consciousness-CI5ipeHX.js rename to assets/consciousness-DSqUYfGS.js index b7a298fe319a31151ea89f6384f49aff03c18611..9fd7b1b67117aa9c329763560d45bf05f54e189a 100644 --- a/assets/consciousness-CI5ipeHX.js +++ b/assets/consciousness-DSqUYfGS.js @@ -1 +1 @@ -import{a4 as P,cc as n,e as M,f as r,w as L}from"./index-WDP_Z4A8.js";import{u as w}from"./providers-7GsMyC_3.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),p=r(()=>o.modelLoadError[s.value]||null),g=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:p,filteredModels:g,resetModelSelection:u,loadModelsForProvider:v}});export{h as u}; +import{a4 as P,cc as n,e as M,f as r,w as L}from"./index-8LjpXIG7.js";import{u as w}from"./providers-Dhn8Iy_2.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),p=r(()=>o.modelLoadError[s.value]||null),g=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:p,filteredModels:g,resetModelSelection:u,loadModelsForProvider:v}});export{h as u}; diff --git a/assets/deepseek-C4C7ySbq.js b/assets/deepseek-BsGOJgV4.js similarity index 64% rename from assets/deepseek-C4C7ySbq.js rename to assets/deepseek-BsGOJgV4.js index 9e0bd97eb7f2ba88809df705e1cc425d964d48eb..4d033e7c295ae98e2f7e05cc4aa5b92ac1b9dcc2 100644 --- a/assets/deepseek-C4C7ySbq.js +++ b/assets/deepseek-BsGOJgV4.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as V,$ as U,V as $,a0 as y,f as c,T as K,w as h,bk as w,o as x,bl as u,b as l,u as t}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as z}from"./providers-7GsMyC_3.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as C,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";const a="deepseek",B=V({__name:"deepseek",setup(I){const{t:m}=U(),b=$(),d=z(),{providers:o}=y(d),n=c(()=>d.getProviderMetadata(a)),i=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}}),s=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}});K(()=>{var e,r;d.initializeProvider(a),i.value=((e=o.value[a])==null?void 0:e.apiKey)||"",s.value=((r=o.value[a])==null?void 0:r.baseUrl)||""}),h([i,s],()=>{o.value[a]={...o.value[a],apiKey:i.value,baseUrl:s.value||""}});function k(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,r)=>{var v,f;return x(),w(t(S),{"provider-name":(v=n.value)==null?void 0:v.localizedName,"provider-icon-color":(f=n.value)==null?void 0:f.iconColor,"on-back":()=>t(b).back()},{default:u(()=>[l(t(P),null,{default:u(()=>[l(t(R),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":k},{default:u(()=>{var p;return[l(t(N),{modelValue:i.value,"onUpdate:modelValue":r[0]||(r[0]=g=>i.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(C),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t(M),{modelValue:s.value,"onUpdate:modelValue":r[1]||(r[1]=p=>s.value=p),placeholder:"https://api.deepseek.com/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});typeof _=="function"&&_(B);export{B as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import{d as V,$ as U,V as $,a0 as y,f as c,T as K,w as h,bk as w,o as x,bl as u,b as l,u as t}from"./index-8LjpXIG7.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{u as z}from"./providers-Dhn8Iy_2.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{_ as C,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CU_o_t3A.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-wR1l1PPX.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-DTczYoOw.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-D3mbXce4.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BOcCBViZ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-DyyWKgKi.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-DdnLISgI.js";import"./Input.vue_vue_type_script_setup_true_lang-CpaCGrgF.js";const a="deepseek",B=V({__name:"deepseek",setup(I){const{t:m}=U(),b=$(),d=z(),{providers:o}=y(d),n=c(()=>d.getProviderMetadata(a)),i=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}}),s=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}});K(()=>{var e,r;d.initializeProvider(a),i.value=((e=o.value[a])==null?void 0:e.apiKey)||"",s.value=((r=o.value[a])==null?void 0:r.baseUrl)||""}),h([i,s],()=>{o.value[a]={...o.value[a],apiKey:i.value,baseUrl:s.value||""}});function k(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,r)=>{var v,f;return x(),w(t(S),{"provider-name":(v=n.value)==null?void 0:v.localizedName,"provider-icon-color":(f=n.value)==null?void 0:f.iconColor,"on-back":()=>t(b).back()},{default:u(()=>[l(t(P),null,{default:u(()=>[l(t(R),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":k},{default:u(()=>{var p;return[l(t(N),{modelValue:i.value,"onUpdate:modelValue":r[0]||(r[0]=g=>i.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(C),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t(M),{modelValue:s.value,"onUpdate:modelValue":r[1]||(r[1]=p=>s.value=p),placeholder:"https://api.deepseek.com/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});typeof _=="function"&&_(B);export{B as default}; diff --git a/assets/default-MxM0RvWC.js b/assets/default-2UwyyMkh.js similarity index 89% rename from assets/default-MxM0RvWC.js rename to assets/default-2UwyyMkh.js index 809c1d78a055fb8aad21bc0db9437bce676f895d..f80d61cf36d25ed7b7ac86a1958ceb11f2be913c 100644 --- a/assets/default-MxM0RvWC.js +++ b/assets/default-2UwyyMkh.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-WDP_Z4A8.js";import{H as d}from"./HeaderLink--5c4L7nq.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-8LjpXIG7.js";import{H as d}from"./HeaderLink-Ct9jmG8_.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-BWr47-4Z.js b/assets/default-node-Bhmxs8ab.js similarity index 89% rename from assets/default-node-BWr47-4Z.js rename to assets/default-node-Bhmxs8ab.js index 06967bf06d63b73533200b0b088c6518dfb4fa41..ac94d077485d36e30458936e3dbf5ba3c715e225 100644 --- a/assets/default-node-BWr47-4Z.js +++ b/assets/default-node-Bhmxs8ab.js @@ -1 +1 @@ -import{cP as t}from"./index-WDP_Z4A8.js";async function s(){const{createRequire:a}=await t(async()=>{const{createRequire:o}=await import("./__vite-browser-external-FmFgRqLi.js");return{createRequire:o}},[]),{dirname:n,resolve:e}=await t(async()=>{const{dirname:o,resolve:c}=await import("./__vite-browser-external-FmFgRqLi.js");return{dirname:o,resolve:c}},[]),d=a(import.meta.url),r=n(d.resolve("@duckdb/duckdb-wasm"));return{mvp:{mainModule:e(r,"./duckdb-mvp.wasm"),mainWorker:e(r,"./duckdb-node-mvp.worker.cjs")},eh:{mainModule:e(r,"./duckdb-eh.wasm"),mainWorker:e(r,"./duckdb-node-eh.worker.cjs")}}}export{s as getBundles}; +import{cP as t}from"./index-8LjpXIG7.js";async function s(){const{createRequire:a}=await t(async()=>{const{createRequire:o}=await import("./__vite-browser-external-FmFgRqLi.js");return{createRequire:o}},[]),{dirname:n,resolve:e}=await t(async()=>{const{dirname:o,resolve:c}=await import("./__vite-browser-external-FmFgRqLi.js");return{dirname:o,resolve:c}},[]),d=a(import.meta.url),r=n(d.resolve("@duckdb/duckdb-wasm"));return{mvp:{mainModule:e(r,"./duckdb-mvp.wasm"),mainWorker:e(r,"./duckdb-node-mvp.worker.cjs")},eh:{mainModule:e(r,"./duckdb-eh.wasm"),mainWorker:e(r,"./duckdb-node-eh.worker.cjs")}}}export{s as getBundles}; diff --git a/assets/delays-WpVM8VPm.js b/assets/delays-Cvf4yi9y.js similarity index 70% rename from assets/delays-WpVM8VPm.js rename to assets/delays-Cvf4yi9y.js index 1a8a85b884833d28a2cd8c554b4354148cb85f05..8ff69221064a941d6d1a6ad4aa94b91c78142952 100644 --- a/assets/delays-WpVM8VPm.js +++ b/assets/delays-Cvf4yi9y.js @@ -1 +1 @@ -import"./three-vrm.module-DIVMhp6T.js";import{b as g,l as _}from"./queues-DBvSyUSC.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as k}from"./Textarea.vue_vue_type_script_setup_true_lang-Bht7lS1m.js";import{d as b,e as r,c as n,o as t,a as e,b as y,u as x,Y as i,c6 as f,c7 as m}from"./index-WDP_Z4A8.js";import"./emotions-DWNSb738.js";import"./queue-C50Iq5oO.js";import"./floating-ui.core-CgBsuaUc.js";import"./Basic.vue_vue_type_script_setup_true_lang-COgaiUVw.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":""},E={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},S={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},T=b({__name:"delays",setup(B){const s=r(""),c=r([]),p=r([]),u=r(!1),d=g();d.onHandlerEvent("delay",a=>{p.value.push(a)});function v(){u.value=!0;const a=s.value.split("");for(const o of a)d.add(o);d.add(_),s.value="",u.value=!1}return(a,o)=>(t(),n("div",w,[e("div",h,[y(x(k),{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:v},null,8,["modelValue"]),e("button",M,i(u.value?"Processing...":"Send"),1)]),e("div",V,[e("div",E,[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",S,[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{T as default}; +import"./three-vrm.module-r4bOtVyC.js";import{b as g,l as _}from"./queues-DNZJBdFi.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{_ as k}from"./Textarea.vue_vue_type_script_setup_true_lang-B9_K8yo0.js";import{d as b,e as r,c as n,o as t,a as e,b as y,u as x,Y as i,c6 as f,c7 as m}from"./index-8LjpXIG7.js";import"./emotions-DWNSb738.js";import"./queue-Dw-mTAT5.js";import"./floating-ui.core-CgBsuaUc.js";import"./Basic.vue_vue_type_script_setup_true_lang-Dgb2JW4V.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":""},E={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},S={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},T=b({__name:"delays",setup(B){const s=r(""),c=r([]),p=r([]),u=r(!1),d=g();d.onHandlerEvent("delay",a=>{p.value.push(a)});function v(){u.value=!0;const a=s.value.split("");for(const o of a)d.add(o);d.add(_),s.value="",u.value=!1}return(a,o)=>(t(),n("div",w,[e("div",h,[y(x(k),{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:v},null,8,["modelValue"]),e("button",M,i(u.value?"Processing...":"Send"),1)]),e("div",V,[e("div",E,[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",S,[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{T as default}; diff --git a/assets/developer-B1AODhAI.js b/assets/developer-DJ1vjJKn.js similarity index 82% rename from assets/developer-B1AODhAI.js rename to assets/developer-DJ1vjJKn.js index 439f906d3de2acaa9619cfbd450e3a2158cebd2f..057ef28a3126a13c4375d4372671de911f3b4339 100644 --- a/assets/developer-B1AODhAI.js +++ b/assets/developer-DJ1vjJKn.js @@ -1 +1 @@ -import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{d as p,bj as c,c5 as m,c as s,o as r,bm as a,b as l,u as i,a as f,c6 as b}from"./index-WDP_Z4A8.js";import{_ as d}from"./CheckBar.vue_vue_type_script_setup_true_lang-D-J2slay.js";import{b as u}from"./route-block-B_A1xBdJ.js";const y={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":""},g=p({__name:"developer",setup(v){const t=c();return(_,e)=>{const o=m("motion");return r(),s(b,null,[a(l(d,{modelValue:i(t).disableTransitions,"onUpdate:modelValue":e[0]||(e[0]=n=>i(t).disableTransitions=n),"mb-2":"","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"]),[[o]]),a(l(d,{modelValue:i(t).usePageSpecificTransitions,"onUpdate:modelValue":e[1]||(e[1]=n=>i(t).usePageSpecificTransitions=n),disabled:i(t).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"]),[[o]]),a((r(),s("div",y,e[2]||(e[2]=[f("div",{text:"60","i-solar:code-bold-duotone":""},null,-1)]))),[[o]])],64)}}});typeof u=="function"&&u(g);export{g as default}; +import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{d as p,bj as c,c5 as m,c as s,o as r,bm as a,b as l,u as i,a as f,c6 as b}from"./index-8LjpXIG7.js";import{_ as d}from"./CheckBar.vue_vue_type_script_setup_true_lang-l1KC0wsx.js";import{b as u}from"./route-block-B_A1xBdJ.js";const y={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":""},g=p({__name:"developer",setup(v){const t=c();return(_,e)=>{const o=m("motion");return r(),s(b,null,[a(l(d,{modelValue:i(t).disableTransitions,"onUpdate:modelValue":e[0]||(e[0]=n=>i(t).disableTransitions=n),"mb-2":"","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"]),[[o]]),a(l(d,{modelValue:i(t).usePageSpecificTransitions,"onUpdate:modelValue":e[1]||(e[1]=n=>i(t).usePageSpecificTransitions=n),disabled:i(t).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"]),[[o]]),a((r(),s("div",y,e[2]||(e[2]=[f("div",{text:"60","i-solar:code-bold-duotone":""},null,-1)]))),[[o]])],64)}}});typeof u=="function"&&u(g);export{g as default}; diff --git a/assets/effect-WSjEuzC9-Dq66khSv.js b/assets/effect-WSjEuzC9-DKX9-_ea.js similarity index 51% rename from assets/effect-WSjEuzC9-Dq66khSv.js rename to assets/effect-WSjEuzC9-DKX9-_ea.js index 05db38318b322eff1fdcf92db87f8d715a95d08a..7f0fd37c6e5ba1a7aba9cc0d914d77b7717253b4 100644 --- a/assets/effect-WSjEuzC9-Dq66khSv.js +++ b/assets/effect-WSjEuzC9-DKX9-_ea.js @@ -1 +1 @@ -import{cP as r}from"./index-WDP_Z4A8.js";import{t as e}from"./mcp-CVsSz3w1.js";const c=async()=>{const{JSONSchema:t}=await e(r(()=>import("./__vite-optional-peer-dep_effect_xsschema-BIHI7g3E.js"),[]),"effect");return o=>t.make(o)};export{c as getToJsonSchemaFn}; +import{cP as r}from"./index-8LjpXIG7.js";import{t as e}from"./mcp-BNgNJ97R.js";const c=async()=>{const{JSONSchema:t}=await e(r(()=>import("./__vite-optional-peer-dep_effect_xsschema-BIHI7g3E.js"),[]),"effect");return o=>t.make(o)};export{c as getToJsonSchemaFn}; diff --git a/assets/elevenlabs-DfWVlghd.js b/assets/elevenlabs-r991UKpt.js similarity index 80% rename from assets/elevenlabs-DfWVlghd.js rename to assets/elevenlabs-r991UKpt.js index d457933298ca1980f559a4f11e126cd1a90af8ba..2ba7392a4dfa11ac817552a11d2912eca982b805 100644 --- a/assets/elevenlabs-DfWVlghd.js +++ b/assets/elevenlabs-r991UKpt.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as h,e as n,a0 as F,$ as I,f as k,T,w as r,bk as E,o as K,bl as x,b as d,u as o,a as L}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as N}from"./providers-7GsMyC_3.js";import{u as z}from"./speech-DRmXCXwq.js";import{_ as p,a as G}from"./FieldRange.vue_vue_type_script_setup_true_lang-BubMLR-2.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as H,a as R}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-D8TYHcvp.js";import{b as w}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";const j={flex:"~ col gap-4"},l="elevenlabs",_="eleven_multilingual_v2",q=h({__name:"elevenlabs",setup(A){const V={similarityBoost:.75,stability:.5,speed:1,style:0,useSpeakerBoost:!0},v=n(0),m=n(1),u=n(0),f=n(0),c=n(.5),g=n(.75),b=n(!1),y=z(),t=N(),{providers:C}=F(t),{t:a}=I(),B=k(()=>{var e;return!!((e=C.value[l])!=null&&e.apiKey)}),M=k(()=>y.availableVoices[l]||[]);async function U(e,i,s){const P=t.getProviderInstance(l);if(!P)throw new Error("Failed to initialize speech provider");const S=t.getProviderConfig(l),$=S.model||_;return await y.speech(P,$,e,i,{...S,...V})}return T(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(m,async()=>{const e=t.getProviderConfig(l);e.speed=m.value}),r(u,async()=>{const e=t.getProviderConfig(l);e.volume=u.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)=>(K(),E(o(R),{"provider-id":l,"default-model":_,"additional-settings":V},{"voice-settings":x(()=>[L("div",j,[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:m.value,"onUpdate:modelValue":i[1]||(i[1]=s=>m.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:u.value,"onUpdate:modelValue":i[2]||(i[2]=s=>u.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(G),{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:x(()=>[d(o(H),{"available-voices":M.value,"generate-speech":U,"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}))}});typeof w=="function"&&w(q);export{q as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import{d as h,e as n,a0 as F,$ as I,f as k,T,w as r,bk as E,o as K,bl as x,b as d,u as o,a as L}from"./index-8LjpXIG7.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{u as N}from"./providers-Dhn8Iy_2.js";import{u as z}from"./speech-BUPJbslH.js";import{_ as p,a as G}from"./FieldRange.vue_vue_type_script_setup_true_lang-Cdt76zqB.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{_ as H,a as R}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-CN3ASV_M.js";import{b as w}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CU_o_t3A.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BOcCBViZ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-DyyWKgKi.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-DdnLISgI.js";import"./Input.vue_vue_type_script_setup_true_lang-CpaCGrgF.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-wR1l1PPX.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-DTczYoOw.js";const j={flex:"~ col gap-4"},l="elevenlabs",_="eleven_multilingual_v2",q=h({__name:"elevenlabs",setup(A){const V={similarityBoost:.75,stability:.5,speed:1,style:0,useSpeakerBoost:!0},v=n(0),m=n(1),u=n(0),f=n(0),c=n(.5),g=n(.75),b=n(!1),y=z(),t=N(),{providers:C}=F(t),{t:a}=I(),B=k(()=>{var e;return!!((e=C.value[l])!=null&&e.apiKey)}),M=k(()=>y.availableVoices[l]||[]);async function U(e,i,s){const P=t.getProviderInstance(l);if(!P)throw new Error("Failed to initialize speech provider");const S=t.getProviderConfig(l),$=S.model||_;return await y.speech(P,$,e,i,{...S,...V})}return T(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(m,async()=>{const e=t.getProviderConfig(l);e.speed=m.value}),r(u,async()=>{const e=t.getProviderConfig(l);e.volume=u.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)=>(K(),E(o(R),{"provider-id":l,"default-model":_,"additional-settings":V},{"voice-settings":x(()=>[L("div",j,[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:m.value,"onUpdate:modelValue":i[1]||(i[1]=s=>m.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:u.value,"onUpdate:modelValue":i[2]||(i[2]=s=>u.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(G),{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:x(()=>[d(o(H),{"available-voices":M.value,"generate-speech":U,"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}))}});typeof w=="function"&&w(q);export{q as default}; diff --git a/assets/emotions-D8xwaz_1.js b/assets/emotions-Dfjh5aBn.js similarity index 77% rename from assets/emotions-D8xwaz_1.js rename to assets/emotions-Dfjh5aBn.js index 8063fa854d956f8bf83b74e7ff9d54d18b9c1df9..0228d351bfb0e1e88eeefba37949ce0f70a787d8 100644 --- a/assets/emotions-D8xwaz_1.js +++ b/assets/emotions-Dfjh5aBn.js @@ -1 +1 @@ -import{u as _}from"./queue-C50Iq5oO.js";import{a as k,l as b}from"./queues-DBvSyUSC.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as x}from"./Textarea.vue_vue_type_script_setup_true_lang-Bht7lS1m.js";import{d as h,e as u,c as s,o as t,a as e,b as w,u as M,Y as d,c6 as p,c7 as f}from"./index-WDP_Z4A8.js";import"./emotions-DWNSb738.js";import"./floating-ui.core-CgBsuaUc.js";import"./Basic.vue_vue_type_script_setup_true_lang-COgaiUVw.js";const V={flex:"","flex-col":"","gap-2":"","p-2":""},y={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":""},Y=h({__name:"emotions",setup(P){const l=u(""),c=u([]),i=u([]),r=u(!1),g=_({handlers:[async a=>{i.value.push(a.data)}]}),m=k(g);function v(){r.value=!0;const a=l.value.split("");for(const o of a)m.add(o);m.add(b),l.value="",r.value=!1}return(a,o)=>(t(),s("div",V,[e("div",y,[w(M(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(p,null,f(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(p,null,f(i.value,n=>(t(),s("div",{key:n},[e("div",null,d(n),1)]))),128))])])]))}});export{Y as default}; +import{u as _}from"./queue-Dw-mTAT5.js";import{a as k,l as b}from"./queues-DNZJBdFi.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{_ as x}from"./Textarea.vue_vue_type_script_setup_true_lang-B9_K8yo0.js";import{d as h,e as u,c as s,o as t,a as e,b as w,u as M,Y as d,c6 as p,c7 as f}from"./index-8LjpXIG7.js";import"./emotions-DWNSb738.js";import"./floating-ui.core-CgBsuaUc.js";import"./Basic.vue_vue_type_script_setup_true_lang-Dgb2JW4V.js";const V={flex:"","flex-col":"","gap-2":"","p-2":""},y={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":""},Y=h({__name:"emotions",setup(P){const l=u(""),c=u([]),i=u([]),r=u(!1),g=_({handlers:[async a=>{i.value.push(a.data)}]}),m=k(g);function v(){r.value=!0;const a=l.value.split("");for(const o of a)m.add(o);m.add(b),l.value="",r.value=!1}return(a,o)=>(t(),s("div",V,[e("div",y,[w(M(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(p,null,f(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(p,null,f(i.value,n=>(t(),s("div",{key:n},[e("div",null,d(n),1)]))),128))])])]))}});export{Y as default}; diff --git a/assets/featherless-ai-Abs5j3EH.js b/assets/featherless-ai-DRAEh1Lo.js similarity index 64% rename from assets/featherless-ai-Abs5j3EH.js rename to assets/featherless-ai-DRAEh1Lo.js index 26ade800cb91fa9f944dd75fc1317074b66ecfb7..ed6881d392fbfb6cfe413d6b0aa836aabae8c6ea 100644 --- a/assets/featherless-ai-Abs5j3EH.js +++ b/assets/featherless-ai-DRAEh1Lo.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as k,$ as U,V as $,a0 as h,f as v,T as y,w as K,bk as w,o as x,bl as u,b as l,u as t}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as z}from"./providers-7GsMyC_3.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";const a="featherless-ai",C=k({__name:"featherless-ai",setup(I){const{t:m}=U(),b=$(),d=z(),{providers:o}=h(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}});y(()=>{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 g(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var c,f;return x(),w(t(B),{"provider-name":(c=n.value)==null?void 0:c.localizedName,"provider-icon":(f=n.value)==null?void 0:f.icon,"on-back":()=>t(b).back()},{default:u(()=>[l(t(R),null,{default:u(()=>[l(t(S),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:u(()=>{var p;return[l(t(P),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=V=>r.value=V),"provider-name":(p=n.value)==null?void 0:p.localizedName,placeholder:"fw-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(M),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t(N),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=p=>s.value=p),placeholder:"https://api.featherless.ai/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof _=="function"&&_(C);export{C as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import{d as k,$ as U,V as $,a0 as h,f as v,T as y,w as K,bk as w,o as x,bl as u,b as l,u as t}from"./index-8LjpXIG7.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{u as z}from"./providers-Dhn8Iy_2.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CU_o_t3A.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-wR1l1PPX.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-DTczYoOw.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-D3mbXce4.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BOcCBViZ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-DyyWKgKi.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-DdnLISgI.js";import"./Input.vue_vue_type_script_setup_true_lang-CpaCGrgF.js";const a="featherless-ai",C=k({__name:"featherless-ai",setup(I){const{t:m}=U(),b=$(),d=z(),{providers:o}=h(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}});y(()=>{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 g(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var c,f;return x(),w(t(B),{"provider-name":(c=n.value)==null?void 0:c.localizedName,"provider-icon":(f=n.value)==null?void 0:f.icon,"on-back":()=>t(b).back()},{default:u(()=>[l(t(R),null,{default:u(()=>[l(t(S),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:u(()=>{var p;return[l(t(P),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=V=>r.value=V),"provider-name":(p=n.value)==null?void 0:p.localizedName,placeholder:"fw-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(M),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t(N),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=p=>s.value=p),placeholder:"https://api.featherless.ai/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof _=="function"&&_(C);export{C as default}; diff --git a/assets/filter-message-BA3h9Pac.js b/assets/filter-message-BFrVJwR3.js similarity index 79% rename from assets/filter-message-BA3h9Pac.js rename to assets/filter-message-BFrVJwR3.js index 03e9128ba352f2868fcf93f37e3f45943f524ce6..bafee2ed3bd5a53bc6f1e3f2db9a749e8c8b80d0 100644 --- a/assets/filter-message-BA3h9Pac.js +++ b/assets/filter-message-BFrVJwR3.js @@ -1 +1 @@ -import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as m}from"./Textarea.vue_vue_type_script_setup_true_lang-Bht7lS1m.js";import{d as g,e as c,c as v,o as _,a as o,b,u as x,Y as d}from"./index-WDP_Z4A8.js";import"./floating-ui.core-CgBsuaUc.js";import"./Basic.vue_vue_type_script_setup_true_lang-COgaiUVw.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":""},C=g({__name:"filter-message",setup(M){const s=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=s.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),s.value="",u.value=!1}return(i,e)=>(_(),v("div",S,[o("div",k,[b(x(m),{modelValue:s.value,"onUpdate:modelValue":e[0]||(e[0]=t=>s.value=t),placeholder:"Message",p:"2",bg:"neutral-100 dark:neutral-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:p},null,8,["modelValue"]),o("button",w,d(u.value?"Processing...":"Send"),1)]),o("div",V,[e[1]||(e[1]=o("h3",{"font-semibold":""}," Streaming Message ",-1)),o("div",null,d(r.value.content),1)])]))}});export{C as default}; +import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{_ as m}from"./Textarea.vue_vue_type_script_setup_true_lang-B9_K8yo0.js";import{d as g,e as c,c as v,o as _,a as o,b,u as x,Y as d}from"./index-8LjpXIG7.js";import"./floating-ui.core-CgBsuaUc.js";import"./Basic.vue_vue_type_script_setup_true_lang-Dgb2JW4V.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":""},C=g({__name:"filter-message",setup(M){const s=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=s.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),s.value="",u.value=!1}return(i,e)=>(_(),v("div",S,[o("div",k,[b(x(m),{modelValue:s.value,"onUpdate:modelValue":e[0]||(e[0]=t=>s.value=t),placeholder:"Message",p:"2",bg:"neutral-100 dark:neutral-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:p},null,8,["modelValue"]),o("button",w,d(u.value?"Processing...":"Send"),1)]),o("div",V,[e[1]||(e[1]=o("h3",{"font-semibold":""}," Streaming Message ",-1)),o("div",null,d(r.value.content),1)])]))}});export{C as default}; diff --git a/assets/fireworks-ai-Cgaz7mYL.js b/assets/fireworks-ai-BDydk9EO.js similarity index 64% rename from assets/fireworks-ai-Cgaz7mYL.js rename to assets/fireworks-ai-BDydk9EO.js index a9d9e5c8db16d13932d67302f2a4bf9cd4cc7956..8040f51ee46f3961c4ab67ccafd60838fb5526d3 100644 --- a/assets/fireworks-ai-Cgaz7mYL.js +++ b/assets/fireworks-ai-BDydk9EO.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as V,$ as w,V as U,a0 as $,f as c,T as y,w as K,bk as h,o as x,bl as u,b as l,u as t}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as z}from"./providers-7GsMyC_3.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";const a="fireworks-ai",C=V({__name:"fireworks-ai",setup(I){const{t:m}=w(),b=U(),d=z(),{providers:o}=$(d),n=c(()=>d.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}}),s=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}});y(()=>{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 g(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var v,f;return x(),h(t(B),{"provider-name":(v=n.value)==null?void 0:v.localizedName,"provider-icon":(f=n.value)==null?void 0:f.icon,"on-back":()=>t(b).back()},{default:u(()=>[l(t(R),null,{default:u(()=>[l(t(S),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:u(()=>{var p;return[l(t(P),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=k=>r.value=k),"provider-name":(p=n.value)==null?void 0:p.localizedName,placeholder:"fw-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(M),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t(N),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=p=>s.value=p),placeholder:"https://api.fireworks.ai/inference/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof _=="function"&&_(C);export{C as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import{d as V,$ as w,V as U,a0 as $,f as c,T as y,w as K,bk as h,o as x,bl as u,b as l,u as t}from"./index-8LjpXIG7.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{u as z}from"./providers-Dhn8Iy_2.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CU_o_t3A.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-wR1l1PPX.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-DTczYoOw.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-D3mbXce4.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BOcCBViZ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-DyyWKgKi.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-DdnLISgI.js";import"./Input.vue_vue_type_script_setup_true_lang-CpaCGrgF.js";const a="fireworks-ai",C=V({__name:"fireworks-ai",setup(I){const{t:m}=w(),b=U(),d=z(),{providers:o}=$(d),n=c(()=>d.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}}),s=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}});y(()=>{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 g(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var v,f;return x(),h(t(B),{"provider-name":(v=n.value)==null?void 0:v.localizedName,"provider-icon":(f=n.value)==null?void 0:f.icon,"on-back":()=>t(b).back()},{default:u(()=>[l(t(R),null,{default:u(()=>[l(t(S),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:u(()=>{var p;return[l(t(P),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=k=>r.value=k),"provider-name":(p=n.value)==null?void 0:p.localizedName,placeholder:"fw-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(M),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t(N),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=p=>s.value=p),placeholder:"https://api.fireworks.ai/inference/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof _=="function"&&_(C);export{C as default}; diff --git a/assets/general-D0FjssBx.js b/assets/general-7kIpzqyc.js similarity index 87% rename from assets/general-D0FjssBx.js rename to assets/general-7kIpzqyc.js index 40151afbb3fea3fb09993a19be7fdb552eb84e71..e12cebfec0fdb50e9a33ae48903131b5881d0383 100644 --- a/assets/general-D0FjssBx.js +++ b/assets/general-7kIpzqyc.js @@ -1 +1 @@ -import{d as m,bj as g,ca as f,c5 as y,c as l,o as r,bm as t,b,u,bI as v,ch as _,Y as d,a as n,cl as h,c6 as x}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{_ as k}from"./CheckBar.vue_vue_type_script_setup_true_lang-D-J2slay.js";import{b as p}from"./route-block-B_A1xBdJ.js";const V={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"},j={value:"en-US"},D={value:"zh-CN"},N={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":""},S=m({__name:"general",setup($){const c=g(),o=f();return(a,e)=>{const i=y("motion");return r(),l(x,null,[t(b(k,{modelValue:u(o),"onUpdate:modelValue":e[0]||(e[0]=s=>v(o)?o.value=s:null),"mb-2":"",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"]),[[i]]),t((r(),l("div",V,[_(d(a.$t("settings.language.title"))+" ",1),t(n("select",{"onUpdate:modelValue":e[1]||(e[1]=s=>u(c).language=s),transition:"all ease-in-out duration-250","cursor-pointer":"","bg-transparent":"","text-right":"","outline-none":""},[n("option",j,d(a.$t("settings.language.english")),1),n("option",D,d(a.$t("settings.language.chinese")),1)],512),[[h,u(c).language]])])),[[i]]),t((r(),l("div",N,e[2]||(e[2]=[n("div",{text:"60","i-solar:emoji-funny-square-bold-duotone":""},null,-1)]))),[[i]])],64)}}});typeof p=="function"&&p(S);export{S as default}; +import{d as m,bj as g,ca as f,c5 as y,c as l,o as r,bm as t,b,u,bI as v,ch as _,Y as d,a as n,cl as h,c6 as x}from"./index-8LjpXIG7.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{_ as k}from"./CheckBar.vue_vue_type_script_setup_true_lang-l1KC0wsx.js";import{b as p}from"./route-block-B_A1xBdJ.js";const V={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"},j={value:"en-US"},D={value:"zh-CN"},N={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":""},S=m({__name:"general",setup($){const c=g(),o=f();return(a,e)=>{const i=y("motion");return r(),l(x,null,[t(b(k,{modelValue:u(o),"onUpdate:modelValue":e[0]||(e[0]=s=>v(o)?o.value=s:null),"mb-2":"",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"]),[[i]]),t((r(),l("div",V,[_(d(a.$t("settings.language.title"))+" ",1),t(n("select",{"onUpdate:modelValue":e[1]||(e[1]=s=>u(c).language=s),transition:"all ease-in-out duration-250","cursor-pointer":"","bg-transparent":"","text-right":"","outline-none":""},[n("option",j,d(a.$t("settings.language.english")),1),n("option",D,d(a.$t("settings.language.chinese")),1)],512),[[h,u(c).language]])])),[[i]]),t((r(),l("div",N,e[2]||(e[2]=[n("div",{text:"60","i-solar:emoji-funny-square-bold-duotone":""},null,-1)]))),[[i]])],64)}}});typeof p=="function"&&p(S);export{S as default}; diff --git a/assets/google-generative-ai-Cvwii5l7.js b/assets/google-generative-ai-B2OoQF6b.js similarity index 67% rename from assets/google-generative-ai-Cvwii5l7.js rename to assets/google-generative-ai-B2OoQF6b.js index 9c7ddd5590697cdd89598191f81b4bbff2fa0a4e..b215f9b0d00316c347444a4829f5f881b97db131 100644 --- a/assets/google-generative-ai-Cvwii5l7.js +++ b/assets/google-generative-ai-B2OoQF6b.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as U,$ as V,V as k,a0 as $,f as v,T as y,w as K,bk as I,o as G,bl as p,b as l,u as t}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as M}from"./providers-7GsMyC_3.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as N,a as w}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import{_ as x}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js";import{b as f}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";const e="google-generative-ai",z=U({__name:"google-generative-ai",setup(B){const{t:m}=V(),_=k(),c=M(),{providers:a}=$(c),u=v(()=>c.getProviderMetadata(e)),r=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}}),s=v({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/"}),r.value=((o=a.value[e])==null?void 0:o.apiKey)||"",s.value=((i=a.value[e])==null?void 0:i.baseUrl)||"https://generativelanguage.googleapis.com/v1beta/openai/"}),K([r,s],()=>{a.value[e]={...a.value[e],apiKey:r.value,baseUrl:s.value||"https://generativelanguage.googleapis.com/v1beta/openai/"}});function b(){a.value[e]={baseUrl:"https://generativelanguage.googleapis.com/v1beta/openai/"}}return(o,i)=>{var d,g;return G(),I(t(S),{"provider-name":((d=u.value)==null?void 0:d.localizedName)||"Google | Gemini","provider-icon":(g=u.value)==null?void 0:g.icon,"on-back":()=>t(_).back()},{default:p(()=>[l(t(P),null,{default:p(()=>[l(t(R),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:p(()=>{var n;return[l(t(x),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=h=>r.value=h),"provider-name":((n=u.value)==null?void 0:n.localizedName)||"Google",placeholder:"GEMINI_API_KEY"},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(N),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[l(t(w),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=n=>s.value=n),placeholder:"https://generativelanguage.googleapis.com/v1beta/openai/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof f=="function"&&f(z);export{z as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import{d as U,$ as V,V as k,a0 as $,f as v,T as y,w as K,bk as I,o as G,bl as p,b as l,u as t}from"./index-8LjpXIG7.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{u as M}from"./providers-Dhn8Iy_2.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{_ as N,a as w}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CU_o_t3A.js";import{_ as x}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-wR1l1PPX.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-DTczYoOw.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-D3mbXce4.js";import{b as f}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BOcCBViZ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-DyyWKgKi.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-DdnLISgI.js";import"./Input.vue_vue_type_script_setup_true_lang-CpaCGrgF.js";const e="google-generative-ai",z=U({__name:"google-generative-ai",setup(B){const{t:m}=V(),_=k(),c=M(),{providers:a}=$(c),u=v(()=>c.getProviderMetadata(e)),r=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}}),s=v({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/"}),r.value=((o=a.value[e])==null?void 0:o.apiKey)||"",s.value=((i=a.value[e])==null?void 0:i.baseUrl)||"https://generativelanguage.googleapis.com/v1beta/openai/"}),K([r,s],()=>{a.value[e]={...a.value[e],apiKey:r.value,baseUrl:s.value||"https://generativelanguage.googleapis.com/v1beta/openai/"}});function b(){a.value[e]={baseUrl:"https://generativelanguage.googleapis.com/v1beta/openai/"}}return(o,i)=>{var d,g;return G(),I(t(S),{"provider-name":((d=u.value)==null?void 0:d.localizedName)||"Google | Gemini","provider-icon":(g=u.value)==null?void 0:g.icon,"on-back":()=>t(_).back()},{default:p(()=>[l(t(P),null,{default:p(()=>[l(t(R),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:p(()=>{var n;return[l(t(x),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=h=>r.value=h),"provider-name":((n=u.value)==null?void 0:n.localizedName)||"Google",placeholder:"GEMINI_API_KEY"},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(N),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[l(t(w),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=n=>s.value=n),placeholder:"https://generativelanguage.googleapis.com/v1beta/openai/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof f=="function"&&f(z);export{z as default}; diff --git a/assets/image-CibzeZAR.js b/assets/image-CsXvgIez.js similarity index 95% rename from assets/image-CibzeZAR.js rename to assets/image-CsXvgIez.js index a766d3c5f4c75e83f9a42d63ee806b222cdf88ad..d49ded5fd31f5df3f384dc80353e39973ecb679a 100644 --- a/assets/image-CibzeZAR.js +++ b/assets/image-CsXvgIez.js @@ -1,2 +1,2 @@ -import{d as _,e as i,ce as y,c as d,o as u,a,W as x,Y as v,u as w,c2 as b}from"./index-WDP_Z4A8.js";const h={bg:"neutral-100",flex:"~ col","items-center":"","justify-center":"","rounded-lg":"","px-4":"","py-3":""},C={key:0},U=["src"],R={bg:"neutral-100",class:"text-wrap-any","max-h":"100","overflow-scroll":"","rounded-lg":"","text-wrap":"","text-black":"","font-mono":""},k=_({__name:"image",setup(D){const p=i(),n=i(""),{copy:g}=y({source:n});async function m(r){return new Promise((e,o)=>{const t=new FileReader;t.onload=s=>{var l,c;e(((c=(l=s.target)==null?void 0:l.result)==null?void 0:c.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",h,[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",C,[a("img",{src:n.value,alt:"Uploaded Image","w-100":""},null,8,U),a("pre",R," "+v(n.value)+` +import{d as _,e as i,ce as y,c as d,o as u,a,W as x,Y as v,u as w,c2 as b}from"./index-8LjpXIG7.js";const h={bg:"neutral-100",flex:"~ col","items-center":"","justify-center":"","rounded-lg":"","px-4":"","py-3":""},C={key:0},U=["src"],R={bg:"neutral-100",class:"text-wrap-any","max-h":"100","overflow-scroll":"","rounded-lg":"","text-wrap":"","text-black":"","font-mono":""},k=_({__name:"image",setup(D){const p=i(),n=i(""),{copy:g}=y({source:n});async function m(r){return new Promise((e,o)=>{const t=new FileReader;t.onload=s=>{var l,c;e(((c=(l=s.target)==null?void 0:l.result)==null?void 0:c.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",h,[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",C,[a("img",{src:n.value,alt:"Uploaded Image","w-100":""},null,8,U),a("pre",R," "+v(n.value)+` `,1),a("button",{bg:"primary-500",text:"white","mt-4":"","rounded-lg":"","px-4":"","py-2":"",onClick:e[0]||(e[0]=()=>w(g)())}," Copy Data URL ")])):x("",!0)]))}}),B=b(k,[["__scopeId","data-v-7edd53e6"]]);export{B as default}; diff --git a/assets/index-WDP_Z4A8.js b/assets/index-8LjpXIG7.js similarity index 90% rename from assets/index-WDP_Z4A8.js rename to assets/index-8LjpXIG7.js index 71e014f95c37c25e827d82dfe9b0aadcbe3adadc..5b2445074028d42da44ee514cd7be783e02dbae8 100644 --- a/assets/index-WDP_Z4A8.js +++ b/assets/index-8LjpXIG7.js @@ -1,29 +1,29 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-MxM0RvWC.js","assets/HeaderLink--5c4L7nq.js","assets/HeaderLink-DsxHr3rn.css","assets/settings-BZFpczgY.js","assets/Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js","assets/Stage-DmH5o-Hf.css","assets/three-vrm.module-DIVMhp6T.js","assets/emotions-DWNSb738.js","assets/mcp-CVsSz3w1.js","assets/providers-7GsMyC_3.js","assets/index-LHmcipjy.js","assets/Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js","assets/floating-ui.core-CgBsuaUc.js","assets/Select-BCJa5409.css","assets/index-CHEHxPJb.js","assets/import-url-browser-CPN8ipMD.js","assets/duckdb-mvp-CaaD-olE.js","assets/speech-DRmXCXwq.js","assets/queue-C50Iq5oO.js","assets/queues-DBvSyUSC.js","assets/index-Dpfqqu9L.js","assets/airi-card-Cgw9OiDq.js","assets/consciousness-CI5ipeHX.js","assets/TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js","assets/Model.vue_vue_type_script_setup_true_lang-DvSPvuiM.js","assets/Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js","assets/Basic.vue_vue_type_script_setup_true_lang-COgaiUVw.js","assets/route-block-B_A1xBdJ.js","assets/index-gTqmS2cP.css","assets/background-remove-C-QrXCNT.js","assets/InputFile.vue_vue_type_script_setup_true_lang-Bt1GPBFc.js","assets/chat-mn0JV4Kp.js","assets/image-CibzeZAR.js","assets/image-BhuwcwI9.css","assets/vibrant-C1qAY2sn.js","assets/browser-CkchkNbv.js","assets/queue-Bzd_iRYh.js","assets/index-Cqc4fKz2.js","assets/IconItem-CdLibJxT.js","assets/IconAnimation.vue_vue_type_script_setup_true_lang-Bo8-R3ZB.js","assets/index-aU1mpMhC.js","assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-CpnZ7KCX.js","assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-DmSmyxCs.js","assets/index-DeGbjSQn.js","assets/CardListItem.vue_vue_type_script_setup_true_lang-BCZkjfDb.js","assets/CardDetailDialog-BlSfmRlS.js","assets/CardListItem-D2jkRHPP.js","assets/DeleteCardDialog-CzcmecCM.js","assets/index-BUHNZNXi.js","assets/color-scheme-DFRftciY.js","assets/ColorPalette.vue_vue_type_script_setup_true_lang-BWRGi3IC.js","assets/color-scheme-QyqrmPIG.css","assets/developer-B1AODhAI.js","assets/CheckBar.vue_vue_type_script_setup_true_lang-D-J2slay.js","assets/general-D0FjssBx.js","assets/index-CKKZXq7c.js","assets/index-C9m14O1J.js","assets/useIconAnimation-B41IKS_9.js","assets/index-D_OwSkw4.css","assets/index-C7BBvJH7.js","assets/IconStatusItem-B9Mlqc3P.js","assets/consciousness-DTcES_Z6.js","assets/RadioCardSimple-BzEaEqwF.js","assets/Input.vue_vue_type_script_setup_true_lang-C4baR55j.js","assets/memory-long-term-DKoN_UYI.js","assets/memory-short-term-CGF6Nhl6.js","assets/speech-BnaLJ2Rn.js","assets/FieldRange.vue_vue_type_script_setup_true_lang-BubMLR-2.js","assets/FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js","assets/Textarea.vue_vue_type_script_setup_true_lang-Bht7lS1m.js","assets/index-CsewVBbh.js","assets/alibaba-cloud-model-studio-AJxwqJ9S.js","assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-D8TYHcvp.js","assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js","assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js","assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js","assets/anthropic-CRbvwdIi.js","assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js","assets/cloudflare-workers-ai-Nzt67BKJ.js","assets/deepseek-C4C7ySbq.js","assets/elevenlabs-DfWVlghd.js","assets/featherless-ai-Abs5j3EH.js","assets/fireworks-ai-Cgaz7mYL.js","assets/google-generative-ai-Cvwii5l7.js","assets/microsoft-speech-BLOCaluL.js","assets/mistral-ai-jouO5dmJ.js","assets/moonshot-ai-DZvpNZty.js","assets/novita-ai-Bh1E0rHc.js","assets/ollama-r0UZT5nG.js","assets/openai-XNIcWilW.js","assets/openrouter-ai-CTdWmhtc.js","assets/together-ai-No2aAYf3.js","assets/volcengine-BRelq9N_.js","assets/xai-CoTXxIZ1.js","assets/index-ebacZR9F.js","assets/filter-message-BA3h9Pac.js","assets/delays-WpVM8VPm.js","assets/emotions-D8xwaz_1.js","assets/messages-DjywpylS.js"])))=>i.map(i=>d[i]); -var aC=Object.defineProperty;var lC=(n,e,t)=>e in n?aC(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var fi=(n,e,t)=>lC(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 cC="modulepreload",uC=function(n){return"/"+n},yv={},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=uC(c),c in yv)return;yv[c]=!0;const u=c.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${f}`))return;const h=document.createElement("link");if(h.rel=u?"stylesheet":cC,u||(h.as="script"),h.crossOrigin="",h.href=c,l&&h.setAttribute("nonce",l),document.head.appendChild(h),u)return new Promise((d,p)=>{h.addEventListener("load",d),h.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)})};/** +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-2UwyyMkh.js","assets/HeaderLink-Ct9jmG8_.js","assets/HeaderLink-DsxHr3rn.css","assets/settings-u12G2c4h.js","assets/Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js","assets/Stage-DmH5o-Hf.css","assets/three-vrm.module-r4bOtVyC.js","assets/emotions-DWNSb738.js","assets/mcp-BNgNJ97R.js","assets/providers-Dhn8Iy_2.js","assets/index-LHmcipjy.js","assets/Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js","assets/floating-ui.core-CgBsuaUc.js","assets/Select-BCJa5409.css","assets/index-CJuuz-Er.js","assets/import-url-browser-CPN8ipMD.js","assets/duckdb-mvp-CaaD-olE.js","assets/speech-BUPJbslH.js","assets/queue-Dw-mTAT5.js","assets/queues-DNZJBdFi.js","assets/index-Dpfqqu9L.js","assets/airi-card-COPhkSXD.js","assets/consciousness-DSqUYfGS.js","assets/TransitionVertical.vue_vue_type_script_setup_true_lang-DyyWKgKi.js","assets/Model.vue_vue_type_script_setup_true_lang-BJUN66rj.js","assets/Collapsable.vue_vue_type_script_setup_true_lang-BOcCBViZ.js","assets/Basic.vue_vue_type_script_setup_true_lang-Dgb2JW4V.js","assets/route-block-B_A1xBdJ.js","assets/index-gTqmS2cP.css","assets/background-remove-DCzY1Ywz.js","assets/InputFile.vue_vue_type_script_setup_true_lang-CAuLzFBg.js","assets/chat-CystJIYZ.js","assets/image-CsXvgIez.js","assets/image-BhuwcwI9.css","assets/vibrant-CPrbAryE.js","assets/browser-CkchkNbv.js","assets/queue-CinxwIru.js","assets/index-JeYrWqis.js","assets/IconItem-rhhSEiTz.js","assets/IconAnimation.vue_vue_type_script_setup_true_lang-CT2O6kWS.js","assets/index-C0tBWPUO.js","assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-BUKUzwWl.js","assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-CAMkB22k.js","assets/index-BuTdizGl.js","assets/CardListItem.vue_vue_type_script_setup_true_lang-B1Jpvh2O.js","assets/CardDetailDialog-Ctii3ZR5.js","assets/CardListItem-xxyYJeZ6.js","assets/DeleteCardDialog-XzegND5V.js","assets/index-B9pSJh7u.js","assets/color-scheme-D40fyZmU.js","assets/ColorPalette.vue_vue_type_script_setup_true_lang-CcpMsyh5.js","assets/color-scheme-QyqrmPIG.css","assets/developer-DJ1vjJKn.js","assets/CheckBar.vue_vue_type_script_setup_true_lang-l1KC0wsx.js","assets/general-7kIpzqyc.js","assets/index-Cc3ob4SF.js","assets/index-DsBJhxAL.js","assets/useIconAnimation-DdsxO8m6.js","assets/index-D_OwSkw4.css","assets/index-B5issj2Y.js","assets/IconStatusItem-BuPKAtbo.js","assets/consciousness-B5gyBbNc.js","assets/RadioCardSimple-DNdKoxoJ.js","assets/Input.vue_vue_type_script_setup_true_lang-CpaCGrgF.js","assets/memory-long-term-CgAjfEjB.js","assets/memory-short-term-DZTX9IKC.js","assets/speech-DlPfM_Ny.js","assets/FieldRange.vue_vue_type_script_setup_true_lang-Cdt76zqB.js","assets/FieldInput.vue_vue_type_script_setup_true_lang-DdnLISgI.js","assets/Textarea.vue_vue_type_script_setup_true_lang-B9_K8yo0.js","assets/index-DWNTcdN1.js","assets/alibaba-cloud-model-studio-CNfGTHJE.js","assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-CN3ASV_M.js","assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CU_o_t3A.js","assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-wR1l1PPX.js","assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-DTczYoOw.js","assets/anthropic-D75II3Mv.js","assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-D3mbXce4.js","assets/cloudflare-workers-ai-DSn9aJzJ.js","assets/deepseek-BsGOJgV4.js","assets/elevenlabs-r991UKpt.js","assets/featherless-ai-DRAEh1Lo.js","assets/fireworks-ai-BDydk9EO.js","assets/google-generative-ai-B2OoQF6b.js","assets/microsoft-speech-DxAcOoH7.js","assets/mistral-ai-D8qXGKsB.js","assets/moonshot-ai-CRj24ObM.js","assets/novita-ai-NAISe4Y1.js","assets/ollama-CtNL55u8.js","assets/openai-Ddfv1hoL.js","assets/openrouter-ai-CICLfTef.js","assets/together-ai-BuHN4yhy.js","assets/volcengine-fxYOCPSz.js","assets/xai-CVnaViqS.js","assets/index-DLewWnu4.js","assets/filter-message-BFrVJwR3.js","assets/delays-Cvf4yi9y.js","assets/emotions-Dfjh5aBn.js","assets/messages-CxOqkV_c.js"])))=>i.map(i=>d[i]); +var aC=Object.defineProperty;var lC=(n,e,t)=>e in n?aC(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var fi=(n,e,t)=>lC(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 cC="modulepreload",uC=function(n){return"/"+n},bv={},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=uC(c),c in bv)return;bv[c]=!0;const u=c.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${f}`))return;const h=document.createElement("link");if(h.rel=u?"stylesheet":cC,u||(h.as="script"),h.crossOrigin="",h.href=c,l&&h.setAttribute("nonce",l),document.head.appendChild(h),u)return new Promise((d,p)=>{h.addEventListener("load",d),h.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.16 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function _0(n){const e=Object.create(null);for(const t of n.split(","))e[t]=1;return t=>t in e}const bt={},ha=[],es=()=>{},fC=()=>!1,Gh=n=>n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&(n.charCodeAt(2)>122||n.charCodeAt(2)<97),v0=n=>n.startsWith("onUpdate:"),sn=Object.assign,y0=(n,e)=>{const t=n.indexOf(e);t>-1&&n.splice(t,1)},hC=Object.prototype.hasOwnProperty,Et=(n,e)=>hC.call(n,e),Xe=Array.isArray,da=n=>Rc(n)==="[object Map]",Fa=n=>Rc(n)==="[object Set]",bv=n=>Rc(n)==="[object Date]",et=n=>typeof n=="function",Bt=n=>typeof n=="string",Ui=n=>typeof n=="symbol",Dt=n=>n!==null&&typeof n=="object",WM=n=>(Dt(n)||et(n))&&et(n.then)&&et(n.catch),XM=Object.prototype.toString,Rc=n=>XM.call(n),dC=n=>Rc(n).slice(8,-1),$M=n=>Rc(n)==="[object Object]",b0=n=>Bt(n)&&n!=="NaN"&&n[0]!=="-"&&""+parseInt(n,10)===n,bl=_0(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Wh=n=>{const e=Object.create(null);return t=>e[t]||(e[t]=n(t))},pC=/-(\w)/g,ai=Wh(n=>n.replace(pC,(e,t)=>t?t.toUpperCase():"")),mC=/\B([A-Z])/g,Gs=Wh(n=>n.replace(mC,"-$1").toLowerCase()),Xh=Wh(n=>n.charAt(0).toUpperCase()+n.slice(1)),gf=Wh(n=>n?`on${Xh(n)}`:""),jn=(n,e)=>!Object.is(n,e),_f=(n,...e)=>{for(let t=0;t{Object.defineProperty(n,e,{configurable:!0,enumerable:!1,writable:i,value:t})},Lf=n=>{const e=parseFloat(n);return isNaN(e)?n:e},gC=n=>{const e=Bt(n)?Number(n):NaN;return isNaN(e)?n:e};let xv;const $h=()=>xv||(xv=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Si(n){if(Xe(n)){const e={};for(let t=0;t{if(t){const i=t.split(vC);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function ka(n){let e="";if(Bt(n))e=n;else if(Xe(n))for(let t=0;txo(t,e))}const jM=n=>!!(n&&n.__v_isRef===!0),EC=n=>Bt(n)?n:n==null?"":Xe(n)||Dt(n)&&(n.toString===XM||!et(n.toString))?jM(n)?EC(n.value):JSON.stringify(n,KM,2):String(n),KM=(n,e)=>jM(e)?KM(n,e.value):da(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[i,s],r)=>(t[up(i,r)+" =>"]=s,t),{})}:Fa(e)?{[`Set(${e.size})`]:[...e.values()].map(t=>up(t))}:Ui(e)?up(e):Dt(e)&&!Xe(e)&&!$M(e)?String(e):e,up=(n,e="")=>{var t;return Ui(n)?`Symbol(${(t=n.description)!=null?t:e})`:n};/** +**//*! #__NO_SIDE_EFFECTS__ */function v0(n){const e=Object.create(null);for(const t of n.split(","))e[t]=1;return t=>t in e}const bt={},ha=[],es=()=>{},fC=()=>!1,Gh=n=>n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&(n.charCodeAt(2)>122||n.charCodeAt(2)<97),y0=n=>n.startsWith("onUpdate:"),sn=Object.assign,b0=(n,e)=>{const t=n.indexOf(e);t>-1&&n.splice(t,1)},hC=Object.prototype.hasOwnProperty,Et=(n,e)=>hC.call(n,e),Xe=Array.isArray,da=n=>Rc(n)==="[object Map]",Fa=n=>Rc(n)==="[object Set]",xv=n=>Rc(n)==="[object Date]",et=n=>typeof n=="function",Bt=n=>typeof n=="string",Ui=n=>typeof n=="symbol",Dt=n=>n!==null&&typeof n=="object",WM=n=>(Dt(n)||et(n))&&et(n.then)&&et(n.catch),XM=Object.prototype.toString,Rc=n=>XM.call(n),dC=n=>Rc(n).slice(8,-1),$M=n=>Rc(n)==="[object Object]",x0=n=>Bt(n)&&n!=="NaN"&&n[0]!=="-"&&""+parseInt(n,10)===n,bl=v0(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Wh=n=>{const e=Object.create(null);return t=>e[t]||(e[t]=n(t))},pC=/-(\w)/g,ai=Wh(n=>n.replace(pC,(e,t)=>t?t.toUpperCase():"")),mC=/\B([A-Z])/g,Gs=Wh(n=>n.replace(mC,"-$1").toLowerCase()),Xh=Wh(n=>n.charAt(0).toUpperCase()+n.slice(1)),gf=Wh(n=>n?`on${Xh(n)}`:""),jn=(n,e)=>!Object.is(n,e),_f=(n,...e)=>{for(let t=0;t{Object.defineProperty(n,e,{configurable:!0,enumerable:!1,writable:i,value:t})},Lf=n=>{const e=parseFloat(n);return isNaN(e)?n:e},gC=n=>{const e=Bt(n)?Number(n):NaN;return isNaN(e)?n:e};let Mv;const $h=()=>Mv||(Mv=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Si(n){if(Xe(n)){const e={};for(let t=0;t{if(t){const i=t.split(vC);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function ka(n){let e="";if(Bt(n))e=n;else if(Xe(n))for(let t=0;txo(t,e))}const jM=n=>!!(n&&n.__v_isRef===!0),EC=n=>Bt(n)?n:n==null?"":Xe(n)||Dt(n)&&(n.toString===XM||!et(n.toString))?jM(n)?EC(n.value):JSON.stringify(n,KM,2):String(n),KM=(n,e)=>jM(e)?KM(n,e.value):da(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[i,s],r)=>(t[up(i,r)+" =>"]=s,t),{})}:Fa(e)?{[`Set(${e.size})`]:[...e.values()].map(t=>up(t))}:Ui(e)?up(e):Dt(e)&&!Xe(e)&&!$M(e)?String(e):e,up=(n,e="")=>{var t;return Ui(n)?`Symbol(${(t=n.description)!=null?t:e})`:n};/** * @vue/reactivity v3.5.16 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let Tn;class ZM{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Tn,!e&&Tn&&(this.index=(Tn.scopes||(Tn.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e0&&--this._on===0&&(Tn=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let t,i;for(t=0,i=this.effects.length;t0)return;if(Ml){let e=Ml;for(Ml=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let n;for(;xl;){let e=xl;for(xl=void 0;e;){const t=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){n||(n=i)}e=t}}if(n)throw n}function tS(n){for(let e=n.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function nS(n){let e,t=n.depsTail,i=t;for(;i;){const s=i.prevDep;i.version===-1?(i===t&&(t=s),w0(i),TC(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=s}n.deps=e,n.depsTail=t}function Qm(n){for(let e=n.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(iS(e.dep.computed)||e.dep.version!==e.version))return!0;return!!n._dirty}function iS(n){if(n.flags&4&&!(n.flags&16)||(n.flags&=-17,n.globalVersion===$l)||(n.globalVersion=$l,!n.isSSR&&n.flags&128&&(!n.deps&&!n._dirty||!Qm(n))))return;n.flags|=2;const e=n.dep,t=Nt,i=Ni;Nt=n,Ni=!0;try{tS(n);const s=n.fn(n._value);(e.version===0||jn(s,n._value))&&(n.flags|=128,n._value=s,e.version++)}catch(s){throw e.version++,s}finally{Nt=t,Ni=i,nS(n),n.flags&=-3}}function w0(n,e=!1){const{dep:t,prevSub:i,nextSub:s}=n;if(i&&(i.nextSub=s,n.prevSub=void 0),s&&(s.prevSub=i,n.nextSub=void 0),t.subs===n&&(t.subs=i,!i&&t.computed)){t.computed.flags&=-5;for(let r=t.computed.deps;r;r=r.nextDep)w0(r,!0)}!e&&!--t.sc&&t.map&&t.map.delete(t.key)}function TC(n){const{prevDep:e,nextDep:t}=n;e&&(e.nextDep=t,n.prevDep=void 0),t&&(t.prevDep=e,n.nextDep=void 0)}let Ni=!0;const sS=[];function Us(){sS.push(Ni),Ni=!1}function Fs(){const n=sS.pop();Ni=n===void 0?!0:n}function Mv(n){const{cleanup:e}=n;if(n.cleanup=void 0,e){const t=Nt;Nt=void 0;try{e()}finally{Nt=t}}}let $l=0;class wC{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Yh{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!Nt||!Ni||Nt===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==Nt)t=this.activeLink=new wC(Nt,this),Nt.deps?(t.prevDep=Nt.depsTail,Nt.depsTail.nextDep=t,Nt.depsTail=t):Nt.deps=Nt.depsTail=t,rS(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){const i=t.nextDep;i.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=i),t.prevDep=Nt.depsTail,t.nextDep=void 0,Nt.depsTail.nextDep=t,Nt.depsTail=t,Nt.deps===t&&(Nt.deps=i)}return t}trigger(e){this.version++,$l++,this.notify(e)}notify(e){E0();try{for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{T0()}}}function rS(n){if(n.dep.sc++,n.sub.flags&4){const e=n.dep.computed;if(e&&!n.dep.subs){e.flags|=20;for(let i=e.deps;i;i=i.nextDep)rS(i)}const t=n.dep.subs;t!==n&&(n.prevSub=t,t&&(t.nextSub=n)),n.dep.subs=n}}const Df=new WeakMap,mo=Symbol(""),eg=Symbol(""),ql=Symbol("");function wn(n,e,t){if(Ni&&Nt){let i=Df.get(n);i||Df.set(n,i=new Map);let s=i.get(t);s||(i.set(t,s=new Yh),s.map=i,s.key=t),s.track()}}function Ss(n,e,t,i,s,r){const o=Df.get(n);if(!o){$l++;return}const a=l=>{l&&l.trigger()};if(E0(),e==="clear")o.forEach(a);else{const l=Xe(n),c=l&&b0(t);if(l&&t==="length"){const u=Number(i);o.forEach((f,h)=>{(h==="length"||h===ql||!Ui(h)&&h>=u)&&a(f)})}else switch((t!==void 0||o.has(void 0))&&a(o.get(t)),c&&a(o.get(ql)),e){case"add":l?c&&a(o.get("length")):(a(o.get(mo)),da(n)&&a(o.get(eg)));break;case"delete":l||(a(o.get(mo)),da(n)&&a(o.get(eg)));break;case"set":da(n)&&a(o.get(mo));break}}T0()}function AC(n,e){const t=Df.get(n);return t&&t.get(e)}function Fo(n){const e=ht(n);return e===n?e:(wn(e,"iterate",ql),vi(n)?e:e.map(mn))}function jh(n){return wn(n=ht(n),"iterate",ql),n}const CC={__proto__:null,[Symbol.iterator](){return hp(this,Symbol.iterator,mn)},concat(...n){return Fo(this).concat(...n.map(e=>Xe(e)?Fo(e):e))},entries(){return hp(this,"entries",n=>(n[1]=mn(n[1]),n))},every(n,e){return fs(this,"every",n,e,void 0,arguments)},filter(n,e){return fs(this,"filter",n,e,t=>t.map(mn),arguments)},find(n,e){return fs(this,"find",n,e,mn,arguments)},findIndex(n,e){return fs(this,"findIndex",n,e,void 0,arguments)},findLast(n,e){return fs(this,"findLast",n,e,mn,arguments)},findLastIndex(n,e){return fs(this,"findLastIndex",n,e,void 0,arguments)},forEach(n,e){return fs(this,"forEach",n,e,void 0,arguments)},includes(...n){return dp(this,"includes",n)},indexOf(...n){return dp(this,"indexOf",n)},join(n){return Fo(this).join(n)},lastIndexOf(...n){return dp(this,"lastIndexOf",n)},map(n,e){return fs(this,"map",n,e,void 0,arguments)},pop(){return Ka(this,"pop")},push(...n){return Ka(this,"push",n)},reduce(n,...e){return Sv(this,"reduce",n,e)},reduceRight(n,...e){return Sv(this,"reduceRight",n,e)},shift(){return Ka(this,"shift")},some(n,e){return fs(this,"some",n,e,void 0,arguments)},splice(...n){return Ka(this,"splice",n)},toReversed(){return Fo(this).toReversed()},toSorted(n){return Fo(this).toSorted(n)},toSpliced(...n){return Fo(this).toSpliced(...n)},unshift(...n){return Ka(this,"unshift",n)},values(){return hp(this,"values",mn)}};function hp(n,e,t){const i=jh(n),s=i[e]();return i!==n&&!vi(n)&&(s._next=s.next,s.next=()=>{const r=s._next();return r.value&&(r.value=t(r.value)),r}),s}const RC=Array.prototype;function fs(n,e,t,i,s,r){const o=jh(n),a=o!==n&&!vi(n),l=o[e];if(l!==RC[e]){const f=l.apply(n,r);return a?mn(f):f}let c=t;o!==n&&(a?c=function(f,h){return t.call(this,mn(f),h,n)}:t.length>2&&(c=function(f,h){return t.call(this,f,h,n)}));const u=l.call(o,c,i);return a&&s?s(u):u}function Sv(n,e,t,i){const s=jh(n);let r=t;return s!==n&&(vi(n)?t.length>3&&(r=function(o,a,l){return t.call(this,o,a,l,n)}):r=function(o,a,l){return t.call(this,o,mn(a),l,n)}),s[e](r,...i)}function dp(n,e,t){const i=ht(n);wn(i,"iterate",ql);const s=i[e](...t);return(s===-1||s===!1)&&A0(t[0])?(t[0]=ht(t[0]),i[e](...t)):s}function Ka(n,e,t=[]){Us(),E0();const i=ht(n)[e].apply(n,t);return T0(),Fs(),i}const PC=_0("__proto__,__v_isRef,__isVue"),oS=new Set(Object.getOwnPropertyNames(Symbol).filter(n=>n!=="arguments"&&n!=="caller").map(n=>Symbol[n]).filter(Ui));function IC(n){Ui(n)||(n=String(n));const e=ht(this);return wn(e,"has",n),e.hasOwnProperty(n)}class aS{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,i){if(t==="__v_skip")return e.__v_skip;const s=this._isReadonly,r=this._isShallow;if(t==="__v_isReactive")return!s;if(t==="__v_isReadonly")return s;if(t==="__v_isShallow")return r;if(t==="__v_raw")return i===(s?r?dS:hS:r?fS:uS).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const o=Xe(e);if(!s){let l;if(o&&(l=CC[t]))return l;if(t==="hasOwnProperty")return IC}const a=Reflect.get(e,t,Lt(e)?e:i);return(Ui(t)?oS.has(t):PC(t))||(s||wn(e,"get",t),r)?a:Lt(a)?o&&b0(t)?a:a.value:Dt(a)?s?Fi(a):xi(a):a}}class lS extends aS{constructor(e=!1){super(!1,e)}set(e,t,i,s){let r=e[t];if(!this._isShallow){const l=vr(r);if(!vi(i)&&!vr(i)&&(r=ht(r),i=ht(i)),!Xe(e)&&Lt(r)&&!Lt(i))return l?!1:(r.value=i,!0)}const o=Xe(e)&&b0(t)?Number(t)n,ru=n=>Reflect.getPrototypeOf(n);function UC(n,e,t){return function(...i){const s=this.__v_raw,r=ht(s),o=da(r),a=n==="entries"||n===Symbol.iterator&&o,l=n==="keys"&&o,c=s[n](...i),u=t?tg:e?Of:mn;return!e&&wn(r,"iterate",l?eg:mo),{next(){const{value:f,done:h}=c.next();return h?{value:f,done:h}:{value:a?[u(f[0]),u(f[1])]:u(f),done:h}},[Symbol.iterator](){return this}}}}function ou(n){return function(...e){return n==="delete"?!1:n==="clear"?void 0:this}}function FC(n,e){const t={get(s){const r=this.__v_raw,o=ht(r),a=ht(s);n||(jn(s,a)&&wn(o,"get",s),wn(o,"get",a));const{has:l}=ru(o),c=e?tg:n?Of:mn;if(l.call(o,s))return c(r.get(s));if(l.call(o,a))return c(r.get(a));r!==o&&r.get(s)},get size(){const s=this.__v_raw;return!n&&wn(ht(s),"iterate",mo),Reflect.get(s,"size",s)},has(s){const r=this.__v_raw,o=ht(r),a=ht(s);return n||(jn(s,a)&&wn(o,"has",s),wn(o,"has",a)),s===a?r.has(s):r.has(s)||r.has(a)},forEach(s,r){const o=this,a=o.__v_raw,l=ht(a),c=e?tg:n?Of:mn;return!n&&wn(l,"iterate",mo),a.forEach((u,f)=>s.call(r,c(u),c(f),o))}};return sn(t,n?{add:ou("add"),set:ou("set"),delete:ou("delete"),clear:ou("clear")}:{add(s){!e&&!vi(s)&&!vr(s)&&(s=ht(s));const r=ht(this);return ru(r).has.call(r,s)||(r.add(s),Ss(r,"add",s,s)),this},set(s,r){!e&&!vi(r)&&!vr(r)&&(r=ht(r));const o=ht(this),{has:a,get:l}=ru(o);let c=a.call(o,s);c||(s=ht(s),c=a.call(o,s));const u=l.call(o,s);return o.set(s,r),c?jn(r,u)&&Ss(o,"set",s,r):Ss(o,"add",s,r),this},delete(s){const r=ht(this),{has:o,get:a}=ru(r);let l=o.call(r,s);l||(s=ht(s),l=o.call(r,s)),a&&a.call(r,s);const c=r.delete(s);return l&&Ss(r,"delete",s,void 0),c},clear(){const s=ht(this),r=s.size!==0,o=s.clear();return r&&Ss(s,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(s=>{t[s]=UC(s,n,e)}),t}function Kh(n,e){const t=FC(n,e);return(i,s,r)=>s==="__v_isReactive"?!n:s==="__v_isReadonly"?n:s==="__v_raw"?i:Reflect.get(Et(t,s)&&s in i?t:i,s,r)}const kC={get:Kh(!1,!1)},BC={get:Kh(!1,!0)},zC={get:Kh(!0,!1)},VC={get:Kh(!0,!0)},uS=new WeakMap,fS=new WeakMap,hS=new WeakMap,dS=new WeakMap;function HC(n){switch(n){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function GC(n){return n.__v_skip||!Object.isExtensible(n)?0:HC(dC(n))}function xi(n){return vr(n)?n:Zh(n,!1,LC,kC,uS)}function pS(n){return Zh(n,!1,OC,BC,fS)}function Fi(n){return Zh(n,!0,DC,zC,hS)}function mS(n){return Zh(n,!0,NC,VC,dS)}function Zh(n,e,t,i,s){if(!Dt(n)||n.__v_raw&&!(e&&n.__v_isReactive))return n;const r=GC(n);if(r===0)return n;const o=s.get(n);if(o)return o;const a=new Proxy(n,r===2?i:t);return s.set(n,a),a}function Ls(n){return vr(n)?Ls(n.__v_raw):!!(n&&n.__v_isReactive)}function vr(n){return!!(n&&n.__v_isReadonly)}function vi(n){return!!(n&&n.__v_isShallow)}function A0(n){return n?!!n.__v_raw:!1}function ht(n){const e=n&&n.__v_raw;return e?ht(e):n}function C0(n){return!Et(n,"__v_skip")&&Object.isExtensible(n)&&qM(n,"__v_skip",!0),n}const mn=n=>Dt(n)?xi(n):n,Of=n=>Dt(n)?Fi(n):n;function Lt(n){return n?n.__v_isRef===!0:!1}function nt(n){return gS(n,!1)}function Oe(n){return gS(n,!0)}function gS(n,e){return Lt(n)?n:new WC(n,e)}class WC{constructor(e,t){this.dep=new Yh,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:ht(e),this._value=t?e:mn(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,i=this.__v_isShallow||vi(e)||vr(e);e=i?e:ht(e),jn(e,t)&&(this._rawValue=e,this._value=i?e:mn(e),this.dep.trigger())}}function Ft(n){return Lt(n)?n.value:n}function rt(n){return et(n)?n():Ft(n)}const XC={get:(n,e,t)=>e==="__v_raw"?n:Ft(Reflect.get(n,e,t)),set:(n,e,t,i)=>{const s=n[e];return Lt(s)&&!Lt(t)?(s.value=t,!0):Reflect.set(n,e,t,i)}};function _S(n){return Ls(n)?n:new Proxy(n,XC)}class $C{constructor(e){this.__v_isRef=!0,this._value=void 0;const t=this.dep=new Yh,{get:i,set:s}=e(t.track.bind(t),t.trigger.bind(t));this._get=i,this._set=s}get value(){return this._value=this._get()}set value(e){this._set(e)}}function R0(n){return new $C(n)}function vS(n){const e=Xe(n)?new Array(n.length):{};for(const t in n)e[t]=bS(n,t);return e}class qC{constructor(e,t,i){this._object=e,this._key=t,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0}get value(){const e=this._object[this._key];return this._value=e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return AC(ht(this._object),this._key)}}class YC{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function yS(n,e,t){return Lt(n)?n:et(n)?new YC(n):Dt(n)&&arguments.length>1?bS(n,e,t):nt(n)}function bS(n,e,t){const i=n[e];return Lt(i)?i:new qC(n,e,t)}class jC{constructor(e,t,i){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Yh(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=$l-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&Nt!==this)return eS(this,!0),!0}get value(){const e=this.dep.track();return iS(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function KC(n,e,t=!1){let i,s;return et(n)?i=n:(i=n.get,s=n.set),new jC(i,s,t)}const au={},Nf=new WeakMap;let io;function ZC(n,e=!1,t=io){if(t){let i=Nf.get(t);i||Nf.set(t,i=[]),i.push(n)}}function JC(n,e,t=bt){const{immediate:i,deep:s,once:r,scheduler:o,augmentJob:a,call:l}=t,c=y=>s?y:vi(y)||s===!1||s===0?Es(y,1):Es(y);let u,f,h,d,p=!1,_=!1;if(Lt(n)?(f=()=>n.value,p=vi(n)):Ls(n)?(f=()=>c(n),p=!0):Xe(n)?(_=!0,p=n.some(y=>Ls(y)||vi(y)),f=()=>n.map(y=>{if(Lt(y))return y.value;if(Ls(y))return c(y);if(et(y))return l?l(y,2):y()})):et(n)?e?f=l?()=>l(n,2):n:f=()=>{if(h){Us();try{h()}finally{Fs()}}const y=io;io=u;try{return l?l(n,3,[d]):n(d)}finally{io=y}}:f=es,e&&s){const y=f,T=s===!0?1/0:s;f=()=>Es(y(),T)}const g=qh(),m=()=>{u.stop(),g&&g.active&&y0(g.effects,u)};if(r&&e){const y=e;e=(...T)=>{y(...T),m()}}let v=_?new Array(n.length).fill(au):au;const b=y=>{if(!(!(u.flags&1)||!u.dirty&&!y))if(e){const T=u.run();if(s||p||(_?T.some((w,S)=>jn(w,v[S])):jn(T,v))){h&&h();const w=io;io=u;try{const S=[T,v===au?void 0:_&&v[0]===au?[]:v,d];v=T,l?l(e,3,S):e(...S)}finally{io=w}}}else u.run()};return a&&a(b),u=new JM(f),u.scheduler=o?()=>o(b,!1):b,d=y=>ZC(y,!1,u),h=u.onStop=()=>{const y=Nf.get(u);if(y){if(l)l(y,4);else for(const T of y)T();Nf.delete(u)}},e?i?b(!0):v=u.run():o?o(b.bind(null,!0),!0):u.run(),m.pause=u.pause.bind(u),m.resume=u.resume.bind(u),m.stop=m,m}function Es(n,e=1/0,t){if(e<=0||!Dt(n)||n.__v_skip||(t=t||new Set,t.has(n)))return n;if(t.add(n),e--,Lt(n))Es(n.value,e,t);else if(Xe(n))for(let i=0;i{Es(i,e,t)});else if($M(n)){for(const i in n)Es(n[i],e,t);for(const i of Object.getOwnPropertySymbols(n))Object.prototype.propertyIsEnumerable.call(n,i)&&Es(n[i],e,t)}return n}/** +**/let Tn;class ZM{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Tn,!e&&Tn&&(this.index=(Tn.scopes||(Tn.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e0&&--this._on===0&&(Tn=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let t,i;for(t=0,i=this.effects.length;t0)return;if(Ml){let e=Ml;for(Ml=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let n;for(;xl;){let e=xl;for(xl=void 0;e;){const t=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){n||(n=i)}e=t}}if(n)throw n}function tS(n){for(let e=n.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function nS(n){let e,t=n.depsTail,i=t;for(;i;){const s=i.prevDep;i.version===-1?(i===t&&(t=s),A0(i),TC(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=s}n.deps=e,n.depsTail=t}function eg(n){for(let e=n.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(iS(e.dep.computed)||e.dep.version!==e.version))return!0;return!!n._dirty}function iS(n){if(n.flags&4&&!(n.flags&16)||(n.flags&=-17,n.globalVersion===$l)||(n.globalVersion=$l,!n.isSSR&&n.flags&128&&(!n.deps&&!n._dirty||!eg(n))))return;n.flags|=2;const e=n.dep,t=Nt,i=Ni;Nt=n,Ni=!0;try{tS(n);const s=n.fn(n._value);(e.version===0||jn(s,n._value))&&(n.flags|=128,n._value=s,e.version++)}catch(s){throw e.version++,s}finally{Nt=t,Ni=i,nS(n),n.flags&=-3}}function A0(n,e=!1){const{dep:t,prevSub:i,nextSub:s}=n;if(i&&(i.nextSub=s,n.prevSub=void 0),s&&(s.prevSub=i,n.nextSub=void 0),t.subs===n&&(t.subs=i,!i&&t.computed)){t.computed.flags&=-5;for(let r=t.computed.deps;r;r=r.nextDep)A0(r,!0)}!e&&!--t.sc&&t.map&&t.map.delete(t.key)}function TC(n){const{prevDep:e,nextDep:t}=n;e&&(e.nextDep=t,n.prevDep=void 0),t&&(t.prevDep=e,n.nextDep=void 0)}let Ni=!0;const sS=[];function Us(){sS.push(Ni),Ni=!1}function Fs(){const n=sS.pop();Ni=n===void 0?!0:n}function Sv(n){const{cleanup:e}=n;if(n.cleanup=void 0,e){const t=Nt;Nt=void 0;try{e()}finally{Nt=t}}}let $l=0;class wC{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Yh{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!Nt||!Ni||Nt===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==Nt)t=this.activeLink=new wC(Nt,this),Nt.deps?(t.prevDep=Nt.depsTail,Nt.depsTail.nextDep=t,Nt.depsTail=t):Nt.deps=Nt.depsTail=t,rS(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){const i=t.nextDep;i.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=i),t.prevDep=Nt.depsTail,t.nextDep=void 0,Nt.depsTail.nextDep=t,Nt.depsTail=t,Nt.deps===t&&(Nt.deps=i)}return t}trigger(e){this.version++,$l++,this.notify(e)}notify(e){T0();try{for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{w0()}}}function rS(n){if(n.dep.sc++,n.sub.flags&4){const e=n.dep.computed;if(e&&!n.dep.subs){e.flags|=20;for(let i=e.deps;i;i=i.nextDep)rS(i)}const t=n.dep.subs;t!==n&&(n.prevSub=t,t&&(t.nextSub=n)),n.dep.subs=n}}const Df=new WeakMap,mo=Symbol(""),tg=Symbol(""),ql=Symbol("");function wn(n,e,t){if(Ni&&Nt){let i=Df.get(n);i||Df.set(n,i=new Map);let s=i.get(t);s||(i.set(t,s=new Yh),s.map=i,s.key=t),s.track()}}function Ss(n,e,t,i,s,r){const o=Df.get(n);if(!o){$l++;return}const a=l=>{l&&l.trigger()};if(T0(),e==="clear")o.forEach(a);else{const l=Xe(n),c=l&&x0(t);if(l&&t==="length"){const u=Number(i);o.forEach((f,h)=>{(h==="length"||h===ql||!Ui(h)&&h>=u)&&a(f)})}else switch((t!==void 0||o.has(void 0))&&a(o.get(t)),c&&a(o.get(ql)),e){case"add":l?c&&a(o.get("length")):(a(o.get(mo)),da(n)&&a(o.get(tg)));break;case"delete":l||(a(o.get(mo)),da(n)&&a(o.get(tg)));break;case"set":da(n)&&a(o.get(mo));break}}w0()}function AC(n,e){const t=Df.get(n);return t&&t.get(e)}function Fo(n){const e=ht(n);return e===n?e:(wn(e,"iterate",ql),vi(n)?e:e.map(mn))}function jh(n){return wn(n=ht(n),"iterate",ql),n}const CC={__proto__:null,[Symbol.iterator](){return hp(this,Symbol.iterator,mn)},concat(...n){return Fo(this).concat(...n.map(e=>Xe(e)?Fo(e):e))},entries(){return hp(this,"entries",n=>(n[1]=mn(n[1]),n))},every(n,e){return fs(this,"every",n,e,void 0,arguments)},filter(n,e){return fs(this,"filter",n,e,t=>t.map(mn),arguments)},find(n,e){return fs(this,"find",n,e,mn,arguments)},findIndex(n,e){return fs(this,"findIndex",n,e,void 0,arguments)},findLast(n,e){return fs(this,"findLast",n,e,mn,arguments)},findLastIndex(n,e){return fs(this,"findLastIndex",n,e,void 0,arguments)},forEach(n,e){return fs(this,"forEach",n,e,void 0,arguments)},includes(...n){return dp(this,"includes",n)},indexOf(...n){return dp(this,"indexOf",n)},join(n){return Fo(this).join(n)},lastIndexOf(...n){return dp(this,"lastIndexOf",n)},map(n,e){return fs(this,"map",n,e,void 0,arguments)},pop(){return Ka(this,"pop")},push(...n){return Ka(this,"push",n)},reduce(n,...e){return Ev(this,"reduce",n,e)},reduceRight(n,...e){return Ev(this,"reduceRight",n,e)},shift(){return Ka(this,"shift")},some(n,e){return fs(this,"some",n,e,void 0,arguments)},splice(...n){return Ka(this,"splice",n)},toReversed(){return Fo(this).toReversed()},toSorted(n){return Fo(this).toSorted(n)},toSpliced(...n){return Fo(this).toSpliced(...n)},unshift(...n){return Ka(this,"unshift",n)},values(){return hp(this,"values",mn)}};function hp(n,e,t){const i=jh(n),s=i[e]();return i!==n&&!vi(n)&&(s._next=s.next,s.next=()=>{const r=s._next();return r.value&&(r.value=t(r.value)),r}),s}const RC=Array.prototype;function fs(n,e,t,i,s,r){const o=jh(n),a=o!==n&&!vi(n),l=o[e];if(l!==RC[e]){const f=l.apply(n,r);return a?mn(f):f}let c=t;o!==n&&(a?c=function(f,h){return t.call(this,mn(f),h,n)}:t.length>2&&(c=function(f,h){return t.call(this,f,h,n)}));const u=l.call(o,c,i);return a&&s?s(u):u}function Ev(n,e,t,i){const s=jh(n);let r=t;return s!==n&&(vi(n)?t.length>3&&(r=function(o,a,l){return t.call(this,o,a,l,n)}):r=function(o,a,l){return t.call(this,o,mn(a),l,n)}),s[e](r,...i)}function dp(n,e,t){const i=ht(n);wn(i,"iterate",ql);const s=i[e](...t);return(s===-1||s===!1)&&C0(t[0])?(t[0]=ht(t[0]),i[e](...t)):s}function Ka(n,e,t=[]){Us(),T0();const i=ht(n)[e].apply(n,t);return w0(),Fs(),i}const PC=v0("__proto__,__v_isRef,__isVue"),oS=new Set(Object.getOwnPropertyNames(Symbol).filter(n=>n!=="arguments"&&n!=="caller").map(n=>Symbol[n]).filter(Ui));function IC(n){Ui(n)||(n=String(n));const e=ht(this);return wn(e,"has",n),e.hasOwnProperty(n)}class aS{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,i){if(t==="__v_skip")return e.__v_skip;const s=this._isReadonly,r=this._isShallow;if(t==="__v_isReactive")return!s;if(t==="__v_isReadonly")return s;if(t==="__v_isShallow")return r;if(t==="__v_raw")return i===(s?r?dS:hS:r?fS:uS).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const o=Xe(e);if(!s){let l;if(o&&(l=CC[t]))return l;if(t==="hasOwnProperty")return IC}const a=Reflect.get(e,t,Lt(e)?e:i);return(Ui(t)?oS.has(t):PC(t))||(s||wn(e,"get",t),r)?a:Lt(a)?o&&x0(t)?a:a.value:Dt(a)?s?Fi(a):xi(a):a}}class lS extends aS{constructor(e=!1){super(!1,e)}set(e,t,i,s){let r=e[t];if(!this._isShallow){const l=vr(r);if(!vi(i)&&!vr(i)&&(r=ht(r),i=ht(i)),!Xe(e)&&Lt(r)&&!Lt(i))return l?!1:(r.value=i,!0)}const o=Xe(e)&&x0(t)?Number(t)n,ru=n=>Reflect.getPrototypeOf(n);function UC(n,e,t){return function(...i){const s=this.__v_raw,r=ht(s),o=da(r),a=n==="entries"||n===Symbol.iterator&&o,l=n==="keys"&&o,c=s[n](...i),u=t?ng:e?Of:mn;return!e&&wn(r,"iterate",l?tg:mo),{next(){const{value:f,done:h}=c.next();return h?{value:f,done:h}:{value:a?[u(f[0]),u(f[1])]:u(f),done:h}},[Symbol.iterator](){return this}}}}function ou(n){return function(...e){return n==="delete"?!1:n==="clear"?void 0:this}}function FC(n,e){const t={get(s){const r=this.__v_raw,o=ht(r),a=ht(s);n||(jn(s,a)&&wn(o,"get",s),wn(o,"get",a));const{has:l}=ru(o),c=e?ng:n?Of:mn;if(l.call(o,s))return c(r.get(s));if(l.call(o,a))return c(r.get(a));r!==o&&r.get(s)},get size(){const s=this.__v_raw;return!n&&wn(ht(s),"iterate",mo),Reflect.get(s,"size",s)},has(s){const r=this.__v_raw,o=ht(r),a=ht(s);return n||(jn(s,a)&&wn(o,"has",s),wn(o,"has",a)),s===a?r.has(s):r.has(s)||r.has(a)},forEach(s,r){const o=this,a=o.__v_raw,l=ht(a),c=e?ng:n?Of:mn;return!n&&wn(l,"iterate",mo),a.forEach((u,f)=>s.call(r,c(u),c(f),o))}};return sn(t,n?{add:ou("add"),set:ou("set"),delete:ou("delete"),clear:ou("clear")}:{add(s){!e&&!vi(s)&&!vr(s)&&(s=ht(s));const r=ht(this);return ru(r).has.call(r,s)||(r.add(s),Ss(r,"add",s,s)),this},set(s,r){!e&&!vi(r)&&!vr(r)&&(r=ht(r));const o=ht(this),{has:a,get:l}=ru(o);let c=a.call(o,s);c||(s=ht(s),c=a.call(o,s));const u=l.call(o,s);return o.set(s,r),c?jn(r,u)&&Ss(o,"set",s,r):Ss(o,"add",s,r),this},delete(s){const r=ht(this),{has:o,get:a}=ru(r);let l=o.call(r,s);l||(s=ht(s),l=o.call(r,s)),a&&a.call(r,s);const c=r.delete(s);return l&&Ss(r,"delete",s,void 0),c},clear(){const s=ht(this),r=s.size!==0,o=s.clear();return r&&Ss(s,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(s=>{t[s]=UC(s,n,e)}),t}function Kh(n,e){const t=FC(n,e);return(i,s,r)=>s==="__v_isReactive"?!n:s==="__v_isReadonly"?n:s==="__v_raw"?i:Reflect.get(Et(t,s)&&s in i?t:i,s,r)}const kC={get:Kh(!1,!1)},BC={get:Kh(!1,!0)},zC={get:Kh(!0,!1)},VC={get:Kh(!0,!0)},uS=new WeakMap,fS=new WeakMap,hS=new WeakMap,dS=new WeakMap;function HC(n){switch(n){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function GC(n){return n.__v_skip||!Object.isExtensible(n)?0:HC(dC(n))}function xi(n){return vr(n)?n:Zh(n,!1,LC,kC,uS)}function pS(n){return Zh(n,!1,OC,BC,fS)}function Fi(n){return Zh(n,!0,DC,zC,hS)}function mS(n){return Zh(n,!0,NC,VC,dS)}function Zh(n,e,t,i,s){if(!Dt(n)||n.__v_raw&&!(e&&n.__v_isReactive))return n;const r=GC(n);if(r===0)return n;const o=s.get(n);if(o)return o;const a=new Proxy(n,r===2?i:t);return s.set(n,a),a}function Ls(n){return vr(n)?Ls(n.__v_raw):!!(n&&n.__v_isReactive)}function vr(n){return!!(n&&n.__v_isReadonly)}function vi(n){return!!(n&&n.__v_isShallow)}function C0(n){return n?!!n.__v_raw:!1}function ht(n){const e=n&&n.__v_raw;return e?ht(e):n}function R0(n){return!Et(n,"__v_skip")&&Object.isExtensible(n)&&qM(n,"__v_skip",!0),n}const mn=n=>Dt(n)?xi(n):n,Of=n=>Dt(n)?Fi(n):n;function Lt(n){return n?n.__v_isRef===!0:!1}function nt(n){return gS(n,!1)}function Oe(n){return gS(n,!0)}function gS(n,e){return Lt(n)?n:new WC(n,e)}class WC{constructor(e,t){this.dep=new Yh,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:ht(e),this._value=t?e:mn(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,i=this.__v_isShallow||vi(e)||vr(e);e=i?e:ht(e),jn(e,t)&&(this._rawValue=e,this._value=i?e:mn(e),this.dep.trigger())}}function Ft(n){return Lt(n)?n.value:n}function rt(n){return et(n)?n():Ft(n)}const XC={get:(n,e,t)=>e==="__v_raw"?n:Ft(Reflect.get(n,e,t)),set:(n,e,t,i)=>{const s=n[e];return Lt(s)&&!Lt(t)?(s.value=t,!0):Reflect.set(n,e,t,i)}};function _S(n){return Ls(n)?n:new Proxy(n,XC)}class $C{constructor(e){this.__v_isRef=!0,this._value=void 0;const t=this.dep=new Yh,{get:i,set:s}=e(t.track.bind(t),t.trigger.bind(t));this._get=i,this._set=s}get value(){return this._value=this._get()}set value(e){this._set(e)}}function P0(n){return new $C(n)}function vS(n){const e=Xe(n)?new Array(n.length):{};for(const t in n)e[t]=bS(n,t);return e}class qC{constructor(e,t,i){this._object=e,this._key=t,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0}get value(){const e=this._object[this._key];return this._value=e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return AC(ht(this._object),this._key)}}class YC{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function yS(n,e,t){return Lt(n)?n:et(n)?new YC(n):Dt(n)&&arguments.length>1?bS(n,e,t):nt(n)}function bS(n,e,t){const i=n[e];return Lt(i)?i:new qC(n,e,t)}class jC{constructor(e,t,i){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Yh(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=$l-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&Nt!==this)return eS(this,!0),!0}get value(){const e=this.dep.track();return iS(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function KC(n,e,t=!1){let i,s;return et(n)?i=n:(i=n.get,s=n.set),new jC(i,s,t)}const au={},Nf=new WeakMap;let io;function ZC(n,e=!1,t=io){if(t){let i=Nf.get(t);i||Nf.set(t,i=[]),i.push(n)}}function JC(n,e,t=bt){const{immediate:i,deep:s,once:r,scheduler:o,augmentJob:a,call:l}=t,c=y=>s?y:vi(y)||s===!1||s===0?Es(y,1):Es(y);let u,f,h,d,p=!1,_=!1;if(Lt(n)?(f=()=>n.value,p=vi(n)):Ls(n)?(f=()=>c(n),p=!0):Xe(n)?(_=!0,p=n.some(y=>Ls(y)||vi(y)),f=()=>n.map(y=>{if(Lt(y))return y.value;if(Ls(y))return c(y);if(et(y))return l?l(y,2):y()})):et(n)?e?f=l?()=>l(n,2):n:f=()=>{if(h){Us();try{h()}finally{Fs()}}const y=io;io=u;try{return l?l(n,3,[d]):n(d)}finally{io=y}}:f=es,e&&s){const y=f,T=s===!0?1/0:s;f=()=>Es(y(),T)}const g=qh(),m=()=>{u.stop(),g&&g.active&&b0(g.effects,u)};if(r&&e){const y=e;e=(...T)=>{y(...T),m()}}let v=_?new Array(n.length).fill(au):au;const b=y=>{if(!(!(u.flags&1)||!u.dirty&&!y))if(e){const T=u.run();if(s||p||(_?T.some((w,S)=>jn(w,v[S])):jn(T,v))){h&&h();const w=io;io=u;try{const S=[T,v===au?void 0:_&&v[0]===au?[]:v,d];v=T,l?l(e,3,S):e(...S)}finally{io=w}}}else u.run()};return a&&a(b),u=new JM(f),u.scheduler=o?()=>o(b,!1):b,d=y=>ZC(y,!1,u),h=u.onStop=()=>{const y=Nf.get(u);if(y){if(l)l(y,4);else for(const T of y)T();Nf.delete(u)}},e?i?b(!0):v=u.run():o?o(b.bind(null,!0),!0):u.run(),m.pause=u.pause.bind(u),m.resume=u.resume.bind(u),m.stop=m,m}function Es(n,e=1/0,t){if(e<=0||!Dt(n)||n.__v_skip||(t=t||new Set,t.has(n)))return n;if(t.add(n),e--,Lt(n))Es(n.value,e,t);else if(Xe(n))for(let i=0;i{Es(i,e,t)});else if($M(n)){for(const i in n)Es(n[i],e,t);for(const i of Object.getOwnPropertySymbols(n))Object.prototype.propertyIsEnumerable.call(n,i)&&Es(n[i],e,t)}return n}/** * @vue/runtime-core v3.5.16 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function Pc(n,e,t,i){try{return i?n(...i):n()}catch(s){Jh(s,e,t)}}function ki(n,e,t,i){if(et(n)){const s=Pc(n,e,t,i);return s&&WM(s)&&s.catch(r=>{Jh(r,e,t)}),s}if(Xe(n)){const s=[];for(let r=0;r>>1,s=kn[i],r=Yl(s);r=Yl(t)?kn.push(n):kn.splice(e2(e),0,n),n.flags|=1,MS()}}function MS(){Uf||(Uf=xS.then(ES))}function t2(n){Xe(n)?pa.push(...n):or&&n.id===-1?or.splice(ia+1,0,n):n.flags&1||(pa.push(n),n.flags|=1),MS()}function Ev(n,e,t=Yi+1){for(;tYl(t)-Yl(i));if(pa.length=0,or){or.push(...e);return}for(or=e,ia=0;ian.id==null?n.flags&2?-1:1/0:n.id;function ES(n){try{for(Yi=0;YiI0;function I0(n,e=tn,t){if(!e||n._n)return n;const i=(...s)=>{i._d&&Fv(-1);const r=Ff(e);let o;try{o=n(...s)}finally{Ff(r),i._d&&Fv(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function dG(n,e){if(tn===null)return n;const t=id(tn),i=n.dirs||(n.dirs=[]);for(let s=0;sn.__isTeleport,Sl=n=>n&&(n.disabled||n.disabled===""),Tv=n=>n&&(n.defer||n.defer===""),wv=n=>typeof SVGElement<"u"&&n instanceof SVGElement,Av=n=>typeof MathMLElement=="function"&&n instanceof MathMLElement,ng=(n,e)=>{const t=n&&n.to;return Bt(t)?e?e(t):null:t},AS={name:"Teleport",__isTeleport:!0,process(n,e,t,i,s,r,o,a,l,c){const{mc:u,pc:f,pbc:h,o:{insert:d,querySelector:p,createText:_,createComment:g}}=c,m=Sl(e.props);let{shapeFlag:v,children:b,dynamicChildren:y}=e;if(n==null){const T=e.el=_(""),w=e.anchor=_("");d(T,t,i),d(w,t,i);const S=(M,E)=>{v&16&&(s&&s.isCE&&(s.ce._teleportTarget=M),u(b,M,E,s,r,o,a,l))},P=()=>{const M=e.target=ng(e.props,p),E=CS(M,e,_,d);M&&(o!=="svg"&&wv(M)?o="svg":o!=="mathml"&&Av(M)&&(o="mathml"),m||(S(M,E),vf(e,!1)))};m&&(S(t,w),vf(e,!0)),Tv(e.props)?(e.el.__isMounted=!1,Un(()=>{P(),delete e.el.__isMounted},r)):P()}else{if(Tv(e.props)&&n.el.__isMounted===!1){Un(()=>{AS.process(n,e,t,i,s,r,o,a,l,c)},r);return}e.el=n.el,e.targetStart=n.targetStart;const T=e.anchor=n.anchor,w=e.target=n.target,S=e.targetAnchor=n.targetAnchor,P=Sl(n.props),M=P?t:w,E=P?T:S;if(o==="svg"||wv(w)?o="svg":(o==="mathml"||Av(w))&&(o="mathml"),y?(h(n.dynamicChildren,y,M,s,r,o,a),F0(n,e,!0)):l||f(n,e,M,E,s,r,o,a,!1),m)P?e.props&&n.props&&e.props.to!==n.props.to&&(e.props.to=n.props.to):lu(e,t,T,c,1);else if((e.props&&e.props.to)!==(n.props&&n.props.to)){const D=e.target=ng(e.props,p);D&&lu(e,D,null,c,0)}else P&&lu(e,w,S,c,1);vf(e,m)}},remove(n,e,t,{um:i,o:{remove:s}},r){const{shapeFlag:o,children:a,anchor:l,targetStart:c,targetAnchor:u,target:f,props:h}=n;if(f&&(s(c),s(u)),r&&s(l),o&16){const d=r||!Sl(h);for(let p=0;p{n.isMounted=!0}),US(()=>{n.isUnmounting=!0}),n}const hi=[Function,Array],RS={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:hi,onEnter:hi,onAfterEnter:hi,onEnterCancelled:hi,onBeforeLeave:hi,onLeave:hi,onAfterLeave:hi,onLeaveCancelled:hi,onBeforeAppear:hi,onAppear:hi,onAfterAppear:hi,onAppearCancelled:hi},PS=n=>{const e=n.subTree;return e.component?PS(e.component):e},s2={name:"BaseTransition",props:RS,setup(n,{slots:e}){const t=Rn(),i=i2();return()=>{const s=e.default&&DS(e.default(),!0);if(!s||!s.length)return;const r=IS(s),o=ht(n),{mode:a}=o;if(i.isLeaving)return pp(r);const l=Cv(r);if(!l)return pp(r);let c=ig(l,o,i,t,f=>c=f);l.type!==An&&jl(l,c);let u=t.subTree&&Cv(t.subTree);if(u&&u.type!==An&&!ao(l,u)&&PS(t).type!==An){let f=ig(u,o,i,t);if(jl(u,f),a==="out-in"&&l.type!==An)return i.isLeaving=!0,f.afterLeave=()=>{i.isLeaving=!1,t.job.flags&8||t.update(),delete f.afterLeave,u=void 0},pp(r);a==="in-out"&&l.type!==An?f.delayLeave=(h,d,p)=>{const _=LS(i,u);_[String(u.key)]=u,h[ar]=()=>{d(),h[ar]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{p(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return r}}};function IS(n){let e=n[0];if(n.length>1){for(const t of n)if(t.type!==An){e=t;break}}return e}const r2=s2;function LS(n,e){const{leavingVNodes:t}=n;let i=t.get(e.type);return i||(i=Object.create(null),t.set(e.type,i)),i}function ig(n,e,t,i,s){const{appear:r,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:f,onBeforeLeave:h,onLeave:d,onAfterLeave:p,onLeaveCancelled:_,onBeforeAppear:g,onAppear:m,onAfterAppear:v,onAppearCancelled:b}=e,y=String(n.key),T=LS(t,n),w=(M,E)=>{M&&ki(M,i,9,E)},S=(M,E)=>{const D=E[1];w(M,E),Xe(M)?M.every(B=>B.length<=1)&&D():M.length<=1&&D()},P={mode:o,persisted:a,beforeEnter(M){let E=l;if(!t.isMounted)if(r)E=g||l;else return;M[ar]&&M[ar](!0);const D=T[y];D&&ao(n,D)&&D.el[ar]&&D.el[ar](),w(E,[M])},enter(M){let E=c,D=u,B=f;if(!t.isMounted)if(r)E=m||c,D=v||u,B=b||f;else return;let z=!1;const V=M[cu]=Q=>{z||(z=!0,Q?w(B,[M]):w(D,[M]),P.delayedLeave&&P.delayedLeave(),M[cu]=void 0)};E?S(E,[M,V]):V()},leave(M,E){const D=String(n.key);if(M[cu]&&M[cu](!0),t.isUnmounting)return E();w(h,[M]);let B=!1;const z=M[ar]=V=>{B||(B=!0,E(),V?w(_,[M]):w(p,[M]),M[ar]=void 0,T[D]===n&&delete T[D])};T[D]=n,d?S(d,[M,z]):z()},clone(M){const E=ig(M,e,t,i,s);return s&&s(E),E}};return P}function pp(n){if(ed(n))return n=yr(n),n.children=null,n}function Cv(n){if(!ed(n))return wS(n.type)&&n.children?IS(n.children):n;if(n.component)return n.component.subTree;const{shapeFlag:e,children:t}=n;if(t){if(e&16)return t[0];if(e&32&&et(t.default))return t.default()}}function jl(n,e){n.shapeFlag&6&&n.component?(n.transition=e,jl(n.component.subTree,e)):n.shapeFlag&128?(n.ssContent.transition=e.clone(n.ssContent),n.ssFallback.transition=e.clone(n.ssFallback)):n.transition=e}function DS(n,e=!1,t){let i=[],s=0;for(let r=0;r1)for(let r=0;rkf(p,e&&(Xe(e)?e[_]:e),t,i,s));return}if(ma(i)&&!s){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&kf(n,e,t,i.component.subTree);return}const r=i.shapeFlag&4?id(i.component):i.el,o=s?null:r,{i:a,r:l}=n,c=e&&e.r,u=a.refs===bt?a.refs={}:a.refs,f=a.setupState,h=ht(f),d=f===bt?()=>!1:p=>Et(h,p);if(c!=null&&c!==l&&(Bt(c)?(u[c]=null,d(c)&&(f[c]=null)):Lt(c)&&(c.value=null)),et(l))Pc(l,a,12,[o,u]);else{const p=Bt(l),_=Lt(l);if(p||_){const g=()=>{if(n.f){const m=p?d(l)?f[l]:u[l]:l.value;s?Xe(m)&&y0(m,r):Xe(m)?m.includes(r)||m.push(r):p?(u[l]=[r],d(l)&&(f[l]=u[l])):(l.value=[r],n.k&&(u[n.k]=l.value))}else p?(u[l]=o,d(l)&&(f[l]=o)):_&&(l.value=o,n.k&&(u[n.k]=o))};o?(g.id=-1,Un(g,t)):g()}}}$h().requestIdleCallback;$h().cancelIdleCallback;const ma=n=>!!n.type.__asyncLoader,ed=n=>n.type.__isKeepAlive;function o2(n,e){NS(n,"a",e)}function a2(n,e){NS(n,"da",e)}function NS(n,e,t=un){const i=n.__wdc||(n.__wdc=()=>{let s=t;for(;s;){if(s.isDeactivated)return;s=s.parent}return n()});if(td(e,i,t),t){let s=t.parent;for(;s&&s.parent;)ed(s.parent.vnode)&&l2(i,e,t,s),s=s.parent}}function l2(n,e,t,i){const s=td(e,n,i,!0);rs(()=>{y0(i[e],s)},t)}function td(n,e,t=un,i=!1){if(t){const s=t[n]||(t[n]=[]),r=e.__weh||(e.__weh=(...o)=>{Us();const a=Nc(t),l=ki(e,t,n,o);return a(),Fs(),l});return i?s.unshift(r):s.push(r),r}}const Ws=n=>(e,t=un)=>{(!ec||n==="sp")&&td(n,(...i)=>e(...i),t)},c2=Ws("bm"),Gn=Ws("m"),u2=Ws("bu"),f2=Ws("u"),US=Ws("bum"),rs=Ws("um"),h2=Ws("sp"),d2=Ws("rtg"),p2=Ws("rtc");function m2(n,e=un){td("ec",n,e)}const L0="components",g2="directives";function gG(n,e){return D0(L0,n,!0,e)||n}const FS=Symbol.for("v-ndc");function _2(n){return Bt(n)?D0(L0,n,!1)||n:n||FS}function _G(n){return D0(g2,n)}function D0(n,e,t=!0,i=!1){const s=tn||un;if(s){const r=s.type;if(n===L0){const a=rR(r,!1);if(a&&(a===e||a===ai(e)||a===Xh(ai(e))))return r}const o=Rv(s[n]||r[n],e)||Rv(s.appContext[n],e);return!o&&i?r:o}}function Rv(n,e){return n&&(n[e]||n[ai(e)]||n[Xh(ai(e))])}function v2(n,e,t,i){let s;const r=t,o=Xe(n);if(o||Bt(n)){const a=o&&Ls(n);let l=!1,c=!1;a&&(l=!vi(n),c=vr(n),n=jh(n)),s=new Array(n.length);for(let u=0,f=n.length;ue(a,l,void 0,r));else{const a=Object.keys(n);s=new Array(a.length);for(let l=0,c=a.length;lQl(e)?!(e.type===An||e.type===Zt&&!kS(e.children)):!0)?n:null}function vG(n,e){const t={};for(const i in n)t[gf(i)]=n[i];return t}const sg=n=>n?r1(n)?id(n):sg(n.parent):null,El=sn(Object.create(null),{$:n=>n,$el:n=>n.vnode.el,$data:n=>n.data,$props:n=>n.props,$attrs:n=>n.attrs,$slots:n=>n.slots,$refs:n=>n.refs,$parent:n=>sg(n.parent),$root:n=>sg(n.root),$host:n=>n.ce,$emit:n=>n.emit,$options:n=>VS(n),$forceUpdate:n=>n.f||(n.f=()=>{P0(n.update)}),$nextTick:n=>n.n||(n.n=Ar.bind(n.proxy)),$watch:n=>z2.bind(n)}),mp=(n,e)=>n!==bt&&!n.__isScriptSetup&&Et(n,e),b2={get({_:n},e){if(e==="__v_skip")return!0;const{ctx:t,setupState:i,data:s,props:r,accessCache:o,type:a,appContext:l}=n;let c;if(e[0]!=="$"){const d=o[e];if(d!==void 0)switch(d){case 1:return i[e];case 2:return s[e];case 4:return t[e];case 3:return r[e]}else{if(mp(i,e))return o[e]=1,i[e];if(s!==bt&&Et(s,e))return o[e]=2,s[e];if((c=n.propsOptions[0])&&Et(c,e))return o[e]=3,r[e];if(t!==bt&&Et(t,e))return o[e]=4,t[e];rg&&(o[e]=0)}}const u=El[e];let f,h;if(u)return e==="$attrs"&&wn(n.attrs,"get",""),u(n);if((f=a.__cssModules)&&(f=f[e]))return f;if(t!==bt&&Et(t,e))return o[e]=4,t[e];if(h=l.config.globalProperties,Et(h,e))return h[e]},set({_:n},e,t){const{data:i,setupState:s,ctx:r}=n;return mp(s,e)?(s[e]=t,!0):i!==bt&&Et(i,e)?(i[e]=t,!0):Et(n.props,e)||e[0]==="$"&&e.slice(1)in n?!1:(r[e]=t,!0)},has({_:{data:n,setupState:e,accessCache:t,ctx:i,appContext:s,propsOptions:r}},o){let a;return!!t[o]||n!==bt&&Et(n,o)||mp(e,o)||(a=r[0])&&Et(a,o)||Et(i,o)||Et(El,o)||Et(s.config.globalProperties,o)},defineProperty(n,e,t){return t.get!=null?n._.accessCache[e]=0:Et(t,"value")&&this.set(n,e,t.value,null),Reflect.defineProperty(n,e,t)}};function O0(){return BS().slots}function yG(){return BS().attrs}function BS(){const n=Rn();return n.setupContext||(n.setupContext=a1(n))}function Kl(n){return Xe(n)?n.reduce((e,t)=>(e[t]=null,e),{}):n}function bG(n,e){const t=Kl(n);for(const i in e){if(i.startsWith("__skip"))continue;let s=t[i];s?Xe(s)||et(s)?s=t[i]={type:s,default:e[i]}:s.default=e[i]:s===null&&(s=t[i]={default:e[i]}),s&&e[`__skip_${i}`]&&(s.skipFactory=!0)}return t}function xG(n,e){return!n||!e?n||e:Xe(n)&&Xe(e)?n.concat(e):sn({},Kl(n),Kl(e))}let rg=!0;function x2(n){const e=VS(n),t=n.proxy,i=n.ctx;rg=!1,e.beforeCreate&&Pv(e.beforeCreate,n,"bc");const{data:s,computed:r,methods:o,watch:a,provide:l,inject:c,created:u,beforeMount:f,mounted:h,beforeUpdate:d,updated:p,activated:_,deactivated:g,beforeDestroy:m,beforeUnmount:v,destroyed:b,unmounted:y,render:T,renderTracked:w,renderTriggered:S,errorCaptured:P,serverPrefetch:M,expose:E,inheritAttrs:D,components:B,directives:z,filters:V}=e;if(c&&M2(c,i,null),o)for(const te in o){const Z=o[te];et(Z)&&(i[te]=Z.bind(t))}if(s){const te=s.call(t,t);Dt(te)&&(n.data=xi(te))}if(rg=!0,r)for(const te in r){const Z=r[te],pe=et(Z)?Z.bind(t,t):et(Z.get)?Z.get.bind(t,t):es,Me=!et(Z)&&et(Z.set)?Z.set.bind(t):es,re=Ee({get:pe,set:Me});Object.defineProperty(i,te,{enumerable:!0,configurable:!0,get:()=>re.value,set:xe=>re.value=xe})}if(a)for(const te in a)zS(a[te],i,t,te);if(l){const te=et(l)?l.call(t):l;Reflect.ownKeys(te).forEach(Z=>{gr(Z,te[Z])})}u&&Pv(u,n,"c");function j(te,Z){Xe(Z)?Z.forEach(pe=>te(pe.bind(t))):Z&&te(Z.bind(t))}if(j(c2,f),j(Gn,h),j(u2,d),j(f2,p),j(o2,_),j(a2,g),j(m2,P),j(p2,w),j(d2,S),j(US,v),j(rs,y),j(h2,M),Xe(E))if(E.length){const te=n.exposed||(n.exposed={});E.forEach(Z=>{Object.defineProperty(te,Z,{get:()=>t[Z],set:pe=>t[Z]=pe})})}else n.exposed||(n.exposed={});T&&n.render===es&&(n.render=T),D!=null&&(n.inheritAttrs=D),B&&(n.components=B),z&&(n.directives=z),M&&OS(n)}function M2(n,e,t=es){Xe(n)&&(n=og(n));for(const i in n){const s=n[i];let r;Dt(s)?"default"in s?r=_n(s.from||i,s.default,!0):r=_n(s.from||i):r=_n(s),Lt(r)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>r.value,set:o=>r.value=o}):e[i]=r}}function Pv(n,e,t){ki(Xe(n)?n.map(i=>i.bind(e.proxy)):n.bind(e.proxy),e,t)}function zS(n,e,t,i){let s=i.includes(".")?QS(t,i):()=>t[i];if(Bt(n)){const r=e[n];et(r)&&Ke(s,r)}else if(et(n))Ke(s,n.bind(t));else if(Dt(n))if(Xe(n))n.forEach(r=>zS(r,e,t,i));else{const r=et(n.handler)?n.handler.bind(t):e[n.handler];et(r)&&Ke(s,r,n)}}function VS(n){const e=n.type,{mixins:t,extends:i}=e,{mixins:s,optionsCache:r,config:{optionMergeStrategies:o}}=n.appContext,a=r.get(e);let l;return a?l=a:!s.length&&!t&&!i?l=e:(l={},s.length&&s.forEach(c=>Bf(l,c,o,!0)),Bf(l,e,o)),Dt(e)&&r.set(e,l),l}function Bf(n,e,t,i=!1){const{mixins:s,extends:r}=e;r&&Bf(n,r,t,!0),s&&s.forEach(o=>Bf(n,o,t,!0));for(const o in e)if(!(i&&o==="expose")){const a=S2[o]||t&&t[o];n[o]=a?a(n[o],e[o]):e[o]}return n}const S2={data:Iv,props:Lv,emits:Lv,methods:ml,computed:ml,beforeCreate:Dn,created:Dn,beforeMount:Dn,mounted:Dn,beforeUpdate:Dn,updated:Dn,beforeDestroy:Dn,beforeUnmount:Dn,destroyed:Dn,unmounted:Dn,activated:Dn,deactivated:Dn,errorCaptured:Dn,serverPrefetch:Dn,components:ml,directives:ml,watch:T2,provide:Iv,inject:E2};function Iv(n,e){return e?n?function(){return sn(et(n)?n.call(this,this):n,et(e)?e.call(this,this):e)}:e:n}function E2(n,e){return ml(og(n),og(e))}function og(n){if(Xe(n)){const e={};for(let t=0;t1)return t&&et(e)?e.call(i&&i.proxy):e}}function Ic(){return!!(un||tn||go)}const GS={},WS=()=>Object.create(GS),XS=n=>Object.getPrototypeOf(n)===GS;function C2(n,e,t,i=!1){const s={},r=WS();n.propsDefaults=Object.create(null),$S(n,e,s,r);for(const o in n.propsOptions[0])o in s||(s[o]=void 0);t?n.props=i?s:pS(s):n.type.props?n.props=s:n.props=r,n.attrs=r}function R2(n,e,t,i){const{props:s,attrs:r,vnode:{patchFlag:o}}=n,a=ht(s),[l]=n.propsOptions;let c=!1;if((i||o>0)&&!(o&16)){if(o&8){const u=n.vnode.dynamicProps;for(let f=0;f{l=!0;const[h,d]=qS(f,e,!0);sn(o,h),d&&a.push(...d)};!t&&e.mixins.length&&e.mixins.forEach(u),n.extends&&u(n.extends),n.mixins&&n.mixins.forEach(u)}if(!r&&!l)return Dt(n)&&i.set(n,ha),ha;if(Xe(r))for(let u=0;un[0]==="_"||n==="$stable",U0=n=>Xe(n)?n.map(Zi):[Zi(n)],I2=(n,e,t)=>{if(e._n)return e;const i=I0((...s)=>U0(e(...s)),t);return i._c=!1,i},YS=(n,e,t)=>{const i=n._ctx;for(const s in n){if(N0(s))continue;const r=n[s];if(et(r))e[s]=I2(s,r,i);else if(r!=null){const o=U0(r);e[s]=()=>o}}},jS=(n,e)=>{const t=U0(e);n.slots.default=()=>t},KS=(n,e,t)=>{for(const i in e)(t||!N0(i))&&(n[i]=e[i])},L2=(n,e,t)=>{const i=n.slots=WS();if(n.vnode.shapeFlag&32){const s=e._;s?(KS(i,e,t),t&&qM(i,"_",s,!0)):YS(e,i)}else e&&jS(n,e)},D2=(n,e,t)=>{const{vnode:i,slots:s}=n;let r=!0,o=bt;if(i.shapeFlag&32){const a=e._;a?t&&a===1?r=!1:KS(s,e,t):(r=!e.$stable,YS(e,s)),o=e}else e&&(jS(n,e),o={default:1});if(r)for(const a in s)!N0(a)&&o[a]==null&&delete s[a]},Un=$2;function ZS(n){return O2(n)}function O2(n,e){const t=$h();t.__VUE__=!0;const{insert:i,remove:s,patchProp:r,createElement:o,createText:a,createComment:l,setText:c,setElementText:u,parentNode:f,nextSibling:h,setScopeId:d=es,insertStaticContent:p}=n,_=(N,U,A,W=null,G=null,X=null,C=void 0,I=null,F=!!U.dynamicChildren)=>{if(N===U)return;N&&!ao(N,U)&&(W=$(N),xe(N,G,X,!0),N=null),U.patchFlag===-2&&(F=!1,U.dynamicChildren=null);const{type:H,ref:ce,shapeFlag:R}=U;switch(H){case Oc:g(N,U,A,W);break;case An:m(N,U,A,W);break;case yf:N==null&&v(U,A,W,C);break;case Zt:B(N,U,A,W,G,X,C,I,F);break;default:R&1?T(N,U,A,W,G,X,C,I,F):R&6?z(N,U,A,W,G,X,C,I,F):(R&64||R&128)&&H.process(N,U,A,W,G,X,C,I,F,ue)}ce!=null&&G&&kf(ce,N&&N.ref,X,U||N,!U)},g=(N,U,A,W)=>{if(N==null)i(U.el=a(U.children),A,W);else{const G=U.el=N.el;U.children!==N.children&&c(G,U.children)}},m=(N,U,A,W)=>{N==null?i(U.el=l(U.children||""),A,W):U.el=N.el},v=(N,U,A,W)=>{[N.el,N.anchor]=p(N.children,U,A,W,N.el,N.anchor)},b=({el:N,anchor:U},A,W)=>{let G;for(;N&&N!==U;)G=h(N),i(N,A,W),N=G;i(U,A,W)},y=({el:N,anchor:U})=>{let A;for(;N&&N!==U;)A=h(N),s(N),N=A;s(U)},T=(N,U,A,W,G,X,C,I,F)=>{U.type==="svg"?C="svg":U.type==="math"&&(C="mathml"),N==null?w(U,A,W,G,X,C,I,F):M(N,U,G,X,C,I,F)},w=(N,U,A,W,G,X,C,I)=>{let F,H;const{props:ce,shapeFlag:R,transition:x,dirs:O}=N;if(F=N.el=o(N.type,X,ce&&ce.is,ce),R&8?u(F,N.children):R&16&&P(N.children,F,null,W,G,gp(N,X),C,I),O&&Fr(N,null,W,"created"),S(F,N,N.scopeId,C,W),ce){for(const ne in ce)ne!=="value"&&!bl(ne)&&r(F,ne,null,ce[ne],X,W);"value"in ce&&r(F,"value",null,ce.value,X),(H=ce.onVnodeBeforeMount)&&Wi(H,W,N)}O&&Fr(N,null,W,"beforeMount");const Y=N2(G,x);Y&&x.beforeEnter(F),i(F,U,A),((H=ce&&ce.onVnodeMounted)||Y||O)&&Un(()=>{H&&Wi(H,W,N),Y&&x.enter(F),O&&Fr(N,null,W,"mounted")},G)},S=(N,U,A,W,G)=>{if(A&&d(N,A),W)for(let X=0;X{for(let H=F;H{const I=U.el=N.el;let{patchFlag:F,dynamicChildren:H,dirs:ce}=U;F|=N.patchFlag&16;const R=N.props||bt,x=U.props||bt;let O;if(A&&kr(A,!1),(O=x.onVnodeBeforeUpdate)&&Wi(O,A,U,N),ce&&Fr(U,N,A,"beforeUpdate"),A&&kr(A,!0),(R.innerHTML&&x.innerHTML==null||R.textContent&&x.textContent==null)&&u(I,""),H?E(N.dynamicChildren,H,I,A,W,gp(U,G),X):C||Z(N,U,I,null,A,W,gp(U,G),X,!1),F>0){if(F&16)D(I,R,x,A,G);else if(F&2&&R.class!==x.class&&r(I,"class",null,x.class,G),F&4&&r(I,"style",R.style,x.style,G),F&8){const Y=U.dynamicProps;for(let ne=0;ne{O&&Wi(O,A,U,N),ce&&Fr(U,N,A,"updated")},W)},E=(N,U,A,W,G,X,C)=>{for(let I=0;I{if(U!==A){if(U!==bt)for(const X in U)!bl(X)&&!(X in A)&&r(N,X,U[X],null,G,W);for(const X in A){if(bl(X))continue;const C=A[X],I=U[X];C!==I&&X!=="value"&&r(N,X,I,C,G,W)}"value"in A&&r(N,"value",U.value,A.value,G)}},B=(N,U,A,W,G,X,C,I,F)=>{const H=U.el=N?N.el:a(""),ce=U.anchor=N?N.anchor:a("");let{patchFlag:R,dynamicChildren:x,slotScopeIds:O}=U;O&&(I=I?I.concat(O):O),N==null?(i(H,A,W),i(ce,A,W),P(U.children||[],A,ce,G,X,C,I,F)):R>0&&R&64&&x&&N.dynamicChildren?(E(N.dynamicChildren,x,A,G,X,C,I),(U.key!=null||G&&U===G.subTree)&&F0(N,U,!0)):Z(N,U,A,ce,G,X,C,I,F)},z=(N,U,A,W,G,X,C,I,F)=>{U.slotScopeIds=I,N==null?U.shapeFlag&512?G.ctx.activate(U,A,W,C,F):V(U,A,W,G,X,C,F):Q(N,U,F)},V=(N,U,A,W,G,X,C)=>{const I=N.component=tR(N,W,G);if(ed(N)&&(I.ctx.renderer=ue),nR(I,!1,C),I.asyncDep){if(G&&G.registerDep(I,j,C),!N.el){const F=I.subTree=gn(An);m(null,F,U,A)}}else j(I,N,U,A,G,X,C)},Q=(N,U,A)=>{const W=U.component=N.component;if(W2(N,U,A))if(W.asyncDep&&!W.asyncResolved){te(W,U,A);return}else W.next=U,W.update();else U.el=N.el,W.vnode=U},j=(N,U,A,W,G,X,C)=>{const I=()=>{if(N.isMounted){let{next:R,bu:x,u:O,parent:Y,vnode:ne}=N;{const De=JS(N);if(De){R&&(R.el=ne.el,te(N,R,C)),De.asyncDep.then(()=>{N.isUnmounted||I()});return}}let ee=R,Te;kr(N,!1),R?(R.el=ne.el,te(N,R,C)):R=ne,x&&_f(x),(Te=R.props&&R.props.onVnodeBeforeUpdate)&&Wi(Te,Y,R,ne),kr(N,!0);const me=Nv(N),Re=N.subTree;N.subTree=me,_(Re,me,f(Re.el),$(Re),N,G,X),R.el=me.el,ee===null&&X2(N,me.el),O&&Un(O,G),(Te=R.props&&R.props.onVnodeUpdated)&&Un(()=>Wi(Te,Y,R,ne),G)}else{let R;const{el:x,props:O}=U,{bm:Y,m:ne,parent:ee,root:Te,type:me}=N,Re=ma(U);kr(N,!1),Y&&_f(Y),!Re&&(R=O&&O.onVnodeBeforeMount)&&Wi(R,ee,U),kr(N,!0);{Te.ce&&Te.ce._injectChildStyle(me);const De=N.subTree=Nv(N);_(null,De,A,W,N,G,X),U.el=De.el}if(ne&&Un(ne,G),!Re&&(R=O&&O.onVnodeMounted)){const De=U;Un(()=>Wi(R,ee,De),G)}(U.shapeFlag&256||ee&&ma(ee.vnode)&&ee.vnode.shapeFlag&256)&&N.a&&Un(N.a,G),N.isMounted=!0,U=A=W=null}};N.scope.on();const F=N.effect=new JM(I);N.scope.off();const H=N.update=F.run.bind(F),ce=N.job=F.runIfDirty.bind(F);ce.i=N,ce.id=N.uid,F.scheduler=()=>P0(ce),kr(N,!0),H()},te=(N,U,A)=>{U.component=N;const W=N.vnode.props;N.vnode=U,N.next=null,R2(N,U.props,W,A),D2(N,U.children,A),Us(),Ev(N),Fs()},Z=(N,U,A,W,G,X,C,I,F=!1)=>{const H=N&&N.children,ce=N?N.shapeFlag:0,R=U.children,{patchFlag:x,shapeFlag:O}=U;if(x>0){if(x&128){Me(H,R,A,W,G,X,C,I,F);return}else if(x&256){pe(H,R,A,W,G,X,C,I,F);return}}O&8?(ce&16&&Se(H,G,X),R!==H&&u(A,R)):ce&16?O&16?Me(H,R,A,W,G,X,C,I,F):Se(H,G,X,!0):(ce&8&&u(A,""),O&16&&P(R,A,W,G,X,C,I,F))},pe=(N,U,A,W,G,X,C,I,F)=>{N=N||ha,U=U||ha;const H=N.length,ce=U.length,R=Math.min(H,ce);let x;for(x=0;xce?Se(N,G,X,!0,!1,R):P(U,A,W,G,X,C,I,F,R)},Me=(N,U,A,W,G,X,C,I,F)=>{let H=0;const ce=U.length;let R=N.length-1,x=ce-1;for(;H<=R&&H<=x;){const O=N[H],Y=U[H]=F?cr(U[H]):Zi(U[H]);if(ao(O,Y))_(O,Y,A,null,G,X,C,I,F);else break;H++}for(;H<=R&&H<=x;){const O=N[R],Y=U[x]=F?cr(U[x]):Zi(U[x]);if(ao(O,Y))_(O,Y,A,null,G,X,C,I,F);else break;R--,x--}if(H>R){if(H<=x){const O=x+1,Y=Ox)for(;H<=R;)xe(N[H],G,X,!0),H++;else{const O=H,Y=H,ne=new Map;for(H=Y;H<=x;H++){const ze=U[H]=F?cr(U[H]):Zi(U[H]);ze.key!=null&&ne.set(ze.key,H)}let ee,Te=0;const me=x-Y+1;let Re=!1,De=0;const de=new Array(me);for(H=0;H=me){xe(ze,G,X,!0);continue}let Ve;if(ze.key!=null)Ve=ne.get(ze.key);else for(ee=Y;ee<=x;ee++)if(de[ee-Y]===0&&ao(ze,U[ee])){Ve=ee;break}Ve===void 0?xe(ze,G,X,!0):(de[Ve-Y]=H+1,Ve>=De?De=Ve:Re=!0,_(ze,U[Ve],A,null,G,X,C,I,F),Te++)}const Ne=Re?U2(de):ha;for(ee=Ne.length-1,H=me-1;H>=0;H--){const ze=Y+H,Ve=U[ze],we=ze+1{const{el:X,type:C,transition:I,children:F,shapeFlag:H}=N;if(H&6){re(N.component.subTree,U,A,W);return}if(H&128){N.suspense.move(U,A,W);return}if(H&64){C.move(N,U,A,ue);return}if(C===Zt){i(X,U,A);for(let R=0;RI.enter(X),G);else{const{leave:R,delayLeave:x,afterLeave:O}=I,Y=()=>{N.ctx.isUnmounted?s(X):i(X,U,A)},ne=()=>{R(X,()=>{Y(),O&&O()})};x?x(X,Y,ne):ne()}else i(X,U,A)},xe=(N,U,A,W=!1,G=!1)=>{const{type:X,props:C,ref:I,children:F,dynamicChildren:H,shapeFlag:ce,patchFlag:R,dirs:x,cacheIndex:O}=N;if(R===-2&&(G=!1),I!=null&&(Us(),kf(I,null,A,N,!0),Fs()),O!=null&&(U.renderCache[O]=void 0),ce&256){U.ctx.deactivate(N);return}const Y=ce&1&&x,ne=!ma(N);let ee;if(ne&&(ee=C&&C.onVnodeBeforeUnmount)&&Wi(ee,U,N),ce&6)ge(N.component,A,W);else{if(ce&128){N.suspense.unmount(A,W);return}Y&&Fr(N,null,U,"beforeUnmount"),ce&64?N.type.remove(N,U,A,ue,W):H&&!H.hasOnce&&(X!==Zt||R>0&&R&64)?Se(H,U,A,!1,!0):(X===Zt&&R&384||!G&&ce&16)&&Se(F,U,A),W&&We(N)}(ne&&(ee=C&&C.onVnodeUnmounted)||Y)&&Un(()=>{ee&&Wi(ee,U,N),Y&&Fr(N,null,U,"unmounted")},A)},We=N=>{const{type:U,el:A,anchor:W,transition:G}=N;if(U===Zt){oe(A,W);return}if(U===yf){y(N);return}const X=()=>{s(A),G&&!G.persisted&&G.afterLeave&&G.afterLeave()};if(N.shapeFlag&1&&G&&!G.persisted){const{leave:C,delayLeave:I}=G,F=()=>C(A,X);I?I(N.el,X,F):F()}else X()},oe=(N,U)=>{let A;for(;N!==U;)A=h(N),s(N),N=A;s(U)},ge=(N,U,A)=>{const{bum:W,scope:G,job:X,subTree:C,um:I,m:F,a:H,parent:ce,slots:{__:R}}=N;Ov(F),Ov(H),W&&_f(W),ce&&Xe(R)&&R.forEach(x=>{ce.renderCache[x]=void 0}),G.stop(),X&&(X.flags|=8,xe(C,N,U,A)),I&&Un(I,U),Un(()=>{N.isUnmounted=!0},U),U&&U.pendingBranch&&!U.isUnmounted&&N.asyncDep&&!N.asyncResolved&&N.suspenseId===U.pendingId&&(U.deps--,U.deps===0&&U.resolve())},Se=(N,U,A,W=!1,G=!1,X=0)=>{for(let C=X;C{if(N.shapeFlag&6)return $(N.component.subTree);if(N.shapeFlag&128)return N.suspense.next();const U=h(N.anchor||N.el),A=U&&U[TS];return A?h(A):U};let ae=!1;const le=(N,U,A)=>{N==null?U._vnode&&xe(U._vnode,null,null,!0):_(U._vnode||null,N,U,null,null,null,A),U._vnode=N,ae||(ae=!0,Ev(),SS(),ae=!1)},ue={p:_,um:xe,m:re,r:We,mt:V,mc:P,pc:Z,pbc:E,n:$,o:n};return{render:le,hydrate:void 0,createApp:A2(le)}}function gp({type:n,props:e},t){return t==="svg"&&n==="foreignObject"||t==="mathml"&&n==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:t}function kr({effect:n,job:e},t){t?(n.flags|=32,e.flags|=4):(n.flags&=-33,e.flags&=-5)}function N2(n,e){return(!n||n&&!n.pendingBranch)&&e&&!e.persisted}function F0(n,e,t=!1){const i=n.children,s=e.children;if(Xe(i)&&Xe(s))for(let r=0;r>1,n[t[a]]0&&(e[i]=t[r-1]),t[r]=i)}}for(r=t.length,o=t[r-1];r-- >0;)t[r]=o,o=e[o];return t}function JS(n){const e=n.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:JS(e)}function Ov(n){if(n)for(let e=0;e_n(F2);function Lc(n,e){return Dc(n,null,e)}function MG(n,e){return Dc(n,null,{flush:"post"})}function B2(n,e){return Dc(n,null,{flush:"sync"})}function Ke(n,e,t){return Dc(n,e,t)}function Dc(n,e,t=bt){const{immediate:i,deep:s,flush:r,once:o}=t,a=sn({},t),l=e&&i||!e&&r!=="post";let c;if(ec){if(r==="sync"){const d=k2();c=d.__watcherHandles||(d.__watcherHandles=[])}else if(!l){const d=()=>{};return d.stop=es,d.resume=es,d.pause=es,d}}const u=un;a.call=(d,p,_)=>ki(d,u,p,_);let f=!1;r==="post"?a.scheduler=d=>{Un(d,u&&u.suspense)}:r!=="sync"&&(f=!0,a.scheduler=(d,p)=>{p?d():P0(d)}),a.augmentJob=d=>{e&&(d.flags|=4),f&&(d.flags|=2,u&&(d.id=u.uid,d.i=u))};const h=JC(n,e,a);return ec&&(c?c.push(h):l&&h()),h}function z2(n,e,t){const i=this.proxy,s=Bt(n)?n.includes(".")?QS(i,n):()=>i[n]:n.bind(i,i);let r;et(e)?r=e:(r=e.handler,t=e);const o=Nc(this),a=Dc(s,r.bind(i),t);return o(),a}function QS(n,e){const t=e.split(".");return()=>{let i=n;for(let s=0;s{let u,f=bt,h;return B2(()=>{const d=n[s];jn(u,d)&&(u=d,c())}),{get(){return l(),t.get?t.get(u):u},set(d){const p=t.set?t.set(d):d;if(!jn(p,u)&&!(f!==bt&&jn(d,f)))return;const _=i.vnode.props;_&&(e in _||s in _||r in _)&&(`onUpdate:${e}`in _||`onUpdate:${s}`in _||`onUpdate:${r}`in _)||(u=d,c()),i.emit(`update:${e}`,p),jn(d,p)&&jn(d,f)&&!jn(p,h)&&c(),f=d,h=p}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?o||bt:a,done:!1}:{done:!0}}}},a}const e1=(n,e)=>e==="modelValue"||e==="model-value"?n.modelModifiers:n[`${e}Modifiers`]||n[`${ai(e)}Modifiers`]||n[`${Gs(e)}Modifiers`];function V2(n,e,...t){if(n.isUnmounted)return;const i=n.vnode.props||bt;let s=t;const r=e.startsWith("update:"),o=r&&e1(i,e.slice(7));o&&(o.trim&&(s=t.map(u=>Bt(u)?u.trim():u)),o.number&&(s=t.map(Lf)));let a,l=i[a=gf(e)]||i[a=gf(ai(e))];!l&&r&&(l=i[a=gf(Gs(e))]),l&&ki(l,n,6,s);const c=i[a+"Once"];if(c){if(!n.emitted)n.emitted={};else if(n.emitted[a])return;n.emitted[a]=!0,ki(c,n,6,s)}}function t1(n,e,t=!1){const i=e.emitsCache,s=i.get(n);if(s!==void 0)return s;const r=n.emits;let o={},a=!1;if(!et(n)){const l=c=>{const u=t1(c,e,!0);u&&(a=!0,sn(o,u))};!t&&e.mixins.length&&e.mixins.forEach(l),n.extends&&l(n.extends),n.mixins&&n.mixins.forEach(l)}return!r&&!a?(Dt(n)&&i.set(n,null),null):(Xe(r)?r.forEach(l=>o[l]=null):sn(o,r),Dt(n)&&i.set(n,o),o)}function nd(n,e){return!n||!Gh(e)?!1:(e=e.slice(2).replace(/Once$/,""),Et(n,e[0].toLowerCase()+e.slice(1))||Et(n,Gs(e))||Et(n,e))}function Nv(n){const{type:e,vnode:t,proxy:i,withProxy:s,propsOptions:[r],slots:o,attrs:a,emit:l,render:c,renderCache:u,props:f,data:h,setupState:d,ctx:p,inheritAttrs:_}=n,g=Ff(n);let m,v;try{if(t.shapeFlag&4){const y=s||i,T=y;m=Zi(c.call(T,y,u,f,d,h,p)),v=a}else{const y=e;m=Zi(y.length>1?y(f,{attrs:a,slots:o,emit:l}):y(f,null)),v=e.props?a:H2(a)}}catch(y){Tl.length=0,Jh(y,n,1),m=gn(An)}let b=m;if(v&&_!==!1){const y=Object.keys(v),{shapeFlag:T}=b;y.length&&T&7&&(r&&y.some(v0)&&(v=G2(v,r)),b=yr(b,v,!1,!0))}return t.dirs&&(b=yr(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(t.dirs):t.dirs),t.transition&&jl(b,t.transition),m=b,Ff(g),m}const H2=n=>{let e;for(const t in n)(t==="class"||t==="style"||Gh(t))&&((e||(e={}))[t]=n[t]);return e},G2=(n,e)=>{const t={};for(const i in n)(!v0(i)||!(i.slice(9)in e))&&(t[i]=n[i]);return t};function W2(n,e,t){const{props:i,children:s,component:r}=n,{props:o,children:a,patchFlag:l}=e,c=r.emitsOptions;if(e.dirs||e.transition)return!0;if(t&&l>=0){if(l&1024)return!0;if(l&16)return i?Uv(i,o,c):!!o;if(l&8){const u=e.dynamicProps;for(let f=0;fn.__isSuspense;function $2(n,e){e&&e.pendingBranch?Xe(n)?e.effects.push(...n):e.effects.push(n):t2(n)}const Zt=Symbol.for("v-fgt"),Oc=Symbol.for("v-txt"),An=Symbol.for("v-cmt"),yf=Symbol.for("v-stc"),Tl=[];let ri=null;function vn(n=!1){Tl.push(ri=n?null:[])}function q2(){Tl.pop(),ri=Tl[Tl.length-1]||null}let Zl=1;function Fv(n,e=!1){Zl+=n,n<0&&ri&&e&&(ri.hasOnce=!0)}function i1(n){return n.dynamicChildren=Zl>0?ri||ha:null,q2(),Zl>0&&ri&&ri.push(n),n}function yi(n,e,t,i,s,r){return i1(lr(n,e,t,i,s,r,!0))}function Jl(n,e,t,i,s){return i1(gn(n,e,t,i,s,!0))}function Ql(n){return n?n.__v_isVNode===!0:!1}function ao(n,e){return n.type===e.type&&n.key===e.key}const s1=({key:n})=>n??null,bf=({ref:n,ref_key:e,ref_for:t})=>(typeof n=="number"&&(n=""+n),n!=null?Bt(n)||Lt(n)||et(n)?{i:tn,r:n,k:e,f:!!t}:n:null);function lr(n,e=null,t=null,i=0,s=null,r=n===Zt?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:n,props:e,key:e&&s1(e),ref:e&&bf(e),scopeId:Qh,slotScopeIds:null,children:t,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:i,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:tn};return a?(k0(l,t),r&128&&n.normalize(l)):t&&(l.shapeFlag|=Bt(t)?8:16),Zl>0&&!o&&ri&&(l.patchFlag>0||r&6)&&l.patchFlag!==32&&ri.push(l),l}const gn=Y2;function Y2(n,e=null,t=null,i=0,s=null,r=!1){if((!n||n===FS)&&(n=An),Ql(n)){const a=yr(n,e,!0);return t&&k0(a,t),Zl>0&&!r&&ri&&(a.shapeFlag&6?ri[ri.indexOf(n)]=a:ri.push(a)),a.patchFlag=-2,a}if(oR(n)&&(n=n.__vccOpts),e){e=j2(e);let{class:a,style:l}=e;a&&!Bt(a)&&(e.class=ka(a)),Dt(l)&&(A0(l)&&!Xe(l)&&(l=sn({},l)),e.style=Si(l))}const o=Bt(n)?1:n1(n)?128:wS(n)?64:Dt(n)?4:et(n)?2:0;return lr(n,e,t,i,s,o,r,!0)}function j2(n){return n?A0(n)||XS(n)?sn({},n):n:null}function yr(n,e,t=!1,i=!1){const{props:s,ref:r,patchFlag:o,children:a,transition:l}=n,c=e?J2(s||{},e):s,u={__v_isVNode:!0,__v_skip:!0,type:n.type,props:c,key:c&&s1(c),ref:e&&e.ref?t&&r?Xe(r)?r.concat(bf(e)):[r,bf(e)]:bf(e):r,scopeId:n.scopeId,slotScopeIds:n.slotScopeIds,children:a,target:n.target,targetStart:n.targetStart,targetAnchor:n.targetAnchor,staticCount:n.staticCount,shapeFlag:n.shapeFlag,patchFlag:e&&n.type!==Zt?o===-1?16:o|16:o,dynamicProps:n.dynamicProps,dynamicChildren:n.dynamicChildren,appContext:n.appContext,dirs:n.dirs,transition:l,component:n.component,suspense:n.suspense,ssContent:n.ssContent&&yr(n.ssContent),ssFallback:n.ssFallback&&yr(n.ssFallback),el:n.el,anchor:n.anchor,ctx:n.ctx,ce:n.ce};return l&&i&&jl(u,l.clone(u)),u}function K2(n=" ",e=0){return gn(Oc,null,n,e)}function Z2(n,e){const t=gn(yf,null,n);return t.staticCount=e,t}function kv(n="",e=!1){return e?(vn(),Jl(An,null,n)):gn(An,null,n)}function Zi(n){return n==null||typeof n=="boolean"?gn(An):Xe(n)?gn(Zt,null,n.slice()):Ql(n)?cr(n):gn(Oc,null,String(n))}function cr(n){return n.el===null&&n.patchFlag!==-1||n.memo?n:yr(n)}function k0(n,e){let t=0;const{shapeFlag:i}=n;if(e==null)e=null;else if(Xe(e))t=16;else if(typeof e=="object")if(i&65){const s=e.default;s&&(s._c&&(s._d=!1),k0(n,s()),s._c&&(s._d=!0));return}else{t=32;const s=e._;!s&&!XS(e)?e._ctx=tn:s===3&&tn&&(tn.slots._===1?e._=1:(e._=2,n.patchFlag|=1024))}else et(e)?(e={default:e,_ctx:tn},t=32):(e=String(e),i&64?(t=16,e=[K2(e)]):t=8);n.children=e,n.shapeFlag|=t}function J2(...n){const e={};for(let t=0;tun||tn;let zf,lg;{const n=$h(),e=(t,i)=>{let s;return(s=n[t])||(s=n[t]=[]),s.push(i),r=>{s.length>1?s.forEach(o=>o(r)):s[0](r)}};zf=e("__VUE_INSTANCE_SETTERS__",t=>un=t),lg=e("__VUE_SSR_SETTERS__",t=>ec=t)}const Nc=n=>{const e=un;return zf(n),n.scope.on(),()=>{n.scope.off(),zf(e)}},Bv=()=>{un&&un.scope.off(),zf(null)};function r1(n){return n.vnode.shapeFlag&4}let ec=!1;function nR(n,e=!1,t=!1){e&&lg(e);const{props:i,children:s}=n.vnode,r=r1(n);C2(n,i,r,e),L2(n,s,t||e);const o=r?iR(n,e):void 0;return e&&lg(!1),o}function iR(n,e){const t=n.type;n.accessCache=Object.create(null),n.proxy=new Proxy(n.ctx,b2);const{setup:i}=t;if(i){Us();const s=n.setupContext=i.length>1?a1(n):null,r=Nc(n),o=Pc(i,n,0,[n.props,s]),a=WM(o);if(Fs(),r(),(a||n.sp)&&!ma(n)&&OS(n),a){if(o.then(Bv,Bv),e)return o.then(l=>{zv(n,l)}).catch(l=>{Jh(l,n,0)});n.asyncDep=o}else zv(n,o)}else o1(n)}function zv(n,e,t){et(e)?n.type.__ssrInlineRender?n.ssrRender=e:n.render=e:Dt(e)&&(n.setupState=_S(e)),o1(n)}function o1(n,e,t){const i=n.type;n.render||(n.render=i.render||es);{const s=Nc(n);Us();try{x2(n)}finally{Fs(),s()}}}const sR={get(n,e){return wn(n,"get",""),n[e]}};function a1(n){const e=t=>{n.exposed=t||{}};return{attrs:new Proxy(n.attrs,sR),slots:n.slots,emit:n.emit,expose:e}}function id(n){return n.exposed?n.exposeProxy||(n.exposeProxy=new Proxy(_S(C0(n.exposed)),{get(e,t){if(t in e)return e[t];if(t in El)return El[t](n)},has(e,t){return t in e||t in El}})):n.proxy}function rR(n,e=!0){return et(n)?n.displayName||n.name:n.name||e&&n.__name}function oR(n){return et(n)&&"__vccOpts"in n}const Ee=(n,e)=>KC(n,e,ec);function ks(n,e,t){const i=arguments.length;return i===2?Dt(e)&&!Xe(e)?Ql(e)?gn(n,null,[e]):gn(n,e):gn(n,null,e):(i>3?t=Array.prototype.slice.call(arguments,2):i===3&&Ql(t)&&(t=[t]),gn(n,e,t))}const aR="3.5.16";/** +**/function Pc(n,e,t,i){try{return i?n(...i):n()}catch(s){Jh(s,e,t)}}function ki(n,e,t,i){if(et(n)){const s=Pc(n,e,t,i);return s&&WM(s)&&s.catch(r=>{Jh(r,e,t)}),s}if(Xe(n)){const s=[];for(let r=0;r>>1,s=kn[i],r=Yl(s);r=Yl(t)?kn.push(n):kn.splice(e2(e),0,n),n.flags|=1,MS()}}function MS(){Uf||(Uf=xS.then(ES))}function t2(n){Xe(n)?pa.push(...n):or&&n.id===-1?or.splice(ia+1,0,n):n.flags&1||(pa.push(n),n.flags|=1),MS()}function Tv(n,e,t=Yi+1){for(;tYl(t)-Yl(i));if(pa.length=0,or){or.push(...e);return}for(or=e,ia=0;ian.id==null?n.flags&2?-1:1/0:n.id;function ES(n){try{for(Yi=0;YiL0;function L0(n,e=tn,t){if(!e||n._n)return n;const i=(...s)=>{i._d&&kv(-1);const r=Ff(e);let o;try{o=n(...s)}finally{Ff(r),i._d&&kv(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function dG(n,e){if(tn===null)return n;const t=id(tn),i=n.dirs||(n.dirs=[]);for(let s=0;sn.__isTeleport,Sl=n=>n&&(n.disabled||n.disabled===""),wv=n=>n&&(n.defer||n.defer===""),Av=n=>typeof SVGElement<"u"&&n instanceof SVGElement,Cv=n=>typeof MathMLElement=="function"&&n instanceof MathMLElement,ig=(n,e)=>{const t=n&&n.to;return Bt(t)?e?e(t):null:t},AS={name:"Teleport",__isTeleport:!0,process(n,e,t,i,s,r,o,a,l,c){const{mc:u,pc:f,pbc:h,o:{insert:d,querySelector:p,createText:_,createComment:g}}=c,m=Sl(e.props);let{shapeFlag:v,children:b,dynamicChildren:y}=e;if(n==null){const T=e.el=_(""),w=e.anchor=_("");d(T,t,i),d(w,t,i);const S=(M,E)=>{v&16&&(s&&s.isCE&&(s.ce._teleportTarget=M),u(b,M,E,s,r,o,a,l))},P=()=>{const M=e.target=ig(e.props,p),E=CS(M,e,_,d);M&&(o!=="svg"&&Av(M)?o="svg":o!=="mathml"&&Cv(M)&&(o="mathml"),m||(S(M,E),vf(e,!1)))};m&&(S(t,w),vf(e,!0)),wv(e.props)?(e.el.__isMounted=!1,Un(()=>{P(),delete e.el.__isMounted},r)):P()}else{if(wv(e.props)&&n.el.__isMounted===!1){Un(()=>{AS.process(n,e,t,i,s,r,o,a,l,c)},r);return}e.el=n.el,e.targetStart=n.targetStart;const T=e.anchor=n.anchor,w=e.target=n.target,S=e.targetAnchor=n.targetAnchor,P=Sl(n.props),M=P?t:w,E=P?T:S;if(o==="svg"||Av(w)?o="svg":(o==="mathml"||Cv(w))&&(o="mathml"),y?(h(n.dynamicChildren,y,M,s,r,o,a),k0(n,e,!0)):l||f(n,e,M,E,s,r,o,a,!1),m)P?e.props&&n.props&&e.props.to!==n.props.to&&(e.props.to=n.props.to):lu(e,t,T,c,1);else if((e.props&&e.props.to)!==(n.props&&n.props.to)){const D=e.target=ig(e.props,p);D&&lu(e,D,null,c,0)}else P&&lu(e,w,S,c,1);vf(e,m)}},remove(n,e,t,{um:i,o:{remove:s}},r){const{shapeFlag:o,children:a,anchor:l,targetStart:c,targetAnchor:u,target:f,props:h}=n;if(f&&(s(c),s(u)),r&&s(l),o&16){const d=r||!Sl(h);for(let p=0;p{n.isMounted=!0}),US(()=>{n.isUnmounting=!0}),n}const hi=[Function,Array],RS={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:hi,onEnter:hi,onAfterEnter:hi,onEnterCancelled:hi,onBeforeLeave:hi,onLeave:hi,onAfterLeave:hi,onLeaveCancelled:hi,onBeforeAppear:hi,onAppear:hi,onAfterAppear:hi,onAppearCancelled:hi},PS=n=>{const e=n.subTree;return e.component?PS(e.component):e},s2={name:"BaseTransition",props:RS,setup(n,{slots:e}){const t=Rn(),i=i2();return()=>{const s=e.default&&DS(e.default(),!0);if(!s||!s.length)return;const r=IS(s),o=ht(n),{mode:a}=o;if(i.isLeaving)return pp(r);const l=Rv(r);if(!l)return pp(r);let c=sg(l,o,i,t,f=>c=f);l.type!==An&&jl(l,c);let u=t.subTree&&Rv(t.subTree);if(u&&u.type!==An&&!ao(l,u)&&PS(t).type!==An){let f=sg(u,o,i,t);if(jl(u,f),a==="out-in"&&l.type!==An)return i.isLeaving=!0,f.afterLeave=()=>{i.isLeaving=!1,t.job.flags&8||t.update(),delete f.afterLeave,u=void 0},pp(r);a==="in-out"&&l.type!==An?f.delayLeave=(h,d,p)=>{const _=LS(i,u);_[String(u.key)]=u,h[ar]=()=>{d(),h[ar]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{p(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return r}}};function IS(n){let e=n[0];if(n.length>1){for(const t of n)if(t.type!==An){e=t;break}}return e}const r2=s2;function LS(n,e){const{leavingVNodes:t}=n;let i=t.get(e.type);return i||(i=Object.create(null),t.set(e.type,i)),i}function sg(n,e,t,i,s){const{appear:r,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:f,onBeforeLeave:h,onLeave:d,onAfterLeave:p,onLeaveCancelled:_,onBeforeAppear:g,onAppear:m,onAfterAppear:v,onAppearCancelled:b}=e,y=String(n.key),T=LS(t,n),w=(M,E)=>{M&&ki(M,i,9,E)},S=(M,E)=>{const D=E[1];w(M,E),Xe(M)?M.every(B=>B.length<=1)&&D():M.length<=1&&D()},P={mode:o,persisted:a,beforeEnter(M){let E=l;if(!t.isMounted)if(r)E=g||l;else return;M[ar]&&M[ar](!0);const D=T[y];D&&ao(n,D)&&D.el[ar]&&D.el[ar](),w(E,[M])},enter(M){let E=c,D=u,B=f;if(!t.isMounted)if(r)E=m||c,D=v||u,B=b||f;else return;let z=!1;const V=M[cu]=Q=>{z||(z=!0,Q?w(B,[M]):w(D,[M]),P.delayedLeave&&P.delayedLeave(),M[cu]=void 0)};E?S(E,[M,V]):V()},leave(M,E){const D=String(n.key);if(M[cu]&&M[cu](!0),t.isUnmounting)return E();w(h,[M]);let B=!1;const z=M[ar]=V=>{B||(B=!0,E(),V?w(_,[M]):w(p,[M]),M[ar]=void 0,T[D]===n&&delete T[D])};T[D]=n,d?S(d,[M,z]):z()},clone(M){const E=sg(M,e,t,i,s);return s&&s(E),E}};return P}function pp(n){if(ed(n))return n=yr(n),n.children=null,n}function Rv(n){if(!ed(n))return wS(n.type)&&n.children?IS(n.children):n;if(n.component)return n.component.subTree;const{shapeFlag:e,children:t}=n;if(t){if(e&16)return t[0];if(e&32&&et(t.default))return t.default()}}function jl(n,e){n.shapeFlag&6&&n.component?(n.transition=e,jl(n.component.subTree,e)):n.shapeFlag&128?(n.ssContent.transition=e.clone(n.ssContent),n.ssFallback.transition=e.clone(n.ssFallback)):n.transition=e}function DS(n,e=!1,t){let i=[],s=0;for(let r=0;r1)for(let r=0;rkf(p,e&&(Xe(e)?e[_]:e),t,i,s));return}if(ma(i)&&!s){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&kf(n,e,t,i.component.subTree);return}const r=i.shapeFlag&4?id(i.component):i.el,o=s?null:r,{i:a,r:l}=n,c=e&&e.r,u=a.refs===bt?a.refs={}:a.refs,f=a.setupState,h=ht(f),d=f===bt?()=>!1:p=>Et(h,p);if(c!=null&&c!==l&&(Bt(c)?(u[c]=null,d(c)&&(f[c]=null)):Lt(c)&&(c.value=null)),et(l))Pc(l,a,12,[o,u]);else{const p=Bt(l),_=Lt(l);if(p||_){const g=()=>{if(n.f){const m=p?d(l)?f[l]:u[l]:l.value;s?Xe(m)&&b0(m,r):Xe(m)?m.includes(r)||m.push(r):p?(u[l]=[r],d(l)&&(f[l]=u[l])):(l.value=[r],n.k&&(u[n.k]=l.value))}else p?(u[l]=o,d(l)&&(f[l]=o)):_&&(l.value=o,n.k&&(u[n.k]=o))};o?(g.id=-1,Un(g,t)):g()}}}$h().requestIdleCallback;$h().cancelIdleCallback;const ma=n=>!!n.type.__asyncLoader,ed=n=>n.type.__isKeepAlive;function o2(n,e){NS(n,"a",e)}function a2(n,e){NS(n,"da",e)}function NS(n,e,t=un){const i=n.__wdc||(n.__wdc=()=>{let s=t;for(;s;){if(s.isDeactivated)return;s=s.parent}return n()});if(td(e,i,t),t){let s=t.parent;for(;s&&s.parent;)ed(s.parent.vnode)&&l2(i,e,t,s),s=s.parent}}function l2(n,e,t,i){const s=td(e,n,i,!0);rs(()=>{b0(i[e],s)},t)}function td(n,e,t=un,i=!1){if(t){const s=t[n]||(t[n]=[]),r=e.__weh||(e.__weh=(...o)=>{Us();const a=Nc(t),l=ki(e,t,n,o);return a(),Fs(),l});return i?s.unshift(r):s.push(r),r}}const Ws=n=>(e,t=un)=>{(!ec||n==="sp")&&td(n,(...i)=>e(...i),t)},c2=Ws("bm"),Gn=Ws("m"),u2=Ws("bu"),f2=Ws("u"),US=Ws("bum"),rs=Ws("um"),h2=Ws("sp"),d2=Ws("rtg"),p2=Ws("rtc");function m2(n,e=un){td("ec",n,e)}const D0="components",g2="directives";function gG(n,e){return O0(D0,n,!0,e)||n}const FS=Symbol.for("v-ndc");function _2(n){return Bt(n)?O0(D0,n,!1)||n:n||FS}function _G(n){return O0(g2,n)}function O0(n,e,t=!0,i=!1){const s=tn||un;if(s){const r=s.type;if(n===D0){const a=rR(r,!1);if(a&&(a===e||a===ai(e)||a===Xh(ai(e))))return r}const o=Pv(s[n]||r[n],e)||Pv(s.appContext[n],e);return!o&&i?r:o}}function Pv(n,e){return n&&(n[e]||n[ai(e)]||n[Xh(ai(e))])}function v2(n,e,t,i){let s;const r=t,o=Xe(n);if(o||Bt(n)){const a=o&&Ls(n);let l=!1,c=!1;a&&(l=!vi(n),c=vr(n),n=jh(n)),s=new Array(n.length);for(let u=0,f=n.length;ue(a,l,void 0,r));else{const a=Object.keys(n);s=new Array(a.length);for(let l=0,c=a.length;lQl(e)?!(e.type===An||e.type===Zt&&!kS(e.children)):!0)?n:null}function vG(n,e){const t={};for(const i in n)t[gf(i)]=n[i];return t}const rg=n=>n?r1(n)?id(n):rg(n.parent):null,El=sn(Object.create(null),{$:n=>n,$el:n=>n.vnode.el,$data:n=>n.data,$props:n=>n.props,$attrs:n=>n.attrs,$slots:n=>n.slots,$refs:n=>n.refs,$parent:n=>rg(n.parent),$root:n=>rg(n.root),$host:n=>n.ce,$emit:n=>n.emit,$options:n=>VS(n),$forceUpdate:n=>n.f||(n.f=()=>{I0(n.update)}),$nextTick:n=>n.n||(n.n=Ar.bind(n.proxy)),$watch:n=>z2.bind(n)}),mp=(n,e)=>n!==bt&&!n.__isScriptSetup&&Et(n,e),b2={get({_:n},e){if(e==="__v_skip")return!0;const{ctx:t,setupState:i,data:s,props:r,accessCache:o,type:a,appContext:l}=n;let c;if(e[0]!=="$"){const d=o[e];if(d!==void 0)switch(d){case 1:return i[e];case 2:return s[e];case 4:return t[e];case 3:return r[e]}else{if(mp(i,e))return o[e]=1,i[e];if(s!==bt&&Et(s,e))return o[e]=2,s[e];if((c=n.propsOptions[0])&&Et(c,e))return o[e]=3,r[e];if(t!==bt&&Et(t,e))return o[e]=4,t[e];og&&(o[e]=0)}}const u=El[e];let f,h;if(u)return e==="$attrs"&&wn(n.attrs,"get",""),u(n);if((f=a.__cssModules)&&(f=f[e]))return f;if(t!==bt&&Et(t,e))return o[e]=4,t[e];if(h=l.config.globalProperties,Et(h,e))return h[e]},set({_:n},e,t){const{data:i,setupState:s,ctx:r}=n;return mp(s,e)?(s[e]=t,!0):i!==bt&&Et(i,e)?(i[e]=t,!0):Et(n.props,e)||e[0]==="$"&&e.slice(1)in n?!1:(r[e]=t,!0)},has({_:{data:n,setupState:e,accessCache:t,ctx:i,appContext:s,propsOptions:r}},o){let a;return!!t[o]||n!==bt&&Et(n,o)||mp(e,o)||(a=r[0])&&Et(a,o)||Et(i,o)||Et(El,o)||Et(s.config.globalProperties,o)},defineProperty(n,e,t){return t.get!=null?n._.accessCache[e]=0:Et(t,"value")&&this.set(n,e,t.value,null),Reflect.defineProperty(n,e,t)}};function N0(){return BS().slots}function yG(){return BS().attrs}function BS(){const n=Rn();return n.setupContext||(n.setupContext=a1(n))}function Kl(n){return Xe(n)?n.reduce((e,t)=>(e[t]=null,e),{}):n}function bG(n,e){const t=Kl(n);for(const i in e){if(i.startsWith("__skip"))continue;let s=t[i];s?Xe(s)||et(s)?s=t[i]={type:s,default:e[i]}:s.default=e[i]:s===null&&(s=t[i]={default:e[i]}),s&&e[`__skip_${i}`]&&(s.skipFactory=!0)}return t}function xG(n,e){return!n||!e?n||e:Xe(n)&&Xe(e)?n.concat(e):sn({},Kl(n),Kl(e))}let og=!0;function x2(n){const e=VS(n),t=n.proxy,i=n.ctx;og=!1,e.beforeCreate&&Iv(e.beforeCreate,n,"bc");const{data:s,computed:r,methods:o,watch:a,provide:l,inject:c,created:u,beforeMount:f,mounted:h,beforeUpdate:d,updated:p,activated:_,deactivated:g,beforeDestroy:m,beforeUnmount:v,destroyed:b,unmounted:y,render:T,renderTracked:w,renderTriggered:S,errorCaptured:P,serverPrefetch:M,expose:E,inheritAttrs:D,components:B,directives:z,filters:V}=e;if(c&&M2(c,i,null),o)for(const te in o){const Z=o[te];et(Z)&&(i[te]=Z.bind(t))}if(s){const te=s.call(t,t);Dt(te)&&(n.data=xi(te))}if(og=!0,r)for(const te in r){const Z=r[te],pe=et(Z)?Z.bind(t,t):et(Z.get)?Z.get.bind(t,t):es,Me=!et(Z)&&et(Z.set)?Z.set.bind(t):es,re=Ee({get:pe,set:Me});Object.defineProperty(i,te,{enumerable:!0,configurable:!0,get:()=>re.value,set:xe=>re.value=xe})}if(a)for(const te in a)zS(a[te],i,t,te);if(l){const te=et(l)?l.call(t):l;Reflect.ownKeys(te).forEach(Z=>{gr(Z,te[Z])})}u&&Iv(u,n,"c");function j(te,Z){Xe(Z)?Z.forEach(pe=>te(pe.bind(t))):Z&&te(Z.bind(t))}if(j(c2,f),j(Gn,h),j(u2,d),j(f2,p),j(o2,_),j(a2,g),j(m2,P),j(p2,w),j(d2,S),j(US,v),j(rs,y),j(h2,M),Xe(E))if(E.length){const te=n.exposed||(n.exposed={});E.forEach(Z=>{Object.defineProperty(te,Z,{get:()=>t[Z],set:pe=>t[Z]=pe})})}else n.exposed||(n.exposed={});T&&n.render===es&&(n.render=T),D!=null&&(n.inheritAttrs=D),B&&(n.components=B),z&&(n.directives=z),M&&OS(n)}function M2(n,e,t=es){Xe(n)&&(n=ag(n));for(const i in n){const s=n[i];let r;Dt(s)?"default"in s?r=_n(s.from||i,s.default,!0):r=_n(s.from||i):r=_n(s),Lt(r)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>r.value,set:o=>r.value=o}):e[i]=r}}function Iv(n,e,t){ki(Xe(n)?n.map(i=>i.bind(e.proxy)):n.bind(e.proxy),e,t)}function zS(n,e,t,i){let s=i.includes(".")?QS(t,i):()=>t[i];if(Bt(n)){const r=e[n];et(r)&&Ke(s,r)}else if(et(n))Ke(s,n.bind(t));else if(Dt(n))if(Xe(n))n.forEach(r=>zS(r,e,t,i));else{const r=et(n.handler)?n.handler.bind(t):e[n.handler];et(r)&&Ke(s,r,n)}}function VS(n){const e=n.type,{mixins:t,extends:i}=e,{mixins:s,optionsCache:r,config:{optionMergeStrategies:o}}=n.appContext,a=r.get(e);let l;return a?l=a:!s.length&&!t&&!i?l=e:(l={},s.length&&s.forEach(c=>Bf(l,c,o,!0)),Bf(l,e,o)),Dt(e)&&r.set(e,l),l}function Bf(n,e,t,i=!1){const{mixins:s,extends:r}=e;r&&Bf(n,r,t,!0),s&&s.forEach(o=>Bf(n,o,t,!0));for(const o in e)if(!(i&&o==="expose")){const a=S2[o]||t&&t[o];n[o]=a?a(n[o],e[o]):e[o]}return n}const S2={data:Lv,props:Dv,emits:Dv,methods:ml,computed:ml,beforeCreate:Dn,created:Dn,beforeMount:Dn,mounted:Dn,beforeUpdate:Dn,updated:Dn,beforeDestroy:Dn,beforeUnmount:Dn,destroyed:Dn,unmounted:Dn,activated:Dn,deactivated:Dn,errorCaptured:Dn,serverPrefetch:Dn,components:ml,directives:ml,watch:T2,provide:Lv,inject:E2};function Lv(n,e){return e?n?function(){return sn(et(n)?n.call(this,this):n,et(e)?e.call(this,this):e)}:e:n}function E2(n,e){return ml(ag(n),ag(e))}function ag(n){if(Xe(n)){const e={};for(let t=0;t1)return t&&et(e)?e.call(i&&i.proxy):e}}function Ic(){return!!(un||tn||go)}const GS={},WS=()=>Object.create(GS),XS=n=>Object.getPrototypeOf(n)===GS;function C2(n,e,t,i=!1){const s={},r=WS();n.propsDefaults=Object.create(null),$S(n,e,s,r);for(const o in n.propsOptions[0])o in s||(s[o]=void 0);t?n.props=i?s:pS(s):n.type.props?n.props=s:n.props=r,n.attrs=r}function R2(n,e,t,i){const{props:s,attrs:r,vnode:{patchFlag:o}}=n,a=ht(s),[l]=n.propsOptions;let c=!1;if((i||o>0)&&!(o&16)){if(o&8){const u=n.vnode.dynamicProps;for(let f=0;f{l=!0;const[h,d]=qS(f,e,!0);sn(o,h),d&&a.push(...d)};!t&&e.mixins.length&&e.mixins.forEach(u),n.extends&&u(n.extends),n.mixins&&n.mixins.forEach(u)}if(!r&&!l)return Dt(n)&&i.set(n,ha),ha;if(Xe(r))for(let u=0;un[0]==="_"||n==="$stable",F0=n=>Xe(n)?n.map(Zi):[Zi(n)],I2=(n,e,t)=>{if(e._n)return e;const i=L0((...s)=>F0(e(...s)),t);return i._c=!1,i},YS=(n,e,t)=>{const i=n._ctx;for(const s in n){if(U0(s))continue;const r=n[s];if(et(r))e[s]=I2(s,r,i);else if(r!=null){const o=F0(r);e[s]=()=>o}}},jS=(n,e)=>{const t=F0(e);n.slots.default=()=>t},KS=(n,e,t)=>{for(const i in e)(t||!U0(i))&&(n[i]=e[i])},L2=(n,e,t)=>{const i=n.slots=WS();if(n.vnode.shapeFlag&32){const s=e._;s?(KS(i,e,t),t&&qM(i,"_",s,!0)):YS(e,i)}else e&&jS(n,e)},D2=(n,e,t)=>{const{vnode:i,slots:s}=n;let r=!0,o=bt;if(i.shapeFlag&32){const a=e._;a?t&&a===1?r=!1:KS(s,e,t):(r=!e.$stable,YS(e,s)),o=e}else e&&(jS(n,e),o={default:1});if(r)for(const a in s)!U0(a)&&o[a]==null&&delete s[a]},Un=$2;function ZS(n){return O2(n)}function O2(n,e){const t=$h();t.__VUE__=!0;const{insert:i,remove:s,patchProp:r,createElement:o,createText:a,createComment:l,setText:c,setElementText:u,parentNode:f,nextSibling:h,setScopeId:d=es,insertStaticContent:p}=n,_=(N,U,A,W=null,G=null,X=null,C=void 0,I=null,F=!!U.dynamicChildren)=>{if(N===U)return;N&&!ao(N,U)&&(W=$(N),xe(N,G,X,!0),N=null),U.patchFlag===-2&&(F=!1,U.dynamicChildren=null);const{type:H,ref:ce,shapeFlag:R}=U;switch(H){case Oc:g(N,U,A,W);break;case An:m(N,U,A,W);break;case yf:N==null&&v(U,A,W,C);break;case Zt:B(N,U,A,W,G,X,C,I,F);break;default:R&1?T(N,U,A,W,G,X,C,I,F):R&6?z(N,U,A,W,G,X,C,I,F):(R&64||R&128)&&H.process(N,U,A,W,G,X,C,I,F,ue)}ce!=null&&G&&kf(ce,N&&N.ref,X,U||N,!U)},g=(N,U,A,W)=>{if(N==null)i(U.el=a(U.children),A,W);else{const G=U.el=N.el;U.children!==N.children&&c(G,U.children)}},m=(N,U,A,W)=>{N==null?i(U.el=l(U.children||""),A,W):U.el=N.el},v=(N,U,A,W)=>{[N.el,N.anchor]=p(N.children,U,A,W,N.el,N.anchor)},b=({el:N,anchor:U},A,W)=>{let G;for(;N&&N!==U;)G=h(N),i(N,A,W),N=G;i(U,A,W)},y=({el:N,anchor:U})=>{let A;for(;N&&N!==U;)A=h(N),s(N),N=A;s(U)},T=(N,U,A,W,G,X,C,I,F)=>{U.type==="svg"?C="svg":U.type==="math"&&(C="mathml"),N==null?w(U,A,W,G,X,C,I,F):M(N,U,G,X,C,I,F)},w=(N,U,A,W,G,X,C,I)=>{let F,H;const{props:ce,shapeFlag:R,transition:x,dirs:O}=N;if(F=N.el=o(N.type,X,ce&&ce.is,ce),R&8?u(F,N.children):R&16&&P(N.children,F,null,W,G,gp(N,X),C,I),O&&Fr(N,null,W,"created"),S(F,N,N.scopeId,C,W),ce){for(const ne in ce)ne!=="value"&&!bl(ne)&&r(F,ne,null,ce[ne],X,W);"value"in ce&&r(F,"value",null,ce.value,X),(H=ce.onVnodeBeforeMount)&&Wi(H,W,N)}O&&Fr(N,null,W,"beforeMount");const Y=N2(G,x);Y&&x.beforeEnter(F),i(F,U,A),((H=ce&&ce.onVnodeMounted)||Y||O)&&Un(()=>{H&&Wi(H,W,N),Y&&x.enter(F),O&&Fr(N,null,W,"mounted")},G)},S=(N,U,A,W,G)=>{if(A&&d(N,A),W)for(let X=0;X{for(let H=F;H{const I=U.el=N.el;let{patchFlag:F,dynamicChildren:H,dirs:ce}=U;F|=N.patchFlag&16;const R=N.props||bt,x=U.props||bt;let O;if(A&&kr(A,!1),(O=x.onVnodeBeforeUpdate)&&Wi(O,A,U,N),ce&&Fr(U,N,A,"beforeUpdate"),A&&kr(A,!0),(R.innerHTML&&x.innerHTML==null||R.textContent&&x.textContent==null)&&u(I,""),H?E(N.dynamicChildren,H,I,A,W,gp(U,G),X):C||Z(N,U,I,null,A,W,gp(U,G),X,!1),F>0){if(F&16)D(I,R,x,A,G);else if(F&2&&R.class!==x.class&&r(I,"class",null,x.class,G),F&4&&r(I,"style",R.style,x.style,G),F&8){const Y=U.dynamicProps;for(let ne=0;ne{O&&Wi(O,A,U,N),ce&&Fr(U,N,A,"updated")},W)},E=(N,U,A,W,G,X,C)=>{for(let I=0;I{if(U!==A){if(U!==bt)for(const X in U)!bl(X)&&!(X in A)&&r(N,X,U[X],null,G,W);for(const X in A){if(bl(X))continue;const C=A[X],I=U[X];C!==I&&X!=="value"&&r(N,X,I,C,G,W)}"value"in A&&r(N,"value",U.value,A.value,G)}},B=(N,U,A,W,G,X,C,I,F)=>{const H=U.el=N?N.el:a(""),ce=U.anchor=N?N.anchor:a("");let{patchFlag:R,dynamicChildren:x,slotScopeIds:O}=U;O&&(I=I?I.concat(O):O),N==null?(i(H,A,W),i(ce,A,W),P(U.children||[],A,ce,G,X,C,I,F)):R>0&&R&64&&x&&N.dynamicChildren?(E(N.dynamicChildren,x,A,G,X,C,I),(U.key!=null||G&&U===G.subTree)&&k0(N,U,!0)):Z(N,U,A,ce,G,X,C,I,F)},z=(N,U,A,W,G,X,C,I,F)=>{U.slotScopeIds=I,N==null?U.shapeFlag&512?G.ctx.activate(U,A,W,C,F):V(U,A,W,G,X,C,F):Q(N,U,F)},V=(N,U,A,W,G,X,C)=>{const I=N.component=tR(N,W,G);if(ed(N)&&(I.ctx.renderer=ue),nR(I,!1,C),I.asyncDep){if(G&&G.registerDep(I,j,C),!N.el){const F=I.subTree=gn(An);m(null,F,U,A)}}else j(I,N,U,A,G,X,C)},Q=(N,U,A)=>{const W=U.component=N.component;if(W2(N,U,A))if(W.asyncDep&&!W.asyncResolved){te(W,U,A);return}else W.next=U,W.update();else U.el=N.el,W.vnode=U},j=(N,U,A,W,G,X,C)=>{const I=()=>{if(N.isMounted){let{next:R,bu:x,u:O,parent:Y,vnode:ne}=N;{const De=JS(N);if(De){R&&(R.el=ne.el,te(N,R,C)),De.asyncDep.then(()=>{N.isUnmounted||I()});return}}let ee=R,Te;kr(N,!1),R?(R.el=ne.el,te(N,R,C)):R=ne,x&&_f(x),(Te=R.props&&R.props.onVnodeBeforeUpdate)&&Wi(Te,Y,R,ne),kr(N,!0);const me=Uv(N),Re=N.subTree;N.subTree=me,_(Re,me,f(Re.el),$(Re),N,G,X),R.el=me.el,ee===null&&X2(N,me.el),O&&Un(O,G),(Te=R.props&&R.props.onVnodeUpdated)&&Un(()=>Wi(Te,Y,R,ne),G)}else{let R;const{el:x,props:O}=U,{bm:Y,m:ne,parent:ee,root:Te,type:me}=N,Re=ma(U);kr(N,!1),Y&&_f(Y),!Re&&(R=O&&O.onVnodeBeforeMount)&&Wi(R,ee,U),kr(N,!0);{Te.ce&&Te.ce._injectChildStyle(me);const De=N.subTree=Uv(N);_(null,De,A,W,N,G,X),U.el=De.el}if(ne&&Un(ne,G),!Re&&(R=O&&O.onVnodeMounted)){const De=U;Un(()=>Wi(R,ee,De),G)}(U.shapeFlag&256||ee&&ma(ee.vnode)&&ee.vnode.shapeFlag&256)&&N.a&&Un(N.a,G),N.isMounted=!0,U=A=W=null}};N.scope.on();const F=N.effect=new JM(I);N.scope.off();const H=N.update=F.run.bind(F),ce=N.job=F.runIfDirty.bind(F);ce.i=N,ce.id=N.uid,F.scheduler=()=>I0(ce),kr(N,!0),H()},te=(N,U,A)=>{U.component=N;const W=N.vnode.props;N.vnode=U,N.next=null,R2(N,U.props,W,A),D2(N,U.children,A),Us(),Tv(N),Fs()},Z=(N,U,A,W,G,X,C,I,F=!1)=>{const H=N&&N.children,ce=N?N.shapeFlag:0,R=U.children,{patchFlag:x,shapeFlag:O}=U;if(x>0){if(x&128){Me(H,R,A,W,G,X,C,I,F);return}else if(x&256){pe(H,R,A,W,G,X,C,I,F);return}}O&8?(ce&16&&Se(H,G,X),R!==H&&u(A,R)):ce&16?O&16?Me(H,R,A,W,G,X,C,I,F):Se(H,G,X,!0):(ce&8&&u(A,""),O&16&&P(R,A,W,G,X,C,I,F))},pe=(N,U,A,W,G,X,C,I,F)=>{N=N||ha,U=U||ha;const H=N.length,ce=U.length,R=Math.min(H,ce);let x;for(x=0;xce?Se(N,G,X,!0,!1,R):P(U,A,W,G,X,C,I,F,R)},Me=(N,U,A,W,G,X,C,I,F)=>{let H=0;const ce=U.length;let R=N.length-1,x=ce-1;for(;H<=R&&H<=x;){const O=N[H],Y=U[H]=F?cr(U[H]):Zi(U[H]);if(ao(O,Y))_(O,Y,A,null,G,X,C,I,F);else break;H++}for(;H<=R&&H<=x;){const O=N[R],Y=U[x]=F?cr(U[x]):Zi(U[x]);if(ao(O,Y))_(O,Y,A,null,G,X,C,I,F);else break;R--,x--}if(H>R){if(H<=x){const O=x+1,Y=Ox)for(;H<=R;)xe(N[H],G,X,!0),H++;else{const O=H,Y=H,ne=new Map;for(H=Y;H<=x;H++){const ze=U[H]=F?cr(U[H]):Zi(U[H]);ze.key!=null&&ne.set(ze.key,H)}let ee,Te=0;const me=x-Y+1;let Re=!1,De=0;const de=new Array(me);for(H=0;H=me){xe(ze,G,X,!0);continue}let Ve;if(ze.key!=null)Ve=ne.get(ze.key);else for(ee=Y;ee<=x;ee++)if(de[ee-Y]===0&&ao(ze,U[ee])){Ve=ee;break}Ve===void 0?xe(ze,G,X,!0):(de[Ve-Y]=H+1,Ve>=De?De=Ve:Re=!0,_(ze,U[Ve],A,null,G,X,C,I,F),Te++)}const Ne=Re?U2(de):ha;for(ee=Ne.length-1,H=me-1;H>=0;H--){const ze=Y+H,Ve=U[ze],we=ze+1{const{el:X,type:C,transition:I,children:F,shapeFlag:H}=N;if(H&6){re(N.component.subTree,U,A,W);return}if(H&128){N.suspense.move(U,A,W);return}if(H&64){C.move(N,U,A,ue);return}if(C===Zt){i(X,U,A);for(let R=0;RI.enter(X),G);else{const{leave:R,delayLeave:x,afterLeave:O}=I,Y=()=>{N.ctx.isUnmounted?s(X):i(X,U,A)},ne=()=>{R(X,()=>{Y(),O&&O()})};x?x(X,Y,ne):ne()}else i(X,U,A)},xe=(N,U,A,W=!1,G=!1)=>{const{type:X,props:C,ref:I,children:F,dynamicChildren:H,shapeFlag:ce,patchFlag:R,dirs:x,cacheIndex:O}=N;if(R===-2&&(G=!1),I!=null&&(Us(),kf(I,null,A,N,!0),Fs()),O!=null&&(U.renderCache[O]=void 0),ce&256){U.ctx.deactivate(N);return}const Y=ce&1&&x,ne=!ma(N);let ee;if(ne&&(ee=C&&C.onVnodeBeforeUnmount)&&Wi(ee,U,N),ce&6)ge(N.component,A,W);else{if(ce&128){N.suspense.unmount(A,W);return}Y&&Fr(N,null,U,"beforeUnmount"),ce&64?N.type.remove(N,U,A,ue,W):H&&!H.hasOnce&&(X!==Zt||R>0&&R&64)?Se(H,U,A,!1,!0):(X===Zt&&R&384||!G&&ce&16)&&Se(F,U,A),W&&We(N)}(ne&&(ee=C&&C.onVnodeUnmounted)||Y)&&Un(()=>{ee&&Wi(ee,U,N),Y&&Fr(N,null,U,"unmounted")},A)},We=N=>{const{type:U,el:A,anchor:W,transition:G}=N;if(U===Zt){oe(A,W);return}if(U===yf){y(N);return}const X=()=>{s(A),G&&!G.persisted&&G.afterLeave&&G.afterLeave()};if(N.shapeFlag&1&&G&&!G.persisted){const{leave:C,delayLeave:I}=G,F=()=>C(A,X);I?I(N.el,X,F):F()}else X()},oe=(N,U)=>{let A;for(;N!==U;)A=h(N),s(N),N=A;s(U)},ge=(N,U,A)=>{const{bum:W,scope:G,job:X,subTree:C,um:I,m:F,a:H,parent:ce,slots:{__:R}}=N;Nv(F),Nv(H),W&&_f(W),ce&&Xe(R)&&R.forEach(x=>{ce.renderCache[x]=void 0}),G.stop(),X&&(X.flags|=8,xe(C,N,U,A)),I&&Un(I,U),Un(()=>{N.isUnmounted=!0},U),U&&U.pendingBranch&&!U.isUnmounted&&N.asyncDep&&!N.asyncResolved&&N.suspenseId===U.pendingId&&(U.deps--,U.deps===0&&U.resolve())},Se=(N,U,A,W=!1,G=!1,X=0)=>{for(let C=X;C{if(N.shapeFlag&6)return $(N.component.subTree);if(N.shapeFlag&128)return N.suspense.next();const U=h(N.anchor||N.el),A=U&&U[TS];return A?h(A):U};let ae=!1;const le=(N,U,A)=>{N==null?U._vnode&&xe(U._vnode,null,null,!0):_(U._vnode||null,N,U,null,null,null,A),U._vnode=N,ae||(ae=!0,Tv(),SS(),ae=!1)},ue={p:_,um:xe,m:re,r:We,mt:V,mc:P,pc:Z,pbc:E,n:$,o:n};return{render:le,hydrate:void 0,createApp:A2(le)}}function gp({type:n,props:e},t){return t==="svg"&&n==="foreignObject"||t==="mathml"&&n==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:t}function kr({effect:n,job:e},t){t?(n.flags|=32,e.flags|=4):(n.flags&=-33,e.flags&=-5)}function N2(n,e){return(!n||n&&!n.pendingBranch)&&e&&!e.persisted}function k0(n,e,t=!1){const i=n.children,s=e.children;if(Xe(i)&&Xe(s))for(let r=0;r>1,n[t[a]]0&&(e[i]=t[r-1]),t[r]=i)}}for(r=t.length,o=t[r-1];r-- >0;)t[r]=o,o=e[o];return t}function JS(n){const e=n.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:JS(e)}function Nv(n){if(n)for(let e=0;e_n(F2);function Lc(n,e){return Dc(n,null,e)}function MG(n,e){return Dc(n,null,{flush:"post"})}function B2(n,e){return Dc(n,null,{flush:"sync"})}function Ke(n,e,t){return Dc(n,e,t)}function Dc(n,e,t=bt){const{immediate:i,deep:s,flush:r,once:o}=t,a=sn({},t),l=e&&i||!e&&r!=="post";let c;if(ec){if(r==="sync"){const d=k2();c=d.__watcherHandles||(d.__watcherHandles=[])}else if(!l){const d=()=>{};return d.stop=es,d.resume=es,d.pause=es,d}}const u=un;a.call=(d,p,_)=>ki(d,u,p,_);let f=!1;r==="post"?a.scheduler=d=>{Un(d,u&&u.suspense)}:r!=="sync"&&(f=!0,a.scheduler=(d,p)=>{p?d():I0(d)}),a.augmentJob=d=>{e&&(d.flags|=4),f&&(d.flags|=2,u&&(d.id=u.uid,d.i=u))};const h=JC(n,e,a);return ec&&(c?c.push(h):l&&h()),h}function z2(n,e,t){const i=this.proxy,s=Bt(n)?n.includes(".")?QS(i,n):()=>i[n]:n.bind(i,i);let r;et(e)?r=e:(r=e.handler,t=e);const o=Nc(this),a=Dc(s,r.bind(i),t);return o(),a}function QS(n,e){const t=e.split(".");return()=>{let i=n;for(let s=0;s{let u,f=bt,h;return B2(()=>{const d=n[s];jn(u,d)&&(u=d,c())}),{get(){return l(),t.get?t.get(u):u},set(d){const p=t.set?t.set(d):d;if(!jn(p,u)&&!(f!==bt&&jn(d,f)))return;const _=i.vnode.props;_&&(e in _||s in _||r in _)&&(`onUpdate:${e}`in _||`onUpdate:${s}`in _||`onUpdate:${r}`in _)||(u=d,c()),i.emit(`update:${e}`,p),jn(d,p)&&jn(d,f)&&!jn(p,h)&&c(),f=d,h=p}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?o||bt:a,done:!1}:{done:!0}}}},a}const e1=(n,e)=>e==="modelValue"||e==="model-value"?n.modelModifiers:n[`${e}Modifiers`]||n[`${ai(e)}Modifiers`]||n[`${Gs(e)}Modifiers`];function V2(n,e,...t){if(n.isUnmounted)return;const i=n.vnode.props||bt;let s=t;const r=e.startsWith("update:"),o=r&&e1(i,e.slice(7));o&&(o.trim&&(s=t.map(u=>Bt(u)?u.trim():u)),o.number&&(s=t.map(Lf)));let a,l=i[a=gf(e)]||i[a=gf(ai(e))];!l&&r&&(l=i[a=gf(Gs(e))]),l&&ki(l,n,6,s);const c=i[a+"Once"];if(c){if(!n.emitted)n.emitted={};else if(n.emitted[a])return;n.emitted[a]=!0,ki(c,n,6,s)}}function t1(n,e,t=!1){const i=e.emitsCache,s=i.get(n);if(s!==void 0)return s;const r=n.emits;let o={},a=!1;if(!et(n)){const l=c=>{const u=t1(c,e,!0);u&&(a=!0,sn(o,u))};!t&&e.mixins.length&&e.mixins.forEach(l),n.extends&&l(n.extends),n.mixins&&n.mixins.forEach(l)}return!r&&!a?(Dt(n)&&i.set(n,null),null):(Xe(r)?r.forEach(l=>o[l]=null):sn(o,r),Dt(n)&&i.set(n,o),o)}function nd(n,e){return!n||!Gh(e)?!1:(e=e.slice(2).replace(/Once$/,""),Et(n,e[0].toLowerCase()+e.slice(1))||Et(n,Gs(e))||Et(n,e))}function Uv(n){const{type:e,vnode:t,proxy:i,withProxy:s,propsOptions:[r],slots:o,attrs:a,emit:l,render:c,renderCache:u,props:f,data:h,setupState:d,ctx:p,inheritAttrs:_}=n,g=Ff(n);let m,v;try{if(t.shapeFlag&4){const y=s||i,T=y;m=Zi(c.call(T,y,u,f,d,h,p)),v=a}else{const y=e;m=Zi(y.length>1?y(f,{attrs:a,slots:o,emit:l}):y(f,null)),v=e.props?a:H2(a)}}catch(y){Tl.length=0,Jh(y,n,1),m=gn(An)}let b=m;if(v&&_!==!1){const y=Object.keys(v),{shapeFlag:T}=b;y.length&&T&7&&(r&&y.some(y0)&&(v=G2(v,r)),b=yr(b,v,!1,!0))}return t.dirs&&(b=yr(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(t.dirs):t.dirs),t.transition&&jl(b,t.transition),m=b,Ff(g),m}const H2=n=>{let e;for(const t in n)(t==="class"||t==="style"||Gh(t))&&((e||(e={}))[t]=n[t]);return e},G2=(n,e)=>{const t={};for(const i in n)(!y0(i)||!(i.slice(9)in e))&&(t[i]=n[i]);return t};function W2(n,e,t){const{props:i,children:s,component:r}=n,{props:o,children:a,patchFlag:l}=e,c=r.emitsOptions;if(e.dirs||e.transition)return!0;if(t&&l>=0){if(l&1024)return!0;if(l&16)return i?Fv(i,o,c):!!o;if(l&8){const u=e.dynamicProps;for(let f=0;fn.__isSuspense;function $2(n,e){e&&e.pendingBranch?Xe(n)?e.effects.push(...n):e.effects.push(n):t2(n)}const Zt=Symbol.for("v-fgt"),Oc=Symbol.for("v-txt"),An=Symbol.for("v-cmt"),yf=Symbol.for("v-stc"),Tl=[];let ri=null;function vn(n=!1){Tl.push(ri=n?null:[])}function q2(){Tl.pop(),ri=Tl[Tl.length-1]||null}let Zl=1;function kv(n,e=!1){Zl+=n,n<0&&ri&&e&&(ri.hasOnce=!0)}function i1(n){return n.dynamicChildren=Zl>0?ri||ha:null,q2(),Zl>0&&ri&&ri.push(n),n}function yi(n,e,t,i,s,r){return i1(lr(n,e,t,i,s,r,!0))}function Jl(n,e,t,i,s){return i1(gn(n,e,t,i,s,!0))}function Ql(n){return n?n.__v_isVNode===!0:!1}function ao(n,e){return n.type===e.type&&n.key===e.key}const s1=({key:n})=>n??null,bf=({ref:n,ref_key:e,ref_for:t})=>(typeof n=="number"&&(n=""+n),n!=null?Bt(n)||Lt(n)||et(n)?{i:tn,r:n,k:e,f:!!t}:n:null);function lr(n,e=null,t=null,i=0,s=null,r=n===Zt?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:n,props:e,key:e&&s1(e),ref:e&&bf(e),scopeId:Qh,slotScopeIds:null,children:t,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:i,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:tn};return a?(B0(l,t),r&128&&n.normalize(l)):t&&(l.shapeFlag|=Bt(t)?8:16),Zl>0&&!o&&ri&&(l.patchFlag>0||r&6)&&l.patchFlag!==32&&ri.push(l),l}const gn=Y2;function Y2(n,e=null,t=null,i=0,s=null,r=!1){if((!n||n===FS)&&(n=An),Ql(n)){const a=yr(n,e,!0);return t&&B0(a,t),Zl>0&&!r&&ri&&(a.shapeFlag&6?ri[ri.indexOf(n)]=a:ri.push(a)),a.patchFlag=-2,a}if(oR(n)&&(n=n.__vccOpts),e){e=j2(e);let{class:a,style:l}=e;a&&!Bt(a)&&(e.class=ka(a)),Dt(l)&&(C0(l)&&!Xe(l)&&(l=sn({},l)),e.style=Si(l))}const o=Bt(n)?1:n1(n)?128:wS(n)?64:Dt(n)?4:et(n)?2:0;return lr(n,e,t,i,s,o,r,!0)}function j2(n){return n?C0(n)||XS(n)?sn({},n):n:null}function yr(n,e,t=!1,i=!1){const{props:s,ref:r,patchFlag:o,children:a,transition:l}=n,c=e?J2(s||{},e):s,u={__v_isVNode:!0,__v_skip:!0,type:n.type,props:c,key:c&&s1(c),ref:e&&e.ref?t&&r?Xe(r)?r.concat(bf(e)):[r,bf(e)]:bf(e):r,scopeId:n.scopeId,slotScopeIds:n.slotScopeIds,children:a,target:n.target,targetStart:n.targetStart,targetAnchor:n.targetAnchor,staticCount:n.staticCount,shapeFlag:n.shapeFlag,patchFlag:e&&n.type!==Zt?o===-1?16:o|16:o,dynamicProps:n.dynamicProps,dynamicChildren:n.dynamicChildren,appContext:n.appContext,dirs:n.dirs,transition:l,component:n.component,suspense:n.suspense,ssContent:n.ssContent&&yr(n.ssContent),ssFallback:n.ssFallback&&yr(n.ssFallback),el:n.el,anchor:n.anchor,ctx:n.ctx,ce:n.ce};return l&&i&&jl(u,l.clone(u)),u}function K2(n=" ",e=0){return gn(Oc,null,n,e)}function Z2(n,e){const t=gn(yf,null,n);return t.staticCount=e,t}function Bv(n="",e=!1){return e?(vn(),Jl(An,null,n)):gn(An,null,n)}function Zi(n){return n==null||typeof n=="boolean"?gn(An):Xe(n)?gn(Zt,null,n.slice()):Ql(n)?cr(n):gn(Oc,null,String(n))}function cr(n){return n.el===null&&n.patchFlag!==-1||n.memo?n:yr(n)}function B0(n,e){let t=0;const{shapeFlag:i}=n;if(e==null)e=null;else if(Xe(e))t=16;else if(typeof e=="object")if(i&65){const s=e.default;s&&(s._c&&(s._d=!1),B0(n,s()),s._c&&(s._d=!0));return}else{t=32;const s=e._;!s&&!XS(e)?e._ctx=tn:s===3&&tn&&(tn.slots._===1?e._=1:(e._=2,n.patchFlag|=1024))}else et(e)?(e={default:e,_ctx:tn},t=32):(e=String(e),i&64?(t=16,e=[K2(e)]):t=8);n.children=e,n.shapeFlag|=t}function J2(...n){const e={};for(let t=0;tun||tn;let zf,cg;{const n=$h(),e=(t,i)=>{let s;return(s=n[t])||(s=n[t]=[]),s.push(i),r=>{s.length>1?s.forEach(o=>o(r)):s[0](r)}};zf=e("__VUE_INSTANCE_SETTERS__",t=>un=t),cg=e("__VUE_SSR_SETTERS__",t=>ec=t)}const Nc=n=>{const e=un;return zf(n),n.scope.on(),()=>{n.scope.off(),zf(e)}},zv=()=>{un&&un.scope.off(),zf(null)};function r1(n){return n.vnode.shapeFlag&4}let ec=!1;function nR(n,e=!1,t=!1){e&&cg(e);const{props:i,children:s}=n.vnode,r=r1(n);C2(n,i,r,e),L2(n,s,t||e);const o=r?iR(n,e):void 0;return e&&cg(!1),o}function iR(n,e){const t=n.type;n.accessCache=Object.create(null),n.proxy=new Proxy(n.ctx,b2);const{setup:i}=t;if(i){Us();const s=n.setupContext=i.length>1?a1(n):null,r=Nc(n),o=Pc(i,n,0,[n.props,s]),a=WM(o);if(Fs(),r(),(a||n.sp)&&!ma(n)&&OS(n),a){if(o.then(zv,zv),e)return o.then(l=>{Vv(n,l)}).catch(l=>{Jh(l,n,0)});n.asyncDep=o}else Vv(n,o)}else o1(n)}function Vv(n,e,t){et(e)?n.type.__ssrInlineRender?n.ssrRender=e:n.render=e:Dt(e)&&(n.setupState=_S(e)),o1(n)}function o1(n,e,t){const i=n.type;n.render||(n.render=i.render||es);{const s=Nc(n);Us();try{x2(n)}finally{Fs(),s()}}}const sR={get(n,e){return wn(n,"get",""),n[e]}};function a1(n){const e=t=>{n.exposed=t||{}};return{attrs:new Proxy(n.attrs,sR),slots:n.slots,emit:n.emit,expose:e}}function id(n){return n.exposed?n.exposeProxy||(n.exposeProxy=new Proxy(_S(R0(n.exposed)),{get(e,t){if(t in e)return e[t];if(t in El)return El[t](n)},has(e,t){return t in e||t in El}})):n.proxy}function rR(n,e=!0){return et(n)?n.displayName||n.name:n.name||e&&n.__name}function oR(n){return et(n)&&"__vccOpts"in n}const Ee=(n,e)=>KC(n,e,ec);function ks(n,e,t){const i=arguments.length;return i===2?Dt(e)&&!Xe(e)?Ql(e)?gn(n,null,[e]):gn(n,e):gn(n,null,e):(i>3?t=Array.prototype.slice.call(arguments,2):i===3&&Ql(t)&&(t=[t]),gn(n,e,t))}const aR="3.5.16";/** * @vue/runtime-dom v3.5.16 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let cg;const Vv=typeof window<"u"&&window.trustedTypes;if(Vv)try{cg=Vv.createPolicy("vue",{createHTML:n=>n})}catch{}const l1=cg?n=>cg.createHTML(n):n=>n,lR="http://www.w3.org/2000/svg",cR="http://www.w3.org/1998/Math/MathML",Ms=typeof document<"u"?document:null,Hv=Ms&&Ms.createElement("template"),uR={insert:(n,e,t)=>{e.insertBefore(n,t||null)},remove:n=>{const e=n.parentNode;e&&e.removeChild(n)},createElement:(n,e,t,i)=>{const s=e==="svg"?Ms.createElementNS(lR,n):e==="mathml"?Ms.createElementNS(cR,n):t?Ms.createElement(n,{is:t}):Ms.createElement(n);return n==="select"&&i&&i.multiple!=null&&s.setAttribute("multiple",i.multiple),s},createText:n=>Ms.createTextNode(n),createComment:n=>Ms.createComment(n),setText:(n,e)=>{n.nodeValue=e},setElementText:(n,e)=>{n.textContent=e},parentNode:n=>n.parentNode,nextSibling:n=>n.nextSibling,querySelector:n=>Ms.querySelector(n),setScopeId(n,e){n.setAttribute(e,"")},insertStaticContent(n,e,t,i,s,r){const o=t?t.previousSibling:e.lastChild;if(s&&(s===r||s.nextSibling))for(;e.insertBefore(s.cloneNode(!0),t),!(s===r||!(s=s.nextSibling)););else{Hv.innerHTML=l1(i==="svg"?`${n}`:i==="mathml"?`${n}`:n);const a=Hv.content;if(i==="svg"||i==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,t)}return[o?o.nextSibling:e.firstChild,t?t.previousSibling:e.lastChild]}},js="transition",Za="animation",tc=Symbol("_vtc"),c1={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},fR=sn({},RS,c1),hR=n=>(n.displayName="Transition",n.props=fR,n),EG=hR((n,{slots:e})=>ks(r2,dR(n),e)),Br=(n,e=[])=>{Xe(n)?n.forEach(t=>t(...e)):n&&n(...e)},Gv=n=>n?Xe(n)?n.some(e=>e.length>1):n.length>1:!1;function dR(n){const e={};for(const B in n)B in c1||(e[B]=n[B]);if(n.css===!1)return e;const{name:t="v",type:i,duration:s,enterFromClass:r=`${t}-enter-from`,enterActiveClass:o=`${t}-enter-active`,enterToClass:a=`${t}-enter-to`,appearFromClass:l=r,appearActiveClass:c=o,appearToClass:u=a,leaveFromClass:f=`${t}-leave-from`,leaveActiveClass:h=`${t}-leave-active`,leaveToClass:d=`${t}-leave-to`}=n,p=pR(s),_=p&&p[0],g=p&&p[1],{onBeforeEnter:m,onEnter:v,onEnterCancelled:b,onLeave:y,onLeaveCancelled:T,onBeforeAppear:w=m,onAppear:S=v,onAppearCancelled:P=b}=e,M=(B,z,V,Q)=>{B._enterCancelled=Q,zr(B,z?u:a),zr(B,z?c:o),V&&V()},E=(B,z)=>{B._isLeaving=!1,zr(B,f),zr(B,d),zr(B,h),z&&z()},D=B=>(z,V)=>{const Q=B?S:v,j=()=>M(z,B,V);Br(Q,[z,j]),Wv(()=>{zr(z,B?l:r),hs(z,B?u:a),Gv(Q)||Xv(z,i,_,j)})};return sn(e,{onBeforeEnter(B){Br(m,[B]),hs(B,r),hs(B,o)},onBeforeAppear(B){Br(w,[B]),hs(B,l),hs(B,c)},onEnter:D(!1),onAppear:D(!0),onLeave(B,z){B._isLeaving=!0;const V=()=>E(B,z);hs(B,f),B._enterCancelled?(hs(B,h),Yv()):(Yv(),hs(B,h)),Wv(()=>{B._isLeaving&&(zr(B,f),hs(B,d),Gv(y)||Xv(B,i,g,V))}),Br(y,[B,V])},onEnterCancelled(B){M(B,!1,void 0,!0),Br(b,[B])},onAppearCancelled(B){M(B,!0,void 0,!0),Br(P,[B])},onLeaveCancelled(B){E(B),Br(T,[B])}})}function pR(n){if(n==null)return null;if(Dt(n))return[_p(n.enter),_p(n.leave)];{const e=_p(n);return[e,e]}}function _p(n){return gC(n)}function hs(n,e){e.split(/\s+/).forEach(t=>t&&n.classList.add(t)),(n[tc]||(n[tc]=new Set)).add(e)}function zr(n,e){e.split(/\s+/).forEach(i=>i&&n.classList.remove(i));const t=n[tc];t&&(t.delete(e),t.size||(n[tc]=void 0))}function Wv(n){requestAnimationFrame(()=>{requestAnimationFrame(n)})}let mR=0;function Xv(n,e,t,i){const s=n._endId=++mR,r=()=>{s===n._endId&&i()};if(t!=null)return setTimeout(r,t);const{type:o,timeout:a,propCount:l}=gR(n,e);if(!o)return i();const c=o+"end";let u=0;const f=()=>{n.removeEventListener(c,h),r()},h=d=>{d.target===n&&++u>=l&&f()};setTimeout(()=>{u(t[p]||"").split(", "),s=i(`${js}Delay`),r=i(`${js}Duration`),o=$v(s,r),a=i(`${Za}Delay`),l=i(`${Za}Duration`),c=$v(a,l);let u=null,f=0,h=0;e===js?o>0&&(u=js,f=o,h=r.length):e===Za?c>0&&(u=Za,f=c,h=l.length):(f=Math.max(o,c),u=f>0?o>c?js:Za:null,h=u?u===js?r.length:l.length:0);const d=u===js&&/\b(transform|all)(,|$)/.test(i(`${js}Property`).toString());return{type:u,timeout:f,propCount:h,hasTransform:d}}function $v(n,e){for(;n.lengthqv(t)+qv(n[i])))}function qv(n){return n==="auto"?0:Number(n.slice(0,-1).replace(",","."))*1e3}function Yv(){return document.body.offsetHeight}function _R(n,e,t){const i=n[tc];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?n.removeAttribute("class"):t?n.setAttribute("class",e):n.className=e}const jv=Symbol("_vod"),vR=Symbol("_vsh"),yR=Symbol(""),bR=/(^|;)\s*display\s*:/;function xR(n,e,t){const i=n.style,s=Bt(t);let r=!1;if(t&&!s){if(e)if(Bt(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();t[a]==null&&xf(i,a,"")}else for(const o in e)t[o]==null&&xf(i,o,"");for(const o in t)o==="display"&&(r=!0),xf(i,o,t[o])}else if(s){if(e!==t){const o=i[yR];o&&(t+=";"+o),i.cssText=t,r=bR.test(t)}}else e&&n.removeAttribute("style");jv in n&&(n[jv]=r?i.display:"",n[vR]&&(i.display="none"))}const Kv=/\s*!important$/;function xf(n,e,t){if(Xe(t))t.forEach(i=>xf(n,e,i));else if(t==null&&(t=""),e.startsWith("--"))n.setProperty(e,t);else{const i=MR(n,e);Kv.test(t)?n.setProperty(Gs(i),t.replace(Kv,""),"important"):n[i]=t}}const Zv=["Webkit","Moz","ms"],vp={};function MR(n,e){const t=vp[e];if(t)return t;let i=ai(e);if(i!=="filter"&&i in n)return vp[e]=i;i=Xh(i);for(let s=0;syp||(wR.then(()=>yp=0),yp=Date.now());function CR(n,e){const t=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=t.attached)return;ki(RR(i,t.value),e,5,[i])};return t.value=n,t.attached=AR(),t}function RR(n,e){if(Xe(e)){const t=n.stopImmediatePropagation;return n.stopImmediatePropagation=()=>{t.call(n),n._stopped=!0},e.map(i=>s=>!s._stopped&&i&&i(s))}else return e}const iy=n=>n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n.charCodeAt(2)>96&&n.charCodeAt(2)<123,PR=(n,e,t,i,s,r)=>{const o=s==="svg";e==="class"?_R(n,i,o):e==="style"?xR(n,t,i):Gh(e)?v0(e)||ER(n,e,t,i,r):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):IR(n,e,i,o))?(ey(n,e,i),!n.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&Qv(n,e,i,o,r,e!=="value")):n._isVueCE&&(/[A-Z]/.test(e)||!Bt(i))?ey(n,ai(e),i,r,e):(e==="true-value"?n._trueValue=i:e==="false-value"&&(n._falseValue=i),Qv(n,e,i,o))};function IR(n,e,t,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in n&&iy(e)&&et(t));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="form"||e==="list"&&n.tagName==="INPUT"||e==="type"&&n.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const s=n.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return iy(e)&&Bt(t)?!1:e in n}const br=n=>{const e=n.props["onUpdate:modelValue"]||!1;return Xe(e)?t=>_f(e,t):e};function LR(n){n.target.composing=!0}function sy(n){const e=n.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const bi=Symbol("_assign"),ry={created(n,{modifiers:{lazy:e,trim:t,number:i}},s){n[bi]=br(s);const r=i||s.props&&s.props.type==="number";Ts(n,e?"change":"input",o=>{if(o.target.composing)return;let a=n.value;t&&(a=a.trim()),r&&(a=Lf(a)),n[bi](a)}),t&&Ts(n,"change",()=>{n.value=n.value.trim()}),e||(Ts(n,"compositionstart",LR),Ts(n,"compositionend",sy),Ts(n,"change",sy))},mounted(n,{value:e}){n.value=e??""},beforeUpdate(n,{value:e,oldValue:t,modifiers:{lazy:i,trim:s,number:r}},o){if(n[bi]=br(o),n.composing)return;const a=(r||n.type==="number")&&!/^0\d/.test(n.value)?Lf(n.value):n.value,l=e??"";a!==l&&(document.activeElement===n&&n.type!=="range"&&(i&&e===t||s&&n.value.trim()===l)||(n.value=l))}},DR={deep:!0,created(n,e,t){n[bi]=br(t),Ts(n,"change",()=>{const i=n._modelValue,s=ba(n),r=n.checked,o=n[bi];if(Xe(i)){const a=x0(i,s),l=a!==-1;if(r&&!l)o(i.concat(s));else if(!r&&l){const c=[...i];c.splice(a,1),o(c)}}else if(Fa(i)){const a=new Set(i);r?a.add(s):a.delete(s),o(a)}else o(u1(n,r))})},mounted:oy,beforeUpdate(n,e,t){n[bi]=br(t),oy(n,e,t)}};function oy(n,{value:e,oldValue:t},i){n._modelValue=e;let s;if(Xe(e))s=x0(e,i.props.value)>-1;else if(Fa(e))s=e.has(i.props.value);else{if(e===t)return;s=xo(e,u1(n,!0))}n.checked!==s&&(n.checked=s)}const OR={created(n,{value:e},t){n.checked=xo(e,t.props.value),n[bi]=br(t),Ts(n,"change",()=>{n[bi](ba(n))})},beforeUpdate(n,{value:e,oldValue:t},i){n[bi]=br(i),e!==t&&(n.checked=xo(e,i.props.value))}},NR={deep:!0,created(n,{value:e,modifiers:{number:t}},i){const s=Fa(e);Ts(n,"change",()=>{const r=Array.prototype.filter.call(n.options,o=>o.selected).map(o=>t?Lf(ba(o)):ba(o));n[bi](n.multiple?s?new Set(r):r:r[0]),n._assigning=!0,Ar(()=>{n._assigning=!1})}),n[bi]=br(i)},mounted(n,{value:e}){ay(n,e)},beforeUpdate(n,e,t){n[bi]=br(t)},updated(n,{value:e}){n._assigning||ay(n,e)}};function ay(n,e){const t=n.multiple,i=Xe(e);if(!(t&&!i&&!Fa(e))){for(let s=0,r=n.options.length;sString(c)===String(a)):o.selected=x0(e,a)>-1}else o.selected=e.has(a);else if(xo(ba(o),e)){n.selectedIndex!==s&&(n.selectedIndex=s);return}}!t&&n.selectedIndex!==-1&&(n.selectedIndex=-1)}}function ba(n){return"_value"in n?n._value:n.value}function u1(n,e){const t=e?"_trueValue":"_falseValue";return t in n?n[t]:e}const TG={created(n,e,t){uu(n,e,t,null,"created")},mounted(n,e,t){uu(n,e,t,null,"mounted")},beforeUpdate(n,e,t,i){uu(n,e,t,i,"beforeUpdate")},updated(n,e,t,i){uu(n,e,t,i,"updated")}};function UR(n,e){switch(n){case"SELECT":return NR;case"TEXTAREA":return ry;default:switch(e){case"checkbox":return DR;case"radio":return OR;default:return ry}}}function uu(n,e,t,i,s){const o=UR(n.tagName,t.props&&t.props.type)[s];o&&o(n,e,t,i)}const FR=["ctrl","shift","alt","meta"],kR={stop:n=>n.stopPropagation(),prevent:n=>n.preventDefault(),self:n=>n.target!==n.currentTarget,ctrl:n=>!n.ctrlKey,shift:n=>!n.shiftKey,alt:n=>!n.altKey,meta:n=>!n.metaKey,left:n=>"button"in n&&n.button!==0,middle:n=>"button"in n&&n.button!==1,right:n=>"button"in n&&n.button!==2,exact:(n,e)=>FR.some(t=>n[`${t}Key`]&&!e.includes(t))},wG=(n,e)=>{const t=n._withMods||(n._withMods={}),i=e.join(".");return t[i]||(t[i]=(s,...r)=>{for(let o=0;o{const t=n._withKeys||(n._withKeys={}),i=e.join(".");return t[i]||(t[i]=s=>{if(!("key"in s))return;const r=Gs(s.key);if(e.some(o=>o===r||BR[o]===r))return n(s)})},zR=sn({patchProp:PR},uR);let ly;function f1(){return ly||(ly=ZS(zR))}const CG=(...n)=>{f1().render(...n)},VR=(...n)=>{const e=f1().createApp(...n),{mount:t}=e;return e.mount=i=>{const s=GR(i);if(!s)return;const r=e._component;!et(r)&&!r.render&&!r.template&&(r.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=t(s,!1,HR(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},e};function HR(n){if(n instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&n instanceof MathMLElement)return"mathml"}function GR(n){return Bt(n)?document.querySelector(n):n}const h1=new Set,Jn=new WeakMap,xa=new WeakMap,Mo=new WeakMap,ug=new WeakMap,WR=new WeakMap,Ma=new WeakMap,Vf=new WeakMap,gl=new WeakSet;let xr,B0=0,z0=0;const Cs="__aa_tgt",nc="__aa_del",Hf="__aa_new",XR=n=>{const e=ZR(n);e&&e.forEach(t=>JR(t))},$R=n=>{n.forEach(e=>{e.target===xr&&YR(),Jn.has(e.target)&&Co(e.target)})};function qR(n){const e=ug.get(n);e==null||e.disconnect();let t=Jn.get(n),i=0;const s=5;t||(t=Sa(n),Jn.set(n,t));const{offsetWidth:r,offsetHeight:o}=xr,l=[t.top-s,r-(t.left+s+t.width),o-(t.top+s+t.height),t.left-s].map(u=>`${-1*Math.floor(u)}px`).join(" "),c=new IntersectionObserver(()=>{++i>1&&Co(n)},{root:xr,threshold:1,rootMargin:l});c.observe(n),ug.set(n,c)}function Co(n){clearTimeout(Vf.get(n));const e=sd(n),t=ic(e)?500:e.duration;Vf.set(n,setTimeout(async()=>{const i=Mo.get(n);try{await(i==null?void 0:i.finished),Jn.set(n,Sa(n)),qR(n)}catch{}},t))}function YR(){clearTimeout(Vf.get(xr)),Vf.set(xr,setTimeout(()=>{h1.forEach(n=>g1(n,e=>d1(()=>Co(e))))},100))}function jR(n){setTimeout(()=>{WR.set(n,setInterval(()=>d1(Co.bind(null,n)),2e3))},Math.round(2e3*Math.random()))}function d1(n){typeof requestIdleCallback=="function"?requestIdleCallback(()=>n()):requestAnimationFrame(()=>n())}let fg,oa;const KR=typeof window<"u"&&"ResizeObserver"in window;KR&&(xr=document.documentElement,fg=new MutationObserver(XR),oa=new ResizeObserver($R),window.addEventListener("scroll",()=>{z0=window.scrollY,B0=window.scrollX}),oa.observe(xr));function ZR(n){return n.reduce((i,s)=>[...i,...Array.from(s.addedNodes),...Array.from(s.removedNodes)],[]).every(i=>i.nodeName==="#comment")?!1:n.reduce((i,s)=>{if(i===!1)return!1;if(s.target instanceof Element){if(bp(s.target),!i.has(s.target)){i.add(s.target);for(let r=0;rt(n,Ma.has(n)));for(let t=0;ts(i,Ma.has(i)))}}function H0(n){return Array.isArray(n)?n:[n]}function ic(n){return typeof n=="function"}function e3(n){const e=Jn.get(n),t=Sa(n);if(!V0(n))return Jn.set(n,t);let i;if(!e)return;const s=sd(n);if(typeof s!="function"){const r=e.left-t.left,o=e.top-t.top,[a,l,c,u]=p1(n,e,t),f={transform:`translate(${r}px, ${o}px)`},h={transform:"translate(0, 0)"};a!==l&&(f.width=`${a}px`,h.width=`${l}px`),c!==u&&(f.height=`${c}px`,h.height=`${u}px`),i=n.animate([f,h],{duration:s.duration,easing:s.easing})}else{const[r]=H0(s(n,"remain",e,t));i=new Animation(r),i.play()}Mo.set(n,i),Jn.set(n,t),i.addEventListener("finish",Co.bind(null,n))}function cy(n){Hf in n&&delete n[Hf];const e=Sa(n);Jn.set(n,e);const t=sd(n);if(!V0(n))return;let i;if(typeof t!="function")i=n.animate([{transform:"scale(.98)",opacity:0},{transform:"scale(0.98)",opacity:0,offset:.5},{transform:"scale(1)",opacity:1}],{duration:t.duration*1.5,easing:"ease-in"});else{const[s]=H0(t(n,"add",e));i=new Animation(s),i.play()}Mo.set(n,i),i.addEventListener("finish",Co.bind(null,n))}function uy(n,e){var t;n.remove(),Jn.delete(n),xa.delete(n),Mo.delete(n),(t=ug.get(n))===null||t===void 0||t.disconnect(),setTimeout(()=>{if(nc in n&&delete n[nc],Object.defineProperty(n,Hf,{value:!0,configurable:!0}),e&&n instanceof HTMLElement)for(const i in e)n.style[i]=""},0)}function t3(n){var e;if(!xa.has(n)||!Jn.has(n))return;const[t,i]=xa.get(n);Object.defineProperty(n,nc,{value:!0,configurable:!0});const s=window.scrollX,r=window.scrollY;if(i&&i.parentNode&&i.parentNode instanceof Element?i.parentNode.insertBefore(n,i):t&&t.parentNode?t.parentNode.appendChild(n):(e=m1(n))===null||e===void 0||e.appendChild(n),!V0(n))return uy(n);const[o,a,l,c]=i3(n),u=sd(n),f=Jn.get(n);(s!==B0||r!==z0)&&n3(n,s,r,u);let h,d={position:"absolute",top:`${o}px`,left:`${a}px`,width:`${l}px`,height:`${c}px`,margin:"0",pointerEvents:"none",transformOrigin:"center",zIndex:"100"};if(!ic(u))Object.assign(n.style,d),h=n.animate([{transform:"scale(1)",opacity:1},{transform:"scale(.98)",opacity:0}],{duration:u.duration,easing:"ease-out"});else{const[p,_]=H0(u(n,"remove",f));(_==null?void 0:_.styleReset)!==!1&&(d=(_==null?void 0:_.styleReset)||d,Object.assign(n.style,d)),h=new Animation(p),h.play()}Mo.set(n,h),h.addEventListener("finish",uy.bind(null,n,d))}function n3(n,e,t,i){const s=B0-e,r=z0-t,o=document.documentElement.style.scrollBehavior;if(getComputedStyle(xr).scrollBehavior==="smooth"&&(document.documentElement.style.scrollBehavior="auto"),window.scrollTo(window.scrollX+s,window.scrollY+r),!n.parentElement)return;const l=n.parentElement;let c=l.clientHeight,u=l.clientWidth;const f=performance.now();function h(){requestAnimationFrame(()=>{if(!ic(i)){const d=c-l.clientHeight,p=u-l.clientWidth;f+i.duration>performance.now()?(window.scrollTo({left:window.scrollX-p,top:window.scrollY-d}),c=l.clientHeight,u=l.clientWidth,h()):document.documentElement.style.scrollBehavior=o}})}h()}function i3(n){const e=Jn.get(n),[t,,i]=p1(n,e,Sa(n));let s=n.parentElement;for(;s&&(getComputedStyle(s).position==="static"||s instanceof HTMLBodyElement);)s=s.parentElement;s||(s=document.body);const r=getComputedStyle(s),o=Jn.get(s)||Sa(s),a=Math.round(e.top-o.top)-ji(r.borderTopWidth),l=Math.round(e.left-o.left)-ji(r.borderLeftWidth);return[a,l,t,i]}function s3(n,e={}){return fg&&oa&&(window.matchMedia("(prefers-reduced-motion: reduce)").matches&&!ic(e)&&!e.disrespectUserMotionPreference||(gl.add(n),getComputedStyle(n).position==="static"&&Object.assign(n.style,{position:"relative"}),g1(n,Co,jR,s=>oa==null?void 0:oa.observe(s)),ic(e)?Ma.set(n,e):Ma.set(n,{duration:250,easing:"ease-in-out",...e}),fg.observe(n,{childList:!0}),h1.add(n))),Object.freeze({parent:n,enable:()=>{gl.add(n)},disable:()=>{gl.delete(n)},isEnabled:()=>gl.has(n)})}const r3={mounted:(n,e)=>{s3(n,e.value||{})},getSSRProps:()=>({})},o3=r3,a3={install(n){n.directive("auto-animate",o3)}};/** +**/let ug;const Hv=typeof window<"u"&&window.trustedTypes;if(Hv)try{ug=Hv.createPolicy("vue",{createHTML:n=>n})}catch{}const l1=ug?n=>ug.createHTML(n):n=>n,lR="http://www.w3.org/2000/svg",cR="http://www.w3.org/1998/Math/MathML",Ms=typeof document<"u"?document:null,Gv=Ms&&Ms.createElement("template"),uR={insert:(n,e,t)=>{e.insertBefore(n,t||null)},remove:n=>{const e=n.parentNode;e&&e.removeChild(n)},createElement:(n,e,t,i)=>{const s=e==="svg"?Ms.createElementNS(lR,n):e==="mathml"?Ms.createElementNS(cR,n):t?Ms.createElement(n,{is:t}):Ms.createElement(n);return n==="select"&&i&&i.multiple!=null&&s.setAttribute("multiple",i.multiple),s},createText:n=>Ms.createTextNode(n),createComment:n=>Ms.createComment(n),setText:(n,e)=>{n.nodeValue=e},setElementText:(n,e)=>{n.textContent=e},parentNode:n=>n.parentNode,nextSibling:n=>n.nextSibling,querySelector:n=>Ms.querySelector(n),setScopeId(n,e){n.setAttribute(e,"")},insertStaticContent(n,e,t,i,s,r){const o=t?t.previousSibling:e.lastChild;if(s&&(s===r||s.nextSibling))for(;e.insertBefore(s.cloneNode(!0),t),!(s===r||!(s=s.nextSibling)););else{Gv.innerHTML=l1(i==="svg"?`${n}`:i==="mathml"?`${n}`:n);const a=Gv.content;if(i==="svg"||i==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,t)}return[o?o.nextSibling:e.firstChild,t?t.previousSibling:e.lastChild]}},js="transition",Za="animation",tc=Symbol("_vtc"),c1={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},fR=sn({},RS,c1),hR=n=>(n.displayName="Transition",n.props=fR,n),EG=hR((n,{slots:e})=>ks(r2,dR(n),e)),Br=(n,e=[])=>{Xe(n)?n.forEach(t=>t(...e)):n&&n(...e)},Wv=n=>n?Xe(n)?n.some(e=>e.length>1):n.length>1:!1;function dR(n){const e={};for(const B in n)B in c1||(e[B]=n[B]);if(n.css===!1)return e;const{name:t="v",type:i,duration:s,enterFromClass:r=`${t}-enter-from`,enterActiveClass:o=`${t}-enter-active`,enterToClass:a=`${t}-enter-to`,appearFromClass:l=r,appearActiveClass:c=o,appearToClass:u=a,leaveFromClass:f=`${t}-leave-from`,leaveActiveClass:h=`${t}-leave-active`,leaveToClass:d=`${t}-leave-to`}=n,p=pR(s),_=p&&p[0],g=p&&p[1],{onBeforeEnter:m,onEnter:v,onEnterCancelled:b,onLeave:y,onLeaveCancelled:T,onBeforeAppear:w=m,onAppear:S=v,onAppearCancelled:P=b}=e,M=(B,z,V,Q)=>{B._enterCancelled=Q,zr(B,z?u:a),zr(B,z?c:o),V&&V()},E=(B,z)=>{B._isLeaving=!1,zr(B,f),zr(B,d),zr(B,h),z&&z()},D=B=>(z,V)=>{const Q=B?S:v,j=()=>M(z,B,V);Br(Q,[z,j]),Xv(()=>{zr(z,B?l:r),hs(z,B?u:a),Wv(Q)||$v(z,i,_,j)})};return sn(e,{onBeforeEnter(B){Br(m,[B]),hs(B,r),hs(B,o)},onBeforeAppear(B){Br(w,[B]),hs(B,l),hs(B,c)},onEnter:D(!1),onAppear:D(!0),onLeave(B,z){B._isLeaving=!0;const V=()=>E(B,z);hs(B,f),B._enterCancelled?(hs(B,h),jv()):(jv(),hs(B,h)),Xv(()=>{B._isLeaving&&(zr(B,f),hs(B,d),Wv(y)||$v(B,i,g,V))}),Br(y,[B,V])},onEnterCancelled(B){M(B,!1,void 0,!0),Br(b,[B])},onAppearCancelled(B){M(B,!0,void 0,!0),Br(P,[B])},onLeaveCancelled(B){E(B),Br(T,[B])}})}function pR(n){if(n==null)return null;if(Dt(n))return[_p(n.enter),_p(n.leave)];{const e=_p(n);return[e,e]}}function _p(n){return gC(n)}function hs(n,e){e.split(/\s+/).forEach(t=>t&&n.classList.add(t)),(n[tc]||(n[tc]=new Set)).add(e)}function zr(n,e){e.split(/\s+/).forEach(i=>i&&n.classList.remove(i));const t=n[tc];t&&(t.delete(e),t.size||(n[tc]=void 0))}function Xv(n){requestAnimationFrame(()=>{requestAnimationFrame(n)})}let mR=0;function $v(n,e,t,i){const s=n._endId=++mR,r=()=>{s===n._endId&&i()};if(t!=null)return setTimeout(r,t);const{type:o,timeout:a,propCount:l}=gR(n,e);if(!o)return i();const c=o+"end";let u=0;const f=()=>{n.removeEventListener(c,h),r()},h=d=>{d.target===n&&++u>=l&&f()};setTimeout(()=>{u(t[p]||"").split(", "),s=i(`${js}Delay`),r=i(`${js}Duration`),o=qv(s,r),a=i(`${Za}Delay`),l=i(`${Za}Duration`),c=qv(a,l);let u=null,f=0,h=0;e===js?o>0&&(u=js,f=o,h=r.length):e===Za?c>0&&(u=Za,f=c,h=l.length):(f=Math.max(o,c),u=f>0?o>c?js:Za:null,h=u?u===js?r.length:l.length:0);const d=u===js&&/\b(transform|all)(,|$)/.test(i(`${js}Property`).toString());return{type:u,timeout:f,propCount:h,hasTransform:d}}function qv(n,e){for(;n.lengthYv(t)+Yv(n[i])))}function Yv(n){return n==="auto"?0:Number(n.slice(0,-1).replace(",","."))*1e3}function jv(){return document.body.offsetHeight}function _R(n,e,t){const i=n[tc];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?n.removeAttribute("class"):t?n.setAttribute("class",e):n.className=e}const Kv=Symbol("_vod"),vR=Symbol("_vsh"),yR=Symbol(""),bR=/(^|;)\s*display\s*:/;function xR(n,e,t){const i=n.style,s=Bt(t);let r=!1;if(t&&!s){if(e)if(Bt(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();t[a]==null&&xf(i,a,"")}else for(const o in e)t[o]==null&&xf(i,o,"");for(const o in t)o==="display"&&(r=!0),xf(i,o,t[o])}else if(s){if(e!==t){const o=i[yR];o&&(t+=";"+o),i.cssText=t,r=bR.test(t)}}else e&&n.removeAttribute("style");Kv in n&&(n[Kv]=r?i.display:"",n[vR]&&(i.display="none"))}const Zv=/\s*!important$/;function xf(n,e,t){if(Xe(t))t.forEach(i=>xf(n,e,i));else if(t==null&&(t=""),e.startsWith("--"))n.setProperty(e,t);else{const i=MR(n,e);Zv.test(t)?n.setProperty(Gs(i),t.replace(Zv,""),"important"):n[i]=t}}const Jv=["Webkit","Moz","ms"],vp={};function MR(n,e){const t=vp[e];if(t)return t;let i=ai(e);if(i!=="filter"&&i in n)return vp[e]=i;i=Xh(i);for(let s=0;syp||(wR.then(()=>yp=0),yp=Date.now());function CR(n,e){const t=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=t.attached)return;ki(RR(i,t.value),e,5,[i])};return t.value=n,t.attached=AR(),t}function RR(n,e){if(Xe(e)){const t=n.stopImmediatePropagation;return n.stopImmediatePropagation=()=>{t.call(n),n._stopped=!0},e.map(i=>s=>!s._stopped&&i&&i(s))}else return e}const sy=n=>n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n.charCodeAt(2)>96&&n.charCodeAt(2)<123,PR=(n,e,t,i,s,r)=>{const o=s==="svg";e==="class"?_R(n,i,o):e==="style"?xR(n,t,i):Gh(e)?y0(e)||ER(n,e,t,i,r):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):IR(n,e,i,o))?(ty(n,e,i),!n.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&ey(n,e,i,o,r,e!=="value")):n._isVueCE&&(/[A-Z]/.test(e)||!Bt(i))?ty(n,ai(e),i,r,e):(e==="true-value"?n._trueValue=i:e==="false-value"&&(n._falseValue=i),ey(n,e,i,o))};function IR(n,e,t,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in n&&sy(e)&&et(t));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="form"||e==="list"&&n.tagName==="INPUT"||e==="type"&&n.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const s=n.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return sy(e)&&Bt(t)?!1:e in n}const br=n=>{const e=n.props["onUpdate:modelValue"]||!1;return Xe(e)?t=>_f(e,t):e};function LR(n){n.target.composing=!0}function ry(n){const e=n.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const bi=Symbol("_assign"),oy={created(n,{modifiers:{lazy:e,trim:t,number:i}},s){n[bi]=br(s);const r=i||s.props&&s.props.type==="number";Ts(n,e?"change":"input",o=>{if(o.target.composing)return;let a=n.value;t&&(a=a.trim()),r&&(a=Lf(a)),n[bi](a)}),t&&Ts(n,"change",()=>{n.value=n.value.trim()}),e||(Ts(n,"compositionstart",LR),Ts(n,"compositionend",ry),Ts(n,"change",ry))},mounted(n,{value:e}){n.value=e??""},beforeUpdate(n,{value:e,oldValue:t,modifiers:{lazy:i,trim:s,number:r}},o){if(n[bi]=br(o),n.composing)return;const a=(r||n.type==="number")&&!/^0\d/.test(n.value)?Lf(n.value):n.value,l=e??"";a!==l&&(document.activeElement===n&&n.type!=="range"&&(i&&e===t||s&&n.value.trim()===l)||(n.value=l))}},DR={deep:!0,created(n,e,t){n[bi]=br(t),Ts(n,"change",()=>{const i=n._modelValue,s=ba(n),r=n.checked,o=n[bi];if(Xe(i)){const a=M0(i,s),l=a!==-1;if(r&&!l)o(i.concat(s));else if(!r&&l){const c=[...i];c.splice(a,1),o(c)}}else if(Fa(i)){const a=new Set(i);r?a.add(s):a.delete(s),o(a)}else o(u1(n,r))})},mounted:ay,beforeUpdate(n,e,t){n[bi]=br(t),ay(n,e,t)}};function ay(n,{value:e,oldValue:t},i){n._modelValue=e;let s;if(Xe(e))s=M0(e,i.props.value)>-1;else if(Fa(e))s=e.has(i.props.value);else{if(e===t)return;s=xo(e,u1(n,!0))}n.checked!==s&&(n.checked=s)}const OR={created(n,{value:e},t){n.checked=xo(e,t.props.value),n[bi]=br(t),Ts(n,"change",()=>{n[bi](ba(n))})},beforeUpdate(n,{value:e,oldValue:t},i){n[bi]=br(i),e!==t&&(n.checked=xo(e,i.props.value))}},NR={deep:!0,created(n,{value:e,modifiers:{number:t}},i){const s=Fa(e);Ts(n,"change",()=>{const r=Array.prototype.filter.call(n.options,o=>o.selected).map(o=>t?Lf(ba(o)):ba(o));n[bi](n.multiple?s?new Set(r):r:r[0]),n._assigning=!0,Ar(()=>{n._assigning=!1})}),n[bi]=br(i)},mounted(n,{value:e}){ly(n,e)},beforeUpdate(n,e,t){n[bi]=br(t)},updated(n,{value:e}){n._assigning||ly(n,e)}};function ly(n,e){const t=n.multiple,i=Xe(e);if(!(t&&!i&&!Fa(e))){for(let s=0,r=n.options.length;sString(c)===String(a)):o.selected=M0(e,a)>-1}else o.selected=e.has(a);else if(xo(ba(o),e)){n.selectedIndex!==s&&(n.selectedIndex=s);return}}!t&&n.selectedIndex!==-1&&(n.selectedIndex=-1)}}function ba(n){return"_value"in n?n._value:n.value}function u1(n,e){const t=e?"_trueValue":"_falseValue";return t in n?n[t]:e}const TG={created(n,e,t){uu(n,e,t,null,"created")},mounted(n,e,t){uu(n,e,t,null,"mounted")},beforeUpdate(n,e,t,i){uu(n,e,t,i,"beforeUpdate")},updated(n,e,t,i){uu(n,e,t,i,"updated")}};function UR(n,e){switch(n){case"SELECT":return NR;case"TEXTAREA":return oy;default:switch(e){case"checkbox":return DR;case"radio":return OR;default:return oy}}}function uu(n,e,t,i,s){const o=UR(n.tagName,t.props&&t.props.type)[s];o&&o(n,e,t,i)}const FR=["ctrl","shift","alt","meta"],kR={stop:n=>n.stopPropagation(),prevent:n=>n.preventDefault(),self:n=>n.target!==n.currentTarget,ctrl:n=>!n.ctrlKey,shift:n=>!n.shiftKey,alt:n=>!n.altKey,meta:n=>!n.metaKey,left:n=>"button"in n&&n.button!==0,middle:n=>"button"in n&&n.button!==1,right:n=>"button"in n&&n.button!==2,exact:(n,e)=>FR.some(t=>n[`${t}Key`]&&!e.includes(t))},wG=(n,e)=>{const t=n._withMods||(n._withMods={}),i=e.join(".");return t[i]||(t[i]=(s,...r)=>{for(let o=0;o{const t=n._withKeys||(n._withKeys={}),i=e.join(".");return t[i]||(t[i]=s=>{if(!("key"in s))return;const r=Gs(s.key);if(e.some(o=>o===r||BR[o]===r))return n(s)})},zR=sn({patchProp:PR},uR);let cy;function f1(){return cy||(cy=ZS(zR))}const CG=(...n)=>{f1().render(...n)},VR=(...n)=>{const e=f1().createApp(...n),{mount:t}=e;return e.mount=i=>{const s=GR(i);if(!s)return;const r=e._component;!et(r)&&!r.render&&!r.template&&(r.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=t(s,!1,HR(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},e};function HR(n){if(n instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&n instanceof MathMLElement)return"mathml"}function GR(n){return Bt(n)?document.querySelector(n):n}const h1=new Set,Jn=new WeakMap,xa=new WeakMap,Mo=new WeakMap,fg=new WeakMap,WR=new WeakMap,Ma=new WeakMap,Vf=new WeakMap,gl=new WeakSet;let xr,z0=0,V0=0;const Cs="__aa_tgt",nc="__aa_del",Hf="__aa_new",XR=n=>{const e=ZR(n);e&&e.forEach(t=>JR(t))},$R=n=>{n.forEach(e=>{e.target===xr&&YR(),Jn.has(e.target)&&Co(e.target)})};function qR(n){const e=fg.get(n);e==null||e.disconnect();let t=Jn.get(n),i=0;const s=5;t||(t=Sa(n),Jn.set(n,t));const{offsetWidth:r,offsetHeight:o}=xr,l=[t.top-s,r-(t.left+s+t.width),o-(t.top+s+t.height),t.left-s].map(u=>`${-1*Math.floor(u)}px`).join(" "),c=new IntersectionObserver(()=>{++i>1&&Co(n)},{root:xr,threshold:1,rootMargin:l});c.observe(n),fg.set(n,c)}function Co(n){clearTimeout(Vf.get(n));const e=sd(n),t=ic(e)?500:e.duration;Vf.set(n,setTimeout(async()=>{const i=Mo.get(n);try{await(i==null?void 0:i.finished),Jn.set(n,Sa(n)),qR(n)}catch{}},t))}function YR(){clearTimeout(Vf.get(xr)),Vf.set(xr,setTimeout(()=>{h1.forEach(n=>g1(n,e=>d1(()=>Co(e))))},100))}function jR(n){setTimeout(()=>{WR.set(n,setInterval(()=>d1(Co.bind(null,n)),2e3))},Math.round(2e3*Math.random()))}function d1(n){typeof requestIdleCallback=="function"?requestIdleCallback(()=>n()):requestAnimationFrame(()=>n())}let hg,oa;const KR=typeof window<"u"&&"ResizeObserver"in window;KR&&(xr=document.documentElement,hg=new MutationObserver(XR),oa=new ResizeObserver($R),window.addEventListener("scroll",()=>{V0=window.scrollY,z0=window.scrollX}),oa.observe(xr));function ZR(n){return n.reduce((i,s)=>[...i,...Array.from(s.addedNodes),...Array.from(s.removedNodes)],[]).every(i=>i.nodeName==="#comment")?!1:n.reduce((i,s)=>{if(i===!1)return!1;if(s.target instanceof Element){if(bp(s.target),!i.has(s.target)){i.add(s.target);for(let r=0;rt(n,Ma.has(n)));for(let t=0;ts(i,Ma.has(i)))}}function G0(n){return Array.isArray(n)?n:[n]}function ic(n){return typeof n=="function"}function e3(n){const e=Jn.get(n),t=Sa(n);if(!H0(n))return Jn.set(n,t);let i;if(!e)return;const s=sd(n);if(typeof s!="function"){const r=e.left-t.left,o=e.top-t.top,[a,l,c,u]=p1(n,e,t),f={transform:`translate(${r}px, ${o}px)`},h={transform:"translate(0, 0)"};a!==l&&(f.width=`${a}px`,h.width=`${l}px`),c!==u&&(f.height=`${c}px`,h.height=`${u}px`),i=n.animate([f,h],{duration:s.duration,easing:s.easing})}else{const[r]=G0(s(n,"remain",e,t));i=new Animation(r),i.play()}Mo.set(n,i),Jn.set(n,t),i.addEventListener("finish",Co.bind(null,n))}function uy(n){Hf in n&&delete n[Hf];const e=Sa(n);Jn.set(n,e);const t=sd(n);if(!H0(n))return;let i;if(typeof t!="function")i=n.animate([{transform:"scale(.98)",opacity:0},{transform:"scale(0.98)",opacity:0,offset:.5},{transform:"scale(1)",opacity:1}],{duration:t.duration*1.5,easing:"ease-in"});else{const[s]=G0(t(n,"add",e));i=new Animation(s),i.play()}Mo.set(n,i),i.addEventListener("finish",Co.bind(null,n))}function fy(n,e){var t;n.remove(),Jn.delete(n),xa.delete(n),Mo.delete(n),(t=fg.get(n))===null||t===void 0||t.disconnect(),setTimeout(()=>{if(nc in n&&delete n[nc],Object.defineProperty(n,Hf,{value:!0,configurable:!0}),e&&n instanceof HTMLElement)for(const i in e)n.style[i]=""},0)}function t3(n){var e;if(!xa.has(n)||!Jn.has(n))return;const[t,i]=xa.get(n);Object.defineProperty(n,nc,{value:!0,configurable:!0});const s=window.scrollX,r=window.scrollY;if(i&&i.parentNode&&i.parentNode instanceof Element?i.parentNode.insertBefore(n,i):t&&t.parentNode?t.parentNode.appendChild(n):(e=m1(n))===null||e===void 0||e.appendChild(n),!H0(n))return fy(n);const[o,a,l,c]=i3(n),u=sd(n),f=Jn.get(n);(s!==z0||r!==V0)&&n3(n,s,r,u);let h,d={position:"absolute",top:`${o}px`,left:`${a}px`,width:`${l}px`,height:`${c}px`,margin:"0",pointerEvents:"none",transformOrigin:"center",zIndex:"100"};if(!ic(u))Object.assign(n.style,d),h=n.animate([{transform:"scale(1)",opacity:1},{transform:"scale(.98)",opacity:0}],{duration:u.duration,easing:"ease-out"});else{const[p,_]=G0(u(n,"remove",f));(_==null?void 0:_.styleReset)!==!1&&(d=(_==null?void 0:_.styleReset)||d,Object.assign(n.style,d)),h=new Animation(p),h.play()}Mo.set(n,h),h.addEventListener("finish",fy.bind(null,n,d))}function n3(n,e,t,i){const s=z0-e,r=V0-t,o=document.documentElement.style.scrollBehavior;if(getComputedStyle(xr).scrollBehavior==="smooth"&&(document.documentElement.style.scrollBehavior="auto"),window.scrollTo(window.scrollX+s,window.scrollY+r),!n.parentElement)return;const l=n.parentElement;let c=l.clientHeight,u=l.clientWidth;const f=performance.now();function h(){requestAnimationFrame(()=>{if(!ic(i)){const d=c-l.clientHeight,p=u-l.clientWidth;f+i.duration>performance.now()?(window.scrollTo({left:window.scrollX-p,top:window.scrollY-d}),c=l.clientHeight,u=l.clientWidth,h()):document.documentElement.style.scrollBehavior=o}})}h()}function i3(n){const e=Jn.get(n),[t,,i]=p1(n,e,Sa(n));let s=n.parentElement;for(;s&&(getComputedStyle(s).position==="static"||s instanceof HTMLBodyElement);)s=s.parentElement;s||(s=document.body);const r=getComputedStyle(s),o=Jn.get(s)||Sa(s),a=Math.round(e.top-o.top)-ji(r.borderTopWidth),l=Math.round(e.left-o.left)-ji(r.borderLeftWidth);return[a,l,t,i]}function s3(n,e={}){return hg&&oa&&(window.matchMedia("(prefers-reduced-motion: reduce)").matches&&!ic(e)&&!e.disrespectUserMotionPreference||(gl.add(n),getComputedStyle(n).position==="static"&&Object.assign(n.style,{position:"relative"}),g1(n,Co,jR,s=>oa==null?void 0:oa.observe(s)),ic(e)?Ma.set(n,e):Ma.set(n,{duration:250,easing:"ease-in-out",...e}),hg.observe(n,{childList:!0}),h1.add(n))),Object.freeze({parent:n,enable:()=>{gl.add(n)},disable:()=>{gl.delete(n)},isEnabled:()=>gl.has(n)})}const r3={mounted:(n,e)=>{s3(n,e.value||{})},getSSRProps:()=>({})},o3=r3,a3={install(n){n.directive("auto-animate",o3)}};/** * @license * Copyright 2010-2025 Three.js Authors * SPDX-License-Identifier: MIT - */const Uc="177",l3={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},c3={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},_1=0,hg=1,v1=2,u3=3,f3=0,G0=1,W0=2,Ki=3,Bs=0,Vn=1,Ii=2,Ds=0,_o=1,dg=2,pg=3,mg=4,y1=5,hr=100,b1=101,x1=102,M1=103,S1=104,E1=200,T1=201,w1=202,A1=203,Gf=204,Wf=205,C1=206,R1=207,P1=208,I1=209,L1=210,D1=211,O1=212,N1=213,U1=214,Xf=0,$f=1,qf=2,So=3,Yf=4,jf=5,Kf=6,Zf=7,Fc=0,F1=1,k1=2,ts=0,B1=1,z1=2,V1=3,rd=4,H1=5,G1=6,W1=7,gg="attached",X1="detached",od=300,zs=301,Mr=302,sc=303,rc=304,Ba=306,oc=1e3,gi=1001,ac=1002,yn=1003,X0=1004,h3=1004,aa=1005,d3=1005,nn=1006,wl=1007,p3=1007,Qi=1008,m3=1008,Bi=1009,$0=1010,q0=1011,Ea=1012,ad=1013,Vs=1014,Zn=1015,za=1016,ld=1017,cd=1018,Ta=1020,Y0=35902,j0=1021,K0=1022,zn=1023,wa=1026,Aa=1027,ud=1028,kc=1029,Z0=1030,fd=1031,g3=1032,hd=1033,Al=33776,Cl=33777,Rl=33778,Pl=33779,Jf=35840,Qf=35841,eh=35842,th=35843,nh=36196,ih=37492,sh=37496,rh=37808,oh=37809,ah=37810,lh=37811,ch=37812,uh=37813,fh=37814,hh=37815,dh=37816,ph=37817,mh=37818,gh=37819,_h=37820,vh=37821,Il=36492,yh=36494,bh=36495,J0=36283,xh=36284,Mh=36285,Sh=36286,$1=2200,q1=2201,Y1=2202,lc=2300,Eh=2301,Mf=2302,uo=2400,fo=2401,cc=2402,dd=2500,Q0=2501,_3=0,v3=1,y3=2,j1=3200,K1=3201,b3=3202,x3=3203,Cr=0,Z1=1,ws="",Fn="srgb",Eo="srgb-linear",uc="linear",Ct="srgb",M3=0,so=7680,S3=7681,E3=7682,T3=7683,w3=34055,A3=34056,C3=5386,R3=512,P3=513,I3=514,L3=515,D3=516,O3=517,N3=518,_g=519,J1=512,Q1=513,eE=514,e_=515,tE=516,nE=517,iE=518,sE=519,fc=35044,U3=35048,F3=35040,k3=35045,B3=35049,z3=35041,V3=35046,H3=35050,G3=35042,W3="100",vg="300 es",_i=2e3,hc=2001,X3={COMPUTE:"compute",RENDER:"render"},$3={PERSPECTIVE:"perspective",LINEAR:"linear",FLAT:"flat"},q3={NORMAL:"normal",CENTROID:"centroid",SAMPLE:"sample",FLAT_FIRST:"flat first",FLAT_EITHER:"flat either"};class as{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){const i=this._listeners;return i===void 0?!1:i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){const i=this._listeners;if(i===void 0)return;const s=i[e];if(s!==void 0){const r=s.indexOf(t);r!==-1&&s.splice(r,1)}}dispatchEvent(e){const t=this._listeners;if(t===void 0)return;const i=t[e.type];if(i!==void 0){e.target=this;const s=i.slice(0);for(let r=0,o=s.length;r>8&255]+Mn[n>>16&255]+Mn[n>>24&255]+"-"+Mn[e&255]+Mn[e>>8&255]+"-"+Mn[e>>16&15|64]+Mn[e>>24&255]+"-"+Mn[t&63|128]+Mn[t>>8&255]+"-"+Mn[t>>16&255]+Mn[t>>24&255]+Mn[i&255]+Mn[i>>8&255]+Mn[i>>16&255]+Mn[i>>24&255]).toLowerCase()}function st(n,e,t){return Math.max(e,Math.min(t,n))}function t_(n,e){return(n%e+e)%e}function Y3(n,e,t,i,s){return i+(n-e)*(s-i)/(t-e)}function j3(n,e,t){return n!==e?(t-n)/(e-n):0}function Ll(n,e,t){return(1-t)*n+t*e}function K3(n,e,t,i){return Ll(n,e,1-Math.exp(-t*i))}function Z3(n,e=1){return e-Math.abs(t_(n,e*2)-e)}function J3(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function Q3(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function eP(n,e){return n+Math.floor(Math.random()*(e-n+1))}function tP(n,e){return n+Math.random()*(e-n)}function nP(n){return n*(.5-Math.random())}function iP(n){n!==void 0&&(fy=n);let e=fy+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function sP(n){return n*vo}function rP(n){return n*Ca}function oP(n){return(n&n-1)===0&&n!==0}function aP(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function lP(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function cP(n,e,t,i,s){const r=Math.cos,o=Math.sin,a=r(t/2),l=o(t/2),c=r((e+i)/2),u=o((e+i)/2),f=r((e-i)/2),h=o((e-i)/2),d=r((i-e)/2),p=o((i-e)/2);switch(s){case"XYX":n.set(a*u,l*f,l*h,a*c);break;case"YZY":n.set(l*h,a*u,l*f,a*c);break;case"ZXZ":n.set(l*f,l*h,a*u,a*c);break;case"XZX":n.set(a*u,l*p,l*d,a*c);break;case"YXY":n.set(l*d,a*u,l*p,a*c);break;case"ZYZ":n.set(l*p,l*d,a*u,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+s)}}function Bn(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return n/4294967295;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int32Array:return Math.max(n/2147483647,-1);case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function lt(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return Math.round(n*4294967295);case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int32Array:return Math.round(n*2147483647);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}const n_={DEG2RAD:vo,RAD2DEG:Ca,generateUUID:oi,clamp:st,euclideanModulo:t_,mapLinear:Y3,inverseLerp:j3,lerp:Ll,damp:K3,pingpong:Z3,smoothstep:J3,smootherstep:Q3,randInt:eP,randFloat:tP,randFloatSpread:nP,seededRandom:iP,degToRad:sP,radToDeg:rP,isPowerOfTwo:oP,ceilPowerOfTwo:aP,floorPowerOfTwo:lP,setQuaternionFromProperEuler:cP,normalize:lt,denormalize:Bn};class fe{constructor(e=0,t=0){fe.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,i=this.y,s=e.elements;return this.x=s[0]*t+s[3]*i+s[6],this.y=s[1]*t+s[4]*i+s[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=st(this.x,e.x,t.x),this.y=st(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=st(this.x,e,t),this.y=st(this.y,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(st(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(st(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const i=Math.cos(t),s=Math.sin(t),r=this.x-e.x,o=this.y-e.y;return this.x=r*i-o*s+e.x,this.y=r*s+o*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Qn{constructor(e=0,t=0,i=0,s=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=i,this._w=s}static slerpFlat(e,t,i,s,r,o,a){let l=i[s+0],c=i[s+1],u=i[s+2],f=i[s+3];const h=r[o+0],d=r[o+1],p=r[o+2],_=r[o+3];if(a===0){e[t+0]=l,e[t+1]=c,e[t+2]=u,e[t+3]=f;return}if(a===1){e[t+0]=h,e[t+1]=d,e[t+2]=p,e[t+3]=_;return}if(f!==_||l!==h||c!==d||u!==p){let g=1-a;const m=l*h+c*d+u*p+f*_,v=m>=0?1:-1,b=1-m*m;if(b>Number.EPSILON){const T=Math.sqrt(b),w=Math.atan2(T,m*v);g=Math.sin(g*w)/T,a=Math.sin(a*w)/T}const y=a*v;if(l=l*g+h*y,c=c*g+d*y,u=u*g+p*y,f=f*g+_*y,g===1-a){const T=1/Math.sqrt(l*l+c*c+u*u+f*f);l*=T,c*=T,u*=T,f*=T}}e[t]=l,e[t+1]=c,e[t+2]=u,e[t+3]=f}static multiplyQuaternionsFlat(e,t,i,s,r,o){const a=i[s],l=i[s+1],c=i[s+2],u=i[s+3],f=r[o],h=r[o+1],d=r[o+2],p=r[o+3];return e[t]=a*p+u*f+l*d-c*h,e[t+1]=l*p+u*h+c*f-a*d,e[t+2]=c*p+u*d+a*h-l*f,e[t+3]=u*p-a*f-l*h-c*d,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,s){return this._x=e,this._y=t,this._z=i,this._w=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const i=e._x,s=e._y,r=e._z,o=e._order,a=Math.cos,l=Math.sin,c=a(i/2),u=a(s/2),f=a(r/2),h=l(i/2),d=l(s/2),p=l(r/2);switch(o){case"XYZ":this._x=h*u*f+c*d*p,this._y=c*d*f-h*u*p,this._z=c*u*p+h*d*f,this._w=c*u*f-h*d*p;break;case"YXZ":this._x=h*u*f+c*d*p,this._y=c*d*f-h*u*p,this._z=c*u*p-h*d*f,this._w=c*u*f+h*d*p;break;case"ZXY":this._x=h*u*f-c*d*p,this._y=c*d*f+h*u*p,this._z=c*u*p+h*d*f,this._w=c*u*f-h*d*p;break;case"ZYX":this._x=h*u*f-c*d*p,this._y=c*d*f+h*u*p,this._z=c*u*p-h*d*f,this._w=c*u*f+h*d*p;break;case"YZX":this._x=h*u*f+c*d*p,this._y=c*d*f+h*u*p,this._z=c*u*p-h*d*f,this._w=c*u*f-h*d*p;break;case"XZY":this._x=h*u*f-c*d*p,this._y=c*d*f-h*u*p,this._z=c*u*p+h*d*f,this._w=c*u*f+h*d*p;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/2,s=Math.sin(i);return this._x=e.x*s,this._y=e.y*s,this._z=e.z*s,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],s=t[4],r=t[8],o=t[1],a=t[5],l=t[9],c=t[2],u=t[6],f=t[10],h=i+a+f;if(h>0){const d=.5/Math.sqrt(h+1);this._w=.25/d,this._x=(u-l)*d,this._y=(r-c)*d,this._z=(o-s)*d}else if(i>a&&i>f){const d=2*Math.sqrt(1+i-a-f);this._w=(u-l)/d,this._x=.25*d,this._y=(s+o)/d,this._z=(r+c)/d}else if(a>f){const d=2*Math.sqrt(1+a-i-f);this._w=(r-c)/d,this._x=(s+o)/d,this._y=.25*d,this._z=(l+u)/d}else{const d=2*Math.sqrt(1+f-i-a);this._w=(o-s)/d,this._x=(r+c)/d,this._y=(l+u)/d,this._z=.25*d}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(st(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(i===0)return this;const s=Math.min(1,t/i);return this.slerp(e,s),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const i=e._x,s=e._y,r=e._z,o=e._w,a=t._x,l=t._y,c=t._z,u=t._w;return this._x=i*u+o*a+s*c-r*l,this._y=s*u+o*l+r*a-i*c,this._z=r*u+o*c+i*l-s*a,this._w=o*u-i*a-s*l-r*c,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const i=this._x,s=this._y,r=this._z,o=this._w;let a=o*e._w+i*e._x+s*e._y+r*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=i,this._y=s,this._z=r,this;const l=1-a*a;if(l<=Number.EPSILON){const d=1-t;return this._w=d*o+t*this._w,this._x=d*i+t*this._x,this._y=d*s+t*this._y,this._z=d*r+t*this._z,this.normalize(),this}const c=Math.sqrt(l),u=Math.atan2(c,a),f=Math.sin((1-t)*u)/c,h=Math.sin(t*u)/c;return this._w=o*f+this._w*h,this._x=i*f+this._x*h,this._y=s*f+this._y*h,this._z=r*f+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){const e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),i=Math.random(),s=Math.sqrt(1-i),r=Math.sqrt(i);return this.set(s*Math.sin(e),s*Math.cos(e),r*Math.sin(t),r*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class k{constructor(e=0,t=0,i=0){k.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(hy.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(hy.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,s=this.z,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6]*s,this.y=r[1]*t+r[4]*i+r[7]*s,this.z=r[2]*t+r[5]*i+r[8]*s,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,s=this.z,r=e.elements,o=1/(r[3]*t+r[7]*i+r[11]*s+r[15]);return this.x=(r[0]*t+r[4]*i+r[8]*s+r[12])*o,this.y=(r[1]*t+r[5]*i+r[9]*s+r[13])*o,this.z=(r[2]*t+r[6]*i+r[10]*s+r[14])*o,this}applyQuaternion(e){const t=this.x,i=this.y,s=this.z,r=e.x,o=e.y,a=e.z,l=e.w,c=2*(o*s-a*i),u=2*(a*t-r*s),f=2*(r*i-o*t);return this.x=t+l*c+o*f-a*u,this.y=i+l*u+a*c-r*f,this.z=s+l*f+r*u-o*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,i=this.y,s=this.z,r=e.elements;return this.x=r[0]*t+r[4]*i+r[8]*s,this.y=r[1]*t+r[5]*i+r[9]*s,this.z=r[2]*t+r[6]*i+r[10]*s,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=st(this.x,e.x,t.x),this.y=st(this.y,e.y,t.y),this.z=st(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=st(this.x,e,t),this.y=st(this.y,e,t),this.z=st(this.z,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(st(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,s=e.y,r=e.z,o=t.x,a=t.y,l=t.z;return this.x=s*l-r*a,this.y=r*o-i*l,this.z=i*a-s*o,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return xp.copy(this).projectOnVector(e),this.sub(xp)}reflect(e){return this.sub(xp.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(st(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,s=this.z-e.z;return t*t+i*i+s*s}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){const s=Math.sin(t)*e;return this.x=s*Math.sin(i),this.y=Math.cos(t)*e,this.z=s*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),s=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=s,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,t=Math.random()*2-1,i=Math.sqrt(1-t*t);return this.x=i*Math.cos(e),this.y=t,this.z=i*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const xp=new k,hy=new Qn;class at{constructor(e,t,i,s,r,o,a,l,c){at.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,i,s,r,o,a,l,c)}set(e,t,i,s,r,o,a,l,c){const u=this.elements;return u[0]=e,u[1]=s,u[2]=a,u[3]=t,u[4]=r,u[5]=l,u[6]=i,u[7]=o,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,s=t.elements,r=this.elements,o=i[0],a=i[3],l=i[6],c=i[1],u=i[4],f=i[7],h=i[2],d=i[5],p=i[8],_=s[0],g=s[3],m=s[6],v=s[1],b=s[4],y=s[7],T=s[2],w=s[5],S=s[8];return r[0]=o*_+a*v+l*T,r[3]=o*g+a*b+l*w,r[6]=o*m+a*y+l*S,r[1]=c*_+u*v+f*T,r[4]=c*g+u*b+f*w,r[7]=c*m+u*y+f*S,r[2]=h*_+d*v+p*T,r[5]=h*g+d*b+p*w,r[8]=h*m+d*y+p*S,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return t*o*u-t*a*c-i*r*u+i*a*l+s*r*c-s*o*l}invert(){const e=this.elements,t=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],f=u*o-a*c,h=a*l-u*r,d=c*r-o*l,p=t*f+i*h+s*d;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);const _=1/p;return e[0]=f*_,e[1]=(s*c-u*i)*_,e[2]=(a*i-s*o)*_,e[3]=h*_,e[4]=(u*t-s*l)*_,e[5]=(s*r-a*t)*_,e[6]=d*_,e[7]=(i*l-c*t)*_,e[8]=(o*t-i*r)*_,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,s,r,o,a){const l=Math.cos(r),c=Math.sin(r);return this.set(i*l,i*c,-i*(l*o+c*a)+o+e,-s*c,s*l,-s*(-c*o+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(Mp.makeScale(e,t)),this}rotate(e){return this.premultiply(Mp.makeRotation(-e)),this}translate(e,t){return this.premultiply(Mp.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,i=e.elements;for(let s=0;s<9;s++)if(t[s]!==i[s])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const Mp=new at;function rE(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}const uP={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function la(n,e){return new uP[n](e)}function dc(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function oE(){const n=dc("canvas");return n.style.display="block",n}const dy={};function ga(n){n in dy||(dy[n]=!0,console.warn(n))}function fP(n,e,t){return new Promise(function(i,s){function r(){switch(n.clientWaitSync(e,n.SYNC_FLUSH_COMMANDS_BIT,0)){case n.WAIT_FAILED:s();break;case n.TIMEOUT_EXPIRED:setTimeout(r,t);break;default:i()}}setTimeout(r,t)})}function hP(n){const e=n.elements;e[2]=.5*e[2]+.5*e[3],e[6]=.5*e[6]+.5*e[7],e[10]=.5*e[10]+.5*e[11],e[14]=.5*e[14]+.5*e[15]}function dP(n){const e=n.elements;e[11]===-1?(e[10]=-e[10]-1,e[14]=-e[14]):(e[10]=-e[10],e[14]=-e[14]+1)}const py=new at().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),my=new at().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function pP(){const n={enabled:!0,workingColorSpace:Eo,spaces:{},convert:function(s,r,o){return this.enabled===!1||r===o||!r||!o||(this.spaces[r].transfer===Ct&&(s.r=Os(s.r),s.g=Os(s.g),s.b=Os(s.b)),this.spaces[r].primaries!==this.spaces[o].primaries&&(s.applyMatrix3(this.spaces[r].toXYZ),s.applyMatrix3(this.spaces[o].fromXYZ)),this.spaces[o].transfer===Ct&&(s.r=_a(s.r),s.g=_a(s.g),s.b=_a(s.b))),s},workingToColorSpace:function(s,r){return this.convert(s,this.workingColorSpace,r)},colorSpaceToWorking:function(s,r){return this.convert(s,r,this.workingColorSpace)},getPrimaries:function(s){return this.spaces[s].primaries},getTransfer:function(s){return s===ws?uc:this.spaces[s].transfer},getLuminanceCoefficients:function(s,r=this.workingColorSpace){return s.fromArray(this.spaces[r].luminanceCoefficients)},define:function(s){Object.assign(this.spaces,s)},_getMatrix:function(s,r,o){return s.copy(this.spaces[r].toXYZ).multiply(this.spaces[o].fromXYZ)},_getDrawingBufferColorSpace:function(s){return this.spaces[s].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(s=this.workingColorSpace){return this.spaces[s].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(s,r){return ga("THREE.ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),n.workingToColorSpace(s,r)},toWorkingColorSpace:function(s,r){return ga("THREE.ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),n.colorSpaceToWorking(s,r)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],i=[.3127,.329];return n.define({[Eo]:{primaries:e,whitePoint:i,transfer:uc,toXYZ:py,fromXYZ:my,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:Fn},outputColorSpaceConfig:{drawingBufferColorSpace:Fn}},[Fn]:{primaries:e,whitePoint:i,transfer:Ct,toXYZ:py,fromXYZ:my,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:Fn}}}),n}const pt=pP();function Os(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function _a(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}let ko;class aE{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let i;if(e instanceof HTMLCanvasElement)i=e;else{ko===void 0&&(ko=dc("canvas")),ko.width=e.width,ko.height=e.height;const s=ko.getContext("2d");e instanceof ImageData?s.putImageData(e,0,0):s.drawImage(e,0,0,e.width,e.height),i=ko}return i.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=dc("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const s=i.getImageData(0,0,e.width,e.height),r=s.data;for(let o=0;o1),this.pmremVersion=0}get width(){return this.source.getSize(Ep).x}get height(){return this.source.getSize(Ep).y}get depth(){return this.source.getSize(Ep).z}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(const t in e){const i=e[t];if(i===void 0){console.warn(`THREE.Texture.setValues(): parameter '${t}' has value of undefined.`);continue}const s=this[t];if(s===void 0){console.warn(`THREE.Texture.setValues(): property '${t}' does not exist.`);continue}s&&i&&s.isVector2&&i.isVector2||s&&i&&s.isVector3&&i.isVector3||s&&i&&s.isMatrix3&&i.isMatrix3?s.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const i={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(i.userData=this.userData),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==od)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case oc:e.x=e.x-Math.floor(e.x);break;case gi:e.x=e.x<0?0:1;break;case ac:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case oc:e.y=e.y-Math.floor(e.y);break;case gi:e.y=e.y<0?0:1;break;case ac:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}$t.DEFAULT_IMAGE=null;$t.DEFAULT_MAPPING=od;$t.DEFAULT_ANISOTROPY=1;class vt{constructor(e=0,t=0,i=0,s=1){vt.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=s}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,s){return this.x=e,this.y=t,this.z=i,this.w=s,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,i=this.y,s=this.z,r=this.w,o=e.elements;return this.x=o[0]*t+o[4]*i+o[8]*s+o[12]*r,this.y=o[1]*t+o[5]*i+o[9]*s+o[13]*r,this.z=o[2]*t+o[6]*i+o[10]*s+o[14]*r,this.w=o[3]*t+o[7]*i+o[11]*s+o[15]*r,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,s,r;const l=e.elements,c=l[0],u=l[4],f=l[8],h=l[1],d=l[5],p=l[9],_=l[2],g=l[6],m=l[10];if(Math.abs(u-h)<.01&&Math.abs(f-_)<.01&&Math.abs(p-g)<.01){if(Math.abs(u+h)<.1&&Math.abs(f+_)<.1&&Math.abs(p+g)<.1&&Math.abs(c+d+m-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const b=(c+1)/2,y=(d+1)/2,T=(m+1)/2,w=(u+h)/4,S=(f+_)/4,P=(p+g)/4;return b>y&&b>T?b<.01?(i=0,s=.707106781,r=.707106781):(i=Math.sqrt(b),s=w/i,r=S/i):y>T?y<.01?(i=.707106781,s=0,r=.707106781):(s=Math.sqrt(y),i=w/s,r=P/s):T<.01?(i=.707106781,s=.707106781,r=0):(r=Math.sqrt(T),i=S/r,s=P/r),this.set(i,s,r,t),this}let v=Math.sqrt((g-p)*(g-p)+(f-_)*(f-_)+(h-u)*(h-u));return Math.abs(v)<.001&&(v=1),this.x=(g-p)/v,this.y=(f-_)/v,this.z=(h-u)/v,this.w=Math.acos((c+d+m-1)/2),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=st(this.x,e.x,t.x),this.y=st(this.y,e.y,t.y),this.z=st(this.z,e.z,t.z),this.w=st(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=st(this.x,e,t),this.y=st(this.y,e,t),this.z=st(this.z,e,t),this.w=st(this.w,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(st(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class i_ extends as{constructor(e=1,t=1,i={}){super(),i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:nn,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},i),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=i.depth,this.scissor=new vt(0,0,e,t),this.scissorTest=!1,this.viewport=new vt(0,0,e,t);const s={width:e,height:t,depth:i.depth},r=new $t(s);this.textures=[];const o=i.count;for(let a=0;a1;this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,i=e.textures.length;t=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,Ai),Ai.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Ja),hu.subVectors(this.max,Ja),Bo.subVectors(e.a,Ja),zo.subVectors(e.b,Ja),Vo.subVectors(e.c,Ja),Ks.subVectors(zo,Bo),Zs.subVectors(Vo,zo),Vr.subVectors(Bo,Vo);let t=[0,-Ks.z,Ks.y,0,-Zs.z,Zs.y,0,-Vr.z,Vr.y,Ks.z,0,-Ks.x,Zs.z,0,-Zs.x,Vr.z,0,-Vr.x,-Ks.y,Ks.x,0,-Zs.y,Zs.x,0,-Vr.y,Vr.x,0];return!Tp(t,Bo,zo,Vo,hu)||(t=[1,0,0,0,1,0,0,0,1],!Tp(t,Bo,zo,Vo,hu))?!1:(du.crossVectors(Ks,Zs),t=[du.x,du.y,du.z],Tp(t,Bo,zo,Vo,hu))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Ai).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Ai).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(ds[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),ds[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),ds[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),ds[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),ds[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),ds[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),ds[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),ds[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(ds),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}}const ds=[new k,new k,new k,new k,new k,new k,new k,new k],Ai=new k,fu=new Cn,Bo=new k,zo=new k,Vo=new k,Ks=new k,Zs=new k,Vr=new k,Ja=new k,hu=new k,du=new k,Hr=new k;function Tp(n,e,t,i,s){for(let r=0,o=n.length-3;r<=o;r+=3){Hr.fromArray(n,r);const a=s.x*Math.abs(Hr.x)+s.y*Math.abs(Hr.y)+s.z*Math.abs(Hr.z),l=e.dot(Hr),c=t.dot(Hr),u=i.dot(Hr);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const yP=new Cn,Qa=new k,wp=new k;class bn{constructor(e=new k,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const i=this.center;t!==void 0?i.copy(t):yP.setFromPoints(e).getCenter(i);let s=0;for(let r=0,o=e.length;rthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Qa.subVectors(e,this.center);const t=Qa.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),s=(i-this.radius)*.5;this.center.addScaledVector(Qa,s/i),this.radius+=s}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(wp.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Qa.copy(e.center).add(wp)),this.expandByPoint(Qa.copy(e.center).sub(wp))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}}const ps=new k,Ap=new k,pu=new k,Js=new k,Cp=new k,mu=new k,Rp=new k;class Va{constructor(e=new k,t=new k(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,ps)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=ps.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(ps.copy(this.origin).addScaledVector(this.direction,t),ps.distanceToSquared(e))}distanceSqToSegment(e,t,i,s){Ap.copy(e).add(t).multiplyScalar(.5),pu.copy(t).sub(e).normalize(),Js.copy(this.origin).sub(Ap);const r=e.distanceTo(t)*.5,o=-this.direction.dot(pu),a=Js.dot(this.direction),l=-Js.dot(pu),c=Js.lengthSq(),u=Math.abs(1-o*o);let f,h,d,p;if(u>0)if(f=o*l-a,h=o*a-l,p=r*u,f>=0)if(h>=-p)if(h<=p){const _=1/u;f*=_,h*=_,d=f*(f+o*h+2*a)+h*(o*f+h+2*l)+c}else h=r,f=Math.max(0,-(o*h+a)),d=-f*f+h*(h+2*l)+c;else h=-r,f=Math.max(0,-(o*h+a)),d=-f*f+h*(h+2*l)+c;else h<=-p?(f=Math.max(0,-(-o*r+a)),h=f>0?-r:Math.min(Math.max(-r,-l),r),d=-f*f+h*(h+2*l)+c):h<=p?(f=0,h=Math.min(Math.max(-r,-l),r),d=h*(h+2*l)+c):(f=Math.max(0,-(o*r+a)),h=f>0?r:Math.min(Math.max(-r,-l),r),d=-f*f+h*(h+2*l)+c);else h=o>0?-r:r,f=Math.max(0,-(o*h+a)),d=-f*f+h*(h+2*l)+c;return i&&i.copy(this.origin).addScaledVector(this.direction,f),s&&s.copy(Ap).addScaledVector(pu,h),d}intersectSphere(e,t){ps.subVectors(e.center,this.origin);const i=ps.dot(this.direction),s=ps.dot(ps)-i*i,r=e.radius*e.radius;if(s>r)return null;const o=Math.sqrt(r-s),a=i-o,l=i+o;return l<0?null:a<0?this.at(l,t):this.at(a,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){const i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,s,r,o,a,l;const c=1/this.direction.x,u=1/this.direction.y,f=1/this.direction.z,h=this.origin;return c>=0?(i=(e.min.x-h.x)*c,s=(e.max.x-h.x)*c):(i=(e.max.x-h.x)*c,s=(e.min.x-h.x)*c),u>=0?(r=(e.min.y-h.y)*u,o=(e.max.y-h.y)*u):(r=(e.max.y-h.y)*u,o=(e.min.y-h.y)*u),i>o||r>s||((r>i||isNaN(i))&&(i=r),(o=0?(a=(e.min.z-h.z)*f,l=(e.max.z-h.z)*f):(a=(e.max.z-h.z)*f,l=(e.min.z-h.z)*f),i>l||a>s)||((a>i||i!==i)&&(i=a),(l=0?i:s,t)}intersectsBox(e){return this.intersectBox(e,ps)!==null}intersectTriangle(e,t,i,s,r){Cp.subVectors(t,e),mu.subVectors(i,e),Rp.crossVectors(Cp,mu);let o=this.direction.dot(Rp),a;if(o>0){if(s)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Js.subVectors(this.origin,e);const l=a*this.direction.dot(mu.crossVectors(Js,mu));if(l<0)return null;const c=a*this.direction.dot(Cp.cross(Js));if(c<0||l+c>o)return null;const u=-a*Js.dot(Rp);return u<0?null:this.at(u/o,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Je{constructor(e,t,i,s,r,o,a,l,c,u,f,h,d,p,_,g){Je.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,i,s,r,o,a,l,c,u,f,h,d,p,_,g)}set(e,t,i,s,r,o,a,l,c,u,f,h,d,p,_,g){const m=this.elements;return m[0]=e,m[4]=t,m[8]=i,m[12]=s,m[1]=r,m[5]=o,m[9]=a,m[13]=l,m[2]=c,m[6]=u,m[10]=f,m[14]=h,m[3]=d,m[7]=p,m[11]=_,m[15]=g,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Je().fromArray(this.elements)}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){const t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,i=e.elements,s=1/Ho.setFromMatrixColumn(e,0).length(),r=1/Ho.setFromMatrixColumn(e,1).length(),o=1/Ho.setFromMatrixColumn(e,2).length();return t[0]=i[0]*s,t[1]=i[1]*s,t[2]=i[2]*s,t[3]=0,t[4]=i[4]*r,t[5]=i[5]*r,t[6]=i[6]*r,t[7]=0,t[8]=i[8]*o,t[9]=i[9]*o,t[10]=i[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,i=e.x,s=e.y,r=e.z,o=Math.cos(i),a=Math.sin(i),l=Math.cos(s),c=Math.sin(s),u=Math.cos(r),f=Math.sin(r);if(e.order==="XYZ"){const h=o*u,d=o*f,p=a*u,_=a*f;t[0]=l*u,t[4]=-l*f,t[8]=c,t[1]=d+p*c,t[5]=h-_*c,t[9]=-a*l,t[2]=_-h*c,t[6]=p+d*c,t[10]=o*l}else if(e.order==="YXZ"){const h=l*u,d=l*f,p=c*u,_=c*f;t[0]=h+_*a,t[4]=p*a-d,t[8]=o*c,t[1]=o*f,t[5]=o*u,t[9]=-a,t[2]=d*a-p,t[6]=_+h*a,t[10]=o*l}else if(e.order==="ZXY"){const h=l*u,d=l*f,p=c*u,_=c*f;t[0]=h-_*a,t[4]=-o*f,t[8]=p+d*a,t[1]=d+p*a,t[5]=o*u,t[9]=_-h*a,t[2]=-o*c,t[6]=a,t[10]=o*l}else if(e.order==="ZYX"){const h=o*u,d=o*f,p=a*u,_=a*f;t[0]=l*u,t[4]=p*c-d,t[8]=h*c+_,t[1]=l*f,t[5]=_*c+h,t[9]=d*c-p,t[2]=-c,t[6]=a*l,t[10]=o*l}else if(e.order==="YZX"){const h=o*l,d=o*c,p=a*l,_=a*c;t[0]=l*u,t[4]=_-h*f,t[8]=p*f+d,t[1]=f,t[5]=o*u,t[9]=-a*u,t[2]=-c*u,t[6]=d*f+p,t[10]=h-_*f}else if(e.order==="XZY"){const h=o*l,d=o*c,p=a*l,_=a*c;t[0]=l*u,t[4]=-f,t[8]=c*u,t[1]=h*f+_,t[5]=o*u,t[9]=d*f-p,t[2]=p*f-d,t[6]=a*u,t[10]=_*f+h}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(bP,e,xP)}lookAt(e,t,i){const s=this.elements;return ii.subVectors(e,t),ii.lengthSq()===0&&(ii.z=1),ii.normalize(),Qs.crossVectors(i,ii),Qs.lengthSq()===0&&(Math.abs(i.z)===1?ii.x+=1e-4:ii.z+=1e-4,ii.normalize(),Qs.crossVectors(i,ii)),Qs.normalize(),gu.crossVectors(ii,Qs),s[0]=Qs.x,s[4]=gu.x,s[8]=ii.x,s[1]=Qs.y,s[5]=gu.y,s[9]=ii.y,s[2]=Qs.z,s[6]=gu.z,s[10]=ii.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,s=t.elements,r=this.elements,o=i[0],a=i[4],l=i[8],c=i[12],u=i[1],f=i[5],h=i[9],d=i[13],p=i[2],_=i[6],g=i[10],m=i[14],v=i[3],b=i[7],y=i[11],T=i[15],w=s[0],S=s[4],P=s[8],M=s[12],E=s[1],D=s[5],B=s[9],z=s[13],V=s[2],Q=s[6],j=s[10],te=s[14],Z=s[3],pe=s[7],Me=s[11],re=s[15];return r[0]=o*w+a*E+l*V+c*Z,r[4]=o*S+a*D+l*Q+c*pe,r[8]=o*P+a*B+l*j+c*Me,r[12]=o*M+a*z+l*te+c*re,r[1]=u*w+f*E+h*V+d*Z,r[5]=u*S+f*D+h*Q+d*pe,r[9]=u*P+f*B+h*j+d*Me,r[13]=u*M+f*z+h*te+d*re,r[2]=p*w+_*E+g*V+m*Z,r[6]=p*S+_*D+g*Q+m*pe,r[10]=p*P+_*B+g*j+m*Me,r[14]=p*M+_*z+g*te+m*re,r[3]=v*w+b*E+y*V+T*Z,r[7]=v*S+b*D+y*Q+T*pe,r[11]=v*P+b*B+y*j+T*Me,r[15]=v*M+b*z+y*te+T*re,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[4],s=e[8],r=e[12],o=e[1],a=e[5],l=e[9],c=e[13],u=e[2],f=e[6],h=e[10],d=e[14],p=e[3],_=e[7],g=e[11],m=e[15];return p*(+r*l*f-s*c*f-r*a*h+i*c*h+s*a*d-i*l*d)+_*(+t*l*d-t*c*h+r*o*h-s*o*d+s*c*u-r*l*u)+g*(+t*c*f-t*a*d-r*o*f+i*o*d+r*a*u-i*c*u)+m*(-s*a*u-t*l*f+t*a*h+s*o*f-i*o*h+i*l*u)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){const s=this.elements;return e.isVector3?(s[12]=e.x,s[13]=e.y,s[14]=e.z):(s[12]=e,s[13]=t,s[14]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],_=e[13],g=e[14],m=e[15],v=f*g*c-_*h*c+_*l*d-a*g*d-f*l*m+a*h*m,b=p*h*c-u*g*c-p*l*d+o*g*d+u*l*m-o*h*m,y=u*_*c-p*f*c+p*a*d-o*_*d-u*a*m+o*f*m,T=p*f*l-u*_*l-p*a*h+o*_*h+u*a*g-o*f*g,w=t*v+i*b+s*y+r*T;if(w===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const S=1/w;return e[0]=v*S,e[1]=(_*h*r-f*g*r-_*s*d+i*g*d+f*s*m-i*h*m)*S,e[2]=(a*g*r-_*l*r+_*s*c-i*g*c-a*s*m+i*l*m)*S,e[3]=(f*l*r-a*h*r-f*s*c+i*h*c+a*s*d-i*l*d)*S,e[4]=b*S,e[5]=(u*g*r-p*h*r+p*s*d-t*g*d-u*s*m+t*h*m)*S,e[6]=(p*l*r-o*g*r-p*s*c+t*g*c+o*s*m-t*l*m)*S,e[7]=(o*h*r-u*l*r+u*s*c-t*h*c-o*s*d+t*l*d)*S,e[8]=y*S,e[9]=(p*f*r-u*_*r-p*i*d+t*_*d+u*i*m-t*f*m)*S,e[10]=(o*_*r-p*a*r+p*i*c-t*_*c-o*i*m+t*a*m)*S,e[11]=(u*a*r-o*f*r-u*i*c+t*f*c+o*i*d-t*a*d)*S,e[12]=T*S,e[13]=(u*_*s-p*f*s+p*i*h-t*_*h-u*i*g+t*f*g)*S,e[14]=(p*a*s-o*_*s-p*i*l+t*_*l+o*i*g-t*a*g)*S,e[15]=(o*f*s-u*a*s+u*i*l-t*f*l-o*i*h+t*a*h)*S,this}scale(e){const t=this.elements,i=e.x,s=e.y,r=e.z;return t[0]*=i,t[4]*=s,t[8]*=r,t[1]*=i,t[5]*=s,t[9]*=r,t[2]*=i,t[6]*=s,t[10]*=r,t[3]*=i,t[7]*=s,t[11]*=r,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],s=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,s))}makeTranslation(e,t,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),s=Math.sin(t),r=1-i,o=e.x,a=e.y,l=e.z,c=r*o,u=r*a;return this.set(c*o+i,c*a-s*l,c*l+s*a,0,c*a+s*l,u*a+i,u*l-s*o,0,c*l-s*a,u*l+s*o,r*l*l+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,s,r,o){return this.set(1,i,r,0,e,1,o,0,t,s,1,0,0,0,0,1),this}compose(e,t,i){const s=this.elements,r=t._x,o=t._y,a=t._z,l=t._w,c=r+r,u=o+o,f=a+a,h=r*c,d=r*u,p=r*f,_=o*u,g=o*f,m=a*f,v=l*c,b=l*u,y=l*f,T=i.x,w=i.y,S=i.z;return s[0]=(1-(_+m))*T,s[1]=(d+y)*T,s[2]=(p-b)*T,s[3]=0,s[4]=(d-y)*w,s[5]=(1-(h+m))*w,s[6]=(g+v)*w,s[7]=0,s[8]=(p+b)*S,s[9]=(g-v)*S,s[10]=(1-(h+_))*S,s[11]=0,s[12]=e.x,s[13]=e.y,s[14]=e.z,s[15]=1,this}decompose(e,t,i){const s=this.elements;let r=Ho.set(s[0],s[1],s[2]).length();const o=Ho.set(s[4],s[5],s[6]).length(),a=Ho.set(s[8],s[9],s[10]).length();this.determinant()<0&&(r=-r),e.x=s[12],e.y=s[13],e.z=s[14],Ci.copy(this);const c=1/r,u=1/o,f=1/a;return Ci.elements[0]*=c,Ci.elements[1]*=c,Ci.elements[2]*=c,Ci.elements[4]*=u,Ci.elements[5]*=u,Ci.elements[6]*=u,Ci.elements[8]*=f,Ci.elements[9]*=f,Ci.elements[10]*=f,t.setFromRotationMatrix(Ci),i.x=r,i.y=o,i.z=a,this}makePerspective(e,t,i,s,r,o,a=_i){const l=this.elements,c=2*r/(t-e),u=2*r/(i-s),f=(t+e)/(t-e),h=(i+s)/(i-s);let d,p;if(a===_i)d=-(o+r)/(o-r),p=-2*o*r/(o-r);else if(a===hc)d=-o/(o-r),p=-o*r/(o-r);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=c,l[4]=0,l[8]=f,l[12]=0,l[1]=0,l[5]=u,l[9]=h,l[13]=0,l[2]=0,l[6]=0,l[10]=d,l[14]=p,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,i,s,r,o,a=_i){const l=this.elements,c=1/(t-e),u=1/(i-s),f=1/(o-r),h=(t+e)*c,d=(i+s)*u;let p,_;if(a===_i)p=(o+r)*f,_=-2*f;else if(a===hc)p=r*f,_=-1*f;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-h,l[1]=0,l[5]=2*u,l[9]=0,l[13]=-d,l[2]=0,l[6]=0,l[10]=_,l[14]=-p,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let s=0;s<16;s++)if(t[s]!==i[s])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}}const Ho=new k,Ci=new Je,bP=new k(0,0,0),xP=new k(1,1,1),Qs=new k,gu=new k,ii=new k,gy=new Je,_y=new Qn;class li{constructor(e=0,t=0,i=0,s=li.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=s}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,i,s=this._order){return this._x=e,this._y=t,this._z=i,this._order=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,i=!0){const s=e.elements,r=s[0],o=s[4],a=s[8],l=s[1],c=s[5],u=s[9],f=s[2],h=s[6],d=s[10];switch(t){case"XYZ":this._y=Math.asin(st(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,d),this._z=Math.atan2(-o,r)):(this._x=Math.atan2(h,c),this._z=0);break;case"YXZ":this._x=Math.asin(-st(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,d),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-f,r),this._z=0);break;case"ZXY":this._x=Math.asin(st(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,d),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,r));break;case"ZYX":this._y=Math.asin(-st(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,d),this._z=Math.atan2(l,r)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(st(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-f,r)):(this._x=0,this._y=Math.atan2(a,d));break;case"XZY":this._z=Math.asin(-st(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(h,c),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-u,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return gy.makeRotationFromQuaternion(e),this.setFromRotationMatrix(gy,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return _y.setFromEuler(this),this.setFromQuaternion(_y,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}li.DEFAULT_ORDER="XYZ";class Bc{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let t=0;t1){for(let i=0;i0&&(s.userData=this.userData),s.layers=this.layers.mask,s.matrix=this.matrix.toArray(),s.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(s.matrixAutoUpdate=!1),this.isInstancedMesh&&(s.type="InstancedMesh",s.count=this.count,s.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(s.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(s.type="BatchedMesh",s.perObjectFrustumCulled=this.perObjectFrustumCulled,s.sortObjects=this.sortObjects,s.drawRanges=this._drawRanges,s.reservedRanges=this._reservedRanges,s.geometryInfo=this._geometryInfo.map(a=>({...a,boundingBox:a.boundingBox?a.boundingBox.toJSON():void 0,boundingSphere:a.boundingSphere?a.boundingSphere.toJSON():void 0})),s.instanceInfo=this._instanceInfo.map(a=>({...a})),s.availableInstanceIds=this._availableInstanceIds.slice(),s.availableGeometryIds=this._availableGeometryIds.slice(),s.nextIndexStart=this._nextIndexStart,s.nextVertexStart=this._nextVertexStart,s.geometryCount=this._geometryCount,s.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.matricesTexture=this._matricesTexture.toJSON(e),s.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(s.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(s.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(s.boundingBox=this.boundingBox.toJSON()));function r(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?s.background=this.background.toJSON():this.background.isTexture&&(s.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(s.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){s.geometry=r(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let c=0,u=l.length;c0){s.children=[];for(let a=0;a0){s.animations=[];for(let a=0;a0&&(i.geometries=a),l.length>0&&(i.materials=l),c.length>0&&(i.textures=c),u.length>0&&(i.images=u),f.length>0&&(i.shapes=f),h.length>0&&(i.skeletons=h),d.length>0&&(i.animations=d),p.length>0&&(i.nodes=p)}return i.object=s,i;function o(a){const l=[];for(const c in a){const u=a[c];delete u.metadata,l.push(u)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let i=0;i0?s.multiplyScalar(1/Math.sqrt(r)):s.set(0,0,0)}static getBarycoord(e,t,i,s,r){Ri.subVectors(s,t),gs.subVectors(i,t),Ip.subVectors(e,t);const o=Ri.dot(Ri),a=Ri.dot(gs),l=Ri.dot(Ip),c=gs.dot(gs),u=gs.dot(Ip),f=o*c-a*a;if(f===0)return r.set(0,0,0),null;const h=1/f,d=(c*l-a*u)*h,p=(o*u-a*l)*h;return r.set(1-d-p,p,d)}static containsPoint(e,t,i,s){return this.getBarycoord(e,t,i,s,_s)===null?!1:_s.x>=0&&_s.y>=0&&_s.x+_s.y<=1}static getInterpolation(e,t,i,s,r,o,a,l){return this.getBarycoord(e,t,i,s,_s)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(r,_s.x),l.addScaledVector(o,_s.y),l.addScaledVector(a,_s.z),l)}static getInterpolatedAttribute(e,t,i,s,r,o){return Np.setScalar(0),Up.setScalar(0),Fp.setScalar(0),Np.fromBufferAttribute(e,t),Up.fromBufferAttribute(e,i),Fp.fromBufferAttribute(e,s),o.setScalar(0),o.addScaledVector(Np,r.x),o.addScaledVector(Up,r.y),o.addScaledVector(Fp,r.z),o}static isFrontFacing(e,t,i,s){return Ri.subVectors(i,t),gs.subVectors(e,t),Ri.cross(gs).dot(s)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,s){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[s]),this}setFromAttributeAndIndices(e,t,i,s){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,s),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Ri.subVectors(this.c,this.b),gs.subVectors(this.a,this.b),Ri.cross(gs).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Kn.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Kn.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,i,s,r){return Kn.getInterpolation(e,this.a,this.b,this.c,t,i,s,r)}containsPoint(e){return Kn.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Kn.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,s=this.b,r=this.c;let o,a;Xo.subVectors(s,i),$o.subVectors(r,i),Lp.subVectors(e,i);const l=Xo.dot(Lp),c=$o.dot(Lp);if(l<=0&&c<=0)return t.copy(i);Dp.subVectors(e,s);const u=Xo.dot(Dp),f=$o.dot(Dp);if(u>=0&&f<=u)return t.copy(s);const h=l*f-u*c;if(h<=0&&l>=0&&u<=0)return o=l/(l-u),t.copy(i).addScaledVector(Xo,o);Op.subVectors(e,r);const d=Xo.dot(Op),p=$o.dot(Op);if(p>=0&&d<=p)return t.copy(r);const _=d*c-l*p;if(_<=0&&c>=0&&p<=0)return a=c/(c-p),t.copy(i).addScaledVector($o,a);const g=u*p-d*f;if(g<=0&&f-u>=0&&d-p>=0)return Sy.subVectors(r,s),a=(f-u)/(f-u+(d-p)),t.copy(s).addScaledVector(Sy,a);const m=1/(g+_+h);return o=_*m,a=h*m,t.copy(i).addScaledVector(Xo,o).addScaledVector($o,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const lE={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},er={h:0,s:0,l:0},vu={h:0,s:0,l:0};function kp(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*6*(2/3-t):n}class Pe{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(t===void 0&&i===void 0){const s=e;s&&s.isColor?this.copy(s):typeof s=="number"?this.setHex(s):typeof s=="string"&&this.setStyle(s)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Fn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,pt.colorSpaceToWorking(this,t),this}setRGB(e,t,i,s=pt.workingColorSpace){return this.r=e,this.g=t,this.b=i,pt.colorSpaceToWorking(this,s),this}setHSL(e,t,i,s=pt.workingColorSpace){if(e=t_(e,1),t=st(t,0,1),i=st(i,0,1),t===0)this.r=this.g=this.b=i;else{const r=i<=.5?i*(1+t):i+t-i*t,o=2*i-r;this.r=kp(o,r,e+1/3),this.g=kp(o,r,e),this.b=kp(o,r,e-1/3)}return pt.colorSpaceToWorking(this,s),this}setStyle(e,t=Fn){function i(r){r!==void 0&&parseFloat(r)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let s;if(s=/^(\w+)\(([^\)]*)\)/.exec(e)){let r;const o=s[1],a=s[2];switch(o){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,t);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,t);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(s=/^\#([A-Fa-f\d]+)$/.exec(e)){const r=s[1],o=r.length;if(o===3)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,t);if(o===6)return this.setHex(parseInt(r,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Fn){const i=lE[e.toLowerCase()];return i!==void 0?this.setHex(i,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Os(e.r),this.g=Os(e.g),this.b=Os(e.b),this}copyLinearToSRGB(e){return this.r=_a(e.r),this.g=_a(e.g),this.b=_a(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Fn){return pt.workingToColorSpace(Sn.copy(this),e),Math.round(st(Sn.r*255,0,255))*65536+Math.round(st(Sn.g*255,0,255))*256+Math.round(st(Sn.b*255,0,255))}getHexString(e=Fn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=pt.workingColorSpace){pt.workingToColorSpace(Sn.copy(this),t);const i=Sn.r,s=Sn.g,r=Sn.b,o=Math.max(i,s,r),a=Math.min(i,s,r);let l,c;const u=(a+o)/2;if(a===o)l=0,c=0;else{const f=o-a;switch(c=u<=.5?f/(o+a):f/(2-o-a),o){case i:l=(s-r)/f+(s0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const i=e[t];if(i===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const s=this[t];if(s===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}s&&s.isColor?s.set(i):s&&s.isVector3&&i&&i.isVector3?s.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const i={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(i.dispersion=this.dispersion),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapRotation!==void 0&&(i.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==_o&&(i.blending=this.blending),this.side!==Bs&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==Gf&&(i.blendSrc=this.blendSrc),this.blendDst!==Wf&&(i.blendDst=this.blendDst),this.blendEquation!==hr&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==So&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==_g&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==so&&(i.stencilFail=this.stencilFail),this.stencilZFail!==so&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==so&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function s(r){const o=[];for(const a in r){const l=r[a];delete l.metadata,o.push(l)}return o}if(t){const r=s(e.textures),o=s(e.images);r.length>0&&(i.textures=r),o.length>0&&(i.images=o)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let i=null;if(t!==null){const s=t.length;i=new Array(s);for(let r=0;r!==s;++r)i[r]=t[r].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class Xs extends Pn{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Pe(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new li,this.combine=Fc,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const As=AP();function AP(){const n=new ArrayBuffer(4),e=new Float32Array(n),t=new Uint32Array(n),i=new Uint32Array(512),s=new Uint32Array(512);for(let l=0;l<256;++l){const c=l-127;c<-27?(i[l]=0,i[l|256]=32768,s[l]=24,s[l|256]=24):c<-14?(i[l]=1024>>-c-14,i[l|256]=1024>>-c-14|32768,s[l]=-c-1,s[l|256]=-c-1):c<=15?(i[l]=c+15<<10,i[l|256]=c+15<<10|32768,s[l]=13,s[l|256]=13):c<128?(i[l]=31744,i[l|256]=64512,s[l]=24,s[l|256]=24):(i[l]=31744,i[l|256]=64512,s[l]=13,s[l|256]=13)}const r=new Uint32Array(2048),o=new Uint32Array(64),a=new Uint32Array(64);for(let l=1;l<1024;++l){let c=l<<13,u=0;for(;(c&8388608)===0;)c<<=1,u-=8388608;c&=-8388609,u+=947912704,r[l]=c|u}for(let l=1024;l<2048;++l)r[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)o[l]=l<<23;o[31]=1199570944,o[32]=2147483648;for(let l=33;l<63;++l)o[l]=2147483648+(l-32<<23);o[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(a[l]=1024);return{floatView:e,uint32View:t,baseTable:i,shiftTable:s,mantissaTable:r,exponentTable:o,offsetTable:a}}function qn(n){Math.abs(n)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),n=st(n,-65504,65504),As.floatView[0]=n;const e=As.uint32View[0],t=e>>23&511;return As.baseTable[t]+((e&8388607)>>As.shiftTable[t])}function _l(n){const e=n>>10;return As.uint32View[0]=As.mantissaTable[As.offsetTable[e]+(n&1023)]+As.exponentTable[e],As.floatView[0]}class CP{static toHalfFloat(e){return qn(e)}static fromHalfFloat(e){return _l(e)}}const Kt=new k,yu=new fe;let RP=0;class Pt{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:RP++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=fc,this.updateRanges=[],this.gpuType=Zn,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;for(let s=0,r=this.itemSize;st.count&&console.warn("THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Cn);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new k(-1/0,-1/0,-1/0),new k(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let i=0,s=t.length;i0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const i=this.attributes;for(const l in i){const c=i[l];e.data.attributes[l]=c.toJSON(e.data)}const s={};let r=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let f=0,h=c.length;f0&&(s[l]=u,r=!0)}r&&(e.data.morphAttributes=s,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere=a.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone());const s=e.attributes;for(const c in s){const u=s[c];this.setAttribute(c,u.clone(t))}const r=e.morphAttributes;for(const c in r){const u=[],f=r[c];for(let h=0,d=f.length;h0){const s=t[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=s.length;r(e.far-e.near)**2))&&(Ey.copy(r).invert(),Gr.copy(e.ray).applyMatrix4(Ey),!(i.boundingBox!==null&&Gr.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,Gr)))}_computeIntersections(e,t,i){let s;const r=this.geometry,o=this.material,a=r.index,l=r.attributes.position,c=r.attributes.uv,u=r.attributes.uv1,f=r.attributes.normal,h=r.groups,d=r.drawRange;if(a!==null)if(Array.isArray(o))for(let p=0,_=h.length;p<_;p++){const g=h[p],m=o[g.materialIndex],v=Math.max(g.start,d.start),b=Math.min(a.count,Math.min(g.start+g.count,d.start+d.count));for(let y=v,T=b;yt.far?null:{distance:c,point:Tu.clone(),object:n}}function wu(n,e,t,i,s,r,o,a,l,c){n.getVertexPosition(a,xu),n.getVertexPosition(l,Mu),n.getVertexPosition(c,Su);const u=FP(n,e,t,i,xu,Mu,Su,wy);if(u){const f=new k;Kn.getBarycoord(wy,xu,Mu,Su,f),s&&(u.uv=Kn.getInterpolatedAttribute(s,a,l,c,f,new fe)),r&&(u.uv1=Kn.getInterpolatedAttribute(r,a,l,c,f,new fe)),o&&(u.normal=Kn.getInterpolatedAttribute(o,a,l,c,f,new k),u.normal.dot(i.direction)>0&&u.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new k,materialIndex:0};Kn.getNormal(xu,Mu,Su,h.normal),u.face=h,u.barycoord=f}return u}class Ro extends ct{constructor(e=1,t=1,i=1,s=1,r=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:s,heightSegments:r,depthSegments:o};const a=this;s=Math.floor(s),r=Math.floor(r),o=Math.floor(o);const l=[],c=[],u=[],f=[];let h=0,d=0;p("z","y","x",-1,-1,i,t,e,o,r,0),p("z","y","x",1,-1,i,t,-e,o,r,1),p("x","z","y",1,1,e,i,t,s,o,2),p("x","z","y",1,-1,e,i,-t,s,o,3),p("x","y","z",1,-1,e,t,i,s,r,4),p("x","y","z",-1,-1,e,t,-i,s,r,5),this.setIndex(l),this.setAttribute("position",new ke(c,3)),this.setAttribute("normal",new ke(u,3)),this.setAttribute("uv",new ke(f,2));function p(_,g,m,v,b,y,T,w,S,P,M){const E=y/S,D=T/P,B=y/2,z=T/2,V=w/2,Q=S+1,j=P+1;let te=0,Z=0;const pe=new k;for(let Me=0;Me0?1:-1,u.push(pe.x,pe.y,pe.z),f.push(xe/S),f.push(1-Me/P),te+=1}}for(let Me=0;Me>8&255]+Mn[n>>16&255]+Mn[n>>24&255]+"-"+Mn[e&255]+Mn[e>>8&255]+"-"+Mn[e>>16&15|64]+Mn[e>>24&255]+"-"+Mn[t&63|128]+Mn[t>>8&255]+"-"+Mn[t>>16&255]+Mn[t>>24&255]+Mn[i&255]+Mn[i>>8&255]+Mn[i>>16&255]+Mn[i>>24&255]).toLowerCase()}function st(n,e,t){return Math.max(e,Math.min(t,n))}function n_(n,e){return(n%e+e)%e}function Y3(n,e,t,i,s){return i+(n-e)*(s-i)/(t-e)}function j3(n,e,t){return n!==e?(t-n)/(e-n):0}function Ll(n,e,t){return(1-t)*n+t*e}function K3(n,e,t,i){return Ll(n,e,1-Math.exp(-t*i))}function Z3(n,e=1){return e-Math.abs(n_(n,e*2)-e)}function J3(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function Q3(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function eP(n,e){return n+Math.floor(Math.random()*(e-n+1))}function tP(n,e){return n+Math.random()*(e-n)}function nP(n){return n*(.5-Math.random())}function iP(n){n!==void 0&&(hy=n);let e=hy+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function sP(n){return n*vo}function rP(n){return n*Ca}function oP(n){return(n&n-1)===0&&n!==0}function aP(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function lP(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function cP(n,e,t,i,s){const r=Math.cos,o=Math.sin,a=r(t/2),l=o(t/2),c=r((e+i)/2),u=o((e+i)/2),f=r((e-i)/2),h=o((e-i)/2),d=r((i-e)/2),p=o((i-e)/2);switch(s){case"XYX":n.set(a*u,l*f,l*h,a*c);break;case"YZY":n.set(l*h,a*u,l*f,a*c);break;case"ZXZ":n.set(l*f,l*h,a*u,a*c);break;case"XZX":n.set(a*u,l*p,l*d,a*c);break;case"YXY":n.set(l*d,a*u,l*p,a*c);break;case"ZYZ":n.set(l*p,l*d,a*u,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+s)}}function Bn(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return n/4294967295;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int32Array:return Math.max(n/2147483647,-1);case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function lt(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return Math.round(n*4294967295);case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int32Array:return Math.round(n*2147483647);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}const i_={DEG2RAD:vo,RAD2DEG:Ca,generateUUID:oi,clamp:st,euclideanModulo:n_,mapLinear:Y3,inverseLerp:j3,lerp:Ll,damp:K3,pingpong:Z3,smoothstep:J3,smootherstep:Q3,randInt:eP,randFloat:tP,randFloatSpread:nP,seededRandom:iP,degToRad:sP,radToDeg:rP,isPowerOfTwo:oP,ceilPowerOfTwo:aP,floorPowerOfTwo:lP,setQuaternionFromProperEuler:cP,normalize:lt,denormalize:Bn};class fe{constructor(e=0,t=0){fe.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,i=this.y,s=e.elements;return this.x=s[0]*t+s[3]*i+s[6],this.y=s[1]*t+s[4]*i+s[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=st(this.x,e.x,t.x),this.y=st(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=st(this.x,e,t),this.y=st(this.y,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(st(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(st(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const i=Math.cos(t),s=Math.sin(t),r=this.x-e.x,o=this.y-e.y;return this.x=r*i-o*s+e.x,this.y=r*s+o*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Qn{constructor(e=0,t=0,i=0,s=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=i,this._w=s}static slerpFlat(e,t,i,s,r,o,a){let l=i[s+0],c=i[s+1],u=i[s+2],f=i[s+3];const h=r[o+0],d=r[o+1],p=r[o+2],_=r[o+3];if(a===0){e[t+0]=l,e[t+1]=c,e[t+2]=u,e[t+3]=f;return}if(a===1){e[t+0]=h,e[t+1]=d,e[t+2]=p,e[t+3]=_;return}if(f!==_||l!==h||c!==d||u!==p){let g=1-a;const m=l*h+c*d+u*p+f*_,v=m>=0?1:-1,b=1-m*m;if(b>Number.EPSILON){const T=Math.sqrt(b),w=Math.atan2(T,m*v);g=Math.sin(g*w)/T,a=Math.sin(a*w)/T}const y=a*v;if(l=l*g+h*y,c=c*g+d*y,u=u*g+p*y,f=f*g+_*y,g===1-a){const T=1/Math.sqrt(l*l+c*c+u*u+f*f);l*=T,c*=T,u*=T,f*=T}}e[t]=l,e[t+1]=c,e[t+2]=u,e[t+3]=f}static multiplyQuaternionsFlat(e,t,i,s,r,o){const a=i[s],l=i[s+1],c=i[s+2],u=i[s+3],f=r[o],h=r[o+1],d=r[o+2],p=r[o+3];return e[t]=a*p+u*f+l*d-c*h,e[t+1]=l*p+u*h+c*f-a*d,e[t+2]=c*p+u*d+a*h-l*f,e[t+3]=u*p-a*f-l*h-c*d,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,s){return this._x=e,this._y=t,this._z=i,this._w=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const i=e._x,s=e._y,r=e._z,o=e._order,a=Math.cos,l=Math.sin,c=a(i/2),u=a(s/2),f=a(r/2),h=l(i/2),d=l(s/2),p=l(r/2);switch(o){case"XYZ":this._x=h*u*f+c*d*p,this._y=c*d*f-h*u*p,this._z=c*u*p+h*d*f,this._w=c*u*f-h*d*p;break;case"YXZ":this._x=h*u*f+c*d*p,this._y=c*d*f-h*u*p,this._z=c*u*p-h*d*f,this._w=c*u*f+h*d*p;break;case"ZXY":this._x=h*u*f-c*d*p,this._y=c*d*f+h*u*p,this._z=c*u*p+h*d*f,this._w=c*u*f-h*d*p;break;case"ZYX":this._x=h*u*f-c*d*p,this._y=c*d*f+h*u*p,this._z=c*u*p-h*d*f,this._w=c*u*f+h*d*p;break;case"YZX":this._x=h*u*f+c*d*p,this._y=c*d*f+h*u*p,this._z=c*u*p-h*d*f,this._w=c*u*f-h*d*p;break;case"XZY":this._x=h*u*f-c*d*p,this._y=c*d*f-h*u*p,this._z=c*u*p+h*d*f,this._w=c*u*f+h*d*p;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/2,s=Math.sin(i);return this._x=e.x*s,this._y=e.y*s,this._z=e.z*s,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],s=t[4],r=t[8],o=t[1],a=t[5],l=t[9],c=t[2],u=t[6],f=t[10],h=i+a+f;if(h>0){const d=.5/Math.sqrt(h+1);this._w=.25/d,this._x=(u-l)*d,this._y=(r-c)*d,this._z=(o-s)*d}else if(i>a&&i>f){const d=2*Math.sqrt(1+i-a-f);this._w=(u-l)/d,this._x=.25*d,this._y=(s+o)/d,this._z=(r+c)/d}else if(a>f){const d=2*Math.sqrt(1+a-i-f);this._w=(r-c)/d,this._x=(s+o)/d,this._y=.25*d,this._z=(l+u)/d}else{const d=2*Math.sqrt(1+f-i-a);this._w=(o-s)/d,this._x=(r+c)/d,this._y=(l+u)/d,this._z=.25*d}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(st(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(i===0)return this;const s=Math.min(1,t/i);return this.slerp(e,s),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const i=e._x,s=e._y,r=e._z,o=e._w,a=t._x,l=t._y,c=t._z,u=t._w;return this._x=i*u+o*a+s*c-r*l,this._y=s*u+o*l+r*a-i*c,this._z=r*u+o*c+i*l-s*a,this._w=o*u-i*a-s*l-r*c,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const i=this._x,s=this._y,r=this._z,o=this._w;let a=o*e._w+i*e._x+s*e._y+r*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=i,this._y=s,this._z=r,this;const l=1-a*a;if(l<=Number.EPSILON){const d=1-t;return this._w=d*o+t*this._w,this._x=d*i+t*this._x,this._y=d*s+t*this._y,this._z=d*r+t*this._z,this.normalize(),this}const c=Math.sqrt(l),u=Math.atan2(c,a),f=Math.sin((1-t)*u)/c,h=Math.sin(t*u)/c;return this._w=o*f+this._w*h,this._x=i*f+this._x*h,this._y=s*f+this._y*h,this._z=r*f+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){const e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),i=Math.random(),s=Math.sqrt(1-i),r=Math.sqrt(i);return this.set(s*Math.sin(e),s*Math.cos(e),r*Math.sin(t),r*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class k{constructor(e=0,t=0,i=0){k.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(dy.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(dy.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,s=this.z,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6]*s,this.y=r[1]*t+r[4]*i+r[7]*s,this.z=r[2]*t+r[5]*i+r[8]*s,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,s=this.z,r=e.elements,o=1/(r[3]*t+r[7]*i+r[11]*s+r[15]);return this.x=(r[0]*t+r[4]*i+r[8]*s+r[12])*o,this.y=(r[1]*t+r[5]*i+r[9]*s+r[13])*o,this.z=(r[2]*t+r[6]*i+r[10]*s+r[14])*o,this}applyQuaternion(e){const t=this.x,i=this.y,s=this.z,r=e.x,o=e.y,a=e.z,l=e.w,c=2*(o*s-a*i),u=2*(a*t-r*s),f=2*(r*i-o*t);return this.x=t+l*c+o*f-a*u,this.y=i+l*u+a*c-r*f,this.z=s+l*f+r*u-o*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,i=this.y,s=this.z,r=e.elements;return this.x=r[0]*t+r[4]*i+r[8]*s,this.y=r[1]*t+r[5]*i+r[9]*s,this.z=r[2]*t+r[6]*i+r[10]*s,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=st(this.x,e.x,t.x),this.y=st(this.y,e.y,t.y),this.z=st(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=st(this.x,e,t),this.y=st(this.y,e,t),this.z=st(this.z,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(st(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,s=e.y,r=e.z,o=t.x,a=t.y,l=t.z;return this.x=s*l-r*a,this.y=r*o-i*l,this.z=i*a-s*o,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return xp.copy(this).projectOnVector(e),this.sub(xp)}reflect(e){return this.sub(xp.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(st(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,s=this.z-e.z;return t*t+i*i+s*s}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){const s=Math.sin(t)*e;return this.x=s*Math.sin(i),this.y=Math.cos(t)*e,this.z=s*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),s=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=s,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,t=Math.random()*2-1,i=Math.sqrt(1-t*t);return this.x=i*Math.cos(e),this.y=t,this.z=i*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const xp=new k,dy=new Qn;class at{constructor(e,t,i,s,r,o,a,l,c){at.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,i,s,r,o,a,l,c)}set(e,t,i,s,r,o,a,l,c){const u=this.elements;return u[0]=e,u[1]=s,u[2]=a,u[3]=t,u[4]=r,u[5]=l,u[6]=i,u[7]=o,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,s=t.elements,r=this.elements,o=i[0],a=i[3],l=i[6],c=i[1],u=i[4],f=i[7],h=i[2],d=i[5],p=i[8],_=s[0],g=s[3],m=s[6],v=s[1],b=s[4],y=s[7],T=s[2],w=s[5],S=s[8];return r[0]=o*_+a*v+l*T,r[3]=o*g+a*b+l*w,r[6]=o*m+a*y+l*S,r[1]=c*_+u*v+f*T,r[4]=c*g+u*b+f*w,r[7]=c*m+u*y+f*S,r[2]=h*_+d*v+p*T,r[5]=h*g+d*b+p*w,r[8]=h*m+d*y+p*S,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return t*o*u-t*a*c-i*r*u+i*a*l+s*r*c-s*o*l}invert(){const e=this.elements,t=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],f=u*o-a*c,h=a*l-u*r,d=c*r-o*l,p=t*f+i*h+s*d;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);const _=1/p;return e[0]=f*_,e[1]=(s*c-u*i)*_,e[2]=(a*i-s*o)*_,e[3]=h*_,e[4]=(u*t-s*l)*_,e[5]=(s*r-a*t)*_,e[6]=d*_,e[7]=(i*l-c*t)*_,e[8]=(o*t-i*r)*_,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,s,r,o,a){const l=Math.cos(r),c=Math.sin(r);return this.set(i*l,i*c,-i*(l*o+c*a)+o+e,-s*c,s*l,-s*(-c*o+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(Mp.makeScale(e,t)),this}rotate(e){return this.premultiply(Mp.makeRotation(-e)),this}translate(e,t){return this.premultiply(Mp.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,i=e.elements;for(let s=0;s<9;s++)if(t[s]!==i[s])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const Mp=new at;function rE(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}const uP={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function la(n,e){return new uP[n](e)}function dc(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function oE(){const n=dc("canvas");return n.style.display="block",n}const py={};function ga(n){n in py||(py[n]=!0,console.warn(n))}function fP(n,e,t){return new Promise(function(i,s){function r(){switch(n.clientWaitSync(e,n.SYNC_FLUSH_COMMANDS_BIT,0)){case n.WAIT_FAILED:s();break;case n.TIMEOUT_EXPIRED:setTimeout(r,t);break;default:i()}}setTimeout(r,t)})}function hP(n){const e=n.elements;e[2]=.5*e[2]+.5*e[3],e[6]=.5*e[6]+.5*e[7],e[10]=.5*e[10]+.5*e[11],e[14]=.5*e[14]+.5*e[15]}function dP(n){const e=n.elements;e[11]===-1?(e[10]=-e[10]-1,e[14]=-e[14]):(e[10]=-e[10],e[14]=-e[14]+1)}const my=new at().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),gy=new at().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function pP(){const n={enabled:!0,workingColorSpace:Eo,spaces:{},convert:function(s,r,o){return this.enabled===!1||r===o||!r||!o||(this.spaces[r].transfer===Ct&&(s.r=Os(s.r),s.g=Os(s.g),s.b=Os(s.b)),this.spaces[r].primaries!==this.spaces[o].primaries&&(s.applyMatrix3(this.spaces[r].toXYZ),s.applyMatrix3(this.spaces[o].fromXYZ)),this.spaces[o].transfer===Ct&&(s.r=_a(s.r),s.g=_a(s.g),s.b=_a(s.b))),s},workingToColorSpace:function(s,r){return this.convert(s,this.workingColorSpace,r)},colorSpaceToWorking:function(s,r){return this.convert(s,r,this.workingColorSpace)},getPrimaries:function(s){return this.spaces[s].primaries},getTransfer:function(s){return s===ws?uc:this.spaces[s].transfer},getLuminanceCoefficients:function(s,r=this.workingColorSpace){return s.fromArray(this.spaces[r].luminanceCoefficients)},define:function(s){Object.assign(this.spaces,s)},_getMatrix:function(s,r,o){return s.copy(this.spaces[r].toXYZ).multiply(this.spaces[o].fromXYZ)},_getDrawingBufferColorSpace:function(s){return this.spaces[s].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(s=this.workingColorSpace){return this.spaces[s].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(s,r){return ga("THREE.ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),n.workingToColorSpace(s,r)},toWorkingColorSpace:function(s,r){return ga("THREE.ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),n.colorSpaceToWorking(s,r)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],i=[.3127,.329];return n.define({[Eo]:{primaries:e,whitePoint:i,transfer:uc,toXYZ:my,fromXYZ:gy,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:Fn},outputColorSpaceConfig:{drawingBufferColorSpace:Fn}},[Fn]:{primaries:e,whitePoint:i,transfer:Ct,toXYZ:my,fromXYZ:gy,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:Fn}}}),n}const pt=pP();function Os(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function _a(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}let ko;class aE{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let i;if(e instanceof HTMLCanvasElement)i=e;else{ko===void 0&&(ko=dc("canvas")),ko.width=e.width,ko.height=e.height;const s=ko.getContext("2d");e instanceof ImageData?s.putImageData(e,0,0):s.drawImage(e,0,0,e.width,e.height),i=ko}return i.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=dc("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const s=i.getImageData(0,0,e.width,e.height),r=s.data;for(let o=0;o1),this.pmremVersion=0}get width(){return this.source.getSize(Ep).x}get height(){return this.source.getSize(Ep).y}get depth(){return this.source.getSize(Ep).z}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(const t in e){const i=e[t];if(i===void 0){console.warn(`THREE.Texture.setValues(): parameter '${t}' has value of undefined.`);continue}const s=this[t];if(s===void 0){console.warn(`THREE.Texture.setValues(): property '${t}' does not exist.`);continue}s&&i&&s.isVector2&&i.isVector2||s&&i&&s.isVector3&&i.isVector3||s&&i&&s.isMatrix3&&i.isMatrix3?s.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const i={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(i.userData=this.userData),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==od)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case oc:e.x=e.x-Math.floor(e.x);break;case gi:e.x=e.x<0?0:1;break;case ac:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case oc:e.y=e.y-Math.floor(e.y);break;case gi:e.y=e.y<0?0:1;break;case ac:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}$t.DEFAULT_IMAGE=null;$t.DEFAULT_MAPPING=od;$t.DEFAULT_ANISOTROPY=1;class vt{constructor(e=0,t=0,i=0,s=1){vt.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=s}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,s){return this.x=e,this.y=t,this.z=i,this.w=s,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,i=this.y,s=this.z,r=this.w,o=e.elements;return this.x=o[0]*t+o[4]*i+o[8]*s+o[12]*r,this.y=o[1]*t+o[5]*i+o[9]*s+o[13]*r,this.z=o[2]*t+o[6]*i+o[10]*s+o[14]*r,this.w=o[3]*t+o[7]*i+o[11]*s+o[15]*r,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,s,r;const l=e.elements,c=l[0],u=l[4],f=l[8],h=l[1],d=l[5],p=l[9],_=l[2],g=l[6],m=l[10];if(Math.abs(u-h)<.01&&Math.abs(f-_)<.01&&Math.abs(p-g)<.01){if(Math.abs(u+h)<.1&&Math.abs(f+_)<.1&&Math.abs(p+g)<.1&&Math.abs(c+d+m-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const b=(c+1)/2,y=(d+1)/2,T=(m+1)/2,w=(u+h)/4,S=(f+_)/4,P=(p+g)/4;return b>y&&b>T?b<.01?(i=0,s=.707106781,r=.707106781):(i=Math.sqrt(b),s=w/i,r=S/i):y>T?y<.01?(i=.707106781,s=0,r=.707106781):(s=Math.sqrt(y),i=w/s,r=P/s):T<.01?(i=.707106781,s=.707106781,r=0):(r=Math.sqrt(T),i=S/r,s=P/r),this.set(i,s,r,t),this}let v=Math.sqrt((g-p)*(g-p)+(f-_)*(f-_)+(h-u)*(h-u));return Math.abs(v)<.001&&(v=1),this.x=(g-p)/v,this.y=(f-_)/v,this.z=(h-u)/v,this.w=Math.acos((c+d+m-1)/2),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=st(this.x,e.x,t.x),this.y=st(this.y,e.y,t.y),this.z=st(this.z,e.z,t.z),this.w=st(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=st(this.x,e,t),this.y=st(this.y,e,t),this.z=st(this.z,e,t),this.w=st(this.w,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(st(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class s_ extends as{constructor(e=1,t=1,i={}){super(),i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:nn,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},i),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=i.depth,this.scissor=new vt(0,0,e,t),this.scissorTest=!1,this.viewport=new vt(0,0,e,t);const s={width:e,height:t,depth:i.depth},r=new $t(s);this.textures=[];const o=i.count;for(let a=0;a1;this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,i=e.textures.length;t=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,Ai),Ai.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Ja),hu.subVectors(this.max,Ja),Bo.subVectors(e.a,Ja),zo.subVectors(e.b,Ja),Vo.subVectors(e.c,Ja),Ks.subVectors(zo,Bo),Zs.subVectors(Vo,zo),Vr.subVectors(Bo,Vo);let t=[0,-Ks.z,Ks.y,0,-Zs.z,Zs.y,0,-Vr.z,Vr.y,Ks.z,0,-Ks.x,Zs.z,0,-Zs.x,Vr.z,0,-Vr.x,-Ks.y,Ks.x,0,-Zs.y,Zs.x,0,-Vr.y,Vr.x,0];return!Tp(t,Bo,zo,Vo,hu)||(t=[1,0,0,0,1,0,0,0,1],!Tp(t,Bo,zo,Vo,hu))?!1:(du.crossVectors(Ks,Zs),t=[du.x,du.y,du.z],Tp(t,Bo,zo,Vo,hu))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Ai).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Ai).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(ds[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),ds[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),ds[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),ds[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),ds[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),ds[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),ds[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),ds[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(ds),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}}const ds=[new k,new k,new k,new k,new k,new k,new k,new k],Ai=new k,fu=new Cn,Bo=new k,zo=new k,Vo=new k,Ks=new k,Zs=new k,Vr=new k,Ja=new k,hu=new k,du=new k,Hr=new k;function Tp(n,e,t,i,s){for(let r=0,o=n.length-3;r<=o;r+=3){Hr.fromArray(n,r);const a=s.x*Math.abs(Hr.x)+s.y*Math.abs(Hr.y)+s.z*Math.abs(Hr.z),l=e.dot(Hr),c=t.dot(Hr),u=i.dot(Hr);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const yP=new Cn,Qa=new k,wp=new k;class bn{constructor(e=new k,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const i=this.center;t!==void 0?i.copy(t):yP.setFromPoints(e).getCenter(i);let s=0;for(let r=0,o=e.length;rthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Qa.subVectors(e,this.center);const t=Qa.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),s=(i-this.radius)*.5;this.center.addScaledVector(Qa,s/i),this.radius+=s}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(wp.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Qa.copy(e.center).add(wp)),this.expandByPoint(Qa.copy(e.center).sub(wp))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}}const ps=new k,Ap=new k,pu=new k,Js=new k,Cp=new k,mu=new k,Rp=new k;class Va{constructor(e=new k,t=new k(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,ps)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=ps.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(ps.copy(this.origin).addScaledVector(this.direction,t),ps.distanceToSquared(e))}distanceSqToSegment(e,t,i,s){Ap.copy(e).add(t).multiplyScalar(.5),pu.copy(t).sub(e).normalize(),Js.copy(this.origin).sub(Ap);const r=e.distanceTo(t)*.5,o=-this.direction.dot(pu),a=Js.dot(this.direction),l=-Js.dot(pu),c=Js.lengthSq(),u=Math.abs(1-o*o);let f,h,d,p;if(u>0)if(f=o*l-a,h=o*a-l,p=r*u,f>=0)if(h>=-p)if(h<=p){const _=1/u;f*=_,h*=_,d=f*(f+o*h+2*a)+h*(o*f+h+2*l)+c}else h=r,f=Math.max(0,-(o*h+a)),d=-f*f+h*(h+2*l)+c;else h=-r,f=Math.max(0,-(o*h+a)),d=-f*f+h*(h+2*l)+c;else h<=-p?(f=Math.max(0,-(-o*r+a)),h=f>0?-r:Math.min(Math.max(-r,-l),r),d=-f*f+h*(h+2*l)+c):h<=p?(f=0,h=Math.min(Math.max(-r,-l),r),d=h*(h+2*l)+c):(f=Math.max(0,-(o*r+a)),h=f>0?r:Math.min(Math.max(-r,-l),r),d=-f*f+h*(h+2*l)+c);else h=o>0?-r:r,f=Math.max(0,-(o*h+a)),d=-f*f+h*(h+2*l)+c;return i&&i.copy(this.origin).addScaledVector(this.direction,f),s&&s.copy(Ap).addScaledVector(pu,h),d}intersectSphere(e,t){ps.subVectors(e.center,this.origin);const i=ps.dot(this.direction),s=ps.dot(ps)-i*i,r=e.radius*e.radius;if(s>r)return null;const o=Math.sqrt(r-s),a=i-o,l=i+o;return l<0?null:a<0?this.at(l,t):this.at(a,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){const i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,s,r,o,a,l;const c=1/this.direction.x,u=1/this.direction.y,f=1/this.direction.z,h=this.origin;return c>=0?(i=(e.min.x-h.x)*c,s=(e.max.x-h.x)*c):(i=(e.max.x-h.x)*c,s=(e.min.x-h.x)*c),u>=0?(r=(e.min.y-h.y)*u,o=(e.max.y-h.y)*u):(r=(e.max.y-h.y)*u,o=(e.min.y-h.y)*u),i>o||r>s||((r>i||isNaN(i))&&(i=r),(o=0?(a=(e.min.z-h.z)*f,l=(e.max.z-h.z)*f):(a=(e.max.z-h.z)*f,l=(e.min.z-h.z)*f),i>l||a>s)||((a>i||i!==i)&&(i=a),(l=0?i:s,t)}intersectsBox(e){return this.intersectBox(e,ps)!==null}intersectTriangle(e,t,i,s,r){Cp.subVectors(t,e),mu.subVectors(i,e),Rp.crossVectors(Cp,mu);let o=this.direction.dot(Rp),a;if(o>0){if(s)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Js.subVectors(this.origin,e);const l=a*this.direction.dot(mu.crossVectors(Js,mu));if(l<0)return null;const c=a*this.direction.dot(Cp.cross(Js));if(c<0||l+c>o)return null;const u=-a*Js.dot(Rp);return u<0?null:this.at(u/o,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Je{constructor(e,t,i,s,r,o,a,l,c,u,f,h,d,p,_,g){Je.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,i,s,r,o,a,l,c,u,f,h,d,p,_,g)}set(e,t,i,s,r,o,a,l,c,u,f,h,d,p,_,g){const m=this.elements;return m[0]=e,m[4]=t,m[8]=i,m[12]=s,m[1]=r,m[5]=o,m[9]=a,m[13]=l,m[2]=c,m[6]=u,m[10]=f,m[14]=h,m[3]=d,m[7]=p,m[11]=_,m[15]=g,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Je().fromArray(this.elements)}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){const t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,i=e.elements,s=1/Ho.setFromMatrixColumn(e,0).length(),r=1/Ho.setFromMatrixColumn(e,1).length(),o=1/Ho.setFromMatrixColumn(e,2).length();return t[0]=i[0]*s,t[1]=i[1]*s,t[2]=i[2]*s,t[3]=0,t[4]=i[4]*r,t[5]=i[5]*r,t[6]=i[6]*r,t[7]=0,t[8]=i[8]*o,t[9]=i[9]*o,t[10]=i[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,i=e.x,s=e.y,r=e.z,o=Math.cos(i),a=Math.sin(i),l=Math.cos(s),c=Math.sin(s),u=Math.cos(r),f=Math.sin(r);if(e.order==="XYZ"){const h=o*u,d=o*f,p=a*u,_=a*f;t[0]=l*u,t[4]=-l*f,t[8]=c,t[1]=d+p*c,t[5]=h-_*c,t[9]=-a*l,t[2]=_-h*c,t[6]=p+d*c,t[10]=o*l}else if(e.order==="YXZ"){const h=l*u,d=l*f,p=c*u,_=c*f;t[0]=h+_*a,t[4]=p*a-d,t[8]=o*c,t[1]=o*f,t[5]=o*u,t[9]=-a,t[2]=d*a-p,t[6]=_+h*a,t[10]=o*l}else if(e.order==="ZXY"){const h=l*u,d=l*f,p=c*u,_=c*f;t[0]=h-_*a,t[4]=-o*f,t[8]=p+d*a,t[1]=d+p*a,t[5]=o*u,t[9]=_-h*a,t[2]=-o*c,t[6]=a,t[10]=o*l}else if(e.order==="ZYX"){const h=o*u,d=o*f,p=a*u,_=a*f;t[0]=l*u,t[4]=p*c-d,t[8]=h*c+_,t[1]=l*f,t[5]=_*c+h,t[9]=d*c-p,t[2]=-c,t[6]=a*l,t[10]=o*l}else if(e.order==="YZX"){const h=o*l,d=o*c,p=a*l,_=a*c;t[0]=l*u,t[4]=_-h*f,t[8]=p*f+d,t[1]=f,t[5]=o*u,t[9]=-a*u,t[2]=-c*u,t[6]=d*f+p,t[10]=h-_*f}else if(e.order==="XZY"){const h=o*l,d=o*c,p=a*l,_=a*c;t[0]=l*u,t[4]=-f,t[8]=c*u,t[1]=h*f+_,t[5]=o*u,t[9]=d*f-p,t[2]=p*f-d,t[6]=a*u,t[10]=_*f+h}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(bP,e,xP)}lookAt(e,t,i){const s=this.elements;return ii.subVectors(e,t),ii.lengthSq()===0&&(ii.z=1),ii.normalize(),Qs.crossVectors(i,ii),Qs.lengthSq()===0&&(Math.abs(i.z)===1?ii.x+=1e-4:ii.z+=1e-4,ii.normalize(),Qs.crossVectors(i,ii)),Qs.normalize(),gu.crossVectors(ii,Qs),s[0]=Qs.x,s[4]=gu.x,s[8]=ii.x,s[1]=Qs.y,s[5]=gu.y,s[9]=ii.y,s[2]=Qs.z,s[6]=gu.z,s[10]=ii.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,s=t.elements,r=this.elements,o=i[0],a=i[4],l=i[8],c=i[12],u=i[1],f=i[5],h=i[9],d=i[13],p=i[2],_=i[6],g=i[10],m=i[14],v=i[3],b=i[7],y=i[11],T=i[15],w=s[0],S=s[4],P=s[8],M=s[12],E=s[1],D=s[5],B=s[9],z=s[13],V=s[2],Q=s[6],j=s[10],te=s[14],Z=s[3],pe=s[7],Me=s[11],re=s[15];return r[0]=o*w+a*E+l*V+c*Z,r[4]=o*S+a*D+l*Q+c*pe,r[8]=o*P+a*B+l*j+c*Me,r[12]=o*M+a*z+l*te+c*re,r[1]=u*w+f*E+h*V+d*Z,r[5]=u*S+f*D+h*Q+d*pe,r[9]=u*P+f*B+h*j+d*Me,r[13]=u*M+f*z+h*te+d*re,r[2]=p*w+_*E+g*V+m*Z,r[6]=p*S+_*D+g*Q+m*pe,r[10]=p*P+_*B+g*j+m*Me,r[14]=p*M+_*z+g*te+m*re,r[3]=v*w+b*E+y*V+T*Z,r[7]=v*S+b*D+y*Q+T*pe,r[11]=v*P+b*B+y*j+T*Me,r[15]=v*M+b*z+y*te+T*re,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[4],s=e[8],r=e[12],o=e[1],a=e[5],l=e[9],c=e[13],u=e[2],f=e[6],h=e[10],d=e[14],p=e[3],_=e[7],g=e[11],m=e[15];return p*(+r*l*f-s*c*f-r*a*h+i*c*h+s*a*d-i*l*d)+_*(+t*l*d-t*c*h+r*o*h-s*o*d+s*c*u-r*l*u)+g*(+t*c*f-t*a*d-r*o*f+i*o*d+r*a*u-i*c*u)+m*(-s*a*u-t*l*f+t*a*h+s*o*f-i*o*h+i*l*u)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){const s=this.elements;return e.isVector3?(s[12]=e.x,s[13]=e.y,s[14]=e.z):(s[12]=e,s[13]=t,s[14]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],_=e[13],g=e[14],m=e[15],v=f*g*c-_*h*c+_*l*d-a*g*d-f*l*m+a*h*m,b=p*h*c-u*g*c-p*l*d+o*g*d+u*l*m-o*h*m,y=u*_*c-p*f*c+p*a*d-o*_*d-u*a*m+o*f*m,T=p*f*l-u*_*l-p*a*h+o*_*h+u*a*g-o*f*g,w=t*v+i*b+s*y+r*T;if(w===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const S=1/w;return e[0]=v*S,e[1]=(_*h*r-f*g*r-_*s*d+i*g*d+f*s*m-i*h*m)*S,e[2]=(a*g*r-_*l*r+_*s*c-i*g*c-a*s*m+i*l*m)*S,e[3]=(f*l*r-a*h*r-f*s*c+i*h*c+a*s*d-i*l*d)*S,e[4]=b*S,e[5]=(u*g*r-p*h*r+p*s*d-t*g*d-u*s*m+t*h*m)*S,e[6]=(p*l*r-o*g*r-p*s*c+t*g*c+o*s*m-t*l*m)*S,e[7]=(o*h*r-u*l*r+u*s*c-t*h*c-o*s*d+t*l*d)*S,e[8]=y*S,e[9]=(p*f*r-u*_*r-p*i*d+t*_*d+u*i*m-t*f*m)*S,e[10]=(o*_*r-p*a*r+p*i*c-t*_*c-o*i*m+t*a*m)*S,e[11]=(u*a*r-o*f*r-u*i*c+t*f*c+o*i*d-t*a*d)*S,e[12]=T*S,e[13]=(u*_*s-p*f*s+p*i*h-t*_*h-u*i*g+t*f*g)*S,e[14]=(p*a*s-o*_*s-p*i*l+t*_*l+o*i*g-t*a*g)*S,e[15]=(o*f*s-u*a*s+u*i*l-t*f*l-o*i*h+t*a*h)*S,this}scale(e){const t=this.elements,i=e.x,s=e.y,r=e.z;return t[0]*=i,t[4]*=s,t[8]*=r,t[1]*=i,t[5]*=s,t[9]*=r,t[2]*=i,t[6]*=s,t[10]*=r,t[3]*=i,t[7]*=s,t[11]*=r,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],s=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,s))}makeTranslation(e,t,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),s=Math.sin(t),r=1-i,o=e.x,a=e.y,l=e.z,c=r*o,u=r*a;return this.set(c*o+i,c*a-s*l,c*l+s*a,0,c*a+s*l,u*a+i,u*l-s*o,0,c*l-s*a,u*l+s*o,r*l*l+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,s,r,o){return this.set(1,i,r,0,e,1,o,0,t,s,1,0,0,0,0,1),this}compose(e,t,i){const s=this.elements,r=t._x,o=t._y,a=t._z,l=t._w,c=r+r,u=o+o,f=a+a,h=r*c,d=r*u,p=r*f,_=o*u,g=o*f,m=a*f,v=l*c,b=l*u,y=l*f,T=i.x,w=i.y,S=i.z;return s[0]=(1-(_+m))*T,s[1]=(d+y)*T,s[2]=(p-b)*T,s[3]=0,s[4]=(d-y)*w,s[5]=(1-(h+m))*w,s[6]=(g+v)*w,s[7]=0,s[8]=(p+b)*S,s[9]=(g-v)*S,s[10]=(1-(h+_))*S,s[11]=0,s[12]=e.x,s[13]=e.y,s[14]=e.z,s[15]=1,this}decompose(e,t,i){const s=this.elements;let r=Ho.set(s[0],s[1],s[2]).length();const o=Ho.set(s[4],s[5],s[6]).length(),a=Ho.set(s[8],s[9],s[10]).length();this.determinant()<0&&(r=-r),e.x=s[12],e.y=s[13],e.z=s[14],Ci.copy(this);const c=1/r,u=1/o,f=1/a;return Ci.elements[0]*=c,Ci.elements[1]*=c,Ci.elements[2]*=c,Ci.elements[4]*=u,Ci.elements[5]*=u,Ci.elements[6]*=u,Ci.elements[8]*=f,Ci.elements[9]*=f,Ci.elements[10]*=f,t.setFromRotationMatrix(Ci),i.x=r,i.y=o,i.z=a,this}makePerspective(e,t,i,s,r,o,a=_i){const l=this.elements,c=2*r/(t-e),u=2*r/(i-s),f=(t+e)/(t-e),h=(i+s)/(i-s);let d,p;if(a===_i)d=-(o+r)/(o-r),p=-2*o*r/(o-r);else if(a===hc)d=-o/(o-r),p=-o*r/(o-r);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=c,l[4]=0,l[8]=f,l[12]=0,l[1]=0,l[5]=u,l[9]=h,l[13]=0,l[2]=0,l[6]=0,l[10]=d,l[14]=p,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,i,s,r,o,a=_i){const l=this.elements,c=1/(t-e),u=1/(i-s),f=1/(o-r),h=(t+e)*c,d=(i+s)*u;let p,_;if(a===_i)p=(o+r)*f,_=-2*f;else if(a===hc)p=r*f,_=-1*f;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-h,l[1]=0,l[5]=2*u,l[9]=0,l[13]=-d,l[2]=0,l[6]=0,l[10]=_,l[14]=-p,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let s=0;s<16;s++)if(t[s]!==i[s])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}}const Ho=new k,Ci=new Je,bP=new k(0,0,0),xP=new k(1,1,1),Qs=new k,gu=new k,ii=new k,_y=new Je,vy=new Qn;class li{constructor(e=0,t=0,i=0,s=li.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=s}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,i,s=this._order){return this._x=e,this._y=t,this._z=i,this._order=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,i=!0){const s=e.elements,r=s[0],o=s[4],a=s[8],l=s[1],c=s[5],u=s[9],f=s[2],h=s[6],d=s[10];switch(t){case"XYZ":this._y=Math.asin(st(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,d),this._z=Math.atan2(-o,r)):(this._x=Math.atan2(h,c),this._z=0);break;case"YXZ":this._x=Math.asin(-st(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,d),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-f,r),this._z=0);break;case"ZXY":this._x=Math.asin(st(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,d),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,r));break;case"ZYX":this._y=Math.asin(-st(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,d),this._z=Math.atan2(l,r)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(st(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-f,r)):(this._x=0,this._y=Math.atan2(a,d));break;case"XZY":this._z=Math.asin(-st(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(h,c),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-u,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return _y.makeRotationFromQuaternion(e),this.setFromRotationMatrix(_y,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return vy.setFromEuler(this),this.setFromQuaternion(vy,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}li.DEFAULT_ORDER="XYZ";class Bc{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let t=0;t1){for(let i=0;i0&&(s.userData=this.userData),s.layers=this.layers.mask,s.matrix=this.matrix.toArray(),s.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(s.matrixAutoUpdate=!1),this.isInstancedMesh&&(s.type="InstancedMesh",s.count=this.count,s.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(s.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(s.type="BatchedMesh",s.perObjectFrustumCulled=this.perObjectFrustumCulled,s.sortObjects=this.sortObjects,s.drawRanges=this._drawRanges,s.reservedRanges=this._reservedRanges,s.geometryInfo=this._geometryInfo.map(a=>({...a,boundingBox:a.boundingBox?a.boundingBox.toJSON():void 0,boundingSphere:a.boundingSphere?a.boundingSphere.toJSON():void 0})),s.instanceInfo=this._instanceInfo.map(a=>({...a})),s.availableInstanceIds=this._availableInstanceIds.slice(),s.availableGeometryIds=this._availableGeometryIds.slice(),s.nextIndexStart=this._nextIndexStart,s.nextVertexStart=this._nextVertexStart,s.geometryCount=this._geometryCount,s.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.matricesTexture=this._matricesTexture.toJSON(e),s.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(s.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(s.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(s.boundingBox=this.boundingBox.toJSON()));function r(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?s.background=this.background.toJSON():this.background.isTexture&&(s.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(s.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){s.geometry=r(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let c=0,u=l.length;c0){s.children=[];for(let a=0;a0){s.animations=[];for(let a=0;a0&&(i.geometries=a),l.length>0&&(i.materials=l),c.length>0&&(i.textures=c),u.length>0&&(i.images=u),f.length>0&&(i.shapes=f),h.length>0&&(i.skeletons=h),d.length>0&&(i.animations=d),p.length>0&&(i.nodes=p)}return i.object=s,i;function o(a){const l=[];for(const c in a){const u=a[c];delete u.metadata,l.push(u)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let i=0;i0?s.multiplyScalar(1/Math.sqrt(r)):s.set(0,0,0)}static getBarycoord(e,t,i,s,r){Ri.subVectors(s,t),gs.subVectors(i,t),Ip.subVectors(e,t);const o=Ri.dot(Ri),a=Ri.dot(gs),l=Ri.dot(Ip),c=gs.dot(gs),u=gs.dot(Ip),f=o*c-a*a;if(f===0)return r.set(0,0,0),null;const h=1/f,d=(c*l-a*u)*h,p=(o*u-a*l)*h;return r.set(1-d-p,p,d)}static containsPoint(e,t,i,s){return this.getBarycoord(e,t,i,s,_s)===null?!1:_s.x>=0&&_s.y>=0&&_s.x+_s.y<=1}static getInterpolation(e,t,i,s,r,o,a,l){return this.getBarycoord(e,t,i,s,_s)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(r,_s.x),l.addScaledVector(o,_s.y),l.addScaledVector(a,_s.z),l)}static getInterpolatedAttribute(e,t,i,s,r,o){return Np.setScalar(0),Up.setScalar(0),Fp.setScalar(0),Np.fromBufferAttribute(e,t),Up.fromBufferAttribute(e,i),Fp.fromBufferAttribute(e,s),o.setScalar(0),o.addScaledVector(Np,r.x),o.addScaledVector(Up,r.y),o.addScaledVector(Fp,r.z),o}static isFrontFacing(e,t,i,s){return Ri.subVectors(i,t),gs.subVectors(e,t),Ri.cross(gs).dot(s)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,s){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[s]),this}setFromAttributeAndIndices(e,t,i,s){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,s),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Ri.subVectors(this.c,this.b),gs.subVectors(this.a,this.b),Ri.cross(gs).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Kn.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Kn.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,i,s,r){return Kn.getInterpolation(e,this.a,this.b,this.c,t,i,s,r)}containsPoint(e){return Kn.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Kn.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,s=this.b,r=this.c;let o,a;Xo.subVectors(s,i),$o.subVectors(r,i),Lp.subVectors(e,i);const l=Xo.dot(Lp),c=$o.dot(Lp);if(l<=0&&c<=0)return t.copy(i);Dp.subVectors(e,s);const u=Xo.dot(Dp),f=$o.dot(Dp);if(u>=0&&f<=u)return t.copy(s);const h=l*f-u*c;if(h<=0&&l>=0&&u<=0)return o=l/(l-u),t.copy(i).addScaledVector(Xo,o);Op.subVectors(e,r);const d=Xo.dot(Op),p=$o.dot(Op);if(p>=0&&d<=p)return t.copy(r);const _=d*c-l*p;if(_<=0&&c>=0&&p<=0)return a=c/(c-p),t.copy(i).addScaledVector($o,a);const g=u*p-d*f;if(g<=0&&f-u>=0&&d-p>=0)return Ey.subVectors(r,s),a=(f-u)/(f-u+(d-p)),t.copy(s).addScaledVector(Ey,a);const m=1/(g+_+h);return o=_*m,a=h*m,t.copy(i).addScaledVector(Xo,o).addScaledVector($o,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const lE={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},er={h:0,s:0,l:0},vu={h:0,s:0,l:0};function kp(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*6*(2/3-t):n}class Pe{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(t===void 0&&i===void 0){const s=e;s&&s.isColor?this.copy(s):typeof s=="number"?this.setHex(s):typeof s=="string"&&this.setStyle(s)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Fn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,pt.colorSpaceToWorking(this,t),this}setRGB(e,t,i,s=pt.workingColorSpace){return this.r=e,this.g=t,this.b=i,pt.colorSpaceToWorking(this,s),this}setHSL(e,t,i,s=pt.workingColorSpace){if(e=n_(e,1),t=st(t,0,1),i=st(i,0,1),t===0)this.r=this.g=this.b=i;else{const r=i<=.5?i*(1+t):i+t-i*t,o=2*i-r;this.r=kp(o,r,e+1/3),this.g=kp(o,r,e),this.b=kp(o,r,e-1/3)}return pt.colorSpaceToWorking(this,s),this}setStyle(e,t=Fn){function i(r){r!==void 0&&parseFloat(r)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let s;if(s=/^(\w+)\(([^\)]*)\)/.exec(e)){let r;const o=s[1],a=s[2];switch(o){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,t);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,t);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(s=/^\#([A-Fa-f\d]+)$/.exec(e)){const r=s[1],o=r.length;if(o===3)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,t);if(o===6)return this.setHex(parseInt(r,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Fn){const i=lE[e.toLowerCase()];return i!==void 0?this.setHex(i,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Os(e.r),this.g=Os(e.g),this.b=Os(e.b),this}copyLinearToSRGB(e){return this.r=_a(e.r),this.g=_a(e.g),this.b=_a(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Fn){return pt.workingToColorSpace(Sn.copy(this),e),Math.round(st(Sn.r*255,0,255))*65536+Math.round(st(Sn.g*255,0,255))*256+Math.round(st(Sn.b*255,0,255))}getHexString(e=Fn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=pt.workingColorSpace){pt.workingToColorSpace(Sn.copy(this),t);const i=Sn.r,s=Sn.g,r=Sn.b,o=Math.max(i,s,r),a=Math.min(i,s,r);let l,c;const u=(a+o)/2;if(a===o)l=0,c=0;else{const f=o-a;switch(c=u<=.5?f/(o+a):f/(2-o-a),o){case i:l=(s-r)/f+(s0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const i=e[t];if(i===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const s=this[t];if(s===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}s&&s.isColor?s.set(i):s&&s.isVector3&&i&&i.isVector3?s.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const i={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(i.dispersion=this.dispersion),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapRotation!==void 0&&(i.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==_o&&(i.blending=this.blending),this.side!==Bs&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==Gf&&(i.blendSrc=this.blendSrc),this.blendDst!==Wf&&(i.blendDst=this.blendDst),this.blendEquation!==hr&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==So&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==vg&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==so&&(i.stencilFail=this.stencilFail),this.stencilZFail!==so&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==so&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function s(r){const o=[];for(const a in r){const l=r[a];delete l.metadata,o.push(l)}return o}if(t){const r=s(e.textures),o=s(e.images);r.length>0&&(i.textures=r),o.length>0&&(i.images=o)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let i=null;if(t!==null){const s=t.length;i=new Array(s);for(let r=0;r!==s;++r)i[r]=t[r].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class Xs extends Pn{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Pe(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new li,this.combine=Fc,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const As=AP();function AP(){const n=new ArrayBuffer(4),e=new Float32Array(n),t=new Uint32Array(n),i=new Uint32Array(512),s=new Uint32Array(512);for(let l=0;l<256;++l){const c=l-127;c<-27?(i[l]=0,i[l|256]=32768,s[l]=24,s[l|256]=24):c<-14?(i[l]=1024>>-c-14,i[l|256]=1024>>-c-14|32768,s[l]=-c-1,s[l|256]=-c-1):c<=15?(i[l]=c+15<<10,i[l|256]=c+15<<10|32768,s[l]=13,s[l|256]=13):c<128?(i[l]=31744,i[l|256]=64512,s[l]=24,s[l|256]=24):(i[l]=31744,i[l|256]=64512,s[l]=13,s[l|256]=13)}const r=new Uint32Array(2048),o=new Uint32Array(64),a=new Uint32Array(64);for(let l=1;l<1024;++l){let c=l<<13,u=0;for(;(c&8388608)===0;)c<<=1,u-=8388608;c&=-8388609,u+=947912704,r[l]=c|u}for(let l=1024;l<2048;++l)r[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)o[l]=l<<23;o[31]=1199570944,o[32]=2147483648;for(let l=33;l<63;++l)o[l]=2147483648+(l-32<<23);o[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(a[l]=1024);return{floatView:e,uint32View:t,baseTable:i,shiftTable:s,mantissaTable:r,exponentTable:o,offsetTable:a}}function qn(n){Math.abs(n)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),n=st(n,-65504,65504),As.floatView[0]=n;const e=As.uint32View[0],t=e>>23&511;return As.baseTable[t]+((e&8388607)>>As.shiftTable[t])}function _l(n){const e=n>>10;return As.uint32View[0]=As.mantissaTable[As.offsetTable[e]+(n&1023)]+As.exponentTable[e],As.floatView[0]}class CP{static toHalfFloat(e){return qn(e)}static fromHalfFloat(e){return _l(e)}}const Kt=new k,yu=new fe;let RP=0;class Pt{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:RP++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=fc,this.updateRanges=[],this.gpuType=Zn,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;for(let s=0,r=this.itemSize;st.count&&console.warn("THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Cn);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new k(-1/0,-1/0,-1/0),new k(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let i=0,s=t.length;i0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const i=this.attributes;for(const l in i){const c=i[l];e.data.attributes[l]=c.toJSON(e.data)}const s={};let r=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let f=0,h=c.length;f0&&(s[l]=u,r=!0)}r&&(e.data.morphAttributes=s,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere=a.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone());const s=e.attributes;for(const c in s){const u=s[c];this.setAttribute(c,u.clone(t))}const r=e.morphAttributes;for(const c in r){const u=[],f=r[c];for(let h=0,d=f.length;h0){const s=t[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=s.length;r(e.far-e.near)**2))&&(Ty.copy(r).invert(),Gr.copy(e.ray).applyMatrix4(Ty),!(i.boundingBox!==null&&Gr.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,Gr)))}_computeIntersections(e,t,i){let s;const r=this.geometry,o=this.material,a=r.index,l=r.attributes.position,c=r.attributes.uv,u=r.attributes.uv1,f=r.attributes.normal,h=r.groups,d=r.drawRange;if(a!==null)if(Array.isArray(o))for(let p=0,_=h.length;p<_;p++){const g=h[p],m=o[g.materialIndex],v=Math.max(g.start,d.start),b=Math.min(a.count,Math.min(g.start+g.count,d.start+d.count));for(let y=v,T=b;yt.far?null:{distance:c,point:Tu.clone(),object:n}}function wu(n,e,t,i,s,r,o,a,l,c){n.getVertexPosition(a,xu),n.getVertexPosition(l,Mu),n.getVertexPosition(c,Su);const u=FP(n,e,t,i,xu,Mu,Su,Ay);if(u){const f=new k;Kn.getBarycoord(Ay,xu,Mu,Su,f),s&&(u.uv=Kn.getInterpolatedAttribute(s,a,l,c,f,new fe)),r&&(u.uv1=Kn.getInterpolatedAttribute(r,a,l,c,f,new fe)),o&&(u.normal=Kn.getInterpolatedAttribute(o,a,l,c,f,new k),u.normal.dot(i.direction)>0&&u.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new k,materialIndex:0};Kn.getNormal(xu,Mu,Su,h.normal),u.face=h,u.barycoord=f}return u}class Ro extends ct{constructor(e=1,t=1,i=1,s=1,r=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:s,heightSegments:r,depthSegments:o};const a=this;s=Math.floor(s),r=Math.floor(r),o=Math.floor(o);const l=[],c=[],u=[],f=[];let h=0,d=0;p("z","y","x",-1,-1,i,t,e,o,r,0),p("z","y","x",1,-1,i,t,-e,o,r,1),p("x","z","y",1,1,e,i,t,s,o,2),p("x","z","y",1,-1,e,i,-t,s,o,3),p("x","y","z",1,-1,e,t,i,s,r,4),p("x","y","z",-1,-1,e,t,-i,s,r,5),this.setIndex(l),this.setAttribute("position",new ke(c,3)),this.setAttribute("normal",new ke(u,3)),this.setAttribute("uv",new ke(f,2));function p(_,g,m,v,b,y,T,w,S,P,M){const E=y/S,D=T/P,B=y/2,z=T/2,V=w/2,Q=S+1,j=P+1;let te=0,Z=0;const pe=new k;for(let Me=0;Me0?1:-1,u.push(pe.x,pe.y,pe.z),f.push(xe/S),f.push(1-Me/P),te+=1}}for(let Me=0;Me0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const i={};for(const s in this.extensions)this.extensions[s]===!0&&(i[s]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}}class zc extends gt{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Je,this.projectionMatrix=new Je,this.projectionMatrixInverse=new Je,this.coordinateSystem=_i}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const tr=new k,Ay=new fe,Cy=new fe;class Jt extends zc{constructor(e=50,t=1,i=.1,s=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=s,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=Ca*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(vo*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Ca*2*Math.atan(Math.tan(vo*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,i){tr.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(tr.x,tr.y).multiplyScalar(-e/tr.z),tr.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(tr.x,tr.y).multiplyScalar(-e/tr.z)}getViewSize(e,t){return this.getViewBounds(e,Ay,Cy),t.subVectors(Cy,Ay)}setViewOffset(e,t,i,s,r,o){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=s,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(vo*.5*this.fov)/this.zoom,i=2*t,s=this.aspect*i,r=-.5*s;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,c=o.fullHeight;r+=o.offsetX*s/l,t-=o.offsetY*i/c,s*=o.width/l,i*=o.height/c}const a=this.filmOffset;a!==0&&(r+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+s,t,t-i,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const Yo=-90,jo=1;class fE extends gt{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const s=new Jt(Yo,jo,e,t);s.layers=this.layers,this.add(s);const r=new Jt(Yo,jo,e,t);r.layers=this.layers,this.add(r);const o=new Jt(Yo,jo,e,t);o.layers=this.layers,this.add(o);const a=new Jt(Yo,jo,e,t);a.layers=this.layers,this.add(a);const l=new Jt(Yo,jo,e,t);l.layers=this.layers,this.add(l);const c=new Jt(Yo,jo,e,t);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[i,s,r,o,a,l]=t;for(const c of t)this.remove(c);if(e===_i)i.up.set(0,1,0),i.lookAt(1,0,0),s.up.set(0,1,0),s.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===hc)i.up.set(0,-1,0),i.lookAt(-1,0,0),s.up.set(0,-1,0),s.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const c of t)this.add(c),c.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();const{renderTarget:i,activeMipmapLevel:s}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[r,o,a,l,c,u]=this.children,f=e.getRenderTarget(),h=e.getActiveCubeFace(),d=e.getActiveMipmapLevel(),p=e.xr.enabled;e.xr.enabled=!1;const _=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0,s),e.render(t,r),e.setRenderTarget(i,1,s),e.render(t,o),e.setRenderTarget(i,2,s),e.render(t,a),e.setRenderTarget(i,3,s),e.render(t,l),e.setRenderTarget(i,4,s),e.render(t,c),i.texture.generateMipmaps=_,e.setRenderTarget(i,5,s),e.render(t,u),e.setRenderTarget(f,h,d),e.xr.enabled=p,i.texture.needsPMREMUpdate=!0}}class Vc extends $t{constructor(e=[],t=zs,i,s,r,o,a,l,c,u){super(e,t,i,s,r,o,a,l,c,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class hE extends os{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},s=[i,i,i,i,i,i];this.texture=new Vc(s),this._setTextureOptions(t),this.texture.isRenderTargetTexture=!0}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const i={uniforms:{tEquirect:{value:null}},vertexShader:` +}`;class zi extends Pn{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=BP,this.fragmentShader=zP,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=Ra(e.uniforms),this.uniformsGroups=kP(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const s in this.uniforms){const o=this.uniforms[s].value;o&&o.isTexture?t.uniforms[s]={type:"t",value:o.toJSON(e).uuid}:o&&o.isColor?t.uniforms[s]={type:"c",value:o.getHex()}:o&&o.isVector2?t.uniforms[s]={type:"v2",value:o.toArray()}:o&&o.isVector3?t.uniforms[s]={type:"v3",value:o.toArray()}:o&&o.isVector4?t.uniforms[s]={type:"v4",value:o.toArray()}:o&&o.isMatrix3?t.uniforms[s]={type:"m3",value:o.toArray()}:o&&o.isMatrix4?t.uniforms[s]={type:"m4",value:o.toArray()}:t.uniforms[s]={value:o}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const i={};for(const s in this.extensions)this.extensions[s]===!0&&(i[s]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}}class zc extends gt{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Je,this.projectionMatrix=new Je,this.projectionMatrixInverse=new Je,this.coordinateSystem=_i}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const tr=new k,Cy=new fe,Ry=new fe;class Jt extends zc{constructor(e=50,t=1,i=.1,s=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=s,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=Ca*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(vo*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Ca*2*Math.atan(Math.tan(vo*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,i){tr.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(tr.x,tr.y).multiplyScalar(-e/tr.z),tr.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(tr.x,tr.y).multiplyScalar(-e/tr.z)}getViewSize(e,t){return this.getViewBounds(e,Cy,Ry),t.subVectors(Ry,Cy)}setViewOffset(e,t,i,s,r,o){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=s,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(vo*.5*this.fov)/this.zoom,i=2*t,s=this.aspect*i,r=-.5*s;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,c=o.fullHeight;r+=o.offsetX*s/l,t-=o.offsetY*i/c,s*=o.width/l,i*=o.height/c}const a=this.filmOffset;a!==0&&(r+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+s,t,t-i,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const Yo=-90,jo=1;class fE extends gt{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const s=new Jt(Yo,jo,e,t);s.layers=this.layers,this.add(s);const r=new Jt(Yo,jo,e,t);r.layers=this.layers,this.add(r);const o=new Jt(Yo,jo,e,t);o.layers=this.layers,this.add(o);const a=new Jt(Yo,jo,e,t);a.layers=this.layers,this.add(a);const l=new Jt(Yo,jo,e,t);l.layers=this.layers,this.add(l);const c=new Jt(Yo,jo,e,t);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[i,s,r,o,a,l]=t;for(const c of t)this.remove(c);if(e===_i)i.up.set(0,1,0),i.lookAt(1,0,0),s.up.set(0,1,0),s.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===hc)i.up.set(0,-1,0),i.lookAt(-1,0,0),s.up.set(0,-1,0),s.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const c of t)this.add(c),c.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();const{renderTarget:i,activeMipmapLevel:s}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[r,o,a,l,c,u]=this.children,f=e.getRenderTarget(),h=e.getActiveCubeFace(),d=e.getActiveMipmapLevel(),p=e.xr.enabled;e.xr.enabled=!1;const _=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0,s),e.render(t,r),e.setRenderTarget(i,1,s),e.render(t,o),e.setRenderTarget(i,2,s),e.render(t,a),e.setRenderTarget(i,3,s),e.render(t,l),e.setRenderTarget(i,4,s),e.render(t,c),i.texture.generateMipmaps=_,e.setRenderTarget(i,5,s),e.render(t,u),e.setRenderTarget(f,h,d),e.xr.enabled=p,i.texture.needsPMREMUpdate=!0}}class Vc extends $t{constructor(e=[],t=zs,i,s,r,o,a,l,c,u){super(e,t,i,s,r,o,a,l,c,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class hE extends os{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},s=[i,i,i,i,i,i];this.texture=new Vc(s),this._setTextureOptions(t),this.texture.isRenderTargetTexture=!0}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const i={uniforms:{tEquirect:{value:null}},vertexShader:` varying vec3 vWorldDirection; @@ -58,7 +58,7 @@ var aC=Object.defineProperty;var lC=(n,e,t)=>e in n?aC(n,e,{enumerable:!0,config gl_FragColor = texture2D( tEquirect, sampleUV ); } - `},s=new Ro(5,5,5),r=new zi({name:"CubemapFromEquirect",uniforms:Ra(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:Vn,blending:Ds});r.uniforms.tEquirect.value=t;const o=new jt(s,r),a=t.minFilter;return t.minFilter===Qi&&(t.minFilter=nn),new fE(1,10,this).update(e,o),t.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,t=!0,i=!0,s=!0){const r=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,i,s);e.setRenderTarget(r)}}class ca extends gt{constructor(){super(),this.isGroup=!0,this.type="Group"}}const VP={type:"move"};class Sf{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new ca,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new ca,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new k,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new k),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new ca,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new k,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new k),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const i of e.hand.values())this._getHandJoint(t,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,i){let s=null,r=null,o=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(c&&e.hand){o=!0;for(const _ of e.hand.values()){const g=t.getJointPose(_,i),m=this._getHandJoint(c,_);g!==null&&(m.matrix.fromArray(g.transform.matrix),m.matrix.decompose(m.position,m.rotation,m.scale),m.matrixWorldNeedsUpdate=!0,m.jointRadius=g.radius),m.visible=g!==null}const u=c.joints["index-finger-tip"],f=c.joints["thumb-tip"],h=u.position.distanceTo(f.position),d=.02,p=.005;c.inputState.pinching&&h>d+p?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&h<=d-p&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(r=t.getPose(e.gripSpace,i),r!==null&&(l.matrix.fromArray(r.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,r.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(r.linearVelocity)):l.hasLinearVelocity=!1,r.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(r.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(s=t.getPose(e.targetRaySpace,i),s===null&&r!==null&&(s=r),s!==null&&(a.matrix.fromArray(s.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,s.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(s.linearVelocity)):a.hasLinearVelocity=!1,s.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(s.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(VP)))}return a!==null&&(a.visible=s!==null),l!==null&&(l.visible=r!==null),c!==null&&(c.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const i=new ca;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}class gd{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new Pe(e),this.density=t}clone(){return new gd(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class _d{constructor(e,t=1,i=1e3){this.isFog=!0,this.name="",this.color=new Pe(e),this.near=t,this.far=i}clone(){return new _d(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class vd extends gt{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new li,this.environmentIntensity=1,this.environmentRotation=new li,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}}class yd{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=fc,this.updateRanges=[],this.version=0,this.uuid=oi()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,i){e*=this.stride,i*=t.stride;for(let s=0,r=this.stride;se.far||t.push({distance:l,point:nl.clone(),uv:Kn.getInterpolation(nl,Au,sl,Cu,Ry,Vp,Py,new fe),face:null,object:this})}copy(e,t){return super.copy(e,t),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function Ru(n,e,t,i,s,r){Qo.subVectors(n,t).addScalar(.5).multiply(i),s!==void 0?(il.x=r*Qo.x-s*Qo.y,il.y=s*Qo.x+r*Qo.y):il.copy(Qo),n.copy(e),n.x+=il.x,n.y+=il.y,n.applyMatrix4(dE)}const Pu=new k,Iy=new k;class mE extends gt{constructor(){super(),this.isLOD=!0,this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let i=0,s=t.length;i0){let i,s;for(i=1,s=t.length;i0){Pu.setFromMatrixPosition(this.matrixWorld);const s=e.ray.origin.distanceTo(Pu);this.getObjectForDistance(s).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){Pu.setFromMatrixPosition(e.matrixWorld),Iy.setFromMatrixPosition(this.matrixWorld);const i=Pu.distanceTo(Iy)/e.zoom;t[0].object.visible=!0;let s,r;for(s=1,r=t.length;s=o)t[s-1].object.visible=!1,t[s].object.visible=!0;else break}for(this._currentLevel=s-1;s1?null:t.copy(e.start).addScaledVector(i,r)}intersectsLine(e){const t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const i=t||$P.getNormalMatrix(e),s=this.coplanarPoint(Wp).applyMatrix4(e),r=this.normal.applyMatrix3(i).normalize();return this.constant=-s.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Wr=new bn,Du=new k;class Ha{constructor(e=new ur,t=new ur,i=new ur,s=new ur,r=new ur,o=new ur){this.planes=[e,t,i,s,r,o]}set(e,t,i,s,r,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(i),a[3].copy(s),a[4].copy(r),a[5].copy(o),this}copy(e){const t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,t=_i){const i=this.planes,s=e.elements,r=s[0],o=s[1],a=s[2],l=s[3],c=s[4],u=s[5],f=s[6],h=s[7],d=s[8],p=s[9],_=s[10],g=s[11],m=s[12],v=s[13],b=s[14],y=s[15];if(i[0].setComponents(l-r,h-c,g-d,y-m).normalize(),i[1].setComponents(l+r,h+c,g+d,y+m).normalize(),i[2].setComponents(l+o,h+u,g+p,y+v).normalize(),i[3].setComponents(l-o,h-u,g-p,y-v).normalize(),i[4].setComponents(l-a,h-f,g-_,y-b).normalize(),t===_i)i[5].setComponents(l+a,h+f,g+_,y+b).normalize();else if(t===hc)i[5].setComponents(a,f,_,b).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Wr.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Wr.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Wr)}intersectsSprite(e){return Wr.center.set(0,0,0),Wr.radius=.7071067811865476,Wr.applyMatrix4(e.matrixWorld),this.intersectsSphere(Wr)}intersectsSphere(e){const t=this.planes,i=e.center,s=-e.radius;for(let r=0;r<6;r++)if(t[r].distanceToPoint(i)0?e.max.x:e.min.x,Du.y=s.normal.y>0?e.max.y:e.min.y,Du.z=s.normal.z>0?e.max.z:e.min.z,s.distanceToPoint(Du)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}const Xi=new Je,$i=new Ha;class xd{constructor(){this.coordinateSystem=_i}intersectsObject(e,t){if(!t.isArrayCamera||t.cameras.length===0)return!1;for(let i=0;i=r.length&&r.push({start:-1,count:-1,z:-1,index:-1});const a=r[this.index];o.push(a),this.index++,a.start=e,a.count=t,a.z=i,a.index=s}reset(){this.list.length=0,this.index=0}}const $n=new Je,KP=new Pe(1,1,1),zy=new Ha,ZP=new xd,Ou=new Cn,Xr=new bn,al=new k,Vy=new k,JP=new k,$p=new jP,En=new jt,Nu=[];function QP(n,e,t=0){const i=e.itemSize;if(n.isInterleavedBufferAttribute||n.array.constructor!==e.array.constructor){const s=n.count;for(let r=0;r65535?new Uint32Array(s):new Uint16Array(s);t.setIndex(new Pt(r,1))}this._geometryInitialized=!0}}_validateGeometry(e){const t=this.geometry;if(!!e.getIndex()!=!!t.getIndex())throw new Error('THREE.BatchedMesh: All geometries must consistently have "index".');for(const i in t.attributes){if(!e.hasAttribute(i))throw new Error(`THREE.BatchedMesh: Added geometry missing "${i}". All geometries must have consistent attributes.`);const s=e.getAttribute(i),r=t.getAttribute(i);if(s.itemSize!==r.itemSize||s.normalized!==r.normalized)throw new Error("THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}validateInstanceId(e){const t=this._instanceInfo;if(e<0||e>=t.length||t[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid instanceId ${e}. Instance is either out of range or has been deleted.`)}validateGeometryId(e){const t=this._geometryInfo;if(e<0||e>=t.length||t[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid geometryId ${e}. Geometry is either out of range or has been deleted.`)}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Cn);const e=this.boundingBox,t=this._instanceInfo;e.makeEmpty();for(let i=0,s=t.length;i=this.maxInstanceCount&&this._availableInstanceIds.length===0)throw new Error("THREE.BatchedMesh: Maximum item count reached.");const i={visible:!0,active:!0,geometryIndex:e};let s=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(Xp),s=this._availableInstanceIds.shift(),this._instanceInfo[s]=i):(s=this._instanceInfo.length,this._instanceInfo.push(i));const r=this._matricesTexture;$n.identity().toArray(r.image.data,s*16),r.needsUpdate=!0;const o=this._colorsTexture;return o&&(KP.toArray(o.image.data,s*4),o.needsUpdate=!0),this._visibilityChanged=!0,s}addGeometry(e,t=-1,i=-1){this._initializeGeometry(e),this._validateGeometry(e);const s={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},r=this._geometryInfo;s.vertexStart=this._nextVertexStart,s.reservedVertexCount=t===-1?e.getAttribute("position").count:t;const o=e.getIndex();if(o!==null&&(s.indexStart=this._nextIndexStart,s.reservedIndexCount=i===-1?o.count:i),s.indexStart!==-1&&s.indexStart+s.reservedIndexCount>this._maxIndexCount||s.vertexStart+s.reservedVertexCount>this._maxVertexCount)throw new Error("THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.");let l;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(Xp),l=this._availableGeometryIds.shift(),r[l]=s):(l=this._geometryCount,this._geometryCount++,r.push(s)),this.setGeometryAt(l,e),this._nextIndexStart=s.indexStart+s.reservedIndexCount,this._nextVertexStart=s.vertexStart+s.reservedVertexCount,l}setGeometryAt(e,t){if(e>=this._geometryCount)throw new Error("THREE.BatchedMesh: Maximum geometry count reached.");this._validateGeometry(t);const i=this.geometry,s=i.getIndex()!==null,r=i.getIndex(),o=t.getIndex(),a=this._geometryInfo[e];if(s&&o.count>a.reservedIndexCount||t.attributes.position.count>a.reservedVertexCount)throw new Error("THREE.BatchedMesh: Reserved space not large enough for provided geometry.");const l=a.vertexStart,c=a.reservedVertexCount;a.vertexCount=t.getAttribute("position").count;for(const u in i.attributes){const f=t.getAttribute(u),h=i.getAttribute(u);QP(f,h,l);const d=f.itemSize;for(let p=f.count,_=c;p<_;p++){const g=l+p;for(let m=0;m=t.length||t[e].active===!1)return this;const i=this._instanceInfo;for(let s=0,r=i.length;sa).sort((o,a)=>i[o].vertexStart-i[a].vertexStart),r=this.geometry;for(let o=0,a=i.length;o=this._geometryCount)return null;const i=this.geometry,s=this._geometryInfo[e];if(s.boundingBox===null){const r=new Cn,o=i.index,a=i.attributes.position;for(let l=s.start,c=s.start+s.count;l=this._geometryCount)return null;const i=this.geometry,s=this._geometryInfo[e];if(s.boundingSphere===null){const r=new bn;this.getBoundingBoxAt(e,Ou),Ou.getCenter(r.center);const o=i.index,a=i.attributes.position;let l=0;for(let c=s.start,u=s.start+s.count;ca.active);if(Math.max(...i.map(a=>a.vertexStart+a.reservedVertexCount))>e)throw new Error(`BatchedMesh: Geometry vertex values are being used outside the range ${t}. Cannot shrink further.`);if(this.geometry.index&&Math.max(...i.map(l=>l.indexStart+l.reservedIndexCount))>t)throw new Error(`BatchedMesh: Geometry index values are being used outside the range ${t}. Cannot shrink further.`);const r=this.geometry;r.dispose(),this._maxVertexCount=e,this._maxIndexCount=t,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new ct,this._initializeGeometry(r));const o=this.geometry;r.index&&$r(r.index.array,o.index.array);for(const a in r.attributes)$r(r.attributes[a].array,o.attributes[a].array)}raycast(e,t){const i=this._instanceInfo,s=this._geometryInfo,r=this.matrixWorld,o=this.geometry;En.material=this.material,En.geometry.index=o.index,En.geometry.attributes=o.attributes,En.geometry.boundingBox===null&&(En.geometry.boundingBox=new Cn),En.geometry.boundingSphere===null&&(En.geometry.boundingSphere=new bn);for(let a=0,l=i.length;a({...t,boundingBox:t.boundingBox!==null?t.boundingBox.clone():null,boundingSphere:t.boundingSphere!==null?t.boundingSphere.clone():null})),this._instanceInfo=e._instanceInfo.map(t=>({...t})),this._availableInstanceIds=e._availableInstanceIds.slice(),this._availableGeometryIds=e._availableGeometryIds.slice(),this._nextIndexStart=e._nextIndexStart,this._nextVertexStart=e._nextVertexStart,this._geometryCount=e._geometryCount,this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._indirectTexture=e._indirectTexture.clone(),this._indirectTexture.image.data=this._indirectTexture.image.data.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null)}onBeforeRender(e,t,i,s,r){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const o=s.getIndex(),a=o===null?1:o.array.BYTES_PER_ELEMENT,l=this._instanceInfo,c=this._multiDrawStarts,u=this._multiDrawCounts,f=this._geometryInfo,h=this.perObjectFrustumCulled,d=this._indirectTexture,p=d.image.data,_=i.isArrayCamera?ZP:zy;h&&!i.isArrayCamera&&($n.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse).multiply(this.matrixWorld),zy.setFromProjectionMatrix($n,e.coordinateSystem));let g=0;if(this.sortObjects){$n.copy(this.matrixWorld).invert(),al.setFromMatrixPosition(i.matrixWorld).applyMatrix4($n),Vy.set(0,0,-1).transformDirection(i.matrixWorld).transformDirection($n);for(let b=0,y=l.length;b0){const s=t[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=s.length;ri)return;qp.applyMatrix4(n.matrixWorld);const c=e.ray.origin.distanceTo(qp);if(!(ce.far))return{distance:c,point:Gy.clone().applyMatrix4(n.matrixWorld),index:o,face:null,faceIndex:null,barycoord:null,object:n}}const Wy=new k,Xy=new k;class ls extends Sr{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,i=[];for(let s=0,r=t.count;s0){const s=t[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=s.length;rs.far)return;r.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,faceIndex:null,barycoord:null,object:o})}}class xE extends $t{constructor(e,t,i,s,r=nn,o=nn,a,l,c){super(e,t,i,s,r,o,a,l,c),this.isVideoTexture=!0,this.generateMipmaps=!1;const u=this;function f(){u.needsUpdate=!0,e.requestVideoFrameCallback(f)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(f)}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class eI extends xE{constructor(e,t,i,s,r,o,a,l){super({},e,t,i,s,r,o,a,l),this.isVideoFrameTexture=!0}update(){}clone(){return new this.constructor().copy(this)}setFrame(e){this.image=e,this.needsUpdate=!0}}class tI extends $t{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=yn,this.minFilter=yn,this.generateMipmaps=!1,this.needsUpdate=!0}}class Md extends $t{constructor(e,t,i,s,r,o,a,l,c,u,f,h){super(null,o,a,l,c,u,s,r,f,h),this.isCompressedTexture=!0,this.image={width:t,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class nI extends Md{constructor(e,t,i,s,r,o){super(e,t,i,r,o),this.isCompressedArrayTexture=!0,this.image.depth=s,this.wrapR=gi,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class iI extends Md{constructor(e,t,i){super(void 0,e[0].width,e[0].height,t,i,zs),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class sI extends $t{constructor(e,t,i,s,r,o,a,l,c){super(e,t,i,s,r,o,a,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class c_ extends $t{constructor(e,t,i=Vs,s,r,o,a=yn,l=yn,c,u=wa,f=1){if(u!==wa&&u!==Aa)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");const h={width:e,height:t,depth:f};super(h,s,r,o,a,l,u,i,c),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new dr(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return this.compareFunction!==null&&(t.compareFunction=this.compareFunction),t}}class Sd extends ct{constructor(e=1,t=1,i=4,s=8,r=1){super(),this.type="CapsuleGeometry",this.parameters={radius:e,height:t,capSegments:i,radialSegments:s,heightSegments:r},t=Math.max(0,t),i=Math.max(1,Math.floor(i)),s=Math.max(3,Math.floor(s)),r=Math.max(1,Math.floor(r));const o=[],a=[],l=[],c=[],u=t/2,f=Math.PI/2*e,h=t,d=2*f+h,p=i*2+r,_=s+1,g=new k,m=new k;for(let v=0;v<=p;v++){let b=0,y=0,T=0,w=0;if(v<=i){const M=v/i,E=M*Math.PI/2;y=-u-e*Math.cos(E),T=e*Math.sin(E),w=-e*Math.cos(E),b=M*f}else if(v<=i+r){const M=(v-i)/r;y=-u+M*t,T=e,w=0,b=f+M*h}else{const M=(v-i-r)/i,E=M*Math.PI/2;y=u+e*Math.sin(E),T=e*Math.cos(E),w=e*Math.sin(E),b=f+h+M*f}const S=Math.max(0,Math.min(1,b/d));let P=0;v===0?P=.5/s:v===p&&(P=-.5/s);for(let M=0;M<=s;M++){const E=M/s,D=E*Math.PI*2,B=Math.sin(D),z=Math.cos(D);m.x=-T*z,m.y=y,m.z=T*B,a.push(m.x,m.y,m.z),g.set(-T*z,w,T*B),g.normalize(),l.push(g.x,g.y,g.z),c.push(E+P,S)}if(v>0){const M=(v-1)*_;for(let E=0;E0&&b(!0),t>0&&b(!1)),this.setIndex(u),this.setAttribute("position",new ke(f,3)),this.setAttribute("normal",new ke(h,3)),this.setAttribute("uv",new ke(d,2));function v(){const y=new k,T=new k;let w=0;const S=(t-e)/i;for(let P=0;P<=r;P++){const M=[],E=P/r,D=E*(t-e)+e;for(let B=0;B<=s;B++){const z=B/s,V=z*l+a,Q=Math.sin(V),j=Math.cos(V);T.x=D*Q,T.y=-E*i+g,T.z=D*j,f.push(T.x,T.y,T.z),y.set(Q,S,j).normalize(),h.push(y.x,y.y,y.z),d.push(z,1-E),M.push(p++)}_.push(M)}for(let P=0;P0||M!==0)&&(u.push(E,D,z),w+=3),(t>0||M!==r-1)&&(u.push(D,B,z),w+=3)}c.addGroup(m,w,0),m+=w}function b(y){const T=p,w=new fe,S=new k;let P=0;const M=y===!0?e:t,E=y===!0?1:-1;for(let B=1;B<=s;B++)f.push(0,g*E,0),h.push(0,E,0),d.push(.5,.5),p++;const D=p;for(let B=0;B<=s;B++){const V=B/s*l+a,Q=Math.cos(V),j=Math.sin(V);S.x=M*j,S.y=g*E,S.z=M*Q,f.push(S.x,S.y,S.z),h.push(0,E,0),w.x=Q*.5+.5,w.y=j*.5*E+.5,d.push(w.x,w.y),p++}for(let B=0;B.9&&S<.1&&(b<.2&&(o[v+0]+=1),y<.2&&(o[v+2]+=1),T<.2&&(o[v+4]+=1))}}function h(v){r.push(v.x,v.y,v.z)}function d(v,b){const y=v*3;b.x=e[y+0],b.y=e[y+1],b.z=e[y+2]}function p(){const v=new k,b=new k,y=new k,T=new k,w=new fe,S=new fe,P=new fe;for(let M=0,E=0;M0)l=s-1;else{l=s;break}if(s=l,i[s]===o)return s/(r-1);const u=i[s],h=i[s+1]-u,d=(o-u)/h;return(s+d)/(r-1)}getTangent(e,t){let s=e-1e-4,r=e+1e-4;s<0&&(s=0),r>1&&(r=1);const o=this.getPoint(s),a=this.getPoint(r),l=t||(o.isVector2?new fe:new k);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,t){const i=this.getUtoTmapping(e);return this.getTangent(i,t)}computeFrenetFrames(e,t=!1){const i=new k,s=[],r=[],o=[],a=new k,l=new Je;for(let d=0;d<=e;d++){const p=d/e;s[d]=this.getTangentAt(p,new k)}r[0]=new k,o[0]=new k;let c=Number.MAX_VALUE;const u=Math.abs(s[0].x),f=Math.abs(s[0].y),h=Math.abs(s[0].z);u<=c&&(c=u,i.set(1,0,0)),f<=c&&(c=f,i.set(0,1,0)),h<=c&&i.set(0,0,1),a.crossVectors(s[0],i).normalize(),r[0].crossVectors(s[0],a),o[0].crossVectors(s[0],r[0]);for(let d=1;d<=e;d++){if(r[d]=r[d-1].clone(),o[d]=o[d-1].clone(),a.crossVectors(s[d-1],s[d]),a.length()>Number.EPSILON){a.normalize();const p=Math.acos(st(s[d-1].dot(s[d]),-1,1));r[d].applyMatrix4(l.makeRotationAxis(a,p))}o[d].crossVectors(s[d],r[d])}if(t===!0){let d=Math.acos(st(r[0].dot(r[e]),-1,1));d/=e,s[0].dot(a.crossVectors(r[0],r[e]))>0&&(d=-d);for(let p=1;p<=e;p++)r[p].applyMatrix4(l.makeRotationAxis(s[p],d*p)),o[p].crossVectors(s[p],r[p])}return{tangents:s,normals:r,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.7,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class wd extends Gi{constructor(e=0,t=0,i=1,s=1,r=0,o=Math.PI*2,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=i,this.yRadius=s,this.aStartAngle=r,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,t=new fe){const i=t,s=Math.PI*2;let r=this.aEndAngle-this.aStartAngle;const o=Math.abs(r)s;)r-=s;r0?0:(Math.floor(Math.abs(a)/r)+1)*r:l===0&&a===r-1&&(a=r-2,l=1);let c,u;this.closed||a>0?c=s[(a-1)%r]:(Gu.subVectors(s[0],s[1]).add(s[0]),c=Gu);const f=s[a%r],h=s[(a+1)%r];if(this.closed||a+2s.length-2?s.length-1:o+1],f=s[o>s.length-3?s.length-1:o+2];return i.set(Yy(a,l.x,c.x,u.x,f.x),Yy(a,l.y,c.y,u.y,f.y)),i}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t=i){const o=s[r]-i,a=this.curves[r],l=a.getLength(),c=l===0?0:1-o/l;return a.getPointAt(c,t)}r++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let i=0,s=this.curves.length;i1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,i=e.curves.length;t0){const f=c.getPoint(0);f.equals(this.currentPoint)||this.lineTo(f.x,f.y)}this.curves.push(c);const u=c.getPoint(1);return this.currentPoint.copy(u),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class yo extends Ch{constructor(e){super(e),this.uuid=oi(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let i=0,s=this.holes.length;i80*t){a=1/0,l=1/0;let u=-1/0,f=-1/0;for(let h=t;hu&&(u=d),p>f&&(f=p)}c=Math.max(u-a,f-l),c=c!==0?32767/c:0}return pc(r,o,t,a,l,c,0),o}function CE(n,e,t,i,s){let r;if(s===CI(n,e,t,i)>0)for(let o=e;o=e;o-=i)r=jy(o/i|0,n[o],n[o+1],r);return r&&Ia(r,r.next)&&(gc(r),r=r.next),r}function wo(n,e){if(!n)return n;e||(e=n);let t=n,i;do if(i=!1,!t.steiner&&(Ia(t,t.next)||Gt(t.prev,t,t.next)===0)){if(gc(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function pc(n,e,t,i,s,r,o){if(!n)return;!o&&r&&MI(n,i,s,r);let a=n;for(;n.prev!==n.next;){const l=n.prev,c=n.next;if(r?pI(n,i,s,r):dI(n)){e.push(l.i,n.i,c.i),gc(n),n=c.next,a=c.next;continue}if(n=c,n===a){o?o===1?(n=mI(wo(n),e),pc(n,e,t,i,s,r,2)):o===2&&gI(n,e,t,i,s,r):pc(wo(n),e,t,i,s,r,1);break}}}function dI(n){const e=n.prev,t=n,i=n.next;if(Gt(e,t,i)>=0)return!1;const s=e.x,r=t.x,o=i.x,a=e.y,l=t.y,c=i.y,u=Math.min(s,r,o),f=Math.min(a,l,c),h=Math.max(s,r,o),d=Math.max(a,l,c);let p=i.next;for(;p!==e;){if(p.x>=u&&p.x<=h&&p.y>=f&&p.y<=d&&vl(s,a,r,l,o,c,p.x,p.y)&&Gt(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function pI(n,e,t,i){const s=n.prev,r=n,o=n.next;if(Gt(s,r,o)>=0)return!1;const a=s.x,l=r.x,c=o.x,u=s.y,f=r.y,h=o.y,d=Math.min(a,l,c),p=Math.min(u,f,h),_=Math.max(a,l,c),g=Math.max(u,f,h),m=bg(d,p,e,t,i),v=bg(_,g,e,t,i);let b=n.prevZ,y=n.nextZ;for(;b&&b.z>=m&&y&&y.z<=v;){if(b.x>=d&&b.x<=_&&b.y>=p&&b.y<=g&&b!==s&&b!==o&&vl(a,u,l,f,c,h,b.x,b.y)&&Gt(b.prev,b,b.next)>=0||(b=b.prevZ,y.x>=d&&y.x<=_&&y.y>=p&&y.y<=g&&y!==s&&y!==o&&vl(a,u,l,f,c,h,y.x,y.y)&&Gt(y.prev,y,y.next)>=0))return!1;y=y.nextZ}for(;b&&b.z>=m;){if(b.x>=d&&b.x<=_&&b.y>=p&&b.y<=g&&b!==s&&b!==o&&vl(a,u,l,f,c,h,b.x,b.y)&&Gt(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;y&&y.z<=v;){if(y.x>=d&&y.x<=_&&y.y>=p&&y.y<=g&&y!==s&&y!==o&&vl(a,u,l,f,c,h,y.x,y.y)&&Gt(y.prev,y,y.next)>=0)return!1;y=y.nextZ}return!0}function mI(n,e){let t=n;do{const i=t.prev,s=t.next.next;!Ia(i,s)&&PE(i,t,t.next,s)&&mc(i,s)&&mc(s,i)&&(e.push(i.i,t.i,s.i),gc(t),gc(t.next),t=n=s),t=t.next}while(t!==n);return wo(t)}function gI(n,e,t,i,s,r){let o=n;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&TI(o,a)){let l=IE(o,a);o=wo(o,o.next),l=wo(l,l.next),pc(o,e,t,i,s,r,0),pc(l,e,t,i,s,r,0);return}a=a.next}o=o.next}while(o!==n)}function _I(n,e,t,i){const s=[];for(let r=0,o=e.length;r=t.next.y&&t.next.y!==t.y){const f=t.x+(s-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(f<=i&&f>r&&(r=f,o=t.x=t.x&&t.x>=l&&i!==t.x&&RE(so.x||t.x===o.x&&xI(o,t)))&&(o=t,u=f)}t=t.next}while(t!==a);return o}function xI(n,e){return Gt(n.prev,n,e.prev)<0&&Gt(e.next,n,n.next)<0}function MI(n,e,t,i){let s=n;do s.z===0&&(s.z=bg(s.x,s.y,e,t,i)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==n);s.prevZ.nextZ=null,s.prevZ=null,SI(s)}function SI(n){let e,t=1;do{let i=n,s;n=null;let r=null;for(e=0;i;){e++;let o=i,a=0;for(let c=0;c0||l>0&&o;)a!==0&&(l===0||!o||i.z<=o.z)?(s=i,i=i.nextZ,a--):(s=o,o=o.nextZ,l--),r?r.nextZ=s:n=s,s.prevZ=r,r=s;i=o}r.nextZ=null,t*=2}while(e>1);return n}function bg(n,e,t,i,s){return n=(n-t)*s|0,e=(e-i)*s|0,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,n|e<<1}function EI(n){let e=n,t=n;do(e.x=(n-o)*(r-a)&&(n-o)*(i-a)>=(t-o)*(e-a)&&(t-o)*(r-a)>=(s-o)*(i-a)}function vl(n,e,t,i,s,r,o,a){return!(n===o&&e===a)&&RE(n,e,t,i,s,r,o,a)}function TI(n,e){return n.next.i!==e.i&&n.prev.i!==e.i&&!wI(n,e)&&(mc(n,e)&&mc(e,n)&&AI(n,e)&&(Gt(n.prev,n,e.prev)||Gt(n,e.prev,e))||Ia(n,e)&&Gt(n.prev,n,n.next)>0&&Gt(e.prev,e,e.next)>0)}function Gt(n,e,t){return(e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y)}function Ia(n,e){return n.x===e.x&&n.y===e.y}function PE(n,e,t,i){const s=Xu(Gt(n,e,t)),r=Xu(Gt(n,e,i)),o=Xu(Gt(t,i,n)),a=Xu(Gt(t,i,e));return!!(s!==r&&o!==a||s===0&&Wu(n,t,e)||r===0&&Wu(n,i,e)||o===0&&Wu(t,n,i)||a===0&&Wu(t,e,i))}function Wu(n,e,t){return e.x<=Math.max(n.x,t.x)&&e.x>=Math.min(n.x,t.x)&&e.y<=Math.max(n.y,t.y)&&e.y>=Math.min(n.y,t.y)}function Xu(n){return n>0?1:n<0?-1:0}function wI(n,e){let t=n;do{if(t.i!==n.i&&t.next.i!==n.i&&t.i!==e.i&&t.next.i!==e.i&&PE(t,t.next,n,e))return!0;t=t.next}while(t!==n);return!1}function mc(n,e){return Gt(n.prev,n,n.next)<0?Gt(n,e,n.next)>=0&&Gt(n,n.prev,e)>=0:Gt(n,e,n.prev)<0||Gt(n,n.next,e)<0}function AI(n,e){let t=n,i=!1;const s=(n.x+e.x)/2,r=(n.y+e.y)/2;do t.y>r!=t.next.y>r&&t.next.y!==t.y&&s<(t.next.x-t.x)*(r-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==n);return i}function IE(n,e){const t=xg(n.i,n.x,n.y),i=xg(e.i,e.x,e.y),s=n.next,r=e.prev;return n.next=e,e.prev=n,t.next=s,s.prev=t,i.next=t,t.prev=i,r.next=i,i.prev=r,i}function jy(n,e,t,i){const s=xg(n,e,t);return i?(s.next=i.next,s.prev=i,i.next.prev=s,i.next=s):(s.prev=s,s.next=s),s}function gc(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function xg(n,e,t){return{i:n,x:e,y:t,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function CI(n,e,t,i){let s=0;for(let r=e,o=t-i;r2&&n[e-1].equals(n[0])&&n.pop()}function Zy(n,e){for(let t=0;tNumber.EPSILON){const Y=Math.sqrt(x),ne=Math.sqrt(ce*ce+R*R),ee=W.x-H/Y,Te=W.y+F/Y,me=G.x-R/ne,Re=G.y+ce/ne,De=((me-ee)*R-(Re-Te)*ce)/(F*R-H*ce);X=ee+F*De-A.x,C=Te+H*De-A.y;const de=X*X+C*C;if(de<=2)return new fe(X,C);I=Math.sqrt(de/2)}else{let Y=!1;F>Number.EPSILON?ce>Number.EPSILON&&(Y=!0):F<-Number.EPSILON?ce<-Number.EPSILON&&(Y=!0):Math.sign(H)===Math.sign(R)&&(Y=!0),Y?(X=-H,C=F,I=Math.sqrt(x)):(X=F,C=H,I=Math.sqrt(x/2))}return new fe(X/I,C/I)}const pe=[];for(let A=0,W=Q.length,G=W-1,X=A+1;A=0;A--){const W=A/g,G=d*Math.cos(W*Math.PI/2),X=p*Math.sin(W*Math.PI/2)+_;for(let C=0,I=Q.length;C=0;){const X=G;let C=G-1;C<0&&(C=A.length-1);for(let I=0,F=u+g*2;I0)&&d.push(b,y,w),(m!==i-1||l0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class UE extends Pn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Pe(16777215),this.specular=new Pe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Pe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Cr,this.normalScale=new fe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new li,this.combine=Fc,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class FE extends Pn{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Pe(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Pe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Cr,this.normalScale=new fe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class kE extends Pn{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Cr,this.normalScale=new fe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class BE extends Pn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Pe(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Pe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Cr,this.normalScale=new fe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new li,this.combine=Fc,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class __ extends Pn{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=j1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class v_ extends Pn{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}class zE extends Pn{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Pe(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Cr,this.normalScale=new fe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class VE extends Wn{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function ho(n,e){return!n||n.constructor===e?n:typeof e.BYTES_PER_ELEMENT=="number"?new e(n):Array.prototype.slice.call(n)}function HE(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function GE(n){function e(s,r){return n[s]-n[r]}const t=n.length,i=new Array(t);for(let s=0;s!==t;++s)i[s]=s;return i.sort(e),i}function Mg(n,e,t){const i=n.length,s=new n.constructor(i);for(let r=0,o=0;o!==i;++r){const a=t[r]*e;for(let l=0;l!==e;++l)s[o++]=n[a+l]}return s}function y_(n,e,t,i){let s=1,r=n[0];for(;r!==void 0&&r[i]===void 0;)r=n[s++];if(r===void 0)return;let o=r[i];if(o!==void 0)if(Array.isArray(o))do o=r[i],o!==void 0&&(e.push(r.time),t.push(...o)),r=n[s++];while(r!==void 0);else if(o.toArray!==void 0)do o=r[i],o!==void 0&&(e.push(r.time),o.toArray(t,t.length)),r=n[s++];while(r!==void 0);else do o=r[i],o!==void 0&&(e.push(r.time),t.push(o)),r=n[s++];while(r!==void 0)}function DI(n,e,t,i,s=30){const r=n.clone();r.name=e;const o=[];for(let l=0;l=i)){f.push(c.times[d]);for(let _=0;_r.tracks[l].times[0]&&(a=r.tracks[l].times[0]);for(let l=0;l=a.times[p]){const m=p*f+u,v=m+f-u;_=a.values.slice(m,v)}else{const m=a.createInterpolant(),v=u,b=f-u;m.evaluate(r),_=m.resultBuffer.slice(v,b)}l==="quaternion"&&new Qn().fromArray(_).normalize().conjugate().toArray(_);const g=c.times.length;for(let m=0;m=r)){const a=t[1];e=r)break t}o=i,i=0;break n}break e}for(;i>>1;et;)--o;if(++o,r!==0||o!==s){r>=o&&(o=Math.max(o,1),r=o-1);const a=this.getValueSize();this.times=i.slice(r,o),this.values=this.values.slice(r*a,o*a)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,s=this.values,r=i.length;r===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==r;a++){const l=i[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(s!==void 0&&HE(s))for(let a=0,l=s.length;a!==l;++a){const c=s[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),i=this.getValueSize(),s=this.getInterpolation()===Mf,r=e.length-1;let o=1;for(let a=1;a0){e[o]=e[r];for(let a=r*i,l=o*i,c=0;c!==i;++c)t[l+c]=t[a+c];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=t.slice(0,o*i)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),i=this.constructor,s=new i(this.name,e,t);return s.createInterpolant=this.createInterpolant,s}}Ei.prototype.ValueTypeName="";Ei.prototype.TimeBufferType=Float32Array;Ei.prototype.ValueBufferType=Float32Array;Ei.prototype.DefaultInterpolation=Eh;class Po extends Ei{constructor(e,t,i){super(e,t,i)}}Po.prototype.ValueTypeName="bool";Po.prototype.ValueBufferType=Array;Po.prototype.DefaultInterpolation=lc;Po.prototype.InterpolantFactoryMethodLinear=void 0;Po.prototype.InterpolantFactoryMethodSmooth=void 0;class x_ extends Ei{constructor(e,t,i,s){super(e,t,i,s)}}x_.prototype.ValueTypeName="color";class _c extends Ei{constructor(e,t,i,s){super(e,t,i,s)}}_c.prototype.ValueTypeName="number";class $E extends $c{constructor(e,t,i,s){super(e,t,i,s)}interpolate_(e,t,i,s){const r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(i-t)/(s-t);let c=e*a;for(let u=c+a;c!==u;c+=4)Qn.slerpFlat(r,0,o,c-a,o,c,l);return r}}class qc extends Ei{constructor(e,t,i,s){super(e,t,i,s)}InterpolantFactoryMethodLinear(e){return new $E(this.times,this.values,this.getValueSize(),e)}}qc.prototype.ValueTypeName="quaternion";qc.prototype.InterpolantFactoryMethodSmooth=void 0;class Io extends Ei{constructor(e,t,i){super(e,t,i)}}Io.prototype.ValueTypeName="string";Io.prototype.ValueBufferType=Array;Io.prototype.DefaultInterpolation=lc;Io.prototype.InterpolantFactoryMethodLinear=void 0;Io.prototype.InterpolantFactoryMethodSmooth=void 0;class vc extends Ei{constructor(e,t,i,s){super(e,t,i,s)}}vc.prototype.ValueTypeName="vector";class yc{constructor(e="",t=-1,i=[],s=dd){this.name=e,this.tracks=i,this.duration=t,this.blendMode=s,this.uuid=oi(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],i=e.tracks,s=1/(e.fps||1);for(let o=0,a=i.length;o!==a;++o)t.push(FI(i[o]).scale(s));const r=new this(e.name,e.duration,t,e.blendMode);return r.uuid=e.uuid,r}static toJSON(e){const t=[],i=e.tracks,s={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let r=0,o=i.length;r!==o;++r)t.push(Ei.toJSON(i[r]));return s}static CreateFromMorphTargetSequence(e,t,i,s){const r=t.length,o=[];for(let a=0;a1){const f=u[1];let h=s[f];h||(s[f]=h=[]),h.push(c)}}const o=[];for(const a in s)o.push(this.CreateFromMorphTargetSequence(a,s[a],t,i));return o}static parseAnimation(e,t){if(console.warn("THREE.AnimationClip: parseAnimation() is deprecated and will be removed with r185"),!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(f,h,d,p,_){if(d.length!==0){const g=[],m=[];y_(d,g,m,p),g.length!==0&&_.push(new f(h,g,m))}},s=[],r=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let f=0;f{t&&t(r),this.manager.itemEnd(e)},0),r;if(vs[e]!==void 0){vs[e].push({onLoad:t,onProgress:i,onError:s});return}vs[e]=[],vs[e].push({onLoad:t,onProgress:i,onError:s});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const u=vs[e],f=c.body.getReader(),h=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),d=h?parseInt(h):0,p=d!==0;let _=0;const g=new ReadableStream({start(m){v();function v(){f.read().then(({done:b,value:y})=>{if(b)m.close();else{_+=y.byteLength;const T=new ProgressEvent("progress",{lengthComputable:p,loaded:_,total:d});for(let w=0,S=u.length;w{m.error(b)})}}});return new Response(g)}else throw new kI(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(u=>new DOMParser().parseFromString(u,a));case"json":return c.json();default:if(a==="")return c.text();{const f=/charset="?([^;"\s]*)"?/i.exec(a),h=f&&f[1]?f[1].toLowerCase():void 0,d=new TextDecoder(h);return c.arrayBuffer().then(p=>d.decode(p))}}}).then(c=>{Rs.add(e,c);const u=vs[e];delete vs[e];for(let f=0,h=u.length;f{const u=vs[e];if(u===void 0)throw this.manager.itemError(e),c;delete vs[e];for(let f=0,h=u.length;f{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class BI extends ti{constructor(e){super(e)}load(e,t,i,s){const r=this,o=new Hs(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{t(r.parse(JSON.parse(a)))}catch(l){s?s(l):console.error(l),r.manager.itemError(e)}},i,s)}parse(e){const t=[];for(let i=0;i0:s.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const r in e.uniforms){const o=e.uniforms[r];switch(s.uniforms[r]={},o.type){case"t":s.uniforms[r].value=i(o.value);break;case"c":s.uniforms[r].value=new Pe().setHex(o.value);break;case"v2":s.uniforms[r].value=new fe().fromArray(o.value);break;case"v3":s.uniforms[r].value=new k().fromArray(o.value);break;case"v4":s.uniforms[r].value=new vt().fromArray(o.value);break;case"m3":s.uniforms[r].value=new at().fromArray(o.value);break;case"m4":s.uniforms[r].value=new Je().fromArray(o.value);break;default:s.uniforms[r].value=o.value}}if(e.defines!==void 0&&(s.defines=e.defines),e.vertexShader!==void 0&&(s.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(s.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(s.glslVersion=e.glslVersion),e.extensions!==void 0)for(const r in e.extensions)s.extensions[r]=e.extensions[r];if(e.lights!==void 0&&(s.lights=e.lights),e.clipping!==void 0&&(s.clipping=e.clipping),e.size!==void 0&&(s.size=e.size),e.sizeAttenuation!==void 0&&(s.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(s.map=i(e.map)),e.matcap!==void 0&&(s.matcap=i(e.matcap)),e.alphaMap!==void 0&&(s.alphaMap=i(e.alphaMap)),e.bumpMap!==void 0&&(s.bumpMap=i(e.bumpMap)),e.bumpScale!==void 0&&(s.bumpScale=e.bumpScale),e.normalMap!==void 0&&(s.normalMap=i(e.normalMap)),e.normalMapType!==void 0&&(s.normalMapType=e.normalMapType),e.normalScale!==void 0){let r=e.normalScale;Array.isArray(r)===!1&&(r=[r,r]),s.normalScale=new fe().fromArray(r)}return e.displacementMap!==void 0&&(s.displacementMap=i(e.displacementMap)),e.displacementScale!==void 0&&(s.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(s.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(s.roughnessMap=i(e.roughnessMap)),e.metalnessMap!==void 0&&(s.metalnessMap=i(e.metalnessMap)),e.emissiveMap!==void 0&&(s.emissiveMap=i(e.emissiveMap)),e.emissiveIntensity!==void 0&&(s.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(s.specularMap=i(e.specularMap)),e.specularIntensityMap!==void 0&&(s.specularIntensityMap=i(e.specularIntensityMap)),e.specularColorMap!==void 0&&(s.specularColorMap=i(e.specularColorMap)),e.envMap!==void 0&&(s.envMap=i(e.envMap)),e.envMapRotation!==void 0&&s.envMapRotation.fromArray(e.envMapRotation),e.envMapIntensity!==void 0&&(s.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(s.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(s.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(s.lightMap=i(e.lightMap)),e.lightMapIntensity!==void 0&&(s.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(s.aoMap=i(e.aoMap)),e.aoMapIntensity!==void 0&&(s.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(s.gradientMap=i(e.gradientMap)),e.clearcoatMap!==void 0&&(s.clearcoatMap=i(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(s.clearcoatRoughnessMap=i(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(s.clearcoatNormalMap=i(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(s.clearcoatNormalScale=new fe().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(s.iridescenceMap=i(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(s.iridescenceThicknessMap=i(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(s.transmissionMap=i(e.transmissionMap)),e.thicknessMap!==void 0&&(s.thicknessMap=i(e.thicknessMap)),e.anisotropyMap!==void 0&&(s.anisotropyMap=i(e.anisotropyMap)),e.sheenColorMap!==void 0&&(s.sheenColorMap=i(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(s.sheenRoughnessMap=i(e.sheenRoughnessMap)),s}setTextures(e){return this.textures=e,this}createMaterialFromType(e){return Fd.createMaterialFromType(e)}static createMaterialFromType(e){const t={ShadowMaterial:DE,SpriteMaterial:o_,RawShaderMaterial:OE,ShaderMaterial:zi,PointsMaterial:l_,MeshPhysicalMaterial:NE,MeshStandardMaterial:g_,MeshPhongMaterial:UE,MeshToonMaterial:FE,MeshNormalMaterial:kE,MeshLambertMaterial:BE,MeshDepthMaterial:__,MeshDistanceMaterial:v_,MeshBasicMaterial:Xs,MeshMatcapMaterial:zE,LineDashedMaterial:VE,LineBasicMaterial:Wn,Material:Pn};return new t[e]}}class Sg{static extractUrlBase(e){const t=e.lastIndexOf("/");return t===-1?"./":e.slice(0,t+1)}static resolveURL(e,t){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}}class nT extends ct{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){const e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}class iT extends ti{constructor(e){super(e)}load(e,t,i,s){const r=this,o=new Hs(r.manager);o.setPath(r.path),o.setRequestHeader(r.requestHeader),o.setWithCredentials(r.withCredentials),o.load(e,function(a){try{t(r.parse(JSON.parse(a)))}catch(l){s?s(l):console.error(l),r.manager.itemError(e)}},i,s)}parse(e){const t={},i={};function s(d,p){if(t[p]!==void 0)return t[p];const g=d.interleavedBuffers[p],m=r(d,g.buffer),v=la(g.type,m),b=new yd(v,g.stride);return b.uuid=g.uuid,t[p]=b,b}function r(d,p){if(i[p]!==void 0)return i[p];const g=d.arrayBuffers[p],m=new Uint32Array(g).buffer;return i[p]=m,m}const o=e.isInstancedBufferGeometry?new nT:new ct,a=e.data.index;if(a!==void 0){const d=la(a.type,a.array);o.setIndex(new Pt(d,1))}const l=e.data.attributes;for(const d in l){const p=l[d];let _;if(p.isInterleavedBufferAttribute){const g=s(e.data,p.data);_=new To(g,p.itemSize,p.offset,p.normalized)}else{const g=la(p.type,p.array),m=p.isInstancedBufferAttribute?Pa:Pt;_=new m(g,p.itemSize,p.normalized)}p.name!==void 0&&(_.name=p.name),p.usage!==void 0&&_.setUsage(p.usage),o.setAttribute(d,_)}const c=e.data.morphAttributes;if(c)for(const d in c){const p=c[d],_=[];for(let g=0,m=p.length;g0){const l=new M_(t);r=new bc(l),r.setCrossOrigin(this.crossOrigin);for(let c=0,u=e.length;c0){s=new bc(this.manager),s.setCrossOrigin(this.crossOrigin);for(let o=0,a=e.length;o{let g=null,m=null;return _.boundingBox!==void 0&&(g=new Cn().fromJSON(_.boundingBox)),_.boundingSphere!==void 0&&(m=new bn().fromJSON(_.boundingSphere)),{..._,boundingBox:g,boundingSphere:m}}),o._instanceInfo=e.instanceInfo,o._availableInstanceIds=e._availableInstanceIds,o._availableGeometryIds=e._availableGeometryIds,o._nextIndexStart=e.nextIndexStart,o._nextVertexStart=e.nextVertexStart,o._geometryCount=e.geometryCount,o._maxInstanceCount=e.maxInstanceCount,o._maxVertexCount=e.maxVertexCount,o._maxIndexCount=e.maxIndexCount,o._geometryInitialized=e.geometryInitialized,o._matricesTexture=c(e.matricesTexture.uuid),o._indirectTexture=c(e.indirectTexture.uuid),e.colorsTexture!==void 0&&(o._colorsTexture=c(e.colorsTexture.uuid)),e.boundingSphere!==void 0&&(o.boundingSphere=new bn().fromJSON(e.boundingSphere)),e.boundingBox!==void 0&&(o.boundingBox=new Cn().fromJSON(e.boundingBox));break;case"LOD":o=new mE;break;case"Line":o=new Sr(a(e.geometry),l(e.material));break;case"LineLoop":o=new yE(a(e.geometry),l(e.material));break;case"LineSegments":o=new ls(a(e.geometry),l(e.material));break;case"PointCloud":case"Points":o=new bE(a(e.geometry),l(e.material));break;case"Sprite":o=new pE(l(e.material));break;case"Group":o=new ca;break;case"Bone":o=new a_;break;default:o=new gt}if(o.uuid=e.uuid,e.name!==void 0&&(o.name=e.name),e.matrix!==void 0?(o.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(o.matrixAutoUpdate=e.matrixAutoUpdate),o.matrixAutoUpdate&&o.matrix.decompose(o.position,o.quaternion,o.scale)):(e.position!==void 0&&o.position.fromArray(e.position),e.rotation!==void 0&&o.rotation.fromArray(e.rotation),e.quaternion!==void 0&&o.quaternion.fromArray(e.quaternion),e.scale!==void 0&&o.scale.fromArray(e.scale)),e.up!==void 0&&o.up.fromArray(e.up),e.castShadow!==void 0&&(o.castShadow=e.castShadow),e.receiveShadow!==void 0&&(o.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.intensity!==void 0&&(o.shadow.intensity=e.shadow.intensity),e.shadow.bias!==void 0&&(o.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(o.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(o.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&o.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(o.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(o.visible=e.visible),e.frustumCulled!==void 0&&(o.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(o.renderOrder=e.renderOrder),e.userData!==void 0&&(o.userData=e.userData),e.layers!==void 0&&(o.layers.mask=e.layers),e.children!==void 0){const h=e.children;for(let d=0;d"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,i,s){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,o=Rs.get(e);if(o!==void 0){if(r.manager.itemStart(e),o.then){o.then(c=>{if(em.has(o)===!0)s&&s(em.get(o)),r.manager.itemError(e),r.manager.itemEnd(e);else return t&&t(c),r.manager.itemEnd(e),c});return}return setTimeout(function(){t&&t(o),r.manager.itemEnd(e)},0),o}const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader;const l=fetch(e,a).then(function(c){return c.blob()}).then(function(c){return createImageBitmap(c,Object.assign(r.options,{colorSpaceConversion:"none"}))}).then(function(c){return Rs.add(e,c),t&&t(c),r.manager.itemEnd(e),c}).catch(function(c){s&&s(c),em.set(l,c),Rs.remove(e),r.manager.itemError(e),r.manager.itemEnd(e)});Rs.add(e,l),r.manager.itemStart(e)}}let $u;class E_{static getContext(){return $u===void 0&&($u=new(window.AudioContext||window.webkitAudioContext)),$u}static setContext(e){$u=e}}class KI extends ti{constructor(e){super(e)}load(e,t,i,s){const r=this,o=new Hs(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(l){try{const c=l.slice(0);E_.getContext().decodeAudioData(c,function(f){t(f)}).catch(a)}catch(c){a(c)}},i,s);function a(l){s?s(l):console.error(l),r.manager.itemError(e)}}}const rb=new Je,ob=new Je,qr=new Je;class ZI{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Jt,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Jt,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep,qr.copy(e.projectionMatrix);const s=t.eyeSep/2,r=s*t.near/t.focus,o=t.near*Math.tan(vo*t.fov*.5)/t.zoom;let a,l;ob.elements[12]=-s,rb.elements[12]=s,a=-o*t.aspect+r,l=o*t.aspect+r,qr.elements[0]=2*t.near/(l-a),qr.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(qr),a=-o*t.aspect-r,l=o*t.aspect-r,qr.elements[0]=2*t.near/(l-a),qr.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(qr)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(ob),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(rb)}}class sT extends Jt{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}}class kd{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=ab(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=ab();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function ab(){return performance.now()}const Yr=new k,tm=new Qn,JI=new k,jr=new k,Kr=new k;class QI extends gt{constructor(){super(),this.type="AudioListener",this.context=E_.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new kd}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const t=this.context.listener;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Yr,tm,JI),jr.set(0,0,-1).applyQuaternion(tm),Kr.set(0,1,0).applyQuaternion(tm),t.positionX){const i=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(Yr.x,i),t.positionY.linearRampToValueAtTime(Yr.y,i),t.positionZ.linearRampToValueAtTime(Yr.z,i),t.forwardX.linearRampToValueAtTime(jr.x,i),t.forwardY.linearRampToValueAtTime(jr.y,i),t.forwardZ.linearRampToValueAtTime(jr.z,i),t.upX.linearRampToValueAtTime(Kr.x,i),t.upY.linearRampToValueAtTime(Kr.y,i),t.upZ.linearRampToValueAtTime(Kr.z,i)}else t.setPosition(Yr.x,Yr.y,Yr.z),t.setOrientation(jr.x,jr.y,jr.z,Kr.x,Kr.y,Kr.z)}}class rT extends gt{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(e=0){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(this.context.currentTime+e),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e0&&this._mixBufferRegionAdditive(i,s,this._addIndex*t,1,t);for(let l=t,c=t+t;l!==c;++l)if(i[l]!==i[l+t]){a.setValue(i,s);break}}saveOriginalState(){const e=this.binding,t=this.buffer,i=this.valueSize,s=i*this._origIndex;e.getValue(t,s);for(let r=i,o=s;r!==o;++r)t[r]=t[s+r%i];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let i=e;i=.5)for(let o=0;o!==r;++o)e[t+o]=e[i+o]}_slerp(e,t,i,s){Qn.slerpFlat(e,t,e,t,e,i,s)}_slerpAdditive(e,t,i,s,r){const o=this._workIndex*r;Qn.multiplyQuaternionsFlat(e,o,e,t,e,i),Qn.slerpFlat(e,t,e,t,e,o,s)}_lerp(e,t,i,s,r){const o=1-s;for(let a=0;a!==r;++a){const l=t+a;e[l]=e[l]*o+e[i+a]*s}}_lerpAdditive(e,t,i,s,r){for(let o=0;o!==r;++o){const a=t+o;e[a]=e[a]+e[i+o]*s}}}const T_="\\[\\]\\.:\\/",iL=new RegExp("["+T_+"]","g"),w_="[^"+T_+"]",sL="[^"+T_.replace("\\.","")+"]",rL=/((?:WC+[\/:])*)/.source.replace("WC",w_),oL=/(WCOD+)?/.source.replace("WCOD",sL),aL=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",w_),lL=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",w_),cL=new RegExp("^"+rL+oL+aL+lL+"$"),uL=["material","materials","bones","map"];class fL{constructor(e,t,i){const s=i||_t.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,s)}getValue(e,t){this.bind();const i=this._targetGroup.nCachedObjects_,s=this._bindings[i];s!==void 0&&s.getValue(e,t)}setValue(e,t){const i=this._bindings;for(let s=this._targetGroup.nCachedObjects_,r=i.length;s!==r;++s)i[s].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].unbind()}}class _t{constructor(e,t,i){this.path=t,this.parsedPath=i||_t.parseTrackName(t),this.node=_t.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,i){return e&&e.isAnimationObjectGroup?new _t.Composite(e,t,i):new _t(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(iL,"")}static parseTrackName(e){const t=cL.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const i={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},s=i.nodeName&&i.nodeName.lastIndexOf(".");if(s!==void 0&&s!==-1){const r=i.nodeName.substring(s+1);uL.indexOf(r)!==-1&&(i.nodeName=i.nodeName.substring(0,s),i.objectName=r)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const i=e.skeleton.getBoneByName(t);if(i!==void 0)return i}if(e.children){const i=function(r){for(let o=0;o=r){const f=r++,h=e[f];t[h.uuid]=u,e[u]=h,t[c]=f,e[f]=l;for(let d=0,p=s;d!==p;++d){const _=i[d],g=_[f],m=_[u];_[u]=g,_[f]=m}}}this.nCachedObjects_=r}uncache(){const e=this._objects,t=this._indicesByUUID,i=this._bindings,s=i.length;let r=this.nCachedObjects_,o=e.length;for(let a=0,l=arguments.length;a!==l;++a){const c=arguments[a],u=c.uuid,f=t[u];if(f!==void 0)if(delete t[u],f0&&(t[d.uuid]=f),e[f]=d,e.pop();for(let p=0,_=s;p!==_;++p){const g=i[p];g[f]=g[h],g.pop()}}}this.nCachedObjects_=r}subscribe_(e,t){const i=this._bindingsIndicesByPath;let s=i[e];const r=this._bindings;if(s!==void 0)return r[s];const o=this._paths,a=this._parsedPaths,l=this._objects,c=l.length,u=this.nCachedObjects_,f=new Array(c);s=r.length,i[e]=s,o.push(e),a.push(t),r.push(f);for(let h=u,d=l.length;h!==d;++h){const p=l[h];f[h]=new _t(p,e,t)}return f}unsubscribe_(e){const t=this._bindingsIndicesByPath,i=t[e];if(i!==void 0){const s=this._paths,r=this._parsedPaths,o=this._bindings,a=o.length-1,l=o[a],c=e[a];t[c]=i,o[i]=l,o.pop(),r[i]=r[a],r.pop(),s[i]=s[a],s.pop()}}}class aT{constructor(e,t,i=null,s=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=i,this.blendMode=s;const r=t.tracks,o=r.length,a=new Array(o),l={endingStart:uo,endingEnd:uo};for(let c=0;c!==o;++c){const u=r[c].createInterpolant(null);a[c]=u,u.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=q1,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,i=!1){if(e.fadeOut(t),this.fadeIn(t),i===!0){const s=this._clip.duration,r=e._clip.duration,o=r/s,a=s/r;e.warp(1,o,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,i=!1){return e.crossFadeFrom(this,t,i)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,i){const s=this._mixer,r=s.time,o=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=s._lendControlInterpolant(),this._timeScaleInterpolant=a);const l=a.parameterPositions,c=a.sampleValues;return l[0]=r,l[1]=r+i,c[0]=e/o,c[1]=t/o,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,i,s){if(!this.enabled){this._updateWeight(e);return}const r=this._startTime;if(r!==null){const l=(e-r)*i;l<0||i===0?t=0:(this._startTime=null,t=i*l)}t*=this._updateTimeScale(e);const o=this._updateTime(t),a=this._updateWeight(e);if(a>0){const l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case Q0:for(let u=0,f=l.length;u!==f;++u)l[u].evaluate(o),c[u].accumulateAdditive(a);break;case dd:default:for(let u=0,f=l.length;u!==f;++u)l[u].evaluate(o),c[u].accumulate(s,a)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const i=this._weightInterpolant;if(i!==null){const s=i.evaluate(e)[0];t*=s,e>i.parameterPositions[1]&&(this.stopFading(),s===0&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const i=this._timeScaleInterpolant;if(i!==null){const s=i.evaluate(e)[0];t*=s,e>i.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,i=this.loop;let s=this.time+e,r=this._loopCount;const o=i===Y1;if(e===0)return r===-1?s:o&&(r&1)===1?t-s:s;if(i===$1){r===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(s>=t)s=t;else if(s<0)s=0;else{this.time=s;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=s,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(r===-1&&(e>=0?(r=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),s>=t||s<0){const a=Math.floor(s/t);s-=t*a,r+=Math.abs(a);const l=this.repetitions-r;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,s=e>0?t:0,this.time=s,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){const c=e<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=r,this.time=s,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=s;if(o&&(r&1)===1)return t-s}return s}_setEndings(e,t,i){const s=this._interpolantSettings;i?(s.endingStart=fo,s.endingEnd=fo):(e?s.endingStart=this.zeroSlopeAtStart?fo:uo:s.endingStart=cc,t?s.endingEnd=this.zeroSlopeAtEnd?fo:uo:s.endingEnd=cc)}_scheduleFading(e,t,i){const s=this._mixer,r=s.time;let o=this._weightInterpolant;o===null&&(o=s._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,l=o.sampleValues;return a[0]=r,l[0]=t,a[1]=r+e,l[1]=i,this}}const dL=new Float32Array(1);class pL extends as{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const i=e._localRoot||this._root,s=e._clip.tracks,r=s.length,o=e._propertyBindings,a=e._interpolants,l=i.uuid,c=this._bindingsByRootAndName;let u=c[l];u===void 0&&(u={},c[l]=u);for(let f=0;f!==r;++f){const h=s[f],d=h.name;let p=u[d];if(p!==void 0)++p.referenceCount,o[f]=p;else{if(p=o[f],p!==void 0){p._cacheIndex===null&&(++p.referenceCount,this._addInactiveBinding(p,l,d));continue}const _=t&&t._propertyBindings[f].binding.parsedPath;p=new oT(_t.create(i,d,_),h.ValueTypeName,h.getValueSize()),++p.referenceCount,this._addInactiveBinding(p,l,d),o[f]=p}a[f].resultBuffer=p.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const i=(e._localRoot||this._root).uuid,s=e._clip.uuid,r=this._actionsByClip[s];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,s,i)}const t=e._propertyBindings;for(let i=0,s=t.length;i!==s;++i){const r=t[i];r.useCount++===0&&(this._lendBinding(r),r.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let i=0,s=t.length;i!==s;++i){const r=t[i];--r.useCount===0&&(r.restoreOriginalState(),this._takeBackBinding(r))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return t!==null&&t=0;--i)e[i].stop();return this}update(e){e*=this.timeScale;const t=this._actions,i=this._nActiveActions,s=this.time+=e,r=Math.sign(e),o=this._accuIndex^=1;for(let c=0;c!==i;++c)t[c]._update(s,e,r,o);const a=this._bindings,l=this._nActiveBindings;for(let c=0;c!==l;++c)a[c].apply(o);return this}setTime(e){this.time=0;for(let t=0;t=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,fb).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const hb=new k,qu=new k;class SL{constructor(e=new k,t=new k){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){hb.subVectors(e,this.start),qu.subVectors(this.end,this.start);const i=qu.dot(qu);let r=qu.dot(hb)/i;return t&&(r=st(r,0,1)),r}closestPointToPoint(e,t,i){const s=this.closestPointToPointParameter(e,t);return this.delta(i).multiplyScalar(s).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const db=new k;class EL extends gt{constructor(e,t){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const i=new ct,s=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let o=0,a=1,l=32;o1)for(let f=0;f.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{vb.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(vb,t)}}setLength(e,t=e*.2,i=t*.2){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(i,t,i),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class FL extends ls{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],i=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],s=new ct;s.setAttribute("position",new ke(t,3)),s.setAttribute("color",new ke(i,3));const r=new Wn({vertexColors:!0,toneMapped:!1});super(s,r),this.type="AxesHelper"}setColors(e,t,i){const s=new Pe,r=this.geometry.attributes.color.array;return s.set(e),s.toArray(r,0),s.toArray(r,3),s.set(t),s.toArray(r,6),s.toArray(r,9),s.set(i),s.toArray(r,12),s.toArray(r,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class kL{constructor(){this.type="ShapePath",this.color=new Pe,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new Ch,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,i,s){return this.currentPath.quadraticCurveTo(e,t,i,s),this}bezierCurveTo(e,t,i,s,r,o){return this.currentPath.bezierCurveTo(e,t,i,s,r,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(m){const v=[];for(let b=0,y=m.length;bNumber.EPSILON){if(E<0&&(S=v[w],M=-M,P=v[T],E=-E),m.yP.y)continue;if(m.y===S.y){if(m.x===S.x)return!0}else{const D=E*(m.x-S.x)-M*(m.y-S.y);if(D===0)return!0;if(D<0)continue;y=!y}}else{if(m.y!==S.y)continue;if(P.x<=m.x&&m.x<=S.x||S.x<=m.x&&m.x<=P.x)return!0}}return y}const s=Li.isClockWise,r=this.subPaths;if(r.length===0)return[];let o,a,l;const c=[];if(r.length===1)return a=r[0],l=new yo,l.curves=a.curves,c.push(l),c;let u=!s(r[0].getPoints());u=e?!u:u;const f=[],h=[];let d=[],p=0,_;h[p]=void 0,d[p]=[];for(let m=0,v=r.length;m1){let m=!1,v=0;for(let b=0,y=h.length;b0&&m===!1&&(d=f)}let g;for(let m=0,v=h.length;me?(n.repeat.x=1,n.repeat.y=t/e,n.offset.x=0,n.offset.y=(1-n.repeat.y)/2):(n.repeat.x=e/t,n.repeat.y=1,n.offset.x=(1-n.repeat.x)/2,n.offset.y=0),n}function VL(n,e){const t=n.image&&n.image.width?n.image.width/n.image.height:1;return t>e?(n.repeat.x=e/t,n.repeat.y=1,n.offset.x=(1-n.repeat.x)/2,n.offset.y=0):(n.repeat.x=1,n.repeat.y=t/e,n.offset.x=0,n.offset.y=(1-n.repeat.y)/2),n}function HL(n){return n.repeat.x=1,n.repeat.y=1,n.offset.x=0,n.offset.y=0,n}function Tg(n,e,t,i){const s=GL(i);switch(t){case j0:return n*e;case ud:return n*e/s.components*s.byteLength;case kc:return n*e/s.components*s.byteLength;case Z0:return n*e*2/s.components*s.byteLength;case fd:return n*e*2/s.components*s.byteLength;case K0:return n*e*3/s.components*s.byteLength;case zn:return n*e*4/s.components*s.byteLength;case hd:return n*e*4/s.components*s.byteLength;case Al:case Cl:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*8;case Rl:case Pl:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;case Qf:case th:return Math.max(n,16)*Math.max(e,8)/4;case Jf:case eh:return Math.max(n,8)*Math.max(e,8)/2;case nh:case ih:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*8;case sh:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;case rh:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;case oh:return Math.floor((n+4)/5)*Math.floor((e+3)/4)*16;case ah:return Math.floor((n+4)/5)*Math.floor((e+4)/5)*16;case lh:return Math.floor((n+5)/6)*Math.floor((e+4)/5)*16;case ch:return Math.floor((n+5)/6)*Math.floor((e+5)/6)*16;case uh:return Math.floor((n+7)/8)*Math.floor((e+4)/5)*16;case fh:return Math.floor((n+7)/8)*Math.floor((e+5)/6)*16;case hh:return Math.floor((n+7)/8)*Math.floor((e+7)/8)*16;case dh:return Math.floor((n+9)/10)*Math.floor((e+4)/5)*16;case ph:return Math.floor((n+9)/10)*Math.floor((e+5)/6)*16;case mh:return Math.floor((n+9)/10)*Math.floor((e+7)/8)*16;case gh:return Math.floor((n+9)/10)*Math.floor((e+9)/10)*16;case _h:return Math.floor((n+11)/12)*Math.floor((e+9)/10)*16;case vh:return Math.floor((n+11)/12)*Math.floor((e+11)/12)*16;case Il:case yh:case bh:return Math.ceil(n/4)*Math.ceil(e/4)*16;case J0:case xh:return Math.ceil(n/4)*Math.ceil(e/4)*8;case Mh:case Sh:return Math.ceil(n/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${t} format.`)}function GL(n){switch(n){case Bi:case $0:return{byteLength:1,components:1};case Ea:case q0:case za:return{byteLength:2,components:1};case ld:case cd:return{byteLength:2,components:4};case Vs:case ad:case Zn:return{byteLength:4,components:1};case Y0:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${n}.`)}class WL{static contain(e,t){return zL(e,t)}static cover(e,t){return VL(e,t)}static fill(e){return HL(e)}static getByteLength(e,t,i,s){return Tg(e,t,i,s)}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Uc}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Uc);/** + `},s=new Ro(5,5,5),r=new zi({name:"CubemapFromEquirect",uniforms:Ra(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:Vn,blending:Ds});r.uniforms.tEquirect.value=t;const o=new jt(s,r),a=t.minFilter;return t.minFilter===Qi&&(t.minFilter=nn),new fE(1,10,this).update(e,o),t.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,t=!0,i=!0,s=!0){const r=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,i,s);e.setRenderTarget(r)}}class ca extends gt{constructor(){super(),this.isGroup=!0,this.type="Group"}}const VP={type:"move"};class Sf{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new ca,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new ca,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new k,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new k),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new ca,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new k,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new k),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const i of e.hand.values())this._getHandJoint(t,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,i){let s=null,r=null,o=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(c&&e.hand){o=!0;for(const _ of e.hand.values()){const g=t.getJointPose(_,i),m=this._getHandJoint(c,_);g!==null&&(m.matrix.fromArray(g.transform.matrix),m.matrix.decompose(m.position,m.rotation,m.scale),m.matrixWorldNeedsUpdate=!0,m.jointRadius=g.radius),m.visible=g!==null}const u=c.joints["index-finger-tip"],f=c.joints["thumb-tip"],h=u.position.distanceTo(f.position),d=.02,p=.005;c.inputState.pinching&&h>d+p?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&h<=d-p&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(r=t.getPose(e.gripSpace,i),r!==null&&(l.matrix.fromArray(r.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,r.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(r.linearVelocity)):l.hasLinearVelocity=!1,r.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(r.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(s=t.getPose(e.targetRaySpace,i),s===null&&r!==null&&(s=r),s!==null&&(a.matrix.fromArray(s.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,s.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(s.linearVelocity)):a.hasLinearVelocity=!1,s.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(s.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(VP)))}return a!==null&&(a.visible=s!==null),l!==null&&(l.visible=r!==null),c!==null&&(c.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const i=new ca;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}class gd{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new Pe(e),this.density=t}clone(){return new gd(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class _d{constructor(e,t=1,i=1e3){this.isFog=!0,this.name="",this.color=new Pe(e),this.near=t,this.far=i}clone(){return new _d(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class vd extends gt{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new li,this.environmentIntensity=1,this.environmentRotation=new li,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}}class yd{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=fc,this.updateRanges=[],this.version=0,this.uuid=oi()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,i){e*=this.stride,i*=t.stride;for(let s=0,r=this.stride;se.far||t.push({distance:l,point:nl.clone(),uv:Kn.getInterpolation(nl,Au,sl,Cu,Py,Vp,Iy,new fe),face:null,object:this})}copy(e,t){return super.copy(e,t),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function Ru(n,e,t,i,s,r){Qo.subVectors(n,t).addScalar(.5).multiply(i),s!==void 0?(il.x=r*Qo.x-s*Qo.y,il.y=s*Qo.x+r*Qo.y):il.copy(Qo),n.copy(e),n.x+=il.x,n.y+=il.y,n.applyMatrix4(dE)}const Pu=new k,Ly=new k;class mE extends gt{constructor(){super(),this.isLOD=!0,this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let i=0,s=t.length;i0){let i,s;for(i=1,s=t.length;i0){Pu.setFromMatrixPosition(this.matrixWorld);const s=e.ray.origin.distanceTo(Pu);this.getObjectForDistance(s).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){Pu.setFromMatrixPosition(e.matrixWorld),Ly.setFromMatrixPosition(this.matrixWorld);const i=Pu.distanceTo(Ly)/e.zoom;t[0].object.visible=!0;let s,r;for(s=1,r=t.length;s=o)t[s-1].object.visible=!1,t[s].object.visible=!0;else break}for(this._currentLevel=s-1;s1?null:t.copy(e.start).addScaledVector(i,r)}intersectsLine(e){const t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const i=t||$P.getNormalMatrix(e),s=this.coplanarPoint(Wp).applyMatrix4(e),r=this.normal.applyMatrix3(i).normalize();return this.constant=-s.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Wr=new bn,Du=new k;class Ha{constructor(e=new ur,t=new ur,i=new ur,s=new ur,r=new ur,o=new ur){this.planes=[e,t,i,s,r,o]}set(e,t,i,s,r,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(i),a[3].copy(s),a[4].copy(r),a[5].copy(o),this}copy(e){const t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,t=_i){const i=this.planes,s=e.elements,r=s[0],o=s[1],a=s[2],l=s[3],c=s[4],u=s[5],f=s[6],h=s[7],d=s[8],p=s[9],_=s[10],g=s[11],m=s[12],v=s[13],b=s[14],y=s[15];if(i[0].setComponents(l-r,h-c,g-d,y-m).normalize(),i[1].setComponents(l+r,h+c,g+d,y+m).normalize(),i[2].setComponents(l+o,h+u,g+p,y+v).normalize(),i[3].setComponents(l-o,h-u,g-p,y-v).normalize(),i[4].setComponents(l-a,h-f,g-_,y-b).normalize(),t===_i)i[5].setComponents(l+a,h+f,g+_,y+b).normalize();else if(t===hc)i[5].setComponents(a,f,_,b).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Wr.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Wr.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Wr)}intersectsSprite(e){return Wr.center.set(0,0,0),Wr.radius=.7071067811865476,Wr.applyMatrix4(e.matrixWorld),this.intersectsSphere(Wr)}intersectsSphere(e){const t=this.planes,i=e.center,s=-e.radius;for(let r=0;r<6;r++)if(t[r].distanceToPoint(i)0?e.max.x:e.min.x,Du.y=s.normal.y>0?e.max.y:e.min.y,Du.z=s.normal.z>0?e.max.z:e.min.z,s.distanceToPoint(Du)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}const Xi=new Je,$i=new Ha;class xd{constructor(){this.coordinateSystem=_i}intersectsObject(e,t){if(!t.isArrayCamera||t.cameras.length===0)return!1;for(let i=0;i=r.length&&r.push({start:-1,count:-1,z:-1,index:-1});const a=r[this.index];o.push(a),this.index++,a.start=e,a.count=t,a.z=i,a.index=s}reset(){this.list.length=0,this.index=0}}const $n=new Je,KP=new Pe(1,1,1),Vy=new Ha,ZP=new xd,Ou=new Cn,Xr=new bn,al=new k,Hy=new k,JP=new k,$p=new jP,En=new jt,Nu=[];function QP(n,e,t=0){const i=e.itemSize;if(n.isInterleavedBufferAttribute||n.array.constructor!==e.array.constructor){const s=n.count;for(let r=0;r65535?new Uint32Array(s):new Uint16Array(s);t.setIndex(new Pt(r,1))}this._geometryInitialized=!0}}_validateGeometry(e){const t=this.geometry;if(!!e.getIndex()!=!!t.getIndex())throw new Error('THREE.BatchedMesh: All geometries must consistently have "index".');for(const i in t.attributes){if(!e.hasAttribute(i))throw new Error(`THREE.BatchedMesh: Added geometry missing "${i}". All geometries must have consistent attributes.`);const s=e.getAttribute(i),r=t.getAttribute(i);if(s.itemSize!==r.itemSize||s.normalized!==r.normalized)throw new Error("THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}validateInstanceId(e){const t=this._instanceInfo;if(e<0||e>=t.length||t[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid instanceId ${e}. Instance is either out of range or has been deleted.`)}validateGeometryId(e){const t=this._geometryInfo;if(e<0||e>=t.length||t[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid geometryId ${e}. Geometry is either out of range or has been deleted.`)}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Cn);const e=this.boundingBox,t=this._instanceInfo;e.makeEmpty();for(let i=0,s=t.length;i=this.maxInstanceCount&&this._availableInstanceIds.length===0)throw new Error("THREE.BatchedMesh: Maximum item count reached.");const i={visible:!0,active:!0,geometryIndex:e};let s=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(Xp),s=this._availableInstanceIds.shift(),this._instanceInfo[s]=i):(s=this._instanceInfo.length,this._instanceInfo.push(i));const r=this._matricesTexture;$n.identity().toArray(r.image.data,s*16),r.needsUpdate=!0;const o=this._colorsTexture;return o&&(KP.toArray(o.image.data,s*4),o.needsUpdate=!0),this._visibilityChanged=!0,s}addGeometry(e,t=-1,i=-1){this._initializeGeometry(e),this._validateGeometry(e);const s={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},r=this._geometryInfo;s.vertexStart=this._nextVertexStart,s.reservedVertexCount=t===-1?e.getAttribute("position").count:t;const o=e.getIndex();if(o!==null&&(s.indexStart=this._nextIndexStart,s.reservedIndexCount=i===-1?o.count:i),s.indexStart!==-1&&s.indexStart+s.reservedIndexCount>this._maxIndexCount||s.vertexStart+s.reservedVertexCount>this._maxVertexCount)throw new Error("THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.");let l;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(Xp),l=this._availableGeometryIds.shift(),r[l]=s):(l=this._geometryCount,this._geometryCount++,r.push(s)),this.setGeometryAt(l,e),this._nextIndexStart=s.indexStart+s.reservedIndexCount,this._nextVertexStart=s.vertexStart+s.reservedVertexCount,l}setGeometryAt(e,t){if(e>=this._geometryCount)throw new Error("THREE.BatchedMesh: Maximum geometry count reached.");this._validateGeometry(t);const i=this.geometry,s=i.getIndex()!==null,r=i.getIndex(),o=t.getIndex(),a=this._geometryInfo[e];if(s&&o.count>a.reservedIndexCount||t.attributes.position.count>a.reservedVertexCount)throw new Error("THREE.BatchedMesh: Reserved space not large enough for provided geometry.");const l=a.vertexStart,c=a.reservedVertexCount;a.vertexCount=t.getAttribute("position").count;for(const u in i.attributes){const f=t.getAttribute(u),h=i.getAttribute(u);QP(f,h,l);const d=f.itemSize;for(let p=f.count,_=c;p<_;p++){const g=l+p;for(let m=0;m=t.length||t[e].active===!1)return this;const i=this._instanceInfo;for(let s=0,r=i.length;sa).sort((o,a)=>i[o].vertexStart-i[a].vertexStart),r=this.geometry;for(let o=0,a=i.length;o=this._geometryCount)return null;const i=this.geometry,s=this._geometryInfo[e];if(s.boundingBox===null){const r=new Cn,o=i.index,a=i.attributes.position;for(let l=s.start,c=s.start+s.count;l=this._geometryCount)return null;const i=this.geometry,s=this._geometryInfo[e];if(s.boundingSphere===null){const r=new bn;this.getBoundingBoxAt(e,Ou),Ou.getCenter(r.center);const o=i.index,a=i.attributes.position;let l=0;for(let c=s.start,u=s.start+s.count;ca.active);if(Math.max(...i.map(a=>a.vertexStart+a.reservedVertexCount))>e)throw new Error(`BatchedMesh: Geometry vertex values are being used outside the range ${t}. Cannot shrink further.`);if(this.geometry.index&&Math.max(...i.map(l=>l.indexStart+l.reservedIndexCount))>t)throw new Error(`BatchedMesh: Geometry index values are being used outside the range ${t}. Cannot shrink further.`);const r=this.geometry;r.dispose(),this._maxVertexCount=e,this._maxIndexCount=t,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new ct,this._initializeGeometry(r));const o=this.geometry;r.index&&$r(r.index.array,o.index.array);for(const a in r.attributes)$r(r.attributes[a].array,o.attributes[a].array)}raycast(e,t){const i=this._instanceInfo,s=this._geometryInfo,r=this.matrixWorld,o=this.geometry;En.material=this.material,En.geometry.index=o.index,En.geometry.attributes=o.attributes,En.geometry.boundingBox===null&&(En.geometry.boundingBox=new Cn),En.geometry.boundingSphere===null&&(En.geometry.boundingSphere=new bn);for(let a=0,l=i.length;a({...t,boundingBox:t.boundingBox!==null?t.boundingBox.clone():null,boundingSphere:t.boundingSphere!==null?t.boundingSphere.clone():null})),this._instanceInfo=e._instanceInfo.map(t=>({...t})),this._availableInstanceIds=e._availableInstanceIds.slice(),this._availableGeometryIds=e._availableGeometryIds.slice(),this._nextIndexStart=e._nextIndexStart,this._nextVertexStart=e._nextVertexStart,this._geometryCount=e._geometryCount,this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._indirectTexture=e._indirectTexture.clone(),this._indirectTexture.image.data=this._indirectTexture.image.data.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null)}onBeforeRender(e,t,i,s,r){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const o=s.getIndex(),a=o===null?1:o.array.BYTES_PER_ELEMENT,l=this._instanceInfo,c=this._multiDrawStarts,u=this._multiDrawCounts,f=this._geometryInfo,h=this.perObjectFrustumCulled,d=this._indirectTexture,p=d.image.data,_=i.isArrayCamera?ZP:Vy;h&&!i.isArrayCamera&&($n.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse).multiply(this.matrixWorld),Vy.setFromProjectionMatrix($n,e.coordinateSystem));let g=0;if(this.sortObjects){$n.copy(this.matrixWorld).invert(),al.setFromMatrixPosition(i.matrixWorld).applyMatrix4($n),Hy.set(0,0,-1).transformDirection(i.matrixWorld).transformDirection($n);for(let b=0,y=l.length;b0){const s=t[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=s.length;ri)return;qp.applyMatrix4(n.matrixWorld);const c=e.ray.origin.distanceTo(qp);if(!(ce.far))return{distance:c,point:Wy.clone().applyMatrix4(n.matrixWorld),index:o,face:null,faceIndex:null,barycoord:null,object:n}}const Xy=new k,$y=new k;class ls extends Sr{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,i=[];for(let s=0,r=t.count;s0){const s=t[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=s.length;rs.far)return;r.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,faceIndex:null,barycoord:null,object:o})}}class xE extends $t{constructor(e,t,i,s,r=nn,o=nn,a,l,c){super(e,t,i,s,r,o,a,l,c),this.isVideoTexture=!0,this.generateMipmaps=!1;const u=this;function f(){u.needsUpdate=!0,e.requestVideoFrameCallback(f)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(f)}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class eI extends xE{constructor(e,t,i,s,r,o,a,l){super({},e,t,i,s,r,o,a,l),this.isVideoFrameTexture=!0}update(){}clone(){return new this.constructor().copy(this)}setFrame(e){this.image=e,this.needsUpdate=!0}}class tI extends $t{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=yn,this.minFilter=yn,this.generateMipmaps=!1,this.needsUpdate=!0}}class Md extends $t{constructor(e,t,i,s,r,o,a,l,c,u,f,h){super(null,o,a,l,c,u,s,r,f,h),this.isCompressedTexture=!0,this.image={width:t,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class nI extends Md{constructor(e,t,i,s,r,o){super(e,t,i,r,o),this.isCompressedArrayTexture=!0,this.image.depth=s,this.wrapR=gi,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class iI extends Md{constructor(e,t,i){super(void 0,e[0].width,e[0].height,t,i,zs),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class sI extends $t{constructor(e,t,i,s,r,o,a,l,c){super(e,t,i,s,r,o,a,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class u_ extends $t{constructor(e,t,i=Vs,s,r,o,a=yn,l=yn,c,u=wa,f=1){if(u!==wa&&u!==Aa)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");const h={width:e,height:t,depth:f};super(h,s,r,o,a,l,u,i,c),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new dr(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return this.compareFunction!==null&&(t.compareFunction=this.compareFunction),t}}class Sd extends ct{constructor(e=1,t=1,i=4,s=8,r=1){super(),this.type="CapsuleGeometry",this.parameters={radius:e,height:t,capSegments:i,radialSegments:s,heightSegments:r},t=Math.max(0,t),i=Math.max(1,Math.floor(i)),s=Math.max(3,Math.floor(s)),r=Math.max(1,Math.floor(r));const o=[],a=[],l=[],c=[],u=t/2,f=Math.PI/2*e,h=t,d=2*f+h,p=i*2+r,_=s+1,g=new k,m=new k;for(let v=0;v<=p;v++){let b=0,y=0,T=0,w=0;if(v<=i){const M=v/i,E=M*Math.PI/2;y=-u-e*Math.cos(E),T=e*Math.sin(E),w=-e*Math.cos(E),b=M*f}else if(v<=i+r){const M=(v-i)/r;y=-u+M*t,T=e,w=0,b=f+M*h}else{const M=(v-i-r)/i,E=M*Math.PI/2;y=u+e*Math.sin(E),T=e*Math.cos(E),w=e*Math.sin(E),b=f+h+M*f}const S=Math.max(0,Math.min(1,b/d));let P=0;v===0?P=.5/s:v===p&&(P=-.5/s);for(let M=0;M<=s;M++){const E=M/s,D=E*Math.PI*2,B=Math.sin(D),z=Math.cos(D);m.x=-T*z,m.y=y,m.z=T*B,a.push(m.x,m.y,m.z),g.set(-T*z,w,T*B),g.normalize(),l.push(g.x,g.y,g.z),c.push(E+P,S)}if(v>0){const M=(v-1)*_;for(let E=0;E0&&b(!0),t>0&&b(!1)),this.setIndex(u),this.setAttribute("position",new ke(f,3)),this.setAttribute("normal",new ke(h,3)),this.setAttribute("uv",new ke(d,2));function v(){const y=new k,T=new k;let w=0;const S=(t-e)/i;for(let P=0;P<=r;P++){const M=[],E=P/r,D=E*(t-e)+e;for(let B=0;B<=s;B++){const z=B/s,V=z*l+a,Q=Math.sin(V),j=Math.cos(V);T.x=D*Q,T.y=-E*i+g,T.z=D*j,f.push(T.x,T.y,T.z),y.set(Q,S,j).normalize(),h.push(y.x,y.y,y.z),d.push(z,1-E),M.push(p++)}_.push(M)}for(let P=0;P0||M!==0)&&(u.push(E,D,z),w+=3),(t>0||M!==r-1)&&(u.push(D,B,z),w+=3)}c.addGroup(m,w,0),m+=w}function b(y){const T=p,w=new fe,S=new k;let P=0;const M=y===!0?e:t,E=y===!0?1:-1;for(let B=1;B<=s;B++)f.push(0,g*E,0),h.push(0,E,0),d.push(.5,.5),p++;const D=p;for(let B=0;B<=s;B++){const V=B/s*l+a,Q=Math.cos(V),j=Math.sin(V);S.x=M*j,S.y=g*E,S.z=M*Q,f.push(S.x,S.y,S.z),h.push(0,E,0),w.x=Q*.5+.5,w.y=j*.5*E+.5,d.push(w.x,w.y),p++}for(let B=0;B.9&&S<.1&&(b<.2&&(o[v+0]+=1),y<.2&&(o[v+2]+=1),T<.2&&(o[v+4]+=1))}}function h(v){r.push(v.x,v.y,v.z)}function d(v,b){const y=v*3;b.x=e[y+0],b.y=e[y+1],b.z=e[y+2]}function p(){const v=new k,b=new k,y=new k,T=new k,w=new fe,S=new fe,P=new fe;for(let M=0,E=0;M0)l=s-1;else{l=s;break}if(s=l,i[s]===o)return s/(r-1);const u=i[s],h=i[s+1]-u,d=(o-u)/h;return(s+d)/(r-1)}getTangent(e,t){let s=e-1e-4,r=e+1e-4;s<0&&(s=0),r>1&&(r=1);const o=this.getPoint(s),a=this.getPoint(r),l=t||(o.isVector2?new fe:new k);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,t){const i=this.getUtoTmapping(e);return this.getTangent(i,t)}computeFrenetFrames(e,t=!1){const i=new k,s=[],r=[],o=[],a=new k,l=new Je;for(let d=0;d<=e;d++){const p=d/e;s[d]=this.getTangentAt(p,new k)}r[0]=new k,o[0]=new k;let c=Number.MAX_VALUE;const u=Math.abs(s[0].x),f=Math.abs(s[0].y),h=Math.abs(s[0].z);u<=c&&(c=u,i.set(1,0,0)),f<=c&&(c=f,i.set(0,1,0)),h<=c&&i.set(0,0,1),a.crossVectors(s[0],i).normalize(),r[0].crossVectors(s[0],a),o[0].crossVectors(s[0],r[0]);for(let d=1;d<=e;d++){if(r[d]=r[d-1].clone(),o[d]=o[d-1].clone(),a.crossVectors(s[d-1],s[d]),a.length()>Number.EPSILON){a.normalize();const p=Math.acos(st(s[d-1].dot(s[d]),-1,1));r[d].applyMatrix4(l.makeRotationAxis(a,p))}o[d].crossVectors(s[d],r[d])}if(t===!0){let d=Math.acos(st(r[0].dot(r[e]),-1,1));d/=e,s[0].dot(a.crossVectors(r[0],r[e]))>0&&(d=-d);for(let p=1;p<=e;p++)r[p].applyMatrix4(l.makeRotationAxis(s[p],d*p)),o[p].crossVectors(s[p],r[p])}return{tangents:s,normals:r,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.7,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class wd extends Gi{constructor(e=0,t=0,i=1,s=1,r=0,o=Math.PI*2,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=i,this.yRadius=s,this.aStartAngle=r,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,t=new fe){const i=t,s=Math.PI*2;let r=this.aEndAngle-this.aStartAngle;const o=Math.abs(r)s;)r-=s;r0?0:(Math.floor(Math.abs(a)/r)+1)*r:l===0&&a===r-1&&(a=r-2,l=1);let c,u;this.closed||a>0?c=s[(a-1)%r]:(Gu.subVectors(s[0],s[1]).add(s[0]),c=Gu);const f=s[a%r],h=s[(a+1)%r];if(this.closed||a+2s.length-2?s.length-1:o+1],f=s[o>s.length-3?s.length-1:o+2];return i.set(jy(a,l.x,c.x,u.x,f.x),jy(a,l.y,c.y,u.y,f.y)),i}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t=i){const o=s[r]-i,a=this.curves[r],l=a.getLength(),c=l===0?0:1-o/l;return a.getPointAt(c,t)}r++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let i=0,s=this.curves.length;i1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,i=e.curves.length;t0){const f=c.getPoint(0);f.equals(this.currentPoint)||this.lineTo(f.x,f.y)}this.curves.push(c);const u=c.getPoint(1);return this.currentPoint.copy(u),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class yo extends Ch{constructor(e){super(e),this.uuid=oi(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let i=0,s=this.holes.length;i80*t){a=1/0,l=1/0;let u=-1/0,f=-1/0;for(let h=t;hu&&(u=d),p>f&&(f=p)}c=Math.max(u-a,f-l),c=c!==0?32767/c:0}return pc(r,o,t,a,l,c,0),o}function CE(n,e,t,i,s){let r;if(s===CI(n,e,t,i)>0)for(let o=e;o=e;o-=i)r=Ky(o/i|0,n[o],n[o+1],r);return r&&Ia(r,r.next)&&(gc(r),r=r.next),r}function wo(n,e){if(!n)return n;e||(e=n);let t=n,i;do if(i=!1,!t.steiner&&(Ia(t,t.next)||Gt(t.prev,t,t.next)===0)){if(gc(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function pc(n,e,t,i,s,r,o){if(!n)return;!o&&r&&MI(n,i,s,r);let a=n;for(;n.prev!==n.next;){const l=n.prev,c=n.next;if(r?pI(n,i,s,r):dI(n)){e.push(l.i,n.i,c.i),gc(n),n=c.next,a=c.next;continue}if(n=c,n===a){o?o===1?(n=mI(wo(n),e),pc(n,e,t,i,s,r,2)):o===2&&gI(n,e,t,i,s,r):pc(wo(n),e,t,i,s,r,1);break}}}function dI(n){const e=n.prev,t=n,i=n.next;if(Gt(e,t,i)>=0)return!1;const s=e.x,r=t.x,o=i.x,a=e.y,l=t.y,c=i.y,u=Math.min(s,r,o),f=Math.min(a,l,c),h=Math.max(s,r,o),d=Math.max(a,l,c);let p=i.next;for(;p!==e;){if(p.x>=u&&p.x<=h&&p.y>=f&&p.y<=d&&vl(s,a,r,l,o,c,p.x,p.y)&&Gt(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function pI(n,e,t,i){const s=n.prev,r=n,o=n.next;if(Gt(s,r,o)>=0)return!1;const a=s.x,l=r.x,c=o.x,u=s.y,f=r.y,h=o.y,d=Math.min(a,l,c),p=Math.min(u,f,h),_=Math.max(a,l,c),g=Math.max(u,f,h),m=xg(d,p,e,t,i),v=xg(_,g,e,t,i);let b=n.prevZ,y=n.nextZ;for(;b&&b.z>=m&&y&&y.z<=v;){if(b.x>=d&&b.x<=_&&b.y>=p&&b.y<=g&&b!==s&&b!==o&&vl(a,u,l,f,c,h,b.x,b.y)&&Gt(b.prev,b,b.next)>=0||(b=b.prevZ,y.x>=d&&y.x<=_&&y.y>=p&&y.y<=g&&y!==s&&y!==o&&vl(a,u,l,f,c,h,y.x,y.y)&&Gt(y.prev,y,y.next)>=0))return!1;y=y.nextZ}for(;b&&b.z>=m;){if(b.x>=d&&b.x<=_&&b.y>=p&&b.y<=g&&b!==s&&b!==o&&vl(a,u,l,f,c,h,b.x,b.y)&&Gt(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;y&&y.z<=v;){if(y.x>=d&&y.x<=_&&y.y>=p&&y.y<=g&&y!==s&&y!==o&&vl(a,u,l,f,c,h,y.x,y.y)&&Gt(y.prev,y,y.next)>=0)return!1;y=y.nextZ}return!0}function mI(n,e){let t=n;do{const i=t.prev,s=t.next.next;!Ia(i,s)&&PE(i,t,t.next,s)&&mc(i,s)&&mc(s,i)&&(e.push(i.i,t.i,s.i),gc(t),gc(t.next),t=n=s),t=t.next}while(t!==n);return wo(t)}function gI(n,e,t,i,s,r){let o=n;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&TI(o,a)){let l=IE(o,a);o=wo(o,o.next),l=wo(l,l.next),pc(o,e,t,i,s,r,0),pc(l,e,t,i,s,r,0);return}a=a.next}o=o.next}while(o!==n)}function _I(n,e,t,i){const s=[];for(let r=0,o=e.length;r=t.next.y&&t.next.y!==t.y){const f=t.x+(s-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(f<=i&&f>r&&(r=f,o=t.x=t.x&&t.x>=l&&i!==t.x&&RE(so.x||t.x===o.x&&xI(o,t)))&&(o=t,u=f)}t=t.next}while(t!==a);return o}function xI(n,e){return Gt(n.prev,n,e.prev)<0&&Gt(e.next,n,n.next)<0}function MI(n,e,t,i){let s=n;do s.z===0&&(s.z=xg(s.x,s.y,e,t,i)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==n);s.prevZ.nextZ=null,s.prevZ=null,SI(s)}function SI(n){let e,t=1;do{let i=n,s;n=null;let r=null;for(e=0;i;){e++;let o=i,a=0;for(let c=0;c0||l>0&&o;)a!==0&&(l===0||!o||i.z<=o.z)?(s=i,i=i.nextZ,a--):(s=o,o=o.nextZ,l--),r?r.nextZ=s:n=s,s.prevZ=r,r=s;i=o}r.nextZ=null,t*=2}while(e>1);return n}function xg(n,e,t,i,s){return n=(n-t)*s|0,e=(e-i)*s|0,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,n|e<<1}function EI(n){let e=n,t=n;do(e.x=(n-o)*(r-a)&&(n-o)*(i-a)>=(t-o)*(e-a)&&(t-o)*(r-a)>=(s-o)*(i-a)}function vl(n,e,t,i,s,r,o,a){return!(n===o&&e===a)&&RE(n,e,t,i,s,r,o,a)}function TI(n,e){return n.next.i!==e.i&&n.prev.i!==e.i&&!wI(n,e)&&(mc(n,e)&&mc(e,n)&&AI(n,e)&&(Gt(n.prev,n,e.prev)||Gt(n,e.prev,e))||Ia(n,e)&&Gt(n.prev,n,n.next)>0&&Gt(e.prev,e,e.next)>0)}function Gt(n,e,t){return(e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y)}function Ia(n,e){return n.x===e.x&&n.y===e.y}function PE(n,e,t,i){const s=Xu(Gt(n,e,t)),r=Xu(Gt(n,e,i)),o=Xu(Gt(t,i,n)),a=Xu(Gt(t,i,e));return!!(s!==r&&o!==a||s===0&&Wu(n,t,e)||r===0&&Wu(n,i,e)||o===0&&Wu(t,n,i)||a===0&&Wu(t,e,i))}function Wu(n,e,t){return e.x<=Math.max(n.x,t.x)&&e.x>=Math.min(n.x,t.x)&&e.y<=Math.max(n.y,t.y)&&e.y>=Math.min(n.y,t.y)}function Xu(n){return n>0?1:n<0?-1:0}function wI(n,e){let t=n;do{if(t.i!==n.i&&t.next.i!==n.i&&t.i!==e.i&&t.next.i!==e.i&&PE(t,t.next,n,e))return!0;t=t.next}while(t!==n);return!1}function mc(n,e){return Gt(n.prev,n,n.next)<0?Gt(n,e,n.next)>=0&&Gt(n,n.prev,e)>=0:Gt(n,e,n.prev)<0||Gt(n,n.next,e)<0}function AI(n,e){let t=n,i=!1;const s=(n.x+e.x)/2,r=(n.y+e.y)/2;do t.y>r!=t.next.y>r&&t.next.y!==t.y&&s<(t.next.x-t.x)*(r-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==n);return i}function IE(n,e){const t=Mg(n.i,n.x,n.y),i=Mg(e.i,e.x,e.y),s=n.next,r=e.prev;return n.next=e,e.prev=n,t.next=s,s.prev=t,i.next=t,t.prev=i,r.next=i,i.prev=r,i}function Ky(n,e,t,i){const s=Mg(n,e,t);return i?(s.next=i.next,s.prev=i,i.next.prev=s,i.next=s):(s.prev=s,s.next=s),s}function gc(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function Mg(n,e,t){return{i:n,x:e,y:t,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function CI(n,e,t,i){let s=0;for(let r=e,o=t-i;r2&&n[e-1].equals(n[0])&&n.pop()}function Jy(n,e){for(let t=0;tNumber.EPSILON){const Y=Math.sqrt(x),ne=Math.sqrt(ce*ce+R*R),ee=W.x-H/Y,Te=W.y+F/Y,me=G.x-R/ne,Re=G.y+ce/ne,De=((me-ee)*R-(Re-Te)*ce)/(F*R-H*ce);X=ee+F*De-A.x,C=Te+H*De-A.y;const de=X*X+C*C;if(de<=2)return new fe(X,C);I=Math.sqrt(de/2)}else{let Y=!1;F>Number.EPSILON?ce>Number.EPSILON&&(Y=!0):F<-Number.EPSILON?ce<-Number.EPSILON&&(Y=!0):Math.sign(H)===Math.sign(R)&&(Y=!0),Y?(X=-H,C=F,I=Math.sqrt(x)):(X=F,C=H,I=Math.sqrt(x/2))}return new fe(X/I,C/I)}const pe=[];for(let A=0,W=Q.length,G=W-1,X=A+1;A=0;A--){const W=A/g,G=d*Math.cos(W*Math.PI/2),X=p*Math.sin(W*Math.PI/2)+_;for(let C=0,I=Q.length;C=0;){const X=G;let C=G-1;C<0&&(C=A.length-1);for(let I=0,F=u+g*2;I0)&&d.push(b,y,w),(m!==i-1||l0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class UE extends Pn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Pe(16777215),this.specular=new Pe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Pe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Cr,this.normalScale=new fe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new li,this.combine=Fc,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class FE extends Pn{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Pe(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Pe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Cr,this.normalScale=new fe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class kE extends Pn{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Cr,this.normalScale=new fe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class BE extends Pn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Pe(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Pe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Cr,this.normalScale=new fe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new li,this.combine=Fc,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class v_ extends Pn{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=j1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class y_ extends Pn{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}class zE extends Pn{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Pe(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Cr,this.normalScale=new fe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class VE extends Wn{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function ho(n,e){return!n||n.constructor===e?n:typeof e.BYTES_PER_ELEMENT=="number"?new e(n):Array.prototype.slice.call(n)}function HE(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function GE(n){function e(s,r){return n[s]-n[r]}const t=n.length,i=new Array(t);for(let s=0;s!==t;++s)i[s]=s;return i.sort(e),i}function Sg(n,e,t){const i=n.length,s=new n.constructor(i);for(let r=0,o=0;o!==i;++r){const a=t[r]*e;for(let l=0;l!==e;++l)s[o++]=n[a+l]}return s}function b_(n,e,t,i){let s=1,r=n[0];for(;r!==void 0&&r[i]===void 0;)r=n[s++];if(r===void 0)return;let o=r[i];if(o!==void 0)if(Array.isArray(o))do o=r[i],o!==void 0&&(e.push(r.time),t.push(...o)),r=n[s++];while(r!==void 0);else if(o.toArray!==void 0)do o=r[i],o!==void 0&&(e.push(r.time),o.toArray(t,t.length)),r=n[s++];while(r!==void 0);else do o=r[i],o!==void 0&&(e.push(r.time),t.push(o)),r=n[s++];while(r!==void 0)}function DI(n,e,t,i,s=30){const r=n.clone();r.name=e;const o=[];for(let l=0;l=i)){f.push(c.times[d]);for(let _=0;_r.tracks[l].times[0]&&(a=r.tracks[l].times[0]);for(let l=0;l=a.times[p]){const m=p*f+u,v=m+f-u;_=a.values.slice(m,v)}else{const m=a.createInterpolant(),v=u,b=f-u;m.evaluate(r),_=m.resultBuffer.slice(v,b)}l==="quaternion"&&new Qn().fromArray(_).normalize().conjugate().toArray(_);const g=c.times.length;for(let m=0;m=r)){const a=t[1];e=r)break t}o=i,i=0;break n}break e}for(;i>>1;et;)--o;if(++o,r!==0||o!==s){r>=o&&(o=Math.max(o,1),r=o-1);const a=this.getValueSize();this.times=i.slice(r,o),this.values=this.values.slice(r*a,o*a)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,s=this.values,r=i.length;r===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==r;a++){const l=i[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(s!==void 0&&HE(s))for(let a=0,l=s.length;a!==l;++a){const c=s[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),i=this.getValueSize(),s=this.getInterpolation()===Mf,r=e.length-1;let o=1;for(let a=1;a0){e[o]=e[r];for(let a=r*i,l=o*i,c=0;c!==i;++c)t[l+c]=t[a+c];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=t.slice(0,o*i)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),i=this.constructor,s=new i(this.name,e,t);return s.createInterpolant=this.createInterpolant,s}}Ei.prototype.ValueTypeName="";Ei.prototype.TimeBufferType=Float32Array;Ei.prototype.ValueBufferType=Float32Array;Ei.prototype.DefaultInterpolation=Eh;class Po extends Ei{constructor(e,t,i){super(e,t,i)}}Po.prototype.ValueTypeName="bool";Po.prototype.ValueBufferType=Array;Po.prototype.DefaultInterpolation=lc;Po.prototype.InterpolantFactoryMethodLinear=void 0;Po.prototype.InterpolantFactoryMethodSmooth=void 0;class M_ extends Ei{constructor(e,t,i,s){super(e,t,i,s)}}M_.prototype.ValueTypeName="color";class _c extends Ei{constructor(e,t,i,s){super(e,t,i,s)}}_c.prototype.ValueTypeName="number";class $E extends $c{constructor(e,t,i,s){super(e,t,i,s)}interpolate_(e,t,i,s){const r=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(i-t)/(s-t);let c=e*a;for(let u=c+a;c!==u;c+=4)Qn.slerpFlat(r,0,o,c-a,o,c,l);return r}}class qc extends Ei{constructor(e,t,i,s){super(e,t,i,s)}InterpolantFactoryMethodLinear(e){return new $E(this.times,this.values,this.getValueSize(),e)}}qc.prototype.ValueTypeName="quaternion";qc.prototype.InterpolantFactoryMethodSmooth=void 0;class Io extends Ei{constructor(e,t,i){super(e,t,i)}}Io.prototype.ValueTypeName="string";Io.prototype.ValueBufferType=Array;Io.prototype.DefaultInterpolation=lc;Io.prototype.InterpolantFactoryMethodLinear=void 0;Io.prototype.InterpolantFactoryMethodSmooth=void 0;class vc extends Ei{constructor(e,t,i,s){super(e,t,i,s)}}vc.prototype.ValueTypeName="vector";class yc{constructor(e="",t=-1,i=[],s=dd){this.name=e,this.tracks=i,this.duration=t,this.blendMode=s,this.uuid=oi(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],i=e.tracks,s=1/(e.fps||1);for(let o=0,a=i.length;o!==a;++o)t.push(FI(i[o]).scale(s));const r=new this(e.name,e.duration,t,e.blendMode);return r.uuid=e.uuid,r}static toJSON(e){const t=[],i=e.tracks,s={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let r=0,o=i.length;r!==o;++r)t.push(Ei.toJSON(i[r]));return s}static CreateFromMorphTargetSequence(e,t,i,s){const r=t.length,o=[];for(let a=0;a1){const f=u[1];let h=s[f];h||(s[f]=h=[]),h.push(c)}}const o=[];for(const a in s)o.push(this.CreateFromMorphTargetSequence(a,s[a],t,i));return o}static parseAnimation(e,t){if(console.warn("THREE.AnimationClip: parseAnimation() is deprecated and will be removed with r185"),!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(f,h,d,p,_){if(d.length!==0){const g=[],m=[];b_(d,g,m,p),g.length!==0&&_.push(new f(h,g,m))}},s=[],r=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let f=0;f{t&&t(r),this.manager.itemEnd(e)},0),r;if(vs[e]!==void 0){vs[e].push({onLoad:t,onProgress:i,onError:s});return}vs[e]=[],vs[e].push({onLoad:t,onProgress:i,onError:s});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const u=vs[e],f=c.body.getReader(),h=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),d=h?parseInt(h):0,p=d!==0;let _=0;const g=new ReadableStream({start(m){v();function v(){f.read().then(({done:b,value:y})=>{if(b)m.close();else{_+=y.byteLength;const T=new ProgressEvent("progress",{lengthComputable:p,loaded:_,total:d});for(let w=0,S=u.length;w{m.error(b)})}}});return new Response(g)}else throw new kI(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(u=>new DOMParser().parseFromString(u,a));case"json":return c.json();default:if(a==="")return c.text();{const f=/charset="?([^;"\s]*)"?/i.exec(a),h=f&&f[1]?f[1].toLowerCase():void 0,d=new TextDecoder(h);return c.arrayBuffer().then(p=>d.decode(p))}}}).then(c=>{Rs.add(e,c);const u=vs[e];delete vs[e];for(let f=0,h=u.length;f{const u=vs[e];if(u===void 0)throw this.manager.itemError(e),c;delete vs[e];for(let f=0,h=u.length;f{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class BI extends ti{constructor(e){super(e)}load(e,t,i,s){const r=this,o=new Hs(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{t(r.parse(JSON.parse(a)))}catch(l){s?s(l):console.error(l),r.manager.itemError(e)}},i,s)}parse(e){const t=[];for(let i=0;i0:s.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const r in e.uniforms){const o=e.uniforms[r];switch(s.uniforms[r]={},o.type){case"t":s.uniforms[r].value=i(o.value);break;case"c":s.uniforms[r].value=new Pe().setHex(o.value);break;case"v2":s.uniforms[r].value=new fe().fromArray(o.value);break;case"v3":s.uniforms[r].value=new k().fromArray(o.value);break;case"v4":s.uniforms[r].value=new vt().fromArray(o.value);break;case"m3":s.uniforms[r].value=new at().fromArray(o.value);break;case"m4":s.uniforms[r].value=new Je().fromArray(o.value);break;default:s.uniforms[r].value=o.value}}if(e.defines!==void 0&&(s.defines=e.defines),e.vertexShader!==void 0&&(s.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(s.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(s.glslVersion=e.glslVersion),e.extensions!==void 0)for(const r in e.extensions)s.extensions[r]=e.extensions[r];if(e.lights!==void 0&&(s.lights=e.lights),e.clipping!==void 0&&(s.clipping=e.clipping),e.size!==void 0&&(s.size=e.size),e.sizeAttenuation!==void 0&&(s.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(s.map=i(e.map)),e.matcap!==void 0&&(s.matcap=i(e.matcap)),e.alphaMap!==void 0&&(s.alphaMap=i(e.alphaMap)),e.bumpMap!==void 0&&(s.bumpMap=i(e.bumpMap)),e.bumpScale!==void 0&&(s.bumpScale=e.bumpScale),e.normalMap!==void 0&&(s.normalMap=i(e.normalMap)),e.normalMapType!==void 0&&(s.normalMapType=e.normalMapType),e.normalScale!==void 0){let r=e.normalScale;Array.isArray(r)===!1&&(r=[r,r]),s.normalScale=new fe().fromArray(r)}return e.displacementMap!==void 0&&(s.displacementMap=i(e.displacementMap)),e.displacementScale!==void 0&&(s.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(s.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(s.roughnessMap=i(e.roughnessMap)),e.metalnessMap!==void 0&&(s.metalnessMap=i(e.metalnessMap)),e.emissiveMap!==void 0&&(s.emissiveMap=i(e.emissiveMap)),e.emissiveIntensity!==void 0&&(s.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(s.specularMap=i(e.specularMap)),e.specularIntensityMap!==void 0&&(s.specularIntensityMap=i(e.specularIntensityMap)),e.specularColorMap!==void 0&&(s.specularColorMap=i(e.specularColorMap)),e.envMap!==void 0&&(s.envMap=i(e.envMap)),e.envMapRotation!==void 0&&s.envMapRotation.fromArray(e.envMapRotation),e.envMapIntensity!==void 0&&(s.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(s.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(s.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(s.lightMap=i(e.lightMap)),e.lightMapIntensity!==void 0&&(s.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(s.aoMap=i(e.aoMap)),e.aoMapIntensity!==void 0&&(s.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(s.gradientMap=i(e.gradientMap)),e.clearcoatMap!==void 0&&(s.clearcoatMap=i(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(s.clearcoatRoughnessMap=i(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(s.clearcoatNormalMap=i(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(s.clearcoatNormalScale=new fe().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(s.iridescenceMap=i(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(s.iridescenceThicknessMap=i(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(s.transmissionMap=i(e.transmissionMap)),e.thicknessMap!==void 0&&(s.thicknessMap=i(e.thicknessMap)),e.anisotropyMap!==void 0&&(s.anisotropyMap=i(e.anisotropyMap)),e.sheenColorMap!==void 0&&(s.sheenColorMap=i(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(s.sheenRoughnessMap=i(e.sheenRoughnessMap)),s}setTextures(e){return this.textures=e,this}createMaterialFromType(e){return Fd.createMaterialFromType(e)}static createMaterialFromType(e){const t={ShadowMaterial:DE,SpriteMaterial:a_,RawShaderMaterial:OE,ShaderMaterial:zi,PointsMaterial:c_,MeshPhysicalMaterial:NE,MeshStandardMaterial:__,MeshPhongMaterial:UE,MeshToonMaterial:FE,MeshNormalMaterial:kE,MeshLambertMaterial:BE,MeshDepthMaterial:v_,MeshDistanceMaterial:y_,MeshBasicMaterial:Xs,MeshMatcapMaterial:zE,LineDashedMaterial:VE,LineBasicMaterial:Wn,Material:Pn};return new t[e]}}class Eg{static extractUrlBase(e){const t=e.lastIndexOf("/");return t===-1?"./":e.slice(0,t+1)}static resolveURL(e,t){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}}class nT extends ct{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){const e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}class iT extends ti{constructor(e){super(e)}load(e,t,i,s){const r=this,o=new Hs(r.manager);o.setPath(r.path),o.setRequestHeader(r.requestHeader),o.setWithCredentials(r.withCredentials),o.load(e,function(a){try{t(r.parse(JSON.parse(a)))}catch(l){s?s(l):console.error(l),r.manager.itemError(e)}},i,s)}parse(e){const t={},i={};function s(d,p){if(t[p]!==void 0)return t[p];const g=d.interleavedBuffers[p],m=r(d,g.buffer),v=la(g.type,m),b=new yd(v,g.stride);return b.uuid=g.uuid,t[p]=b,b}function r(d,p){if(i[p]!==void 0)return i[p];const g=d.arrayBuffers[p],m=new Uint32Array(g).buffer;return i[p]=m,m}const o=e.isInstancedBufferGeometry?new nT:new ct,a=e.data.index;if(a!==void 0){const d=la(a.type,a.array);o.setIndex(new Pt(d,1))}const l=e.data.attributes;for(const d in l){const p=l[d];let _;if(p.isInterleavedBufferAttribute){const g=s(e.data,p.data);_=new To(g,p.itemSize,p.offset,p.normalized)}else{const g=la(p.type,p.array),m=p.isInstancedBufferAttribute?Pa:Pt;_=new m(g,p.itemSize,p.normalized)}p.name!==void 0&&(_.name=p.name),p.usage!==void 0&&_.setUsage(p.usage),o.setAttribute(d,_)}const c=e.data.morphAttributes;if(c)for(const d in c){const p=c[d],_=[];for(let g=0,m=p.length;g0){const l=new S_(t);r=new bc(l),r.setCrossOrigin(this.crossOrigin);for(let c=0,u=e.length;c0){s=new bc(this.manager),s.setCrossOrigin(this.crossOrigin);for(let o=0,a=e.length;o{let g=null,m=null;return _.boundingBox!==void 0&&(g=new Cn().fromJSON(_.boundingBox)),_.boundingSphere!==void 0&&(m=new bn().fromJSON(_.boundingSphere)),{..._,boundingBox:g,boundingSphere:m}}),o._instanceInfo=e.instanceInfo,o._availableInstanceIds=e._availableInstanceIds,o._availableGeometryIds=e._availableGeometryIds,o._nextIndexStart=e.nextIndexStart,o._nextVertexStart=e.nextVertexStart,o._geometryCount=e.geometryCount,o._maxInstanceCount=e.maxInstanceCount,o._maxVertexCount=e.maxVertexCount,o._maxIndexCount=e.maxIndexCount,o._geometryInitialized=e.geometryInitialized,o._matricesTexture=c(e.matricesTexture.uuid),o._indirectTexture=c(e.indirectTexture.uuid),e.colorsTexture!==void 0&&(o._colorsTexture=c(e.colorsTexture.uuid)),e.boundingSphere!==void 0&&(o.boundingSphere=new bn().fromJSON(e.boundingSphere)),e.boundingBox!==void 0&&(o.boundingBox=new Cn().fromJSON(e.boundingBox));break;case"LOD":o=new mE;break;case"Line":o=new Sr(a(e.geometry),l(e.material));break;case"LineLoop":o=new yE(a(e.geometry),l(e.material));break;case"LineSegments":o=new ls(a(e.geometry),l(e.material));break;case"PointCloud":case"Points":o=new bE(a(e.geometry),l(e.material));break;case"Sprite":o=new pE(l(e.material));break;case"Group":o=new ca;break;case"Bone":o=new l_;break;default:o=new gt}if(o.uuid=e.uuid,e.name!==void 0&&(o.name=e.name),e.matrix!==void 0?(o.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(o.matrixAutoUpdate=e.matrixAutoUpdate),o.matrixAutoUpdate&&o.matrix.decompose(o.position,o.quaternion,o.scale)):(e.position!==void 0&&o.position.fromArray(e.position),e.rotation!==void 0&&o.rotation.fromArray(e.rotation),e.quaternion!==void 0&&o.quaternion.fromArray(e.quaternion),e.scale!==void 0&&o.scale.fromArray(e.scale)),e.up!==void 0&&o.up.fromArray(e.up),e.castShadow!==void 0&&(o.castShadow=e.castShadow),e.receiveShadow!==void 0&&(o.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.intensity!==void 0&&(o.shadow.intensity=e.shadow.intensity),e.shadow.bias!==void 0&&(o.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(o.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(o.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&o.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(o.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(o.visible=e.visible),e.frustumCulled!==void 0&&(o.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(o.renderOrder=e.renderOrder),e.userData!==void 0&&(o.userData=e.userData),e.layers!==void 0&&(o.layers.mask=e.layers),e.children!==void 0){const h=e.children;for(let d=0;d"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,i,s){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,o=Rs.get(e);if(o!==void 0){if(r.manager.itemStart(e),o.then){o.then(c=>{if(em.has(o)===!0)s&&s(em.get(o)),r.manager.itemError(e),r.manager.itemEnd(e);else return t&&t(c),r.manager.itemEnd(e),c});return}return setTimeout(function(){t&&t(o),r.manager.itemEnd(e)},0),o}const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader;const l=fetch(e,a).then(function(c){return c.blob()}).then(function(c){return createImageBitmap(c,Object.assign(r.options,{colorSpaceConversion:"none"}))}).then(function(c){return Rs.add(e,c),t&&t(c),r.manager.itemEnd(e),c}).catch(function(c){s&&s(c),em.set(l,c),Rs.remove(e),r.manager.itemError(e),r.manager.itemEnd(e)});Rs.add(e,l),r.manager.itemStart(e)}}let $u;class T_{static getContext(){return $u===void 0&&($u=new(window.AudioContext||window.webkitAudioContext)),$u}static setContext(e){$u=e}}class KI extends ti{constructor(e){super(e)}load(e,t,i,s){const r=this,o=new Hs(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(l){try{const c=l.slice(0);T_.getContext().decodeAudioData(c,function(f){t(f)}).catch(a)}catch(c){a(c)}},i,s);function a(l){s?s(l):console.error(l),r.manager.itemError(e)}}}const ob=new Je,ab=new Je,qr=new Je;class ZI{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Jt,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Jt,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep,qr.copy(e.projectionMatrix);const s=t.eyeSep/2,r=s*t.near/t.focus,o=t.near*Math.tan(vo*t.fov*.5)/t.zoom;let a,l;ab.elements[12]=-s,ob.elements[12]=s,a=-o*t.aspect+r,l=o*t.aspect+r,qr.elements[0]=2*t.near/(l-a),qr.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(qr),a=-o*t.aspect-r,l=o*t.aspect-r,qr.elements[0]=2*t.near/(l-a),qr.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(qr)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(ab),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(ob)}}class sT extends Jt{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}}class kd{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=lb(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=lb();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function lb(){return performance.now()}const Yr=new k,tm=new Qn,JI=new k,jr=new k,Kr=new k;class QI extends gt{constructor(){super(),this.type="AudioListener",this.context=T_.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new kd}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const t=this.context.listener;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Yr,tm,JI),jr.set(0,0,-1).applyQuaternion(tm),Kr.set(0,1,0).applyQuaternion(tm),t.positionX){const i=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(Yr.x,i),t.positionY.linearRampToValueAtTime(Yr.y,i),t.positionZ.linearRampToValueAtTime(Yr.z,i),t.forwardX.linearRampToValueAtTime(jr.x,i),t.forwardY.linearRampToValueAtTime(jr.y,i),t.forwardZ.linearRampToValueAtTime(jr.z,i),t.upX.linearRampToValueAtTime(Kr.x,i),t.upY.linearRampToValueAtTime(Kr.y,i),t.upZ.linearRampToValueAtTime(Kr.z,i)}else t.setPosition(Yr.x,Yr.y,Yr.z),t.setOrientation(jr.x,jr.y,jr.z,Kr.x,Kr.y,Kr.z)}}class rT extends gt{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(e=0){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(this.context.currentTime+e),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e0&&this._mixBufferRegionAdditive(i,s,this._addIndex*t,1,t);for(let l=t,c=t+t;l!==c;++l)if(i[l]!==i[l+t]){a.setValue(i,s);break}}saveOriginalState(){const e=this.binding,t=this.buffer,i=this.valueSize,s=i*this._origIndex;e.getValue(t,s);for(let r=i,o=s;r!==o;++r)t[r]=t[s+r%i];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let i=e;i=.5)for(let o=0;o!==r;++o)e[t+o]=e[i+o]}_slerp(e,t,i,s){Qn.slerpFlat(e,t,e,t,e,i,s)}_slerpAdditive(e,t,i,s,r){const o=this._workIndex*r;Qn.multiplyQuaternionsFlat(e,o,e,t,e,i),Qn.slerpFlat(e,t,e,t,e,o,s)}_lerp(e,t,i,s,r){const o=1-s;for(let a=0;a!==r;++a){const l=t+a;e[l]=e[l]*o+e[i+a]*s}}_lerpAdditive(e,t,i,s,r){for(let o=0;o!==r;++o){const a=t+o;e[a]=e[a]+e[i+o]*s}}}const w_="\\[\\]\\.:\\/",iL=new RegExp("["+w_+"]","g"),A_="[^"+w_+"]",sL="[^"+w_.replace("\\.","")+"]",rL=/((?:WC+[\/:])*)/.source.replace("WC",A_),oL=/(WCOD+)?/.source.replace("WCOD",sL),aL=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",A_),lL=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",A_),cL=new RegExp("^"+rL+oL+aL+lL+"$"),uL=["material","materials","bones","map"];class fL{constructor(e,t,i){const s=i||_t.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,s)}getValue(e,t){this.bind();const i=this._targetGroup.nCachedObjects_,s=this._bindings[i];s!==void 0&&s.getValue(e,t)}setValue(e,t){const i=this._bindings;for(let s=this._targetGroup.nCachedObjects_,r=i.length;s!==r;++s)i[s].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].unbind()}}class _t{constructor(e,t,i){this.path=t,this.parsedPath=i||_t.parseTrackName(t),this.node=_t.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,i){return e&&e.isAnimationObjectGroup?new _t.Composite(e,t,i):new _t(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(iL,"")}static parseTrackName(e){const t=cL.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const i={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},s=i.nodeName&&i.nodeName.lastIndexOf(".");if(s!==void 0&&s!==-1){const r=i.nodeName.substring(s+1);uL.indexOf(r)!==-1&&(i.nodeName=i.nodeName.substring(0,s),i.objectName=r)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const i=e.skeleton.getBoneByName(t);if(i!==void 0)return i}if(e.children){const i=function(r){for(let o=0;o=r){const f=r++,h=e[f];t[h.uuid]=u,e[u]=h,t[c]=f,e[f]=l;for(let d=0,p=s;d!==p;++d){const _=i[d],g=_[f],m=_[u];_[u]=g,_[f]=m}}}this.nCachedObjects_=r}uncache(){const e=this._objects,t=this._indicesByUUID,i=this._bindings,s=i.length;let r=this.nCachedObjects_,o=e.length;for(let a=0,l=arguments.length;a!==l;++a){const c=arguments[a],u=c.uuid,f=t[u];if(f!==void 0)if(delete t[u],f0&&(t[d.uuid]=f),e[f]=d,e.pop();for(let p=0,_=s;p!==_;++p){const g=i[p];g[f]=g[h],g.pop()}}}this.nCachedObjects_=r}subscribe_(e,t){const i=this._bindingsIndicesByPath;let s=i[e];const r=this._bindings;if(s!==void 0)return r[s];const o=this._paths,a=this._parsedPaths,l=this._objects,c=l.length,u=this.nCachedObjects_,f=new Array(c);s=r.length,i[e]=s,o.push(e),a.push(t),r.push(f);for(let h=u,d=l.length;h!==d;++h){const p=l[h];f[h]=new _t(p,e,t)}return f}unsubscribe_(e){const t=this._bindingsIndicesByPath,i=t[e];if(i!==void 0){const s=this._paths,r=this._parsedPaths,o=this._bindings,a=o.length-1,l=o[a],c=e[a];t[c]=i,o[i]=l,o.pop(),r[i]=r[a],r.pop(),s[i]=s[a],s.pop()}}}class aT{constructor(e,t,i=null,s=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=i,this.blendMode=s;const r=t.tracks,o=r.length,a=new Array(o),l={endingStart:uo,endingEnd:uo};for(let c=0;c!==o;++c){const u=r[c].createInterpolant(null);a[c]=u,u.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=q1,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,i=!1){if(e.fadeOut(t),this.fadeIn(t),i===!0){const s=this._clip.duration,r=e._clip.duration,o=r/s,a=s/r;e.warp(1,o,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,i=!1){return e.crossFadeFrom(this,t,i)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,i){const s=this._mixer,r=s.time,o=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=s._lendControlInterpolant(),this._timeScaleInterpolant=a);const l=a.parameterPositions,c=a.sampleValues;return l[0]=r,l[1]=r+i,c[0]=e/o,c[1]=t/o,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,i,s){if(!this.enabled){this._updateWeight(e);return}const r=this._startTime;if(r!==null){const l=(e-r)*i;l<0||i===0?t=0:(this._startTime=null,t=i*l)}t*=this._updateTimeScale(e);const o=this._updateTime(t),a=this._updateWeight(e);if(a>0){const l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case e_:for(let u=0,f=l.length;u!==f;++u)l[u].evaluate(o),c[u].accumulateAdditive(a);break;case dd:default:for(let u=0,f=l.length;u!==f;++u)l[u].evaluate(o),c[u].accumulate(s,a)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const i=this._weightInterpolant;if(i!==null){const s=i.evaluate(e)[0];t*=s,e>i.parameterPositions[1]&&(this.stopFading(),s===0&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const i=this._timeScaleInterpolant;if(i!==null){const s=i.evaluate(e)[0];t*=s,e>i.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,i=this.loop;let s=this.time+e,r=this._loopCount;const o=i===Y1;if(e===0)return r===-1?s:o&&(r&1)===1?t-s:s;if(i===$1){r===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(s>=t)s=t;else if(s<0)s=0;else{this.time=s;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=s,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(r===-1&&(e>=0?(r=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),s>=t||s<0){const a=Math.floor(s/t);s-=t*a,r+=Math.abs(a);const l=this.repetitions-r;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,s=e>0?t:0,this.time=s,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){const c=e<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=r,this.time=s,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=s;if(o&&(r&1)===1)return t-s}return s}_setEndings(e,t,i){const s=this._interpolantSettings;i?(s.endingStart=fo,s.endingEnd=fo):(e?s.endingStart=this.zeroSlopeAtStart?fo:uo:s.endingStart=cc,t?s.endingEnd=this.zeroSlopeAtEnd?fo:uo:s.endingEnd=cc)}_scheduleFading(e,t,i){const s=this._mixer,r=s.time;let o=this._weightInterpolant;o===null&&(o=s._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,l=o.sampleValues;return a[0]=r,l[0]=t,a[1]=r+e,l[1]=i,this}}const dL=new Float32Array(1);class pL extends as{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const i=e._localRoot||this._root,s=e._clip.tracks,r=s.length,o=e._propertyBindings,a=e._interpolants,l=i.uuid,c=this._bindingsByRootAndName;let u=c[l];u===void 0&&(u={},c[l]=u);for(let f=0;f!==r;++f){const h=s[f],d=h.name;let p=u[d];if(p!==void 0)++p.referenceCount,o[f]=p;else{if(p=o[f],p!==void 0){p._cacheIndex===null&&(++p.referenceCount,this._addInactiveBinding(p,l,d));continue}const _=t&&t._propertyBindings[f].binding.parsedPath;p=new oT(_t.create(i,d,_),h.ValueTypeName,h.getValueSize()),++p.referenceCount,this._addInactiveBinding(p,l,d),o[f]=p}a[f].resultBuffer=p.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const i=(e._localRoot||this._root).uuid,s=e._clip.uuid,r=this._actionsByClip[s];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,s,i)}const t=e._propertyBindings;for(let i=0,s=t.length;i!==s;++i){const r=t[i];r.useCount++===0&&(this._lendBinding(r),r.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let i=0,s=t.length;i!==s;++i){const r=t[i];--r.useCount===0&&(r.restoreOriginalState(),this._takeBackBinding(r))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return t!==null&&t=0;--i)e[i].stop();return this}update(e){e*=this.timeScale;const t=this._actions,i=this._nActiveActions,s=this.time+=e,r=Math.sign(e),o=this._accuIndex^=1;for(let c=0;c!==i;++c)t[c]._update(s,e,r,o);const a=this._bindings,l=this._nActiveBindings;for(let c=0;c!==l;++c)a[c].apply(o);return this}setTime(e){this.time=0;for(let t=0;t=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,hb).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const db=new k,qu=new k;class SL{constructor(e=new k,t=new k){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){db.subVectors(e,this.start),qu.subVectors(this.end,this.start);const i=qu.dot(qu);let r=qu.dot(db)/i;return t&&(r=st(r,0,1)),r}closestPointToPoint(e,t,i){const s=this.closestPointToPointParameter(e,t);return this.delta(i).multiplyScalar(s).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const pb=new k;class EL extends gt{constructor(e,t){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const i=new ct,s=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let o=0,a=1,l=32;o1)for(let f=0;f.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{yb.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(yb,t)}}setLength(e,t=e*.2,i=t*.2){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(i,t,i),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class FL extends ls{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],i=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],s=new ct;s.setAttribute("position",new ke(t,3)),s.setAttribute("color",new ke(i,3));const r=new Wn({vertexColors:!0,toneMapped:!1});super(s,r),this.type="AxesHelper"}setColors(e,t,i){const s=new Pe,r=this.geometry.attributes.color.array;return s.set(e),s.toArray(r,0),s.toArray(r,3),s.set(t),s.toArray(r,6),s.toArray(r,9),s.set(i),s.toArray(r,12),s.toArray(r,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class kL{constructor(){this.type="ShapePath",this.color=new Pe,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new Ch,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,i,s){return this.currentPath.quadraticCurveTo(e,t,i,s),this}bezierCurveTo(e,t,i,s,r,o){return this.currentPath.bezierCurveTo(e,t,i,s,r,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(m){const v=[];for(let b=0,y=m.length;bNumber.EPSILON){if(E<0&&(S=v[w],M=-M,P=v[T],E=-E),m.yP.y)continue;if(m.y===S.y){if(m.x===S.x)return!0}else{const D=E*(m.x-S.x)-M*(m.y-S.y);if(D===0)return!0;if(D<0)continue;y=!y}}else{if(m.y!==S.y)continue;if(P.x<=m.x&&m.x<=S.x||S.x<=m.x&&m.x<=P.x)return!0}}return y}const s=Li.isClockWise,r=this.subPaths;if(r.length===0)return[];let o,a,l;const c=[];if(r.length===1)return a=r[0],l=new yo,l.curves=a.curves,c.push(l),c;let u=!s(r[0].getPoints());u=e?!u:u;const f=[],h=[];let d=[],p=0,_;h[p]=void 0,d[p]=[];for(let m=0,v=r.length;m1){let m=!1,v=0;for(let b=0,y=h.length;b0&&m===!1&&(d=f)}let g;for(let m=0,v=h.length;me?(n.repeat.x=1,n.repeat.y=t/e,n.offset.x=0,n.offset.y=(1-n.repeat.y)/2):(n.repeat.x=e/t,n.repeat.y=1,n.offset.x=(1-n.repeat.x)/2,n.offset.y=0),n}function VL(n,e){const t=n.image&&n.image.width?n.image.width/n.image.height:1;return t>e?(n.repeat.x=e/t,n.repeat.y=1,n.offset.x=(1-n.repeat.x)/2,n.offset.y=0):(n.repeat.x=1,n.repeat.y=t/e,n.offset.x=0,n.offset.y=(1-n.repeat.y)/2),n}function HL(n){return n.repeat.x=1,n.repeat.y=1,n.offset.x=0,n.offset.y=0,n}function wg(n,e,t,i){const s=GL(i);switch(t){case K0:return n*e;case ud:return n*e/s.components*s.byteLength;case kc:return n*e/s.components*s.byteLength;case J0:return n*e*2/s.components*s.byteLength;case fd:return n*e*2/s.components*s.byteLength;case Z0:return n*e*3/s.components*s.byteLength;case zn:return n*e*4/s.components*s.byteLength;case hd:return n*e*4/s.components*s.byteLength;case Al:case Cl:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*8;case Rl:case Pl:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;case Qf:case th:return Math.max(n,16)*Math.max(e,8)/4;case Jf:case eh:return Math.max(n,8)*Math.max(e,8)/2;case nh:case ih:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*8;case sh:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;case rh:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;case oh:return Math.floor((n+4)/5)*Math.floor((e+3)/4)*16;case ah:return Math.floor((n+4)/5)*Math.floor((e+4)/5)*16;case lh:return Math.floor((n+5)/6)*Math.floor((e+4)/5)*16;case ch:return Math.floor((n+5)/6)*Math.floor((e+5)/6)*16;case uh:return Math.floor((n+7)/8)*Math.floor((e+4)/5)*16;case fh:return Math.floor((n+7)/8)*Math.floor((e+5)/6)*16;case hh:return Math.floor((n+7)/8)*Math.floor((e+7)/8)*16;case dh:return Math.floor((n+9)/10)*Math.floor((e+4)/5)*16;case ph:return Math.floor((n+9)/10)*Math.floor((e+5)/6)*16;case mh:return Math.floor((n+9)/10)*Math.floor((e+7)/8)*16;case gh:return Math.floor((n+9)/10)*Math.floor((e+9)/10)*16;case _h:return Math.floor((n+11)/12)*Math.floor((e+9)/10)*16;case vh:return Math.floor((n+11)/12)*Math.floor((e+11)/12)*16;case Il:case yh:case bh:return Math.ceil(n/4)*Math.ceil(e/4)*16;case Q0:case xh:return Math.ceil(n/4)*Math.ceil(e/4)*8;case Mh:case Sh:return Math.ceil(n/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${t} format.`)}function GL(n){switch(n){case Bi:case q0:return{byteLength:1,components:1};case Ea:case Y0:case za:return{byteLength:2,components:1};case ld:case cd:return{byteLength:2,components:4};case Vs:case ad:case Zn:return{byteLength:4,components:1};case j0:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${n}.`)}class WL{static contain(e,t){return zL(e,t)}static cover(e,t){return VL(e,t)}static fill(e){return HL(e)}static getByteLength(e,t,i,s){return wg(e,t,i,s)}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Uc}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Uc);/** * @license * Copyright 2010-2025 Three.js Authors * SPDX-License-Identifier: MIT @@ -3588,7 +3588,7 @@ void main() { #include #include #include -}`,ft={alphahash_fragment:$L,alphahash_pars_fragment:qL,alphamap_fragment:YL,alphamap_pars_fragment:jL,alphatest_fragment:KL,alphatest_pars_fragment:ZL,aomap_fragment:JL,aomap_pars_fragment:QL,batching_pars_vertex:eD,batching_vertex:tD,begin_vertex:nD,beginnormal_vertex:iD,bsdfs:sD,iridescence_fragment:rD,bumpmap_pars_fragment:oD,clipping_planes_fragment:aD,clipping_planes_pars_fragment:lD,clipping_planes_pars_vertex:cD,clipping_planes_vertex:uD,color_fragment:fD,color_pars_fragment:hD,color_pars_vertex:dD,color_vertex:pD,common:mD,cube_uv_reflection_fragment:gD,defaultnormal_vertex:_D,displacementmap_pars_vertex:vD,displacementmap_vertex:yD,emissivemap_fragment:bD,emissivemap_pars_fragment:xD,colorspace_fragment:MD,colorspace_pars_fragment:SD,envmap_fragment:ED,envmap_common_pars_fragment:TD,envmap_pars_fragment:wD,envmap_pars_vertex:AD,envmap_physical_pars_fragment:kD,envmap_vertex:CD,fog_vertex:RD,fog_pars_vertex:PD,fog_fragment:ID,fog_pars_fragment:LD,gradientmap_pars_fragment:DD,lightmap_pars_fragment:OD,lights_lambert_fragment:ND,lights_lambert_pars_fragment:UD,lights_pars_begin:FD,lights_toon_fragment:BD,lights_toon_pars_fragment:zD,lights_phong_fragment:VD,lights_phong_pars_fragment:HD,lights_physical_fragment:GD,lights_physical_pars_fragment:WD,lights_fragment_begin:XD,lights_fragment_maps:$D,lights_fragment_end:qD,logdepthbuf_fragment:YD,logdepthbuf_pars_fragment:jD,logdepthbuf_pars_vertex:KD,logdepthbuf_vertex:ZD,map_fragment:JD,map_pars_fragment:QD,map_particle_fragment:eO,map_particle_pars_fragment:tO,metalnessmap_fragment:nO,metalnessmap_pars_fragment:iO,morphinstance_vertex:sO,morphcolor_vertex:rO,morphnormal_vertex:oO,morphtarget_pars_vertex:aO,morphtarget_vertex:lO,normal_fragment_begin:cO,normal_fragment_maps:uO,normal_pars_fragment:fO,normal_pars_vertex:hO,normal_vertex:dO,normalmap_pars_fragment:pO,clearcoat_normal_fragment_begin:mO,clearcoat_normal_fragment_maps:gO,clearcoat_pars_fragment:_O,iridescence_pars_fragment:vO,opaque_fragment:yO,packing:bO,premultiplied_alpha_fragment:xO,project_vertex:MO,dithering_fragment:SO,dithering_pars_fragment:EO,roughnessmap_fragment:TO,roughnessmap_pars_fragment:wO,shadowmap_pars_fragment:AO,shadowmap_pars_vertex:CO,shadowmap_vertex:RO,shadowmask_pars_fragment:PO,skinbase_vertex:IO,skinning_pars_vertex:LO,skinning_vertex:DO,skinnormal_vertex:OO,specularmap_fragment:NO,specularmap_pars_fragment:UO,tonemapping_fragment:FO,tonemapping_pars_fragment:kO,transmission_fragment:BO,transmission_pars_fragment:zO,uv_pars_fragment:VO,uv_pars_vertex:HO,uv_vertex:GO,worldpos_vertex:WO,background_vert:XO,background_frag:$O,backgroundCube_vert:qO,backgroundCube_frag:YO,cube_vert:jO,cube_frag:KO,depth_vert:ZO,depth_frag:JO,distanceRGBA_vert:QO,distanceRGBA_frag:eN,equirect_vert:tN,equirect_frag:nN,linedashed_vert:iN,linedashed_frag:sN,meshbasic_vert:rN,meshbasic_frag:oN,meshlambert_vert:aN,meshlambert_frag:lN,meshmatcap_vert:cN,meshmatcap_frag:uN,meshnormal_vert:fN,meshnormal_frag:hN,meshphong_vert:dN,meshphong_frag:pN,meshphysical_vert:mN,meshphysical_frag:gN,meshtoon_vert:_N,meshtoon_frag:vN,points_vert:yN,points_frag:bN,shadow_vert:xN,shadow_frag:MN,sprite_vert:SN,sprite_frag:EN},Ae={common:{diffuse:{value:new Pe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new at},alphaMap:{value:null},alphaMapTransform:{value:new at},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new at}},envmap:{envMap:{value:null},envMapRotation:{value:new at},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new at}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new at}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new at},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new at},normalScale:{value:new fe(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new at},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new at}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new at}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new at}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Pe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Pe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new at},alphaTest:{value:0},uvTransform:{value:new at}},sprite:{diffuse:{value:new Pe(16777215)},opacity:{value:1},center:{value:new fe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new at},alphaMap:{value:null},alphaMapTransform:{value:new at},alphaTest:{value:0}}},Pi={basic:{uniforms:On([Ae.common,Ae.specularmap,Ae.envmap,Ae.aomap,Ae.lightmap,Ae.fog]),vertexShader:ft.meshbasic_vert,fragmentShader:ft.meshbasic_frag},lambert:{uniforms:On([Ae.common,Ae.specularmap,Ae.envmap,Ae.aomap,Ae.lightmap,Ae.emissivemap,Ae.bumpmap,Ae.normalmap,Ae.displacementmap,Ae.fog,Ae.lights,{emissive:{value:new Pe(0)}}]),vertexShader:ft.meshlambert_vert,fragmentShader:ft.meshlambert_frag},phong:{uniforms:On([Ae.common,Ae.specularmap,Ae.envmap,Ae.aomap,Ae.lightmap,Ae.emissivemap,Ae.bumpmap,Ae.normalmap,Ae.displacementmap,Ae.fog,Ae.lights,{emissive:{value:new Pe(0)},specular:{value:new Pe(1118481)},shininess:{value:30}}]),vertexShader:ft.meshphong_vert,fragmentShader:ft.meshphong_frag},standard:{uniforms:On([Ae.common,Ae.envmap,Ae.aomap,Ae.lightmap,Ae.emissivemap,Ae.bumpmap,Ae.normalmap,Ae.displacementmap,Ae.roughnessmap,Ae.metalnessmap,Ae.fog,Ae.lights,{emissive:{value:new Pe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:ft.meshphysical_vert,fragmentShader:ft.meshphysical_frag},toon:{uniforms:On([Ae.common,Ae.aomap,Ae.lightmap,Ae.emissivemap,Ae.bumpmap,Ae.normalmap,Ae.displacementmap,Ae.gradientmap,Ae.fog,Ae.lights,{emissive:{value:new Pe(0)}}]),vertexShader:ft.meshtoon_vert,fragmentShader:ft.meshtoon_frag},matcap:{uniforms:On([Ae.common,Ae.bumpmap,Ae.normalmap,Ae.displacementmap,Ae.fog,{matcap:{value:null}}]),vertexShader:ft.meshmatcap_vert,fragmentShader:ft.meshmatcap_frag},points:{uniforms:On([Ae.points,Ae.fog]),vertexShader:ft.points_vert,fragmentShader:ft.points_frag},dashed:{uniforms:On([Ae.common,Ae.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:ft.linedashed_vert,fragmentShader:ft.linedashed_frag},depth:{uniforms:On([Ae.common,Ae.displacementmap]),vertexShader:ft.depth_vert,fragmentShader:ft.depth_frag},normal:{uniforms:On([Ae.common,Ae.bumpmap,Ae.normalmap,Ae.displacementmap,{opacity:{value:1}}]),vertexShader:ft.meshnormal_vert,fragmentShader:ft.meshnormal_frag},sprite:{uniforms:On([Ae.sprite,Ae.fog]),vertexShader:ft.sprite_vert,fragmentShader:ft.sprite_frag},background:{uniforms:{uvTransform:{value:new at},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:ft.background_vert,fragmentShader:ft.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new at}},vertexShader:ft.backgroundCube_vert,fragmentShader:ft.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:ft.cube_vert,fragmentShader:ft.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:ft.equirect_vert,fragmentShader:ft.equirect_frag},distanceRGBA:{uniforms:On([Ae.common,Ae.displacementmap,{referencePosition:{value:new k},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:ft.distanceRGBA_vert,fragmentShader:ft.distanceRGBA_frag},shadow:{uniforms:On([Ae.lights,Ae.fog,{color:{value:new Pe(0)},opacity:{value:1}}]),vertexShader:ft.shadow_vert,fragmentShader:ft.shadow_frag}};Pi.physical={uniforms:On([Pi.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new at},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new at},clearcoatNormalScale:{value:new fe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new at},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new at},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new at},sheen:{value:0},sheenColor:{value:new Pe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new at},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new at},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new at},transmissionSamplerSize:{value:new fe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new at},attenuationDistance:{value:0},attenuationColor:{value:new Pe(0)},specularColor:{value:new Pe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new at},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new at},anisotropyVector:{value:new fe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new at}}]),vertexShader:ft.meshphysical_vert,fragmentShader:ft.meshphysical_frag};const Qu={r:0,b:0,g:0},Qr=new li,TN=new Je;function wN(n,e,t,i,s,r,o){const a=new Pe(0);let l=r===!0?0:1,c,u,f=null,h=0,d=null;function p(b){let y=b.isScene===!0?b.background:null;return y&&y.isTexture&&(y=(b.backgroundBlurriness>0?t:e).get(y)),y}function _(b){let y=!1;const T=p(b);T===null?m(a,l):T&&T.isColor&&(m(T,1),y=!0);const w=n.xr.getEnvironmentBlendMode();w==="additive"?i.buffers.color.setClear(0,0,0,1,o):w==="alpha-blend"&&i.buffers.color.setClear(0,0,0,0,o),(n.autoClear||y)&&(i.buffers.depth.setTest(!0),i.buffers.depth.setMask(!0),i.buffers.color.setMask(!0),n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil))}function g(b,y){const T=p(y);T&&(T.isCubeTexture||T.mapping===Ba)?(u===void 0&&(u=new jt(new Ro(1,1,1),new zi({name:"BackgroundCubeMaterial",uniforms:Ra(Pi.backgroundCube.uniforms),vertexShader:Pi.backgroundCube.vertexShader,fragmentShader:Pi.backgroundCube.fragmentShader,side:Vn,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(w,S,P){this.matrixWorld.copyPosition(P.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),s.update(u)),Qr.copy(y.backgroundRotation),Qr.x*=-1,Qr.y*=-1,Qr.z*=-1,T.isCubeTexture&&T.isRenderTargetTexture===!1&&(Qr.y*=-1,Qr.z*=-1),u.material.uniforms.envMap.value=T,u.material.uniforms.flipEnvMap.value=T.isCubeTexture&&T.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=y.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=y.backgroundIntensity,u.material.uniforms.backgroundRotation.value.setFromMatrix4(TN.makeRotationFromEuler(Qr)),u.material.toneMapped=pt.getTransfer(T.colorSpace)!==Ct,(f!==T||h!==T.version||d!==n.toneMapping)&&(u.material.needsUpdate=!0,f=T,h=T.version,d=n.toneMapping),u.layers.enableAll(),b.unshift(u,u.geometry,u.material,0,0,null)):T&&T.isTexture&&(c===void 0&&(c=new jt(new Ga(2,2),new zi({name:"BackgroundMaterial",uniforms:Ra(Pi.background.uniforms),vertexShader:Pi.background.vertexShader,fragmentShader:Pi.background.fragmentShader,side:Bs,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),s.update(c)),c.material.uniforms.t2D.value=T,c.material.uniforms.backgroundIntensity.value=y.backgroundIntensity,c.material.toneMapped=pt.getTransfer(T.colorSpace)!==Ct,T.matrixAutoUpdate===!0&&T.updateMatrix(),c.material.uniforms.uvTransform.value.copy(T.matrix),(f!==T||h!==T.version||d!==n.toneMapping)&&(c.material.needsUpdate=!0,f=T,h=T.version,d=n.toneMapping),c.layers.enableAll(),b.unshift(c,c.geometry,c.material,0,0,null))}function m(b,y){b.getRGB(Qu,cE(n)),i.buffers.color.setClear(Qu.r,Qu.g,Qu.b,y,o)}function v(){u!==void 0&&(u.geometry.dispose(),u.material.dispose(),u=void 0),c!==void 0&&(c.geometry.dispose(),c.material.dispose(),c=void 0)}return{getClearColor:function(){return a},setClearColor:function(b,y=1){a.set(b),l=y,m(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(b){l=b,m(a,l)},render:_,addToRenderList:g,dispose:v}}function AN(n,e){const t=n.getParameter(n.MAX_VERTEX_ATTRIBS),i={},s=h(null);let r=s,o=!1;function a(E,D,B,z,V){let Q=!1;const j=f(z,B,D);r!==j&&(r=j,c(r.object)),Q=d(E,z,B,V),Q&&p(E,z,B,V),V!==null&&e.update(V,n.ELEMENT_ARRAY_BUFFER),(Q||o)&&(o=!1,y(E,D,B,z),V!==null&&n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,e.get(V).buffer))}function l(){return n.createVertexArray()}function c(E){return n.bindVertexArray(E)}function u(E){return n.deleteVertexArray(E)}function f(E,D,B){const z=B.wireframe===!0;let V=i[E.id];V===void 0&&(V={},i[E.id]=V);let Q=V[D.id];Q===void 0&&(Q={},V[D.id]=Q);let j=Q[z];return j===void 0&&(j=h(l()),Q[z]=j),j}function h(E){const D=[],B=[],z=[];for(let V=0;V=0){const Me=V[Z];let re=Q[Z];if(re===void 0&&(Z==="instanceMatrix"&&E.instanceMatrix&&(re=E.instanceMatrix),Z==="instanceColor"&&E.instanceColor&&(re=E.instanceColor)),Me===void 0||Me.attribute!==re||re&&Me.data!==re.data)return!0;j++}return r.attributesNum!==j||r.index!==z}function p(E,D,B,z){const V={},Q=D.attributes;let j=0;const te=B.getAttributes();for(const Z in te)if(te[Z].location>=0){let Me=Q[Z];Me===void 0&&(Z==="instanceMatrix"&&E.instanceMatrix&&(Me=E.instanceMatrix),Z==="instanceColor"&&E.instanceColor&&(Me=E.instanceColor));const re={};re.attribute=Me,Me&&Me.data&&(re.data=Me.data),V[Z]=re,j++}r.attributes=V,r.attributesNum=j,r.index=z}function _(){const E=r.newAttributes;for(let D=0,B=E.length;D=0){let pe=V[te];if(pe===void 0&&(te==="instanceMatrix"&&E.instanceMatrix&&(pe=E.instanceMatrix),te==="instanceColor"&&E.instanceColor&&(pe=E.instanceColor)),pe!==void 0){const Me=pe.normalized,re=pe.itemSize,xe=e.get(pe);if(xe===void 0)continue;const We=xe.buffer,oe=xe.type,ge=xe.bytesPerElement,Se=oe===n.INT||oe===n.UNSIGNED_INT||pe.gpuType===ad;if(pe.isInterleavedBufferAttribute){const $=pe.data,ae=$.stride,le=pe.offset;if($.isInstancedInterleavedBuffer){for(let ue=0;ue0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision>0)return"highp";S="mediump"}return S==="mediump"&&n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=t.precision!==void 0?t.precision:"highp";const u=l(c);u!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",u,"instead."),c=u);const f=t.logarithmicDepthBuffer===!0,h=t.reverseDepthBuffer===!0&&e.has("EXT_clip_control"),d=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),p=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS),_=n.getParameter(n.MAX_TEXTURE_SIZE),g=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),m=n.getParameter(n.MAX_VERTEX_ATTRIBS),v=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),b=n.getParameter(n.MAX_VARYING_VECTORS),y=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),T=p>0,w=n.getParameter(n.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:r,getMaxPrecision:l,textureFormatReadable:o,textureTypeReadable:a,precision:c,logarithmicDepthBuffer:f,reverseDepthBuffer:h,maxTextures:d,maxVertexTextures:p,maxTextureSize:_,maxCubemapSize:g,maxAttributes:m,maxVertexUniforms:v,maxVaryings:b,maxFragmentUniforms:y,vertexTextures:T,maxSamples:w}}function PN(n){const e=this;let t=null,i=0,s=!1,r=!1;const o=new ur,a=new at,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(f,h){const d=f.length!==0||h||i!==0||s;return s=h,i=f.length,d},this.beginShadows=function(){r=!0,u(null)},this.endShadows=function(){r=!1},this.setGlobalState=function(f,h){t=u(f,h,0)},this.setState=function(f,h,d){const p=f.clippingPlanes,_=f.clipIntersection,g=f.clipShadows,m=n.get(f);if(!s||p===null||p.length===0||r&&!g)r?u(null):c();else{const v=r?0:i,b=v*4;let y=m.clippingState||null;l.value=y,y=u(p,h,b,d);for(let T=0;T!==b;++T)y[T]=t[T];m.clippingState=y,this.numIntersection=_?this.numPlanes:0,this.numPlanes+=v}};function c(){l.value!==t&&(l.value=t,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function u(f,h,d,p){const _=f!==null?f.length:0;let g=null;if(_!==0){if(g=l.value,p!==!0||g===null){const m=d+_*4,v=h.matrixWorldInverse;a.getNormalMatrix(v),(g===null||g.length0){const c=new hE(l.height);return c.fromEquirectangularTexture(n,o),e.set(o,c),o.addEventListener("dispose",s),t(c.texture,o.mapping)}else return null}}return o}function s(o){const a=o.target;a.removeEventListener("dispose",s);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function r(){e=new WeakMap}return{get:i,dispose:r}}const ua=4,yb=[.125,.215,.35,.446,.526,.582],lo=20,sm=new Ud,bb=new Pe;let rm=null,om=0,am=0,lm=!1;const ro=(1+Math.sqrt(5))/2,ta=1/ro,xb=[new k(-ro,ta,0),new k(ro,ta,0),new k(-ta,0,ro),new k(ta,0,ro),new k(0,ro,-ta),new k(0,ro,ta),new k(-1,1,-1),new k(1,1,-1),new k(-1,1,1),new k(1,1,1)],LN=new k;class wg{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,s=100,r={}){const{size:o=256,position:a=LN}=r;rm=this._renderer.getRenderTarget(),om=this._renderer.getActiveCubeFace(),am=this._renderer.getActiveMipmapLevel(),lm=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(o);const l=this._allocateTargets();return l.depthBuffer=!0,this._sceneToCubeUV(e,i,s,l,a),t>0&&this._blur(l,0,0,t),this._applyPMREM(l),this._cleanup(l),l}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=Eb(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=Sb(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?y:0,y,y),f.setRenderTarget(s),g&&f.render(_,l),f.render(e,l)}_.geometry.dispose(),_.material.dispose(),f.toneMapping=d,f.autoClear=h,e.background=m}_textureToCubeUV(e,t){const i=this._renderer,s=e.mapping===zs||e.mapping===Mr;s?(this._cubemapMaterial===null&&(this._cubemapMaterial=Eb()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=Sb());const r=s?this._cubemapMaterial:this._equirectMaterial,o=new jt(this._lodPlanes[0],r),a=r.uniforms;a.envMap.value=e;const l=this._cubeSize;ef(t,0,0,3*l,2*l),i.setRenderTarget(t),i.render(o,sm)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;const s=this._lodPlanes.length;for(let r=1;rlo&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${g} samples when the maximum is set to ${lo}`);const m=[];let v=0;for(let S=0;Sb-ua?s-b+ua:0),w=4*(this._cubeSize-y);ef(t,T,w,3*y,2*y),l.setRenderTarget(t),l.render(f,sm)}}function DN(n){const e=[],t=[],i=[];let s=n;const r=n-ua+1+yb.length;for(let o=0;on-ua?l=yb[o-n+ua-1]:o===0&&(l=0),i.push(l);const c=1/(a-2),u=-c,f=1+c,h=[u,u,f,u,f,f,u,u,f,f,u,f],d=6,p=6,_=3,g=2,m=1,v=new Float32Array(_*p*d),b=new Float32Array(g*p*d),y=new Float32Array(m*p*d);for(let w=0;w2?0:-1,M=[S,P,0,S+2/3,P,0,S+2/3,P+1,0,S,P,0,S+2/3,P+1,0,S,P+1,0];v.set(M,_*p*w),b.set(h,g*p*w);const E=[w,w,w,w,w,w];y.set(E,m*p*w)}const T=new ct;T.setAttribute("position",new Pt(v,_)),T.setAttribute("uv",new Pt(b,g)),T.setAttribute("faceIndex",new Pt(y,m)),e.push(T),s>ua&&s--}return{lodPlanes:e,sizeLods:t,sigmas:i}}function Mb(n,e,t){const i=new os(n,e,t);return i.texture.mapping=Ba,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function ef(n,e,t,i,s){n.viewport.set(e,t,i,s),n.scissor.set(e,t,i,s)}function ON(n,e,t){const i=new Float32Array(lo),s=new k(0,1,0);return new zi({name:"SphericalGaussianBlur",defines:{n:lo,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${n}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:s}},vertexShader:R_(),fragmentShader:` +}`,ft={alphahash_fragment:$L,alphahash_pars_fragment:qL,alphamap_fragment:YL,alphamap_pars_fragment:jL,alphatest_fragment:KL,alphatest_pars_fragment:ZL,aomap_fragment:JL,aomap_pars_fragment:QL,batching_pars_vertex:eD,batching_vertex:tD,begin_vertex:nD,beginnormal_vertex:iD,bsdfs:sD,iridescence_fragment:rD,bumpmap_pars_fragment:oD,clipping_planes_fragment:aD,clipping_planes_pars_fragment:lD,clipping_planes_pars_vertex:cD,clipping_planes_vertex:uD,color_fragment:fD,color_pars_fragment:hD,color_pars_vertex:dD,color_vertex:pD,common:mD,cube_uv_reflection_fragment:gD,defaultnormal_vertex:_D,displacementmap_pars_vertex:vD,displacementmap_vertex:yD,emissivemap_fragment:bD,emissivemap_pars_fragment:xD,colorspace_fragment:MD,colorspace_pars_fragment:SD,envmap_fragment:ED,envmap_common_pars_fragment:TD,envmap_pars_fragment:wD,envmap_pars_vertex:AD,envmap_physical_pars_fragment:kD,envmap_vertex:CD,fog_vertex:RD,fog_pars_vertex:PD,fog_fragment:ID,fog_pars_fragment:LD,gradientmap_pars_fragment:DD,lightmap_pars_fragment:OD,lights_lambert_fragment:ND,lights_lambert_pars_fragment:UD,lights_pars_begin:FD,lights_toon_fragment:BD,lights_toon_pars_fragment:zD,lights_phong_fragment:VD,lights_phong_pars_fragment:HD,lights_physical_fragment:GD,lights_physical_pars_fragment:WD,lights_fragment_begin:XD,lights_fragment_maps:$D,lights_fragment_end:qD,logdepthbuf_fragment:YD,logdepthbuf_pars_fragment:jD,logdepthbuf_pars_vertex:KD,logdepthbuf_vertex:ZD,map_fragment:JD,map_pars_fragment:QD,map_particle_fragment:eO,map_particle_pars_fragment:tO,metalnessmap_fragment:nO,metalnessmap_pars_fragment:iO,morphinstance_vertex:sO,morphcolor_vertex:rO,morphnormal_vertex:oO,morphtarget_pars_vertex:aO,morphtarget_vertex:lO,normal_fragment_begin:cO,normal_fragment_maps:uO,normal_pars_fragment:fO,normal_pars_vertex:hO,normal_vertex:dO,normalmap_pars_fragment:pO,clearcoat_normal_fragment_begin:mO,clearcoat_normal_fragment_maps:gO,clearcoat_pars_fragment:_O,iridescence_pars_fragment:vO,opaque_fragment:yO,packing:bO,premultiplied_alpha_fragment:xO,project_vertex:MO,dithering_fragment:SO,dithering_pars_fragment:EO,roughnessmap_fragment:TO,roughnessmap_pars_fragment:wO,shadowmap_pars_fragment:AO,shadowmap_pars_vertex:CO,shadowmap_vertex:RO,shadowmask_pars_fragment:PO,skinbase_vertex:IO,skinning_pars_vertex:LO,skinning_vertex:DO,skinnormal_vertex:OO,specularmap_fragment:NO,specularmap_pars_fragment:UO,tonemapping_fragment:FO,tonemapping_pars_fragment:kO,transmission_fragment:BO,transmission_pars_fragment:zO,uv_pars_fragment:VO,uv_pars_vertex:HO,uv_vertex:GO,worldpos_vertex:WO,background_vert:XO,background_frag:$O,backgroundCube_vert:qO,backgroundCube_frag:YO,cube_vert:jO,cube_frag:KO,depth_vert:ZO,depth_frag:JO,distanceRGBA_vert:QO,distanceRGBA_frag:eN,equirect_vert:tN,equirect_frag:nN,linedashed_vert:iN,linedashed_frag:sN,meshbasic_vert:rN,meshbasic_frag:oN,meshlambert_vert:aN,meshlambert_frag:lN,meshmatcap_vert:cN,meshmatcap_frag:uN,meshnormal_vert:fN,meshnormal_frag:hN,meshphong_vert:dN,meshphong_frag:pN,meshphysical_vert:mN,meshphysical_frag:gN,meshtoon_vert:_N,meshtoon_frag:vN,points_vert:yN,points_frag:bN,shadow_vert:xN,shadow_frag:MN,sprite_vert:SN,sprite_frag:EN},Ae={common:{diffuse:{value:new Pe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new at},alphaMap:{value:null},alphaMapTransform:{value:new at},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new at}},envmap:{envMap:{value:null},envMapRotation:{value:new at},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new at}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new at}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new at},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new at},normalScale:{value:new fe(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new at},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new at}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new at}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new at}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Pe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Pe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new at},alphaTest:{value:0},uvTransform:{value:new at}},sprite:{diffuse:{value:new Pe(16777215)},opacity:{value:1},center:{value:new fe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new at},alphaMap:{value:null},alphaMapTransform:{value:new at},alphaTest:{value:0}}},Pi={basic:{uniforms:On([Ae.common,Ae.specularmap,Ae.envmap,Ae.aomap,Ae.lightmap,Ae.fog]),vertexShader:ft.meshbasic_vert,fragmentShader:ft.meshbasic_frag},lambert:{uniforms:On([Ae.common,Ae.specularmap,Ae.envmap,Ae.aomap,Ae.lightmap,Ae.emissivemap,Ae.bumpmap,Ae.normalmap,Ae.displacementmap,Ae.fog,Ae.lights,{emissive:{value:new Pe(0)}}]),vertexShader:ft.meshlambert_vert,fragmentShader:ft.meshlambert_frag},phong:{uniforms:On([Ae.common,Ae.specularmap,Ae.envmap,Ae.aomap,Ae.lightmap,Ae.emissivemap,Ae.bumpmap,Ae.normalmap,Ae.displacementmap,Ae.fog,Ae.lights,{emissive:{value:new Pe(0)},specular:{value:new Pe(1118481)},shininess:{value:30}}]),vertexShader:ft.meshphong_vert,fragmentShader:ft.meshphong_frag},standard:{uniforms:On([Ae.common,Ae.envmap,Ae.aomap,Ae.lightmap,Ae.emissivemap,Ae.bumpmap,Ae.normalmap,Ae.displacementmap,Ae.roughnessmap,Ae.metalnessmap,Ae.fog,Ae.lights,{emissive:{value:new Pe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:ft.meshphysical_vert,fragmentShader:ft.meshphysical_frag},toon:{uniforms:On([Ae.common,Ae.aomap,Ae.lightmap,Ae.emissivemap,Ae.bumpmap,Ae.normalmap,Ae.displacementmap,Ae.gradientmap,Ae.fog,Ae.lights,{emissive:{value:new Pe(0)}}]),vertexShader:ft.meshtoon_vert,fragmentShader:ft.meshtoon_frag},matcap:{uniforms:On([Ae.common,Ae.bumpmap,Ae.normalmap,Ae.displacementmap,Ae.fog,{matcap:{value:null}}]),vertexShader:ft.meshmatcap_vert,fragmentShader:ft.meshmatcap_frag},points:{uniforms:On([Ae.points,Ae.fog]),vertexShader:ft.points_vert,fragmentShader:ft.points_frag},dashed:{uniforms:On([Ae.common,Ae.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:ft.linedashed_vert,fragmentShader:ft.linedashed_frag},depth:{uniforms:On([Ae.common,Ae.displacementmap]),vertexShader:ft.depth_vert,fragmentShader:ft.depth_frag},normal:{uniforms:On([Ae.common,Ae.bumpmap,Ae.normalmap,Ae.displacementmap,{opacity:{value:1}}]),vertexShader:ft.meshnormal_vert,fragmentShader:ft.meshnormal_frag},sprite:{uniforms:On([Ae.sprite,Ae.fog]),vertexShader:ft.sprite_vert,fragmentShader:ft.sprite_frag},background:{uniforms:{uvTransform:{value:new at},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:ft.background_vert,fragmentShader:ft.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new at}},vertexShader:ft.backgroundCube_vert,fragmentShader:ft.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:ft.cube_vert,fragmentShader:ft.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:ft.equirect_vert,fragmentShader:ft.equirect_frag},distanceRGBA:{uniforms:On([Ae.common,Ae.displacementmap,{referencePosition:{value:new k},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:ft.distanceRGBA_vert,fragmentShader:ft.distanceRGBA_frag},shadow:{uniforms:On([Ae.lights,Ae.fog,{color:{value:new Pe(0)},opacity:{value:1}}]),vertexShader:ft.shadow_vert,fragmentShader:ft.shadow_frag}};Pi.physical={uniforms:On([Pi.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new at},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new at},clearcoatNormalScale:{value:new fe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new at},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new at},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new at},sheen:{value:0},sheenColor:{value:new Pe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new at},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new at},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new at},transmissionSamplerSize:{value:new fe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new at},attenuationDistance:{value:0},attenuationColor:{value:new Pe(0)},specularColor:{value:new Pe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new at},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new at},anisotropyVector:{value:new fe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new at}}]),vertexShader:ft.meshphysical_vert,fragmentShader:ft.meshphysical_frag};const Qu={r:0,b:0,g:0},Qr=new li,TN=new Je;function wN(n,e,t,i,s,r,o){const a=new Pe(0);let l=r===!0?0:1,c,u,f=null,h=0,d=null;function p(b){let y=b.isScene===!0?b.background:null;return y&&y.isTexture&&(y=(b.backgroundBlurriness>0?t:e).get(y)),y}function _(b){let y=!1;const T=p(b);T===null?m(a,l):T&&T.isColor&&(m(T,1),y=!0);const w=n.xr.getEnvironmentBlendMode();w==="additive"?i.buffers.color.setClear(0,0,0,1,o):w==="alpha-blend"&&i.buffers.color.setClear(0,0,0,0,o),(n.autoClear||y)&&(i.buffers.depth.setTest(!0),i.buffers.depth.setMask(!0),i.buffers.color.setMask(!0),n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil))}function g(b,y){const T=p(y);T&&(T.isCubeTexture||T.mapping===Ba)?(u===void 0&&(u=new jt(new Ro(1,1,1),new zi({name:"BackgroundCubeMaterial",uniforms:Ra(Pi.backgroundCube.uniforms),vertexShader:Pi.backgroundCube.vertexShader,fragmentShader:Pi.backgroundCube.fragmentShader,side:Vn,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(w,S,P){this.matrixWorld.copyPosition(P.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),s.update(u)),Qr.copy(y.backgroundRotation),Qr.x*=-1,Qr.y*=-1,Qr.z*=-1,T.isCubeTexture&&T.isRenderTargetTexture===!1&&(Qr.y*=-1,Qr.z*=-1),u.material.uniforms.envMap.value=T,u.material.uniforms.flipEnvMap.value=T.isCubeTexture&&T.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=y.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=y.backgroundIntensity,u.material.uniforms.backgroundRotation.value.setFromMatrix4(TN.makeRotationFromEuler(Qr)),u.material.toneMapped=pt.getTransfer(T.colorSpace)!==Ct,(f!==T||h!==T.version||d!==n.toneMapping)&&(u.material.needsUpdate=!0,f=T,h=T.version,d=n.toneMapping),u.layers.enableAll(),b.unshift(u,u.geometry,u.material,0,0,null)):T&&T.isTexture&&(c===void 0&&(c=new jt(new Ga(2,2),new zi({name:"BackgroundMaterial",uniforms:Ra(Pi.background.uniforms),vertexShader:Pi.background.vertexShader,fragmentShader:Pi.background.fragmentShader,side:Bs,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),s.update(c)),c.material.uniforms.t2D.value=T,c.material.uniforms.backgroundIntensity.value=y.backgroundIntensity,c.material.toneMapped=pt.getTransfer(T.colorSpace)!==Ct,T.matrixAutoUpdate===!0&&T.updateMatrix(),c.material.uniforms.uvTransform.value.copy(T.matrix),(f!==T||h!==T.version||d!==n.toneMapping)&&(c.material.needsUpdate=!0,f=T,h=T.version,d=n.toneMapping),c.layers.enableAll(),b.unshift(c,c.geometry,c.material,0,0,null))}function m(b,y){b.getRGB(Qu,cE(n)),i.buffers.color.setClear(Qu.r,Qu.g,Qu.b,y,o)}function v(){u!==void 0&&(u.geometry.dispose(),u.material.dispose(),u=void 0),c!==void 0&&(c.geometry.dispose(),c.material.dispose(),c=void 0)}return{getClearColor:function(){return a},setClearColor:function(b,y=1){a.set(b),l=y,m(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(b){l=b,m(a,l)},render:_,addToRenderList:g,dispose:v}}function AN(n,e){const t=n.getParameter(n.MAX_VERTEX_ATTRIBS),i={},s=h(null);let r=s,o=!1;function a(E,D,B,z,V){let Q=!1;const j=f(z,B,D);r!==j&&(r=j,c(r.object)),Q=d(E,z,B,V),Q&&p(E,z,B,V),V!==null&&e.update(V,n.ELEMENT_ARRAY_BUFFER),(Q||o)&&(o=!1,y(E,D,B,z),V!==null&&n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,e.get(V).buffer))}function l(){return n.createVertexArray()}function c(E){return n.bindVertexArray(E)}function u(E){return n.deleteVertexArray(E)}function f(E,D,B){const z=B.wireframe===!0;let V=i[E.id];V===void 0&&(V={},i[E.id]=V);let Q=V[D.id];Q===void 0&&(Q={},V[D.id]=Q);let j=Q[z];return j===void 0&&(j=h(l()),Q[z]=j),j}function h(E){const D=[],B=[],z=[];for(let V=0;V=0){const Me=V[Z];let re=Q[Z];if(re===void 0&&(Z==="instanceMatrix"&&E.instanceMatrix&&(re=E.instanceMatrix),Z==="instanceColor"&&E.instanceColor&&(re=E.instanceColor)),Me===void 0||Me.attribute!==re||re&&Me.data!==re.data)return!0;j++}return r.attributesNum!==j||r.index!==z}function p(E,D,B,z){const V={},Q=D.attributes;let j=0;const te=B.getAttributes();for(const Z in te)if(te[Z].location>=0){let Me=Q[Z];Me===void 0&&(Z==="instanceMatrix"&&E.instanceMatrix&&(Me=E.instanceMatrix),Z==="instanceColor"&&E.instanceColor&&(Me=E.instanceColor));const re={};re.attribute=Me,Me&&Me.data&&(re.data=Me.data),V[Z]=re,j++}r.attributes=V,r.attributesNum=j,r.index=z}function _(){const E=r.newAttributes;for(let D=0,B=E.length;D=0){let pe=V[te];if(pe===void 0&&(te==="instanceMatrix"&&E.instanceMatrix&&(pe=E.instanceMatrix),te==="instanceColor"&&E.instanceColor&&(pe=E.instanceColor)),pe!==void 0){const Me=pe.normalized,re=pe.itemSize,xe=e.get(pe);if(xe===void 0)continue;const We=xe.buffer,oe=xe.type,ge=xe.bytesPerElement,Se=oe===n.INT||oe===n.UNSIGNED_INT||pe.gpuType===ad;if(pe.isInterleavedBufferAttribute){const $=pe.data,ae=$.stride,le=pe.offset;if($.isInstancedInterleavedBuffer){for(let ue=0;ue0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision>0)return"highp";S="mediump"}return S==="mediump"&&n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=t.precision!==void 0?t.precision:"highp";const u=l(c);u!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",u,"instead."),c=u);const f=t.logarithmicDepthBuffer===!0,h=t.reverseDepthBuffer===!0&&e.has("EXT_clip_control"),d=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),p=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS),_=n.getParameter(n.MAX_TEXTURE_SIZE),g=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),m=n.getParameter(n.MAX_VERTEX_ATTRIBS),v=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),b=n.getParameter(n.MAX_VARYING_VECTORS),y=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),T=p>0,w=n.getParameter(n.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:r,getMaxPrecision:l,textureFormatReadable:o,textureTypeReadable:a,precision:c,logarithmicDepthBuffer:f,reverseDepthBuffer:h,maxTextures:d,maxVertexTextures:p,maxTextureSize:_,maxCubemapSize:g,maxAttributes:m,maxVertexUniforms:v,maxVaryings:b,maxFragmentUniforms:y,vertexTextures:T,maxSamples:w}}function PN(n){const e=this;let t=null,i=0,s=!1,r=!1;const o=new ur,a=new at,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(f,h){const d=f.length!==0||h||i!==0||s;return s=h,i=f.length,d},this.beginShadows=function(){r=!0,u(null)},this.endShadows=function(){r=!1},this.setGlobalState=function(f,h){t=u(f,h,0)},this.setState=function(f,h,d){const p=f.clippingPlanes,_=f.clipIntersection,g=f.clipShadows,m=n.get(f);if(!s||p===null||p.length===0||r&&!g)r?u(null):c();else{const v=r?0:i,b=v*4;let y=m.clippingState||null;l.value=y,y=u(p,h,b,d);for(let T=0;T!==b;++T)y[T]=t[T];m.clippingState=y,this.numIntersection=_?this.numPlanes:0,this.numPlanes+=v}};function c(){l.value!==t&&(l.value=t,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function u(f,h,d,p){const _=f!==null?f.length:0;let g=null;if(_!==0){if(g=l.value,p!==!0||g===null){const m=d+_*4,v=h.matrixWorldInverse;a.getNormalMatrix(v),(g===null||g.length0){const c=new hE(l.height);return c.fromEquirectangularTexture(n,o),e.set(o,c),o.addEventListener("dispose",s),t(c.texture,o.mapping)}else return null}}return o}function s(o){const a=o.target;a.removeEventListener("dispose",s);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function r(){e=new WeakMap}return{get:i,dispose:r}}const ua=4,bb=[.125,.215,.35,.446,.526,.582],lo=20,sm=new Ud,xb=new Pe;let rm=null,om=0,am=0,lm=!1;const ro=(1+Math.sqrt(5))/2,ta=1/ro,Mb=[new k(-ro,ta,0),new k(ro,ta,0),new k(-ta,0,ro),new k(ta,0,ro),new k(0,ro,-ta),new k(0,ro,ta),new k(-1,1,-1),new k(1,1,-1),new k(-1,1,1),new k(1,1,1)],LN=new k;class Ag{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,s=100,r={}){const{size:o=256,position:a=LN}=r;rm=this._renderer.getRenderTarget(),om=this._renderer.getActiveCubeFace(),am=this._renderer.getActiveMipmapLevel(),lm=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(o);const l=this._allocateTargets();return l.depthBuffer=!0,this._sceneToCubeUV(e,i,s,l,a),t>0&&this._blur(l,0,0,t),this._applyPMREM(l),this._cleanup(l),l}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=Tb(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=Eb(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?y:0,y,y),f.setRenderTarget(s),g&&f.render(_,l),f.render(e,l)}_.geometry.dispose(),_.material.dispose(),f.toneMapping=d,f.autoClear=h,e.background=m}_textureToCubeUV(e,t){const i=this._renderer,s=e.mapping===zs||e.mapping===Mr;s?(this._cubemapMaterial===null&&(this._cubemapMaterial=Tb()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=Eb());const r=s?this._cubemapMaterial:this._equirectMaterial,o=new jt(this._lodPlanes[0],r),a=r.uniforms;a.envMap.value=e;const l=this._cubeSize;ef(t,0,0,3*l,2*l),i.setRenderTarget(t),i.render(o,sm)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;const s=this._lodPlanes.length;for(let r=1;rlo&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${g} samples when the maximum is set to ${lo}`);const m=[];let v=0;for(let S=0;Sb-ua?s-b+ua:0),w=4*(this._cubeSize-y);ef(t,T,w,3*y,2*y),l.setRenderTarget(t),l.render(f,sm)}}function DN(n){const e=[],t=[],i=[];let s=n;const r=n-ua+1+bb.length;for(let o=0;on-ua?l=bb[o-n+ua-1]:o===0&&(l=0),i.push(l);const c=1/(a-2),u=-c,f=1+c,h=[u,u,f,u,f,f,u,u,f,f,u,f],d=6,p=6,_=3,g=2,m=1,v=new Float32Array(_*p*d),b=new Float32Array(g*p*d),y=new Float32Array(m*p*d);for(let w=0;w2?0:-1,M=[S,P,0,S+2/3,P,0,S+2/3,P+1,0,S,P,0,S+2/3,P+1,0,S,P+1,0];v.set(M,_*p*w),b.set(h,g*p*w);const E=[w,w,w,w,w,w];y.set(E,m*p*w)}const T=new ct;T.setAttribute("position",new Pt(v,_)),T.setAttribute("uv",new Pt(b,g)),T.setAttribute("faceIndex",new Pt(y,m)),e.push(T),s>ua&&s--}return{lodPlanes:e,sizeLods:t,sigmas:i}}function Sb(n,e,t){const i=new os(n,e,t);return i.texture.mapping=Ba,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function ef(n,e,t,i,s){n.viewport.set(e,t,i,s),n.scissor.set(e,t,i,s)}function ON(n,e,t){const i=new Float32Array(lo),s=new k(0,1,0);return new zi({name:"SphericalGaussianBlur",defines:{n:lo,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${n}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:s}},vertexShader:P_(),fragmentShader:` precision mediump float; precision mediump int; @@ -3648,7 +3648,7 @@ void main() { } } - `,blending:Ds,depthTest:!1,depthWrite:!1})}function Sb(){return new zi({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:R_(),fragmentShader:` + `,blending:Ds,depthTest:!1,depthWrite:!1})}function Eb(){return new zi({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:P_(),fragmentShader:` precision mediump float; precision mediump int; @@ -3667,7 +3667,7 @@ void main() { gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); } - `,blending:Ds,depthTest:!1,depthWrite:!1})}function Eb(){return new zi({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:R_(),fragmentShader:` + `,blending:Ds,depthTest:!1,depthWrite:!1})}function Tb(){return new zi({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:P_(),fragmentShader:` precision mediump float; precision mediump int; @@ -3683,7 +3683,7 @@ void main() { gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); } - `,blending:Ds,depthTest:!1,depthWrite:!1})}function R_(){return` + `,blending:Ds,depthTest:!1,depthWrite:!1})}function P_(){return` precision mediump float; precision mediump int; @@ -3738,9 +3738,9 @@ void main() { gl_Position = vec4( position, 1.0 ); } - `}function NN(n){let e=new WeakMap,t=null;function i(a){if(a&&a.isTexture){const l=a.mapping,c=l===sc||l===rc,u=l===zs||l===Mr;if(c||u){let f=e.get(a);const h=f!==void 0?f.texture.pmremVersion:0;if(a.isRenderTargetTexture&&a.pmremVersion!==h)return t===null&&(t=new wg(n)),f=c?t.fromEquirectangular(a,f):t.fromCubemap(a,f),f.texture.pmremVersion=a.pmremVersion,e.set(a,f),f.texture;if(f!==void 0)return f.texture;{const d=a.image;return c&&d&&d.height>0||u&&d&&s(d)?(t===null&&(t=new wg(n)),f=c?t.fromEquirectangular(a):t.fromCubemap(a),f.texture.pmremVersion=a.pmremVersion,e.set(a,f),a.addEventListener("dispose",r),f.texture):null}}}return a}function s(a){let l=0;const c=6;for(let u=0;ue.maxTextureSize&&(T=Math.ceil(y/e.maxTextureSize),y=e.maxTextureSize);const w=new Float32Array(y*T*4*f),S=new pd(w,y,T,f);S.type=Zn,S.needsUpdate=!0;const P=b*4;for(let E=0;E0)return n;const s=e*t;let r=wb[s];if(r===void 0&&(r=new Float32Array(s),wb[s]=r),e!==0){i.toArray(r,0);for(let o=1,a=0;o!==e;++o)a+=t,n[o].toArray(r,a)}return r}function rn(n,e){if(n.length!==e.length)return!1;for(let t=0,i=n.length;t0||u&&d&&s(d)?(t===null&&(t=new Ag(n)),f=c?t.fromEquirectangular(a):t.fromCubemap(a),f.texture.pmremVersion=a.pmremVersion,e.set(a,f),a.addEventListener("dispose",r),f.texture):null}}}return a}function s(a){let l=0;const c=6;for(let u=0;ue.maxTextureSize&&(T=Math.ceil(y/e.maxTextureSize),y=e.maxTextureSize);const w=new Float32Array(y*T*4*f),S=new pd(w,y,T,f);S.type=Zn,S.needsUpdate=!0;const P=b*4;for(let E=0;E0)return n;const s=e*t;let r=Ab[s];if(r===void 0&&(r=new Float32Array(s),Ab[s]=r),e!==0){i.toArray(r,0);for(let o=1,a=0;o!==e;++o)a+=t,n[o].toArray(r,a)}return r}function rn(n,e){if(n.length!==e.length)return!1;for(let t=0,i=n.length;t":" "} ${a}: ${t[o]}`)}return i.join(` -`)}const Db=new at;function NU(n){pt._getMatrix(Db,pt.workingColorSpace,n);const e=`mat3( ${Db.elements.map(t=>t.toFixed(4))} )`;switch(pt.getTransfer(n)){case uc:return[e,"LinearTransferOETF"];case Ct:return[e,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space: ",n),[e,"LinearTransferOETF"]}}function Ob(n,e,t){const i=n.getShaderParameter(e,n.COMPILE_STATUS),s=n.getShaderInfoLog(e).trim();if(i&&s==="")return"";const r=/ERROR: 0:(\d+)/.exec(s);if(r){const o=parseInt(r[1]);return t.toUpperCase()+` +`)}const Ob=new at;function NU(n){pt._getMatrix(Ob,pt.workingColorSpace,n);const e=`mat3( ${Ob.elements.map(t=>t.toFixed(4))} )`;switch(pt.getTransfer(n)){case uc:return[e,"LinearTransferOETF"];case Ct:return[e,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space: ",n),[e,"LinearTransferOETF"]}}function Nb(n,e,t){const i=n.getShaderParameter(e,n.COMPILE_STATUS),s=n.getShaderInfoLog(e).trim();if(i&&s==="")return"";const r=/ERROR: 0:(\d+)/.exec(s);if(r){const o=parseInt(r[1]);return t.toUpperCase()+` `+s+` @@ -3748,7 +3748,7 @@ void main() { `)}function FU(n,e){let t;switch(e){case B1:t="Linear";break;case z1:t="Reinhard";break;case V1:t="Cineon";break;case rd:t="ACESFilmic";break;case G1:t="AgX";break;case W1:t="Neutral";break;case H1:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+n+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}const tf=new k;function kU(){pt.getLuminanceCoefficients(tf);const n=tf.x.toFixed(4),e=tf.y.toFixed(4),t=tf.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",` const vec3 weights = vec3( ${n}, ${e}, ${t} );`," return dot( weights, rgb );","}"].join(` `)}function BU(n){return[n.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",n.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(yl).join(` `)}function zU(n){const e=[];for(const t in n){const i=n[t];i!==!1&&e.push("#define "+t+" "+i)}return e.join(` -`)}function VU(n,e){const t={},i=n.getProgramParameter(e,n.ACTIVE_ATTRIBUTES);for(let s=0;s/gm;function Ag(n){return n.replace(HU,WU)}const GU=new Map;function WU(n,e){let t=ft[e];if(t===void 0){const i=GU.get(e);if(i!==void 0)t=ft[i],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,i);else throw new Error("Can not resolve #include <"+e+">")}return Ag(t)}const XU=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Fb(n){return n.replace(XU,$U)}function $U(n,e,t,i){let s="";for(let r=parseInt(e);r/gm;function Cg(n){return n.replace(HU,WU)}const GU=new Map;function WU(n,e){let t=ft[e];if(t===void 0){const i=GU.get(e);if(i!==void 0)t=ft[i],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,i);else throw new Error("Can not resolve #include <"+e+">")}return Cg(t)}const XU=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function kb(n){return n.replace(XU,$U)}function $U(n,e,t,i){let s="";for(let r=parseInt(e);r0&&(g+=` `),m=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,p].filter(yl).join(` `),m.length>0&&(m+=` -`)):(g=[kb(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,p,t.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",t.batching?"#define USE_BATCHING":"",t.batchingColor?"#define USE_BATCHING_COLOR":"",t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.instancingMorph?"#define USE_INSTANCING_MORPH":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+u:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.displacementMap?"#define USE_DISPLACEMENTMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.mapUv?"#define MAP_UV "+t.mapUv:"",t.alphaMapUv?"#define ALPHAMAP_UV "+t.alphaMapUv:"",t.lightMapUv?"#define LIGHTMAP_UV "+t.lightMapUv:"",t.aoMapUv?"#define AOMAP_UV "+t.aoMapUv:"",t.emissiveMapUv?"#define EMISSIVEMAP_UV "+t.emissiveMapUv:"",t.bumpMapUv?"#define BUMPMAP_UV "+t.bumpMapUv:"",t.normalMapUv?"#define NORMALMAP_UV "+t.normalMapUv:"",t.displacementMapUv?"#define DISPLACEMENTMAP_UV "+t.displacementMapUv:"",t.metalnessMapUv?"#define METALNESSMAP_UV "+t.metalnessMapUv:"",t.roughnessMapUv?"#define ROUGHNESSMAP_UV "+t.roughnessMapUv:"",t.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+t.anisotropyMapUv:"",t.clearcoatMapUv?"#define CLEARCOATMAP_UV "+t.clearcoatMapUv:"",t.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+t.clearcoatNormalMapUv:"",t.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+t.clearcoatRoughnessMapUv:"",t.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+t.iridescenceMapUv:"",t.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+t.iridescenceThicknessMapUv:"",t.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+t.sheenColorMapUv:"",t.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+t.sheenRoughnessMapUv:"",t.specularMapUv?"#define SPECULARMAP_UV "+t.specularMapUv:"",t.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+t.specularColorMapUv:"",t.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+t.specularIntensityMapUv:"",t.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+t.transmissionMapUv:"",t.thicknessMapUv?"#define THICKNESSMAP_UV "+t.thicknessMapUv:"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphColors?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH"," uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` +`)):(g=[Bb(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,p,t.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",t.batching?"#define USE_BATCHING":"",t.batchingColor?"#define USE_BATCHING_COLOR":"",t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.instancingMorph?"#define USE_INSTANCING_MORPH":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+u:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.displacementMap?"#define USE_DISPLACEMENTMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.mapUv?"#define MAP_UV "+t.mapUv:"",t.alphaMapUv?"#define ALPHAMAP_UV "+t.alphaMapUv:"",t.lightMapUv?"#define LIGHTMAP_UV "+t.lightMapUv:"",t.aoMapUv?"#define AOMAP_UV "+t.aoMapUv:"",t.emissiveMapUv?"#define EMISSIVEMAP_UV "+t.emissiveMapUv:"",t.bumpMapUv?"#define BUMPMAP_UV "+t.bumpMapUv:"",t.normalMapUv?"#define NORMALMAP_UV "+t.normalMapUv:"",t.displacementMapUv?"#define DISPLACEMENTMAP_UV "+t.displacementMapUv:"",t.metalnessMapUv?"#define METALNESSMAP_UV "+t.metalnessMapUv:"",t.roughnessMapUv?"#define ROUGHNESSMAP_UV "+t.roughnessMapUv:"",t.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+t.anisotropyMapUv:"",t.clearcoatMapUv?"#define CLEARCOATMAP_UV "+t.clearcoatMapUv:"",t.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+t.clearcoatNormalMapUv:"",t.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+t.clearcoatRoughnessMapUv:"",t.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+t.iridescenceMapUv:"",t.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+t.iridescenceThicknessMapUv:"",t.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+t.sheenColorMapUv:"",t.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+t.sheenRoughnessMapUv:"",t.specularMapUv?"#define SPECULARMAP_UV "+t.specularMapUv:"",t.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+t.specularColorMapUv:"",t.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+t.specularIntensityMapUv:"",t.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+t.transmissionMapUv:"",t.thicknessMapUv?"#define THICKNESSMAP_UV "+t.thicknessMapUv:"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphColors?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH"," uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` `].filter(yl).join(` -`),m=[kb(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,p,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+c:"",t.envMap?"#define "+u:"",t.envMap?"#define "+f:"",h?"#define CUBEUV_TEXEL_WIDTH "+h.texelWidth:"",h?"#define CUBEUV_TEXEL_HEIGHT "+h.texelHeight:"",h?"#define CUBEUV_MAX_MIP "+h.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.dispersion?"#define USE_DISPERSION":"",t.iridescence?"#define USE_IRIDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor||t.batchingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==ts?"#define TONE_MAPPING":"",t.toneMapping!==ts?ft.tonemapping_pars_fragment:"",t.toneMapping!==ts?FU("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",ft.colorspace_pars_fragment,UU("linearToOutputTexel",t.outputColorSpace),kU(),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` +`),m=[Bb(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,p,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+c:"",t.envMap?"#define "+u:"",t.envMap?"#define "+f:"",h?"#define CUBEUV_TEXEL_WIDTH "+h.texelWidth:"",h?"#define CUBEUV_TEXEL_HEIGHT "+h.texelHeight:"",h?"#define CUBEUV_MAX_MIP "+h.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.dispersion?"#define USE_DISPERSION":"",t.iridescence?"#define USE_IRIDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor||t.batchingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==ts?"#define TONE_MAPPING":"",t.toneMapping!==ts?ft.tonemapping_pars_fragment:"",t.toneMapping!==ts?FU("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",ft.colorspace_pars_fragment,UU("linearToOutputTexel",t.outputColorSpace),kU(),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` `].filter(yl).join(` -`)),o=Ag(o),o=Nb(o,t),o=Ub(o,t),a=Ag(a),a=Nb(a,t),a=Ub(a,t),o=Fb(o),a=Fb(a),t.isRawShaderMaterial!==!0&&(v=`#version 300 es +`)),o=Cg(o),o=Ub(o,t),o=Fb(o,t),a=Cg(a),a=Ub(a,t),a=Fb(a,t),o=kb(o),a=kb(a),t.isRawShaderMaterial!==!0&&(v=`#version 300 es `,g=[d,"#define attribute in","#define varying out","#define texture2D texture"].join(` `)+` -`+g,m=["#define varying in",t.glslVersion===vg?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===vg?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` +`+g,m=["#define varying in",t.glslVersion===yg?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===yg?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` `)+` -`+m);const b=v+g+o,y=v+m+a,T=Lb(s,s.VERTEX_SHADER,b),w=Lb(s,s.FRAGMENT_SHADER,y);s.attachShader(_,T),s.attachShader(_,w),t.index0AttributeName!==void 0?s.bindAttribLocation(_,0,t.index0AttributeName):t.morphTargets===!0&&s.bindAttribLocation(_,0,"position"),s.linkProgram(_);function S(D){if(n.debug.checkShaderErrors){const B=s.getProgramInfoLog(_).trim(),z=s.getShaderInfoLog(T).trim(),V=s.getShaderInfoLog(w).trim();let Q=!0,j=!0;if(s.getProgramParameter(_,s.LINK_STATUS)===!1)if(Q=!1,typeof n.debug.onShaderError=="function")n.debug.onShaderError(s,_,T,w);else{const te=Ob(s,T,"vertex"),Z=Ob(s,w,"fragment");console.error("THREE.WebGLProgram: Shader Error "+s.getError()+" - VALIDATE_STATUS "+s.getProgramParameter(_,s.VALIDATE_STATUS)+` +`+m);const b=v+g+o,y=v+m+a,T=Db(s,s.VERTEX_SHADER,b),w=Db(s,s.FRAGMENT_SHADER,y);s.attachShader(_,T),s.attachShader(_,w),t.index0AttributeName!==void 0?s.bindAttribLocation(_,0,t.index0AttributeName):t.morphTargets===!0&&s.bindAttribLocation(_,0,"position"),s.linkProgram(_);function S(D){if(n.debug.checkShaderErrors){const B=s.getProgramInfoLog(_).trim(),z=s.getShaderInfoLog(T).trim(),V=s.getShaderInfoLog(w).trim();let Q=!0,j=!0;if(s.getProgramParameter(_,s.LINK_STATUS)===!1)if(Q=!1,typeof n.debug.onShaderError=="function")n.debug.onShaderError(s,_,T,w);else{const te=Nb(s,T,"vertex"),Z=Nb(s,w,"fragment");console.error("THREE.WebGLProgram: Shader Error "+s.getError()+" - VALIDATE_STATUS "+s.getProgramParameter(_,s.VALIDATE_STATUS)+` Material Name: `+D.name+` Material Type: `+D.type+` Program Info Log: `+B+` `+te+` -`+Z)}else B!==""?console.warn("THREE.WebGLProgram: Program Info Log:",B):(z===""||V==="")&&(j=!1);j&&(D.diagnostics={runnable:Q,programLog:B,vertexShader:{log:z,prefix:g},fragmentShader:{log:V,prefix:m}})}s.deleteShader(T),s.deleteShader(w),P=new Ef(s,_),M=VU(s,_)}let P;this.getUniforms=function(){return P===void 0&&S(this),P};let M;this.getAttributes=function(){return M===void 0&&S(this),M};let E=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return E===!1&&(E=s.getProgramParameter(_,LU)),E},this.destroy=function(){i.releaseStatesOfProgram(this),s.deleteProgram(_),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=DU++,this.cacheKey=e,this.usedTimes=1,this.program=_,this.vertexShader=T,this.fragmentShader=w,this}let QU=0;class eF{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,i=e.fragmentShader,s=this._getShaderStage(t),r=this._getShaderStage(i),o=this._getShaderCacheForMaterial(e);return o.has(s)===!1&&(o.add(s),s.usedTimes++),o.has(r)===!1&&(o.add(r),r.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const i of t)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let i=t.get(e);return i===void 0&&(i=new Set,t.set(e,i)),i}_getShaderStage(e){const t=this.shaderCache;let i=t.get(e);return i===void 0&&(i=new tF(e),t.set(e,i)),i}}class tF{constructor(e){this.id=QU++,this.code=e,this.usedTimes=0}}function nF(n,e,t,i,s,r,o){const a=new Bc,l=new eF,c=new Set,u=[],f=s.logarithmicDepthBuffer,h=s.vertexTextures;let d=s.precision;const p={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function _(M){return c.add(M),M===0?"uv":`uv${M}`}function g(M,E,D,B,z){const V=B.fog,Q=z.geometry,j=M.isMeshStandardMaterial?B.environment:null,te=(M.isMeshStandardMaterial?t:e).get(M.envMap||j),Z=te&&te.mapping===Ba?te.image.height:null,pe=p[M.type];M.precision!==null&&(d=s.getMaxPrecision(M.precision),d!==M.precision&&console.warn("THREE.WebGLProgram.getParameters:",M.precision,"not supported, using",d,"instead."));const Me=Q.morphAttributes.position||Q.morphAttributes.normal||Q.morphAttributes.color,re=Me!==void 0?Me.length:0;let xe=0;Q.morphAttributes.position!==void 0&&(xe=1),Q.morphAttributes.normal!==void 0&&(xe=2),Q.morphAttributes.color!==void 0&&(xe=3);let We,oe,ge,Se;if(pe){const wt=Pi[pe];We=wt.vertexShader,oe=wt.fragmentShader}else We=M.vertexShader,oe=M.fragmentShader,l.update(M),ge=l.getVertexShaderID(M),Se=l.getFragmentShaderID(M);const $=n.getRenderTarget(),ae=n.state.buffers.depth.getReversed(),le=z.isInstancedMesh===!0,ue=z.isBatchedMesh===!0,$e=!!M.map,N=!!M.matcap,U=!!te,A=!!M.aoMap,W=!!M.lightMap,G=!!M.bumpMap,X=!!M.normalMap,C=!!M.displacementMap,I=!!M.emissiveMap,F=!!M.metalnessMap,H=!!M.roughnessMap,ce=M.anisotropy>0,R=M.clearcoat>0,x=M.dispersion>0,O=M.iridescence>0,Y=M.sheen>0,ne=M.transmission>0,ee=ce&&!!M.anisotropyMap,Te=R&&!!M.clearcoatMap,me=R&&!!M.clearcoatNormalMap,Re=R&&!!M.clearcoatRoughnessMap,De=O&&!!M.iridescenceMap,de=O&&!!M.iridescenceThicknessMap,Ne=Y&&!!M.sheenColorMap,ze=Y&&!!M.sheenRoughnessMap,Ve=!!M.specularMap,we=!!M.specularColorMap,it=!!M.specularIntensityMap,q=ne&&!!M.transmissionMap,Ie=ne&&!!M.thicknessMap,_e=!!M.gradientMap,Be=!!M.alphaMap,ve=M.alphaTest>0,he=!!M.alphaHash,He=!!M.extensions;let ot=ts;M.toneMapped&&($===null||$.isXRRenderTarget===!0)&&(ot=n.toneMapping);const Ut={shaderID:pe,shaderType:M.type,shaderName:M.name,vertexShader:We,fragmentShader:oe,defines:M.defines,customVertexShaderID:ge,customFragmentShaderID:Se,isRawShaderMaterial:M.isRawShaderMaterial===!0,glslVersion:M.glslVersion,precision:d,batching:ue,batchingColor:ue&&z._colorsTexture!==null,instancing:le,instancingColor:le&&z.instanceColor!==null,instancingMorph:le&&z.morphTexture!==null,supportsVertexTextures:h,outputColorSpace:$===null?n.outputColorSpace:$.isXRRenderTarget===!0?$.texture.colorSpace:Eo,alphaToCoverage:!!M.alphaToCoverage,map:$e,matcap:N,envMap:U,envMapMode:U&&te.mapping,envMapCubeUVHeight:Z,aoMap:A,lightMap:W,bumpMap:G,normalMap:X,displacementMap:h&&C,emissiveMap:I,normalMapObjectSpace:X&&M.normalMapType===Z1,normalMapTangentSpace:X&&M.normalMapType===Cr,metalnessMap:F,roughnessMap:H,anisotropy:ce,anisotropyMap:ee,clearcoat:R,clearcoatMap:Te,clearcoatNormalMap:me,clearcoatRoughnessMap:Re,dispersion:x,iridescence:O,iridescenceMap:De,iridescenceThicknessMap:de,sheen:Y,sheenColorMap:Ne,sheenRoughnessMap:ze,specularMap:Ve,specularColorMap:we,specularIntensityMap:it,transmission:ne,transmissionMap:q,thicknessMap:Ie,gradientMap:_e,opaque:M.transparent===!1&&M.blending===_o&&M.alphaToCoverage===!1,alphaMap:Be,alphaTest:ve,alphaHash:he,combine:M.combine,mapUv:$e&&_(M.map.channel),aoMapUv:A&&_(M.aoMap.channel),lightMapUv:W&&_(M.lightMap.channel),bumpMapUv:G&&_(M.bumpMap.channel),normalMapUv:X&&_(M.normalMap.channel),displacementMapUv:C&&_(M.displacementMap.channel),emissiveMapUv:I&&_(M.emissiveMap.channel),metalnessMapUv:F&&_(M.metalnessMap.channel),roughnessMapUv:H&&_(M.roughnessMap.channel),anisotropyMapUv:ee&&_(M.anisotropyMap.channel),clearcoatMapUv:Te&&_(M.clearcoatMap.channel),clearcoatNormalMapUv:me&&_(M.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Re&&_(M.clearcoatRoughnessMap.channel),iridescenceMapUv:De&&_(M.iridescenceMap.channel),iridescenceThicknessMapUv:de&&_(M.iridescenceThicknessMap.channel),sheenColorMapUv:Ne&&_(M.sheenColorMap.channel),sheenRoughnessMapUv:ze&&_(M.sheenRoughnessMap.channel),specularMapUv:Ve&&_(M.specularMap.channel),specularColorMapUv:we&&_(M.specularColorMap.channel),specularIntensityMapUv:it&&_(M.specularIntensityMap.channel),transmissionMapUv:q&&_(M.transmissionMap.channel),thicknessMapUv:Ie&&_(M.thicknessMap.channel),alphaMapUv:Be&&_(M.alphaMap.channel),vertexTangents:!!Q.attributes.tangent&&(X||ce),vertexColors:M.vertexColors,vertexAlphas:M.vertexColors===!0&&!!Q.attributes.color&&Q.attributes.color.itemSize===4,pointsUvs:z.isPoints===!0&&!!Q.attributes.uv&&($e||Be),fog:!!V,useFog:M.fog===!0,fogExp2:!!V&&V.isFogExp2,flatShading:M.flatShading===!0,sizeAttenuation:M.sizeAttenuation===!0,logarithmicDepthBuffer:f,reverseDepthBuffer:ae,skinning:z.isSkinnedMesh===!0,morphTargets:Q.morphAttributes.position!==void 0,morphNormals:Q.morphAttributes.normal!==void 0,morphColors:Q.morphAttributes.color!==void 0,morphTargetsCount:re,morphTextureStride:xe,numDirLights:E.directional.length,numPointLights:E.point.length,numSpotLights:E.spot.length,numSpotLightMaps:E.spotLightMap.length,numRectAreaLights:E.rectArea.length,numHemiLights:E.hemi.length,numDirLightShadows:E.directionalShadowMap.length,numPointLightShadows:E.pointShadowMap.length,numSpotLightShadows:E.spotShadowMap.length,numSpotLightShadowsWithMaps:E.numSpotLightShadowsWithMaps,numLightProbes:E.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:M.dithering,shadowMapEnabled:n.shadowMap.enabled&&D.length>0,shadowMapType:n.shadowMap.type,toneMapping:ot,decodeVideoTexture:$e&&M.map.isVideoTexture===!0&&pt.getTransfer(M.map.colorSpace)===Ct,decodeVideoTextureEmissive:I&&M.emissiveMap.isVideoTexture===!0&&pt.getTransfer(M.emissiveMap.colorSpace)===Ct,premultipliedAlpha:M.premultipliedAlpha,doubleSided:M.side===Ii,flipSided:M.side===Vn,useDepthPacking:M.depthPacking>=0,depthPacking:M.depthPacking||0,index0AttributeName:M.index0AttributeName,extensionClipCullDistance:He&&M.extensions.clipCullDistance===!0&&i.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(He&&M.extensions.multiDraw===!0||ue)&&i.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:M.customProgramCacheKey()};return Ut.vertexUv1s=c.has(1),Ut.vertexUv2s=c.has(2),Ut.vertexUv3s=c.has(3),c.clear(),Ut}function m(M){const E=[];if(M.shaderID?E.push(M.shaderID):(E.push(M.customVertexShaderID),E.push(M.customFragmentShaderID)),M.defines!==void 0)for(const D in M.defines)E.push(D),E.push(M.defines[D]);return M.isRawShaderMaterial===!1&&(v(E,M),b(E,M),E.push(n.outputColorSpace)),E.push(M.customProgramCacheKey),E.join()}function v(M,E){M.push(E.precision),M.push(E.outputColorSpace),M.push(E.envMapMode),M.push(E.envMapCubeUVHeight),M.push(E.mapUv),M.push(E.alphaMapUv),M.push(E.lightMapUv),M.push(E.aoMapUv),M.push(E.bumpMapUv),M.push(E.normalMapUv),M.push(E.displacementMapUv),M.push(E.emissiveMapUv),M.push(E.metalnessMapUv),M.push(E.roughnessMapUv),M.push(E.anisotropyMapUv),M.push(E.clearcoatMapUv),M.push(E.clearcoatNormalMapUv),M.push(E.clearcoatRoughnessMapUv),M.push(E.iridescenceMapUv),M.push(E.iridescenceThicknessMapUv),M.push(E.sheenColorMapUv),M.push(E.sheenRoughnessMapUv),M.push(E.specularMapUv),M.push(E.specularColorMapUv),M.push(E.specularIntensityMapUv),M.push(E.transmissionMapUv),M.push(E.thicknessMapUv),M.push(E.combine),M.push(E.fogExp2),M.push(E.sizeAttenuation),M.push(E.morphTargetsCount),M.push(E.morphAttributeCount),M.push(E.numDirLights),M.push(E.numPointLights),M.push(E.numSpotLights),M.push(E.numSpotLightMaps),M.push(E.numHemiLights),M.push(E.numRectAreaLights),M.push(E.numDirLightShadows),M.push(E.numPointLightShadows),M.push(E.numSpotLightShadows),M.push(E.numSpotLightShadowsWithMaps),M.push(E.numLightProbes),M.push(E.shadowMapType),M.push(E.toneMapping),M.push(E.numClippingPlanes),M.push(E.numClipIntersection),M.push(E.depthPacking)}function b(M,E){a.disableAll(),E.supportsVertexTextures&&a.enable(0),E.instancing&&a.enable(1),E.instancingColor&&a.enable(2),E.instancingMorph&&a.enable(3),E.matcap&&a.enable(4),E.envMap&&a.enable(5),E.normalMapObjectSpace&&a.enable(6),E.normalMapTangentSpace&&a.enable(7),E.clearcoat&&a.enable(8),E.iridescence&&a.enable(9),E.alphaTest&&a.enable(10),E.vertexColors&&a.enable(11),E.vertexAlphas&&a.enable(12),E.vertexUv1s&&a.enable(13),E.vertexUv2s&&a.enable(14),E.vertexUv3s&&a.enable(15),E.vertexTangents&&a.enable(16),E.anisotropy&&a.enable(17),E.alphaHash&&a.enable(18),E.batching&&a.enable(19),E.dispersion&&a.enable(20),E.batchingColor&&a.enable(21),M.push(a.mask),a.disableAll(),E.fog&&a.enable(0),E.useFog&&a.enable(1),E.flatShading&&a.enable(2),E.logarithmicDepthBuffer&&a.enable(3),E.reverseDepthBuffer&&a.enable(4),E.skinning&&a.enable(5),E.morphTargets&&a.enable(6),E.morphNormals&&a.enable(7),E.morphColors&&a.enable(8),E.premultipliedAlpha&&a.enable(9),E.shadowMapEnabled&&a.enable(10),E.doubleSided&&a.enable(11),E.flipSided&&a.enable(12),E.useDepthPacking&&a.enable(13),E.dithering&&a.enable(14),E.transmission&&a.enable(15),E.sheen&&a.enable(16),E.opaque&&a.enable(17),E.pointsUvs&&a.enable(18),E.decodeVideoTexture&&a.enable(19),E.decodeVideoTextureEmissive&&a.enable(20),E.alphaToCoverage&&a.enable(21),M.push(a.mask)}function y(M){const E=p[M.type];let D;if(E){const B=Pi[E];D=uE.clone(B.uniforms)}else D=M.uniforms;return D}function T(M,E){let D;for(let B=0,z=u.length;B0?i.push(m):d.transparent===!0?s.push(m):t.push(m)}function l(f,h,d,p,_,g){const m=o(f,h,d,p,_,g);d.transmission>0?i.unshift(m):d.transparent===!0?s.unshift(m):t.unshift(m)}function c(f,h){t.length>1&&t.sort(f||sF),i.length>1&&i.sort(h||Bb),s.length>1&&s.sort(h||Bb)}function u(){for(let f=e,h=n.length;f=r.length?(o=new zb,r.push(o)):o=r[s],o}function t(){n=new WeakMap}return{get:e,dispose:t}}function oF(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new k,color:new Pe};break;case"SpotLight":t={position:new k,direction:new k,color:new Pe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new k,color:new Pe,distance:0,decay:0};break;case"HemisphereLight":t={direction:new k,skyColor:new Pe,groundColor:new Pe};break;case"RectAreaLight":t={color:new Pe,position:new k,halfWidth:new k,halfHeight:new k};break}return n[e.id]=t,t}}}function aF(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new fe};break;case"SpotLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new fe};break;case"PointLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new fe,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[e.id]=t,t}}}let lF=0;function cF(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function uF(n){const e=new oF,t=aF(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let c=0;c<9;c++)i.probe.push(new k);const s=new k,r=new Je,o=new Je;function a(c){let u=0,f=0,h=0;for(let M=0;M<9;M++)i.probe[M].set(0,0,0);let d=0,p=0,_=0,g=0,m=0,v=0,b=0,y=0,T=0,w=0,S=0;c.sort(cF);for(let M=0,E=c.length;M0&&(n.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=Ae.LTC_FLOAT_1,i.rectAreaLTC2=Ae.LTC_FLOAT_2):(i.rectAreaLTC1=Ae.LTC_HALF_1,i.rectAreaLTC2=Ae.LTC_HALF_2)),i.ambient[0]=u,i.ambient[1]=f,i.ambient[2]=h;const P=i.hash;(P.directionalLength!==d||P.pointLength!==p||P.spotLength!==_||P.rectAreaLength!==g||P.hemiLength!==m||P.numDirectionalShadows!==v||P.numPointShadows!==b||P.numSpotShadows!==y||P.numSpotMaps!==T||P.numLightProbes!==S)&&(i.directional.length=d,i.spot.length=_,i.rectArea.length=g,i.point.length=p,i.hemi.length=m,i.directionalShadow.length=v,i.directionalShadowMap.length=v,i.pointShadow.length=b,i.pointShadowMap.length=b,i.spotShadow.length=y,i.spotShadowMap.length=y,i.directionalShadowMatrix.length=v,i.pointShadowMatrix.length=b,i.spotLightMatrix.length=y+T-w,i.spotLightMap.length=T,i.numSpotLightShadowsWithMaps=w,i.numLightProbes=S,P.directionalLength=d,P.pointLength=p,P.spotLength=_,P.rectAreaLength=g,P.hemiLength=m,P.numDirectionalShadows=v,P.numPointShadows=b,P.numSpotShadows=y,P.numSpotMaps=T,P.numLightProbes=S,i.version=lF++)}function l(c,u){let f=0,h=0,d=0,p=0,_=0;const g=u.matrixWorldInverse;for(let m=0,v=c.length;m=o.length?(a=new Vb(n),o.push(a)):a=o[r],a}function i(){e=new WeakMap}return{get:t,dispose:i}}const hF=`void main() { +`+Z)}else B!==""?console.warn("THREE.WebGLProgram: Program Info Log:",B):(z===""||V==="")&&(j=!1);j&&(D.diagnostics={runnable:Q,programLog:B,vertexShader:{log:z,prefix:g},fragmentShader:{log:V,prefix:m}})}s.deleteShader(T),s.deleteShader(w),P=new Ef(s,_),M=VU(s,_)}let P;this.getUniforms=function(){return P===void 0&&S(this),P};let M;this.getAttributes=function(){return M===void 0&&S(this),M};let E=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return E===!1&&(E=s.getProgramParameter(_,LU)),E},this.destroy=function(){i.releaseStatesOfProgram(this),s.deleteProgram(_),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=DU++,this.cacheKey=e,this.usedTimes=1,this.program=_,this.vertexShader=T,this.fragmentShader=w,this}let QU=0;class eF{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,i=e.fragmentShader,s=this._getShaderStage(t),r=this._getShaderStage(i),o=this._getShaderCacheForMaterial(e);return o.has(s)===!1&&(o.add(s),s.usedTimes++),o.has(r)===!1&&(o.add(r),r.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const i of t)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let i=t.get(e);return i===void 0&&(i=new Set,t.set(e,i)),i}_getShaderStage(e){const t=this.shaderCache;let i=t.get(e);return i===void 0&&(i=new tF(e),t.set(e,i)),i}}class tF{constructor(e){this.id=QU++,this.code=e,this.usedTimes=0}}function nF(n,e,t,i,s,r,o){const a=new Bc,l=new eF,c=new Set,u=[],f=s.logarithmicDepthBuffer,h=s.vertexTextures;let d=s.precision;const p={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function _(M){return c.add(M),M===0?"uv":`uv${M}`}function g(M,E,D,B,z){const V=B.fog,Q=z.geometry,j=M.isMeshStandardMaterial?B.environment:null,te=(M.isMeshStandardMaterial?t:e).get(M.envMap||j),Z=te&&te.mapping===Ba?te.image.height:null,pe=p[M.type];M.precision!==null&&(d=s.getMaxPrecision(M.precision),d!==M.precision&&console.warn("THREE.WebGLProgram.getParameters:",M.precision,"not supported, using",d,"instead."));const Me=Q.morphAttributes.position||Q.morphAttributes.normal||Q.morphAttributes.color,re=Me!==void 0?Me.length:0;let xe=0;Q.morphAttributes.position!==void 0&&(xe=1),Q.morphAttributes.normal!==void 0&&(xe=2),Q.morphAttributes.color!==void 0&&(xe=3);let We,oe,ge,Se;if(pe){const wt=Pi[pe];We=wt.vertexShader,oe=wt.fragmentShader}else We=M.vertexShader,oe=M.fragmentShader,l.update(M),ge=l.getVertexShaderID(M),Se=l.getFragmentShaderID(M);const $=n.getRenderTarget(),ae=n.state.buffers.depth.getReversed(),le=z.isInstancedMesh===!0,ue=z.isBatchedMesh===!0,$e=!!M.map,N=!!M.matcap,U=!!te,A=!!M.aoMap,W=!!M.lightMap,G=!!M.bumpMap,X=!!M.normalMap,C=!!M.displacementMap,I=!!M.emissiveMap,F=!!M.metalnessMap,H=!!M.roughnessMap,ce=M.anisotropy>0,R=M.clearcoat>0,x=M.dispersion>0,O=M.iridescence>0,Y=M.sheen>0,ne=M.transmission>0,ee=ce&&!!M.anisotropyMap,Te=R&&!!M.clearcoatMap,me=R&&!!M.clearcoatNormalMap,Re=R&&!!M.clearcoatRoughnessMap,De=O&&!!M.iridescenceMap,de=O&&!!M.iridescenceThicknessMap,Ne=Y&&!!M.sheenColorMap,ze=Y&&!!M.sheenRoughnessMap,Ve=!!M.specularMap,we=!!M.specularColorMap,it=!!M.specularIntensityMap,q=ne&&!!M.transmissionMap,Ie=ne&&!!M.thicknessMap,_e=!!M.gradientMap,Be=!!M.alphaMap,ve=M.alphaTest>0,he=!!M.alphaHash,He=!!M.extensions;let ot=ts;M.toneMapped&&($===null||$.isXRRenderTarget===!0)&&(ot=n.toneMapping);const Ut={shaderID:pe,shaderType:M.type,shaderName:M.name,vertexShader:We,fragmentShader:oe,defines:M.defines,customVertexShaderID:ge,customFragmentShaderID:Se,isRawShaderMaterial:M.isRawShaderMaterial===!0,glslVersion:M.glslVersion,precision:d,batching:ue,batchingColor:ue&&z._colorsTexture!==null,instancing:le,instancingColor:le&&z.instanceColor!==null,instancingMorph:le&&z.morphTexture!==null,supportsVertexTextures:h,outputColorSpace:$===null?n.outputColorSpace:$.isXRRenderTarget===!0?$.texture.colorSpace:Eo,alphaToCoverage:!!M.alphaToCoverage,map:$e,matcap:N,envMap:U,envMapMode:U&&te.mapping,envMapCubeUVHeight:Z,aoMap:A,lightMap:W,bumpMap:G,normalMap:X,displacementMap:h&&C,emissiveMap:I,normalMapObjectSpace:X&&M.normalMapType===Z1,normalMapTangentSpace:X&&M.normalMapType===Cr,metalnessMap:F,roughnessMap:H,anisotropy:ce,anisotropyMap:ee,clearcoat:R,clearcoatMap:Te,clearcoatNormalMap:me,clearcoatRoughnessMap:Re,dispersion:x,iridescence:O,iridescenceMap:De,iridescenceThicknessMap:de,sheen:Y,sheenColorMap:Ne,sheenRoughnessMap:ze,specularMap:Ve,specularColorMap:we,specularIntensityMap:it,transmission:ne,transmissionMap:q,thicknessMap:Ie,gradientMap:_e,opaque:M.transparent===!1&&M.blending===_o&&M.alphaToCoverage===!1,alphaMap:Be,alphaTest:ve,alphaHash:he,combine:M.combine,mapUv:$e&&_(M.map.channel),aoMapUv:A&&_(M.aoMap.channel),lightMapUv:W&&_(M.lightMap.channel),bumpMapUv:G&&_(M.bumpMap.channel),normalMapUv:X&&_(M.normalMap.channel),displacementMapUv:C&&_(M.displacementMap.channel),emissiveMapUv:I&&_(M.emissiveMap.channel),metalnessMapUv:F&&_(M.metalnessMap.channel),roughnessMapUv:H&&_(M.roughnessMap.channel),anisotropyMapUv:ee&&_(M.anisotropyMap.channel),clearcoatMapUv:Te&&_(M.clearcoatMap.channel),clearcoatNormalMapUv:me&&_(M.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Re&&_(M.clearcoatRoughnessMap.channel),iridescenceMapUv:De&&_(M.iridescenceMap.channel),iridescenceThicknessMapUv:de&&_(M.iridescenceThicknessMap.channel),sheenColorMapUv:Ne&&_(M.sheenColorMap.channel),sheenRoughnessMapUv:ze&&_(M.sheenRoughnessMap.channel),specularMapUv:Ve&&_(M.specularMap.channel),specularColorMapUv:we&&_(M.specularColorMap.channel),specularIntensityMapUv:it&&_(M.specularIntensityMap.channel),transmissionMapUv:q&&_(M.transmissionMap.channel),thicknessMapUv:Ie&&_(M.thicknessMap.channel),alphaMapUv:Be&&_(M.alphaMap.channel),vertexTangents:!!Q.attributes.tangent&&(X||ce),vertexColors:M.vertexColors,vertexAlphas:M.vertexColors===!0&&!!Q.attributes.color&&Q.attributes.color.itemSize===4,pointsUvs:z.isPoints===!0&&!!Q.attributes.uv&&($e||Be),fog:!!V,useFog:M.fog===!0,fogExp2:!!V&&V.isFogExp2,flatShading:M.flatShading===!0,sizeAttenuation:M.sizeAttenuation===!0,logarithmicDepthBuffer:f,reverseDepthBuffer:ae,skinning:z.isSkinnedMesh===!0,morphTargets:Q.morphAttributes.position!==void 0,morphNormals:Q.morphAttributes.normal!==void 0,morphColors:Q.morphAttributes.color!==void 0,morphTargetsCount:re,morphTextureStride:xe,numDirLights:E.directional.length,numPointLights:E.point.length,numSpotLights:E.spot.length,numSpotLightMaps:E.spotLightMap.length,numRectAreaLights:E.rectArea.length,numHemiLights:E.hemi.length,numDirLightShadows:E.directionalShadowMap.length,numPointLightShadows:E.pointShadowMap.length,numSpotLightShadows:E.spotShadowMap.length,numSpotLightShadowsWithMaps:E.numSpotLightShadowsWithMaps,numLightProbes:E.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:M.dithering,shadowMapEnabled:n.shadowMap.enabled&&D.length>0,shadowMapType:n.shadowMap.type,toneMapping:ot,decodeVideoTexture:$e&&M.map.isVideoTexture===!0&&pt.getTransfer(M.map.colorSpace)===Ct,decodeVideoTextureEmissive:I&&M.emissiveMap.isVideoTexture===!0&&pt.getTransfer(M.emissiveMap.colorSpace)===Ct,premultipliedAlpha:M.premultipliedAlpha,doubleSided:M.side===Ii,flipSided:M.side===Vn,useDepthPacking:M.depthPacking>=0,depthPacking:M.depthPacking||0,index0AttributeName:M.index0AttributeName,extensionClipCullDistance:He&&M.extensions.clipCullDistance===!0&&i.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(He&&M.extensions.multiDraw===!0||ue)&&i.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:M.customProgramCacheKey()};return Ut.vertexUv1s=c.has(1),Ut.vertexUv2s=c.has(2),Ut.vertexUv3s=c.has(3),c.clear(),Ut}function m(M){const E=[];if(M.shaderID?E.push(M.shaderID):(E.push(M.customVertexShaderID),E.push(M.customFragmentShaderID)),M.defines!==void 0)for(const D in M.defines)E.push(D),E.push(M.defines[D]);return M.isRawShaderMaterial===!1&&(v(E,M),b(E,M),E.push(n.outputColorSpace)),E.push(M.customProgramCacheKey),E.join()}function v(M,E){M.push(E.precision),M.push(E.outputColorSpace),M.push(E.envMapMode),M.push(E.envMapCubeUVHeight),M.push(E.mapUv),M.push(E.alphaMapUv),M.push(E.lightMapUv),M.push(E.aoMapUv),M.push(E.bumpMapUv),M.push(E.normalMapUv),M.push(E.displacementMapUv),M.push(E.emissiveMapUv),M.push(E.metalnessMapUv),M.push(E.roughnessMapUv),M.push(E.anisotropyMapUv),M.push(E.clearcoatMapUv),M.push(E.clearcoatNormalMapUv),M.push(E.clearcoatRoughnessMapUv),M.push(E.iridescenceMapUv),M.push(E.iridescenceThicknessMapUv),M.push(E.sheenColorMapUv),M.push(E.sheenRoughnessMapUv),M.push(E.specularMapUv),M.push(E.specularColorMapUv),M.push(E.specularIntensityMapUv),M.push(E.transmissionMapUv),M.push(E.thicknessMapUv),M.push(E.combine),M.push(E.fogExp2),M.push(E.sizeAttenuation),M.push(E.morphTargetsCount),M.push(E.morphAttributeCount),M.push(E.numDirLights),M.push(E.numPointLights),M.push(E.numSpotLights),M.push(E.numSpotLightMaps),M.push(E.numHemiLights),M.push(E.numRectAreaLights),M.push(E.numDirLightShadows),M.push(E.numPointLightShadows),M.push(E.numSpotLightShadows),M.push(E.numSpotLightShadowsWithMaps),M.push(E.numLightProbes),M.push(E.shadowMapType),M.push(E.toneMapping),M.push(E.numClippingPlanes),M.push(E.numClipIntersection),M.push(E.depthPacking)}function b(M,E){a.disableAll(),E.supportsVertexTextures&&a.enable(0),E.instancing&&a.enable(1),E.instancingColor&&a.enable(2),E.instancingMorph&&a.enable(3),E.matcap&&a.enable(4),E.envMap&&a.enable(5),E.normalMapObjectSpace&&a.enable(6),E.normalMapTangentSpace&&a.enable(7),E.clearcoat&&a.enable(8),E.iridescence&&a.enable(9),E.alphaTest&&a.enable(10),E.vertexColors&&a.enable(11),E.vertexAlphas&&a.enable(12),E.vertexUv1s&&a.enable(13),E.vertexUv2s&&a.enable(14),E.vertexUv3s&&a.enable(15),E.vertexTangents&&a.enable(16),E.anisotropy&&a.enable(17),E.alphaHash&&a.enable(18),E.batching&&a.enable(19),E.dispersion&&a.enable(20),E.batchingColor&&a.enable(21),M.push(a.mask),a.disableAll(),E.fog&&a.enable(0),E.useFog&&a.enable(1),E.flatShading&&a.enable(2),E.logarithmicDepthBuffer&&a.enable(3),E.reverseDepthBuffer&&a.enable(4),E.skinning&&a.enable(5),E.morphTargets&&a.enable(6),E.morphNormals&&a.enable(7),E.morphColors&&a.enable(8),E.premultipliedAlpha&&a.enable(9),E.shadowMapEnabled&&a.enable(10),E.doubleSided&&a.enable(11),E.flipSided&&a.enable(12),E.useDepthPacking&&a.enable(13),E.dithering&&a.enable(14),E.transmission&&a.enable(15),E.sheen&&a.enable(16),E.opaque&&a.enable(17),E.pointsUvs&&a.enable(18),E.decodeVideoTexture&&a.enable(19),E.decodeVideoTextureEmissive&&a.enable(20),E.alphaToCoverage&&a.enable(21),M.push(a.mask)}function y(M){const E=p[M.type];let D;if(E){const B=Pi[E];D=uE.clone(B.uniforms)}else D=M.uniforms;return D}function T(M,E){let D;for(let B=0,z=u.length;B0?i.push(m):d.transparent===!0?s.push(m):t.push(m)}function l(f,h,d,p,_,g){const m=o(f,h,d,p,_,g);d.transmission>0?i.unshift(m):d.transparent===!0?s.unshift(m):t.unshift(m)}function c(f,h){t.length>1&&t.sort(f||sF),i.length>1&&i.sort(h||zb),s.length>1&&s.sort(h||zb)}function u(){for(let f=e,h=n.length;f=r.length?(o=new Vb,r.push(o)):o=r[s],o}function t(){n=new WeakMap}return{get:e,dispose:t}}function oF(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new k,color:new Pe};break;case"SpotLight":t={position:new k,direction:new k,color:new Pe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new k,color:new Pe,distance:0,decay:0};break;case"HemisphereLight":t={direction:new k,skyColor:new Pe,groundColor:new Pe};break;case"RectAreaLight":t={color:new Pe,position:new k,halfWidth:new k,halfHeight:new k};break}return n[e.id]=t,t}}}function aF(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new fe};break;case"SpotLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new fe};break;case"PointLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new fe,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[e.id]=t,t}}}let lF=0;function cF(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function uF(n){const e=new oF,t=aF(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let c=0;c<9;c++)i.probe.push(new k);const s=new k,r=new Je,o=new Je;function a(c){let u=0,f=0,h=0;for(let M=0;M<9;M++)i.probe[M].set(0,0,0);let d=0,p=0,_=0,g=0,m=0,v=0,b=0,y=0,T=0,w=0,S=0;c.sort(cF);for(let M=0,E=c.length;M0&&(n.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=Ae.LTC_FLOAT_1,i.rectAreaLTC2=Ae.LTC_FLOAT_2):(i.rectAreaLTC1=Ae.LTC_HALF_1,i.rectAreaLTC2=Ae.LTC_HALF_2)),i.ambient[0]=u,i.ambient[1]=f,i.ambient[2]=h;const P=i.hash;(P.directionalLength!==d||P.pointLength!==p||P.spotLength!==_||P.rectAreaLength!==g||P.hemiLength!==m||P.numDirectionalShadows!==v||P.numPointShadows!==b||P.numSpotShadows!==y||P.numSpotMaps!==T||P.numLightProbes!==S)&&(i.directional.length=d,i.spot.length=_,i.rectArea.length=g,i.point.length=p,i.hemi.length=m,i.directionalShadow.length=v,i.directionalShadowMap.length=v,i.pointShadow.length=b,i.pointShadowMap.length=b,i.spotShadow.length=y,i.spotShadowMap.length=y,i.directionalShadowMatrix.length=v,i.pointShadowMatrix.length=b,i.spotLightMatrix.length=y+T-w,i.spotLightMap.length=T,i.numSpotLightShadowsWithMaps=w,i.numLightProbes=S,P.directionalLength=d,P.pointLength=p,P.spotLength=_,P.rectAreaLength=g,P.hemiLength=m,P.numDirectionalShadows=v,P.numPointShadows=b,P.numSpotShadows=y,P.numSpotMaps=T,P.numLightProbes=S,i.version=lF++)}function l(c,u){let f=0,h=0,d=0,p=0,_=0;const g=u.matrixWorldInverse;for(let m=0,v=c.length;m=o.length?(a=new Hb(n),o.push(a)):a=o[r],a}function i(){e=new WeakMap}return{get:t,dispose:i}}const hF=`void main() { gl_Position = vec4( position, 1.0 ); }`,dF=`uniform sampler2D shadow_pass; uniform vec2 resolution; @@ -3817,7 +3817,7 @@ void main() { squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function pF(n,e,t){let i=new Ha;const s=new fe,r=new fe,o=new vt,a=new __({depthPacking:K1}),l=new v_,c={},u=t.maxTextureSize,f={[Bs]:Vn,[Vn]:Bs,[Ii]:Ii},h=new zi({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new fe},radius:{value:4}},vertexShader:hF,fragmentShader:dF}),d=h.clone();d.defines.HORIZONTAL_PASS=1;const p=new ct;p.setAttribute("position",new Pt(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const _=new jt(p,h),g=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=G0;let m=this.type;this.render=function(w,S,P){if(g.enabled===!1||g.autoUpdate===!1&&g.needsUpdate===!1||w.length===0)return;const M=n.getRenderTarget(),E=n.getActiveCubeFace(),D=n.getActiveMipmapLevel(),B=n.state;B.setBlending(Ds),B.buffers.color.setClear(1,1,1,1),B.buffers.depth.setTest(!0),B.setScissorTest(!1);const z=m!==Ki&&this.type===Ki,V=m===Ki&&this.type!==Ki;for(let Q=0,j=w.length;Qu||s.y>u)&&(s.x>u&&(r.x=Math.floor(u/pe.x),s.x=r.x*pe.x,Z.mapSize.x=r.x),s.y>u&&(r.y=Math.floor(u/pe.y),s.y=r.y*pe.y,Z.mapSize.y=r.y)),Z.map===null||z===!0||V===!0){const re=this.type!==Ki?{minFilter:yn,magFilter:yn}:{};Z.map!==null&&Z.map.dispose(),Z.map=new os(s.x,s.y,re),Z.map.texture.name=te.name+".shadowMap",Z.camera.updateProjectionMatrix()}n.setRenderTarget(Z.map),n.clear();const Me=Z.getViewportCount();for(let re=0;re0||S.map&&S.alphaTest>0||S.alphaToCoverage===!0){const B=E.uuid,z=S.uuid;let V=c[B];V===void 0&&(V={},c[B]=V);let Q=V[z];Q===void 0&&(Q=E.clone(),V[z]=Q,S.addEventListener("dispose",T)),E=Q}if(E.visible=S.visible,E.wireframe=S.wireframe,M===Ki?E.side=S.shadowSide!==null?S.shadowSide:S.side:E.side=S.shadowSide!==null?S.shadowSide:f[S.side],E.alphaMap=S.alphaMap,E.alphaTest=S.alphaToCoverage===!0?.5:S.alphaTest,E.map=S.map,E.clipShadows=S.clipShadows,E.clippingPlanes=S.clippingPlanes,E.clipIntersection=S.clipIntersection,E.displacementMap=S.displacementMap,E.displacementScale=S.displacementScale,E.displacementBias=S.displacementBias,E.wireframeLinewidth=S.wireframeLinewidth,E.linewidth=S.linewidth,P.isPointLight===!0&&E.isMeshDistanceMaterial===!0){const B=n.properties.get(E);B.light=P}return E}function y(w,S,P,M,E){if(w.visible===!1)return;if(w.layers.test(S.layers)&&(w.isMesh||w.isLine||w.isPoints)&&(w.castShadow||w.receiveShadow&&E===Ki)&&(!w.frustumCulled||i.intersectsObject(w))){w.modelViewMatrix.multiplyMatrices(P.matrixWorldInverse,w.matrixWorld);const z=e.update(w),V=w.material;if(Array.isArray(V)){const Q=z.groups;for(let j=0,te=Q.length;j=1):Z.indexOf("OpenGL ES")!==-1&&(te=parseFloat(/^OpenGL ES (\d)/.exec(Z)[1]),j=te>=2);let pe=null,Me={};const re=n.getParameter(n.SCISSOR_BOX),xe=n.getParameter(n.VIEWPORT),We=new vt().fromArray(re),oe=new vt().fromArray(xe);function ge(q,Ie,_e,Be){const ve=new Uint8Array(4),he=n.createTexture();n.bindTexture(q,he),n.texParameteri(q,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(q,n.TEXTURE_MAG_FILTER,n.NEAREST);for(let He=0;He<_e;He++)q===n.TEXTURE_3D||q===n.TEXTURE_2D_ARRAY?n.texImage3D(Ie,0,n.RGBA,1,1,Be,0,n.RGBA,n.UNSIGNED_BYTE,ve):n.texImage2D(Ie+He,0,n.RGBA,1,1,0,n.RGBA,n.UNSIGNED_BYTE,ve);return he}const Se={};Se[n.TEXTURE_2D]=ge(n.TEXTURE_2D,n.TEXTURE_2D,1),Se[n.TEXTURE_CUBE_MAP]=ge(n.TEXTURE_CUBE_MAP,n.TEXTURE_CUBE_MAP_POSITIVE_X,6),Se[n.TEXTURE_2D_ARRAY]=ge(n.TEXTURE_2D_ARRAY,n.TEXTURE_2D_ARRAY,1,1),Se[n.TEXTURE_3D]=ge(n.TEXTURE_3D,n.TEXTURE_3D,1,1),r.setClear(0,0,0,1),o.setClear(1),a.setClear(0),$(n.DEPTH_TEST),o.setFunc(So),G(!1),X(hg),$(n.CULL_FACE),A(Ds);function $(q){u[q]!==!0&&(n.enable(q),u[q]=!0)}function ae(q){u[q]!==!1&&(n.disable(q),u[q]=!1)}function le(q,Ie){return f[q]!==Ie?(n.bindFramebuffer(q,Ie),f[q]=Ie,q===n.DRAW_FRAMEBUFFER&&(f[n.FRAMEBUFFER]=Ie),q===n.FRAMEBUFFER&&(f[n.DRAW_FRAMEBUFFER]=Ie),!0):!1}function ue(q,Ie){let _e=d,Be=!1;if(q){_e=h.get(Ie),_e===void 0&&(_e=[],h.set(Ie,_e));const ve=q.textures;if(_e.length!==ve.length||_e[0]!==n.COLOR_ATTACHMENT0){for(let he=0,He=ve.length;he"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new fe,u=new WeakMap;let f;const h=new WeakMap;let d=!1;try{d=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function p(R,x){return d?new OffscreenCanvas(R,x):dc("canvas")}function _(R,x,O){let Y=1;const ne=ce(R);if((ne.width>O||ne.height>O)&&(Y=O/Math.max(ne.width,ne.height)),Y<1)if(typeof HTMLImageElement<"u"&&R instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&R instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&R instanceof ImageBitmap||typeof VideoFrame<"u"&&R instanceof VideoFrame){const ee=Math.floor(Y*ne.width),Te=Math.floor(Y*ne.height);f===void 0&&(f=p(ee,Te));const me=x?p(ee,Te):f;return me.width=ee,me.height=Te,me.getContext("2d").drawImage(R,0,0,ee,Te),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+ne.width+"x"+ne.height+") to ("+ee+"x"+Te+")."),me}else return"data"in R&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+ne.width+"x"+ne.height+")."),R;return R}function g(R){return R.generateMipmaps}function m(R){n.generateMipmap(R)}function v(R){return R.isWebGLCubeRenderTarget?n.TEXTURE_CUBE_MAP:R.isWebGL3DRenderTarget?n.TEXTURE_3D:R.isWebGLArrayRenderTarget||R.isCompressedArrayTexture?n.TEXTURE_2D_ARRAY:n.TEXTURE_2D}function b(R,x,O,Y,ne=!1){if(R!==null){if(n[R]!==void 0)return n[R];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+R+"'")}let ee=x;if(x===n.RED&&(O===n.FLOAT&&(ee=n.R32F),O===n.HALF_FLOAT&&(ee=n.R16F),O===n.UNSIGNED_BYTE&&(ee=n.R8)),x===n.RED_INTEGER&&(O===n.UNSIGNED_BYTE&&(ee=n.R8UI),O===n.UNSIGNED_SHORT&&(ee=n.R16UI),O===n.UNSIGNED_INT&&(ee=n.R32UI),O===n.BYTE&&(ee=n.R8I),O===n.SHORT&&(ee=n.R16I),O===n.INT&&(ee=n.R32I)),x===n.RG&&(O===n.FLOAT&&(ee=n.RG32F),O===n.HALF_FLOAT&&(ee=n.RG16F),O===n.UNSIGNED_BYTE&&(ee=n.RG8)),x===n.RG_INTEGER&&(O===n.UNSIGNED_BYTE&&(ee=n.RG8UI),O===n.UNSIGNED_SHORT&&(ee=n.RG16UI),O===n.UNSIGNED_INT&&(ee=n.RG32UI),O===n.BYTE&&(ee=n.RG8I),O===n.SHORT&&(ee=n.RG16I),O===n.INT&&(ee=n.RG32I)),x===n.RGB_INTEGER&&(O===n.UNSIGNED_BYTE&&(ee=n.RGB8UI),O===n.UNSIGNED_SHORT&&(ee=n.RGB16UI),O===n.UNSIGNED_INT&&(ee=n.RGB32UI),O===n.BYTE&&(ee=n.RGB8I),O===n.SHORT&&(ee=n.RGB16I),O===n.INT&&(ee=n.RGB32I)),x===n.RGBA_INTEGER&&(O===n.UNSIGNED_BYTE&&(ee=n.RGBA8UI),O===n.UNSIGNED_SHORT&&(ee=n.RGBA16UI),O===n.UNSIGNED_INT&&(ee=n.RGBA32UI),O===n.BYTE&&(ee=n.RGBA8I),O===n.SHORT&&(ee=n.RGBA16I),O===n.INT&&(ee=n.RGBA32I)),x===n.RGB&&O===n.UNSIGNED_INT_5_9_9_9_REV&&(ee=n.RGB9_E5),x===n.RGBA){const Te=ne?uc:pt.getTransfer(Y);O===n.FLOAT&&(ee=n.RGBA32F),O===n.HALF_FLOAT&&(ee=n.RGBA16F),O===n.UNSIGNED_BYTE&&(ee=Te===Ct?n.SRGB8_ALPHA8:n.RGBA8),O===n.UNSIGNED_SHORT_4_4_4_4&&(ee=n.RGBA4),O===n.UNSIGNED_SHORT_5_5_5_1&&(ee=n.RGB5_A1)}return(ee===n.R16F||ee===n.R32F||ee===n.RG16F||ee===n.RG32F||ee===n.RGBA16F||ee===n.RGBA32F)&&e.get("EXT_color_buffer_float"),ee}function y(R,x){let O;return R?x===null||x===Vs||x===Ta?O=n.DEPTH24_STENCIL8:x===Zn?O=n.DEPTH32F_STENCIL8:x===Ea&&(O=n.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):x===null||x===Vs||x===Ta?O=n.DEPTH_COMPONENT24:x===Zn?O=n.DEPTH_COMPONENT32F:x===Ea&&(O=n.DEPTH_COMPONENT16),O}function T(R,x){return g(R)===!0||R.isFramebufferTexture&&R.minFilter!==yn&&R.minFilter!==nn?Math.log2(Math.max(x.width,x.height))+1:R.mipmaps!==void 0&&R.mipmaps.length>0?R.mipmaps.length:R.isCompressedTexture&&Array.isArray(R.image)?x.mipmaps.length:1}function w(R){const x=R.target;x.removeEventListener("dispose",w),P(x),x.isVideoTexture&&u.delete(x)}function S(R){const x=R.target;x.removeEventListener("dispose",S),E(x)}function P(R){const x=i.get(R);if(x.__webglInit===void 0)return;const O=R.source,Y=h.get(O);if(Y){const ne=Y[x.__cacheKey];ne.usedTimes--,ne.usedTimes===0&&M(R),Object.keys(Y).length===0&&h.delete(O)}i.remove(R)}function M(R){const x=i.get(R);n.deleteTexture(x.__webglTexture);const O=R.source,Y=h.get(O);delete Y[x.__cacheKey],o.memory.textures--}function E(R){const x=i.get(R);if(R.depthTexture&&(R.depthTexture.dispose(),i.remove(R.depthTexture)),R.isWebGLCubeRenderTarget)for(let Y=0;Y<6;Y++){if(Array.isArray(x.__webglFramebuffer[Y]))for(let ne=0;ne=s.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+R+" texture units while this GPU supports only "+s.maxTextures),D+=1,R}function V(R){const x=[];return x.push(R.wrapS),x.push(R.wrapT),x.push(R.wrapR||0),x.push(R.magFilter),x.push(R.minFilter),x.push(R.anisotropy),x.push(R.internalFormat),x.push(R.format),x.push(R.type),x.push(R.generateMipmaps),x.push(R.premultiplyAlpha),x.push(R.flipY),x.push(R.unpackAlignment),x.push(R.colorSpace),x.join()}function Q(R,x){const O=i.get(R);if(R.isVideoTexture&&F(R),R.isRenderTargetTexture===!1&&R.version>0&&O.__version!==R.version){const Y=R.image;if(Y===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(Y.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Se(O,R,x);return}}t.bindTexture(n.TEXTURE_2D,O.__webglTexture,n.TEXTURE0+x)}function j(R,x){const O=i.get(R);if(R.version>0&&O.__version!==R.version){Se(O,R,x);return}t.bindTexture(n.TEXTURE_2D_ARRAY,O.__webglTexture,n.TEXTURE0+x)}function te(R,x){const O=i.get(R);if(R.version>0&&O.__version!==R.version){Se(O,R,x);return}t.bindTexture(n.TEXTURE_3D,O.__webglTexture,n.TEXTURE0+x)}function Z(R,x){const O=i.get(R);if(R.version>0&&O.__version!==R.version){$(O,R,x);return}t.bindTexture(n.TEXTURE_CUBE_MAP,O.__webglTexture,n.TEXTURE0+x)}const pe={[oc]:n.REPEAT,[gi]:n.CLAMP_TO_EDGE,[ac]:n.MIRRORED_REPEAT},Me={[yn]:n.NEAREST,[X0]:n.NEAREST_MIPMAP_NEAREST,[aa]:n.NEAREST_MIPMAP_LINEAR,[nn]:n.LINEAR,[wl]:n.LINEAR_MIPMAP_NEAREST,[Qi]:n.LINEAR_MIPMAP_LINEAR},re={[J1]:n.NEVER,[sE]:n.ALWAYS,[Q1]:n.LESS,[e_]:n.LEQUAL,[eE]:n.EQUAL,[iE]:n.GEQUAL,[tE]:n.GREATER,[nE]:n.NOTEQUAL};function xe(R,x){if(x.type===Zn&&e.has("OES_texture_float_linear")===!1&&(x.magFilter===nn||x.magFilter===wl||x.magFilter===aa||x.magFilter===Qi||x.minFilter===nn||x.minFilter===wl||x.minFilter===aa||x.minFilter===Qi)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),n.texParameteri(R,n.TEXTURE_WRAP_S,pe[x.wrapS]),n.texParameteri(R,n.TEXTURE_WRAP_T,pe[x.wrapT]),(R===n.TEXTURE_3D||R===n.TEXTURE_2D_ARRAY)&&n.texParameteri(R,n.TEXTURE_WRAP_R,pe[x.wrapR]),n.texParameteri(R,n.TEXTURE_MAG_FILTER,Me[x.magFilter]),n.texParameteri(R,n.TEXTURE_MIN_FILTER,Me[x.minFilter]),x.compareFunction&&(n.texParameteri(R,n.TEXTURE_COMPARE_MODE,n.COMPARE_REF_TO_TEXTURE),n.texParameteri(R,n.TEXTURE_COMPARE_FUNC,re[x.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(x.magFilter===yn||x.minFilter!==aa&&x.minFilter!==Qi||x.type===Zn&&e.has("OES_texture_float_linear")===!1)return;if(x.anisotropy>1||i.get(x).__currentAnisotropy){const O=e.get("EXT_texture_filter_anisotropic");n.texParameterf(R,O.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(x.anisotropy,s.getMaxAnisotropy())),i.get(x).__currentAnisotropy=x.anisotropy}}}function We(R,x){let O=!1;R.__webglInit===void 0&&(R.__webglInit=!0,x.addEventListener("dispose",w));const Y=x.source;let ne=h.get(Y);ne===void 0&&(ne={},h.set(Y,ne));const ee=V(x);if(ee!==R.__cacheKey){ne[ee]===void 0&&(ne[ee]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,O=!0),ne[ee].usedTimes++;const Te=ne[R.__cacheKey];Te!==void 0&&(ne[R.__cacheKey].usedTimes--,Te.usedTimes===0&&M(x)),R.__cacheKey=ee,R.__webglTexture=ne[ee].texture}return O}function oe(R,x,O){return Math.floor(Math.floor(R/O)/x)}function ge(R,x,O,Y){const ee=R.updateRanges;if(ee.length===0)t.texSubImage2D(n.TEXTURE_2D,0,0,0,x.width,x.height,O,Y,x.data);else{ee.sort((de,Ne)=>de.start-Ne.start);let Te=0;for(let de=1;de0){q&&Ie&&t.texStorage2D(n.TEXTURE_2D,Be,Ve,it[0].width,it[0].height);for(let ve=0,he=it.length;ve0){const He=Tg(we.width,we.height,x.format,x.type);for(const ot of x.layerUpdates){const Ut=we.data.subarray(ot*He/we.data.BYTES_PER_ELEMENT,(ot+1)*He/we.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,ve,0,0,ot,we.width,we.height,1,Ne,Ut)}x.clearLayerUpdates()}else t.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,ve,0,0,0,we.width,we.height,de.depth,Ne,we.data)}else t.compressedTexImage3D(n.TEXTURE_2D_ARRAY,ve,Ve,we.width,we.height,de.depth,0,we.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else q?_e&&t.texSubImage3D(n.TEXTURE_2D_ARRAY,ve,0,0,0,we.width,we.height,de.depth,Ne,ze,we.data):t.texImage3D(n.TEXTURE_2D_ARRAY,ve,Ve,we.width,we.height,de.depth,0,Ne,ze,we.data)}else{q&&Ie&&t.texStorage2D(n.TEXTURE_2D,Be,Ve,it[0].width,it[0].height);for(let ve=0,he=it.length;ve0){const ve=Tg(de.width,de.height,x.format,x.type);for(const he of x.layerUpdates){const He=de.data.subarray(he*ve/de.data.BYTES_PER_ELEMENT,(he+1)*ve/de.data.BYTES_PER_ELEMENT);t.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,he,de.width,de.height,1,Ne,ze,He)}x.clearLayerUpdates()}else t.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,0,de.width,de.height,de.depth,Ne,ze,de.data)}else t.texImage3D(n.TEXTURE_2D_ARRAY,0,Ve,de.width,de.height,de.depth,0,Ne,ze,de.data);else if(x.isData3DTexture)q?(Ie&&t.texStorage3D(n.TEXTURE_3D,Be,Ve,de.width,de.height,de.depth),_e&&t.texSubImage3D(n.TEXTURE_3D,0,0,0,0,de.width,de.height,de.depth,Ne,ze,de.data)):t.texImage3D(n.TEXTURE_3D,0,Ve,de.width,de.height,de.depth,0,Ne,ze,de.data);else if(x.isFramebufferTexture){if(Ie)if(q)t.texStorage2D(n.TEXTURE_2D,Be,Ve,de.width,de.height);else{let ve=de.width,he=de.height;for(let He=0;He>=1,he>>=1}}else if(it.length>0){if(q&&Ie){const ve=ce(it[0]);t.texStorage2D(n.TEXTURE_2D,Be,Ve,ve.width,ve.height)}for(let ve=0,he=it.length;ve0&&Be++;const he=ce(Ne[0]);t.texStorage2D(n.TEXTURE_CUBE_MAP,Be,it,he.width,he.height)}for(let he=0;he<6;he++)if(de){q?_e&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+he,0,0,0,Ne[he].width,Ne[he].height,Ve,we,Ne[he].data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+he,0,it,Ne[he].width,Ne[he].height,0,Ve,we,Ne[he].data);for(let He=0;He>ee),ze=Math.max(1,x.height>>ee);ne===n.TEXTURE_3D||ne===n.TEXTURE_2D_ARRAY?t.texImage3D(ne,ee,Re,Ne,ze,x.depth,0,Te,me,null):t.texImage2D(ne,ee,Re,Ne,ze,0,Te,me,null)}t.bindFramebuffer(n.FRAMEBUFFER,R),I(x)?a.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,Y,ne,de.__webglTexture,0,C(x)):(ne===n.TEXTURE_2D||ne>=n.TEXTURE_CUBE_MAP_POSITIVE_X&&ne<=n.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&n.framebufferTexture2D(n.FRAMEBUFFER,Y,ne,de.__webglTexture,ee),t.bindFramebuffer(n.FRAMEBUFFER,null)}function le(R,x,O){if(n.bindRenderbuffer(n.RENDERBUFFER,R),x.depthBuffer){const Y=x.depthTexture,ne=Y&&Y.isDepthTexture?Y.type:null,ee=y(x.stencilBuffer,ne),Te=x.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,me=C(x);I(x)?a.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,me,ee,x.width,x.height):O?n.renderbufferStorageMultisample(n.RENDERBUFFER,me,ee,x.width,x.height):n.renderbufferStorage(n.RENDERBUFFER,ee,x.width,x.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,Te,n.RENDERBUFFER,R)}else{const Y=x.textures;for(let ne=0;ne{delete x.__boundDepthTexture,delete x.__depthDisposeCallback,Y.removeEventListener("dispose",ne)};Y.addEventListener("dispose",ne),x.__depthDisposeCallback=ne}x.__boundDepthTexture=Y}if(R.depthTexture&&!x.__autoAllocateDepthBuffer){if(O)throw new Error("target.depthTexture not supported in Cube render targets");const Y=R.texture.mipmaps;Y&&Y.length>0?ue(x.__webglFramebuffer[0],R):ue(x.__webglFramebuffer,R)}else if(O){x.__webglDepthbuffer=[];for(let Y=0;Y<6;Y++)if(t.bindFramebuffer(n.FRAMEBUFFER,x.__webglFramebuffer[Y]),x.__webglDepthbuffer[Y]===void 0)x.__webglDepthbuffer[Y]=n.createRenderbuffer(),le(x.__webglDepthbuffer[Y],R,!1);else{const ne=R.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,ee=x.__webglDepthbuffer[Y];n.bindRenderbuffer(n.RENDERBUFFER,ee),n.framebufferRenderbuffer(n.FRAMEBUFFER,ne,n.RENDERBUFFER,ee)}}else{const Y=R.texture.mipmaps;if(Y&&Y.length>0?t.bindFramebuffer(n.FRAMEBUFFER,x.__webglFramebuffer[0]):t.bindFramebuffer(n.FRAMEBUFFER,x.__webglFramebuffer),x.__webglDepthbuffer===void 0)x.__webglDepthbuffer=n.createRenderbuffer(),le(x.__webglDepthbuffer,R,!1);else{const ne=R.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,ee=x.__webglDepthbuffer;n.bindRenderbuffer(n.RENDERBUFFER,ee),n.framebufferRenderbuffer(n.FRAMEBUFFER,ne,n.RENDERBUFFER,ee)}}t.bindFramebuffer(n.FRAMEBUFFER,null)}function N(R,x,O){const Y=i.get(R);x!==void 0&&ae(Y.__webglFramebuffer,R,R.texture,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,0),O!==void 0&&$e(R)}function U(R){const x=R.texture,O=i.get(R),Y=i.get(x);R.addEventListener("dispose",S);const ne=R.textures,ee=R.isWebGLCubeRenderTarget===!0,Te=ne.length>1;if(Te||(Y.__webglTexture===void 0&&(Y.__webglTexture=n.createTexture()),Y.__version=x.version,o.memory.textures++),ee){O.__webglFramebuffer=[];for(let me=0;me<6;me++)if(x.mipmaps&&x.mipmaps.length>0){O.__webglFramebuffer[me]=[];for(let Re=0;Re0){O.__webglFramebuffer=[];for(let me=0;me0&&I(R)===!1){O.__webglMultisampledFramebuffer=n.createFramebuffer(),O.__webglColorRenderbuffer=[],t.bindFramebuffer(n.FRAMEBUFFER,O.__webglMultisampledFramebuffer);for(let me=0;me0)for(let Re=0;Re0)for(let Re=0;Re0){if(I(R)===!1){const x=R.textures,O=R.width,Y=R.height;let ne=n.COLOR_BUFFER_BIT;const ee=R.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,Te=i.get(R),me=x.length>1;if(me)for(let De=0;De0?t.bindFramebuffer(n.DRAW_FRAMEBUFFER,Te.__webglFramebuffer[0]):t.bindFramebuffer(n.DRAW_FRAMEBUFFER,Te.__webglFramebuffer);for(let De=0;De0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&x.__useRenderToTexture!==!1}function F(R){const x=o.render.frame;u.get(R)!==x&&(u.set(R,x),R.update())}function H(R,x){const O=R.colorSpace,Y=R.format,ne=R.type;return R.isCompressedTexture===!0||R.isVideoTexture===!0||O!==Eo&&O!==ws&&(pt.getTransfer(O)===Ct?(Y!==zn||ne!==Bi)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",O)),x}function ce(R){return typeof HTMLImageElement<"u"&&R instanceof HTMLImageElement?(c.width=R.naturalWidth||R.width,c.height=R.naturalHeight||R.height):typeof VideoFrame<"u"&&R instanceof VideoFrame?(c.width=R.displayWidth,c.height=R.displayHeight):(c.width=R.width,c.height=R.height),c}this.allocateTextureUnit=z,this.resetTextureUnits=B,this.setTexture2D=Q,this.setTexture2DArray=j,this.setTexture3D=te,this.setTextureCube=Z,this.rebindTextures=N,this.setupRenderTarget=U,this.updateRenderTargetMipmap=A,this.updateMultisampleRenderTarget=X,this.setupDepthRenderbuffer=$e,this.setupFrameBufferTexture=ae,this.useMultisampledRTT=I}function mT(n,e){function t(i,s=ws){let r;const o=pt.getTransfer(s);if(i===Bi)return n.UNSIGNED_BYTE;if(i===ld)return n.UNSIGNED_SHORT_4_4_4_4;if(i===cd)return n.UNSIGNED_SHORT_5_5_5_1;if(i===Y0)return n.UNSIGNED_INT_5_9_9_9_REV;if(i===$0)return n.BYTE;if(i===q0)return n.SHORT;if(i===Ea)return n.UNSIGNED_SHORT;if(i===ad)return n.INT;if(i===Vs)return n.UNSIGNED_INT;if(i===Zn)return n.FLOAT;if(i===za)return n.HALF_FLOAT;if(i===j0)return n.ALPHA;if(i===K0)return n.RGB;if(i===zn)return n.RGBA;if(i===wa)return n.DEPTH_COMPONENT;if(i===Aa)return n.DEPTH_STENCIL;if(i===ud)return n.RED;if(i===kc)return n.RED_INTEGER;if(i===Z0)return n.RG;if(i===fd)return n.RG_INTEGER;if(i===hd)return n.RGBA_INTEGER;if(i===Al||i===Cl||i===Rl||i===Pl)if(o===Ct)if(r=e.get("WEBGL_compressed_texture_s3tc_srgb"),r!==null){if(i===Al)return r.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(i===Cl)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(i===Rl)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(i===Pl)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(r=e.get("WEBGL_compressed_texture_s3tc"),r!==null){if(i===Al)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(i===Cl)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(i===Rl)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(i===Pl)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(i===Jf||i===Qf||i===eh||i===th)if(r=e.get("WEBGL_compressed_texture_pvrtc"),r!==null){if(i===Jf)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(i===Qf)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(i===eh)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(i===th)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(i===nh||i===ih||i===sh)if(r=e.get("WEBGL_compressed_texture_etc"),r!==null){if(i===nh||i===ih)return o===Ct?r.COMPRESSED_SRGB8_ETC2:r.COMPRESSED_RGB8_ETC2;if(i===sh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:r.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(i===rh||i===oh||i===ah||i===lh||i===ch||i===uh||i===fh||i===hh||i===dh||i===ph||i===mh||i===gh||i===_h||i===vh)if(r=e.get("WEBGL_compressed_texture_astc"),r!==null){if(i===rh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:r.COMPRESSED_RGBA_ASTC_4x4_KHR;if(i===oh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:r.COMPRESSED_RGBA_ASTC_5x4_KHR;if(i===ah)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:r.COMPRESSED_RGBA_ASTC_5x5_KHR;if(i===lh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:r.COMPRESSED_RGBA_ASTC_6x5_KHR;if(i===ch)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:r.COMPRESSED_RGBA_ASTC_6x6_KHR;if(i===uh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:r.COMPRESSED_RGBA_ASTC_8x5_KHR;if(i===fh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:r.COMPRESSED_RGBA_ASTC_8x6_KHR;if(i===hh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:r.COMPRESSED_RGBA_ASTC_8x8_KHR;if(i===dh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:r.COMPRESSED_RGBA_ASTC_10x5_KHR;if(i===ph)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:r.COMPRESSED_RGBA_ASTC_10x6_KHR;if(i===mh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:r.COMPRESSED_RGBA_ASTC_10x8_KHR;if(i===gh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:r.COMPRESSED_RGBA_ASTC_10x10_KHR;if(i===_h)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:r.COMPRESSED_RGBA_ASTC_12x10_KHR;if(i===vh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:r.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(i===Il||i===yh||i===bh)if(r=e.get("EXT_texture_compression_bptc"),r!==null){if(i===Il)return o===Ct?r.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:r.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(i===yh)return r.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(i===bh)return r.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(i===J0||i===xh||i===Mh||i===Sh)if(r=e.get("EXT_texture_compression_rgtc"),r!==null){if(i===Il)return r.COMPRESSED_RED_RGTC1_EXT;if(i===xh)return r.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(i===Mh)return r.COMPRESSED_RED_GREEN_RGTC2_EXT;if(i===Sh)return r.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return i===Ta?n.UNSIGNED_INT_24_8:n[i]!==void 0?n[i]:null}return{convert:t}}const vF=` +}`;function pF(n,e,t){let i=new Ha;const s=new fe,r=new fe,o=new vt,a=new v_({depthPacking:K1}),l=new y_,c={},u=t.maxTextureSize,f={[Bs]:Vn,[Vn]:Bs,[Ii]:Ii},h=new zi({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new fe},radius:{value:4}},vertexShader:hF,fragmentShader:dF}),d=h.clone();d.defines.HORIZONTAL_PASS=1;const p=new ct;p.setAttribute("position",new Pt(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const _=new jt(p,h),g=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=W0;let m=this.type;this.render=function(w,S,P){if(g.enabled===!1||g.autoUpdate===!1&&g.needsUpdate===!1||w.length===0)return;const M=n.getRenderTarget(),E=n.getActiveCubeFace(),D=n.getActiveMipmapLevel(),B=n.state;B.setBlending(Ds),B.buffers.color.setClear(1,1,1,1),B.buffers.depth.setTest(!0),B.setScissorTest(!1);const z=m!==Ki&&this.type===Ki,V=m===Ki&&this.type!==Ki;for(let Q=0,j=w.length;Qu||s.y>u)&&(s.x>u&&(r.x=Math.floor(u/pe.x),s.x=r.x*pe.x,Z.mapSize.x=r.x),s.y>u&&(r.y=Math.floor(u/pe.y),s.y=r.y*pe.y,Z.mapSize.y=r.y)),Z.map===null||z===!0||V===!0){const re=this.type!==Ki?{minFilter:yn,magFilter:yn}:{};Z.map!==null&&Z.map.dispose(),Z.map=new os(s.x,s.y,re),Z.map.texture.name=te.name+".shadowMap",Z.camera.updateProjectionMatrix()}n.setRenderTarget(Z.map),n.clear();const Me=Z.getViewportCount();for(let re=0;re0||S.map&&S.alphaTest>0||S.alphaToCoverage===!0){const B=E.uuid,z=S.uuid;let V=c[B];V===void 0&&(V={},c[B]=V);let Q=V[z];Q===void 0&&(Q=E.clone(),V[z]=Q,S.addEventListener("dispose",T)),E=Q}if(E.visible=S.visible,E.wireframe=S.wireframe,M===Ki?E.side=S.shadowSide!==null?S.shadowSide:S.side:E.side=S.shadowSide!==null?S.shadowSide:f[S.side],E.alphaMap=S.alphaMap,E.alphaTest=S.alphaToCoverage===!0?.5:S.alphaTest,E.map=S.map,E.clipShadows=S.clipShadows,E.clippingPlanes=S.clippingPlanes,E.clipIntersection=S.clipIntersection,E.displacementMap=S.displacementMap,E.displacementScale=S.displacementScale,E.displacementBias=S.displacementBias,E.wireframeLinewidth=S.wireframeLinewidth,E.linewidth=S.linewidth,P.isPointLight===!0&&E.isMeshDistanceMaterial===!0){const B=n.properties.get(E);B.light=P}return E}function y(w,S,P,M,E){if(w.visible===!1)return;if(w.layers.test(S.layers)&&(w.isMesh||w.isLine||w.isPoints)&&(w.castShadow||w.receiveShadow&&E===Ki)&&(!w.frustumCulled||i.intersectsObject(w))){w.modelViewMatrix.multiplyMatrices(P.matrixWorldInverse,w.matrixWorld);const z=e.update(w),V=w.material;if(Array.isArray(V)){const Q=z.groups;for(let j=0,te=Q.length;j=1):Z.indexOf("OpenGL ES")!==-1&&(te=parseFloat(/^OpenGL ES (\d)/.exec(Z)[1]),j=te>=2);let pe=null,Me={};const re=n.getParameter(n.SCISSOR_BOX),xe=n.getParameter(n.VIEWPORT),We=new vt().fromArray(re),oe=new vt().fromArray(xe);function ge(q,Ie,_e,Be){const ve=new Uint8Array(4),he=n.createTexture();n.bindTexture(q,he),n.texParameteri(q,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(q,n.TEXTURE_MAG_FILTER,n.NEAREST);for(let He=0;He<_e;He++)q===n.TEXTURE_3D||q===n.TEXTURE_2D_ARRAY?n.texImage3D(Ie,0,n.RGBA,1,1,Be,0,n.RGBA,n.UNSIGNED_BYTE,ve):n.texImage2D(Ie+He,0,n.RGBA,1,1,0,n.RGBA,n.UNSIGNED_BYTE,ve);return he}const Se={};Se[n.TEXTURE_2D]=ge(n.TEXTURE_2D,n.TEXTURE_2D,1),Se[n.TEXTURE_CUBE_MAP]=ge(n.TEXTURE_CUBE_MAP,n.TEXTURE_CUBE_MAP_POSITIVE_X,6),Se[n.TEXTURE_2D_ARRAY]=ge(n.TEXTURE_2D_ARRAY,n.TEXTURE_2D_ARRAY,1,1),Se[n.TEXTURE_3D]=ge(n.TEXTURE_3D,n.TEXTURE_3D,1,1),r.setClear(0,0,0,1),o.setClear(1),a.setClear(0),$(n.DEPTH_TEST),o.setFunc(So),G(!1),X(dg),$(n.CULL_FACE),A(Ds);function $(q){u[q]!==!0&&(n.enable(q),u[q]=!0)}function ae(q){u[q]!==!1&&(n.disable(q),u[q]=!1)}function le(q,Ie){return f[q]!==Ie?(n.bindFramebuffer(q,Ie),f[q]=Ie,q===n.DRAW_FRAMEBUFFER&&(f[n.FRAMEBUFFER]=Ie),q===n.FRAMEBUFFER&&(f[n.DRAW_FRAMEBUFFER]=Ie),!0):!1}function ue(q,Ie){let _e=d,Be=!1;if(q){_e=h.get(Ie),_e===void 0&&(_e=[],h.set(Ie,_e));const ve=q.textures;if(_e.length!==ve.length||_e[0]!==n.COLOR_ATTACHMENT0){for(let he=0,He=ve.length;he"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new fe,u=new WeakMap;let f;const h=new WeakMap;let d=!1;try{d=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function p(R,x){return d?new OffscreenCanvas(R,x):dc("canvas")}function _(R,x,O){let Y=1;const ne=ce(R);if((ne.width>O||ne.height>O)&&(Y=O/Math.max(ne.width,ne.height)),Y<1)if(typeof HTMLImageElement<"u"&&R instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&R instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&R instanceof ImageBitmap||typeof VideoFrame<"u"&&R instanceof VideoFrame){const ee=Math.floor(Y*ne.width),Te=Math.floor(Y*ne.height);f===void 0&&(f=p(ee,Te));const me=x?p(ee,Te):f;return me.width=ee,me.height=Te,me.getContext("2d").drawImage(R,0,0,ee,Te),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+ne.width+"x"+ne.height+") to ("+ee+"x"+Te+")."),me}else return"data"in R&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+ne.width+"x"+ne.height+")."),R;return R}function g(R){return R.generateMipmaps}function m(R){n.generateMipmap(R)}function v(R){return R.isWebGLCubeRenderTarget?n.TEXTURE_CUBE_MAP:R.isWebGL3DRenderTarget?n.TEXTURE_3D:R.isWebGLArrayRenderTarget||R.isCompressedArrayTexture?n.TEXTURE_2D_ARRAY:n.TEXTURE_2D}function b(R,x,O,Y,ne=!1){if(R!==null){if(n[R]!==void 0)return n[R];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+R+"'")}let ee=x;if(x===n.RED&&(O===n.FLOAT&&(ee=n.R32F),O===n.HALF_FLOAT&&(ee=n.R16F),O===n.UNSIGNED_BYTE&&(ee=n.R8)),x===n.RED_INTEGER&&(O===n.UNSIGNED_BYTE&&(ee=n.R8UI),O===n.UNSIGNED_SHORT&&(ee=n.R16UI),O===n.UNSIGNED_INT&&(ee=n.R32UI),O===n.BYTE&&(ee=n.R8I),O===n.SHORT&&(ee=n.R16I),O===n.INT&&(ee=n.R32I)),x===n.RG&&(O===n.FLOAT&&(ee=n.RG32F),O===n.HALF_FLOAT&&(ee=n.RG16F),O===n.UNSIGNED_BYTE&&(ee=n.RG8)),x===n.RG_INTEGER&&(O===n.UNSIGNED_BYTE&&(ee=n.RG8UI),O===n.UNSIGNED_SHORT&&(ee=n.RG16UI),O===n.UNSIGNED_INT&&(ee=n.RG32UI),O===n.BYTE&&(ee=n.RG8I),O===n.SHORT&&(ee=n.RG16I),O===n.INT&&(ee=n.RG32I)),x===n.RGB_INTEGER&&(O===n.UNSIGNED_BYTE&&(ee=n.RGB8UI),O===n.UNSIGNED_SHORT&&(ee=n.RGB16UI),O===n.UNSIGNED_INT&&(ee=n.RGB32UI),O===n.BYTE&&(ee=n.RGB8I),O===n.SHORT&&(ee=n.RGB16I),O===n.INT&&(ee=n.RGB32I)),x===n.RGBA_INTEGER&&(O===n.UNSIGNED_BYTE&&(ee=n.RGBA8UI),O===n.UNSIGNED_SHORT&&(ee=n.RGBA16UI),O===n.UNSIGNED_INT&&(ee=n.RGBA32UI),O===n.BYTE&&(ee=n.RGBA8I),O===n.SHORT&&(ee=n.RGBA16I),O===n.INT&&(ee=n.RGBA32I)),x===n.RGB&&O===n.UNSIGNED_INT_5_9_9_9_REV&&(ee=n.RGB9_E5),x===n.RGBA){const Te=ne?uc:pt.getTransfer(Y);O===n.FLOAT&&(ee=n.RGBA32F),O===n.HALF_FLOAT&&(ee=n.RGBA16F),O===n.UNSIGNED_BYTE&&(ee=Te===Ct?n.SRGB8_ALPHA8:n.RGBA8),O===n.UNSIGNED_SHORT_4_4_4_4&&(ee=n.RGBA4),O===n.UNSIGNED_SHORT_5_5_5_1&&(ee=n.RGB5_A1)}return(ee===n.R16F||ee===n.R32F||ee===n.RG16F||ee===n.RG32F||ee===n.RGBA16F||ee===n.RGBA32F)&&e.get("EXT_color_buffer_float"),ee}function y(R,x){let O;return R?x===null||x===Vs||x===Ta?O=n.DEPTH24_STENCIL8:x===Zn?O=n.DEPTH32F_STENCIL8:x===Ea&&(O=n.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):x===null||x===Vs||x===Ta?O=n.DEPTH_COMPONENT24:x===Zn?O=n.DEPTH_COMPONENT32F:x===Ea&&(O=n.DEPTH_COMPONENT16),O}function T(R,x){return g(R)===!0||R.isFramebufferTexture&&R.minFilter!==yn&&R.minFilter!==nn?Math.log2(Math.max(x.width,x.height))+1:R.mipmaps!==void 0&&R.mipmaps.length>0?R.mipmaps.length:R.isCompressedTexture&&Array.isArray(R.image)?x.mipmaps.length:1}function w(R){const x=R.target;x.removeEventListener("dispose",w),P(x),x.isVideoTexture&&u.delete(x)}function S(R){const x=R.target;x.removeEventListener("dispose",S),E(x)}function P(R){const x=i.get(R);if(x.__webglInit===void 0)return;const O=R.source,Y=h.get(O);if(Y){const ne=Y[x.__cacheKey];ne.usedTimes--,ne.usedTimes===0&&M(R),Object.keys(Y).length===0&&h.delete(O)}i.remove(R)}function M(R){const x=i.get(R);n.deleteTexture(x.__webglTexture);const O=R.source,Y=h.get(O);delete Y[x.__cacheKey],o.memory.textures--}function E(R){const x=i.get(R);if(R.depthTexture&&(R.depthTexture.dispose(),i.remove(R.depthTexture)),R.isWebGLCubeRenderTarget)for(let Y=0;Y<6;Y++){if(Array.isArray(x.__webglFramebuffer[Y]))for(let ne=0;ne=s.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+R+" texture units while this GPU supports only "+s.maxTextures),D+=1,R}function V(R){const x=[];return x.push(R.wrapS),x.push(R.wrapT),x.push(R.wrapR||0),x.push(R.magFilter),x.push(R.minFilter),x.push(R.anisotropy),x.push(R.internalFormat),x.push(R.format),x.push(R.type),x.push(R.generateMipmaps),x.push(R.premultiplyAlpha),x.push(R.flipY),x.push(R.unpackAlignment),x.push(R.colorSpace),x.join()}function Q(R,x){const O=i.get(R);if(R.isVideoTexture&&F(R),R.isRenderTargetTexture===!1&&R.version>0&&O.__version!==R.version){const Y=R.image;if(Y===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(Y.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Se(O,R,x);return}}t.bindTexture(n.TEXTURE_2D,O.__webglTexture,n.TEXTURE0+x)}function j(R,x){const O=i.get(R);if(R.version>0&&O.__version!==R.version){Se(O,R,x);return}t.bindTexture(n.TEXTURE_2D_ARRAY,O.__webglTexture,n.TEXTURE0+x)}function te(R,x){const O=i.get(R);if(R.version>0&&O.__version!==R.version){Se(O,R,x);return}t.bindTexture(n.TEXTURE_3D,O.__webglTexture,n.TEXTURE0+x)}function Z(R,x){const O=i.get(R);if(R.version>0&&O.__version!==R.version){$(O,R,x);return}t.bindTexture(n.TEXTURE_CUBE_MAP,O.__webglTexture,n.TEXTURE0+x)}const pe={[oc]:n.REPEAT,[gi]:n.CLAMP_TO_EDGE,[ac]:n.MIRRORED_REPEAT},Me={[yn]:n.NEAREST,[$0]:n.NEAREST_MIPMAP_NEAREST,[aa]:n.NEAREST_MIPMAP_LINEAR,[nn]:n.LINEAR,[wl]:n.LINEAR_MIPMAP_NEAREST,[Qi]:n.LINEAR_MIPMAP_LINEAR},re={[J1]:n.NEVER,[sE]:n.ALWAYS,[Q1]:n.LESS,[t_]:n.LEQUAL,[eE]:n.EQUAL,[iE]:n.GEQUAL,[tE]:n.GREATER,[nE]:n.NOTEQUAL};function xe(R,x){if(x.type===Zn&&e.has("OES_texture_float_linear")===!1&&(x.magFilter===nn||x.magFilter===wl||x.magFilter===aa||x.magFilter===Qi||x.minFilter===nn||x.minFilter===wl||x.minFilter===aa||x.minFilter===Qi)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),n.texParameteri(R,n.TEXTURE_WRAP_S,pe[x.wrapS]),n.texParameteri(R,n.TEXTURE_WRAP_T,pe[x.wrapT]),(R===n.TEXTURE_3D||R===n.TEXTURE_2D_ARRAY)&&n.texParameteri(R,n.TEXTURE_WRAP_R,pe[x.wrapR]),n.texParameteri(R,n.TEXTURE_MAG_FILTER,Me[x.magFilter]),n.texParameteri(R,n.TEXTURE_MIN_FILTER,Me[x.minFilter]),x.compareFunction&&(n.texParameteri(R,n.TEXTURE_COMPARE_MODE,n.COMPARE_REF_TO_TEXTURE),n.texParameteri(R,n.TEXTURE_COMPARE_FUNC,re[x.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(x.magFilter===yn||x.minFilter!==aa&&x.minFilter!==Qi||x.type===Zn&&e.has("OES_texture_float_linear")===!1)return;if(x.anisotropy>1||i.get(x).__currentAnisotropy){const O=e.get("EXT_texture_filter_anisotropic");n.texParameterf(R,O.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(x.anisotropy,s.getMaxAnisotropy())),i.get(x).__currentAnisotropy=x.anisotropy}}}function We(R,x){let O=!1;R.__webglInit===void 0&&(R.__webglInit=!0,x.addEventListener("dispose",w));const Y=x.source;let ne=h.get(Y);ne===void 0&&(ne={},h.set(Y,ne));const ee=V(x);if(ee!==R.__cacheKey){ne[ee]===void 0&&(ne[ee]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,O=!0),ne[ee].usedTimes++;const Te=ne[R.__cacheKey];Te!==void 0&&(ne[R.__cacheKey].usedTimes--,Te.usedTimes===0&&M(x)),R.__cacheKey=ee,R.__webglTexture=ne[ee].texture}return O}function oe(R,x,O){return Math.floor(Math.floor(R/O)/x)}function ge(R,x,O,Y){const ee=R.updateRanges;if(ee.length===0)t.texSubImage2D(n.TEXTURE_2D,0,0,0,x.width,x.height,O,Y,x.data);else{ee.sort((de,Ne)=>de.start-Ne.start);let Te=0;for(let de=1;de0){q&&Ie&&t.texStorage2D(n.TEXTURE_2D,Be,Ve,it[0].width,it[0].height);for(let ve=0,he=it.length;ve0){const He=wg(we.width,we.height,x.format,x.type);for(const ot of x.layerUpdates){const Ut=we.data.subarray(ot*He/we.data.BYTES_PER_ELEMENT,(ot+1)*He/we.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,ve,0,0,ot,we.width,we.height,1,Ne,Ut)}x.clearLayerUpdates()}else t.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,ve,0,0,0,we.width,we.height,de.depth,Ne,we.data)}else t.compressedTexImage3D(n.TEXTURE_2D_ARRAY,ve,Ve,we.width,we.height,de.depth,0,we.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else q?_e&&t.texSubImage3D(n.TEXTURE_2D_ARRAY,ve,0,0,0,we.width,we.height,de.depth,Ne,ze,we.data):t.texImage3D(n.TEXTURE_2D_ARRAY,ve,Ve,we.width,we.height,de.depth,0,Ne,ze,we.data)}else{q&&Ie&&t.texStorage2D(n.TEXTURE_2D,Be,Ve,it[0].width,it[0].height);for(let ve=0,he=it.length;ve0){const ve=wg(de.width,de.height,x.format,x.type);for(const he of x.layerUpdates){const He=de.data.subarray(he*ve/de.data.BYTES_PER_ELEMENT,(he+1)*ve/de.data.BYTES_PER_ELEMENT);t.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,he,de.width,de.height,1,Ne,ze,He)}x.clearLayerUpdates()}else t.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,0,de.width,de.height,de.depth,Ne,ze,de.data)}else t.texImage3D(n.TEXTURE_2D_ARRAY,0,Ve,de.width,de.height,de.depth,0,Ne,ze,de.data);else if(x.isData3DTexture)q?(Ie&&t.texStorage3D(n.TEXTURE_3D,Be,Ve,de.width,de.height,de.depth),_e&&t.texSubImage3D(n.TEXTURE_3D,0,0,0,0,de.width,de.height,de.depth,Ne,ze,de.data)):t.texImage3D(n.TEXTURE_3D,0,Ve,de.width,de.height,de.depth,0,Ne,ze,de.data);else if(x.isFramebufferTexture){if(Ie)if(q)t.texStorage2D(n.TEXTURE_2D,Be,Ve,de.width,de.height);else{let ve=de.width,he=de.height;for(let He=0;He>=1,he>>=1}}else if(it.length>0){if(q&&Ie){const ve=ce(it[0]);t.texStorage2D(n.TEXTURE_2D,Be,Ve,ve.width,ve.height)}for(let ve=0,he=it.length;ve0&&Be++;const he=ce(Ne[0]);t.texStorage2D(n.TEXTURE_CUBE_MAP,Be,it,he.width,he.height)}for(let he=0;he<6;he++)if(de){q?_e&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+he,0,0,0,Ne[he].width,Ne[he].height,Ve,we,Ne[he].data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+he,0,it,Ne[he].width,Ne[he].height,0,Ve,we,Ne[he].data);for(let He=0;He>ee),ze=Math.max(1,x.height>>ee);ne===n.TEXTURE_3D||ne===n.TEXTURE_2D_ARRAY?t.texImage3D(ne,ee,Re,Ne,ze,x.depth,0,Te,me,null):t.texImage2D(ne,ee,Re,Ne,ze,0,Te,me,null)}t.bindFramebuffer(n.FRAMEBUFFER,R),I(x)?a.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,Y,ne,de.__webglTexture,0,C(x)):(ne===n.TEXTURE_2D||ne>=n.TEXTURE_CUBE_MAP_POSITIVE_X&&ne<=n.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&n.framebufferTexture2D(n.FRAMEBUFFER,Y,ne,de.__webglTexture,ee),t.bindFramebuffer(n.FRAMEBUFFER,null)}function le(R,x,O){if(n.bindRenderbuffer(n.RENDERBUFFER,R),x.depthBuffer){const Y=x.depthTexture,ne=Y&&Y.isDepthTexture?Y.type:null,ee=y(x.stencilBuffer,ne),Te=x.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,me=C(x);I(x)?a.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,me,ee,x.width,x.height):O?n.renderbufferStorageMultisample(n.RENDERBUFFER,me,ee,x.width,x.height):n.renderbufferStorage(n.RENDERBUFFER,ee,x.width,x.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,Te,n.RENDERBUFFER,R)}else{const Y=x.textures;for(let ne=0;ne{delete x.__boundDepthTexture,delete x.__depthDisposeCallback,Y.removeEventListener("dispose",ne)};Y.addEventListener("dispose",ne),x.__depthDisposeCallback=ne}x.__boundDepthTexture=Y}if(R.depthTexture&&!x.__autoAllocateDepthBuffer){if(O)throw new Error("target.depthTexture not supported in Cube render targets");const Y=R.texture.mipmaps;Y&&Y.length>0?ue(x.__webglFramebuffer[0],R):ue(x.__webglFramebuffer,R)}else if(O){x.__webglDepthbuffer=[];for(let Y=0;Y<6;Y++)if(t.bindFramebuffer(n.FRAMEBUFFER,x.__webglFramebuffer[Y]),x.__webglDepthbuffer[Y]===void 0)x.__webglDepthbuffer[Y]=n.createRenderbuffer(),le(x.__webglDepthbuffer[Y],R,!1);else{const ne=R.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,ee=x.__webglDepthbuffer[Y];n.bindRenderbuffer(n.RENDERBUFFER,ee),n.framebufferRenderbuffer(n.FRAMEBUFFER,ne,n.RENDERBUFFER,ee)}}else{const Y=R.texture.mipmaps;if(Y&&Y.length>0?t.bindFramebuffer(n.FRAMEBUFFER,x.__webglFramebuffer[0]):t.bindFramebuffer(n.FRAMEBUFFER,x.__webglFramebuffer),x.__webglDepthbuffer===void 0)x.__webglDepthbuffer=n.createRenderbuffer(),le(x.__webglDepthbuffer,R,!1);else{const ne=R.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,ee=x.__webglDepthbuffer;n.bindRenderbuffer(n.RENDERBUFFER,ee),n.framebufferRenderbuffer(n.FRAMEBUFFER,ne,n.RENDERBUFFER,ee)}}t.bindFramebuffer(n.FRAMEBUFFER,null)}function N(R,x,O){const Y=i.get(R);x!==void 0&&ae(Y.__webglFramebuffer,R,R.texture,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,0),O!==void 0&&$e(R)}function U(R){const x=R.texture,O=i.get(R),Y=i.get(x);R.addEventListener("dispose",S);const ne=R.textures,ee=R.isWebGLCubeRenderTarget===!0,Te=ne.length>1;if(Te||(Y.__webglTexture===void 0&&(Y.__webglTexture=n.createTexture()),Y.__version=x.version,o.memory.textures++),ee){O.__webglFramebuffer=[];for(let me=0;me<6;me++)if(x.mipmaps&&x.mipmaps.length>0){O.__webglFramebuffer[me]=[];for(let Re=0;Re0){O.__webglFramebuffer=[];for(let me=0;me0&&I(R)===!1){O.__webglMultisampledFramebuffer=n.createFramebuffer(),O.__webglColorRenderbuffer=[],t.bindFramebuffer(n.FRAMEBUFFER,O.__webglMultisampledFramebuffer);for(let me=0;me0)for(let Re=0;Re0)for(let Re=0;Re0){if(I(R)===!1){const x=R.textures,O=R.width,Y=R.height;let ne=n.COLOR_BUFFER_BIT;const ee=R.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,Te=i.get(R),me=x.length>1;if(me)for(let De=0;De0?t.bindFramebuffer(n.DRAW_FRAMEBUFFER,Te.__webglFramebuffer[0]):t.bindFramebuffer(n.DRAW_FRAMEBUFFER,Te.__webglFramebuffer);for(let De=0;De0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&x.__useRenderToTexture!==!1}function F(R){const x=o.render.frame;u.get(R)!==x&&(u.set(R,x),R.update())}function H(R,x){const O=R.colorSpace,Y=R.format,ne=R.type;return R.isCompressedTexture===!0||R.isVideoTexture===!0||O!==Eo&&O!==ws&&(pt.getTransfer(O)===Ct?(Y!==zn||ne!==Bi)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",O)),x}function ce(R){return typeof HTMLImageElement<"u"&&R instanceof HTMLImageElement?(c.width=R.naturalWidth||R.width,c.height=R.naturalHeight||R.height):typeof VideoFrame<"u"&&R instanceof VideoFrame?(c.width=R.displayWidth,c.height=R.displayHeight):(c.width=R.width,c.height=R.height),c}this.allocateTextureUnit=z,this.resetTextureUnits=B,this.setTexture2D=Q,this.setTexture2DArray=j,this.setTexture3D=te,this.setTextureCube=Z,this.rebindTextures=N,this.setupRenderTarget=U,this.updateRenderTargetMipmap=A,this.updateMultisampleRenderTarget=X,this.setupDepthRenderbuffer=$e,this.setupFrameBufferTexture=ae,this.useMultisampledRTT=I}function mT(n,e){function t(i,s=ws){let r;const o=pt.getTransfer(s);if(i===Bi)return n.UNSIGNED_BYTE;if(i===ld)return n.UNSIGNED_SHORT_4_4_4_4;if(i===cd)return n.UNSIGNED_SHORT_5_5_5_1;if(i===j0)return n.UNSIGNED_INT_5_9_9_9_REV;if(i===q0)return n.BYTE;if(i===Y0)return n.SHORT;if(i===Ea)return n.UNSIGNED_SHORT;if(i===ad)return n.INT;if(i===Vs)return n.UNSIGNED_INT;if(i===Zn)return n.FLOAT;if(i===za)return n.HALF_FLOAT;if(i===K0)return n.ALPHA;if(i===Z0)return n.RGB;if(i===zn)return n.RGBA;if(i===wa)return n.DEPTH_COMPONENT;if(i===Aa)return n.DEPTH_STENCIL;if(i===ud)return n.RED;if(i===kc)return n.RED_INTEGER;if(i===J0)return n.RG;if(i===fd)return n.RG_INTEGER;if(i===hd)return n.RGBA_INTEGER;if(i===Al||i===Cl||i===Rl||i===Pl)if(o===Ct)if(r=e.get("WEBGL_compressed_texture_s3tc_srgb"),r!==null){if(i===Al)return r.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(i===Cl)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(i===Rl)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(i===Pl)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(r=e.get("WEBGL_compressed_texture_s3tc"),r!==null){if(i===Al)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(i===Cl)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(i===Rl)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(i===Pl)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(i===Jf||i===Qf||i===eh||i===th)if(r=e.get("WEBGL_compressed_texture_pvrtc"),r!==null){if(i===Jf)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(i===Qf)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(i===eh)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(i===th)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(i===nh||i===ih||i===sh)if(r=e.get("WEBGL_compressed_texture_etc"),r!==null){if(i===nh||i===ih)return o===Ct?r.COMPRESSED_SRGB8_ETC2:r.COMPRESSED_RGB8_ETC2;if(i===sh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:r.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(i===rh||i===oh||i===ah||i===lh||i===ch||i===uh||i===fh||i===hh||i===dh||i===ph||i===mh||i===gh||i===_h||i===vh)if(r=e.get("WEBGL_compressed_texture_astc"),r!==null){if(i===rh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:r.COMPRESSED_RGBA_ASTC_4x4_KHR;if(i===oh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:r.COMPRESSED_RGBA_ASTC_5x4_KHR;if(i===ah)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:r.COMPRESSED_RGBA_ASTC_5x5_KHR;if(i===lh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:r.COMPRESSED_RGBA_ASTC_6x5_KHR;if(i===ch)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:r.COMPRESSED_RGBA_ASTC_6x6_KHR;if(i===uh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:r.COMPRESSED_RGBA_ASTC_8x5_KHR;if(i===fh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:r.COMPRESSED_RGBA_ASTC_8x6_KHR;if(i===hh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:r.COMPRESSED_RGBA_ASTC_8x8_KHR;if(i===dh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:r.COMPRESSED_RGBA_ASTC_10x5_KHR;if(i===ph)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:r.COMPRESSED_RGBA_ASTC_10x6_KHR;if(i===mh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:r.COMPRESSED_RGBA_ASTC_10x8_KHR;if(i===gh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:r.COMPRESSED_RGBA_ASTC_10x10_KHR;if(i===_h)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:r.COMPRESSED_RGBA_ASTC_12x10_KHR;if(i===vh)return o===Ct?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:r.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(i===Il||i===yh||i===bh)if(r=e.get("EXT_texture_compression_bptc"),r!==null){if(i===Il)return o===Ct?r.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:r.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(i===yh)return r.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(i===bh)return r.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(i===Q0||i===xh||i===Mh||i===Sh)if(r=e.get("EXT_texture_compression_rgtc"),r!==null){if(i===Il)return r.COMPRESSED_RED_RGTC1_EXT;if(i===xh)return r.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(i===Mh)return r.COMPRESSED_RED_GREEN_RGTC2_EXT;if(i===Sh)return r.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return i===Ta?n.UNSIGNED_INT_24_8:n[i]!==void 0?n[i]:null}return{convert:t}}const vF=` void main() { gl_Position = vec4( position, 1.0 ); @@ -3841,37 +3841,37 @@ void main() { } -}`;class bF{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,i){if(this.texture===null){const s=new $t,r=e.properties.get(s);r.__webglTexture=t.texture,(t.depthNear!==i.depthNear||t.depthFar!==i.depthFar)&&(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=s}}getMesh(e){if(this.texture!==null&&this.mesh===null){const t=e.cameras[0].viewport,i=new zi({vertexShader:vF,fragmentShader:yF,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new jt(new Ga(20,20),i)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class xF extends as{constructor(e,t){super();const i=this;let s=null,r=1,o=null,a="local-floor",l=1,c=null,u=null,f=null,h=null,d=null,p=null;const _=new bF,g=t.getContextAttributes();let m=null,v=null;const b=[],y=[],T=new fe;let w=null;const S=new Jt;S.viewport=new vt;const P=new Jt;P.viewport=new vt;const M=[S,P],E=new sT;let D=null,B=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(oe){let ge=b[oe];return ge===void 0&&(ge=new Sf,b[oe]=ge),ge.getTargetRaySpace()},this.getControllerGrip=function(oe){let ge=b[oe];return ge===void 0&&(ge=new Sf,b[oe]=ge),ge.getGripSpace()},this.getHand=function(oe){let ge=b[oe];return ge===void 0&&(ge=new Sf,b[oe]=ge),ge.getHandSpace()};function z(oe){const ge=y.indexOf(oe.inputSource);if(ge===-1)return;const Se=b[ge];Se!==void 0&&(Se.update(oe.inputSource,oe.frame,c||o),Se.dispatchEvent({type:oe.type,data:oe.inputSource}))}function V(){s.removeEventListener("select",z),s.removeEventListener("selectstart",z),s.removeEventListener("selectend",z),s.removeEventListener("squeeze",z),s.removeEventListener("squeezestart",z),s.removeEventListener("squeezeend",z),s.removeEventListener("end",V),s.removeEventListener("inputsourceschange",Q);for(let oe=0;oe=0&&(y[$]=null,b[$].disconnect(Se))}for(let ge=0;ge=y.length){y.push(Se),$=le;break}else if(y[le]===null){y[le]=Se,$=le;break}if($===-1)break}const ae=b[$];ae&&ae.connect(Se)}}const j=new k,te=new k;function Z(oe,ge,Se){j.setFromMatrixPosition(ge.matrixWorld),te.setFromMatrixPosition(Se.matrixWorld);const $=j.distanceTo(te),ae=ge.projectionMatrix.elements,le=Se.projectionMatrix.elements,ue=ae[14]/(ae[10]-1),$e=ae[14]/(ae[10]+1),N=(ae[9]+1)/ae[5],U=(ae[9]-1)/ae[5],A=(ae[8]-1)/ae[0],W=(le[8]+1)/le[0],G=ue*A,X=ue*W,C=$/(-A+W),I=C*-A;if(ge.matrixWorld.decompose(oe.position,oe.quaternion,oe.scale),oe.translateX(I),oe.translateZ(C),oe.matrixWorld.compose(oe.position,oe.quaternion,oe.scale),oe.matrixWorldInverse.copy(oe.matrixWorld).invert(),ae[10]===-1)oe.projectionMatrix.copy(ge.projectionMatrix),oe.projectionMatrixInverse.copy(ge.projectionMatrixInverse);else{const F=ue+C,H=$e+C,ce=G-I,R=X+($-I),x=N*$e/H*F,O=U*$e/H*F;oe.projectionMatrix.makePerspective(ce,R,x,O,F,H),oe.projectionMatrixInverse.copy(oe.projectionMatrix).invert()}}function pe(oe,ge){ge===null?oe.matrixWorld.copy(oe.matrix):oe.matrixWorld.multiplyMatrices(ge.matrixWorld,oe.matrix),oe.matrixWorldInverse.copy(oe.matrixWorld).invert()}this.updateCamera=function(oe){if(s===null)return;let ge=oe.near,Se=oe.far;_.texture!==null&&(_.depthNear>0&&(ge=_.depthNear),_.depthFar>0&&(Se=_.depthFar)),E.near=P.near=S.near=ge,E.far=P.far=S.far=Se,(D!==E.near||B!==E.far)&&(s.updateRenderState({depthNear:E.near,depthFar:E.far}),D=E.near,B=E.far),S.layers.mask=oe.layers.mask|2,P.layers.mask=oe.layers.mask|4,E.layers.mask=S.layers.mask|P.layers.mask;const $=oe.parent,ae=E.cameras;pe(E,$);for(let le=0;le0&&(g.alphaTest.value=m.alphaTest);const v=e.get(m),b=v.envMap,y=v.envMapRotation;b&&(g.envMap.value=b,eo.copy(y),eo.x*=-1,eo.y*=-1,eo.z*=-1,b.isCubeTexture&&b.isRenderTargetTexture===!1&&(eo.y*=-1,eo.z*=-1),g.envMapRotation.value.setFromMatrix4(MF.makeRotationFromEuler(eo)),g.flipEnvMap.value=b.isCubeTexture&&b.isRenderTargetTexture===!1?-1:1,g.reflectivity.value=m.reflectivity,g.ior.value=m.ior,g.refractionRatio.value=m.refractionRatio),m.lightMap&&(g.lightMap.value=m.lightMap,g.lightMapIntensity.value=m.lightMapIntensity,t(m.lightMap,g.lightMapTransform)),m.aoMap&&(g.aoMap.value=m.aoMap,g.aoMapIntensity.value=m.aoMapIntensity,t(m.aoMap,g.aoMapTransform))}function o(g,m){g.diffuse.value.copy(m.color),g.opacity.value=m.opacity,m.map&&(g.map.value=m.map,t(m.map,g.mapTransform))}function a(g,m){g.dashSize.value=m.dashSize,g.totalSize.value=m.dashSize+m.gapSize,g.scale.value=m.scale}function l(g,m,v,b){g.diffuse.value.copy(m.color),g.opacity.value=m.opacity,g.size.value=m.size*v,g.scale.value=b*.5,m.map&&(g.map.value=m.map,t(m.map,g.uvTransform)),m.alphaMap&&(g.alphaMap.value=m.alphaMap,t(m.alphaMap,g.alphaMapTransform)),m.alphaTest>0&&(g.alphaTest.value=m.alphaTest)}function c(g,m){g.diffuse.value.copy(m.color),g.opacity.value=m.opacity,g.rotation.value=m.rotation,m.map&&(g.map.value=m.map,t(m.map,g.mapTransform)),m.alphaMap&&(g.alphaMap.value=m.alphaMap,t(m.alphaMap,g.alphaMapTransform)),m.alphaTest>0&&(g.alphaTest.value=m.alphaTest)}function u(g,m){g.specular.value.copy(m.specular),g.shininess.value=Math.max(m.shininess,1e-4)}function f(g,m){m.gradientMap&&(g.gradientMap.value=m.gradientMap)}function h(g,m){g.metalness.value=m.metalness,m.metalnessMap&&(g.metalnessMap.value=m.metalnessMap,t(m.metalnessMap,g.metalnessMapTransform)),g.roughness.value=m.roughness,m.roughnessMap&&(g.roughnessMap.value=m.roughnessMap,t(m.roughnessMap,g.roughnessMapTransform)),m.envMap&&(g.envMapIntensity.value=m.envMapIntensity)}function d(g,m,v){g.ior.value=m.ior,m.sheen>0&&(g.sheenColor.value.copy(m.sheenColor).multiplyScalar(m.sheen),g.sheenRoughness.value=m.sheenRoughness,m.sheenColorMap&&(g.sheenColorMap.value=m.sheenColorMap,t(m.sheenColorMap,g.sheenColorMapTransform)),m.sheenRoughnessMap&&(g.sheenRoughnessMap.value=m.sheenRoughnessMap,t(m.sheenRoughnessMap,g.sheenRoughnessMapTransform))),m.clearcoat>0&&(g.clearcoat.value=m.clearcoat,g.clearcoatRoughness.value=m.clearcoatRoughness,m.clearcoatMap&&(g.clearcoatMap.value=m.clearcoatMap,t(m.clearcoatMap,g.clearcoatMapTransform)),m.clearcoatRoughnessMap&&(g.clearcoatRoughnessMap.value=m.clearcoatRoughnessMap,t(m.clearcoatRoughnessMap,g.clearcoatRoughnessMapTransform)),m.clearcoatNormalMap&&(g.clearcoatNormalMap.value=m.clearcoatNormalMap,t(m.clearcoatNormalMap,g.clearcoatNormalMapTransform),g.clearcoatNormalScale.value.copy(m.clearcoatNormalScale),m.side===Vn&&g.clearcoatNormalScale.value.negate())),m.dispersion>0&&(g.dispersion.value=m.dispersion),m.iridescence>0&&(g.iridescence.value=m.iridescence,g.iridescenceIOR.value=m.iridescenceIOR,g.iridescenceThicknessMinimum.value=m.iridescenceThicknessRange[0],g.iridescenceThicknessMaximum.value=m.iridescenceThicknessRange[1],m.iridescenceMap&&(g.iridescenceMap.value=m.iridescenceMap,t(m.iridescenceMap,g.iridescenceMapTransform)),m.iridescenceThicknessMap&&(g.iridescenceThicknessMap.value=m.iridescenceThicknessMap,t(m.iridescenceThicknessMap,g.iridescenceThicknessMapTransform))),m.transmission>0&&(g.transmission.value=m.transmission,g.transmissionSamplerMap.value=v.texture,g.transmissionSamplerSize.value.set(v.width,v.height),m.transmissionMap&&(g.transmissionMap.value=m.transmissionMap,t(m.transmissionMap,g.transmissionMapTransform)),g.thickness.value=m.thickness,m.thicknessMap&&(g.thicknessMap.value=m.thicknessMap,t(m.thicknessMap,g.thicknessMapTransform)),g.attenuationDistance.value=m.attenuationDistance,g.attenuationColor.value.copy(m.attenuationColor)),m.anisotropy>0&&(g.anisotropyVector.value.set(m.anisotropy*Math.cos(m.anisotropyRotation),m.anisotropy*Math.sin(m.anisotropyRotation)),m.anisotropyMap&&(g.anisotropyMap.value=m.anisotropyMap,t(m.anisotropyMap,g.anisotropyMapTransform))),g.specularIntensity.value=m.specularIntensity,g.specularColor.value.copy(m.specularColor),m.specularColorMap&&(g.specularColorMap.value=m.specularColorMap,t(m.specularColorMap,g.specularColorMapTransform)),m.specularIntensityMap&&(g.specularIntensityMap.value=m.specularIntensityMap,t(m.specularIntensityMap,g.specularIntensityMapTransform))}function p(g,m){m.matcap&&(g.matcap.value=m.matcap)}function _(g,m){const v=e.get(m).light;g.referencePosition.value.setFromMatrixPosition(v.matrixWorld),g.nearDistance.value=v.shadow.camera.near,g.farDistance.value=v.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:s}}function EF(n,e,t,i){let s={},r={},o=[];const a=n.getParameter(n.MAX_UNIFORM_BUFFER_BINDINGS);function l(v,b){const y=b.program;i.uniformBlockBinding(v,y)}function c(v,b){let y=s[v.id];y===void 0&&(p(v),y=u(v),s[v.id]=y,v.addEventListener("dispose",g));const T=b.program;i.updateUBOMapping(v,T);const w=e.render.frame;r[v.id]!==w&&(h(v),r[v.id]=w)}function u(v){const b=f();v.__bindingPointIndex=b;const y=n.createBuffer(),T=v.__size,w=v.usage;return n.bindBuffer(n.UNIFORM_BUFFER,y),n.bufferData(n.UNIFORM_BUFFER,T,w),n.bindBuffer(n.UNIFORM_BUFFER,null),n.bindBufferBase(n.UNIFORM_BUFFER,b,y),y}function f(){for(let v=0;v0&&(y+=T-w),v.__size=y,v.__cache={},this}function _(v){const b={boundary:0,storage:0};return typeof v=="number"||typeof v=="boolean"?(b.boundary=4,b.storage=4):v.isVector2?(b.boundary=8,b.storage=8):v.isVector3||v.isColor?(b.boundary=16,b.storage=12):v.isVector4?(b.boundary=16,b.storage=16):v.isMatrix3?(b.boundary=48,b.storage=48):v.isMatrix4?(b.boundary=64,b.storage=64):v.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",v),b}function g(v){const b=v.target;b.removeEventListener("dispose",g);const y=o.indexOf(b.__bindingPointIndex);o.splice(y,1),n.deleteBuffer(s[b.id]),delete s[b.id],delete r[b.id]}function m(){for(const v in s)n.deleteBuffer(s[v]);o=[],s={},r={}}return{bind:l,update:c,dispose:m}}class Tf{constructor(e={}){const{canvas:t=oE(),context:i=null,depth:s=!0,stencil:r=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:f=!1,reverseDepthBuffer:h=!1}=e;this.isWebGLRenderer=!0;let d;if(i!==null){if(typeof WebGLRenderingContext<"u"&&i instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");d=i.getContextAttributes().alpha}else d=o;const p=new Uint32Array(4),_=new Int32Array(4);let g=null,m=null;const v=[],b=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.toneMapping=ts,this.toneMappingExposure=1,this.transmissionResolutionScale=1;const y=this;let T=!1;this._outputColorSpace=Fn;let w=0,S=0,P=null,M=-1,E=null;const D=new vt,B=new vt;let z=null;const V=new Pe(0);let Q=0,j=t.width,te=t.height,Z=1,pe=null,Me=null;const re=new vt(0,0,j,te),xe=new vt(0,0,j,te);let We=!1;const oe=new Ha;let ge=!1,Se=!1;const $=new Je,ae=new Je,le=new k,ue=new vt,$e={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let N=!1;function U(){return P===null?Z:1}let A=i;function W(L,K){return t.getContext(L,K)}try{const L={alpha:!0,depth:s,stencil:r,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:u,failIfMajorPerformanceCaveat:f};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${Uc}`),t.addEventListener("webglcontextlost",Be,!1),t.addEventListener("webglcontextrestored",ve,!1),t.addEventListener("webglcontextcreationerror",he,!1),A===null){const K="webgl2";if(A=W(K,L),A===null)throw W(K)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(L){throw console.error("THREE.WebGLRenderer: "+L.message),L}let G,X,C,I,F,H,ce,R,x,O,Y,ne,ee,Te,me,Re,De,de,Ne,ze,Ve,we,it,q;function Ie(){G=new UN(A),G.init(),we=new mT(A,G),X=new RN(A,G,e,we),C=new gF(A,G),X.reverseDepthBuffer&&h&&C.buffers.depth.setReversed(!0),I=new BN(A),F=new iF,H=new _F(A,G,C,F,X,we,I),ce=new IN(y),R=new NN(y),x=new XL(A),it=new AN(A,x),O=new FN(A,x,I,it),Y=new VN(A,O,x,I),Ne=new zN(A,X,H),Re=new PN(F),ne=new nF(y,ce,R,G,X,it,Re),ee=new SF(y,F),Te=new rF,me=new fF(G),de=new wN(y,ce,R,C,Y,d,l),De=new pF(y,Y,X),q=new EF(A,I,X,C),ze=new CN(A,G,I),Ve=new kN(A,G,I),I.programs=ne.programs,y.capabilities=X,y.extensions=G,y.properties=F,y.renderLists=Te,y.shadowMap=De,y.state=C,y.info=I}Ie();const _e=new xF(y,A);this.xr=_e,this.getContext=function(){return A},this.getContextAttributes=function(){return A.getContextAttributes()},this.forceContextLoss=function(){const L=G.get("WEBGL_lose_context");L&&L.loseContext()},this.forceContextRestore=function(){const L=G.get("WEBGL_lose_context");L&&L.restoreContext()},this.getPixelRatio=function(){return Z},this.setPixelRatio=function(L){L!==void 0&&(Z=L,this.setSize(j,te,!1))},this.getSize=function(L){return L.set(j,te)},this.setSize=function(L,K,ie=!0){if(_e.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}j=L,te=K,t.width=Math.floor(L*Z),t.height=Math.floor(K*Z),ie===!0&&(t.style.width=L+"px",t.style.height=K+"px"),this.setViewport(0,0,L,K)},this.getDrawingBufferSize=function(L){return L.set(j*Z,te*Z).floor()},this.setDrawingBufferSize=function(L,K,ie){j=L,te=K,Z=ie,t.width=Math.floor(L*ie),t.height=Math.floor(K*ie),this.setViewport(0,0,L,K)},this.getCurrentViewport=function(L){return L.copy(D)},this.getViewport=function(L){return L.copy(re)},this.setViewport=function(L,K,ie,se){L.isVector4?re.set(L.x,L.y,L.z,L.w):re.set(L,K,ie,se),C.viewport(D.copy(re).multiplyScalar(Z).round())},this.getScissor=function(L){return L.copy(xe)},this.setScissor=function(L,K,ie,se){L.isVector4?xe.set(L.x,L.y,L.z,L.w):xe.set(L,K,ie,se),C.scissor(B.copy(xe).multiplyScalar(Z).round())},this.getScissorTest=function(){return We},this.setScissorTest=function(L){C.setScissorTest(We=L)},this.setOpaqueSort=function(L){pe=L},this.setTransparentSort=function(L){Me=L},this.getClearColor=function(L){return L.copy(de.getClearColor())},this.setClearColor=function(){de.setClearColor(...arguments)},this.getClearAlpha=function(){return de.getClearAlpha()},this.setClearAlpha=function(){de.setClearAlpha(...arguments)},this.clear=function(L=!0,K=!0,ie=!0){let se=0;if(L){let J=!1;if(P!==null){const be=P.texture.format;J=be===hd||be===fd||be===kc}if(J){const be=P.texture.type,Le=be===Bi||be===Vs||be===Ea||be===Ta||be===ld||be===cd,Ge=de.getClearColor(),Ue=de.getClearAlpha(),Qe=Ge.r,tt=Ge.g,qe=Ge.b;Le?(p[0]=Qe,p[1]=tt,p[2]=qe,p[3]=Ue,A.clearBufferuiv(A.COLOR,0,p)):(_[0]=Qe,_[1]=tt,_[2]=qe,_[3]=Ue,A.clearBufferiv(A.COLOR,0,_))}else se|=A.COLOR_BUFFER_BIT}K&&(se|=A.DEPTH_BUFFER_BIT),ie&&(se|=A.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),A.clear(se)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",Be,!1),t.removeEventListener("webglcontextrestored",ve,!1),t.removeEventListener("webglcontextcreationerror",he,!1),de.dispose(),Te.dispose(),me.dispose(),F.dispose(),ce.dispose(),R.dispose(),Y.dispose(),it.dispose(),q.dispose(),ne.dispose(),_e.dispose(),_e.removeEventListener("sessionstart",hv),_e.removeEventListener("sessionend",dv),Nr.stop()};function Be(L){L.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),T=!0}function ve(){console.log("THREE.WebGLRenderer: Context Restored."),T=!1;const L=I.autoReset,K=De.enabled,ie=De.autoUpdate,se=De.needsUpdate,J=De.type;Ie(),I.autoReset=L,De.enabled=K,De.autoUpdate=ie,De.needsUpdate=se,De.type=J}function he(L){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",L.statusMessage)}function He(L){const K=L.target;K.removeEventListener("dispose",He),ot(K)}function ot(L){Ut(L),F.remove(L)}function Ut(L){const K=F.get(L).programs;K!==void 0&&(K.forEach(function(ie){ne.releaseProgram(ie)}),L.isShaderMaterial&&ne.releaseShaderCache(L))}this.renderBufferDirect=function(L,K,ie,se,J,be){K===null&&(K=$e);const Le=J.isMesh&&J.matrixWorld.determinant()<0,Ge=tC(L,K,ie,se,J);C.setMaterial(se,Le);let Ue=ie.index,Qe=1;if(se.wireframe===!0){if(Ue=O.getWireframeAttribute(ie),Ue===void 0)return;Qe=2}const tt=ie.drawRange,qe=ie.attributes.position;let dt=tt.start*Qe,At=(tt.start+tt.count)*Qe;be!==null&&(dt=Math.max(dt,be.start*Qe),At=Math.min(At,(be.start+be.count)*Qe)),Ue!==null?(dt=Math.max(dt,0),At=Math.min(At,Ue.count)):qe!=null&&(dt=Math.max(dt,0),At=Math.min(At,qe.count));const zt=At-dt;if(zt<0||zt===1/0)return;it.setup(J,se,Ge,ie,Ue);let Wt,yt=ze;if(Ue!==null&&(Wt=x.get(Ue),yt=Ve,yt.setIndex(Wt)),J.isMesh)se.wireframe===!0?(C.setLineWidth(se.wireframeLinewidth*U()),yt.setMode(A.LINES)):yt.setMode(A.TRIANGLES);else if(J.isLine){let Ye=se.linewidth;Ye===void 0&&(Ye=1),C.setLineWidth(Ye*U()),J.isLineSegments?yt.setMode(A.LINES):J.isLineLoop?yt.setMode(A.LINE_LOOP):yt.setMode(A.LINE_STRIP)}else J.isPoints?yt.setMode(A.POINTS):J.isSprite&&yt.setMode(A.TRIANGLES);if(J.isBatchedMesh)if(J._multiDrawInstances!==null)ga("THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),yt.renderMultiDrawInstances(J._multiDrawStarts,J._multiDrawCounts,J._multiDrawCount,J._multiDrawInstances);else if(G.get("WEBGL_multi_draw"))yt.renderMultiDraw(J._multiDrawStarts,J._multiDrawCounts,J._multiDrawCount);else{const Ye=J._multiDrawStarts,dn=J._multiDrawCounts,Mt=J._multiDrawCount,wi=Ue?x.get(Ue).bytesPerElement:1,Uo=F.get(se).currentProgram.getUniforms();for(let ni=0;ni{function be(){if(se.forEach(function(Le){F.get(Le).currentProgram.isReady()&&se.delete(Le)}),se.size===0){J(L);return}setTimeout(be,10)}G.get("KHR_parallel_shader_compile")!==null?be():setTimeout(be,10)})};let Ti=null;function us(L){Ti&&Ti(L)}function hv(){Nr.stop()}function dv(){Nr.start()}const Nr=new uT;Nr.setAnimationLoop(us),typeof self<"u"&&Nr.setContext(self),this.setAnimationLoop=function(L){Ti=L,_e.setAnimationLoop(L),L===null?Nr.stop():Nr.start()},_e.addEventListener("sessionstart",hv),_e.addEventListener("sessionend",dv),this.render=function(L,K){if(K!==void 0&&K.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(T===!0)return;if(L.matrixWorldAutoUpdate===!0&&L.updateMatrixWorld(),K.parent===null&&K.matrixWorldAutoUpdate===!0&&K.updateMatrixWorld(),_e.enabled===!0&&_e.isPresenting===!0&&(_e.cameraAutoUpdate===!0&&_e.updateCamera(K),K=_e.getCamera()),L.isScene===!0&&L.onBeforeRender(y,L,K,P),m=me.get(L,b.length),m.init(K),b.push(m),ae.multiplyMatrices(K.projectionMatrix,K.matrixWorldInverse),oe.setFromProjectionMatrix(ae),Se=this.localClippingEnabled,ge=Re.init(this.clippingPlanes,Se),g=Te.get(L,v.length),g.init(),v.push(g),_e.enabled===!0&&_e.isPresenting===!0){const be=y.xr.getDepthSensingMesh();be!==null&&lp(be,K,-1/0,y.sortObjects)}lp(L,K,0,y.sortObjects),g.finish(),y.sortObjects===!0&&g.sort(pe,Me),N=_e.enabled===!1||_e.isPresenting===!1||_e.hasDepthSensing()===!1,N&&de.addToRenderList(g,L),this.info.render.frame++,ge===!0&&Re.beginShadows();const ie=m.state.shadowsArray;De.render(ie,L,K),ge===!0&&Re.endShadows(),this.info.autoReset===!0&&this.info.reset();const se=g.opaque,J=g.transmissive;if(m.setupLights(),K.isArrayCamera){const be=K.cameras;if(J.length>0)for(let Le=0,Ge=be.length;Le0&&mv(se,J,L,K),N&&de.render(L),pv(g,L,K);P!==null&&S===0&&(H.updateMultisampleRenderTarget(P),H.updateRenderTargetMipmap(P)),L.isScene===!0&&L.onAfterRender(y,L,K),it.resetDefaultState(),M=-1,E=null,b.pop(),b.length>0?(m=b[b.length-1],ge===!0&&Re.setGlobalState(y.clippingPlanes,m.state.camera)):m=null,v.pop(),v.length>0?g=v[v.length-1]:g=null};function lp(L,K,ie,se){if(L.visible===!1)return;if(L.layers.test(K.layers)){if(L.isGroup)ie=L.renderOrder;else if(L.isLOD)L.autoUpdate===!0&&L.update(K);else if(L.isLight)m.pushLight(L),L.castShadow&&m.pushShadow(L);else if(L.isSprite){if(!L.frustumCulled||oe.intersectsSprite(L)){se&&ue.setFromMatrixPosition(L.matrixWorld).applyMatrix4(ae);const Le=Y.update(L),Ge=L.material;Ge.visible&&g.push(L,Le,Ge,ie,ue.z,null)}}else if((L.isMesh||L.isLine||L.isPoints)&&(!L.frustumCulled||oe.intersectsObject(L))){const Le=Y.update(L),Ge=L.material;if(se&&(L.boundingSphere!==void 0?(L.boundingSphere===null&&L.computeBoundingSphere(),ue.copy(L.boundingSphere.center)):(Le.boundingSphere===null&&Le.computeBoundingSphere(),ue.copy(Le.boundingSphere.center)),ue.applyMatrix4(L.matrixWorld).applyMatrix4(ae)),Array.isArray(Ge)){const Ue=Le.groups;for(let Qe=0,tt=Ue.length;Qe0&&iu(J,K,ie),be.length>0&&iu(be,K,ie),Le.length>0&&iu(Le,K,ie),C.buffers.depth.setTest(!0),C.buffers.depth.setMask(!0),C.buffers.color.setMask(!0),C.setPolygonOffset(!1)}function mv(L,K,ie,se){if((ie.isScene===!0?ie.overrideMaterial:null)!==null)return;m.state.transmissionRenderTarget[se.id]===void 0&&(m.state.transmissionRenderTarget[se.id]=new os(1,1,{generateMipmaps:!0,type:G.has("EXT_color_buffer_half_float")||G.has("EXT_color_buffer_float")?za:Bi,minFilter:Qi,samples:4,stencilBuffer:r,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:pt.workingColorSpace}));const be=m.state.transmissionRenderTarget[se.id],Le=se.viewport||D;be.setSize(Le.z*y.transmissionResolutionScale,Le.w*y.transmissionResolutionScale);const Ge=y.getRenderTarget();y.setRenderTarget(be),y.getClearColor(V),Q=y.getClearAlpha(),Q<1&&y.setClearColor(16777215,.5),y.clear(),N&&de.render(ie);const Ue=y.toneMapping;y.toneMapping=ts;const Qe=se.viewport;if(se.viewport!==void 0&&(se.viewport=void 0),m.setupLightsView(se),ge===!0&&Re.setGlobalState(y.clippingPlanes,se),iu(L,ie,se),H.updateMultisampleRenderTarget(be),H.updateRenderTargetMipmap(be),G.has("WEBGL_multisampled_render_to_texture")===!1){let tt=!1;for(let qe=0,dt=K.length;qe0),qe=!!ie.morphAttributes.position,dt=!!ie.morphAttributes.normal,At=!!ie.morphAttributes.color;let zt=ts;se.toneMapped&&(P===null||P.isXRRenderTarget===!0)&&(zt=y.toneMapping);const Wt=ie.morphAttributes.position||ie.morphAttributes.normal||ie.morphAttributes.color,yt=Wt!==void 0?Wt.length:0,Ye=F.get(se),dn=m.state.lights;if(ge===!0&&(Se===!0||L!==E)){const In=L===E&&se.id===M;Re.setState(se,L,In)}let Mt=!1;se.version===Ye.__version?(Ye.needsLights&&Ye.lightsStateVersion!==dn.state.version||Ye.outputColorSpace!==Ge||J.isBatchedMesh&&Ye.batching===!1||!J.isBatchedMesh&&Ye.batching===!0||J.isBatchedMesh&&Ye.batchingColor===!0&&J.colorTexture===null||J.isBatchedMesh&&Ye.batchingColor===!1&&J.colorTexture!==null||J.isInstancedMesh&&Ye.instancing===!1||!J.isInstancedMesh&&Ye.instancing===!0||J.isSkinnedMesh&&Ye.skinning===!1||!J.isSkinnedMesh&&Ye.skinning===!0||J.isInstancedMesh&&Ye.instancingColor===!0&&J.instanceColor===null||J.isInstancedMesh&&Ye.instancingColor===!1&&J.instanceColor!==null||J.isInstancedMesh&&Ye.instancingMorph===!0&&J.morphTexture===null||J.isInstancedMesh&&Ye.instancingMorph===!1&&J.morphTexture!==null||Ye.envMap!==Ue||se.fog===!0&&Ye.fog!==be||Ye.numClippingPlanes!==void 0&&(Ye.numClippingPlanes!==Re.numPlanes||Ye.numIntersection!==Re.numIntersection)||Ye.vertexAlphas!==Qe||Ye.vertexTangents!==tt||Ye.morphTargets!==qe||Ye.morphNormals!==dt||Ye.morphColors!==At||Ye.toneMapping!==zt||Ye.morphTargetsCount!==yt)&&(Mt=!0):(Mt=!0,Ye.__version=se.version);let wi=Ye.currentProgram;Mt===!0&&(wi=su(se,K,J));let Uo=!1,ni=!1,ja=!1;const kt=wi.getUniforms(),ci=Ye.uniforms;if(C.useProgram(wi.program)&&(Uo=!0,ni=!0,ja=!0),se.id!==M&&(M=se.id,ni=!0),Uo||E!==L){C.buffers.depth.getReversed()?($.copy(L.projectionMatrix),hP($),dP($),kt.setValue(A,"projectionMatrix",$)):kt.setValue(A,"projectionMatrix",L.projectionMatrix),kt.setValue(A,"viewMatrix",L.matrixWorldInverse);const Xn=kt.map.cameraPosition;Xn!==void 0&&Xn.setValue(A,le.setFromMatrixPosition(L.matrixWorld)),X.logarithmicDepthBuffer&&kt.setValue(A,"logDepthBufFC",2/(Math.log(L.far+1)/Math.LN2)),(se.isMeshPhongMaterial||se.isMeshToonMaterial||se.isMeshLambertMaterial||se.isMeshBasicMaterial||se.isMeshStandardMaterial||se.isShaderMaterial)&&kt.setValue(A,"isOrthographic",L.isOrthographicCamera===!0),E!==L&&(E=L,ni=!0,ja=!0)}if(J.isSkinnedMesh){kt.setOptional(A,J,"bindMatrix"),kt.setOptional(A,J,"bindMatrixInverse");const In=J.skeleton;In&&(In.boneTexture===null&&In.computeBoneTexture(),kt.setValue(A,"boneTexture",In.boneTexture,H))}J.isBatchedMesh&&(kt.setOptional(A,J,"batchingTexture"),kt.setValue(A,"batchingTexture",J._matricesTexture,H),kt.setOptional(A,J,"batchingIdTexture"),kt.setValue(A,"batchingIdTexture",J._indirectTexture,H),kt.setOptional(A,J,"batchingColorTexture"),J._colorsTexture!==null&&kt.setValue(A,"batchingColorTexture",J._colorsTexture,H));const ui=ie.morphAttributes;if((ui.position!==void 0||ui.normal!==void 0||ui.color!==void 0)&&Ne.update(J,ie,wi),(ni||Ye.receiveShadow!==J.receiveShadow)&&(Ye.receiveShadow=J.receiveShadow,kt.setValue(A,"receiveShadow",J.receiveShadow)),se.isMeshGouraudMaterial&&se.envMap!==null&&(ci.envMap.value=Ue,ci.flipEnvMap.value=Ue.isCubeTexture&&Ue.isRenderTargetTexture===!1?-1:1),se.isMeshStandardMaterial&&se.envMap===null&&K.environment!==null&&(ci.envMapIntensity.value=K.environmentIntensity),ni&&(kt.setValue(A,"toneMappingExposure",y.toneMappingExposure),Ye.needsLights&&nC(ci,ja),be&&se.fog===!0&&ee.refreshFogUniforms(ci,be),ee.refreshMaterialUniforms(ci,se,Z,te,m.state.transmissionRenderTarget[L.id]),Ef.upload(A,_v(Ye),ci,H)),se.isShaderMaterial&&se.uniformsNeedUpdate===!0&&(Ef.upload(A,_v(Ye),ci,H),se.uniformsNeedUpdate=!1),se.isSpriteMaterial&&kt.setValue(A,"center",J.center),kt.setValue(A,"modelViewMatrix",J.modelViewMatrix),kt.setValue(A,"normalMatrix",J.normalMatrix),kt.setValue(A,"modelMatrix",J.matrixWorld),se.isShaderMaterial||se.isRawShaderMaterial){const In=se.uniformsGroups;for(let Xn=0,cp=In.length;Xn0&&H.useMultisampledRTT(L)===!1?J=F.get(L).__webglMultisampledFramebuffer:Array.isArray(tt)?J=tt[ie]:J=tt,D.copy(L.viewport),B.copy(L.scissor),z=L.scissorTest}else D.copy(re).multiplyScalar(Z).floor(),B.copy(xe).multiplyScalar(Z).floor(),z=We;if(ie!==0&&(J=sC),C.bindFramebuffer(A.FRAMEBUFFER,J)&&se&&C.drawBuffers(L,J),C.viewport(D),C.scissor(B),C.setScissorTest(z),be){const Ue=F.get(L.texture);A.framebufferTexture2D(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,A.TEXTURE_CUBE_MAP_POSITIVE_X+K,Ue.__webglTexture,ie)}else if(Le){const Ue=F.get(L.texture),Qe=K;A.framebufferTextureLayer(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,Ue.__webglTexture,ie,Qe)}else if(L!==null&&ie!==0){const Ue=F.get(L.texture);A.framebufferTexture2D(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,A.TEXTURE_2D,Ue.__webglTexture,ie)}M=-1},this.readRenderTargetPixels=function(L,K,ie,se,J,be,Le,Ge=0){if(!(L&&L.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Ue=F.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&Le!==void 0&&(Ue=Ue[Le]),Ue){C.bindFramebuffer(A.FRAMEBUFFER,Ue);try{const Qe=L.textures[Ge],tt=Qe.format,qe=Qe.type;if(!X.textureFormatReadable(tt)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!X.textureTypeReadable(qe)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}K>=0&&K<=L.width-se&&ie>=0&&ie<=L.height-J&&(L.textures.length>1&&A.readBuffer(A.COLOR_ATTACHMENT0+Ge),A.readPixels(K,ie,se,J,we.convert(tt),we.convert(qe),be))}finally{const Qe=P!==null?F.get(P).__webglFramebuffer:null;C.bindFramebuffer(A.FRAMEBUFFER,Qe)}}},this.readRenderTargetPixelsAsync=async function(L,K,ie,se,J,be,Le,Ge=0){if(!(L&&L.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Ue=F.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&Le!==void 0&&(Ue=Ue[Le]),Ue)if(K>=0&&K<=L.width-se&&ie>=0&&ie<=L.height-J){C.bindFramebuffer(A.FRAMEBUFFER,Ue);const Qe=L.textures[Ge],tt=Qe.format,qe=Qe.type;if(!X.textureFormatReadable(tt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!X.textureTypeReadable(qe))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");const dt=A.createBuffer();A.bindBuffer(A.PIXEL_PACK_BUFFER,dt),A.bufferData(A.PIXEL_PACK_BUFFER,be.byteLength,A.STREAM_READ),L.textures.length>1&&A.readBuffer(A.COLOR_ATTACHMENT0+Ge),A.readPixels(K,ie,se,J,we.convert(tt),we.convert(qe),0);const At=P!==null?F.get(P).__webglFramebuffer:null;C.bindFramebuffer(A.FRAMEBUFFER,At);const zt=A.fenceSync(A.SYNC_GPU_COMMANDS_COMPLETE,0);return A.flush(),await fP(A,zt,4),A.bindBuffer(A.PIXEL_PACK_BUFFER,dt),A.getBufferSubData(A.PIXEL_PACK_BUFFER,0,be),A.deleteBuffer(dt),A.deleteSync(zt),be}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(L,K=null,ie=0){const se=Math.pow(2,-ie),J=Math.floor(L.image.width*se),be=Math.floor(L.image.height*se),Le=K!==null?K.x:0,Ge=K!==null?K.y:0;H.setTexture2D(L,0),A.copyTexSubImage2D(A.TEXTURE_2D,ie,0,0,Le,Ge,J,be),C.unbindTexture()};const rC=A.createFramebuffer(),oC=A.createFramebuffer();this.copyTextureToTexture=function(L,K,ie=null,se=null,J=0,be=null){be===null&&(J!==0?(ga("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),be=J,J=0):be=0);let Le,Ge,Ue,Qe,tt,qe,dt,At,zt;const Wt=L.isCompressedTexture?L.mipmaps[be]:L.image;if(ie!==null)Le=ie.max.x-ie.min.x,Ge=ie.max.y-ie.min.y,Ue=ie.isBox3?ie.max.z-ie.min.z:1,Qe=ie.min.x,tt=ie.min.y,qe=ie.isBox3?ie.min.z:0;else{const ui=Math.pow(2,-J);Le=Math.floor(Wt.width*ui),Ge=Math.floor(Wt.height*ui),L.isDataArrayTexture?Ue=Wt.depth:L.isData3DTexture?Ue=Math.floor(Wt.depth*ui):Ue=1,Qe=0,tt=0,qe=0}se!==null?(dt=se.x,At=se.y,zt=se.z):(dt=0,At=0,zt=0);const yt=we.convert(K.format),Ye=we.convert(K.type);let dn;K.isData3DTexture?(H.setTexture3D(K,0),dn=A.TEXTURE_3D):K.isDataArrayTexture||K.isCompressedArrayTexture?(H.setTexture2DArray(K,0),dn=A.TEXTURE_2D_ARRAY):(H.setTexture2D(K,0),dn=A.TEXTURE_2D),A.pixelStorei(A.UNPACK_FLIP_Y_WEBGL,K.flipY),A.pixelStorei(A.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),A.pixelStorei(A.UNPACK_ALIGNMENT,K.unpackAlignment);const Mt=A.getParameter(A.UNPACK_ROW_LENGTH),wi=A.getParameter(A.UNPACK_IMAGE_HEIGHT),Uo=A.getParameter(A.UNPACK_SKIP_PIXELS),ni=A.getParameter(A.UNPACK_SKIP_ROWS),ja=A.getParameter(A.UNPACK_SKIP_IMAGES);A.pixelStorei(A.UNPACK_ROW_LENGTH,Wt.width),A.pixelStorei(A.UNPACK_IMAGE_HEIGHT,Wt.height),A.pixelStorei(A.UNPACK_SKIP_PIXELS,Qe),A.pixelStorei(A.UNPACK_SKIP_ROWS,tt),A.pixelStorei(A.UNPACK_SKIP_IMAGES,qe);const kt=L.isDataArrayTexture||L.isData3DTexture,ci=K.isDataArrayTexture||K.isData3DTexture;if(L.isDepthTexture){const ui=F.get(L),In=F.get(K),Xn=F.get(ui.__renderTarget),cp=F.get(In.__renderTarget);C.bindFramebuffer(A.READ_FRAMEBUFFER,Xn.__webglFramebuffer),C.bindFramebuffer(A.DRAW_FRAMEBUFFER,cp.__webglFramebuffer);for(let Ur=0;Ur{n.delete(r)};return{on:r=>{n.add(r);const o=()=>e(r);return Er(o),{off:o}},off:e,trigger:(...r)=>Promise.all(Array.from(n).map(o=>o(...r))),clear:()=>{n.clear()}}}const um=new WeakMap,wF=(...n)=>{var e;const t=n[0],i=(e=Rn())==null?void 0:e.proxy;if(i==null&&!Ic())throw new Error("injectLocal must be called in setup");return i&&um.has(i)&&t in um.get(i)?um.get(i)[t]:_n(...n)},Cg=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const AF=n=>typeof n<"u",CF=n=>n!=null,RF=Object.prototype.toString,PF=n=>RF.call(n)==="[object Object]",Rg=()=>{};function IF(n,e){function t(...i){return new Promise((s,r)=>{Promise.resolve(n(()=>e.apply(this,i),{fn:e,thisArg:this,args:i})).then(s).catch(r)})}return t}function LF(n,e={}){let t,i,s=Rg;const r=l=>{clearTimeout(l),s(),s=Rg};let o;return l=>{const c=rt(n),u=rt(e.maxWait);return t&&r(t),c<=0||u!==void 0&&u<=0?(i&&(r(i),i=null),Promise.resolve(l())):new Promise((f,h)=>{s=e.rejectOnCancel?h:f,o=l,u&&!i&&(i=setTimeout(()=>{t&&r(t),i=null,f(o())},u)),t=setTimeout(()=>{i&&r(i),i=null,f(l())},c)})}}function Hb(n){return n.endsWith("rem")?Number.parseFloat(n)*16:Number.parseFloat(n)}function DF(n,e,t=!1){return e.reduce((i,s)=>(s in n&&(!t||n[s]!==void 0)&&(i[s]=n[s]),i),{})}function OF(n){return Rn()}function Nl(n){return Array.isArray(n)?n:[n]}function NF(n,e=200,t={}){return IF(LF(e,t),n)}function Gb(n,e=200,t={}){const i=nt(n.value),s=NF(()=>{i.value=n.value},e,t);return Ke(n,()=>s()),i}function UF(n,e={}){if(!Lt(n))return vS(n);const t=Array.isArray(n.value)?Array.from({length:n.value.length}):{};for(const i in n.value)t[i]=R0(()=>({get(){return n.value[i]},set(s){var r;if((r=rt(e.replaceRef))!=null?r:!0)if(Array.isArray(n.value)){const a=[...n.value];a[i]=s,n.value=a}else{const a={...n.value,[i]:s};Object.setPrototypeOf(a,Object.getPrototypeOf(n.value)),n.value=a}else n.value[i]=s}}));return t}const pn=rt;function P_(n,e=!0,t){OF()?Gn(n,t):e?n():Ar(n)}function FF(n,e=1e3,t={}){const{immediate:i=!0,immediateCallback:s=!1}=t;let r=null;const o=Oe(!1);function a(){r&&(clearInterval(r),r=null)}function l(){o.value=!1,a()}function c(){const u=rt(e);u<=0||(o.value=!0,s&&n(),a(),o.value&&(r=setInterval(n,u)))}if(i&&Cg&&c(),Lt(e)||typeof e=="function"){const u=Ke(e,()=>{o.value&&Cg&&c()});Er(u)}return Er(l),{isActive:o,pause:l,resume:c}}function gT(n,e,t){return Ke(n,e,{...t,immediate:!0})}const $s=Cg?window:void 0;function Di(n){var e;const t=rt(n);return(e=t==null?void 0:t.$el)!=null?e:t}function Ao(...n){const e=[],t=()=>{e.forEach(a=>a()),e.length=0},i=(a,l,c,u)=>(a.addEventListener(l,c,u),()=>a.removeEventListener(l,c,u)),s=Ee(()=>{const a=Nl(rt(n[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0}),r=gT(()=>{var a,l;return[(l=(a=s.value)==null?void 0:a.map(c=>Di(c)))!=null?l:[$s].filter(c=>c!=null),Nl(rt(s.value?n[1]:n[0])),Nl(Ft(s.value?n[2]:n[1])),rt(s.value?n[3]:n[2])]},([a,l,c,u])=>{if(t(),!(a!=null&&a.length)||!(l!=null&&l.length)||!(c!=null&&c.length))return;const f=PF(u)?{...u}:u;e.push(...a.flatMap(h=>l.flatMap(d=>c.map(p=>i(h,d,p,f)))))},{flush:"post"}),o=()=>{r(),t()};return Er(t),o}function kF(){const n=Oe(!1),e=Rn();return e&&Gn(()=>{n.value=!0},e),n}function zd(n){const e=kF();return Ee(()=>(e.value,!!n()))}function BF(n,e,t={}){const{window:i=$s,...s}=t;let r;const o=zd(()=>i&&"MutationObserver"in i),a=()=>{r&&(r.disconnect(),r=void 0)},l=Ee(()=>{const h=rt(n),d=Nl(h).map(Di).filter(CF);return new Set(d)}),c=Ke(()=>l.value,h=>{a(),o.value&&h.size&&(r=new MutationObserver(e),h.forEach(d=>r.observe(d,s)))},{immediate:!0,flush:"post"}),u=()=>r==null?void 0:r.takeRecords(),f=()=>{c(),a()};return Er(f),{isSupported:o,stop:f,takeRecords:u}}function I_(n,e={}){const{immediate:t=!0,fpsLimit:i=void 0,window:s=$s,once:r=!1}=e,o=Oe(!1),a=Ee(()=>i?1e3/rt(i):null);let l=0,c=null;function u(d){if(!o.value||!s)return;l||(l=d);const p=d-l;if(a.value&&pt&&"matchMedia"in t&&typeof t.matchMedia=="function"),r=Oe(typeof i=="number"),o=Oe(),a=Oe(!1),l=c=>{a.value=c.matches};return Lc(()=>{if(r.value){r.value=!s.value;const c=rt(n).split(",");a.value=c.some(u=>{const f=u.includes("not all"),h=u.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),d=u.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let p=!!(h||d);return h&&p&&(p=i>=Hb(h[1])),d&&p&&(p=i<=Hb(d[1])),f?!p:p});return}s.value&&(o.value=t.matchMedia(rt(n)),a.value=o.value.matches)}),Ao(o,"change",l,{passive:!0}),Ee(()=>a.value)}function HF(n){return JSON.parse(JSON.stringify(n))}function GF(n={}){const{window:e=$s}=n,t=Oe(1),i=_T(()=>`(resolution: ${t.value}dppx)`,n);let s=Rg;return e&&(s=gT(i,()=>t.value=e.devicePixelRatio)),{pixelRatio:Fi(t),stop:s}}function vT(n,e,t={}){const{window:i=$s,...s}=t;let r;const o=zd(()=>i&&"ResizeObserver"in i),a=()=>{r&&(r.disconnect(),r=void 0)},l=Ee(()=>{const f=rt(n);return Array.isArray(f)?f.map(h=>Di(h)):[Di(f)]}),c=Ke(l,f=>{if(a(),o.value&&i){r=new ResizeObserver(e);for(const h of f)h&&r.observe(h,s)}},{immediate:!0,flush:"post"}),u=()=>{a(),c()};return Er(u),{isSupported:o,stop:u}}function WF(n,e={}){const{reset:t=!0,windowResize:i=!0,windowScroll:s=!0,immediate:r=!0,updateTiming:o="sync"}=e,a=Oe(0),l=Oe(0),c=Oe(0),u=Oe(0),f=Oe(0),h=Oe(0),d=Oe(0),p=Oe(0);function _(){const m=Di(n);if(!m){t&&(a.value=0,l.value=0,c.value=0,u.value=0,f.value=0,h.value=0,d.value=0,p.value=0);return}const v=m.getBoundingClientRect();a.value=v.height,l.value=v.bottom,c.value=v.left,u.value=v.right,f.value=v.top,h.value=v.width,d.value=v.x,p.value=v.y}function g(){o==="sync"?_():o==="next-frame"&&requestAnimationFrame(()=>_())}return vT(n,g),Ke(()=>Di(n),m=>!m&&g()),BF(n,g,{attributeFilter:["style","class"]}),s&&Ao("scroll",g,{capture:!0,passive:!0}),i&&Ao("resize",g,{passive:!0}),P_(()=>{r&&g()}),{height:a,bottom:l,left:c,right:u,top:f,width:h,x:d,y:p,update:g}}function XF(n,e={width:0,height:0},t={}){const{window:i=$s,box:s="content-box"}=t,r=Ee(()=>{var f,h;return(h=(f=Di(n))==null?void 0:f.namespaceURI)==null?void 0:h.includes("svg")}),o=Oe(e.width),a=Oe(e.height),{stop:l}=vT(n,([f])=>{const h=s==="border-box"?f.borderBoxSize:s==="content-box"?f.contentBoxSize:f.devicePixelContentBoxSize;if(i&&r.value){const d=Di(n);if(d){const p=d.getBoundingClientRect();o.value=p.width,a.value=p.height}}else if(h){const d=Nl(h);o.value=d.reduce((p,{inlineSize:_})=>p+_,0),a.value=d.reduce((p,{blockSize:_})=>p+_,0)}else o.value=f.contentRect.width,a.value=f.contentRect.height},t);P_(()=>{const f=Di(n);f&&(o.value="offsetWidth"in f?f.offsetWidth:e.width,a.value="offsetHeight"in f?f.offsetHeight:e.height)});const c=Ke(()=>Di(n),f=>{o.value=f?e.width:0,a.value=f?e.height:0});function u(){l(),c()}return{width:o,height:a,stop:u}}function $F(n){var e;const t=Oe(0);if(typeof performance>"u")return t;const i=(e=n==null?void 0:n.every)!=null?e:10;let s=performance.now(),r=0;return I_(()=>{if(r+=1,r>=i){const o=performance.now(),a=o-s;t.value=Math.round(1e3/(a/r)),s=o,r=0}}),t}function qF(n={}){const e=nt(),t=zd(()=>typeof performance<"u"&&"memory"in performance);if(t.value){const{interval:i=1e3}=n;FF(()=>{e.value=performance.memory},i,{immediate:n.immediate,immediateCallback:n.immediateCallback})}return{isSupported:t,memory:e}}const yT={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},YF=Object.keys(yT);function jF(n={}){const{target:e=$s}=n,t=Oe(!1),i=nt(n.initialValue||{});Object.assign(i.value,yT,i.value);const s=r=>{t.value=!0,!(n.pointerTypes&&!n.pointerTypes.includes(r.pointerType))&&(i.value=DF(r,YF,!1))};if(e){const r={passive:!0};Ao(e,["pointerdown","pointermove","pointerup"],s,r),Ao(e,"pointerleave",()=>t.value=!1,r)}return{...UF(i),isInside:t}}function RG(n,e,t,i={}){var s,r,o;const{clone:a=!1,passive:l=!1,eventName:c,deep:u=!1,defaultValue:f,shouldEmit:h}=i,d=Rn(),p=t||(d==null?void 0:d.emit)||((s=d==null?void 0:d.$emit)==null?void 0:s.bind(d))||((o=(r=d==null?void 0:d.proxy)==null?void 0:r.$emit)==null?void 0:o.bind(d==null?void 0:d.proxy));let _=c;_=_||`update:${e.toString()}`;const g=b=>a?typeof a=="function"?a(b):HF(b):b,m=()=>AF(n[e])?g(n[e]):f,v=b=>{h?h(b)&&p(_,b):p(_,b)};if(l){const b=m(),y=nt(b);let T=!1;return Ke(()=>n[e],w=>{T||(T=!0,y.value=g(w),Ar(()=>T=!1))}),Ke(y,w=>{!T&&(w!==n[e]||u)&&v(w)},{deep:u}),y}else return Ee({get(){return m()},set(b){v(b)}})}function KF(n={}){const{window:e=$s,initialWidth:t=Number.POSITIVE_INFINITY,initialHeight:i=Number.POSITIVE_INFINITY,listenOrientation:s=!0,includeScrollbar:r=!0,type:o="inner"}=n,a=Oe(t),l=Oe(i),c=()=>{if(e)if(o==="outer")a.value=e.outerWidth,l.value=e.outerHeight;else if(o==="visual"&&e.visualViewport){const{width:f,height:h,scale:d}=e.visualViewport;a.value=Math.round(f*d),l.value=Math.round(h*d)}else r?(a.value=e.innerWidth,l.value=e.innerHeight):(a.value=e.document.documentElement.clientWidth,l.value=e.document.documentElement.clientHeight)};c(),P_(c);const u={passive:!0};if(Ao("resize",c,u),e&&o==="visual"&&e.visualViewport&&Ao(e.visualViewport,"resize",c,u),s){const f=_T("(orientation: portrait)");Ke(f,()=>c())}return{width:a,height:l}}var ZF=Object.defineProperty,JF=(n,e,t)=>e in n?ZF(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Wb=(n,e,t)=>JF(n,typeof e!="symbol"?e+"":e,t);const QF="@tresjs/core",ek="module",tk="4.3.5",nk="pnpm@10.6.3",ik="Declarative ThreeJS using Vue Components",sk="Alvaro Saburido (https://github.com/alvarosabu/)",rk="MIT",ok={type:"git",url:"git+https://github.com/Tresjs/tres.git"},ak=["vue","3d","threejs","three","threejs-vue"],lk=!1,ck={".":{types:"./dist/index.d.ts",import:"./dist/tres.js",require:"./dist/tres.umd.cjs"},"./components":{types:"./dist/src/components/index.d.ts"},"./composables":{types:"./dist/src/composables/index.d.ts"},"./types":{types:"./dist/src/types/index.d.ts"},"./utils":{types:"./dist/src/utils/index.d.ts"},"./*":"./*"},uk="./dist/tres.js",fk="./dist/tres.js",hk="./dist/index.d.ts",dk=["*.d.ts","dist"],pk={access:"public"},mk={dev:"pnpm --filter='./playground/vue' dev","dev:nuxt":"pnpm --filter='./playground/nuxt' dev",build:"vite build",test:"vitest","test:ci":"vitest run","test:ui":"vitest --ui --coverage.enabled=true",release:"release-it",coverage:"vitest run --coverage",lint:"eslint .","lint:fix":"eslint . --fix","docs:dev":"vitepress dev docs","docs:build":"vitepress build docs","docs:serve":"vitepress serve docs","docs:preview":"vitepress preview docs","docs:contributors":"esno scripts/update-contributors.ts"},gk={three:">=0.133",vue:">=3.4"},_k={"@alvarosabu/utils":"^3.2.0","@vue/devtools-api":"^6.6.3","@vueuse/core":"^12.5.0"},vk={"@release-it/conventional-changelog":"^10.0.0","@stackblitz/sdk":"^1.11.0","@tresjs/cientos":"4.1.0","@tresjs/eslint-config":"^1.4.0","@types/three":"^0.173.0","@typescript-eslint/eslint-plugin":"^8.23.0","@typescript-eslint/parser":"^8.23.0","@vitejs/plugin-vue":"^5.2.1","@vitest/coverage-c8":"^0.33.0","@vitest/coverage-v8":"^3.0.5","@vitest/ui":"^3.0.5","@vue/test-utils":"^2.4.6",eslint:"^9.19.0","eslint-plugin-vue":"^9.32.0",esno:"^4.8.0",gsap:"^3.12.7",jsdom:"^26.0.0",kolorist:"^1.8.0",ohmyfetch:"^0.4.21",pathe:"^2.0.2","release-it":"^18.1.2","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-copy":"^3.5.0","rollup-plugin-visualizer":"^5.14.0",sponsorkit:"^16.3.0",three:"^0.173.0",unocss:"^65.4.3",unplugin:"^2.1.2","unplugin-vue-components":"^28.0.0",vite:"^6.1.0","vite-plugin-banner":"^0.8.0","vite-plugin-dts":"4.5.0","vite-plugin-inspect":"^10.1.0","vite-plugin-require-transform":"^1.0.21","vite-svg-loader":"^5.1.0",vitepress:"1.6.3",vitest:"3.0.5",vue:"3.5.13","vue-demi":"^0.14.10"},yk={name:QF,type:ek,version:tk,packageManager:nk,description:ik,author:sk,license:rk,repository:ok,keywords:ak,sideEffects:lk,exports:ck,main:uk,module:fk,types:hk,files:dk,publishConfig:pk,scripts:mk,peerDependencies:gk,dependencies:_k,devDependencies:vk};class bk extends jt{constructor(...e){super(...e),Wb(this,"type","HightlightMesh"),Wb(this,"createTime"),this.createTime=Date.now()}onBeforeRender(){const e=(Date.now()-this.createTime)/1e3,t=1+.07*Math.sin(2.5*e);this.scale.set(t,t,t)}}function Pg(n){return typeof n>"u"}function L_(n){return Array.isArray(n)}function xk(n){return typeof n=="number"}function bT(n){return typeof n=="string"}function fa(n){return typeof n=="function"}function cs(n){return n===Object(n)&&!L_(n)&&!fa(n)}function pr(n){return cs(n)&&!!n.isObject3D}function xT(n){return cs(n)&&!!n.isColor}function Mk(n){return n!=null&&(typeof n=="string"||typeof n=="number"||xT(n))}function Ig(n){return n!==null&&typeof n=="object"&&"set"in n&&typeof n.set=="function"}function Sk(n){return Ig(n)&&"copy"in n&&typeof n.copy=="function"}function Ek(n){return!!(n!=null&&n.constructor)}function Xb(n){return n instanceof Bc}function $b(n){return cs(n)&&!!n.isCamera}function Tk(n){return cs(n)&&!!n.isBufferGeometry}function wk(n){return cs(n)&&!!n.isMaterial}function Ak(n){return cs(n)&&!!n.isLight}function Ck(n){return cs(n)&&!!n.isFog}function Rk(n){return cs(n)&&!!n.isScene}function nf(n){return pr(n)||Tk(n)||wk(n)||Ck(n)}function Pk(n){return cs(n)&&!!n.isPrimitive}const MT=(n,e)=>{for(const t of Object.keys(e))e[t]instanceof Object&&Object.assign(e[t],MT(n[t],e[t]));return Object.assign(n||{},e),n},Ik="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",Lk=Nk(Ik);function qb(n){return n&&n.nodeType===1}function fm(n){return n.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}const Dk=/\B([A-Z])/g;function Ok(n){return n.replace(Dk,"-$1").toLowerCase()}function Nk(n,e){const t=Object.create(null),i=n.split(",");for(let s=0;s!!t[s.toLowerCase()]:s=>!!t[s]}const Yb=(n,e)=>{if(!e)return;const t=Array.isArray(e)?e:e.match(/([^[.\]])+/g);return t==null?void 0:t.reduce((i,s)=>i&&i[s],n)},Uk=(n,e,t)=>{const i=Array.isArray(e)?e:e.match(/([^[.\]])+/g);i&&i.reduce((s,r,o)=>(s[r]===void 0&&(s[r]={}),o===i.length-1&&(s[r]=t),s[r]),n)};function ST(n,e){if(qb(n)&&qb(e)){const s=n.attributes,r=e.attributes;return s.length!==r.length?!1:Array.from(s).every(({name:o,value:a})=>e.getAttribute(o)===a)}if(n===e)return!0;if(n===null||typeof n!="object"||e===null||typeof e!="object")return!1;const t=Object.keys(n),i=Object.keys(e);if(t.length!==i.length)return!1;for(const s of t)if(!i.includes(s)||!ST(n[s],e[s]))return!1;return!0}function Fk(n,e){if(!Array.isArray(n)||!Array.isArray(e)||n.length!==e.length)return!1;for(let t=0;t{if(l.uuid===e)return l;for(const c of l.children){const u=s(c);if(u)return u}},r=s(n);if(!r){console.warn("Object with UUID not found in the scene.");return}let o=r;for(let l=0;lET(i)),!(n instanceof vd)){const i=n;n&&((t=n.dispose)==null||t.call(n)),i.geometry&&i.geometry.dispose(),Array.isArray(i.material)?i.material.forEach(s=>jb(s)):i.material&&jb(i.material)}}function Vk(n,e){let t=0;for(let i=0;it===0?e:e.charAt(0).toUpperCase()+e.slice(1)).join("")}const Zb=/-\d+$/;function Hk(n,e,t){if(bT(t)){if(Zb.test(t)){const r=t.replace(Zb,""),{target:o,key:a}=Lg(n,r);if(!Array.isArray(o[a])){const l=o[a],c=[];c.__tresDetach=()=>{c.every(u=>Pg(u))&&(o[a]=l)},o[a]=c}}const{target:i,key:s}=Lg(n,t);e.__tres.previousAttach=i[s],i[s]=La(e)}else e.__tres.previousAttach=t(n,e)}function Gk(n,e,t){var i,s,r;if(bT(t)){const{target:o,key:a}=Lg(n,t),l=e.__tres.previousAttach;l===void 0?delete o[a]:o[a]=l,"__tresDetach"in o&&o.__tresDetach()}else(s=(i=e.__tres)==null?void 0:i.previousAttach)==null||s.call(i,n,e);(r=e.__tres)==null||delete r.previousAttach}function oo(n,e,t){const i=n;return i.__tres={type:"unknown",eventCount:0,root:t,handlers:{},memoizedProps:{},objects:[],parent:null,previousAttach:null,...e},i.__tres.attach||(i.isMaterial?i.__tres.attach="material":i.isBufferGeometry?i.__tres.attach="geometry":i.isFog&&(i.__tres.attach="fog")),i}function TT(n){var e;const t=(e=n==null?void 0:n.__tres)==null?void 0:e.root;t&&t.render&&t.render.canBeInvalidated.value&&t.invalidate()}function Wk(n,e,t){var i;if(!fa(n.setPixelRatio))return;let s=0;if(t&&L_(t)&&t.length>=2){const[r,o]=t;s=n_.clamp(e,r,o)}else xk(t)?s=t:s=e;s!==((i=n.getPixelRatio)==null?void 0:i.call(n))&&n.setPixelRatio(s)}function Xk(n,e,t,i,s){const r=[...e.__tres.objects],o=La(e);if(n=La(n),o===n)return!0;const a=oo(n,e.__tres??{},s),l=e.parent??e.__tres.parent??null,c={...e.__tres.memoizedProps};delete c.object;for(const u of r)wT(u,s),AT(u,s);o.__tres.objects=[],i.remove(e);for(const[u,f]of Object.entries(c))i.patchProp(a,u,a[u],f);t(n),i.insert(e,l);for(const u of r)i.insert(u,e);return!0}function La(n){return Pk(n)?(n.object.__tres=n.__tres,n.object):n}function wT(n,e){var t,i,s,r;const o=((t=n.__tres)==null?void 0:t.parent)||e.scene.value;n.__tres&&(n.__tres.parent=null),o&&o.__tres&&"objects"in o.__tres&&Vk(o.__tres.objects,a=>a!==n),(i=n.__tres)!=null&&i.attach?Gk(o,n,n.__tres.attach):((r=(s=n.parent)==null?void 0:s.remove)==null||r.call(s,La(n)),n.parent=null)}function AT(n,e){var t;(t=n.traverse)==null||t.call(n,i=>{var s;e.deregisterCamera(i),(s=e.eventManager)==null||s.deregisterPointerMissedObject(i)}),e.deregisterCamera(n),TT(n)}const $k=({sizes:n})=>{const e=nt([]),t=Ee(()=>e.value[0]),i=o=>{const a=o instanceof zc?o:e.value.find(c=>c.uuid===o);if(!a)return;const l=e.value.filter(({uuid:c})=>c!==a.uuid);e.value=[a,...l]},s=(o,a=!1)=>{if($b(o)){const l=o;if(e.value.some(({uuid:c})=>c===l.uuid))return;a?i(l):e.value.push(l)}},r=o=>{if($b(o)){const a=o;e.value=e.value.filter(({uuid:l})=>l!==a.uuid)}};return Lc(()=>{n.aspectRatio.value&&e.value.forEach(o=>{!o.manual&&(o instanceof Jt||qk(o))&&(o instanceof Jt?o.aspect=n.aspectRatio.value:(o.left=n.width.value*-.5,o.right=n.width.value*.5,o.top=n.height.value*.5,o.bottom=n.height.value*-.5),o.updateProjectionMatrix())})}),rs(()=>{e.value=[]}),{camera:t,cameras:e,registerCamera:s,deregisterCamera:r,setCameraActive:i}};function qk(n){return n.hasOwnProperty("isOrthographicCamera")&&n.isOrthographicCamera}const Rh="[TresJS ▲ ■ ●] ";function Yk(...n){typeof n[0]=="string"?n[0]=Rh+n[0]:n.unshift(Rh),console.error(...n)}function jk(...n){typeof n[0]=="string"?n[0]=Rh+n[0]:n.unshift(Rh),console.warn(...n)}function Kk(n,e){}function CT(){return{logError:Yk,logWarning:jk,logMessage:Kk}}const Dg=nt({}),Og=n=>Object.assign(Dg.value,n);function hm(){const n=new Map,e=new Set;let t=0,i=!1;const s=()=>{const o=Array.from(n.entries()).sort((a,l)=>{const c=a[1].priority-l[1].priority;return c===0?a[1].addI-l[1].addI:c});e.clear(),o.forEach(a=>e.add(a[0]))},r=o=>{n.delete(o),e.delete(o)};return{on:(o,a=0)=>{n.set(o,{priority:a,addI:t++});const l=()=>r(o);return Er(l),i=!0,{off:l}},off:r,trigger:(...o)=>{i&&(s(),i=!1),e.forEach(a=>a(...o))},dispose:()=>{n.clear(),e.clear()},get count(){return n.size}}}function Zk(){let n=!0,e=!0,t=!1;const i=new kd(!1),s=nt(i.running),r=nt(!1);let o;const a=n_.generateUUID();let l=null;const c=hm(),u=hm(),f=hm();w();let h={};function d(S){h=S}function p(S,P,M=0){switch(P){case"before":return c.on(S,M);case"render":return l||(l=S),u.dispose(),u.on(S);case"after":return f.on(S,M)}}function _(){e&&(e=!1,w(),T())}function g(){e=!0,w(),cancelAnimationFrame(o)}function m(){t=!1,w()}function v(){t=!0,w()}function b(){r.value=!0}function y(){r.value=!1}function T(){if(!n){o=requestAnimationFrame(T);return}const S=i.getDelta(),P=i.getElapsedTime(),M={camera:Ft(h.camera),scene:Ft(h.scene),renderer:Ft(h.renderer),raycaster:Ft(h.raycaster),controls:Ft(h.controls),invalidate:h.invalidate,advance:h.advance},E={delta:S,elapsed:P,clock:i,...M};s.value&&c.trigger(E),r.value||(u.count?u.trigger(E):l&&l(E)),s.value&&f.trigger(E),o=requestAnimationFrame(T)}function w(){const S=!e&&!t;i.running!==S&&(i.running?i.stop():i.start()),s.value=i.running}return{loopId:a,register:(S,P,M)=>p(S,P,M),start:_,stop:g,pause:v,resume:m,pauseRender:b,resumeRender:y,isRenderPaused:r,isActive:s,setContext:d,setReady:S=>n=S}}function D_(n){let e=0;return n.traverse(t=>{if(t.isMesh&&t.geometry&&t.type!=="HightlightMesh"){const i=t.geometry,s=i.attributes.position.count*3*Float32Array.BYTES_PER_ELEMENT,r=i.index?i.index.count*Uint32Array.BYTES_PER_ELEMENT:0,o=i.attributes.normal?i.attributes.normal.count*3*Float32Array.BYTES_PER_ELEMENT:0,a=i.attributes.uv?i.attributes.uv.count*2*Float32Array.BYTES_PER_ELEMENT:0,l=s+r+o+a;e+=l}}),e}function Jk(n){return(n/1024).toFixed(2)}const Qk=Number.parseInt(Uc.replace("dev",""));function eB(n){return n instanceof Pe?n:Array.isArray(n)?new Pe(...n):new Pe(n)}const sf={realistic:{shadows:!0,physicallyCorrectLights:!0,outputColorSpace:Fn,toneMapping:rd,toneMappingExposure:3,shadowMap:{enabled:!0,type:W0}},flat:{toneMapping:ts,toneMappingExposure:1}};function tB({canvas:n,options:e,contextParts:{sizes:t,render:i,invalidate:s,advance:r}}){const o=Ee(()=>({alpha:pn(e.alpha)??!0,depth:pn(e.depth),canvas:Di(n),context:pn(e.context),stencil:pn(e.stencil),antialias:pn(e.antialias)??!0,precision:pn(e.precision),powerPreference:pn(e.powerPreference),premultipliedAlpha:pn(e.premultipliedAlpha),preserveDrawingBuffer:pn(e.preserveDrawingBuffer),logarithmicDepthBuffer:pn(e.logarithmicDepthBuffer),failIfMajorPerformanceCaveat:pn(e.failIfMajorPerformanceCaveat)})),a=Oe(new Tf(o.value));function l(){e.renderMode==="on-demand"&&s()}Ke(o,()=>{a.value.dispose(),a.value=new Tf(o.value),l()}),Ke([t.width,t.height],()=>{a.value.setSize(t.width.value,t.height.value),l()},{immediate:!0}),Ke(()=>e.clearColor,l);const{pixelRatio:c}=GF(),{logError:u}=CT(),f=(()=>{const d=new Tf,p={shadowMap:{enabled:d.shadowMap.enabled,type:d.shadowMap.type},toneMapping:d.toneMapping,toneMappingExposure:d.toneMappingExposure,outputColorSpace:d.outputColorSpace};return d.dispose(),p})(),h=pn(e.renderMode);return h==="on-demand"&&s(),h==="manual"&&setTimeout(()=>{r()},100),Lc(()=>{const d=pn(e.preset);d&&(d in sf||u(`Renderer Preset must be one of these: ${Object.keys(sf).join(", ")}`),MT(a.value,sf[d])),Wk(a.value,c.value,pn(e.dpr)),h==="always"&&(i.frames.value=Math.max(1,i.frames.value));const p=(m,v)=>{const b=pn(m),y=()=>{if(d)return Yb(sf[d],v)};if(b!==void 0)return b;const T=y();return T!==void 0?T:Yb(f,v)},_=(m,v)=>Uk(a.value,v,p(m,v));_(e.shadows,"shadowMap.enabled"),_(e.toneMapping??rd,"toneMapping"),_(e.shadowMapType,"shadowMap.type"),Qk<150&&_(!e.useLegacyLights,"physicallyCorrectLights"),_(e.outputColorSpace,"outputColorSpace"),_(e.toneMappingExposure,"toneMappingExposure");const g=p(e.clearColor,"clearColor");g&&a.value.setClearColor(g?eB(g):new Pe(0))}),rs(()=>{a.value.dispose(),a.value.forceContextLoss()}),{renderer:a}}function nB(n,e,t=10){const i=pn(n)?KF():XF(Ee(()=>pn(e).parentElement)),s=Fi(Gb(i.width,t)),r=Fi(Gb(i.height,t)),o=Ee(()=>s.value/r.value);return{height:r,width:s,aspectRatio:o}}const iB=(n,e)=>{const t=Ee(()=>e.renderer.value.domElement),i=Oe([]),{x:s,y:r}=jF({target:t});let o=0;const{width:a,height:l,top:c,left:u}=WF(t),f=({x:re,y:xe})=>{if(t.value)return{x:(re-u.value)/a.value*2-1,y:-((xe-c.value)/l.value)*2+1}},h=({x:re,y:xe})=>{if(e.camera.value)return e.raycaster.value.setFromCamera(new fe(re,xe),e.camera.value),i.value=e.raycaster.value.intersectObjects(n.value,!0),i.value},d=re=>{const xe=f({x:(re==null?void 0:re.clientX)??s.value,y:(re==null?void 0:re.clientY)??r.value});return xe?h(xe)||[]:[]},p=pi(),_=pi(),g=pi(),m=pi(),v=pi(),b=pi(),y=pi(),T=pi();function w(re){const xe={};for(const We in re)typeof We!="function"&&(xe[We]=re[We]);return xe}const S=(re,xe)=>{var We,oe,ge;const Se=w(xe),$=new k(xe==null?void 0:xe.clientX,xe==null?void 0:xe.clientY,0).unproject((We=e.camera)==null?void 0:We.value);re.trigger({...Se,intersections:i.value,unprojectedPoint:$,ray:(oe=e.raycaster)==null?void 0:oe.value.ray,camera:(ge=e.camera)==null?void 0:ge.value,sourceEvent:xe,delta:o,stopPropagating:!1})};let P;const M=re=>{d(re),S(g,re),P=re},E=()=>{P&&M(P)};let D,B,z;const V=re=>{var xe;D=(xe=i.value[0])==null?void 0:xe.object,o=0,B=new fe((re==null?void 0:re.clientX)??s.value,(re==null?void 0:re.clientY)??r.value),S(v,re)};let Q,j=!1;const te=re=>{var xe,We,oe;re instanceof PointerEvent&&(i.value.length===0&&S(b,re),D===((xe=i.value[0])==null?void 0:xe.object)&&(z=new fe((re==null?void 0:re.clientX)??s.value,(re==null?void 0:re.clientY)??r.value),o=B==null?void 0:B.distanceTo(z),re.button===0?(S(p,re),Q===((We=i.value[0])==null?void 0:We.object)?j=!0:(Q=(oe=i.value[0])==null?void 0:oe.object,j=!1)):re.button===2&&S(y,re)),S(m,re))},Z=re=>{j&&(S(_,re),Q=void 0,j=!1)},pe=re=>S(g,re),Me=re=>S(T,re);return t.value.addEventListener("pointerup",te),t.value.addEventListener("pointerdown",V),t.value.addEventListener("pointermove",M),t.value.addEventListener("pointerleave",pe),t.value.addEventListener("dblclick",Z),t.value.addEventListener("wheel",Me),rs(()=>{t!=null&&t.value&&(t.value.removeEventListener("pointerup",te),t.value.removeEventListener("pointerdown",V),t.value.removeEventListener("pointermove",M),t.value.removeEventListener("pointerleave",pe),t.value.removeEventListener("dblclick",Z),t.value.removeEventListener("wheel",Me))}),{intersects:i,onClick:re=>p.on(re).off,onDblClick:re=>_.on(re).off,onContextMenu:re=>y.on(re).off,onPointerMove:re=>g.on(re).off,onPointerUp:re=>m.on(re).off,onPointerDown:re=>v.on(re).off,onPointerMissed:re=>b.on(re).off,onWheel:re=>T.on(re).off,forceUpdate:E}};function dm(n,e){if(Array.isArray(n))for(const t of n)t(e);typeof n=="function"&&n(e)}function sB(n,e,t){var i;const s=Oe(),r=Oe();n&&(s.value=n),e&&(r.value=e);const o=M=>{var E;return((E=M.__tres)==null?void 0:E.eventCount)>0},a=M=>{var E;return((E=M.children)==null?void 0:E.some(D=>a(D)))||o(M)},l=Oe(((i=s.value)==null?void 0:i.children).filter(a)||[]);function c(M,E){const D=[],B=()=>E.stopPropagating=!0;E.stopPropagation=B;for(const z of E==null?void 0:E.intersections){if(E.stopPropagating)return;E={...E,...z};const{object:V}=z;E.eventObject=V,dm(V[M],E),D.push(V);let Q=V.parent;for(;Q!==null&&!E.stopPropagating&&!D.includes(Q);)E.eventObject=Q,dm(Q[M],E),D.push(Q),Q=Q.parent;const j=Ok(M.slice(2));t(j,{intersection:z,event:E})}}const{onClick:u,onDblClick:f,onContextMenu:h,onPointerMove:d,onPointerDown:p,onPointerUp:_,onPointerMissed:g,onWheel:m,forceUpdate:v}=iB(l,e);_(M=>c("onPointerUp",M)),p(M=>c("onPointerDown",M)),u(M=>c("onClick",M)),f(M=>c("onDoubleClick",M)),h(M=>c("onContextMenu",M)),m(M=>c("onWheel",M));let b=[];d(M=>{const E=M.intersections.map(({object:B})=>B),D=M.intersections;b.forEach(({object:B})=>{E.includes(B)||(M.intersections=b,c("onPointerLeave",M),c("onPointerOut",M))}),M.intersections=D,M.intersections.forEach(({object:B})=>{b.includes(B)||(c("onPointerEnter",M),c("onPointerOver",M))}),c("onPointerMove",M),b=M.intersections});const y=[];g(M=>{const E=()=>M.stopPropagating=!0;M.stopPropagation=E,y.forEach(D=>{M.stopPropagating||(M.eventObject=D,dm(D.onPointerMissed,M))}),t("pointer-missed",{event:M})});function T(M){nf(M)&&pr(M)&&l.value.push(M)}function w(M){if(nf(M)&&pr(M)){const E=l.value.indexOf(M);E>-1&&l.value.splice(E,1)}}function S(M){nf(M)&&pr(M)&&M.onPointerMissed&&y.push(M)}function P(M){if(nf(M)&&pr(M)){const E=y.indexOf(M);E>-1&&y.splice(E,1)}}return e.eventManager={forceUpdate:v,registerObject:T,deregisterObject:w,registerPointerMissedObject:S,deregisterPointerMissedObject:P},{forceUpdate:v,registerObject:T,deregisterObject:w,registerPointerMissedObject:S,deregisterPointerMissedObject:P}}function rB(n,e,t=100){t=t<=0?100:t;const i=pi(),s=new Set;let r=!1,o=!1,a=null;function l(){a&&clearTimeout(a),!o&&!r&&n()?(i.trigger(e),s.forEach(f=>f()),s.clear(),r=!0):!o&&!r&&(a=setTimeout(l,t))}function c(){o=!0,a&&clearTimeout(a)}l();const u=(f,...h)=>{f(...h)};return{on:f=>{if(r)return u(f,e),{off:()=>{}};{const h=i.on(f);return s.add(h.off),i.on(f)}},off:i.off,trigger:i.trigger,clear:i.clear,cancel:c}}const pm=new WeakMap;function oB(n){if(n=n||RT(),pm.has(n))return pm.get(n);const e=100,t=Date.now(),i=rB(()=>{if(Date.now()-t>=e)return!0;{const s=n.renderer.value,r=(s==null?void 0:s.domElement)||{width:0,height:0};return!!(s&&r.width>0&&r.height>0)}},n);return pm.set(n,i),i}function aB({scene:n,canvas:e,windowSize:t,rendererOptions:i,emit:s}){const r=Oe(n),o=nB(t,e),{camera:a,cameras:l,registerCamera:c,deregisterCamera:u,setCameraActive:f}=$k({sizes:o}),h={mode:nt(i.renderMode||"always"),priority:nt(0),frames:nt(0),maxFrames:60,canBeInvalidated:Ee(()=>h.mode.value==="on-demand"&&h.frames.value===0)};function d(z=1){i.renderMode==="on-demand"&&(h.frames.value=Math.min(h.maxFrames,h.frames.value+z))}function p(){i.renderMode==="manual"&&(h.frames.value=1)}const{renderer:_}=tB({canvas:e,options:i,contextParts:{sizes:o,render:h,invalidate:d,advance:p}}),g={sizes:o,scene:r,camera:a,cameras:Fi(l),renderer:_,raycaster:Oe(new lT),controls:nt(null),perf:{maxFrames:160,fps:{value:0,accumulator:[]},memory:{currentMem:0,allocatedMem:0,accumulator:[]}},render:h,advance:p,extend:Og,invalidate:d,registerCamera:c,setCameraActive:f,deregisterCamera:u,loop:Zk()};gr("useTres",g),g.scene.value.__tres={root:g},g.loop.register(()=>{a.value&&h.frames.value>0&&(_.value.render(n,a.value),s("render",g.renderer.value)),h.priority.value=0,h.mode.value==="always"?h.frames.value=1:h.frames.value=Math.max(0,h.frames.value-1)},"render");const{on:m,cancel:v}=oB(g);g.loop.setReady(!1),g.loop.start(),m(()=>{s("ready",g),g.loop.setReady(!0),sB(n,g,s)}),rs(()=>{v(),g.loop.stop()});const b=100,y=$F({every:b}),{isSupported:T,memory:w}=qF({interval:b}),S=160;let P=performance.now();const M=({timestamp:z})=>{g.scene.value&&(g.perf.memory.allocatedMem=D_(g.scene.value)),z-P>=b&&(P=z,g.perf.fps.accumulator.push(y.value),g.perf.fps.accumulator.length>S&&g.perf.fps.accumulator.shift(),g.perf.fps.value=y.value,T.value&&w.value&&(g.perf.memory.accumulator.push(w.value.usedJSHeapSize/1024/1024),g.perf.memory.accumulator.length>S&&g.perf.memory.accumulator.shift(),g.perf.memory.currentMem=g.perf.memory.accumulator.reduce((V,Q)=>V+Q,0)/g.perf.memory.accumulator.length))};let E=0;const D=1,{pause:B}=I_(({delta:z})=>{window.__TRES__DEVTOOLS__&&(M({timestamp:performance.now()}),E+=z,E>=D&&(window.__TRES__DEVTOOLS__.cb(g),E=0))},{immediate:!0});return rs(()=>{B()}),g}function RT(){const n=_n("useTres");if(!n)throw new Error("useTresContext must be used together with useTresContextProvider");return n}function PG(){const{camera:n,scene:e,renderer:t,loop:i,raycaster:s,controls:r,invalidate:o,advance:a}=RT();i.setContext({camera:n,scene:e,renderer:t,raycaster:s,controls:r,invalidate:o,advance:a});function l(f,h=0){return i.register(f,"before",h)}function c(f){return i.register(f,"render")}function u(f,h=0){return i.register(f,"after",h)}return{pause:i.pause,resume:i.resume,pauseRender:i.pauseRender,resumeRender:i.resumeRender,isActive:i.isActive,onBeforeRender:l,render:c,onAfterRender:u}}const lB=pi(),cB=pi(),PT=pi(),Ul=new kd;let wf=0,Af=0;I_(()=>{lB.trigger({delta:wf,elapsed:Af,clock:Ul}),cB.trigger({delta:wf,elapsed:Af,clock:Ul}),PT.trigger({delta:wf,elapsed:Af,clock:Ul})},{immediate:!1});PT.on(()=>{wf=Ul.getDelta(),Af=Ul.getElapsedTime()});function uB(n,e={},t={}){let i=n;const s=a=>{i=a};let r=new Proxy({},{});const o={has(a,l){return l in e||l in i},get(a,l,c){return l in e?e[l](i):i[l]},set(a,l,c){return t[l]?t[l](c,i,r,s):i[l]=c,!0}};return r=new Proxy({},o),r}const{logError:Jb}=CT(),Qb=["onClick","onContextMenu","onPointerMove","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onDoubleClick","onPointerDown","onPointerUp","onPointerCancel","onPointerMissed","onLostPointerCapture","onWheel"],fB=n=>{const e=n.scene.value;function t(c,u,f,h){if(h||(h={}),h.args||(h.args=[]),c==="template"||Lk(c))return null;let d=c.replace("Tres",""),p;if(c==="primitive"){(!cs(h.object)||Lt(h.object))&&Jb("Tres primitives need an 'object' prop, whose value is an object or shallowRef"),d=h.object.type;const _={};p=uB(h.object,{object:g=>g,isPrimitive:()=>!0,__tres:()=>_},{object:(g,m,v,b)=>{Xk(g,v,b,{patchProp:r,remove:s,insert:i},n)},__tres:g=>{Object.assign(_,g)}})}else{const _=Dg.value[d];_||Jb(`${d} is not defined on the THREE namespace. Use extend to add it to the catalog.`),p=new _(...h.args)}return p?(p.isCamera&&(h!=null&&h.position||p.position.set(3,3,3),h!=null&&h.lookAt||p.lookAt(0,0,0)),p=oo(p,{...p.__tres,type:d,memoizedProps:h,eventCount:0,primitive:c==="primitive",attach:h.attach},n),p):null}function i(c,u){var f,h,d;if(!c)return;u=u||e;const p=c.__tres?c:oo(c,{},n),_=u.__tres?u:oo(u,{},n);c=La(p),u=La(_),c.__tres&&((f=c.__tres)==null?void 0:f.eventCount)>0&&((h=n.eventManager)==null||h.registerObject(c)),n.registerCamera(c),(d=n.eventManager)==null||d.registerPointerMissedObject(c),p.__tres.attach?Hk(_,p,p.__tres.attach):pr(c)&&pr(_)&&(_.add(c),c.dispatchEvent({type:"added"})),p.__tres.parent=_,_.__tres.objects&&!_.__tres.objects.includes(p)&&_.__tres.objects.push(p)}function s(c,u){var f,h,d,p;if(!c)return;c!=null&&c.__tres&&((f=c.__tres)==null?void 0:f.eventCount)>0&&((h=n.eventManager)==null||h.deregisterObject(c)),u=Pg(u)?"default":u;const _=(d=c.__tres)==null?void 0:d.dispose;Pg(_)||(_===null?u=!1:u=_);const g=(p=c.__tres)==null?void 0:p.primitive,m=u==="default"?!g:!!u;if(c.__tres&&"objects"in c.__tres&&[...c.__tres.objects].forEach(v=>s(v,u)),m&&c.children&&[...c.children].forEach(v=>s(v,u)),wT(c,n),AT(c,n),m&&!Rk(c)){if(fa(u))u(c);else if(fa(c.dispose))try{c.dispose()}catch{}}"__tres"in c&&delete c.__tres}function r(c,u,f,h){var d,p;if(!c)return;let _=c,g=u;if(c.__tres&&(c.__tres.memoizedProps[u]=h),u==="attach"){const y=((d=c.__tres)==null?void 0:d.parent)||c.parent;s(c),oo(c,{attach:h},n),y&&i(c,y);return}if(u==="dispose"){c.__tres||(c=oo(c,{},n)),c.__tres.dispose=h;return}if(pr(c)&&g==="blocks-pointer-events"){h||h===""?c[g]=h:delete c[g];return}Qb.includes(u)&&c.__tres&&(c.__tres.eventCount+=1);let m=fm(g),v=_==null?void 0:_[m];if(g==="args"){const y=c,T=f??[],w=h??[],S=((p=c.__tres)==null?void 0:p.type)||c.type;S&&T.length&&!Fk(T,w)&&(_=Object.assign(y,new Dg.value[S](...h)));return}if(_.type==="BufferGeometry"){if(g==="args")return;_.setAttribute(fm(g),new Pt(...h));return}if(g.includes("-")&&v===void 0){v=_;for(const y of g.split("-"))m=g=fm(y),_=v,v=v==null?void 0:v[g]}let b=h;if(b===""&&(b=!0),fa(v)){Qb.includes(u)||(L_(b)?c[m](...b):c[m](b)),m.startsWith("on")&&fa(b)&&(_[m]=b);return}Xb(v)&&Xb(b)?v.mask=b.mask:xT(v)&&Mk(b)?v.set(b):Sk(v)&&Ek(b)&&v.constructor===b.constructor?v.copy(b):Ig(v)&&Array.isArray(b)?"fromArray"in v&&typeof v.fromArray=="function"?v.fromArray(b):v.set(...b):Ig(v)&&typeof b=="number"?"setScalar"in v&&typeof v.setScalar=="function"?v.setScalar(b):v.set(b):_[m]=b,TT(c)}function o(c){var u;return((u=c==null?void 0:c.__tres)==null?void 0:u.parent)||null}function a(c){const u=oo(new gt,{type:"Comment"},n);return u.name=c,u}function l(c){var u;const f=o(c),h=((u=f==null?void 0:f.__tres)==null?void 0:u.objects)||[],d=h.indexOf(c);return d<0||d>=h.length-1?null:h[d+1]}return{insert:i,remove:s,createElement:t,patchProp:r,parentNode:o,createText:()=>{},createComment:a,setText:()=>{},setElementText:()=>{},nextSibling:l,querySelector:()=>{},setScopeId:()=>{},cloneNode:()=>{},insertStaticContent:()=>{}}};function hB(){return IT().__VUE_DEVTOOLS_GLOBAL_HOOK__}function IT(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const dB=typeof Proxy=="function",pB="devtools-plugin:setup",mB="plugin:settings:set";let ul,Ng;function gB(){var n;return ul!==void 0||(typeof window<"u"&&window.performance?(ul=!0,Ng=window.performance):typeof globalThis<"u"&&!((n=globalThis.perf_hooks)===null||n===void 0)&&n.performance?(ul=!0,Ng=globalThis.perf_hooks.performance):ul=!1),ul}function _B(){return gB()?Ng.now():Date.now()}class vB{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const i={};if(e.settings)for(const o in e.settings){const a=e.settings[o];i[o]=a.defaultValue}const s=`__vue-devtools-plugin-settings__${e.id}`;let r=Object.assign({},i);try{const o=localStorage.getItem(s),a=JSON.parse(o);Object.assign(r,a)}catch{}this.fallbacks={getSettings(){return r},setSettings(o){try{localStorage.setItem(s,JSON.stringify(o))}catch{}r=o},now(){return _B()}},t&&t.on(mB,(o,a)=>{o===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(o,a)=>this.target?this.target.on[a]:(...l)=>{this.onQueue.push({method:a,args:l})}}),this.proxiedTarget=new Proxy({},{get:(o,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...l)=>(this.targetQueue.push({method:a,args:l,resolve:()=>{}}),this.fallbacks[a](...l)):(...l)=>new Promise(c=>{this.targetQueue.push({method:a,args:l,resolve:c})})})}async setRealTarget(e){this.target=e;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function yB(n,e){const t=n,i=IT(),s=hB(),r=dB&&t.enableEarlyProxy;if(s&&(i.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!r))s.emit(pB,n,e);else{const o=r?new vB(t,s):null;(i.__VUE_DEVTOOLS_PLUGINS__=i.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:t,setupFn:e,proxy:o}),o&&e(o.proxiedTarget)}}function bB(n,e){const t=`▲ ■ ●${n}`;typeof ex=="function"?ex(t,e):console.log(t)}function ex(n,e){throw new Error(n+e)}const LT=n=>{const e={id:n.uuid,label:n.type,children:[],tags:[]};n.name!==""&&e.tags.push({label:n.name,textColor:5750629,backgroundColor:15793395});const t=D_(n);return t>0&&e.tags.push({label:`${Jk(t)} KB`,textColor:15707189,backgroundColor:16775644,tooltip:"Memory usage"}),n.type.includes("Light")&&(Ak(n)&&e.tags.push({label:`${n.intensity}`,textColor:9738662,backgroundColor:16316922,tooltip:"Intensity"}),e.tags.push({label:`#${new Pe(n.color).getHexString()}`,textColor:9738662,backgroundColor:16316922,tooltip:"Color"})),n.type.includes("Camera")&&(e.tags.push({label:`${n.fov}°`,textColor:9738662,backgroundColor:16316922,tooltip:"Field of view"}),e.tags.push({label:`x: ${Math.round(n.position.x)} y: ${Math.round(n.position.y)} z: ${Math.round(n.position.z)}`,textColor:9738662,backgroundColor:16316922,tooltip:"Position"})),e};function DT(n,e,t=""){n.children.forEach(i=>{if(i.type==="HightlightMesh"||t&&!i.type.includes(t)&&!i.name.includes(t))return;const s=LT(i);e.children.push(s),DT(i,s,t)})}const xB=[],fl="tres:inspector",MB=xi({sceneGraph:null});function SB(n,e){yB({id:"dev.esm.tres",label:"TresJS 🪐",logo:"https://raw.githubusercontent.com/Tresjs/tres/main/public/favicon.svg",packageName:"tresjs",homepage:"https://tresjs.org",componentStateTypes:xB,app:n},t=>{typeof t.now!="function"&&bB("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),t.addInspector({id:fl,label:"TresJS 🪐",icon:"account_tree",treeFilterPlaceholder:"Search instances"}),setInterval(()=>{t.sendInspectorTree(fl)},1e3),setInterval(()=>{t.notifyComponentUpdate()},5e3),t.on.getInspectorTree(r=>{if(r.inspectorId===fl){const o=LT(e.scene.value);DT(e.scene.value,o,r.filter),MB.sceneGraph=o,r.rootNodes=[o]}});let i=null,s=null;t.on.getInspectorState(r=>{var o;if(r.inspectorId===fl){const[a]=e.scene.value.getObjectsByProperty("uuid",r.nodeId);if(!a)return;if(s&&i&&i.parent&&s.remove(i),a.isMesh){const l=Bk(a);a.add(l),i=l,s=a}r.state={object:Object.entries(a).map(([l,c])=>l==="children"?{key:l,value:c.filter(u=>u.type!=="HightlightMesh")}:{key:l,value:c,editable:!0}).filter(({key:l})=>l!=="parent")},a.isScene&&(r.state={...r.state,state:[{key:"Scene Info",value:{objects:a.children.length,memory:D_(a),calls:e.renderer.value.info.render.calls,triangles:e.renderer.value.info.render.triangles,points:e.renderer.value.info.render.points,lines:e.renderer.value.info.render.lines}},{key:"Programs",value:((o=e.renderer.value.info.programs)==null?void 0:o.map(l=>({...l,programName:l.name})))||[]}]})}}),t.on.editInspectorState(r=>{r.inspectorId===fl&&kk(e.scene.value,r.nodeId,r.path,r.state.value)})})}const EB=["data-scene","data-tres"],TB=hn({__name:"TresCanvas",props:{shadows:{type:Boolean,default:void 0},clearColor:{},toneMapping:{},shadowMapType:{},useLegacyLights:{type:Boolean,default:void 0},outputColorSpace:{},toneMappingExposure:{},renderMode:{default:"always"},dpr:{},camera:{},preset:{},windowSize:{type:Boolean,default:void 0},enableProvideBridge:{type:Boolean,default:!0},context:{},alpha:{type:Boolean,default:void 0},premultipliedAlpha:{type:Boolean},antialias:{type:Boolean,default:void 0},stencil:{type:Boolean,default:void 0},preserveDrawingBuffer:{type:Boolean,default:void 0},powerPreference:{},depth:{type:Boolean,default:void 0},failIfMajorPerformanceCaveat:{type:Boolean,default:void 0},precision:{},logarithmicDepthBuffer:{type:Boolean,default:void 0},reverseDepthBuffer:{type:Boolean}},emits:["render","click","double-click","context-menu","pointer-move","pointer-up","pointer-down","pointer-enter","pointer-leave","pointer-over","pointer-out","pointer-missed","wheel","ready"],setup(n,{expose:e,emit:t}){const i=n,s=t,r=O0(),o=nt(),a=Oe(new vd),l=Rn();Og(TF);const c=(p,_=!1)=>hn({setup(){var g;const m=(g=Rn())==null?void 0:g.appContext;m&&(m.app=l==null?void 0:l.appContext.app);const v={};function b(y){y&&(y.parent&&b(y.parent),y.provides&&Object.assign(v,y.provides))}return l!=null&&l.parent&&i.enableProvideBridge&&(b(l.parent),Reflect.ownKeys(v).forEach(y=>{gr(y,v[y])})),gr("useTres",p),gr("extend",Og),typeof window<"u"&&SB(m==null?void 0:m.app,p),()=>ks(Zt,null,_?[]:r.default())}}),u=(p,_=!1)=>{const g=c(p,_),{render:m}=ZS(fB(p));m(ks(g),a.value)},f=(p,_=!1)=>{ET(p.scene.value),_&&(p.renderer.value.dispose(),p.renderer.value.renderLists.dispose(),p.renderer.value.forceContextLoss()),a.value.__tres={root:p}},h=Oe(null);e({context:h,dispose:()=>f(h.value,!0)});const d=()=>{f(h.value),u(h.value,!0)};return Gn(()=>{const p=o;h.value=aB({scene:a.value,canvas:p,windowSize:i.windowSize??!1,rendererOptions:i,emit:s});const{registerCamera:_,camera:g,cameras:m,deregisterCamera:v}=h.value;u(h.value);const b=()=>{const y=new Jt(45,window.innerWidth/window.innerHeight,.1,1e3);y.position.set(3,3,3),y.lookAt(0,0,0),_(y);const T=Lc(()=>{m.value.length>=2&&(y.removeFromParent(),v(y),T==null||T())})};Ke(()=>i.camera,(y,T)=>{y&&_(y),T&&(T.removeFromParent(),v(T))},{immediate:!0}),g.value||b()}),rs(d),(p,_)=>(vn(),yi("canvas",{ref_key:"canvas",ref:o,"data-scene":a.value.uuid,class:ka(p.$attrs.class),"data-tres":`tresjs ${Ft(yk).version}`,style:Si({display:"block",width:"100%",height:"100%",position:p.windowSize?"fixed":"relative",top:0,left:0,pointerEvents:"auto",touchAction:"none",...p.$attrs.style})},null,14,EB))}}),wB={install(n){n.component("TresCanvas",TB)}};function mm(n){if(n===null||typeof n!="object")return!1;const e=Object.getPrototypeOf(n);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in n?!1:Symbol.toStringTag in n?Object.prototype.toString.call(n)==="[object Module]":!0}function Ug(n,e,t=".",i){if(!mm(e))return Ug(n,{},t,i);const s=Object.assign({},e);for(const r in n){if(r==="__proto__"||r==="constructor")continue;const o=n[r];o!=null&&(i&&i(s,r,o,t)||(Array.isArray(o)&&Array.isArray(s[r])?s[r]=[...o,...s[r]]:mm(o)&&mm(s[r])?s[r]=Ug(o,s[r],(t?`${t}.`:"")+r.toString(),i):s[r]=o))}return s}function AB(n){return(...e)=>e.reduce((t,i)=>Ug(t,i,"",n),{})}const OT=AB();function Ir(n){return qh()?(S0(n),!0):!1}function tx(){const n=new Set,e=r=>{n.delete(r)};return{on:r=>{n.add(r);const o=()=>e(r);return Ir(o),{off:o}},off:e,trigger:(...r)=>Promise.all(Array.from(n).map(o=>o(...r))),clear:()=>{n.clear()}}}const gm=new WeakMap,CB=(...n)=>{var e;const t=n[0],i=(e=Rn())==null?void 0:e.proxy;if(i==null&&!Ic())throw new Error("injectLocal must be called in setup");return i&&gm.has(i)&&t in gm.get(i)?gm.get(i)[t]:_n(...n)},Yc=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const NT=n=>n!=null,RB=Object.prototype.toString,Ph=n=>RB.call(n)==="[object Object]",is=()=>{},PB=(n,e)=>Object.prototype.hasOwnProperty.call(n,e);function UT(...n){if(n.length!==1)return yS(...n);const e=n[0];return typeof e=="function"?Fi(R0(()=>({get:e,set:is}))):nt(e)}function O_(n,e){function t(...i){return new Promise((s,r)=>{Promise.resolve(n(()=>e.apply(this,i),{fn:e,thisArg:this,args:i})).then(s).catch(r)})}return t}const FT=n=>n();function kT(n,e={}){let t,i,s=is;const r=l=>{clearTimeout(l),s(),s=is};let o;return l=>{const c=rt(n),u=rt(e.maxWait);return t&&r(t),c<=0||u!==void 0&&u<=0?(i&&(r(i),i=null),Promise.resolve(l())):new Promise((f,h)=>{s=e.rejectOnCancel?h:f,o=l,u&&!i&&(i=setTimeout(()=>{t&&r(t),i=null,f(o())},u)),t=setTimeout(()=>{i&&r(i),i=null,f(l())},c)})}}function IB(...n){let e=0,t,i=!0,s=is,r,o,a,l,c;!Lt(n[0])&&typeof n[0]=="object"?{delay:o,trailing:a=!0,leading:l=!0,rejectOnCancel:c=!1}=n[0]:[o,a=!0,l=!0,c=!1]=n;const u=()=>{t&&(clearTimeout(t),t=void 0,s(),s=is)};return h=>{const d=rt(o),p=Date.now()-e,_=()=>r=h();return u(),d<=0?(e=Date.now(),_()):(p>d&&(l||!i)?(e=Date.now(),_()):a&&(r=new Promise((g,m)=>{s=c?m:g,t=setTimeout(()=>{e=Date.now(),i=!0,g(_()),u()},Math.max(0,d-p))})),!l&&!t&&(t=setTimeout(()=>i=!0,d)),i=!1,r)}}function LB(n=FT,e={}){const{initialState:t="active"}=e,i=UT(t==="active");function s(){i.value=!1}function r(){i.value=!0}const o=(...a)=>{i.value&&n(...a)};return{isActive:Fi(i),pause:s,resume:r,eventFilter:o}}function DB(n){let e;function t(){return e||(e=n()),e}return t.reset=async()=>{const i=e;e=void 0,i&&await i},t}function OB(n,e){var t;if(typeof n=="number")return n+e;const i=((t=n.match(/^-?\d+\.?\d*/))==null?void 0:t[0])||"",s=n.slice(i.length),r=Number.parseFloat(i)+e;return Number.isNaN(r)?n:r+s}function Fl(n){return n.endsWith("rem")?Number.parseFloat(n)*16:Number.parseFloat(n)}function kl(n){return Array.isArray(n)?n:[n]}function BT(n){return Rn()}function N_(n,e=200,t={}){return O_(kT(e,t),n)}function IG(n,e=200,t={}){const i=nt(rt(n)),s=N_(()=>{i.value=n.value},e,t);return Ke(n,()=>s()),mS(i)}function NB(n,e=200,t=!1,i=!0,s=!1){return O_(IB(e,t,i,s),n)}function zT(n,e,t={}){const{eventFilter:i=FT,...s}=t;return Ke(n,O_(i,e),s)}function UB(n,e,t={}){const{eventFilter:i,initialState:s="active",...r}=t,{eventFilter:o,pause:a,resume:l,isActive:c}=LB(i,{initialState:s});return{stop:zT(n,e,{...r,eventFilter:o}),pause:a,resume:l,isActive:c}}function Xa(n,e=!0,t){BT()?Gn(n,t):e?n():Ar(n)}function FB(n,e){BT()&&rs(n,e)}function kB(n,e,t={}){const{immediate:i=!0,immediateCallback:s=!1}=t,r=Oe(!1);let o=null;function a(){o&&(clearTimeout(o),o=null)}function l(){r.value=!1,a()}function c(...u){s&&n(),a(),r.value=!0,o=setTimeout(()=>{r.value=!1,o=null,n(...u)},rt(e))}return i&&(r.value=!0,Yc&&c()),Ir(l),{isPending:mS(r),start:c,stop:l}}function LG(n,e,t={}){const{debounce:i=0,maxWait:s=void 0,...r}=t;return zT(n,e,{...r,eventFilter:kT(i,{maxWait:s})})}function BB(n,e,t){return Ke(n,e,{...t,immediate:!0})}const Hn=Yc?window:void 0,zB=Yc?window.document:void 0,U_=Yc?window.navigator:void 0;function ei(n){var e;const t=rt(n);return(e=t==null?void 0:t.$el)!=null?e:t}function Ot(...n){const e=[],t=()=>{e.forEach(a=>a()),e.length=0},i=(a,l,c,u)=>(a.addEventListener(l,c,u),()=>a.removeEventListener(l,c,u)),s=Ee(()=>{const a=kl(rt(n[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0}),r=BB(()=>{var a,l;return[(l=(a=s.value)==null?void 0:a.map(c=>ei(c)))!=null?l:[Hn].filter(c=>c!=null),kl(rt(s.value?n[1]:n[0])),kl(Ft(s.value?n[2]:n[1])),rt(s.value?n[3]:n[2])]},([a,l,c,u])=>{if(t(),!(a!=null&&a.length)||!(l!=null&&l.length)||!(c!=null&&c.length))return;const f=Ph(u)?{...u}:u;e.push(...a.flatMap(h=>l.flatMap(d=>c.map(p=>i(h,d,p,f)))))},{flush:"post"}),o=()=>{r(),t()};return Ir(t),o}function VB(){const n=Oe(!1),e=Rn();return e&&Gn(()=>{n.value=!0},e),n}function Lo(n){const e=VB();return Ee(()=>(e.value,!!n()))}function VT(n,e,t={}){const{window:i=Hn,...s}=t;let r;const o=Lo(()=>i&&"MutationObserver"in i),a=()=>{r&&(r.disconnect(),r=void 0)},l=Ee(()=>{const h=rt(n),d=kl(h).map(ei).filter(NT);return new Set(d)}),c=Ke(()=>l.value,h=>{a(),o.value&&h.size&&(r=new MutationObserver(e),h.forEach(d=>r.observe(d,s)))},{immediate:!0,flush:"post"}),u=()=>r==null?void 0:r.takeRecords(),f=()=>{c(),a()};return Ir(f),{isSupported:o,stop:f,takeRecords:u}}const HB=Symbol("vueuse-ssr-width");function HT(){const n=Ic()?CB(HB,null):null;return typeof n=="number"?n:void 0}function co(n,e={}){const{window:t=Hn,ssrWidth:i=HT()}=e,s=Lo(()=>t&&"matchMedia"in t&&typeof t.matchMedia=="function"),r=Oe(typeof i=="number"),o=Oe(),a=Oe(!1),l=c=>{a.value=c.matches};return Lc(()=>{if(r.value){r.value=!s.value;const c=rt(n).split(",");a.value=c.some(u=>{const f=u.includes("not all"),h=u.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),d=u.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let p=!!(h||d);return h&&p&&(p=i>=Fl(h[1])),d&&p&&(p=i<=Fl(d[1])),f?!p:p});return}s.value&&(o.value=t.matchMedia(rt(n)),a.value=o.value.matches)}),Ot(o,"change",l,{passive:!0}),Ee(()=>a.value)}const DG={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};function OG(n,e={}){function t(d,p){let _=rt(n[rt(d)]);return p!=null&&(_=OB(_,p)),typeof _=="number"&&(_=`${_}px`),_}const{window:i=Hn,strategy:s="min-width",ssrWidth:r=HT()}=e,o=typeof r=="number",a=o?Oe(!1):{value:!0};o&&Xa(()=>a.value=!!i);function l(d,p){return!a.value&&o?d==="min"?r>=Fl(p):r<=Fl(p):i?i.matchMedia(`(${d}-width: ${p})`).matches:!1}const c=d=>co(()=>`(min-width: ${t(d)})`,e),u=d=>co(()=>`(max-width: ${t(d)})`,e),f=Object.keys(n).reduce((d,p)=>(Object.defineProperty(d,p,{get:()=>s==="min-width"?c(p):u(p),enumerable:!0,configurable:!0}),d),{});function h(){const d=Object.keys(n).map(p=>[p,f[p],Fl(t(p))]).sort((p,_)=>p[2]-_[2]);return Ee(()=>d.filter(([,p])=>p.value).map(([p])=>p))}return Object.assign(f,{greaterOrEqual:c,smallerOrEqual:u,greater(d){return co(()=>`(min-width: ${t(d,.1)})`,e)},smaller(d){return co(()=>`(max-width: ${t(d,-.1)})`,e)},between(d,p){return co(()=>`(min-width: ${t(d)}) and (max-width: ${t(p,-.1)})`,e)},isGreater(d){return l("min",t(d,.1))},isGreaterOrEqual(d){return l("min",t(d))},isSmaller(d){return l("max",t(d,-.1))},isSmallerOrEqual(d){return l("max",t(d))},isInBetween(d,p){return l("min",t(d))&&l("max",t(p,-.1))},current:h,active(){const d=h();return Ee(()=>d.value.length===0?"":d.value.at(s==="min-width"?-1:0))}})}function Fg(n,e={}){const{controls:t=!1,navigator:i=U_}=e,s=Lo(()=>i&&"permissions"in i),r=Oe(),o=typeof n=="string"?{name:n}:n,a=Oe(),l=()=>{var u,f;a.value=(f=(u=r.value)==null?void 0:u.state)!=null?f:"prompt"};Ot(r,"change",l,{passive:!0});const c=DB(async()=>{if(s.value){if(!r.value)try{r.value=await i.permissions.query(o)}catch{r.value=void 0}finally{l()}if(t)return ht(r.value)}});return c(),t?{state:a,isSupported:s,query:c}:a}function NG(n={}){const{navigator:e=U_,read:t=!1,source:i,copiedDuring:s=1500,legacy:r=!1}=n,o=Lo(()=>e&&"clipboard"in e),a=Fg("clipboard-read"),l=Fg("clipboard-write"),c=Ee(()=>o.value||r),u=Oe(""),f=Oe(!1),h=kB(()=>f.value=!1,s,{immediate:!1});async function d(){let v=!(o.value&&m(a.value));if(!v)try{u.value=await e.clipboard.readText()}catch{v=!0}v&&(u.value=g())}c.value&&t&&Ot(["copy","cut"],d,{passive:!0});async function p(v=rt(i)){if(c.value&&v!=null){let b=!(o.value&&m(l.value));if(!b)try{await e.clipboard.writeText(v)}catch{b=!0}b&&_(v),u.value=v,f.value=!0,h.start()}}function _(v){const b=document.createElement("textarea");b.value=v??"",b.style.position="absolute",b.style.opacity="0",document.body.appendChild(b),b.select(),document.execCommand("copy"),b.remove()}function g(){var v,b,y;return(y=(b=(v=document==null?void 0:document.getSelection)==null?void 0:v.call(document))==null?void 0:b.toString())!=null?y:""}function m(v){return v==="granted"||v==="prompt"}return{isSupported:c,text:u,copied:f,copy:p}}const rf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},of="__vueuse_ssr_handlers__",GB=WB();function WB(){return of in rf||(rf[of]=rf[of]||{}),rf[of]}function GT(n,e){return GB[n]||e}function XB(n){return co("(prefers-color-scheme: dark)",n)}function $B(n){return n==null?"any":n instanceof Set?"set":n instanceof Map?"map":n instanceof Date?"date":typeof n=="boolean"?"boolean":typeof n=="string"?"string":typeof n=="object"?"object":Number.isNaN(n)?"any":"number"}const qB={boolean:{read:n=>n==="true",write:n=>String(n)},object:{read:n=>JSON.parse(n),write:n=>JSON.stringify(n)},number:{read:n=>Number.parseFloat(n),write:n=>String(n)},any:{read:n=>n,write:n=>String(n)},string:{read:n=>n,write:n=>String(n)},map:{read:n=>new Map(JSON.parse(n)),write:n=>JSON.stringify(Array.from(n.entries()))},set:{read:n=>new Set(JSON.parse(n)),write:n=>JSON.stringify(Array.from(n))},date:{read:n=>new Date(n),write:n=>n.toISOString()}},nx="vueuse-storage";function WT(n,e,t,i={}){var s;const{flush:r="pre",deep:o=!0,listenToStorageChanges:a=!0,writeDefaults:l=!0,mergeDefaults:c=!1,shallow:u,window:f=Hn,eventFilter:h,onError:d=V=>{console.error(V)},initOnMounted:p}=i,_=(u?Oe:nt)(typeof e=="function"?e():e),g=Ee(()=>rt(n));if(!t)try{t=GT("getDefaultStorage",()=>{var V;return(V=Hn)==null?void 0:V.localStorage})()}catch(V){d(V)}if(!t)return _;const m=rt(e),v=$B(m),b=(s=i.serializer)!=null?s:qB[v],{pause:y,resume:T}=UB(_,()=>E(_.value),{flush:r,deep:o,eventFilter:h});Ke(g,()=>B(),{flush:r});let w=!1;const S=V=>{p&&!w||B(V)},P=V=>{p&&!w||z(V)};f&&a&&(t instanceof Storage?Ot(f,"storage",S,{passive:!0}):Ot(f,nx,P)),p?Xa(()=>{w=!0,B()}):B();function M(V,Q){if(f){const j={key:g.value,oldValue:V,newValue:Q,storageArea:t};f.dispatchEvent(t instanceof Storage?new StorageEvent("storage",j):new CustomEvent(nx,{detail:j}))}}function E(V){try{const Q=t.getItem(g.value);if(V==null)M(Q,null),t.removeItem(g.value);else{const j=b.write(V);Q!==j&&(t.setItem(g.value,j),M(Q,j))}}catch(Q){d(Q)}}function D(V){const Q=V?V.newValue:t.getItem(g.value);if(Q==null)return l&&m!=null&&t.setItem(g.value,b.write(m)),m;if(!V&&c){const j=b.read(Q);return typeof c=="function"?c(j,m):v==="object"&&!Array.isArray(j)?{...m,...j}:j}else return typeof Q!="string"?Q:b.read(Q)}function B(V){if(!(V&&V.storageArea!==t)){if(V&&V.key==null){_.value=m;return}if(!(V&&V.key!==g.value)){y();try{(V==null?void 0:V.newValue)!==b.write(_.value)&&(_.value=D(V))}catch(Q){d(Q)}finally{V?Ar(T):T()}}}}function z(V){B(V.detail)}return _}const YB="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function jB(n={}){const{selector:e="html",attribute:t="class",initialValue:i="auto",window:s=Hn,storage:r,storageKey:o="vueuse-color-scheme",listenToStorageChanges:a=!0,storageRef:l,emitAuto:c,disableTransition:u=!0}=n,f={auto:"",light:"light",dark:"dark",...n.modes||{}},h=XB({window:s}),d=Ee(()=>h.value?"dark":"light"),p=l||(o==null?UT(i):WT(o,i,r,{window:s,listenToStorageChanges:a})),_=Ee(()=>p.value==="auto"?d.value:p.value),g=GT("updateHTMLAttrs",(y,T,w)=>{const S=typeof y=="string"?s==null?void 0:s.document.querySelector(y):ei(y);if(!S)return;const P=new Set,M=new Set;let E=null;if(T==="class"){const B=w.split(/\s/g);Object.values(f).flatMap(z=>(z||"").split(/\s/g)).filter(Boolean).forEach(z=>{B.includes(z)?P.add(z):M.add(z)})}else E={key:T,value:w};if(P.size===0&&M.size===0&&E===null)return;let D;u&&(D=s.document.createElement("style"),D.appendChild(document.createTextNode(YB)),s.document.head.appendChild(D));for(const B of P)S.classList.add(B);for(const B of M)S.classList.remove(B);E&&S.setAttribute(E.key,E.value),u&&(s.getComputedStyle(D).opacity,document.head.removeChild(D))});function m(y){var T;g(e,t,(T=f[y])!=null?T:y)}function v(y){n.onChanged?n.onChanged(y,m):m(y)}Ke(_,v,{flush:"post",immediate:!0}),Xa(()=>v(_.value));const b=Ee({get(){return c?p.value:_.value},set(y){p.value=y}});return Object.assign(b,{store:p,system:d,state:_})}function af(n,e,t={}){const{window:i=Hn,initialValue:s,observe:r=!1}=t,o=Oe(s),a=Ee(()=>{var c;return ei(e)||((c=i==null?void 0:i.document)==null?void 0:c.documentElement)});function l(){var c;const u=rt(n),f=rt(a);if(f&&i&&u){const h=(c=i.getComputedStyle(f).getPropertyValue(u))==null?void 0:c.trim();o.value=h||o.value||s}}return r&&VT(a,l,{attributeFilter:["style","class"],window:i}),Ke([a,()=>rt(n)],(c,u)=>{u[0]&&u[1]&&u[0].style.removeProperty(u[1]),l()},{immediate:!0}),Ke([o,a],([c,u])=>{const f=rt(n);u!=null&&u.style&&f&&(c==null?u.style.removeProperty(f):u.style.setProperty(f,c))},{immediate:!0}),o}function KB(n={}){const{valueDark:e="dark",valueLight:t=""}=n,i=jB({...n,onChanged:(o,a)=>{var l;n.onChanged?(l=n.onChanged)==null||l.call(n,o==="dark",a,o):a(o)},modes:{dark:e,light:t}}),s=Ee(()=>i.system.value);return Ee({get(){return i.value==="dark"},set(o){const a=o?"dark":"light";s.value===a?i.value="auto":i.value=a}})}function ZB(n={}){const{navigator:e=U_,requestPermissions:t=!1,constraints:i={audio:!0,video:!0},onUpdated:s}=n,r=nt([]),o=Ee(()=>r.value.filter(p=>p.kind==="videoinput")),a=Ee(()=>r.value.filter(p=>p.kind==="audioinput")),l=Ee(()=>r.value.filter(p=>p.kind==="audiooutput")),c=Lo(()=>e&&e.mediaDevices&&e.mediaDevices.enumerateDevices),u=Oe(!1);let f;async function h(){c.value&&(r.value=await e.mediaDevices.enumerateDevices(),s==null||s(r.value),f&&(f.getTracks().forEach(p=>p.stop()),f=null))}async function d(){const p=i.video?"camera":"microphone";if(!c.value)return!1;if(u.value)return!0;const{state:_,query:g}=Fg(p,{controls:!0});if(await g(),_.value!=="granted"){let m=!0;try{f=await e.mediaDevices.getUserMedia(i)}catch{f=null,m=!1}h(),u.value=m}else u.value=!0;return u.value}return c.value&&(t&&d(),Ot(e.mediaDevices,"devicechange",h,{passive:!0}),h()),{devices:r,ensurePermissions:d,permissionGranted:u,videoInputs:o,audioInputs:a,audioOutputs:l,isSupported:c}}function JB(n,e,t={}){const{window:i=Hn,...s}=t;let r;const o=Lo(()=>i&&"ResizeObserver"in i),a=()=>{r&&(r.disconnect(),r=void 0)},l=Ee(()=>{const f=rt(n);return Array.isArray(f)?f.map(h=>ei(h)):[ei(f)]}),c=Ke(l,f=>{if(a(),o.value&&i){r=new ResizeObserver(e);for(const h of f)h&&r.observe(h,s)}},{immediate:!0,flush:"post"}),u=()=>{a(),c()};return Ir(u),{isSupported:o,stop:u}}function UG(n,e={}){const{reset:t=!0,windowResize:i=!0,windowScroll:s=!0,immediate:r=!0,updateTiming:o="sync"}=e,a=Oe(0),l=Oe(0),c=Oe(0),u=Oe(0),f=Oe(0),h=Oe(0),d=Oe(0),p=Oe(0);function _(){const m=ei(n);if(!m){t&&(a.value=0,l.value=0,c.value=0,u.value=0,f.value=0,h.value=0,d.value=0,p.value=0);return}const v=m.getBoundingClientRect();a.value=v.height,l.value=v.bottom,c.value=v.left,u.value=v.right,f.value=v.top,h.value=v.width,d.value=v.x,p.value=v.y}function g(){o==="sync"?_():o==="next-frame"&&requestAnimationFrame(()=>_())}return JB(n,g),Ke(()=>ei(n),m=>!m&&g()),VT(n,g,{attributeFilter:["style","class"]}),s&&Ot("scroll",g,{capture:!0,passive:!0}),i&&Ot("resize",g,{passive:!0}),Xa(()=>{r&&g()}),{height:a,bottom:l,left:c,right:u,top:f,width:h,x:d,y:p,update:g}}function QB(n,e,t={}){const{root:i,rootMargin:s="0px",threshold:r=0,window:o=Hn,immediate:a=!0}=t,l=Lo(()=>o&&"IntersectionObserver"in o),c=Ee(()=>{const p=rt(n);return kl(p).map(ei).filter(NT)});let u=is;const f=Oe(a),h=l.value?Ke(()=>[c.value,ei(i),f.value],([p,_])=>{if(u(),!f.value||!p.length)return;const g=new IntersectionObserver(e,{root:ei(_),rootMargin:s,threshold:r});p.forEach(m=>m&&g.observe(m)),u=()=>{g.disconnect(),u=is}},{immediate:a,flush:"post"}):is,d=()=>{u(),h(),f.value=!1};return Ir(d),{isSupported:l,isActive:f,pause(){u(),f.value=!1},resume(){f.value=!0},stop:d}}const e4={multiple:!0,accept:"*",reset:!1,directory:!1};function t4(n){if(!n)return null;if(n instanceof FileList)return n;const e=new DataTransfer;for(const t of n)e.items.add(t);return e.files}function FG(n={}){const{document:e=zB}=n,t=nt(t4(n.initialFiles)),{on:i,trigger:s}=tx(),{on:r,trigger:o}=tx();let a;e&&(a=ei(n.input)||e.createElement("input"),a.type="file",a.onchange=u=>{const f=u.target;t.value=f.files,s(t.value)},a.oncancel=()=>{o()});const l=()=>{t.value=null,a&&a.value&&(a.value="",s(null))},c=u=>{if(!a)return;const f={...e4,...n,...u};a.multiple=f.multiple,a.accept=f.accept,a.webkitdirectory=f.directory,PB(f,"capture")&&(a.capture=f.capture),f.reset&&l(),a.click()};return{files:Fi(t),open:c,reset:l,onCancel:r,onChange:i}}const ix=1;function kG(n,e={}){const{throttle:t=0,idle:i=200,onStop:s=is,onScroll:r=is,offset:o={left:0,right:0,top:0,bottom:0},eventListenerOptions:a={capture:!1,passive:!0},behavior:l="auto",window:c=Hn,onError:u=S=>{console.error(S)}}=e,f=Oe(0),h=Oe(0),d=Ee({get(){return f.value},set(S){_(S,void 0)}}),p=Ee({get(){return h.value},set(S){_(void 0,S)}});function _(S,P){var M,E,D,B;if(!c)return;const z=rt(n);if(!z)return;(D=z instanceof Document?c.document.body:z)==null||D.scrollTo({top:(M=rt(P))!=null?M:p.value,left:(E=rt(S))!=null?E:d.value,behavior:rt(l)});const V=((B=z==null?void 0:z.document)==null?void 0:B.documentElement)||(z==null?void 0:z.documentElement)||z;d!=null&&(f.value=V.scrollLeft),p!=null&&(h.value=V.scrollTop)}const g=Oe(!1),m=xi({left:!0,right:!1,top:!0,bottom:!1}),v=xi({left:!1,right:!1,top:!1,bottom:!1}),b=S=>{g.value&&(g.value=!1,v.left=!1,v.right=!1,v.top=!1,v.bottom=!1,s(S))},y=N_(b,t+i),T=S=>{var P;if(!c)return;const M=((P=S==null?void 0:S.document)==null?void 0:P.documentElement)||(S==null?void 0:S.documentElement)||ei(S),{display:E,flexDirection:D,direction:B}=getComputedStyle(M),z=B==="rtl"?-1:1,V=M.scrollLeft;v.left=Vf.value;const Q=Math.abs(V*z)<=(o.left||0),j=Math.abs(V*z)+M.clientWidth>=M.scrollWidth-(o.right||0)-ix;E==="flex"&&D==="row-reverse"?(m.left=j,m.right=Q):(m.left=Q,m.right=j),f.value=V;let te=M.scrollTop;S===c.document&&!te&&(te=c.document.body.scrollTop),v.top=teh.value;const Z=Math.abs(te)<=(o.top||0),pe=Math.abs(te)+M.clientHeight>=M.scrollHeight-(o.bottom||0)-ix;E==="flex"&&D==="column-reverse"?(m.top=pe,m.bottom=Z):(m.top=Z,m.bottom=pe),h.value=te},w=S=>{var P;if(!c)return;const M=(P=S.target.documentElement)!=null?P:S.target;T(M),g.value=!0,y(S),r(S)};return Ot(n,"scroll",t?NB(w,t,!0,!1):w,a),Xa(()=>{try{const S=rt(n);if(!S)return;T(S)}catch(S){u(S)}}),Ot(n,"scrollend",b,a),{x:d,y:p,isScrolling:g,arrivedState:m,directions:v,measure(){const S=rt(n);c&&S&&T(S)}}}function ys(n,e,t={}){const{window:i=Hn}=t;return WT(n,e,i==null?void 0:i.localStorage,t)}const n4={page:n=>[n.pageX,n.pageY],client:n=>[n.clientX,n.clientY],screen:n=>[n.screenX,n.screenY],movement:n=>n instanceof MouseEvent?[n.movementX,n.movementY]:null};function BG(n={}){const{type:e="page",touch:t=!0,resetOnTouchEnds:i=!1,initialValue:s={x:0,y:0},window:r=Hn,target:o=r,scroll:a=!0,eventFilter:l}=n;let c=null,u=0,f=0;const h=Oe(s.x),d=Oe(s.y),p=Oe(null),_=typeof e=="function"?e:n4[e],g=S=>{const P=_(S);c=S,P&&([h.value,d.value]=P,p.value="mouse"),r&&(u=r.scrollX,f=r.scrollY)},m=S=>{if(S.touches.length>0){const P=_(S.touches[0]);P&&([h.value,d.value]=P,p.value="touch")}},v=()=>{if(!c||!r)return;const S=_(c);c instanceof MouseEvent&&S&&(h.value=S[0]+r.scrollX-u,d.value=S[1]+r.scrollY-f)},b=()=>{h.value=s.x,d.value=s.y},y=l?S=>l(()=>g(S),{}):S=>g(S),T=l?S=>l(()=>m(S),{}):S=>m(S),w=l?()=>l(()=>v(),{}):()=>v();if(o){const S={passive:!0};Ot(o,["mousemove","dragover"],y,S),t&&e!=="movement"&&(Ot(o,["touchstart","touchmove"],T,S),i&&Ot(o,"touchend",b,S)),a&&e==="page"&&Ot(r,"scroll",w,S)}return{x:h,y:d,sourceType:p}}function zG(n){const e=Oe(),t=()=>{e.value&&URL.revokeObjectURL(e.value),e.value=void 0};return Ke(()=>rt(n),i=>{t(),i&&(e.value=URL.createObjectURL(i))},{immediate:!0}),Ir(t),Fi(e)}const sx="--vueuse-safe-area-top",rx="--vueuse-safe-area-right",ox="--vueuse-safe-area-bottom",ax="--vueuse-safe-area-left";function VG(){const n=Oe(""),e=Oe(""),t=Oe(""),i=Oe("");if(Yc){const r=af(sx),o=af(rx),a=af(ox),l=af(ax);r.value="env(safe-area-inset-top, 0px)",o.value="env(safe-area-inset-right, 0px)",a.value="env(safe-area-inset-bottom, 0px)",l.value="env(safe-area-inset-left, 0px)",s(),Ot("resize",N_(s),{passive:!0})}function s(){n.value=lf(sx),e.value=lf(rx),t.value=lf(ox),i.value=lf(ax)}return{top:n,right:e,bottom:t,left:i,update:s}}function lf(n){return getComputedStyle(document.documentElement).getPropertyValue(n)}function HG(n,e,t){const{window:i=Hn}={},s=nt(null),r=Oe(),o=(...l)=>{r.value&&r.value.postMessage(...l)},a=function(){r.value&&r.value.terminate()};return i&&(r.value=new Worker(n,e),r.value.onmessage=l=>{s.value=l.data},Ir(()=>{r.value&&r.value.terminate()})),{data:s,post:o,terminate:a,worker:r}}function GG(n={}){const{window:e=Hn,initialWidth:t=Number.POSITIVE_INFINITY,initialHeight:i=Number.POSITIVE_INFINITY,listenOrientation:s=!0,includeScrollbar:r=!0,type:o="inner"}=n,a=Oe(t),l=Oe(i),c=()=>{if(e)if(o==="outer")a.value=e.outerWidth,l.value=e.outerHeight;else if(o==="visual"&&e.visualViewport){const{width:f,height:h,scale:d}=e.visualViewport;a.value=Math.round(f*d),l.value=Math.round(h*d)}else r?(a.value=e.innerWidth,l.value=e.innerHeight):(a.value=e.document.documentElement.clientWidth,l.value=e.document.documentElement.clientHeight)};c(),Xa(c);const u={passive:!0};if(Ot("resize",c,u),e&&o==="visual"&&e.visualViewport&&Ot(e.visualViewport,"resize",c,u),s){const f=co("(orientation: portrait)");Ke(f,()=>c())}return{width:a,height:l}}const XT=1/60*1e3,i4=typeof performance<"u"?()=>performance.now():()=>Date.now(),$T=typeof window<"u"?n=>window.requestAnimationFrame(n):n=>setTimeout(()=>n(i4()),XT);function s4(n){let e=[],t=[],i=0,s=!1,r=!1;const o=new WeakSet,a={schedule:(l,c=!1,u=!1)=>{const f=u&&s,h=f?e:t;return c&&o.add(l),h.indexOf(l)===-1&&(h.push(l),f&&s&&(i=e.length)),l},cancel:l=>{const c=t.indexOf(l);c!==-1&&t.splice(c,1),o.delete(l)},process:l=>{if(s){r=!0;return}if(s=!0,[e,t]=[t,e],t.length=0,i=e.length,i)for(let c=0;c(n[e]=s4(()=>xc=!0),n),{}),zg=jc.reduce((n,e)=>{const t=Vd[e];return n[e]=(i,s=!1,r=!1)=>(xc||l4(),t.schedule(i,s,r)),n},{}),o4=jc.reduce((n,e)=>(n[e]=Vd[e].cancel,n),{});jc.reduce((n,e)=>(n[e]=()=>Vd[e].process(va),n),{});const a4=n=>Vd[n].process(va),qT=n=>{xc=!1,va.delta=kg?XT:Math.max(Math.min(n-va.timestamp,r4),1),va.timestamp=n,Bg=!0,jc.forEach(a4),Bg=!1,xc&&(kg=!1,$T(qT))},l4=()=>{xc=!0,kg=!0,Bg||$T(qT)},YT=()=>va;function jT(n,e){var t={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&e.indexOf(i)<0&&(t[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(n);sMath.min(Math.max(t,n),e),cx=.001,c4=.01,u4=10,f4=.05,h4=1;function d4({duration:n=800,bounce:e=.25,velocity:t=0,mass:i=1}){let s,r,o=1-e;o=Vg(f4,h4,o),n=Vg(c4,u4,n/1e3),o<1?(s=c=>{const u=c*o,f=u*n,h=u-t,d=Hg(c,o),p=Math.exp(-f);return cx-h/d*p},r=c=>{const f=c*o*n,h=f*t+t,d=Math.pow(o,2)*Math.pow(c,2)*n,p=Math.exp(-f),_=Hg(Math.pow(c,2),o);return(-s(c)+cx>0?-1:1)*((h-d)*p)/_}):(s=c=>{const u=Math.exp(-c*n),f=(c-t)*n+1;return-.001+u*f},r=c=>{const u=Math.exp(-c*n),f=(t-c)*(n*n);return u*f});const a=5/n,l=m4(s,r,a);if(n=n*1e3,isNaN(l))return{stiffness:100,damping:10,duration:n};{const c=Math.pow(l,2)*i;return{stiffness:c,damping:o*2*Math.sqrt(i*c),duration:n}}}const p4=12;function m4(n,e,t){let i=t;for(let s=1;sn[t]!==void 0)}function v4(n){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},n);if(!ux(n,_4)&&ux(n,g4)){const t=d4(n);e=Object.assign(Object.assign(Object.assign({},e),t),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}function F_(n){var{from:e=0,to:t=1,restSpeed:i=2,restDelta:s}=n,r=jT(n,["from","to","restSpeed","restDelta"]);const o={done:!1,value:e};let{stiffness:a,damping:l,mass:c,velocity:u,duration:f,isResolvedFromDuration:h}=v4(r),d=fx,p=fx;function _(){const g=u?-(u/1e3):0,m=t-e,v=l/(2*Math.sqrt(a*c)),b=Math.sqrt(a/c)/1e3;if(s===void 0&&(s=Math.min(Math.abs(t-e)/100,.4)),v<1){const y=Hg(b,v);d=T=>{const w=Math.exp(-v*b*T);return t-w*((g+v*b*m)/y*Math.sin(y*T)+m*Math.cos(y*T))},p=T=>{const w=Math.exp(-v*b*T);return v*b*w*(Math.sin(y*T)*(g+v*b*m)/y+m*Math.cos(y*T))-w*(Math.cos(y*T)*(g+v*b*m)-y*m*Math.sin(y*T))}}else if(v===1)d=y=>t-Math.exp(-b*y)*(m+(g+b*m)*y);else{const y=b*Math.sqrt(v*v-1);d=T=>{const w=Math.exp(-v*b*T),S=Math.min(y*T,300);return t-w*((g+v*b*m)*Math.sinh(S)+y*m*Math.cosh(S))/y}}}return _(),{next:g=>{const m=d(g);if(h)o.done=g>=f;else{const v=p(g)*1e3,b=Math.abs(v)<=i,y=Math.abs(t-m)<=s;o.done=b&&y}return o.value=o.done?t:m,o},flipTarget:()=>{u=-u,[e,t]=[t,e],_()}}}F_.needsInterpolation=(n,e)=>typeof n=="string"||typeof e=="string";const fx=n=>0,KT=(n,e,t)=>{const i=e-n;return i===0?1:(t-n)/i},k_=(n,e,t)=>-t*n+t*e+n,ZT=(n,e)=>t=>Math.max(Math.min(t,e),n),Bl=n=>n%1?Number(n.toFixed(5)):n,Mc=/(-)?([\d]*\.?[\d])+/g,Gg=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,y4=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Kc(n){return typeof n=="string"}const Zc={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},zl=Object.assign(Object.assign({},Zc),{transform:ZT(0,1)}),cf=Object.assign(Object.assign({},Zc),{default:1}),B_=n=>({test:e=>Kc(e)&&e.endsWith(n)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${n}`}),to=B_("deg"),Vl=B_("%"),ut=B_("px"),hx=Object.assign(Object.assign({},Vl),{parse:n=>Vl.parse(n)/100,transform:n=>Vl.transform(n*100)}),z_=(n,e)=>t=>!!(Kc(t)&&y4.test(t)&&t.startsWith(n)||e&&Object.prototype.hasOwnProperty.call(t,e)),JT=(n,e,t)=>i=>{if(!Kc(i))return i;const[s,r,o,a]=i.match(Mc);return{[n]:parseFloat(s),[e]:parseFloat(r),[t]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},po={test:z_("hsl","hue"),parse:JT("hue","saturation","lightness"),transform:({hue:n,saturation:e,lightness:t,alpha:i=1})=>"hsla("+Math.round(n)+", "+Vl.transform(Bl(e))+", "+Vl.transform(Bl(t))+", "+Bl(zl.transform(i))+")"},b4=ZT(0,255),_m=Object.assign(Object.assign({},Zc),{transform:n=>Math.round(b4(n))}),mr={test:z_("rgb","red"),parse:JT("red","green","blue"),transform:({red:n,green:e,blue:t,alpha:i=1})=>"rgba("+_m.transform(n)+", "+_m.transform(e)+", "+_m.transform(t)+", "+Bl(zl.transform(i))+")"};function x4(n){let e="",t="",i="",s="";return n.length>5?(e=n.substr(1,2),t=n.substr(3,2),i=n.substr(5,2),s=n.substr(7,2)):(e=n.substr(1,1),t=n.substr(2,1),i=n.substr(3,1),s=n.substr(4,1),e+=e,t+=t,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const Wg={test:z_("#"),parse:x4,transform:mr.transform},Yn={test:n=>mr.test(n)||Wg.test(n)||po.test(n),parse:n=>mr.test(n)?mr.parse(n):po.test(n)?po.parse(n):Wg.parse(n),transform:n=>Kc(n)?n:n.hasOwnProperty("red")?mr.transform(n):po.transform(n)},QT="${c}",ew="${n}";function M4(n){var e,t,i,s;return isNaN(n)&&Kc(n)&&((t=(e=n.match(Mc))===null||e===void 0?void 0:e.length)!==null&&t!==void 0?t:0)+((s=(i=n.match(Gg))===null||i===void 0?void 0:i.length)!==null&&s!==void 0?s:0)>0}function tw(n){typeof n=="number"&&(n=`${n}`);const e=[];let t=0;const i=n.match(Gg);i&&(t=i.length,n=n.replace(Gg,QT),e.push(...i.map(Yn.parse)));const s=n.match(Mc);return s&&(n=n.replace(Mc,ew),e.push(...s.map(Zc.parse))),{values:e,numColors:t,tokenised:n}}function nw(n){return tw(n).values}function iw(n){const{values:e,numColors:t,tokenised:i}=tw(n),s=e.length;return r=>{let o=i;for(let a=0;atypeof n=="number"?0:n;function E4(n){const e=nw(n);return iw(n)(e.map(S4))}const Jc={test:M4,parse:nw,createTransformer:iw,getAnimatableNone:E4},T4=new Set(["brightness","contrast","saturate","opacity"]);function w4(n){let[e,t]=n.slice(0,-1).split("(");if(e==="drop-shadow")return n;const[i]=t.match(Mc)||[];if(!i)return n;const s=t.replace(i,"");let r=T4.has(e)?1:0;return i!==t&&(r*=100),e+"("+r+s+")"}const A4=/([a-z-]*)\(.*?\)/g,Xg=Object.assign(Object.assign({},Jc),{getAnimatableNone:n=>{const e=n.match(A4);return e?e.map(w4).join(" "):n}});function vm(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*(2/3-t)*6:n}function dx({hue:n,saturation:e,lightness:t,alpha:i}){n/=360,e/=100,t/=100;let s=0,r=0,o=0;if(!e)s=r=o=t;else{const a=t<.5?t*(1+e):t+e-t*e,l=2*t-a;s=vm(l,a,n+1/3),r=vm(l,a,n),o=vm(l,a,n-1/3)}return{red:Math.round(s*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:i}}const C4=(n,e,t)=>{const i=n*n,s=e*e;return Math.sqrt(Math.max(0,t*(s-i)+i))},R4=[Wg,mr,po],px=n=>R4.find(e=>e.test(n)),sw=(n,e)=>{let t=px(n),i=px(e),s=t.parse(n),r=i.parse(e);t===po&&(s=dx(s),t=mr),i===po&&(r=dx(r),i=mr);const o=Object.assign({},s);return a=>{for(const l in o)l!=="alpha"&&(o[l]=C4(s[l],r[l],a));return o.alpha=k_(s.alpha,r.alpha,a),t.transform(o)}},P4=n=>typeof n=="number",I4=(n,e)=>t=>e(n(t)),rw=(...n)=>n.reduce(I4);function ow(n,e){return P4(n)?t=>k_(n,e,t):Yn.test(n)?sw(n,e):lw(n,e)}const aw=(n,e)=>{const t=[...n],i=t.length,s=n.map((r,o)=>ow(r,e[o]));return r=>{for(let o=0;o{const t=Object.assign(Object.assign({},n),e),i={};for(const s in t)n[s]!==void 0&&e[s]!==void 0&&(i[s]=ow(n[s],e[s]));return s=>{for(const r in i)t[r]=i[r](s);return t}};function mx(n){const e=Jc.parse(n),t=e.length;let i=0,s=0,r=0;for(let o=0;o{const t=Jc.createTransformer(e),i=mx(n),s=mx(e);return i.numHSL===s.numHSL&&i.numRGB===s.numRGB&&i.numNumbers>=s.numNumbers?rw(aw(i.parsed,s.parsed),t):o=>`${o>0?e:n}`},D4=(n,e)=>t=>k_(n,e,t);function O4(n){if(typeof n=="number")return D4;if(typeof n=="string")return Yn.test(n)?sw:lw;if(Array.isArray(n))return aw;if(typeof n=="object")return L4}function N4(n,e,t){const i=[],s=t||O4(n[0]),r=n.length-1;for(let o=0;ot(KT(n,e,i))}function F4(n,e){const t=n.length,i=t-1;return s=>{let r=0,o=!1;if(s<=n[0]?o=!0:s>=n[i]&&(r=i-1,o=!0),!o){let l=1;for(;ls||l===i);l++);r=l-1}const a=KT(n[r],n[r+1],s);return e[r](a)}}function cw(n,e,{clamp:t=!0,ease:i,mixer:s}={}){const r=n.length;lx(r===e.length),lx(!i||!Array.isArray(i)||i.length===r-1),n[0]>n[r-1]&&(n=[].concat(n),e=[].concat(e),n.reverse(),e.reverse());const o=N4(e,i,s),a=r===2?U4(n,o):F4(n,o);return t?l=>a(Vg(n[0],n[r-1],l)):a}const Hd=n=>e=>1-n(1-e),V_=n=>e=>e<=.5?n(2*e)/2:(2-n(2*(1-e)))/2,k4=n=>e=>Math.pow(e,n),uw=n=>e=>e*e*((n+1)*e-n),B4=n=>{const e=uw(n);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))},fw=1.525,z4=4/11,V4=8/11,H4=9/10,hw=n=>n,H_=k4(2),G4=Hd(H_),dw=V_(H_),pw=n=>1-Math.sin(Math.acos(n)),mw=Hd(pw),W4=V_(mw),G_=uw(fw),X4=Hd(G_),$4=V_(G_),q4=B4(fw),Y4=4356/361,j4=35442/1805,K4=16061/1805,Ih=n=>{if(n===1||n===0)return n;const e=n*n;return nn<.5?.5*(1-Ih(1-n*2)):.5*Ih(n*2-1)+.5;function Q4(n,e){return n.map(()=>e||dw).splice(0,n.length-1)}function e5(n){const e=n.length;return n.map((t,i)=>i!==0?i/(e-1):0)}function t5(n,e){return n.map(t=>t*e)}function Cf({from:n=0,to:e=1,ease:t,offset:i,duration:s=300}){const r={done:!1,value:n},o=Array.isArray(e)?e:[n,e],a=t5(i&&i.length===o.length?i:e5(o),s);function l(){return cw(a,o,{ease:Array.isArray(t)?t:Q4(o,t)})}let c=l();return{next:u=>(r.value=c(u),r.done=u>=s,r),flipTarget:()=>{o.reverse(),c=l()}}}function n5({velocity:n=0,from:e=0,power:t=.8,timeConstant:i=350,restDelta:s=.5,modifyTarget:r}){const o={done:!1,value:e};let a=t*n;const l=e+a,c=r===void 0?l:r(l);return c!==l&&(a=c-e),{next:u=>{const f=-a*Math.exp(-u/i);return o.done=!(f>s||f<-s),o.value=o.done?c:c+f,o},flipTarget:()=>{}}}const gx={keyframes:Cf,spring:F_,decay:n5};function i5(n){if(Array.isArray(n.to))return Cf;if(gx[n.type])return gx[n.type];const e=new Set(Object.keys(n));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Cf:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?F_:Cf}function gw(n,e,t=0){return n-e-t}function s5(n,e,t=0,i=!0){return i?gw(e+-n,e,t):e-(n-e)+t}function r5(n,e,t,i){return i?n>=e+t:n<=-t}const o5=n=>{const e=({delta:t})=>n(t);return{start:()=>zg.update(e,!0),stop:()=>o4.update(e)}};function _w(n){var e,t,{from:i,autoplay:s=!0,driver:r=o5,elapsed:o=0,repeat:a=0,repeatType:l="loop",repeatDelay:c=0,onPlay:u,onStop:f,onComplete:h,onRepeat:d,onUpdate:p}=n,_=jT(n,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:g}=_,m,v=0,b=_.duration,y,T=!1,w=!0,S;const P=i5(_);!((t=(e=P).needsInterpolation)===null||t===void 0)&&t.call(e,i,g)&&(S=cw([0,100],[i,g],{clamp:!1}),i=0,g=100);const M=P(Object.assign(Object.assign({},_),{from:i,to:g}));function E(){v++,l==="reverse"?(w=v%2===0,o=s5(o,b,c,w)):(o=gw(o,b,c),l==="mirror"&&M.flipTarget()),T=!1,d&&d()}function D(){m.stop(),h&&h()}function B(V){if(w||(V=-V),o+=V,!T){const Q=M.next(Math.max(0,o));y=Q.value,S&&(y=S(y)),T=w?Q.done:o<=0}p==null||p(y),T&&(v===0&&(b??(b=o)),v{f==null||f(),m.stop()}}}function vw(n,e){return e?n*(1e3/e):0}function a5({from:n=0,velocity:e=0,min:t,max:i,power:s=.8,timeConstant:r=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:c,driver:u,onUpdate:f,onComplete:h,onStop:d}){let p;function _(b){return t!==void 0&&bi}function g(b){return t===void 0?i:i===void 0||Math.abs(t-b){var T;f==null||f(y),(T=b.onUpdate)===null||T===void 0||T.call(b,y)},onComplete:h,onStop:d}))}function v(b){m(Object.assign({type:"spring",stiffness:o,damping:a,restDelta:l},b))}if(_(n))v({from:n,velocity:e,to:g(n)});else{let b=s*e+n;typeof c<"u"&&(b=c(b));const y=g(b),T=y===t?-1:1;let w,S;const P=M=>{w=S,S=M,e=vw(M-w,YT().delta),(T===1&&M>y||T===-1&&Mp==null?void 0:p.stop()}}const yw=(n,e)=>1-3*e+3*n,bw=(n,e)=>3*e-6*n,xw=n=>3*n,Lh=(n,e,t)=>((yw(e,t)*n+bw(e,t))*n+xw(e))*n,Mw=(n,e,t)=>3*yw(e,t)*n*n+2*bw(e,t)*n+xw(e),l5=1e-7,c5=10;function u5(n,e,t,i,s){let r,o,a=0;do o=e+(t-e)/2,r=Lh(o,i,s)-n,r>0?t=o:e=o;while(Math.abs(r)>l5&&++a=h5?d5(o,f,n,t):h===0?f:u5(o,a,a+uf,n,t)}return o=>o===0||o===1?o:Lh(r(o),e,i)}const Ns={},ym={};class m5{constructor(){fi(this,"subscriptions",new Set)}add(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}notify(e,t,i){if(this.subscriptions.size)for(const s of this.subscriptions)s(e,t,i)}clear(){this.subscriptions.clear()}}function _x(n){return!Number.isNaN(Number.parseFloat(n))}class g5{constructor(e){fi(this,"current");fi(this,"prev");fi(this,"timeDelta",0);fi(this,"lastUpdated",0);fi(this,"updateSubscribers",new m5);fi(this,"stopAnimation");fi(this,"canTrackVelocity",!1);fi(this,"updateAndNotify",e=>{this.prev=this.current,this.current=e;const{delta:t,timestamp:i}=YT();this.lastUpdated!==i&&(this.timeDelta=t,this.lastUpdated=i),zg.postRender(this.scheduleVelocityCheck),this.updateSubscribers.notify(this.current)});fi(this,"scheduleVelocityCheck",()=>zg.postRender(this.velocityCheck));fi(this,"velocityCheck",({timestamp:e})=>{this.canTrackVelocity||(this.canTrackVelocity=_x(this.current)),e!==this.lastUpdated&&(this.prev=this.current)});this.prev=this.current=e,this.canTrackVelocity=_x(this.current)}onChange(e){return this.updateSubscribers.add(e)}clearListeners(){this.updateSubscribers.clear()}set(e){this.updateAndNotify(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?vw(Number.parseFloat(this.current)-Number.parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(t=>{const{stop:i}=e(t);this.stopAnimation=i}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.stop()}}function _5(n){return new g5(n)}const{isArray:v5}=Array;function y5(){const n=nt({}),e=i=>{const s=r=>{n.value[r]&&(n.value[r].stop(),n.value[r].destroy(),delete n.value[r])};i?v5(i)?i.forEach(s):s(i):Object.keys(n.value).forEach(s)},t=(i,s,r)=>{if(n.value[i])return n.value[i];const o=_5(s);return o.onChange(a=>r[i]=a),n.value[i]=o,o};return FB(e),{motionValues:n,get:t,stop:e}}function b5(n){return Array.isArray(n)}function no(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}}function bm(n){return{type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}}function x5(n){return{type:"spring",stiffness:550,damping:n===0?100:30,restDelta:.01,restSpeed:10}}function xm(){return{type:"keyframes",ease:"linear",duration:300}}function M5(n){return{type:"keyframes",duration:800,values:n}}const vx={default:x5,x:no,y:no,z:no,rotate:no,rotateX:no,rotateY:no,rotateZ:no,scaleX:bm,scaleY:bm,scale:bm,backgroundColor:xm,color:xm,opacity:xm};function Sw(n,e){let t;return b5(e)?t=M5:t=vx[n]||vx.default,{to:e,...t(e)}}const yx={...Zc,transform:Math.round},Ew={color:Yn,backgroundColor:Yn,outlineColor:Yn,fill:Yn,stroke:Yn,borderColor:Yn,borderTopColor:Yn,borderRightColor:Yn,borderBottomColor:Yn,borderLeftColor:Yn,borderWidth:ut,borderTopWidth:ut,borderRightWidth:ut,borderBottomWidth:ut,borderLeftWidth:ut,borderRadius:ut,radius:ut,borderTopLeftRadius:ut,borderTopRightRadius:ut,borderBottomRightRadius:ut,borderBottomLeftRadius:ut,width:ut,maxWidth:ut,height:ut,maxHeight:ut,size:ut,top:ut,right:ut,bottom:ut,left:ut,padding:ut,paddingTop:ut,paddingRight:ut,paddingBottom:ut,paddingLeft:ut,margin:ut,marginTop:ut,marginRight:ut,marginBottom:ut,marginLeft:ut,rotate:to,rotateX:to,rotateY:to,rotateZ:to,scale:cf,scaleX:cf,scaleY:cf,scaleZ:cf,skew:to,skewX:to,skewY:to,distance:ut,translateX:ut,translateY:ut,translateZ:ut,x:ut,y:ut,z:ut,perspective:ut,transformPerspective:ut,opacity:zl,originX:hx,originY:hx,originZ:ut,zIndex:yx,filter:Xg,WebkitFilter:Xg,fillOpacity:zl,strokeOpacity:zl,numOctaves:yx},W_=n=>Ew[n];function $g(n,e){return e&&typeof n=="number"&&e.transform?e.transform(n):n}function S5(n,e){let t=W_(n);return t!==Xg&&(t=Jc),t.getAnimatableNone?t.getAnimatableNone(e):void 0}const E5={linear:hw,easeIn:H_,easeInOut:dw,easeOut:G4,circIn:pw,circInOut:W4,circOut:mw,backIn:G_,backInOut:$4,backOut:X4,anticipate:q4,bounceIn:Z4,bounceInOut:J4,bounceOut:Ih};function bx(n){if(Array.isArray(n)){const[e,t,i,s]=n;return p5(e,t,i,s)}else if(typeof n=="string")return E5[n];return n}function T5(n){return Array.isArray(n)&&typeof n[0]!="number"}function xx(n,e){return n==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&Jc.test(e)&&!e.startsWith("url("))}function w5(n){return Array.isArray(n.to)&&n.to[0]===null&&(n.to=[...n.to],n.to[0]=n.from),n}function A5({ease:n,times:e,delay:t,...i}){const s={...i};return e&&(s.offset=e),n&&(s.ease=T5(n)?n.map(bx):bx(n)),t&&(s.elapsed=-t),s}function C5(n,e,t){return Array.isArray(e.to)&&(n.duration||(n.duration=800)),w5(e),R5(n)||(n={...n,...Sw(t,e.to)}),{...e,...A5(n)}}function R5({delay:n,repeat:e,repeatType:t,repeatDelay:i,from:s,...r}){return!!Object.keys(r).length}function P5(n,e){return n[e]||n.default||n}function I5(n,e,t,i,s){const r=P5(i,n);let o=r.from===null||r.from===void 0?e.get():r.from;const a=xx(n,t);o==="none"&&a&&typeof t=="string"&&(o=S5(n,t));const l=xx(n,o);function c(f){const h={from:o,to:t,velocity:i.velocity?i.velocity:e.getVelocity(),onUpdate:d=>e.set(d)};return r.type==="inertia"||r.type==="decay"?a5({...h,...r}):_w({...C5(r,h,n),onUpdate:d=>{h.onUpdate(d),r.onUpdate&&r.onUpdate(d)},onComplete:()=>{s&&s(),f&&f()}})}function u(f){return e.set(t),s&&s(),f&&f(),{stop:()=>{}}}return!l||!a||r.type===!1?u:c}function L5(){const{motionValues:n,stop:e,get:t}=y5();return{motionValues:n,stop:e,push:(s,r,o,a={},l)=>{const c=o[s],u=t(s,c,o);if(a&&a.immediate){u.set(r);return}const f=I5(s,u,r,a,l);u.start(f)}}}function D5(n,e={},{motionValues:t,push:i,stop:s}=L5()){const r=Ft(e),o=nt(!1);Ke(t,f=>{o.value=Object.values(f).filter(h=>h.isAnimating()).length>0},{immediate:!0,deep:!0});const a=f=>{if(!r||!r[f])throw new Error(`The variant ${f} does not exist.`);return r[f]},l=f=>{typeof f=="string"&&(f=a(f));const h=Object.entries(f).map(([p,_])=>{if(p!=="transition")return new Promise(g=>i(p,_,n,f.transition||Sw(p,f[p]),g))}).filter(Boolean);async function d(){var p,_;await Promise.all(h),(_=(p=f.transition)==null?void 0:p.onComplete)==null||_.call(p)}return Promise.all([d()])};return{isAnimating:o,apply:l,set:f=>{const h=Ph(f)?f:a(f);Object.entries(h).forEach(([d,p])=>{d!=="transition"&&i(d,p,n,{immediate:!0})})},leave:async f=>{let h;if(r&&(r.leave&&(h=r.leave),!r.leave&&r.initial&&(h=r.initial)),!h){f();return}await l(h),f()},stop:s}}const X_=typeof window<"u",O5=()=>X_&&(window.onpointerdown===null||(Ns==null?void 0:Ns.TEST)),N5=()=>X_&&(window.ontouchstart===null||(Ns==null?void 0:Ns.TEST)),U5=()=>X_&&(window.onmousedown===null||(Ns==null?void 0:Ns.TEST));function F5({target:n,state:e,variants:t,apply:i}){const s=Ft(t),r=nt(!1),o=nt(!1),a=nt(!1),l=Ee(()=>{let u=[...Object.keys(e.value||{})];return s&&(s.hovered&&(u=[...u,...Object.keys(s.hovered)]),s.tapped&&(u=[...u,...Object.keys(s.tapped)]),s.focused&&(u=[...u,...Object.keys(s.focused)])),u}),c=Ee(()=>{const u={};Object.assign(u,e.value),r.value&&s.hovered&&Object.assign(u,s.hovered),o.value&&s.tapped&&Object.assign(u,s.tapped),a.value&&s.focused&&Object.assign(u,s.focused);for(const f in u)l.value.includes(f)||delete u[f];return u});s.hovered&&(Ot(n,"mouseenter",()=>r.value=!0),Ot(n,"mouseleave",()=>{r.value=!1,o.value=!1})),s.tapped&&(U5()&&(Ot(n,"mousedown",()=>o.value=!0),Ot(n,"mouseup",()=>o.value=!1)),O5()&&(Ot(n,"pointerdown",()=>o.value=!0),Ot(n,"pointerup",()=>o.value=!1)),N5()&&(Ot(n,"touchstart",()=>o.value=!0),Ot(n,"touchend",()=>o.value=!1))),s.focused&&(Ot(n,"focus",()=>a.value=!0),Ot(n,"blur",()=>a.value=!1)),Ke([r,o,a],()=>{i(c.value)})}function k5({set:n,target:e,variants:t,variant:i}){const s=Ft(t);Ke(()=>e,()=>{s&&(s.initial&&(n("initial"),i.value="initial"),s.enter&&(i.value="enter"))},{immediate:!0,flush:"pre"})}function B5({state:n,apply:e}){Ke(n,t=>{t&&e(t)},{immediate:!0})}function Tw({target:n,variants:e,variant:t}){const i=Ft(e);i&&(i.visible||i.visibleOnce)&&QB(n,([{isIntersecting:s}])=>{i.visible?s?t.value="visible":t.value="initial":i.visibleOnce&&(s&&t.value!=="visibleOnce"?t.value="visibleOnce":t.value||(t.value="initial"))})}function z5(n,e={syncVariants:!0,lifeCycleHooks:!0,visibilityHooks:!0,eventListeners:!0}){e.lifeCycleHooks&&k5(n),e.syncVariants&&B5(n),e.visibilityHooks&&Tw(n),e.eventListeners&&F5(n)}function ww(n={}){const e=xi({...n}),t=nt({});return Ke(e,()=>{const i={};for(const[s,r]of Object.entries(e)){const o=W_(s),a=$g(r,o);i[s]=a}t.value=i},{immediate:!0,deep:!0}),{state:e,style:t}}function $_(n,e){Ke(()=>ei(n),t=>{t&&e(t)},{immediate:!0})}const V5={x:"translateX",y:"translateY",z:"translateZ"};function Aw(n={},e=!0){const t=xi({...n}),i=nt("");return Ke(t,s=>{let r="",o=!1;if(e&&(s.x||s.y||s.z)){const a=[s.x||0,s.y||0,s.z||0].map(l=>$g(l,ut)).join(",");r+=`translate3d(${a}) `,o=!0}for(const[a,l]of Object.entries(s)){if(e&&(a==="x"||a==="y"||a==="z"))continue;const c=W_(a),u=$g(l,c);r+=`${V5[a]||a}(${u}) `}e&&!o&&(r+="translateZ(0px) "),i.value=r.trim()},{immediate:!0,deep:!0}),{state:t,transform:i}}const H5=["","X","Y","Z"],G5=["perspective","translate","scale","rotate","skew"],Cw=["transformPerspective","x","y","z"];G5.forEach(n=>{H5.forEach(e=>{const t=n+e;Cw.push(t)})});const W5=new Set(Cw);function q_(n){return W5.has(n)}const X5=new Set(["originX","originY","originZ"]);function Rw(n){return X5.has(n)}function $5(n){const e={},t={};return Object.entries(n).forEach(([i,s])=>{q_(i)||Rw(i)?e[i]=s:t[i]=s}),{transform:e,style:t}}function Gd(n){const{transform:e,style:t}=$5(n),{transform:i}=Aw(e),{style:s}=ww(t);return i.value&&(s.value.transform=i.value),s.value}function q5(n,e){let t,i;const{state:s,style:r}=ww();return $_(n,o=>{i=o;for(const a of Object.keys(Ew))o.style[a]===null||o.style[a]===""||q_(a)||Rw(a)||(s[a]=o.style[a]);t&&Object.entries(t).forEach(([a,l])=>o.style[a]=l),e&&e(s)}),Ke(r,o=>{if(!i){t=o;return}for(const a in o)i.style[a]=o[a]},{immediate:!0}),{style:s}}function Y5(n){const e=n.trim().split(/\) |\)/);if(e.length===1)return{};const t=i=>i.endsWith("px")||i.endsWith("deg")?Number.parseFloat(i):Number.isNaN(Number(i))?Number(i):i;return e.reduce((i,s)=>{if(!s)return i;const[r,o]=s.split("("),l=o.split(",").map(u=>t(u.endsWith(")")?u.replace(")",""):u.trim())),c=l.length===1?l[0]:l;return{...i,[r]:c}},{})}function j5(n,e){Object.entries(Y5(e)).forEach(([t,i])=>{const s=["x","y","z"];if(t==="translate3d"){if(i===0){s.forEach(r=>n[r]=0);return}i.forEach((r,o)=>n[s[o]]=r);return}if(i=Number.parseFloat(`${i}`),t==="translateX"){n.x=i;return}if(t==="translateY"){n.y=i;return}if(t==="translateZ"){n.z=i;return}n[t]=i})}function K5(n,e){let t,i;const{state:s,transform:r}=Aw();return $_(n,o=>{i=o,o.style.transform&&j5(s,o.style.transform),t&&(o.style.transform=t),e&&e(s)}),Ke(r,o=>{if(!i){t=o;return}i.style.transform=o},{immediate:!0}),{transform:s}}function Z5(n){return Object.entries(n)}function J5(n,e){const t=xi({}),i=o=>Object.entries(o).forEach(([a,l])=>t[a]=l),{style:s}=q5(n,i),{transform:r}=K5(n,i);return Ke(t,o=>{Z5(o).forEach(([a,l])=>{const c=q_(a)?r:s;c[a]&&c[a]===l||(c[a]=l)})},{immediate:!0,deep:!0}),$_(n,()=>e),{motionProperties:t,style:s,transform:r}}function Q5(n={}){const e=Ft(n),t=nt();return{state:Ee(()=>{if(t.value)return e[t.value]}),variant:t}}function Pw(n,e={},t){const{motionProperties:i}=J5(n),{variant:s,state:r}=Q5(e),o=D5(i,e),a={target:n,variant:s,variants:e,state:r,motionProperties:i,...o};return z5(a,t),a}const Iw=["delay","duration"],ez=["initial","enter","leave","visible","visible-once","visibleOnce","hovered","tapped","focused",...Iw];function tz(n){return Iw.includes(n)}function nz(n,e){const t=n.props?n.props:n.data&&n.data.attrs?n.data.attrs:{};if(t){t.variants&&Ph(t.variants)&&(e.value={...e.value,...t.variants});for(let i of ez)if(!(!t||!t[i])){if(tz(i)&&typeof t[i]=="number"){for(const s of["enter","visible","visibleOnce"]){const r=e.value[s];r!=null&&(r.transition??(r.transition={}),r.transition[i]=t[i])}continue}if(Ph(t[i])){const s=t[i];i==="visible-once"&&(i="visibleOnce"),e.value[i]=s}}}}function Mm(n,e=!1){return{created:(s,r,o)=>{const a=r.value&&typeof r.value=="string"?r.value:o.key;a&&ym[a]&&ym[a].stop();const l=e?structuredClone(ht(n)||{}):n||{},c=nt(l);typeof r.value=="object"&&(c.value=r.value),nz(o,c);const f=Pw(s,c,{eventListeners:!0,lifeCycleHooks:!0,syncVariants:!0,visibilityHooks:!1});s.motionInstance=f,a&&(ym[a]=f)},mounted:(s,r,o)=>{s.motionInstance&&Tw(s.motionInstance)},getSSRProps(s,r){let{initial:o}=s.value||r&&(r==null?void 0:r.props)||{};o=Ft(o);const a=OT({},(n==null?void 0:n.initial)||{},o||{});return!a||Object.keys(a).length===0?void 0:{style:Gd(a)}}}}const iz={initial:{opacity:0},enter:{opacity:1}},sz={initial:{opacity:0},visible:{opacity:1}},rz={initial:{opacity:0},visibleOnce:{opacity:1}},oz={initial:{scale:0,opacity:0},enter:{scale:1,opacity:1}},az={initial:{scale:0,opacity:0},visible:{scale:1,opacity:1}},lz={initial:{scale:0,opacity:0},visibleOnce:{scale:1,opacity:1}},cz={initial:{x:-100,rotate:90,opacity:0},enter:{x:0,rotate:0,opacity:1}},uz={initial:{x:-100,rotate:90,opacity:0},visible:{x:0,rotate:0,opacity:1}},fz={initial:{x:-100,rotate:90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},hz={initial:{x:100,rotate:-90,opacity:0},enter:{x:0,rotate:0,opacity:1}},dz={initial:{x:100,rotate:-90,opacity:0},visible:{x:0,rotate:0,opacity:1}},pz={initial:{x:100,rotate:-90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},mz={initial:{y:-100,rotate:-90,opacity:0},enter:{y:0,rotate:0,opacity:1}},gz={initial:{y:-100,rotate:-90,opacity:0},visible:{y:0,rotate:0,opacity:1}},_z={initial:{y:-100,rotate:-90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},vz={initial:{y:100,rotate:90,opacity:0},enter:{y:0,rotate:0,opacity:1}},yz={initial:{y:100,rotate:90,opacity:0},visible:{y:0,rotate:0,opacity:1}},bz={initial:{y:100,rotate:90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},xz={initial:{x:-100,opacity:0},enter:{x:0,opacity:1}},Mz={initial:{x:-100,opacity:0},visible:{x:0,opacity:1}},Sz={initial:{x:-100,opacity:0},visibleOnce:{x:0,opacity:1}},Ez={initial:{x:100,opacity:0},enter:{x:0,opacity:1}},Tz={initial:{x:100,opacity:0},visible:{x:0,opacity:1}},wz={initial:{x:100,opacity:0},visibleOnce:{x:0,opacity:1}},Az={initial:{y:-100,opacity:0},enter:{y:0,opacity:1}},Cz={initial:{y:-100,opacity:0},visible:{y:0,opacity:1}},Rz={initial:{y:-100,opacity:0},visibleOnce:{y:0,opacity:1}},Pz={initial:{y:100,opacity:0},enter:{y:0,opacity:1}},Iz={initial:{y:100,opacity:0},visible:{y:0,opacity:1}},Lz={initial:{y:100,opacity:0},visibleOnce:{y:0,opacity:1}},Dh={__proto__:null,fade:iz,fadeVisible:sz,fadeVisibleOnce:rz,pop:oz,popVisible:az,popVisibleOnce:lz,rollBottom:vz,rollLeft:cz,rollRight:hz,rollTop:mz,rollVisibleBottom:yz,rollVisibleLeft:uz,rollVisibleOnceBottom:bz,rollVisibleOnceLeft:fz,rollVisibleOnceRight:pz,rollVisibleOnceTop:_z,rollVisibleRight:dz,rollVisibleTop:gz,slideBottom:Pz,slideLeft:xz,slideRight:Ez,slideTop:Az,slideVisibleBottom:Iz,slideVisibleLeft:Mz,slideVisibleOnceBottom:Lz,slideVisibleOnceLeft:Sz,slideVisibleOnceRight:wz,slideVisibleOnceTop:Rz,slideVisibleRight:Tz,slideVisibleTop:Cz};function Dz(n){const e="àáâäæãåāăąçćčđďèéêëēėęěğǵḧîïíīįìłḿñńǹňôöòóœøōõőṕŕřßśšşșťțûüùúūǘůűųẃẍÿýžźż·/_,:;",t="aaaaaaaaaacccddeeeeeeeegghiiiiiilmnnnnoooooooooprrsssssttuuuuuuuuuwxyyzzz------",i=new RegExp(e.split("").join("|"),"g");return n.toString().replace(/[A-Z]/g,s=>`-${s}`).toLowerCase().replace(/\s+/g,"-").replace(i,s=>t.charAt(e.indexOf(s))).replace(/&/g,"-and-").replace(/[^\w\-]+/g,"").replace(/-{2,}/g,"-").replace(/^-+/,"").replace(/-+$/,"")}const Lw=Symbol(""),Dw={preset:{type:String,required:!1},instance:{type:Object,required:!1},variants:{type:Object,required:!1},initial:{type:Object,required:!1},enter:{type:Object,required:!1},leave:{type:Object,required:!1},visible:{type:Object,required:!1},visibleOnce:{type:Object,required:!1},hovered:{type:Object,required:!1},tapped:{type:Object,required:!1},focused:{type:Object,required:!1},delay:{type:[Number,String],required:!1},duration:{type:[Number,String],required:!1}};function Oz(n){return Object.prototype.toString.call(n)==="[object Object]"}function qg(n){if(Array.isArray(n))return n.map(qg);if(Oz(n)){const e={};for(const t in n)e[t]=qg(n[t]);return e}return n}function Ow(n){const e=xi({}),t=_n(Lw,{}),i=Ee(()=>n.preset==null?{}:t!=null&&n.preset in t?structuredClone(ht(t)[n.preset]):n.preset in Dh?structuredClone(Dh[n.preset]):{}),s=Ee(()=>({initial:n.initial,enter:n.enter,leave:n.leave,visible:n.visible,visibleOnce:n.visibleOnce,hovered:n.hovered,tapped:n.tapped,focused:n.focused}));function r(l,c){for(const u of["delay","duration"]){if(c[u]==null)continue;const f=Number.parseInt(c[u]);for(const h of["enter","visible","visibleOnce"]){const d=l[h];d!=null&&(d.transition??(d.transition={}),d.transition[u]=f)}}return l}const o=Ee(()=>{const l=OT({},s.value,i.value,n.variants||{});return r({...l},n)});function a(l,c,u){var h;l.props??(l.props={}),(h=l.props).style??(h.style={}),l.props.style={...l.props.style,...u};const f=r(qg(o.value),l.props);return l.props.onVnodeMounted=({el:d})=>{e[c]=Pw(d,f)},l.props.onVnodeUpdated=({el:d})=>{const p=Gd(e[c].state);for(const[_,g]of Object.entries(p))d.style[_]=g},l}return{motionConfig:o,setNodeInstance:a}}const Nz=hn({name:"Motion",props:{...Dw,is:{type:[String,Object],default:"div"}},setup(n){const e=O0(),{motionConfig:t,setNodeInstance:i}=Ow(n);return()=>{const s=Gd(t.value.initial||{}),r=ks(n.is,void 0,e);return i(r,0,s),r}}}),Uz=hn({name:"MotionGroup",props:{...Dw,is:{type:[String,Object],required:!1}},setup(n){const e=O0(),{motionConfig:t,setNodeInstance:i}=Ow(n);return()=>{var o;const s=Gd(t.value.initial||{}),r=((o=e.default)==null?void 0:o.call(e))||[];for(let a=0;a=0&&(y[$]=null,b[$].disconnect(Se))}for(let ge=0;ge=y.length){y.push(Se),$=le;break}else if(y[le]===null){y[le]=Se,$=le;break}if($===-1)break}const ae=b[$];ae&&ae.connect(Se)}}const j=new k,te=new k;function Z(oe,ge,Se){j.setFromMatrixPosition(ge.matrixWorld),te.setFromMatrixPosition(Se.matrixWorld);const $=j.distanceTo(te),ae=ge.projectionMatrix.elements,le=Se.projectionMatrix.elements,ue=ae[14]/(ae[10]-1),$e=ae[14]/(ae[10]+1),N=(ae[9]+1)/ae[5],U=(ae[9]-1)/ae[5],A=(ae[8]-1)/ae[0],W=(le[8]+1)/le[0],G=ue*A,X=ue*W,C=$/(-A+W),I=C*-A;if(ge.matrixWorld.decompose(oe.position,oe.quaternion,oe.scale),oe.translateX(I),oe.translateZ(C),oe.matrixWorld.compose(oe.position,oe.quaternion,oe.scale),oe.matrixWorldInverse.copy(oe.matrixWorld).invert(),ae[10]===-1)oe.projectionMatrix.copy(ge.projectionMatrix),oe.projectionMatrixInverse.copy(ge.projectionMatrixInverse);else{const F=ue+C,H=$e+C,ce=G-I,R=X+($-I),x=N*$e/H*F,O=U*$e/H*F;oe.projectionMatrix.makePerspective(ce,R,x,O,F,H),oe.projectionMatrixInverse.copy(oe.projectionMatrix).invert()}}function pe(oe,ge){ge===null?oe.matrixWorld.copy(oe.matrix):oe.matrixWorld.multiplyMatrices(ge.matrixWorld,oe.matrix),oe.matrixWorldInverse.copy(oe.matrixWorld).invert()}this.updateCamera=function(oe){if(s===null)return;let ge=oe.near,Se=oe.far;_.texture!==null&&(_.depthNear>0&&(ge=_.depthNear),_.depthFar>0&&(Se=_.depthFar)),E.near=P.near=S.near=ge,E.far=P.far=S.far=Se,(D!==E.near||B!==E.far)&&(s.updateRenderState({depthNear:E.near,depthFar:E.far}),D=E.near,B=E.far),S.layers.mask=oe.layers.mask|2,P.layers.mask=oe.layers.mask|4,E.layers.mask=S.layers.mask|P.layers.mask;const $=oe.parent,ae=E.cameras;pe(E,$);for(let le=0;le0&&(g.alphaTest.value=m.alphaTest);const v=e.get(m),b=v.envMap,y=v.envMapRotation;b&&(g.envMap.value=b,eo.copy(y),eo.x*=-1,eo.y*=-1,eo.z*=-1,b.isCubeTexture&&b.isRenderTargetTexture===!1&&(eo.y*=-1,eo.z*=-1),g.envMapRotation.value.setFromMatrix4(MF.makeRotationFromEuler(eo)),g.flipEnvMap.value=b.isCubeTexture&&b.isRenderTargetTexture===!1?-1:1,g.reflectivity.value=m.reflectivity,g.ior.value=m.ior,g.refractionRatio.value=m.refractionRatio),m.lightMap&&(g.lightMap.value=m.lightMap,g.lightMapIntensity.value=m.lightMapIntensity,t(m.lightMap,g.lightMapTransform)),m.aoMap&&(g.aoMap.value=m.aoMap,g.aoMapIntensity.value=m.aoMapIntensity,t(m.aoMap,g.aoMapTransform))}function o(g,m){g.diffuse.value.copy(m.color),g.opacity.value=m.opacity,m.map&&(g.map.value=m.map,t(m.map,g.mapTransform))}function a(g,m){g.dashSize.value=m.dashSize,g.totalSize.value=m.dashSize+m.gapSize,g.scale.value=m.scale}function l(g,m,v,b){g.diffuse.value.copy(m.color),g.opacity.value=m.opacity,g.size.value=m.size*v,g.scale.value=b*.5,m.map&&(g.map.value=m.map,t(m.map,g.uvTransform)),m.alphaMap&&(g.alphaMap.value=m.alphaMap,t(m.alphaMap,g.alphaMapTransform)),m.alphaTest>0&&(g.alphaTest.value=m.alphaTest)}function c(g,m){g.diffuse.value.copy(m.color),g.opacity.value=m.opacity,g.rotation.value=m.rotation,m.map&&(g.map.value=m.map,t(m.map,g.mapTransform)),m.alphaMap&&(g.alphaMap.value=m.alphaMap,t(m.alphaMap,g.alphaMapTransform)),m.alphaTest>0&&(g.alphaTest.value=m.alphaTest)}function u(g,m){g.specular.value.copy(m.specular),g.shininess.value=Math.max(m.shininess,1e-4)}function f(g,m){m.gradientMap&&(g.gradientMap.value=m.gradientMap)}function h(g,m){g.metalness.value=m.metalness,m.metalnessMap&&(g.metalnessMap.value=m.metalnessMap,t(m.metalnessMap,g.metalnessMapTransform)),g.roughness.value=m.roughness,m.roughnessMap&&(g.roughnessMap.value=m.roughnessMap,t(m.roughnessMap,g.roughnessMapTransform)),m.envMap&&(g.envMapIntensity.value=m.envMapIntensity)}function d(g,m,v){g.ior.value=m.ior,m.sheen>0&&(g.sheenColor.value.copy(m.sheenColor).multiplyScalar(m.sheen),g.sheenRoughness.value=m.sheenRoughness,m.sheenColorMap&&(g.sheenColorMap.value=m.sheenColorMap,t(m.sheenColorMap,g.sheenColorMapTransform)),m.sheenRoughnessMap&&(g.sheenRoughnessMap.value=m.sheenRoughnessMap,t(m.sheenRoughnessMap,g.sheenRoughnessMapTransform))),m.clearcoat>0&&(g.clearcoat.value=m.clearcoat,g.clearcoatRoughness.value=m.clearcoatRoughness,m.clearcoatMap&&(g.clearcoatMap.value=m.clearcoatMap,t(m.clearcoatMap,g.clearcoatMapTransform)),m.clearcoatRoughnessMap&&(g.clearcoatRoughnessMap.value=m.clearcoatRoughnessMap,t(m.clearcoatRoughnessMap,g.clearcoatRoughnessMapTransform)),m.clearcoatNormalMap&&(g.clearcoatNormalMap.value=m.clearcoatNormalMap,t(m.clearcoatNormalMap,g.clearcoatNormalMapTransform),g.clearcoatNormalScale.value.copy(m.clearcoatNormalScale),m.side===Vn&&g.clearcoatNormalScale.value.negate())),m.dispersion>0&&(g.dispersion.value=m.dispersion),m.iridescence>0&&(g.iridescence.value=m.iridescence,g.iridescenceIOR.value=m.iridescenceIOR,g.iridescenceThicknessMinimum.value=m.iridescenceThicknessRange[0],g.iridescenceThicknessMaximum.value=m.iridescenceThicknessRange[1],m.iridescenceMap&&(g.iridescenceMap.value=m.iridescenceMap,t(m.iridescenceMap,g.iridescenceMapTransform)),m.iridescenceThicknessMap&&(g.iridescenceThicknessMap.value=m.iridescenceThicknessMap,t(m.iridescenceThicknessMap,g.iridescenceThicknessMapTransform))),m.transmission>0&&(g.transmission.value=m.transmission,g.transmissionSamplerMap.value=v.texture,g.transmissionSamplerSize.value.set(v.width,v.height),m.transmissionMap&&(g.transmissionMap.value=m.transmissionMap,t(m.transmissionMap,g.transmissionMapTransform)),g.thickness.value=m.thickness,m.thicknessMap&&(g.thicknessMap.value=m.thicknessMap,t(m.thicknessMap,g.thicknessMapTransform)),g.attenuationDistance.value=m.attenuationDistance,g.attenuationColor.value.copy(m.attenuationColor)),m.anisotropy>0&&(g.anisotropyVector.value.set(m.anisotropy*Math.cos(m.anisotropyRotation),m.anisotropy*Math.sin(m.anisotropyRotation)),m.anisotropyMap&&(g.anisotropyMap.value=m.anisotropyMap,t(m.anisotropyMap,g.anisotropyMapTransform))),g.specularIntensity.value=m.specularIntensity,g.specularColor.value.copy(m.specularColor),m.specularColorMap&&(g.specularColorMap.value=m.specularColorMap,t(m.specularColorMap,g.specularColorMapTransform)),m.specularIntensityMap&&(g.specularIntensityMap.value=m.specularIntensityMap,t(m.specularIntensityMap,g.specularIntensityMapTransform))}function p(g,m){m.matcap&&(g.matcap.value=m.matcap)}function _(g,m){const v=e.get(m).light;g.referencePosition.value.setFromMatrixPosition(v.matrixWorld),g.nearDistance.value=v.shadow.camera.near,g.farDistance.value=v.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:s}}function EF(n,e,t,i){let s={},r={},o=[];const a=n.getParameter(n.MAX_UNIFORM_BUFFER_BINDINGS);function l(v,b){const y=b.program;i.uniformBlockBinding(v,y)}function c(v,b){let y=s[v.id];y===void 0&&(p(v),y=u(v),s[v.id]=y,v.addEventListener("dispose",g));const T=b.program;i.updateUBOMapping(v,T);const w=e.render.frame;r[v.id]!==w&&(h(v),r[v.id]=w)}function u(v){const b=f();v.__bindingPointIndex=b;const y=n.createBuffer(),T=v.__size,w=v.usage;return n.bindBuffer(n.UNIFORM_BUFFER,y),n.bufferData(n.UNIFORM_BUFFER,T,w),n.bindBuffer(n.UNIFORM_BUFFER,null),n.bindBufferBase(n.UNIFORM_BUFFER,b,y),y}function f(){for(let v=0;v0&&(y+=T-w),v.__size=y,v.__cache={},this}function _(v){const b={boundary:0,storage:0};return typeof v=="number"||typeof v=="boolean"?(b.boundary=4,b.storage=4):v.isVector2?(b.boundary=8,b.storage=8):v.isVector3||v.isColor?(b.boundary=16,b.storage=12):v.isVector4?(b.boundary=16,b.storage=16):v.isMatrix3?(b.boundary=48,b.storage=48):v.isMatrix4?(b.boundary=64,b.storage=64):v.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",v),b}function g(v){const b=v.target;b.removeEventListener("dispose",g);const y=o.indexOf(b.__bindingPointIndex);o.splice(y,1),n.deleteBuffer(s[b.id]),delete s[b.id],delete r[b.id]}function m(){for(const v in s)n.deleteBuffer(s[v]);o=[],s={},r={}}return{bind:l,update:c,dispose:m}}class Tf{constructor(e={}){const{canvas:t=oE(),context:i=null,depth:s=!0,stencil:r=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:f=!1,reverseDepthBuffer:h=!1}=e;this.isWebGLRenderer=!0;let d;if(i!==null){if(typeof WebGLRenderingContext<"u"&&i instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");d=i.getContextAttributes().alpha}else d=o;const p=new Uint32Array(4),_=new Int32Array(4);let g=null,m=null;const v=[],b=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.toneMapping=ts,this.toneMappingExposure=1,this.transmissionResolutionScale=1;const y=this;let T=!1;this._outputColorSpace=Fn;let w=0,S=0,P=null,M=-1,E=null;const D=new vt,B=new vt;let z=null;const V=new Pe(0);let Q=0,j=t.width,te=t.height,Z=1,pe=null,Me=null;const re=new vt(0,0,j,te),xe=new vt(0,0,j,te);let We=!1;const oe=new Ha;let ge=!1,Se=!1;const $=new Je,ae=new Je,le=new k,ue=new vt,$e={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let N=!1;function U(){return P===null?Z:1}let A=i;function W(L,K){return t.getContext(L,K)}try{const L={alpha:!0,depth:s,stencil:r,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:u,failIfMajorPerformanceCaveat:f};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${Uc}`),t.addEventListener("webglcontextlost",Be,!1),t.addEventListener("webglcontextrestored",ve,!1),t.addEventListener("webglcontextcreationerror",he,!1),A===null){const K="webgl2";if(A=W(K,L),A===null)throw W(K)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(L){throw console.error("THREE.WebGLRenderer: "+L.message),L}let G,X,C,I,F,H,ce,R,x,O,Y,ne,ee,Te,me,Re,De,de,Ne,ze,Ve,we,it,q;function Ie(){G=new UN(A),G.init(),we=new mT(A,G),X=new RN(A,G,e,we),C=new gF(A,G),X.reverseDepthBuffer&&h&&C.buffers.depth.setReversed(!0),I=new BN(A),F=new iF,H=new _F(A,G,C,F,X,we,I),ce=new IN(y),R=new NN(y),x=new XL(A),it=new AN(A,x),O=new FN(A,x,I,it),Y=new VN(A,O,x,I),Ne=new zN(A,X,H),Re=new PN(F),ne=new nF(y,ce,R,G,X,it,Re),ee=new SF(y,F),Te=new rF,me=new fF(G),de=new wN(y,ce,R,C,Y,d,l),De=new pF(y,Y,X),q=new EF(A,I,X,C),ze=new CN(A,G,I),Ve=new kN(A,G,I),I.programs=ne.programs,y.capabilities=X,y.extensions=G,y.properties=F,y.renderLists=Te,y.shadowMap=De,y.state=C,y.info=I}Ie();const _e=new xF(y,A);this.xr=_e,this.getContext=function(){return A},this.getContextAttributes=function(){return A.getContextAttributes()},this.forceContextLoss=function(){const L=G.get("WEBGL_lose_context");L&&L.loseContext()},this.forceContextRestore=function(){const L=G.get("WEBGL_lose_context");L&&L.restoreContext()},this.getPixelRatio=function(){return Z},this.setPixelRatio=function(L){L!==void 0&&(Z=L,this.setSize(j,te,!1))},this.getSize=function(L){return L.set(j,te)},this.setSize=function(L,K,ie=!0){if(_e.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}j=L,te=K,t.width=Math.floor(L*Z),t.height=Math.floor(K*Z),ie===!0&&(t.style.width=L+"px",t.style.height=K+"px"),this.setViewport(0,0,L,K)},this.getDrawingBufferSize=function(L){return L.set(j*Z,te*Z).floor()},this.setDrawingBufferSize=function(L,K,ie){j=L,te=K,Z=ie,t.width=Math.floor(L*ie),t.height=Math.floor(K*ie),this.setViewport(0,0,L,K)},this.getCurrentViewport=function(L){return L.copy(D)},this.getViewport=function(L){return L.copy(re)},this.setViewport=function(L,K,ie,se){L.isVector4?re.set(L.x,L.y,L.z,L.w):re.set(L,K,ie,se),C.viewport(D.copy(re).multiplyScalar(Z).round())},this.getScissor=function(L){return L.copy(xe)},this.setScissor=function(L,K,ie,se){L.isVector4?xe.set(L.x,L.y,L.z,L.w):xe.set(L,K,ie,se),C.scissor(B.copy(xe).multiplyScalar(Z).round())},this.getScissorTest=function(){return We},this.setScissorTest=function(L){C.setScissorTest(We=L)},this.setOpaqueSort=function(L){pe=L},this.setTransparentSort=function(L){Me=L},this.getClearColor=function(L){return L.copy(de.getClearColor())},this.setClearColor=function(){de.setClearColor(...arguments)},this.getClearAlpha=function(){return de.getClearAlpha()},this.setClearAlpha=function(){de.setClearAlpha(...arguments)},this.clear=function(L=!0,K=!0,ie=!0){let se=0;if(L){let J=!1;if(P!==null){const be=P.texture.format;J=be===hd||be===fd||be===kc}if(J){const be=P.texture.type,Le=be===Bi||be===Vs||be===Ea||be===Ta||be===ld||be===cd,Ge=de.getClearColor(),Ue=de.getClearAlpha(),Qe=Ge.r,tt=Ge.g,qe=Ge.b;Le?(p[0]=Qe,p[1]=tt,p[2]=qe,p[3]=Ue,A.clearBufferuiv(A.COLOR,0,p)):(_[0]=Qe,_[1]=tt,_[2]=qe,_[3]=Ue,A.clearBufferiv(A.COLOR,0,_))}else se|=A.COLOR_BUFFER_BIT}K&&(se|=A.DEPTH_BUFFER_BIT),ie&&(se|=A.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),A.clear(se)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",Be,!1),t.removeEventListener("webglcontextrestored",ve,!1),t.removeEventListener("webglcontextcreationerror",he,!1),de.dispose(),Te.dispose(),me.dispose(),F.dispose(),ce.dispose(),R.dispose(),Y.dispose(),it.dispose(),q.dispose(),ne.dispose(),_e.dispose(),_e.removeEventListener("sessionstart",dv),_e.removeEventListener("sessionend",pv),Nr.stop()};function Be(L){L.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),T=!0}function ve(){console.log("THREE.WebGLRenderer: Context Restored."),T=!1;const L=I.autoReset,K=De.enabled,ie=De.autoUpdate,se=De.needsUpdate,J=De.type;Ie(),I.autoReset=L,De.enabled=K,De.autoUpdate=ie,De.needsUpdate=se,De.type=J}function he(L){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",L.statusMessage)}function He(L){const K=L.target;K.removeEventListener("dispose",He),ot(K)}function ot(L){Ut(L),F.remove(L)}function Ut(L){const K=F.get(L).programs;K!==void 0&&(K.forEach(function(ie){ne.releaseProgram(ie)}),L.isShaderMaterial&&ne.releaseShaderCache(L))}this.renderBufferDirect=function(L,K,ie,se,J,be){K===null&&(K=$e);const Le=J.isMesh&&J.matrixWorld.determinant()<0,Ge=tC(L,K,ie,se,J);C.setMaterial(se,Le);let Ue=ie.index,Qe=1;if(se.wireframe===!0){if(Ue=O.getWireframeAttribute(ie),Ue===void 0)return;Qe=2}const tt=ie.drawRange,qe=ie.attributes.position;let dt=tt.start*Qe,At=(tt.start+tt.count)*Qe;be!==null&&(dt=Math.max(dt,be.start*Qe),At=Math.min(At,(be.start+be.count)*Qe)),Ue!==null?(dt=Math.max(dt,0),At=Math.min(At,Ue.count)):qe!=null&&(dt=Math.max(dt,0),At=Math.min(At,qe.count));const zt=At-dt;if(zt<0||zt===1/0)return;it.setup(J,se,Ge,ie,Ue);let Wt,yt=ze;if(Ue!==null&&(Wt=x.get(Ue),yt=Ve,yt.setIndex(Wt)),J.isMesh)se.wireframe===!0?(C.setLineWidth(se.wireframeLinewidth*U()),yt.setMode(A.LINES)):yt.setMode(A.TRIANGLES);else if(J.isLine){let Ye=se.linewidth;Ye===void 0&&(Ye=1),C.setLineWidth(Ye*U()),J.isLineSegments?yt.setMode(A.LINES):J.isLineLoop?yt.setMode(A.LINE_LOOP):yt.setMode(A.LINE_STRIP)}else J.isPoints?yt.setMode(A.POINTS):J.isSprite&&yt.setMode(A.TRIANGLES);if(J.isBatchedMesh)if(J._multiDrawInstances!==null)ga("THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),yt.renderMultiDrawInstances(J._multiDrawStarts,J._multiDrawCounts,J._multiDrawCount,J._multiDrawInstances);else if(G.get("WEBGL_multi_draw"))yt.renderMultiDraw(J._multiDrawStarts,J._multiDrawCounts,J._multiDrawCount);else{const Ye=J._multiDrawStarts,dn=J._multiDrawCounts,Mt=J._multiDrawCount,wi=Ue?x.get(Ue).bytesPerElement:1,Uo=F.get(se).currentProgram.getUniforms();for(let ni=0;ni{function be(){if(se.forEach(function(Le){F.get(Le).currentProgram.isReady()&&se.delete(Le)}),se.size===0){J(L);return}setTimeout(be,10)}G.get("KHR_parallel_shader_compile")!==null?be():setTimeout(be,10)})};let Ti=null;function us(L){Ti&&Ti(L)}function dv(){Nr.stop()}function pv(){Nr.start()}const Nr=new uT;Nr.setAnimationLoop(us),typeof self<"u"&&Nr.setContext(self),this.setAnimationLoop=function(L){Ti=L,_e.setAnimationLoop(L),L===null?Nr.stop():Nr.start()},_e.addEventListener("sessionstart",dv),_e.addEventListener("sessionend",pv),this.render=function(L,K){if(K!==void 0&&K.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(T===!0)return;if(L.matrixWorldAutoUpdate===!0&&L.updateMatrixWorld(),K.parent===null&&K.matrixWorldAutoUpdate===!0&&K.updateMatrixWorld(),_e.enabled===!0&&_e.isPresenting===!0&&(_e.cameraAutoUpdate===!0&&_e.updateCamera(K),K=_e.getCamera()),L.isScene===!0&&L.onBeforeRender(y,L,K,P),m=me.get(L,b.length),m.init(K),b.push(m),ae.multiplyMatrices(K.projectionMatrix,K.matrixWorldInverse),oe.setFromProjectionMatrix(ae),Se=this.localClippingEnabled,ge=Re.init(this.clippingPlanes,Se),g=Te.get(L,v.length),g.init(),v.push(g),_e.enabled===!0&&_e.isPresenting===!0){const be=y.xr.getDepthSensingMesh();be!==null&&lp(be,K,-1/0,y.sortObjects)}lp(L,K,0,y.sortObjects),g.finish(),y.sortObjects===!0&&g.sort(pe,Me),N=_e.enabled===!1||_e.isPresenting===!1||_e.hasDepthSensing()===!1,N&&de.addToRenderList(g,L),this.info.render.frame++,ge===!0&&Re.beginShadows();const ie=m.state.shadowsArray;De.render(ie,L,K),ge===!0&&Re.endShadows(),this.info.autoReset===!0&&this.info.reset();const se=g.opaque,J=g.transmissive;if(m.setupLights(),K.isArrayCamera){const be=K.cameras;if(J.length>0)for(let Le=0,Ge=be.length;Le0&&gv(se,J,L,K),N&&de.render(L),mv(g,L,K);P!==null&&S===0&&(H.updateMultisampleRenderTarget(P),H.updateRenderTargetMipmap(P)),L.isScene===!0&&L.onAfterRender(y,L,K),it.resetDefaultState(),M=-1,E=null,b.pop(),b.length>0?(m=b[b.length-1],ge===!0&&Re.setGlobalState(y.clippingPlanes,m.state.camera)):m=null,v.pop(),v.length>0?g=v[v.length-1]:g=null};function lp(L,K,ie,se){if(L.visible===!1)return;if(L.layers.test(K.layers)){if(L.isGroup)ie=L.renderOrder;else if(L.isLOD)L.autoUpdate===!0&&L.update(K);else if(L.isLight)m.pushLight(L),L.castShadow&&m.pushShadow(L);else if(L.isSprite){if(!L.frustumCulled||oe.intersectsSprite(L)){se&&ue.setFromMatrixPosition(L.matrixWorld).applyMatrix4(ae);const Le=Y.update(L),Ge=L.material;Ge.visible&&g.push(L,Le,Ge,ie,ue.z,null)}}else if((L.isMesh||L.isLine||L.isPoints)&&(!L.frustumCulled||oe.intersectsObject(L))){const Le=Y.update(L),Ge=L.material;if(se&&(L.boundingSphere!==void 0?(L.boundingSphere===null&&L.computeBoundingSphere(),ue.copy(L.boundingSphere.center)):(Le.boundingSphere===null&&Le.computeBoundingSphere(),ue.copy(Le.boundingSphere.center)),ue.applyMatrix4(L.matrixWorld).applyMatrix4(ae)),Array.isArray(Ge)){const Ue=Le.groups;for(let Qe=0,tt=Ue.length;Qe0&&iu(J,K,ie),be.length>0&&iu(be,K,ie),Le.length>0&&iu(Le,K,ie),C.buffers.depth.setTest(!0),C.buffers.depth.setMask(!0),C.buffers.color.setMask(!0),C.setPolygonOffset(!1)}function gv(L,K,ie,se){if((ie.isScene===!0?ie.overrideMaterial:null)!==null)return;m.state.transmissionRenderTarget[se.id]===void 0&&(m.state.transmissionRenderTarget[se.id]=new os(1,1,{generateMipmaps:!0,type:G.has("EXT_color_buffer_half_float")||G.has("EXT_color_buffer_float")?za:Bi,minFilter:Qi,samples:4,stencilBuffer:r,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:pt.workingColorSpace}));const be=m.state.transmissionRenderTarget[se.id],Le=se.viewport||D;be.setSize(Le.z*y.transmissionResolutionScale,Le.w*y.transmissionResolutionScale);const Ge=y.getRenderTarget();y.setRenderTarget(be),y.getClearColor(V),Q=y.getClearAlpha(),Q<1&&y.setClearColor(16777215,.5),y.clear(),N&&de.render(ie);const Ue=y.toneMapping;y.toneMapping=ts;const Qe=se.viewport;if(se.viewport!==void 0&&(se.viewport=void 0),m.setupLightsView(se),ge===!0&&Re.setGlobalState(y.clippingPlanes,se),iu(L,ie,se),H.updateMultisampleRenderTarget(be),H.updateRenderTargetMipmap(be),G.has("WEBGL_multisampled_render_to_texture")===!1){let tt=!1;for(let qe=0,dt=K.length;qe0),qe=!!ie.morphAttributes.position,dt=!!ie.morphAttributes.normal,At=!!ie.morphAttributes.color;let zt=ts;se.toneMapped&&(P===null||P.isXRRenderTarget===!0)&&(zt=y.toneMapping);const Wt=ie.morphAttributes.position||ie.morphAttributes.normal||ie.morphAttributes.color,yt=Wt!==void 0?Wt.length:0,Ye=F.get(se),dn=m.state.lights;if(ge===!0&&(Se===!0||L!==E)){const In=L===E&&se.id===M;Re.setState(se,L,In)}let Mt=!1;se.version===Ye.__version?(Ye.needsLights&&Ye.lightsStateVersion!==dn.state.version||Ye.outputColorSpace!==Ge||J.isBatchedMesh&&Ye.batching===!1||!J.isBatchedMesh&&Ye.batching===!0||J.isBatchedMesh&&Ye.batchingColor===!0&&J.colorTexture===null||J.isBatchedMesh&&Ye.batchingColor===!1&&J.colorTexture!==null||J.isInstancedMesh&&Ye.instancing===!1||!J.isInstancedMesh&&Ye.instancing===!0||J.isSkinnedMesh&&Ye.skinning===!1||!J.isSkinnedMesh&&Ye.skinning===!0||J.isInstancedMesh&&Ye.instancingColor===!0&&J.instanceColor===null||J.isInstancedMesh&&Ye.instancingColor===!1&&J.instanceColor!==null||J.isInstancedMesh&&Ye.instancingMorph===!0&&J.morphTexture===null||J.isInstancedMesh&&Ye.instancingMorph===!1&&J.morphTexture!==null||Ye.envMap!==Ue||se.fog===!0&&Ye.fog!==be||Ye.numClippingPlanes!==void 0&&(Ye.numClippingPlanes!==Re.numPlanes||Ye.numIntersection!==Re.numIntersection)||Ye.vertexAlphas!==Qe||Ye.vertexTangents!==tt||Ye.morphTargets!==qe||Ye.morphNormals!==dt||Ye.morphColors!==At||Ye.toneMapping!==zt||Ye.morphTargetsCount!==yt)&&(Mt=!0):(Mt=!0,Ye.__version=se.version);let wi=Ye.currentProgram;Mt===!0&&(wi=su(se,K,J));let Uo=!1,ni=!1,ja=!1;const kt=wi.getUniforms(),ci=Ye.uniforms;if(C.useProgram(wi.program)&&(Uo=!0,ni=!0,ja=!0),se.id!==M&&(M=se.id,ni=!0),Uo||E!==L){C.buffers.depth.getReversed()?($.copy(L.projectionMatrix),hP($),dP($),kt.setValue(A,"projectionMatrix",$)):kt.setValue(A,"projectionMatrix",L.projectionMatrix),kt.setValue(A,"viewMatrix",L.matrixWorldInverse);const Xn=kt.map.cameraPosition;Xn!==void 0&&Xn.setValue(A,le.setFromMatrixPosition(L.matrixWorld)),X.logarithmicDepthBuffer&&kt.setValue(A,"logDepthBufFC",2/(Math.log(L.far+1)/Math.LN2)),(se.isMeshPhongMaterial||se.isMeshToonMaterial||se.isMeshLambertMaterial||se.isMeshBasicMaterial||se.isMeshStandardMaterial||se.isShaderMaterial)&&kt.setValue(A,"isOrthographic",L.isOrthographicCamera===!0),E!==L&&(E=L,ni=!0,ja=!0)}if(J.isSkinnedMesh){kt.setOptional(A,J,"bindMatrix"),kt.setOptional(A,J,"bindMatrixInverse");const In=J.skeleton;In&&(In.boneTexture===null&&In.computeBoneTexture(),kt.setValue(A,"boneTexture",In.boneTexture,H))}J.isBatchedMesh&&(kt.setOptional(A,J,"batchingTexture"),kt.setValue(A,"batchingTexture",J._matricesTexture,H),kt.setOptional(A,J,"batchingIdTexture"),kt.setValue(A,"batchingIdTexture",J._indirectTexture,H),kt.setOptional(A,J,"batchingColorTexture"),J._colorsTexture!==null&&kt.setValue(A,"batchingColorTexture",J._colorsTexture,H));const ui=ie.morphAttributes;if((ui.position!==void 0||ui.normal!==void 0||ui.color!==void 0)&&Ne.update(J,ie,wi),(ni||Ye.receiveShadow!==J.receiveShadow)&&(Ye.receiveShadow=J.receiveShadow,kt.setValue(A,"receiveShadow",J.receiveShadow)),se.isMeshGouraudMaterial&&se.envMap!==null&&(ci.envMap.value=Ue,ci.flipEnvMap.value=Ue.isCubeTexture&&Ue.isRenderTargetTexture===!1?-1:1),se.isMeshStandardMaterial&&se.envMap===null&&K.environment!==null&&(ci.envMapIntensity.value=K.environmentIntensity),ni&&(kt.setValue(A,"toneMappingExposure",y.toneMappingExposure),Ye.needsLights&&nC(ci,ja),be&&se.fog===!0&&ee.refreshFogUniforms(ci,be),ee.refreshMaterialUniforms(ci,se,Z,te,m.state.transmissionRenderTarget[L.id]),Ef.upload(A,vv(Ye),ci,H)),se.isShaderMaterial&&se.uniformsNeedUpdate===!0&&(Ef.upload(A,vv(Ye),ci,H),se.uniformsNeedUpdate=!1),se.isSpriteMaterial&&kt.setValue(A,"center",J.center),kt.setValue(A,"modelViewMatrix",J.modelViewMatrix),kt.setValue(A,"normalMatrix",J.normalMatrix),kt.setValue(A,"modelMatrix",J.matrixWorld),se.isShaderMaterial||se.isRawShaderMaterial){const In=se.uniformsGroups;for(let Xn=0,cp=In.length;Xn0&&H.useMultisampledRTT(L)===!1?J=F.get(L).__webglMultisampledFramebuffer:Array.isArray(tt)?J=tt[ie]:J=tt,D.copy(L.viewport),B.copy(L.scissor),z=L.scissorTest}else D.copy(re).multiplyScalar(Z).floor(),B.copy(xe).multiplyScalar(Z).floor(),z=We;if(ie!==0&&(J=sC),C.bindFramebuffer(A.FRAMEBUFFER,J)&&se&&C.drawBuffers(L,J),C.viewport(D),C.scissor(B),C.setScissorTest(z),be){const Ue=F.get(L.texture);A.framebufferTexture2D(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,A.TEXTURE_CUBE_MAP_POSITIVE_X+K,Ue.__webglTexture,ie)}else if(Le){const Ue=F.get(L.texture),Qe=K;A.framebufferTextureLayer(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,Ue.__webglTexture,ie,Qe)}else if(L!==null&&ie!==0){const Ue=F.get(L.texture);A.framebufferTexture2D(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,A.TEXTURE_2D,Ue.__webglTexture,ie)}M=-1},this.readRenderTargetPixels=function(L,K,ie,se,J,be,Le,Ge=0){if(!(L&&L.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Ue=F.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&Le!==void 0&&(Ue=Ue[Le]),Ue){C.bindFramebuffer(A.FRAMEBUFFER,Ue);try{const Qe=L.textures[Ge],tt=Qe.format,qe=Qe.type;if(!X.textureFormatReadable(tt)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!X.textureTypeReadable(qe)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}K>=0&&K<=L.width-se&&ie>=0&&ie<=L.height-J&&(L.textures.length>1&&A.readBuffer(A.COLOR_ATTACHMENT0+Ge),A.readPixels(K,ie,se,J,we.convert(tt),we.convert(qe),be))}finally{const Qe=P!==null?F.get(P).__webglFramebuffer:null;C.bindFramebuffer(A.FRAMEBUFFER,Qe)}}},this.readRenderTargetPixelsAsync=async function(L,K,ie,se,J,be,Le,Ge=0){if(!(L&&L.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Ue=F.get(L).__webglFramebuffer;if(L.isWebGLCubeRenderTarget&&Le!==void 0&&(Ue=Ue[Le]),Ue)if(K>=0&&K<=L.width-se&&ie>=0&&ie<=L.height-J){C.bindFramebuffer(A.FRAMEBUFFER,Ue);const Qe=L.textures[Ge],tt=Qe.format,qe=Qe.type;if(!X.textureFormatReadable(tt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!X.textureTypeReadable(qe))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");const dt=A.createBuffer();A.bindBuffer(A.PIXEL_PACK_BUFFER,dt),A.bufferData(A.PIXEL_PACK_BUFFER,be.byteLength,A.STREAM_READ),L.textures.length>1&&A.readBuffer(A.COLOR_ATTACHMENT0+Ge),A.readPixels(K,ie,se,J,we.convert(tt),we.convert(qe),0);const At=P!==null?F.get(P).__webglFramebuffer:null;C.bindFramebuffer(A.FRAMEBUFFER,At);const zt=A.fenceSync(A.SYNC_GPU_COMMANDS_COMPLETE,0);return A.flush(),await fP(A,zt,4),A.bindBuffer(A.PIXEL_PACK_BUFFER,dt),A.getBufferSubData(A.PIXEL_PACK_BUFFER,0,be),A.deleteBuffer(dt),A.deleteSync(zt),be}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(L,K=null,ie=0){const se=Math.pow(2,-ie),J=Math.floor(L.image.width*se),be=Math.floor(L.image.height*se),Le=K!==null?K.x:0,Ge=K!==null?K.y:0;H.setTexture2D(L,0),A.copyTexSubImage2D(A.TEXTURE_2D,ie,0,0,Le,Ge,J,be),C.unbindTexture()};const rC=A.createFramebuffer(),oC=A.createFramebuffer();this.copyTextureToTexture=function(L,K,ie=null,se=null,J=0,be=null){be===null&&(J!==0?(ga("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),be=J,J=0):be=0);let Le,Ge,Ue,Qe,tt,qe,dt,At,zt;const Wt=L.isCompressedTexture?L.mipmaps[be]:L.image;if(ie!==null)Le=ie.max.x-ie.min.x,Ge=ie.max.y-ie.min.y,Ue=ie.isBox3?ie.max.z-ie.min.z:1,Qe=ie.min.x,tt=ie.min.y,qe=ie.isBox3?ie.min.z:0;else{const ui=Math.pow(2,-J);Le=Math.floor(Wt.width*ui),Ge=Math.floor(Wt.height*ui),L.isDataArrayTexture?Ue=Wt.depth:L.isData3DTexture?Ue=Math.floor(Wt.depth*ui):Ue=1,Qe=0,tt=0,qe=0}se!==null?(dt=se.x,At=se.y,zt=se.z):(dt=0,At=0,zt=0);const yt=we.convert(K.format),Ye=we.convert(K.type);let dn;K.isData3DTexture?(H.setTexture3D(K,0),dn=A.TEXTURE_3D):K.isDataArrayTexture||K.isCompressedArrayTexture?(H.setTexture2DArray(K,0),dn=A.TEXTURE_2D_ARRAY):(H.setTexture2D(K,0),dn=A.TEXTURE_2D),A.pixelStorei(A.UNPACK_FLIP_Y_WEBGL,K.flipY),A.pixelStorei(A.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),A.pixelStorei(A.UNPACK_ALIGNMENT,K.unpackAlignment);const Mt=A.getParameter(A.UNPACK_ROW_LENGTH),wi=A.getParameter(A.UNPACK_IMAGE_HEIGHT),Uo=A.getParameter(A.UNPACK_SKIP_PIXELS),ni=A.getParameter(A.UNPACK_SKIP_ROWS),ja=A.getParameter(A.UNPACK_SKIP_IMAGES);A.pixelStorei(A.UNPACK_ROW_LENGTH,Wt.width),A.pixelStorei(A.UNPACK_IMAGE_HEIGHT,Wt.height),A.pixelStorei(A.UNPACK_SKIP_PIXELS,Qe),A.pixelStorei(A.UNPACK_SKIP_ROWS,tt),A.pixelStorei(A.UNPACK_SKIP_IMAGES,qe);const kt=L.isDataArrayTexture||L.isData3DTexture,ci=K.isDataArrayTexture||K.isData3DTexture;if(L.isDepthTexture){const ui=F.get(L),In=F.get(K),Xn=F.get(ui.__renderTarget),cp=F.get(In.__renderTarget);C.bindFramebuffer(A.READ_FRAMEBUFFER,Xn.__webglFramebuffer),C.bindFramebuffer(A.DRAW_FRAMEBUFFER,cp.__webglFramebuffer);for(let Ur=0;Ur{n.delete(r)};return{on:r=>{n.add(r);const o=()=>e(r);return Er(o),{off:o}},off:e,trigger:(...r)=>Promise.all(Array.from(n).map(o=>o(...r))),clear:()=>{n.clear()}}}const um=new WeakMap,wF=(...n)=>{var e;const t=n[0],i=(e=Rn())==null?void 0:e.proxy;if(i==null&&!Ic())throw new Error("injectLocal must be called in setup");return i&&um.has(i)&&t in um.get(i)?um.get(i)[t]:_n(...n)},Rg=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const AF=n=>typeof n<"u",CF=n=>n!=null,RF=Object.prototype.toString,PF=n=>RF.call(n)==="[object Object]",Pg=()=>{};function IF(n,e){function t(...i){return new Promise((s,r)=>{Promise.resolve(n(()=>e.apply(this,i),{fn:e,thisArg:this,args:i})).then(s).catch(r)})}return t}function LF(n,e={}){let t,i,s=Pg;const r=l=>{clearTimeout(l),s(),s=Pg};let o;return l=>{const c=rt(n),u=rt(e.maxWait);return t&&r(t),c<=0||u!==void 0&&u<=0?(i&&(r(i),i=null),Promise.resolve(l())):new Promise((f,h)=>{s=e.rejectOnCancel?h:f,o=l,u&&!i&&(i=setTimeout(()=>{t&&r(t),i=null,f(o())},u)),t=setTimeout(()=>{i&&r(i),i=null,f(l())},c)})}}function Gb(n){return n.endsWith("rem")?Number.parseFloat(n)*16:Number.parseFloat(n)}function DF(n,e,t=!1){return e.reduce((i,s)=>(s in n&&(!t||n[s]!==void 0)&&(i[s]=n[s]),i),{})}function OF(n){return Rn()}function Nl(n){return Array.isArray(n)?n:[n]}function NF(n,e=200,t={}){return IF(LF(e,t),n)}function Wb(n,e=200,t={}){const i=nt(n.value),s=NF(()=>{i.value=n.value},e,t);return Ke(n,()=>s()),i}function UF(n,e={}){if(!Lt(n))return vS(n);const t=Array.isArray(n.value)?Array.from({length:n.value.length}):{};for(const i in n.value)t[i]=P0(()=>({get(){return n.value[i]},set(s){var r;if((r=rt(e.replaceRef))!=null?r:!0)if(Array.isArray(n.value)){const a=[...n.value];a[i]=s,n.value=a}else{const a={...n.value,[i]:s};Object.setPrototypeOf(a,Object.getPrototypeOf(n.value)),n.value=a}else n.value[i]=s}}));return t}const pn=rt;function I_(n,e=!0,t){OF()?Gn(n,t):e?n():Ar(n)}function FF(n,e=1e3,t={}){const{immediate:i=!0,immediateCallback:s=!1}=t;let r=null;const o=Oe(!1);function a(){r&&(clearInterval(r),r=null)}function l(){o.value=!1,a()}function c(){const u=rt(e);u<=0||(o.value=!0,s&&n(),a(),o.value&&(r=setInterval(n,u)))}if(i&&Rg&&c(),Lt(e)||typeof e=="function"){const u=Ke(e,()=>{o.value&&Rg&&c()});Er(u)}return Er(l),{isActive:o,pause:l,resume:c}}function gT(n,e,t){return Ke(n,e,{...t,immediate:!0})}const $s=Rg?window:void 0;function Di(n){var e;const t=rt(n);return(e=t==null?void 0:t.$el)!=null?e:t}function Ao(...n){const e=[],t=()=>{e.forEach(a=>a()),e.length=0},i=(a,l,c,u)=>(a.addEventListener(l,c,u),()=>a.removeEventListener(l,c,u)),s=Ee(()=>{const a=Nl(rt(n[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0}),r=gT(()=>{var a,l;return[(l=(a=s.value)==null?void 0:a.map(c=>Di(c)))!=null?l:[$s].filter(c=>c!=null),Nl(rt(s.value?n[1]:n[0])),Nl(Ft(s.value?n[2]:n[1])),rt(s.value?n[3]:n[2])]},([a,l,c,u])=>{if(t(),!(a!=null&&a.length)||!(l!=null&&l.length)||!(c!=null&&c.length))return;const f=PF(u)?{...u}:u;e.push(...a.flatMap(h=>l.flatMap(d=>c.map(p=>i(h,d,p,f)))))},{flush:"post"}),o=()=>{r(),t()};return Er(t),o}function kF(){const n=Oe(!1),e=Rn();return e&&Gn(()=>{n.value=!0},e),n}function zd(n){const e=kF();return Ee(()=>(e.value,!!n()))}function BF(n,e,t={}){const{window:i=$s,...s}=t;let r;const o=zd(()=>i&&"MutationObserver"in i),a=()=>{r&&(r.disconnect(),r=void 0)},l=Ee(()=>{const h=rt(n),d=Nl(h).map(Di).filter(CF);return new Set(d)}),c=Ke(()=>l.value,h=>{a(),o.value&&h.size&&(r=new MutationObserver(e),h.forEach(d=>r.observe(d,s)))},{immediate:!0,flush:"post"}),u=()=>r==null?void 0:r.takeRecords(),f=()=>{c(),a()};return Er(f),{isSupported:o,stop:f,takeRecords:u}}function L_(n,e={}){const{immediate:t=!0,fpsLimit:i=void 0,window:s=$s,once:r=!1}=e,o=Oe(!1),a=Ee(()=>i?1e3/rt(i):null);let l=0,c=null;function u(d){if(!o.value||!s)return;l||(l=d);const p=d-l;if(a.value&&pt&&"matchMedia"in t&&typeof t.matchMedia=="function"),r=Oe(typeof i=="number"),o=Oe(),a=Oe(!1),l=c=>{a.value=c.matches};return Lc(()=>{if(r.value){r.value=!s.value;const c=rt(n).split(",");a.value=c.some(u=>{const f=u.includes("not all"),h=u.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),d=u.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let p=!!(h||d);return h&&p&&(p=i>=Gb(h[1])),d&&p&&(p=i<=Gb(d[1])),f?!p:p});return}s.value&&(o.value=t.matchMedia(rt(n)),a.value=o.value.matches)}),Ao(o,"change",l,{passive:!0}),Ee(()=>a.value)}function HF(n){return JSON.parse(JSON.stringify(n))}function GF(n={}){const{window:e=$s}=n,t=Oe(1),i=_T(()=>`(resolution: ${t.value}dppx)`,n);let s=Pg;return e&&(s=gT(i,()=>t.value=e.devicePixelRatio)),{pixelRatio:Fi(t),stop:s}}function vT(n,e,t={}){const{window:i=$s,...s}=t;let r;const o=zd(()=>i&&"ResizeObserver"in i),a=()=>{r&&(r.disconnect(),r=void 0)},l=Ee(()=>{const f=rt(n);return Array.isArray(f)?f.map(h=>Di(h)):[Di(f)]}),c=Ke(l,f=>{if(a(),o.value&&i){r=new ResizeObserver(e);for(const h of f)h&&r.observe(h,s)}},{immediate:!0,flush:"post"}),u=()=>{a(),c()};return Er(u),{isSupported:o,stop:u}}function WF(n,e={}){const{reset:t=!0,windowResize:i=!0,windowScroll:s=!0,immediate:r=!0,updateTiming:o="sync"}=e,a=Oe(0),l=Oe(0),c=Oe(0),u=Oe(0),f=Oe(0),h=Oe(0),d=Oe(0),p=Oe(0);function _(){const m=Di(n);if(!m){t&&(a.value=0,l.value=0,c.value=0,u.value=0,f.value=0,h.value=0,d.value=0,p.value=0);return}const v=m.getBoundingClientRect();a.value=v.height,l.value=v.bottom,c.value=v.left,u.value=v.right,f.value=v.top,h.value=v.width,d.value=v.x,p.value=v.y}function g(){o==="sync"?_():o==="next-frame"&&requestAnimationFrame(()=>_())}return vT(n,g),Ke(()=>Di(n),m=>!m&&g()),BF(n,g,{attributeFilter:["style","class"]}),s&&Ao("scroll",g,{capture:!0,passive:!0}),i&&Ao("resize",g,{passive:!0}),I_(()=>{r&&g()}),{height:a,bottom:l,left:c,right:u,top:f,width:h,x:d,y:p,update:g}}function XF(n,e={width:0,height:0},t={}){const{window:i=$s,box:s="content-box"}=t,r=Ee(()=>{var f,h;return(h=(f=Di(n))==null?void 0:f.namespaceURI)==null?void 0:h.includes("svg")}),o=Oe(e.width),a=Oe(e.height),{stop:l}=vT(n,([f])=>{const h=s==="border-box"?f.borderBoxSize:s==="content-box"?f.contentBoxSize:f.devicePixelContentBoxSize;if(i&&r.value){const d=Di(n);if(d){const p=d.getBoundingClientRect();o.value=p.width,a.value=p.height}}else if(h){const d=Nl(h);o.value=d.reduce((p,{inlineSize:_})=>p+_,0),a.value=d.reduce((p,{blockSize:_})=>p+_,0)}else o.value=f.contentRect.width,a.value=f.contentRect.height},t);I_(()=>{const f=Di(n);f&&(o.value="offsetWidth"in f?f.offsetWidth:e.width,a.value="offsetHeight"in f?f.offsetHeight:e.height)});const c=Ke(()=>Di(n),f=>{o.value=f?e.width:0,a.value=f?e.height:0});function u(){l(),c()}return{width:o,height:a,stop:u}}function $F(n){var e;const t=Oe(0);if(typeof performance>"u")return t;const i=(e=n==null?void 0:n.every)!=null?e:10;let s=performance.now(),r=0;return L_(()=>{if(r+=1,r>=i){const o=performance.now(),a=o-s;t.value=Math.round(1e3/(a/r)),s=o,r=0}}),t}function qF(n={}){const e=nt(),t=zd(()=>typeof performance<"u"&&"memory"in performance);if(t.value){const{interval:i=1e3}=n;FF(()=>{e.value=performance.memory},i,{immediate:n.immediate,immediateCallback:n.immediateCallback})}return{isSupported:t,memory:e}}const yT={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},YF=Object.keys(yT);function jF(n={}){const{target:e=$s}=n,t=Oe(!1),i=nt(n.initialValue||{});Object.assign(i.value,yT,i.value);const s=r=>{t.value=!0,!(n.pointerTypes&&!n.pointerTypes.includes(r.pointerType))&&(i.value=DF(r,YF,!1))};if(e){const r={passive:!0};Ao(e,["pointerdown","pointermove","pointerup"],s,r),Ao(e,"pointerleave",()=>t.value=!1,r)}return{...UF(i),isInside:t}}function RG(n,e,t,i={}){var s,r,o;const{clone:a=!1,passive:l=!1,eventName:c,deep:u=!1,defaultValue:f,shouldEmit:h}=i,d=Rn(),p=t||(d==null?void 0:d.emit)||((s=d==null?void 0:d.$emit)==null?void 0:s.bind(d))||((o=(r=d==null?void 0:d.proxy)==null?void 0:r.$emit)==null?void 0:o.bind(d==null?void 0:d.proxy));let _=c;_=_||`update:${e.toString()}`;const g=b=>a?typeof a=="function"?a(b):HF(b):b,m=()=>AF(n[e])?g(n[e]):f,v=b=>{h?h(b)&&p(_,b):p(_,b)};if(l){const b=m(),y=nt(b);let T=!1;return Ke(()=>n[e],w=>{T||(T=!0,y.value=g(w),Ar(()=>T=!1))}),Ke(y,w=>{!T&&(w!==n[e]||u)&&v(w)},{deep:u}),y}else return Ee({get(){return m()},set(b){v(b)}})}function KF(n={}){const{window:e=$s,initialWidth:t=Number.POSITIVE_INFINITY,initialHeight:i=Number.POSITIVE_INFINITY,listenOrientation:s=!0,includeScrollbar:r=!0,type:o="inner"}=n,a=Oe(t),l=Oe(i),c=()=>{if(e)if(o==="outer")a.value=e.outerWidth,l.value=e.outerHeight;else if(o==="visual"&&e.visualViewport){const{width:f,height:h,scale:d}=e.visualViewport;a.value=Math.round(f*d),l.value=Math.round(h*d)}else r?(a.value=e.innerWidth,l.value=e.innerHeight):(a.value=e.document.documentElement.clientWidth,l.value=e.document.documentElement.clientHeight)};c(),I_(c);const u={passive:!0};if(Ao("resize",c,u),e&&o==="visual"&&e.visualViewport&&Ao(e.visualViewport,"resize",c,u),s){const f=_T("(orientation: portrait)");Ke(f,()=>c())}return{width:a,height:l}}var ZF=Object.defineProperty,JF=(n,e,t)=>e in n?ZF(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Xb=(n,e,t)=>JF(n,typeof e!="symbol"?e+"":e,t);const QF="@tresjs/core",ek="module",tk="4.3.6",nk="pnpm@10.6.3",ik="Declarative ThreeJS using Vue Components",sk="Alvaro Saburido (https://github.com/alvarosabu/)",rk="MIT",ok={type:"git",url:"git+https://github.com/Tresjs/tres.git"},ak=["vue","3d","threejs","three","threejs-vue"],lk=!1,ck={".":{types:"./dist/index.d.ts",import:"./dist/tres.js",require:"./dist/tres.umd.cjs"},"./components":{types:"./dist/src/components/index.d.ts"},"./composables":{types:"./dist/src/composables/index.d.ts"},"./types":{types:"./dist/src/types/index.d.ts"},"./utils":{types:"./dist/src/utils/index.d.ts"},"./*":"./*"},uk="./dist/tres.js",fk="./dist/tres.js",hk="./dist/index.d.ts",dk=["*.d.ts","dist"],pk={access:"public"},mk={dev:"pnpm --filter='./playground/vue' dev","dev:nuxt":"pnpm --filter='./playground/nuxt' dev",build:"vite build",test:"vitest","test:ci":"vitest run","test:ui":"vitest --ui --coverage.enabled=true",release:"release-it",coverage:"vitest run --coverage",lint:"eslint .","lint:fix":"eslint . --fix","docs:dev":"vitepress dev docs","docs:build":"vitepress build docs","docs:serve":"vitepress serve docs","docs:preview":"vitepress preview docs","docs:contributors":"esno scripts/update-contributors.ts"},gk={three:">=0.133",vue:">=3.4"},_k={"@alvarosabu/utils":"^3.2.0","@vue/devtools-api":"^6.6.3","@vueuse/core":"^12.5.0"},vk={"@release-it/conventional-changelog":"^10.0.0","@stackblitz/sdk":"^1.11.0","@tresjs/cientos":"4.1.0","@tresjs/eslint-config":"^1.4.0","@types/three":"^0.173.0","@typescript-eslint/eslint-plugin":"^8.23.0","@typescript-eslint/parser":"^8.23.0","@vitejs/plugin-vue":"^5.2.1","@vitest/coverage-c8":"^0.33.0","@vitest/coverage-v8":"^3.0.5","@vitest/ui":"^3.0.5","@vue/test-utils":"^2.4.6",eslint:"^9.19.0","eslint-plugin-vue":"^9.32.0",esno:"^4.8.0",gsap:"^3.12.7",jsdom:"^26.0.0",kolorist:"^1.8.0",ohmyfetch:"^0.4.21",pathe:"^2.0.2","release-it":"^18.1.2","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-copy":"^3.5.0","rollup-plugin-visualizer":"^5.14.0",sponsorkit:"^16.3.0",three:"^0.173.0",unocss:"^65.4.3",unplugin:"^2.1.2","unplugin-vue-components":"^28.0.0",vite:"^6.1.0","vite-plugin-banner":"^0.8.0","vite-plugin-dts":"4.5.0","vite-plugin-inspect":"^10.1.0","vite-plugin-require-transform":"^1.0.21","vite-svg-loader":"^5.1.0",vitepress:"1.6.3",vitest:"3.0.5",vue:"3.5.13","vue-demi":"^0.14.10"},yk={name:QF,type:ek,version:tk,packageManager:nk,description:ik,author:sk,license:rk,repository:ok,keywords:ak,sideEffects:lk,exports:ck,main:uk,module:fk,types:hk,files:dk,publishConfig:pk,scripts:mk,peerDependencies:gk,dependencies:_k,devDependencies:vk};class bk extends jt{constructor(...e){super(...e),Xb(this,"type","HightlightMesh"),Xb(this,"createTime"),this.createTime=Date.now()}onBeforeRender(){const e=(Date.now()-this.createTime)/1e3,t=1+.07*Math.sin(2.5*e);this.scale.set(t,t,t)}}function Ig(n){return typeof n>"u"}function D_(n){return Array.isArray(n)}function xk(n){return typeof n=="number"}function bT(n){return typeof n=="string"}function fa(n){return typeof n=="function"}function cs(n){return n===Object(n)&&!D_(n)&&!fa(n)}function pr(n){return cs(n)&&!!n.isObject3D}function xT(n){return cs(n)&&!!n.isColor}function Mk(n){return n!=null&&(typeof n=="string"||typeof n=="number"||xT(n))}function Lg(n){return n!==null&&typeof n=="object"&&"set"in n&&typeof n.set=="function"}function Sk(n){return Lg(n)&&"copy"in n&&typeof n.copy=="function"}function Ek(n){return!!(n!=null&&n.constructor)}function $b(n){return n instanceof Bc}function qb(n){return cs(n)&&!!n.isCamera}function Tk(n){return cs(n)&&!!n.isBufferGeometry}function wk(n){return cs(n)&&!!n.isMaterial}function Ak(n){return cs(n)&&!!n.isLight}function Ck(n){return cs(n)&&!!n.isFog}function Rk(n){return cs(n)&&!!n.isScene}function nf(n){return pr(n)||Tk(n)||wk(n)||Ck(n)}function Pk(n){return cs(n)&&!!n.isPrimitive}const MT=(n,e)=>{for(const t of Object.keys(e))e[t]instanceof Object&&Object.assign(e[t],MT(n[t],e[t]));return Object.assign(n||{},e),n},Ik="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",Lk=Nk(Ik);function Yb(n){return n&&n.nodeType===1}function fm(n){return n.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}const Dk=/\B([A-Z])/g;function Ok(n){return n.replace(Dk,"-$1").toLowerCase()}function Nk(n,e){const t=Object.create(null),i=n.split(",");for(let s=0;s!!t[s.toLowerCase()]:s=>!!t[s]}const jb=(n,e)=>{if(!e)return;const t=Array.isArray(e)?e:e.match(/([^[.\]])+/g);return t==null?void 0:t.reduce((i,s)=>i&&i[s],n)},Uk=(n,e,t)=>{const i=Array.isArray(e)?e:e.match(/([^[.\]])+/g);i&&i.reduce((s,r,o)=>(s[r]===void 0&&(s[r]={}),o===i.length-1&&(s[r]=t),s[r]),n)};function ST(n,e){if(Yb(n)&&Yb(e)){const s=n.attributes,r=e.attributes;return s.length!==r.length?!1:Array.from(s).every(({name:o,value:a})=>e.getAttribute(o)===a)}if(n===e)return!0;if(n===null||typeof n!="object"||e===null||typeof e!="object")return!1;const t=Object.keys(n),i=Object.keys(e);if(t.length!==i.length)return!1;for(const s of t)if(!i.includes(s)||!ST(n[s],e[s]))return!1;return!0}function Fk(n,e){if(!Array.isArray(n)||!Array.isArray(e)||n.length!==e.length)return!1;for(let t=0;t{if(l.uuid===e)return l;for(const c of l.children){const u=s(c);if(u)return u}},r=s(n);if(!r){console.warn("Object with UUID not found in the scene.");return}let o=r;for(let l=0;lET(i)),!(n instanceof vd)){const i=n;n&&((t=n.dispose)==null||t.call(n)),i.geometry&&i.geometry.dispose(),Array.isArray(i.material)?i.material.forEach(s=>Kb(s)):i.material&&Kb(i.material)}}function Vk(n,e){let t=0;for(let i=0;it===0?e:e.charAt(0).toUpperCase()+e.slice(1)).join("")}const Jb=/-\d+$/;function Hk(n,e,t){if(bT(t)){if(Jb.test(t)){const r=t.replace(Jb,""),{target:o,key:a}=Dg(n,r);if(!Array.isArray(o[a])){const l=o[a],c=[];c.__tresDetach=()=>{c.every(u=>Ig(u))&&(o[a]=l)},o[a]=c}}const{target:i,key:s}=Dg(n,t);e.__tres.previousAttach=i[s],i[s]=La(e)}else e.__tres.previousAttach=t(n,e)}function Gk(n,e,t){var i,s,r;if(bT(t)){const{target:o,key:a}=Dg(n,t),l=e.__tres.previousAttach;l===void 0?delete o[a]:o[a]=l,"__tresDetach"in o&&o.__tresDetach()}else(s=(i=e.__tres)==null?void 0:i.previousAttach)==null||s.call(i,n,e);(r=e.__tres)==null||delete r.previousAttach}function oo(n,e,t){const i=n;return i.__tres={type:"unknown",eventCount:0,root:t,handlers:{},memoizedProps:{},objects:[],parent:null,previousAttach:null,...e},i.__tres.attach||(i.isMaterial?i.__tres.attach="material":i.isBufferGeometry?i.__tres.attach="geometry":i.isFog&&(i.__tres.attach="fog")),i}function TT(n){var e;const t=(e=n==null?void 0:n.__tres)==null?void 0:e.root;t&&t.render&&t.render.canBeInvalidated.value&&t.invalidate()}function Wk(n,e,t){var i;if(!fa(n.setPixelRatio))return;let s=0;if(t&&D_(t)&&t.length>=2){const[r,o]=t;s=i_.clamp(e,r,o)}else xk(t)?s=t:s=e;s!==((i=n.getPixelRatio)==null?void 0:i.call(n))&&n.setPixelRatio(s)}function Xk(n,e,t,i,s){const r=[...e.__tres.objects],o=La(e);if(n=La(n),o===n)return!0;const a=oo(n,e.__tres??{},s),l=e.parent??e.__tres.parent??null,c={...e.__tres.memoizedProps};delete c.object;for(const u of r)wT(u,s),AT(u,s);o.__tres.objects=[],i.remove(e);for(const[u,f]of Object.entries(c))i.patchProp(a,u,a[u],f);t(n),i.insert(e,l);for(const u of r)i.insert(u,e);return!0}function La(n){return Pk(n)?(n.object.__tres=n.__tres,n.object):n}function wT(n,e){var t,i,s,r;const o=((t=n.__tres)==null?void 0:t.parent)||e.scene.value;n.__tres&&(n.__tres.parent=null),o&&o.__tres&&"objects"in o.__tres&&Vk(o.__tres.objects,a=>a!==n),(i=n.__tres)!=null&&i.attach?Gk(o,n,n.__tres.attach):((r=(s=n.parent)==null?void 0:s.remove)==null||r.call(s,La(n)),n.parent=null)}function AT(n,e){var t;(t=n.traverse)==null||t.call(n,i=>{var s;e.deregisterCamera(i),(s=e.eventManager)==null||s.deregisterPointerMissedObject(i)}),e.deregisterCamera(n),TT(n)}const $k=({sizes:n})=>{const e=nt([]),t=Ee(()=>e.value[0]),i=o=>{const a=o instanceof zc?o:e.value.find(c=>c.uuid===o);if(!a)return;const l=e.value.filter(({uuid:c})=>c!==a.uuid);e.value=[a,...l]},s=(o,a=!1)=>{if(qb(o)){const l=o;if(e.value.some(({uuid:c})=>c===l.uuid))return;a?i(l):e.value.push(l)}},r=o=>{if(qb(o)){const a=o;e.value=e.value.filter(({uuid:l})=>l!==a.uuid)}};return Lc(()=>{n.aspectRatio.value&&e.value.forEach(o=>{!o.manual&&(o instanceof Jt||qk(o))&&(o instanceof Jt?o.aspect=n.aspectRatio.value:(o.left=n.width.value*-.5,o.right=n.width.value*.5,o.top=n.height.value*.5,o.bottom=n.height.value*-.5),o.updateProjectionMatrix())})}),rs(()=>{e.value=[]}),{camera:t,cameras:e,registerCamera:s,deregisterCamera:r,setCameraActive:i}};function qk(n){return n.hasOwnProperty("isOrthographicCamera")&&n.isOrthographicCamera}const Rh="[TresJS ▲ ■ ●] ";function Yk(...n){typeof n[0]=="string"?n[0]=Rh+n[0]:n.unshift(Rh),console.error(...n)}function jk(...n){typeof n[0]=="string"?n[0]=Rh+n[0]:n.unshift(Rh),console.warn(...n)}function Kk(n,e){}function CT(){return{logError:Yk,logWarning:jk,logMessage:Kk}}const Og=nt({}),Ng=n=>Object.assign(Og.value,n);function hm(){const n=new Map,e=new Set;let t=0,i=!1;const s=()=>{const o=Array.from(n.entries()).sort((a,l)=>{const c=a[1].priority-l[1].priority;return c===0?a[1].addI-l[1].addI:c});e.clear(),o.forEach(a=>e.add(a[0]))},r=o=>{n.delete(o),e.delete(o)};return{on:(o,a=0)=>{n.set(o,{priority:a,addI:t++});const l=()=>r(o);return Er(l),i=!0,{off:l}},off:r,trigger:(...o)=>{i&&(s(),i=!1),e.forEach(a=>a(...o))},dispose:()=>{n.clear(),e.clear()},get count(){return n.size}}}function Zk(){let n=!0,e=!0,t=!1;const i=new kd(!1),s=nt(i.running),r=nt(!1);let o;const a=i_.generateUUID();let l=null;const c=hm(),u=hm(),f=hm();w();let h={};function d(S){h=S}function p(S,P,M=0){switch(P){case"before":return c.on(S,M);case"render":return l||(l=S),u.dispose(),u.on(S);case"after":return f.on(S,M)}}function _(){e&&(e=!1,w(),T())}function g(){e=!0,w(),cancelAnimationFrame(o)}function m(){t=!1,w()}function v(){t=!0,w()}function b(){r.value=!0}function y(){r.value=!1}function T(){if(!n){o=requestAnimationFrame(T);return}const S=i.getDelta(),P=i.getElapsedTime(),M={camera:Ft(h.camera),scene:Ft(h.scene),renderer:Ft(h.renderer),raycaster:Ft(h.raycaster),controls:Ft(h.controls),invalidate:h.invalidate,advance:h.advance},E={delta:S,elapsed:P,clock:i,...M};s.value&&c.trigger(E),r.value||(u.count?u.trigger(E):l&&l(E)),s.value&&f.trigger(E),o=requestAnimationFrame(T)}function w(){const S=!e&&!t;i.running!==S&&(i.running?i.stop():i.start()),s.value=i.running}return{loopId:a,register:(S,P,M)=>p(S,P,M),start:_,stop:g,pause:v,resume:m,pauseRender:b,resumeRender:y,isRenderPaused:r,isActive:s,setContext:d,setReady:S=>n=S}}function O_(n){let e=0;return n.traverse(t=>{if(t.isMesh&&t.geometry&&t.type!=="HightlightMesh"){const i=t.geometry,s=i.attributes.position.count*3*Float32Array.BYTES_PER_ELEMENT,r=i.index?i.index.count*Uint32Array.BYTES_PER_ELEMENT:0,o=i.attributes.normal?i.attributes.normal.count*3*Float32Array.BYTES_PER_ELEMENT:0,a=i.attributes.uv?i.attributes.uv.count*2*Float32Array.BYTES_PER_ELEMENT:0,l=s+r+o+a;e+=l}}),e}function Jk(n){return(n/1024).toFixed(2)}const Qk=Number.parseInt(Uc.replace("dev",""));function eB(n){return n instanceof Pe?n:Array.isArray(n)?new Pe(...n):new Pe(n)}const sf={realistic:{shadows:!0,physicallyCorrectLights:!0,outputColorSpace:Fn,toneMapping:rd,toneMappingExposure:3,shadowMap:{enabled:!0,type:X0}},flat:{toneMapping:ts,toneMappingExposure:1}};function tB({canvas:n,options:e,contextParts:{sizes:t,render:i,invalidate:s,advance:r}}){const o=Ee(()=>({alpha:pn(e.alpha)??!0,depth:pn(e.depth),canvas:Di(n),context:pn(e.context),stencil:pn(e.stencil),antialias:pn(e.antialias)??!0,precision:pn(e.precision),powerPreference:pn(e.powerPreference),premultipliedAlpha:pn(e.premultipliedAlpha),preserveDrawingBuffer:pn(e.preserveDrawingBuffer),logarithmicDepthBuffer:pn(e.logarithmicDepthBuffer),failIfMajorPerformanceCaveat:pn(e.failIfMajorPerformanceCaveat)})),a=Oe(new Tf(o.value));function l(){e.renderMode==="on-demand"&&s()}Ke(o,()=>{a.value.dispose(),a.value=new Tf(o.value),l()}),Ke([t.width,t.height],()=>{a.value.setSize(t.width.value,t.height.value),l()},{immediate:!0}),Ke(()=>e.clearColor,l);const{pixelRatio:c}=GF(),{logError:u}=CT(),f=(()=>{const d=new Tf,p={shadowMap:{enabled:d.shadowMap.enabled,type:d.shadowMap.type},toneMapping:d.toneMapping,toneMappingExposure:d.toneMappingExposure,outputColorSpace:d.outputColorSpace};return d.dispose(),p})(),h=pn(e.renderMode);return h==="on-demand"&&s(),h==="manual"&&setTimeout(()=>{r()},100),Lc(()=>{const d=pn(e.preset);d&&(d in sf||u(`Renderer Preset must be one of these: ${Object.keys(sf).join(", ")}`),MT(a.value,sf[d])),Wk(a.value,c.value,pn(e.dpr)),h==="always"&&(i.frames.value=Math.max(1,i.frames.value));const p=(m,v)=>{const b=pn(m),y=()=>{if(d)return jb(sf[d],v)};if(b!==void 0)return b;const T=y();return T!==void 0?T:jb(f,v)},_=(m,v)=>Uk(a.value,v,p(m,v));_(e.shadows,"shadowMap.enabled"),_(e.toneMapping??rd,"toneMapping"),_(e.shadowMapType,"shadowMap.type"),Qk<150&&_(!e.useLegacyLights,"physicallyCorrectLights"),_(e.outputColorSpace,"outputColorSpace"),_(e.toneMappingExposure,"toneMappingExposure");const g=p(e.clearColor,"clearColor");g&&a.value.setClearColor(g?eB(g):new Pe(0))}),rs(()=>{a.value.dispose(),a.value.forceContextLoss()}),{renderer:a}}function nB(n,e,t=10){const i=pn(n)?KF():XF(Ee(()=>pn(e).parentElement)),s=Fi(Wb(i.width,t)),r=Fi(Wb(i.height,t)),o=Ee(()=>s.value/r.value);return{height:r,width:s,aspectRatio:o}}const iB=(n,e)=>{const t=Ee(()=>e.renderer.value.domElement),i=Oe([]),{x:s,y:r}=jF({target:t});let o=0;const{width:a,height:l,top:c,left:u}=WF(t),f=({x:re,y:xe})=>{if(t.value)return{x:(re-u.value)/a.value*2-1,y:-((xe-c.value)/l.value)*2+1}},h=({x:re,y:xe})=>{if(e.camera.value)return e.raycaster.value.setFromCamera(new fe(re,xe),e.camera.value),i.value=e.raycaster.value.intersectObjects(n.value,!0),i.value},d=re=>{const xe=f({x:(re==null?void 0:re.clientX)??s.value,y:(re==null?void 0:re.clientY)??r.value});return xe?h(xe)||[]:[]},p=pi(),_=pi(),g=pi(),m=pi(),v=pi(),b=pi(),y=pi(),T=pi();function w(re){const xe={};for(const We in re)typeof We!="function"&&(xe[We]=re[We]);return xe}const S=(re,xe)=>{var We,oe,ge;const Se=w(xe),$=new k(xe==null?void 0:xe.clientX,xe==null?void 0:xe.clientY,0).unproject((We=e.camera)==null?void 0:We.value);re.trigger({...Se,intersections:i.value,unprojectedPoint:$,ray:(oe=e.raycaster)==null?void 0:oe.value.ray,camera:(ge=e.camera)==null?void 0:ge.value,sourceEvent:xe,delta:o,stopPropagating:!1})};let P;const M=re=>{d(re),S(g,re),P=re},E=()=>{P&&M(P)};let D,B,z;const V=re=>{var xe;D=(xe=i.value[0])==null?void 0:xe.object,o=0,B=new fe((re==null?void 0:re.clientX)??s.value,(re==null?void 0:re.clientY)??r.value),S(v,re)};let Q,j=!1;const te=re=>{var xe,We,oe;re instanceof PointerEvent&&(i.value.length===0&&S(b,re),D===((xe=i.value[0])==null?void 0:xe.object)&&(z=new fe((re==null?void 0:re.clientX)??s.value,(re==null?void 0:re.clientY)??r.value),o=B==null?void 0:B.distanceTo(z),re.button===0?(S(p,re),Q===((We=i.value[0])==null?void 0:We.object)?j=!0:(Q=(oe=i.value[0])==null?void 0:oe.object,j=!1)):re.button===2&&S(y,re)),S(m,re))},Z=re=>{j&&(S(_,re),Q=void 0,j=!1)},pe=re=>S(g,re),Me=re=>S(T,re);return t.value.addEventListener("pointerup",te),t.value.addEventListener("pointerdown",V),t.value.addEventListener("pointermove",M),t.value.addEventListener("pointerleave",pe),t.value.addEventListener("dblclick",Z),t.value.addEventListener("wheel",Me),rs(()=>{t!=null&&t.value&&(t.value.removeEventListener("pointerup",te),t.value.removeEventListener("pointerdown",V),t.value.removeEventListener("pointermove",M),t.value.removeEventListener("pointerleave",pe),t.value.removeEventListener("dblclick",Z),t.value.removeEventListener("wheel",Me))}),{intersects:i,onClick:re=>p.on(re).off,onDblClick:re=>_.on(re).off,onContextMenu:re=>y.on(re).off,onPointerMove:re=>g.on(re).off,onPointerUp:re=>m.on(re).off,onPointerDown:re=>v.on(re).off,onPointerMissed:re=>b.on(re).off,onWheel:re=>T.on(re).off,forceUpdate:E}};function dm(n,e){if(Array.isArray(n))for(const t of n)t(e);typeof n=="function"&&n(e)}function sB(n,e,t){var i;const s=Oe(),r=Oe();n&&(s.value=n),e&&(r.value=e);const o=M=>{var E;return((E=M.__tres)==null?void 0:E.eventCount)>0},a=M=>{var E;return((E=M.children)==null?void 0:E.some(D=>a(D)))||o(M)},l=Oe(((i=s.value)==null?void 0:i.children).filter(a)||[]);function c(M,E){const D=[],B=()=>E.stopPropagating=!0;E.stopPropagation=B;for(const z of E==null?void 0:E.intersections){if(E.stopPropagating)return;E={...E,...z};const{object:V}=z;E.eventObject=V,dm(V[M],E),D.push(V);let Q=V.parent;for(;Q!==null&&!E.stopPropagating&&!D.includes(Q);)E.eventObject=Q,dm(Q[M],E),D.push(Q),Q=Q.parent;const j=Ok(M.slice(2));t(j,{intersection:z,event:E})}}const{onClick:u,onDblClick:f,onContextMenu:h,onPointerMove:d,onPointerDown:p,onPointerUp:_,onPointerMissed:g,onWheel:m,forceUpdate:v}=iB(l,e);_(M=>c("onPointerUp",M)),p(M=>c("onPointerDown",M)),u(M=>c("onClick",M)),f(M=>c("onDoubleClick",M)),h(M=>c("onContextMenu",M)),m(M=>c("onWheel",M));let b=[];d(M=>{const E=M.intersections.map(({object:B})=>B),D=M.intersections;b.forEach(({object:B})=>{E.includes(B)||(M.intersections=b,c("onPointerLeave",M),c("onPointerOut",M))}),M.intersections=D,M.intersections.forEach(({object:B})=>{b.includes(B)||(c("onPointerEnter",M),c("onPointerOver",M))}),c("onPointerMove",M),b=M.intersections});const y=[];g(M=>{const E=()=>M.stopPropagating=!0;M.stopPropagation=E,y.forEach(D=>{M.stopPropagating||(M.eventObject=D,dm(D.onPointerMissed,M))}),t("pointer-missed",{event:M})});function T(M){nf(M)&&pr(M)&&l.value.push(M)}function w(M){if(nf(M)&&pr(M)){const E=l.value.indexOf(M);E>-1&&l.value.splice(E,1)}}function S(M){nf(M)&&pr(M)&&M.onPointerMissed&&y.push(M)}function P(M){if(nf(M)&&pr(M)){const E=y.indexOf(M);E>-1&&y.splice(E,1)}}return e.eventManager={forceUpdate:v,registerObject:T,deregisterObject:w,registerPointerMissedObject:S,deregisterPointerMissedObject:P},{forceUpdate:v,registerObject:T,deregisterObject:w,registerPointerMissedObject:S,deregisterPointerMissedObject:P}}function rB(n,e,t=100){t=t<=0?100:t;const i=pi(),s=new Set;let r=!1,o=!1,a=null;function l(){a&&clearTimeout(a),!o&&!r&&n()?(i.trigger(e),s.forEach(f=>f()),s.clear(),r=!0):!o&&!r&&(a=setTimeout(l,t))}function c(){o=!0,a&&clearTimeout(a)}l();const u=(f,...h)=>{f(...h)};return{on:f=>{if(r)return u(f,e),{off:()=>{}};{const h=i.on(f);return s.add(h.off),i.on(f)}},off:i.off,trigger:i.trigger,clear:i.clear,cancel:c}}const pm=new WeakMap;function oB(n){if(n=n||RT(),pm.has(n))return pm.get(n);const e=100,t=Date.now(),i=rB(()=>{if(Date.now()-t>=e)return!0;{const s=n.renderer.value,r=(s==null?void 0:s.domElement)||{width:0,height:0};return!!(s&&r.width>0&&r.height>0)}},n);return pm.set(n,i),i}function aB({scene:n,canvas:e,windowSize:t,rendererOptions:i,emit:s}){const r=Oe(n),o=nB(t,e),{camera:a,cameras:l,registerCamera:c,deregisterCamera:u,setCameraActive:f}=$k({sizes:o}),h={mode:nt(i.renderMode||"always"),priority:nt(0),frames:nt(0),maxFrames:60,canBeInvalidated:Ee(()=>h.mode.value==="on-demand"&&h.frames.value===0)};function d(z=1){i.renderMode==="on-demand"&&(h.frames.value=Math.min(h.maxFrames,h.frames.value+z))}function p(){i.renderMode==="manual"&&(h.frames.value=1)}const{renderer:_}=tB({canvas:e,options:i,contextParts:{sizes:o,render:h,invalidate:d,advance:p}}),g={sizes:o,scene:r,camera:a,cameras:Fi(l),renderer:_,raycaster:Oe(new lT),controls:nt(null),perf:{maxFrames:160,fps:{value:0,accumulator:[]},memory:{currentMem:0,allocatedMem:0,accumulator:[]}},render:h,advance:p,extend:Ng,invalidate:d,registerCamera:c,setCameraActive:f,deregisterCamera:u,loop:Zk()};gr("useTres",g),g.scene.value.__tres={root:g},g.loop.register(()=>{a.value&&h.frames.value>0&&(_.value.render(n,a.value),s("render",g.renderer.value)),h.priority.value=0,h.mode.value==="always"?h.frames.value=1:h.frames.value=Math.max(0,h.frames.value-1)},"render");const{on:m,cancel:v}=oB(g);g.loop.setReady(!1),g.loop.start(),m(()=>{s("ready",g),g.loop.setReady(!0),sB(n,g,s)}),rs(()=>{v(),g.loop.stop()});const b=100,y=$F({every:b}),{isSupported:T,memory:w}=qF({interval:b}),S=160;let P=performance.now();const M=({timestamp:z})=>{g.scene.value&&(g.perf.memory.allocatedMem=O_(g.scene.value)),z-P>=b&&(P=z,g.perf.fps.accumulator.push(y.value),g.perf.fps.accumulator.length>S&&g.perf.fps.accumulator.shift(),g.perf.fps.value=y.value,T.value&&w.value&&(g.perf.memory.accumulator.push(w.value.usedJSHeapSize/1024/1024),g.perf.memory.accumulator.length>S&&g.perf.memory.accumulator.shift(),g.perf.memory.currentMem=g.perf.memory.accumulator.reduce((V,Q)=>V+Q,0)/g.perf.memory.accumulator.length))};let E=0;const D=1,{pause:B}=L_(({delta:z})=>{window.__TRES__DEVTOOLS__&&(M({timestamp:performance.now()}),E+=z,E>=D&&(window.__TRES__DEVTOOLS__.cb(g),E=0))},{immediate:!0});return rs(()=>{B()}),g}function RT(){const n=_n("useTres");if(!n)throw new Error("useTresContext must be used together with useTresContextProvider");return n}function PG(){const{camera:n,scene:e,renderer:t,loop:i,raycaster:s,controls:r,invalidate:o,advance:a}=RT();i.setContext({camera:n,scene:e,renderer:t,raycaster:s,controls:r,invalidate:o,advance:a});function l(f,h=0){return i.register(f,"before",h)}function c(f){return i.register(f,"render")}function u(f,h=0){return i.register(f,"after",h)}return{pause:i.pause,resume:i.resume,pauseRender:i.pauseRender,resumeRender:i.resumeRender,isActive:i.isActive,onBeforeRender:l,render:c,onAfterRender:u}}const lB=pi(),cB=pi(),PT=pi(),Ul=new kd;let wf=0,Af=0;L_(()=>{lB.trigger({delta:wf,elapsed:Af,clock:Ul}),cB.trigger({delta:wf,elapsed:Af,clock:Ul}),PT.trigger({delta:wf,elapsed:Af,clock:Ul})},{immediate:!1});PT.on(()=>{wf=Ul.getDelta(),Af=Ul.getElapsedTime()});function uB(n,e={},t={}){let i=n;const s=a=>{i=a};let r=new Proxy({},{});const o={has(a,l){return l in e||l in i},get(a,l,c){return l in e?e[l](i):i[l]},set(a,l,c){return t[l]?t[l](c,i,r,s):i[l]=c,!0}};return r=new Proxy({},o),r}const{logError:Qb}=CT(),ex=["onClick","onContextMenu","onPointerMove","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onDoubleClick","onPointerDown","onPointerUp","onPointerCancel","onPointerMissed","onLostPointerCapture","onWheel"],fB=n=>{const e=n.scene.value;function t(c,u,f,h){if(h||(h={}),h.args||(h.args=[]),c==="template"||Lk(c))return null;let d=c.replace("Tres",""),p;if(c==="primitive"){(!cs(h.object)||Lt(h.object))&&Qb("Tres primitives need an 'object' prop, whose value is an object or shallowRef"),d=h.object.type;const _={};p=uB(h.object,{object:g=>g,isPrimitive:()=>!0,__tres:()=>_},{object:(g,m,v,b)=>{Xk(g,v,b,{patchProp:r,remove:s,insert:i},n)},__tres:g=>{Object.assign(_,g)}})}else{const _=Og.value[d];_||Qb(`${d} is not defined on the THREE namespace. Use extend to add it to the catalog.`),p=new _(...h.args)}return p?(p.isCamera&&(h!=null&&h.position||p.position.set(3,3,3),h!=null&&h.lookAt||p.lookAt(0,0,0)),p=oo(p,{...p.__tres,type:d,memoizedProps:h,eventCount:0,primitive:c==="primitive",attach:h.attach},n),p):null}function i(c,u){var f,h,d;if(!c)return;u=u||e;const p=c.__tres?c:oo(c,{},n),_=u.__tres?u:oo(u,{},n);c=La(p),u=La(_),c.__tres&&((f=c.__tres)==null?void 0:f.eventCount)>0&&((h=n.eventManager)==null||h.registerObject(c)),n.registerCamera(c),(d=n.eventManager)==null||d.registerPointerMissedObject(c),p.__tres.attach?Hk(_,p,p.__tres.attach):pr(c)&&pr(_)&&(_.add(c),c.dispatchEvent({type:"added"})),p.__tres.parent=_,_.__tres.objects&&!_.__tres.objects.includes(p)&&_.__tres.objects.push(p)}function s(c,u){var f,h,d,p;if(!c)return;c!=null&&c.__tres&&((f=c.__tres)==null?void 0:f.eventCount)>0&&((h=n.eventManager)==null||h.deregisterObject(c)),u=Ig(u)?"default":u;const _=(d=c.__tres)==null?void 0:d.dispose;Ig(_)||(_===null?u=!1:u=_);const g=(p=c.__tres)==null?void 0:p.primitive,m=u==="default"?!g:!!u;if(c.__tres&&"objects"in c.__tres&&[...c.__tres.objects].forEach(v=>s(v,u)),m&&c.children&&[...c.children].forEach(v=>s(v,u)),wT(c,n),AT(c,n),m&&!Rk(c)){if(fa(u))u(c);else if(fa(c.dispose))try{c.dispose()}catch{}}"__tres"in c&&delete c.__tres}function r(c,u,f,h){var d,p;if(!c)return;let _=c,g=u;if(c.__tres&&(c.__tres.memoizedProps[u]=h),u==="attach"){const y=((d=c.__tres)==null?void 0:d.parent)||c.parent;s(c),oo(c,{attach:h},n),y&&i(c,y);return}if(u==="dispose"){c.__tres||(c=oo(c,{},n)),c.__tres.dispose=h;return}if(pr(c)&&g==="blocks-pointer-events"){h||h===""?c[g]=h:delete c[g];return}ex.includes(u)&&c.__tres&&(c.__tres.eventCount+=1);let m=fm(g),v=_==null?void 0:_[m];if(g==="args"){const y=c,T=f??[],w=h??[],S=((p=c.__tres)==null?void 0:p.type)||c.type;S&&T.length&&!Fk(T,w)&&(_=Object.assign(y,new Og.value[S](...h)));return}if(_.type==="BufferGeometry"){if(g==="args")return;_.setAttribute(fm(g),new Pt(...h));return}if(g.includes("-")&&v===void 0){v=_;for(const y of g.split("-"))m=g=fm(y),_=v,v=v==null?void 0:v[g]}let b=h;if(b===""&&(b=!0),fa(v)){ex.includes(u)||(D_(b)?c[m](...b):c[m](b)),m.startsWith("on")&&fa(b)&&(_[m]=b);return}$b(v)&&$b(b)?v.mask=b.mask:xT(v)&&Mk(b)?v.set(b):Sk(v)&&Ek(b)&&v.constructor===b.constructor?v.copy(b):Lg(v)&&Array.isArray(b)?"fromArray"in v&&typeof v.fromArray=="function"?v.fromArray(b):v.set(...b):Lg(v)&&typeof b=="number"?"setScalar"in v&&typeof v.setScalar=="function"?v.setScalar(b):v.set(b):_[m]=b,TT(c)}function o(c){var u;return((u=c==null?void 0:c.__tres)==null?void 0:u.parent)||null}function a(c){const u=oo(new gt,{type:"Comment"},n);return u.name=c,u}function l(c){var u;const f=o(c),h=((u=f==null?void 0:f.__tres)==null?void 0:u.objects)||[],d=h.indexOf(c);return d<0||d>=h.length-1?null:h[d+1]}return{insert:i,remove:s,createElement:t,patchProp:r,parentNode:o,createText:()=>{},createComment:a,setText:()=>{},setElementText:()=>{},nextSibling:l,querySelector:()=>{},setScopeId:()=>{},cloneNode:()=>{},insertStaticContent:()=>{}}};function hB(){return IT().__VUE_DEVTOOLS_GLOBAL_HOOK__}function IT(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const dB=typeof Proxy=="function",pB="devtools-plugin:setup",mB="plugin:settings:set";let ul,Ug;function gB(){var n;return ul!==void 0||(typeof window<"u"&&window.performance?(ul=!0,Ug=window.performance):typeof globalThis<"u"&&!((n=globalThis.perf_hooks)===null||n===void 0)&&n.performance?(ul=!0,Ug=globalThis.perf_hooks.performance):ul=!1),ul}function _B(){return gB()?Ug.now():Date.now()}class vB{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const i={};if(e.settings)for(const o in e.settings){const a=e.settings[o];i[o]=a.defaultValue}const s=`__vue-devtools-plugin-settings__${e.id}`;let r=Object.assign({},i);try{const o=localStorage.getItem(s),a=JSON.parse(o);Object.assign(r,a)}catch{}this.fallbacks={getSettings(){return r},setSettings(o){try{localStorage.setItem(s,JSON.stringify(o))}catch{}r=o},now(){return _B()}},t&&t.on(mB,(o,a)=>{o===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(o,a)=>this.target?this.target.on[a]:(...l)=>{this.onQueue.push({method:a,args:l})}}),this.proxiedTarget=new Proxy({},{get:(o,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...l)=>(this.targetQueue.push({method:a,args:l,resolve:()=>{}}),this.fallbacks[a](...l)):(...l)=>new Promise(c=>{this.targetQueue.push({method:a,args:l,resolve:c})})})}async setRealTarget(e){this.target=e;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function yB(n,e){const t=n,i=IT(),s=hB(),r=dB&&t.enableEarlyProxy;if(s&&(i.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!r))s.emit(pB,n,e);else{const o=r?new vB(t,s):null;(i.__VUE_DEVTOOLS_PLUGINS__=i.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:t,setupFn:e,proxy:o}),o&&e(o.proxiedTarget)}}function bB(n,e){const t=`▲ ■ ●${n}`;typeof tx=="function"?tx(t,e):console.log(t)}function tx(n,e){throw new Error(n+e)}const LT=n=>{const e={id:n.uuid,label:n.type,children:[],tags:[]};n.name!==""&&e.tags.push({label:n.name,textColor:5750629,backgroundColor:15793395});const t=O_(n);return t>0&&e.tags.push({label:`${Jk(t)} KB`,textColor:15707189,backgroundColor:16775644,tooltip:"Memory usage"}),n.type.includes("Light")&&(Ak(n)&&e.tags.push({label:`${n.intensity}`,textColor:9738662,backgroundColor:16316922,tooltip:"Intensity"}),e.tags.push({label:`#${new Pe(n.color).getHexString()}`,textColor:9738662,backgroundColor:16316922,tooltip:"Color"})),n.type.includes("Camera")&&(e.tags.push({label:`${n.fov}°`,textColor:9738662,backgroundColor:16316922,tooltip:"Field of view"}),e.tags.push({label:`x: ${Math.round(n.position.x)} y: ${Math.round(n.position.y)} z: ${Math.round(n.position.z)}`,textColor:9738662,backgroundColor:16316922,tooltip:"Position"})),e};function DT(n,e,t=""){n.children.forEach(i=>{if(i.type==="HightlightMesh"||t&&!i.type.includes(t)&&!i.name.includes(t))return;const s=LT(i);e.children.push(s),DT(i,s,t)})}const xB=[],fl="tres:inspector",MB=xi({sceneGraph:null});function SB(n,e){yB({id:"dev.esm.tres",label:"TresJS 🪐",logo:"https://raw.githubusercontent.com/Tresjs/tres/main/public/favicon.svg",packageName:"tresjs",homepage:"https://tresjs.org",componentStateTypes:xB,app:n},t=>{typeof t.now!="function"&&bB("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),t.addInspector({id:fl,label:"TresJS 🪐",icon:"account_tree",treeFilterPlaceholder:"Search instances"}),setInterval(()=>{t.sendInspectorTree(fl)},1e3),setInterval(()=>{t.notifyComponentUpdate()},5e3),t.on.getInspectorTree(r=>{if(r.inspectorId===fl){const o=LT(e.scene.value);DT(e.scene.value,o,r.filter),MB.sceneGraph=o,r.rootNodes=[o]}});let i=null,s=null;t.on.getInspectorState(r=>{var o;if(r.inspectorId===fl){const[a]=e.scene.value.getObjectsByProperty("uuid",r.nodeId);if(!a)return;if(s&&i&&i.parent&&s.remove(i),a.isMesh){const l=Bk(a);a.add(l),i=l,s=a}r.state={object:Object.entries(a).map(([l,c])=>l==="children"?{key:l,value:c.filter(u=>u.type!=="HightlightMesh")}:{key:l,value:c,editable:!0}).filter(({key:l})=>l!=="parent")},a.isScene&&(r.state={...r.state,state:[{key:"Scene Info",value:{objects:a.children.length,memory:O_(a),calls:e.renderer.value.info.render.calls,triangles:e.renderer.value.info.render.triangles,points:e.renderer.value.info.render.points,lines:e.renderer.value.info.render.lines}},{key:"Programs",value:((o=e.renderer.value.info.programs)==null?void 0:o.map(l=>({...l,programName:l.name})))||[]}]})}}),t.on.editInspectorState(r=>{r.inspectorId===fl&&kk(e.scene.value,r.nodeId,r.path,r.state.value)})})}const EB=["data-scene","data-tres"],TB=hn({__name:"TresCanvas",props:{shadows:{type:Boolean,default:void 0},clearColor:{},toneMapping:{},shadowMapType:{},useLegacyLights:{type:Boolean,default:void 0},outputColorSpace:{},toneMappingExposure:{},renderMode:{default:"always"},dpr:{},camera:{},preset:{},windowSize:{type:Boolean,default:void 0},enableProvideBridge:{type:Boolean,default:!0},context:{},alpha:{type:Boolean,default:void 0},premultipliedAlpha:{type:Boolean},antialias:{type:Boolean,default:void 0},stencil:{type:Boolean,default:void 0},preserveDrawingBuffer:{type:Boolean,default:void 0},powerPreference:{},depth:{type:Boolean,default:void 0},failIfMajorPerformanceCaveat:{type:Boolean,default:void 0},precision:{},logarithmicDepthBuffer:{type:Boolean,default:void 0},reverseDepthBuffer:{type:Boolean}},emits:["render","click","double-click","context-menu","pointer-move","pointer-up","pointer-down","pointer-enter","pointer-leave","pointer-over","pointer-out","pointer-missed","wheel","ready"],setup(n,{expose:e,emit:t}){const i=n,s=t,r=N0(),o=nt(),a=Oe(new vd),l=Rn();Ng(TF);const c=(p,_=!1)=>hn({setup(){var g;const m=(g=Rn())==null?void 0:g.appContext;m&&(m.app=l==null?void 0:l.appContext.app);const v={};function b(y){y&&(y.parent&&b(y.parent),y.provides&&Object.assign(v,y.provides))}return l!=null&&l.parent&&i.enableProvideBridge&&(b(l.parent),Reflect.ownKeys(v).forEach(y=>{gr(y,v[y])})),gr("useTres",p),gr("extend",Ng),typeof window<"u"&&SB(m==null?void 0:m.app,p),()=>ks(Zt,null,_?[]:r.default())}}),u=(p,_=!1)=>{const g=c(p,_),{render:m}=ZS(fB(p));m(ks(g),a.value)},f=(p,_=!1)=>{ET(p.scene.value),_&&(p.renderer.value.dispose(),p.renderer.value.renderLists.dispose(),p.renderer.value.forceContextLoss()),a.value.__tres={root:p}},h=Oe(null);e({context:h,dispose:()=>f(h.value,!0)});const d=()=>{f(h.value),u(h.value,!0)};return Gn(()=>{const p=o;h.value=aB({scene:a.value,canvas:p,windowSize:i.windowSize??!1,rendererOptions:i,emit:s});const{registerCamera:_,camera:g,cameras:m,deregisterCamera:v}=h.value;u(h.value);const b=()=>{const y=new Jt(45,window.innerWidth/window.innerHeight,.1,1e3);y.position.set(3,3,3),y.lookAt(0,0,0),_(y);const T=Lc(()=>{m.value.length>=2&&(y.removeFromParent(),v(y),T==null||T())})};Ke(()=>i.camera,(y,T)=>{y&&_(y),T&&(T.removeFromParent(),v(T))},{immediate:!0}),g.value||b()}),rs(d),(p,_)=>(vn(),yi("canvas",{ref_key:"canvas",ref:o,"data-scene":a.value.uuid,class:ka(p.$attrs.class),"data-tres":`tresjs ${Ft(yk).version}`,style:Si({display:"block",width:"100%",height:"100%",position:p.windowSize?"fixed":"relative",top:0,left:0,pointerEvents:"auto",touchAction:"none",...p.$attrs.style})},null,14,EB))}}),wB={install(n){n.component("TresCanvas",TB)}};function mm(n){if(n===null||typeof n!="object")return!1;const e=Object.getPrototypeOf(n);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in n?!1:Symbol.toStringTag in n?Object.prototype.toString.call(n)==="[object Module]":!0}function Fg(n,e,t=".",i){if(!mm(e))return Fg(n,{},t,i);const s=Object.assign({},e);for(const r in n){if(r==="__proto__"||r==="constructor")continue;const o=n[r];o!=null&&(i&&i(s,r,o,t)||(Array.isArray(o)&&Array.isArray(s[r])?s[r]=[...o,...s[r]]:mm(o)&&mm(s[r])?s[r]=Fg(o,s[r],(t?`${t}.`:"")+r.toString(),i):s[r]=o))}return s}function AB(n){return(...e)=>e.reduce((t,i)=>Fg(t,i,"",n),{})}const OT=AB();function Ir(n){return qh()?(E0(n),!0):!1}function nx(){const n=new Set,e=r=>{n.delete(r)};return{on:r=>{n.add(r);const o=()=>e(r);return Ir(o),{off:o}},off:e,trigger:(...r)=>Promise.all(Array.from(n).map(o=>o(...r))),clear:()=>{n.clear()}}}const gm=new WeakMap,CB=(...n)=>{var e;const t=n[0],i=(e=Rn())==null?void 0:e.proxy;if(i==null&&!Ic())throw new Error("injectLocal must be called in setup");return i&&gm.has(i)&&t in gm.get(i)?gm.get(i)[t]:_n(...n)},Yc=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const NT=n=>n!=null,RB=Object.prototype.toString,Ph=n=>RB.call(n)==="[object Object]",is=()=>{},PB=(n,e)=>Object.prototype.hasOwnProperty.call(n,e);function UT(...n){if(n.length!==1)return yS(...n);const e=n[0];return typeof e=="function"?Fi(P0(()=>({get:e,set:is}))):nt(e)}function N_(n,e){function t(...i){return new Promise((s,r)=>{Promise.resolve(n(()=>e.apply(this,i),{fn:e,thisArg:this,args:i})).then(s).catch(r)})}return t}const FT=n=>n();function kT(n,e={}){let t,i,s=is;const r=l=>{clearTimeout(l),s(),s=is};let o;return l=>{const c=rt(n),u=rt(e.maxWait);return t&&r(t),c<=0||u!==void 0&&u<=0?(i&&(r(i),i=null),Promise.resolve(l())):new Promise((f,h)=>{s=e.rejectOnCancel?h:f,o=l,u&&!i&&(i=setTimeout(()=>{t&&r(t),i=null,f(o())},u)),t=setTimeout(()=>{i&&r(i),i=null,f(l())},c)})}}function IB(...n){let e=0,t,i=!0,s=is,r,o,a,l,c;!Lt(n[0])&&typeof n[0]=="object"?{delay:o,trailing:a=!0,leading:l=!0,rejectOnCancel:c=!1}=n[0]:[o,a=!0,l=!0,c=!1]=n;const u=()=>{t&&(clearTimeout(t),t=void 0,s(),s=is)};return h=>{const d=rt(o),p=Date.now()-e,_=()=>r=h();return u(),d<=0?(e=Date.now(),_()):(p>d&&(l||!i)?(e=Date.now(),_()):a&&(r=new Promise((g,m)=>{s=c?m:g,t=setTimeout(()=>{e=Date.now(),i=!0,g(_()),u()},Math.max(0,d-p))})),!l&&!t&&(t=setTimeout(()=>i=!0,d)),i=!1,r)}}function LB(n=FT,e={}){const{initialState:t="active"}=e,i=UT(t==="active");function s(){i.value=!1}function r(){i.value=!0}const o=(...a)=>{i.value&&n(...a)};return{isActive:Fi(i),pause:s,resume:r,eventFilter:o}}function DB(n){let e;function t(){return e||(e=n()),e}return t.reset=async()=>{const i=e;e=void 0,i&&await i},t}function OB(n,e){var t;if(typeof n=="number")return n+e;const i=((t=n.match(/^-?\d+\.?\d*/))==null?void 0:t[0])||"",s=n.slice(i.length),r=Number.parseFloat(i)+e;return Number.isNaN(r)?n:r+s}function Fl(n){return n.endsWith("rem")?Number.parseFloat(n)*16:Number.parseFloat(n)}function kl(n){return Array.isArray(n)?n:[n]}function BT(n){return Rn()}function U_(n,e=200,t={}){return N_(kT(e,t),n)}function IG(n,e=200,t={}){const i=nt(rt(n)),s=U_(()=>{i.value=n.value},e,t);return Ke(n,()=>s()),mS(i)}function NB(n,e=200,t=!1,i=!0,s=!1){return N_(IB(e,t,i,s),n)}function zT(n,e,t={}){const{eventFilter:i=FT,...s}=t;return Ke(n,N_(i,e),s)}function UB(n,e,t={}){const{eventFilter:i,initialState:s="active",...r}=t,{eventFilter:o,pause:a,resume:l,isActive:c}=LB(i,{initialState:s});return{stop:zT(n,e,{...r,eventFilter:o}),pause:a,resume:l,isActive:c}}function Xa(n,e=!0,t){BT()?Gn(n,t):e?n():Ar(n)}function FB(n,e){BT()&&rs(n,e)}function kB(n,e,t={}){const{immediate:i=!0,immediateCallback:s=!1}=t,r=Oe(!1);let o=null;function a(){o&&(clearTimeout(o),o=null)}function l(){r.value=!1,a()}function c(...u){s&&n(),a(),r.value=!0,o=setTimeout(()=>{r.value=!1,o=null,n(...u)},rt(e))}return i&&(r.value=!0,Yc&&c()),Ir(l),{isPending:mS(r),start:c,stop:l}}function LG(n,e,t={}){const{debounce:i=0,maxWait:s=void 0,...r}=t;return zT(n,e,{...r,eventFilter:kT(i,{maxWait:s})})}function BB(n,e,t){return Ke(n,e,{...t,immediate:!0})}const Hn=Yc?window:void 0,zB=Yc?window.document:void 0,F_=Yc?window.navigator:void 0;function ei(n){var e;const t=rt(n);return(e=t==null?void 0:t.$el)!=null?e:t}function Ot(...n){const e=[],t=()=>{e.forEach(a=>a()),e.length=0},i=(a,l,c,u)=>(a.addEventListener(l,c,u),()=>a.removeEventListener(l,c,u)),s=Ee(()=>{const a=kl(rt(n[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0}),r=BB(()=>{var a,l;return[(l=(a=s.value)==null?void 0:a.map(c=>ei(c)))!=null?l:[Hn].filter(c=>c!=null),kl(rt(s.value?n[1]:n[0])),kl(Ft(s.value?n[2]:n[1])),rt(s.value?n[3]:n[2])]},([a,l,c,u])=>{if(t(),!(a!=null&&a.length)||!(l!=null&&l.length)||!(c!=null&&c.length))return;const f=Ph(u)?{...u}:u;e.push(...a.flatMap(h=>l.flatMap(d=>c.map(p=>i(h,d,p,f)))))},{flush:"post"}),o=()=>{r(),t()};return Ir(t),o}function VB(){const n=Oe(!1),e=Rn();return e&&Gn(()=>{n.value=!0},e),n}function Lo(n){const e=VB();return Ee(()=>(e.value,!!n()))}function VT(n,e,t={}){const{window:i=Hn,...s}=t;let r;const o=Lo(()=>i&&"MutationObserver"in i),a=()=>{r&&(r.disconnect(),r=void 0)},l=Ee(()=>{const h=rt(n),d=kl(h).map(ei).filter(NT);return new Set(d)}),c=Ke(()=>l.value,h=>{a(),o.value&&h.size&&(r=new MutationObserver(e),h.forEach(d=>r.observe(d,s)))},{immediate:!0,flush:"post"}),u=()=>r==null?void 0:r.takeRecords(),f=()=>{c(),a()};return Ir(f),{isSupported:o,stop:f,takeRecords:u}}const HB=Symbol("vueuse-ssr-width");function HT(){const n=Ic()?CB(HB,null):null;return typeof n=="number"?n:void 0}function co(n,e={}){const{window:t=Hn,ssrWidth:i=HT()}=e,s=Lo(()=>t&&"matchMedia"in t&&typeof t.matchMedia=="function"),r=Oe(typeof i=="number"),o=Oe(),a=Oe(!1),l=c=>{a.value=c.matches};return Lc(()=>{if(r.value){r.value=!s.value;const c=rt(n).split(",");a.value=c.some(u=>{const f=u.includes("not all"),h=u.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),d=u.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let p=!!(h||d);return h&&p&&(p=i>=Fl(h[1])),d&&p&&(p=i<=Fl(d[1])),f?!p:p});return}s.value&&(o.value=t.matchMedia(rt(n)),a.value=o.value.matches)}),Ot(o,"change",l,{passive:!0}),Ee(()=>a.value)}const DG={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};function OG(n,e={}){function t(d,p){let _=rt(n[rt(d)]);return p!=null&&(_=OB(_,p)),typeof _=="number"&&(_=`${_}px`),_}const{window:i=Hn,strategy:s="min-width",ssrWidth:r=HT()}=e,o=typeof r=="number",a=o?Oe(!1):{value:!0};o&&Xa(()=>a.value=!!i);function l(d,p){return!a.value&&o?d==="min"?r>=Fl(p):r<=Fl(p):i?i.matchMedia(`(${d}-width: ${p})`).matches:!1}const c=d=>co(()=>`(min-width: ${t(d)})`,e),u=d=>co(()=>`(max-width: ${t(d)})`,e),f=Object.keys(n).reduce((d,p)=>(Object.defineProperty(d,p,{get:()=>s==="min-width"?c(p):u(p),enumerable:!0,configurable:!0}),d),{});function h(){const d=Object.keys(n).map(p=>[p,f[p],Fl(t(p))]).sort((p,_)=>p[2]-_[2]);return Ee(()=>d.filter(([,p])=>p.value).map(([p])=>p))}return Object.assign(f,{greaterOrEqual:c,smallerOrEqual:u,greater(d){return co(()=>`(min-width: ${t(d,.1)})`,e)},smaller(d){return co(()=>`(max-width: ${t(d,-.1)})`,e)},between(d,p){return co(()=>`(min-width: ${t(d)}) and (max-width: ${t(p,-.1)})`,e)},isGreater(d){return l("min",t(d,.1))},isGreaterOrEqual(d){return l("min",t(d))},isSmaller(d){return l("max",t(d,-.1))},isSmallerOrEqual(d){return l("max",t(d))},isInBetween(d,p){return l("min",t(d))&&l("max",t(p,-.1))},current:h,active(){const d=h();return Ee(()=>d.value.length===0?"":d.value.at(s==="min-width"?-1:0))}})}function kg(n,e={}){const{controls:t=!1,navigator:i=F_}=e,s=Lo(()=>i&&"permissions"in i),r=Oe(),o=typeof n=="string"?{name:n}:n,a=Oe(),l=()=>{var u,f;a.value=(f=(u=r.value)==null?void 0:u.state)!=null?f:"prompt"};Ot(r,"change",l,{passive:!0});const c=DB(async()=>{if(s.value){if(!r.value)try{r.value=await i.permissions.query(o)}catch{r.value=void 0}finally{l()}if(t)return ht(r.value)}});return c(),t?{state:a,isSupported:s,query:c}:a}function NG(n={}){const{navigator:e=F_,read:t=!1,source:i,copiedDuring:s=1500,legacy:r=!1}=n,o=Lo(()=>e&&"clipboard"in e),a=kg("clipboard-read"),l=kg("clipboard-write"),c=Ee(()=>o.value||r),u=Oe(""),f=Oe(!1),h=kB(()=>f.value=!1,s,{immediate:!1});async function d(){let v=!(o.value&&m(a.value));if(!v)try{u.value=await e.clipboard.readText()}catch{v=!0}v&&(u.value=g())}c.value&&t&&Ot(["copy","cut"],d,{passive:!0});async function p(v=rt(i)){if(c.value&&v!=null){let b=!(o.value&&m(l.value));if(!b)try{await e.clipboard.writeText(v)}catch{b=!0}b&&_(v),u.value=v,f.value=!0,h.start()}}function _(v){const b=document.createElement("textarea");b.value=v??"",b.style.position="absolute",b.style.opacity="0",document.body.appendChild(b),b.select(),document.execCommand("copy"),b.remove()}function g(){var v,b,y;return(y=(b=(v=document==null?void 0:document.getSelection)==null?void 0:v.call(document))==null?void 0:b.toString())!=null?y:""}function m(v){return v==="granted"||v==="prompt"}return{isSupported:c,text:u,copied:f,copy:p}}const rf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},of="__vueuse_ssr_handlers__",GB=WB();function WB(){return of in rf||(rf[of]=rf[of]||{}),rf[of]}function GT(n,e){return GB[n]||e}function XB(n){return co("(prefers-color-scheme: dark)",n)}function $B(n){return n==null?"any":n instanceof Set?"set":n instanceof Map?"map":n instanceof Date?"date":typeof n=="boolean"?"boolean":typeof n=="string"?"string":typeof n=="object"?"object":Number.isNaN(n)?"any":"number"}const qB={boolean:{read:n=>n==="true",write:n=>String(n)},object:{read:n=>JSON.parse(n),write:n=>JSON.stringify(n)},number:{read:n=>Number.parseFloat(n),write:n=>String(n)},any:{read:n=>n,write:n=>String(n)},string:{read:n=>n,write:n=>String(n)},map:{read:n=>new Map(JSON.parse(n)),write:n=>JSON.stringify(Array.from(n.entries()))},set:{read:n=>new Set(JSON.parse(n)),write:n=>JSON.stringify(Array.from(n))},date:{read:n=>new Date(n),write:n=>n.toISOString()}},ix="vueuse-storage";function WT(n,e,t,i={}){var s;const{flush:r="pre",deep:o=!0,listenToStorageChanges:a=!0,writeDefaults:l=!0,mergeDefaults:c=!1,shallow:u,window:f=Hn,eventFilter:h,onError:d=V=>{console.error(V)},initOnMounted:p}=i,_=(u?Oe:nt)(typeof e=="function"?e():e),g=Ee(()=>rt(n));if(!t)try{t=GT("getDefaultStorage",()=>{var V;return(V=Hn)==null?void 0:V.localStorage})()}catch(V){d(V)}if(!t)return _;const m=rt(e),v=$B(m),b=(s=i.serializer)!=null?s:qB[v],{pause:y,resume:T}=UB(_,()=>E(_.value),{flush:r,deep:o,eventFilter:h});Ke(g,()=>B(),{flush:r});let w=!1;const S=V=>{p&&!w||B(V)},P=V=>{p&&!w||z(V)};f&&a&&(t instanceof Storage?Ot(f,"storage",S,{passive:!0}):Ot(f,ix,P)),p?Xa(()=>{w=!0,B()}):B();function M(V,Q){if(f){const j={key:g.value,oldValue:V,newValue:Q,storageArea:t};f.dispatchEvent(t instanceof Storage?new StorageEvent("storage",j):new CustomEvent(ix,{detail:j}))}}function E(V){try{const Q=t.getItem(g.value);if(V==null)M(Q,null),t.removeItem(g.value);else{const j=b.write(V);Q!==j&&(t.setItem(g.value,j),M(Q,j))}}catch(Q){d(Q)}}function D(V){const Q=V?V.newValue:t.getItem(g.value);if(Q==null)return l&&m!=null&&t.setItem(g.value,b.write(m)),m;if(!V&&c){const j=b.read(Q);return typeof c=="function"?c(j,m):v==="object"&&!Array.isArray(j)?{...m,...j}:j}else return typeof Q!="string"?Q:b.read(Q)}function B(V){if(!(V&&V.storageArea!==t)){if(V&&V.key==null){_.value=m;return}if(!(V&&V.key!==g.value)){y();try{(V==null?void 0:V.newValue)!==b.write(_.value)&&(_.value=D(V))}catch(Q){d(Q)}finally{V?Ar(T):T()}}}}function z(V){B(V.detail)}return _}const YB="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function jB(n={}){const{selector:e="html",attribute:t="class",initialValue:i="auto",window:s=Hn,storage:r,storageKey:o="vueuse-color-scheme",listenToStorageChanges:a=!0,storageRef:l,emitAuto:c,disableTransition:u=!0}=n,f={auto:"",light:"light",dark:"dark",...n.modes||{}},h=XB({window:s}),d=Ee(()=>h.value?"dark":"light"),p=l||(o==null?UT(i):WT(o,i,r,{window:s,listenToStorageChanges:a})),_=Ee(()=>p.value==="auto"?d.value:p.value),g=GT("updateHTMLAttrs",(y,T,w)=>{const S=typeof y=="string"?s==null?void 0:s.document.querySelector(y):ei(y);if(!S)return;const P=new Set,M=new Set;let E=null;if(T==="class"){const B=w.split(/\s/g);Object.values(f).flatMap(z=>(z||"").split(/\s/g)).filter(Boolean).forEach(z=>{B.includes(z)?P.add(z):M.add(z)})}else E={key:T,value:w};if(P.size===0&&M.size===0&&E===null)return;let D;u&&(D=s.document.createElement("style"),D.appendChild(document.createTextNode(YB)),s.document.head.appendChild(D));for(const B of P)S.classList.add(B);for(const B of M)S.classList.remove(B);E&&S.setAttribute(E.key,E.value),u&&(s.getComputedStyle(D).opacity,document.head.removeChild(D))});function m(y){var T;g(e,t,(T=f[y])!=null?T:y)}function v(y){n.onChanged?n.onChanged(y,m):m(y)}Ke(_,v,{flush:"post",immediate:!0}),Xa(()=>v(_.value));const b=Ee({get(){return c?p.value:_.value},set(y){p.value=y}});return Object.assign(b,{store:p,system:d,state:_})}function af(n,e,t={}){const{window:i=Hn,initialValue:s,observe:r=!1}=t,o=Oe(s),a=Ee(()=>{var c;return ei(e)||((c=i==null?void 0:i.document)==null?void 0:c.documentElement)});function l(){var c;const u=rt(n),f=rt(a);if(f&&i&&u){const h=(c=i.getComputedStyle(f).getPropertyValue(u))==null?void 0:c.trim();o.value=h||o.value||s}}return r&&VT(a,l,{attributeFilter:["style","class"],window:i}),Ke([a,()=>rt(n)],(c,u)=>{u[0]&&u[1]&&u[0].style.removeProperty(u[1]),l()},{immediate:!0}),Ke([o,a],([c,u])=>{const f=rt(n);u!=null&&u.style&&f&&(c==null?u.style.removeProperty(f):u.style.setProperty(f,c))},{immediate:!0}),o}function KB(n={}){const{valueDark:e="dark",valueLight:t=""}=n,i=jB({...n,onChanged:(o,a)=>{var l;n.onChanged?(l=n.onChanged)==null||l.call(n,o==="dark",a,o):a(o)},modes:{dark:e,light:t}}),s=Ee(()=>i.system.value);return Ee({get(){return i.value==="dark"},set(o){const a=o?"dark":"light";s.value===a?i.value="auto":i.value=a}})}function ZB(n={}){const{navigator:e=F_,requestPermissions:t=!1,constraints:i={audio:!0,video:!0},onUpdated:s}=n,r=nt([]),o=Ee(()=>r.value.filter(p=>p.kind==="videoinput")),a=Ee(()=>r.value.filter(p=>p.kind==="audioinput")),l=Ee(()=>r.value.filter(p=>p.kind==="audiooutput")),c=Lo(()=>e&&e.mediaDevices&&e.mediaDevices.enumerateDevices),u=Oe(!1);let f;async function h(){c.value&&(r.value=await e.mediaDevices.enumerateDevices(),s==null||s(r.value),f&&(f.getTracks().forEach(p=>p.stop()),f=null))}async function d(){const p=i.video?"camera":"microphone";if(!c.value)return!1;if(u.value)return!0;const{state:_,query:g}=kg(p,{controls:!0});if(await g(),_.value!=="granted"){let m=!0;try{f=await e.mediaDevices.getUserMedia(i)}catch{f=null,m=!1}h(),u.value=m}else u.value=!0;return u.value}return c.value&&(t&&d(),Ot(e.mediaDevices,"devicechange",h,{passive:!0}),h()),{devices:r,ensurePermissions:d,permissionGranted:u,videoInputs:o,audioInputs:a,audioOutputs:l,isSupported:c}}function JB(n,e,t={}){const{window:i=Hn,...s}=t;let r;const o=Lo(()=>i&&"ResizeObserver"in i),a=()=>{r&&(r.disconnect(),r=void 0)},l=Ee(()=>{const f=rt(n);return Array.isArray(f)?f.map(h=>ei(h)):[ei(f)]}),c=Ke(l,f=>{if(a(),o.value&&i){r=new ResizeObserver(e);for(const h of f)h&&r.observe(h,s)}},{immediate:!0,flush:"post"}),u=()=>{a(),c()};return Ir(u),{isSupported:o,stop:u}}function UG(n,e={}){const{reset:t=!0,windowResize:i=!0,windowScroll:s=!0,immediate:r=!0,updateTiming:o="sync"}=e,a=Oe(0),l=Oe(0),c=Oe(0),u=Oe(0),f=Oe(0),h=Oe(0),d=Oe(0),p=Oe(0);function _(){const m=ei(n);if(!m){t&&(a.value=0,l.value=0,c.value=0,u.value=0,f.value=0,h.value=0,d.value=0,p.value=0);return}const v=m.getBoundingClientRect();a.value=v.height,l.value=v.bottom,c.value=v.left,u.value=v.right,f.value=v.top,h.value=v.width,d.value=v.x,p.value=v.y}function g(){o==="sync"?_():o==="next-frame"&&requestAnimationFrame(()=>_())}return JB(n,g),Ke(()=>ei(n),m=>!m&&g()),VT(n,g,{attributeFilter:["style","class"]}),s&&Ot("scroll",g,{capture:!0,passive:!0}),i&&Ot("resize",g,{passive:!0}),Xa(()=>{r&&g()}),{height:a,bottom:l,left:c,right:u,top:f,width:h,x:d,y:p,update:g}}function QB(n,e,t={}){const{root:i,rootMargin:s="0px",threshold:r=0,window:o=Hn,immediate:a=!0}=t,l=Lo(()=>o&&"IntersectionObserver"in o),c=Ee(()=>{const p=rt(n);return kl(p).map(ei).filter(NT)});let u=is;const f=Oe(a),h=l.value?Ke(()=>[c.value,ei(i),f.value],([p,_])=>{if(u(),!f.value||!p.length)return;const g=new IntersectionObserver(e,{root:ei(_),rootMargin:s,threshold:r});p.forEach(m=>m&&g.observe(m)),u=()=>{g.disconnect(),u=is}},{immediate:a,flush:"post"}):is,d=()=>{u(),h(),f.value=!1};return Ir(d),{isSupported:l,isActive:f,pause(){u(),f.value=!1},resume(){f.value=!0},stop:d}}const e4={multiple:!0,accept:"*",reset:!1,directory:!1};function t4(n){if(!n)return null;if(n instanceof FileList)return n;const e=new DataTransfer;for(const t of n)e.items.add(t);return e.files}function FG(n={}){const{document:e=zB}=n,t=nt(t4(n.initialFiles)),{on:i,trigger:s}=nx(),{on:r,trigger:o}=nx();let a;e&&(a=ei(n.input)||e.createElement("input"),a.type="file",a.onchange=u=>{const f=u.target;t.value=f.files,s(t.value)},a.oncancel=()=>{o()});const l=()=>{t.value=null,a&&a.value&&(a.value="",s(null))},c=u=>{if(!a)return;const f={...e4,...n,...u};a.multiple=f.multiple,a.accept=f.accept,a.webkitdirectory=f.directory,PB(f,"capture")&&(a.capture=f.capture),f.reset&&l(),a.click()};return{files:Fi(t),open:c,reset:l,onCancel:r,onChange:i}}const sx=1;function kG(n,e={}){const{throttle:t=0,idle:i=200,onStop:s=is,onScroll:r=is,offset:o={left:0,right:0,top:0,bottom:0},eventListenerOptions:a={capture:!1,passive:!0},behavior:l="auto",window:c=Hn,onError:u=S=>{console.error(S)}}=e,f=Oe(0),h=Oe(0),d=Ee({get(){return f.value},set(S){_(S,void 0)}}),p=Ee({get(){return h.value},set(S){_(void 0,S)}});function _(S,P){var M,E,D,B;if(!c)return;const z=rt(n);if(!z)return;(D=z instanceof Document?c.document.body:z)==null||D.scrollTo({top:(M=rt(P))!=null?M:p.value,left:(E=rt(S))!=null?E:d.value,behavior:rt(l)});const V=((B=z==null?void 0:z.document)==null?void 0:B.documentElement)||(z==null?void 0:z.documentElement)||z;d!=null&&(f.value=V.scrollLeft),p!=null&&(h.value=V.scrollTop)}const g=Oe(!1),m=xi({left:!0,right:!1,top:!0,bottom:!1}),v=xi({left:!1,right:!1,top:!1,bottom:!1}),b=S=>{g.value&&(g.value=!1,v.left=!1,v.right=!1,v.top=!1,v.bottom=!1,s(S))},y=U_(b,t+i),T=S=>{var P;if(!c)return;const M=((P=S==null?void 0:S.document)==null?void 0:P.documentElement)||(S==null?void 0:S.documentElement)||ei(S),{display:E,flexDirection:D,direction:B}=getComputedStyle(M),z=B==="rtl"?-1:1,V=M.scrollLeft;v.left=Vf.value;const Q=Math.abs(V*z)<=(o.left||0),j=Math.abs(V*z)+M.clientWidth>=M.scrollWidth-(o.right||0)-sx;E==="flex"&&D==="row-reverse"?(m.left=j,m.right=Q):(m.left=Q,m.right=j),f.value=V;let te=M.scrollTop;S===c.document&&!te&&(te=c.document.body.scrollTop),v.top=teh.value;const Z=Math.abs(te)<=(o.top||0),pe=Math.abs(te)+M.clientHeight>=M.scrollHeight-(o.bottom||0)-sx;E==="flex"&&D==="column-reverse"?(m.top=pe,m.bottom=Z):(m.top=Z,m.bottom=pe),h.value=te},w=S=>{var P;if(!c)return;const M=(P=S.target.documentElement)!=null?P:S.target;T(M),g.value=!0,y(S),r(S)};return Ot(n,"scroll",t?NB(w,t,!0,!1):w,a),Xa(()=>{try{const S=rt(n);if(!S)return;T(S)}catch(S){u(S)}}),Ot(n,"scrollend",b,a),{x:d,y:p,isScrolling:g,arrivedState:m,directions:v,measure(){const S=rt(n);c&&S&&T(S)}}}function ys(n,e,t={}){const{window:i=Hn}=t;return WT(n,e,i==null?void 0:i.localStorage,t)}const n4={page:n=>[n.pageX,n.pageY],client:n=>[n.clientX,n.clientY],screen:n=>[n.screenX,n.screenY],movement:n=>n instanceof MouseEvent?[n.movementX,n.movementY]:null};function BG(n={}){const{type:e="page",touch:t=!0,resetOnTouchEnds:i=!1,initialValue:s={x:0,y:0},window:r=Hn,target:o=r,scroll:a=!0,eventFilter:l}=n;let c=null,u=0,f=0;const h=Oe(s.x),d=Oe(s.y),p=Oe(null),_=typeof e=="function"?e:n4[e],g=S=>{const P=_(S);c=S,P&&([h.value,d.value]=P,p.value="mouse"),r&&(u=r.scrollX,f=r.scrollY)},m=S=>{if(S.touches.length>0){const P=_(S.touches[0]);P&&([h.value,d.value]=P,p.value="touch")}},v=()=>{if(!c||!r)return;const S=_(c);c instanceof MouseEvent&&S&&(h.value=S[0]+r.scrollX-u,d.value=S[1]+r.scrollY-f)},b=()=>{h.value=s.x,d.value=s.y},y=l?S=>l(()=>g(S),{}):S=>g(S),T=l?S=>l(()=>m(S),{}):S=>m(S),w=l?()=>l(()=>v(),{}):()=>v();if(o){const S={passive:!0};Ot(o,["mousemove","dragover"],y,S),t&&e!=="movement"&&(Ot(o,["touchstart","touchmove"],T,S),i&&Ot(o,"touchend",b,S)),a&&e==="page"&&Ot(r,"scroll",w,S)}return{x:h,y:d,sourceType:p}}function zG(n){const e=Oe(),t=()=>{e.value&&URL.revokeObjectURL(e.value),e.value=void 0};return Ke(()=>rt(n),i=>{t(),i&&(e.value=URL.createObjectURL(i))},{immediate:!0}),Ir(t),Fi(e)}const rx="--vueuse-safe-area-top",ox="--vueuse-safe-area-right",ax="--vueuse-safe-area-bottom",lx="--vueuse-safe-area-left";function VG(){const n=Oe(""),e=Oe(""),t=Oe(""),i=Oe("");if(Yc){const r=af(rx),o=af(ox),a=af(ax),l=af(lx);r.value="env(safe-area-inset-top, 0px)",o.value="env(safe-area-inset-right, 0px)",a.value="env(safe-area-inset-bottom, 0px)",l.value="env(safe-area-inset-left, 0px)",s(),Ot("resize",U_(s),{passive:!0})}function s(){n.value=lf(rx),e.value=lf(ox),t.value=lf(ax),i.value=lf(lx)}return{top:n,right:e,bottom:t,left:i,update:s}}function lf(n){return getComputedStyle(document.documentElement).getPropertyValue(n)}function HG(n,e,t){const{window:i=Hn}={},s=nt(null),r=Oe(),o=(...l)=>{r.value&&r.value.postMessage(...l)},a=function(){r.value&&r.value.terminate()};return i&&(r.value=new Worker(n,e),r.value.onmessage=l=>{s.value=l.data},Ir(()=>{r.value&&r.value.terminate()})),{data:s,post:o,terminate:a,worker:r}}function GG(n={}){const{window:e=Hn,initialWidth:t=Number.POSITIVE_INFINITY,initialHeight:i=Number.POSITIVE_INFINITY,listenOrientation:s=!0,includeScrollbar:r=!0,type:o="inner"}=n,a=Oe(t),l=Oe(i),c=()=>{if(e)if(o==="outer")a.value=e.outerWidth,l.value=e.outerHeight;else if(o==="visual"&&e.visualViewport){const{width:f,height:h,scale:d}=e.visualViewport;a.value=Math.round(f*d),l.value=Math.round(h*d)}else r?(a.value=e.innerWidth,l.value=e.innerHeight):(a.value=e.document.documentElement.clientWidth,l.value=e.document.documentElement.clientHeight)};c(),Xa(c);const u={passive:!0};if(Ot("resize",c,u),e&&o==="visual"&&e.visualViewport&&Ot(e.visualViewport,"resize",c,u),s){const f=co("(orientation: portrait)");Ke(f,()=>c())}return{width:a,height:l}}const XT=1/60*1e3,i4=typeof performance<"u"?()=>performance.now():()=>Date.now(),$T=typeof window<"u"?n=>window.requestAnimationFrame(n):n=>setTimeout(()=>n(i4()),XT);function s4(n){let e=[],t=[],i=0,s=!1,r=!1;const o=new WeakSet,a={schedule:(l,c=!1,u=!1)=>{const f=u&&s,h=f?e:t;return c&&o.add(l),h.indexOf(l)===-1&&(h.push(l),f&&s&&(i=e.length)),l},cancel:l=>{const c=t.indexOf(l);c!==-1&&t.splice(c,1),o.delete(l)},process:l=>{if(s){r=!0;return}if(s=!0,[e,t]=[t,e],t.length=0,i=e.length,i)for(let c=0;c(n[e]=s4(()=>xc=!0),n),{}),Vg=jc.reduce((n,e)=>{const t=Vd[e];return n[e]=(i,s=!1,r=!1)=>(xc||l4(),t.schedule(i,s,r)),n},{}),o4=jc.reduce((n,e)=>(n[e]=Vd[e].cancel,n),{});jc.reduce((n,e)=>(n[e]=()=>Vd[e].process(va),n),{});const a4=n=>Vd[n].process(va),qT=n=>{xc=!1,va.delta=Bg?XT:Math.max(Math.min(n-va.timestamp,r4),1),va.timestamp=n,zg=!0,jc.forEach(a4),zg=!1,xc&&(Bg=!1,$T(qT))},l4=()=>{xc=!0,Bg=!0,zg||$T(qT)},YT=()=>va;function jT(n,e){var t={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&e.indexOf(i)<0&&(t[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(n);sMath.min(Math.max(t,n),e),_m=.001,c4=.01,u4=10,f4=.05,h4=1;function d4({duration:n=800,bounce:e=.25,velocity:t=0,mass:i=1}){let s,r,o=1-e;o=Hg(f4,h4,o),n=Hg(c4,u4,n/1e3),o<1?(s=c=>{const u=c*o,f=u*n,h=u-t,d=Gg(c,o),p=Math.exp(-f);return _m-h/d*p},r=c=>{const f=c*o*n,h=f*t+t,d=Math.pow(o,2)*Math.pow(c,2)*n,p=Math.exp(-f),_=Gg(Math.pow(c,2),o);return(-s(c)+_m>0?-1:1)*((h-d)*p)/_}):(s=c=>{const u=Math.exp(-c*n),f=(c-t)*n+1;return-_m+u*f},r=c=>{const u=Math.exp(-c*n),f=(t-c)*(n*n);return u*f});const a=5/n,l=m4(s,r,a);if(n=n*1e3,isNaN(l))return{stiffness:100,damping:10,duration:n};{const c=Math.pow(l,2)*i;return{stiffness:c,damping:o*2*Math.sqrt(i*c),duration:n}}}const p4=12;function m4(n,e,t){let i=t;for(let s=1;sn[t]!==void 0)}function v4(n){let e=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},n);if(!ux(n,_4)&&ux(n,g4)){const t=d4(n);e=Object.assign(Object.assign(Object.assign({},e),t),{velocity:0,mass:1}),e.isResolvedFromDuration=!0}return e}function k_(n){var{from:e=0,to:t=1,restSpeed:i=2,restDelta:s}=n,r=jT(n,["from","to","restSpeed","restDelta"]);const o={done:!1,value:e};let{stiffness:a,damping:l,mass:c,velocity:u,duration:f,isResolvedFromDuration:h}=v4(r),d=fx,p=fx;function _(){const g=u?-(u/1e3):0,m=t-e,v=l/(2*Math.sqrt(a*c)),b=Math.sqrt(a/c)/1e3;if(s===void 0&&(s=Math.min(Math.abs(t-e)/100,.4)),v<1){const y=Gg(b,v);d=T=>{const w=Math.exp(-v*b*T);return t-w*((g+v*b*m)/y*Math.sin(y*T)+m*Math.cos(y*T))},p=T=>{const w=Math.exp(-v*b*T);return v*b*w*(Math.sin(y*T)*(g+v*b*m)/y+m*Math.cos(y*T))-w*(Math.cos(y*T)*(g+v*b*m)-y*m*Math.sin(y*T))}}else if(v===1)d=y=>t-Math.exp(-b*y)*(m+(g+b*m)*y);else{const y=b*Math.sqrt(v*v-1);d=T=>{const w=Math.exp(-v*b*T),S=Math.min(y*T,300);return t-w*((g+v*b*m)*Math.sinh(S)+y*m*Math.cosh(S))/y}}}return _(),{next:g=>{const m=d(g);if(h)o.done=g>=f;else{const v=p(g)*1e3,b=Math.abs(v)<=i,y=Math.abs(t-m)<=s;o.done=b&&y}return o.value=o.done?t:m,o},flipTarget:()=>{u=-u,[e,t]=[t,e],_()}}}k_.needsInterpolation=(n,e)=>typeof n=="string"||typeof e=="string";const fx=n=>0,KT=(n,e,t)=>{const i=e-n;return i===0?1:(t-n)/i},B_=(n,e,t)=>-t*n+t*e+n,ZT=(n,e)=>t=>Math.max(Math.min(t,e),n),Bl=n=>n%1?Number(n.toFixed(5)):n,Mc=/(-)?([\d]*\.?[\d])+/g,Wg=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,y4=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Kc(n){return typeof n=="string"}const Zc={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},zl=Object.assign(Object.assign({},Zc),{transform:ZT(0,1)}),cf=Object.assign(Object.assign({},Zc),{default:1}),z_=n=>({test:e=>Kc(e)&&e.endsWith(n)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${n}`}),to=z_("deg"),Vl=z_("%"),ut=z_("px"),hx=Object.assign(Object.assign({},Vl),{parse:n=>Vl.parse(n)/100,transform:n=>Vl.transform(n*100)}),V_=(n,e)=>t=>!!(Kc(t)&&y4.test(t)&&t.startsWith(n)||e&&Object.prototype.hasOwnProperty.call(t,e)),JT=(n,e,t)=>i=>{if(!Kc(i))return i;const[s,r,o,a]=i.match(Mc);return{[n]:parseFloat(s),[e]:parseFloat(r),[t]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},po={test:V_("hsl","hue"),parse:JT("hue","saturation","lightness"),transform:({hue:n,saturation:e,lightness:t,alpha:i=1})=>"hsla("+Math.round(n)+", "+Vl.transform(Bl(e))+", "+Vl.transform(Bl(t))+", "+Bl(zl.transform(i))+")"},b4=ZT(0,255),vm=Object.assign(Object.assign({},Zc),{transform:n=>Math.round(b4(n))}),mr={test:V_("rgb","red"),parse:JT("red","green","blue"),transform:({red:n,green:e,blue:t,alpha:i=1})=>"rgba("+vm.transform(n)+", "+vm.transform(e)+", "+vm.transform(t)+", "+Bl(zl.transform(i))+")"};function x4(n){let e="",t="",i="",s="";return n.length>5?(e=n.substr(1,2),t=n.substr(3,2),i=n.substr(5,2),s=n.substr(7,2)):(e=n.substr(1,1),t=n.substr(2,1),i=n.substr(3,1),s=n.substr(4,1),e+=e,t+=t,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const Xg={test:V_("#"),parse:x4,transform:mr.transform},Yn={test:n=>mr.test(n)||Xg.test(n)||po.test(n),parse:n=>mr.test(n)?mr.parse(n):po.test(n)?po.parse(n):Xg.parse(n),transform:n=>Kc(n)?n:n.hasOwnProperty("red")?mr.transform(n):po.transform(n)},QT="${c}",ew="${n}";function M4(n){var e,t,i,s;return isNaN(n)&&Kc(n)&&((t=(e=n.match(Mc))===null||e===void 0?void 0:e.length)!==null&&t!==void 0?t:0)+((s=(i=n.match(Wg))===null||i===void 0?void 0:i.length)!==null&&s!==void 0?s:0)>0}function tw(n){typeof n=="number"&&(n=`${n}`);const e=[];let t=0;const i=n.match(Wg);i&&(t=i.length,n=n.replace(Wg,QT),e.push(...i.map(Yn.parse)));const s=n.match(Mc);return s&&(n=n.replace(Mc,ew),e.push(...s.map(Zc.parse))),{values:e,numColors:t,tokenised:n}}function nw(n){return tw(n).values}function iw(n){const{values:e,numColors:t,tokenised:i}=tw(n),s=e.length;return r=>{let o=i;for(let a=0;atypeof n=="number"?0:n;function E4(n){const e=nw(n);return iw(n)(e.map(S4))}const Jc={test:M4,parse:nw,createTransformer:iw,getAnimatableNone:E4},T4=new Set(["brightness","contrast","saturate","opacity"]);function w4(n){let[e,t]=n.slice(0,-1).split("(");if(e==="drop-shadow")return n;const[i]=t.match(Mc)||[];if(!i)return n;const s=t.replace(i,"");let r=T4.has(e)?1:0;return i!==t&&(r*=100),e+"("+r+s+")"}const A4=/([a-z-]*)\(.*?\)/g,$g=Object.assign(Object.assign({},Jc),{getAnimatableNone:n=>{const e=n.match(A4);return e?e.map(w4).join(" "):n}});function ym(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*(2/3-t)*6:n}function dx({hue:n,saturation:e,lightness:t,alpha:i}){n/=360,e/=100,t/=100;let s=0,r=0,o=0;if(!e)s=r=o=t;else{const a=t<.5?t*(1+e):t+e-t*e,l=2*t-a;s=ym(l,a,n+1/3),r=ym(l,a,n),o=ym(l,a,n-1/3)}return{red:Math.round(s*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:i}}const C4=(n,e,t)=>{const i=n*n,s=e*e;return Math.sqrt(Math.max(0,t*(s-i)+i))},R4=[Xg,mr,po],px=n=>R4.find(e=>e.test(n)),sw=(n,e)=>{let t=px(n),i=px(e),s=t.parse(n),r=i.parse(e);t===po&&(s=dx(s),t=mr),i===po&&(r=dx(r),i=mr);const o=Object.assign({},s);return a=>{for(const l in o)l!=="alpha"&&(o[l]=C4(s[l],r[l],a));return o.alpha=B_(s.alpha,r.alpha,a),t.transform(o)}},P4=n=>typeof n=="number",I4=(n,e)=>t=>e(n(t)),rw=(...n)=>n.reduce(I4);function ow(n,e){return P4(n)?t=>B_(n,e,t):Yn.test(n)?sw(n,e):lw(n,e)}const aw=(n,e)=>{const t=[...n],i=t.length,s=n.map((r,o)=>ow(r,e[o]));return r=>{for(let o=0;o{const t=Object.assign(Object.assign({},n),e),i={};for(const s in t)n[s]!==void 0&&e[s]!==void 0&&(i[s]=ow(n[s],e[s]));return s=>{for(const r in i)t[r]=i[r](s);return t}};function mx(n){const e=Jc.parse(n),t=e.length;let i=0,s=0,r=0;for(let o=0;o{const t=Jc.createTransformer(e),i=mx(n),s=mx(e);return i.numHSL===s.numHSL&&i.numRGB===s.numRGB&&i.numNumbers>=s.numNumbers?rw(aw(i.parsed,s.parsed),t):o=>`${o>0?e:n}`},D4=(n,e)=>t=>B_(n,e,t);function O4(n){if(typeof n=="number")return D4;if(typeof n=="string")return Yn.test(n)?sw:lw;if(Array.isArray(n))return aw;if(typeof n=="object")return L4}function N4(n,e,t){const i=[],s=t||O4(n[0]),r=n.length-1;for(let o=0;ot(KT(n,e,i))}function F4(n,e){const t=n.length,i=t-1;return s=>{let r=0,o=!1;if(s<=n[0]?o=!0:s>=n[i]&&(r=i-1,o=!0),!o){let l=1;for(;ls||l===i);l++);r=l-1}const a=KT(n[r],n[r+1],s);return e[r](a)}}function cw(n,e,{clamp:t=!0,ease:i,mixer:s}={}){const r=n.length;cx(r===e.length),cx(!i||!Array.isArray(i)||i.length===r-1),n[0]>n[r-1]&&(n=[].concat(n),e=[].concat(e),n.reverse(),e.reverse());const o=N4(e,i,s),a=r===2?U4(n,o):F4(n,o);return t?l=>a(Hg(n[0],n[r-1],l)):a}const Hd=n=>e=>1-n(1-e),H_=n=>e=>e<=.5?n(2*e)/2:(2-n(2*(1-e)))/2,k4=n=>e=>Math.pow(e,n),uw=n=>e=>e*e*((n+1)*e-n),B4=n=>{const e=uw(n);return t=>(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))},fw=1.525,z4=4/11,V4=8/11,H4=9/10,hw=n=>n,G_=k4(2),G4=Hd(G_),dw=H_(G_),pw=n=>1-Math.sin(Math.acos(n)),mw=Hd(pw),W4=H_(mw),W_=uw(fw),X4=Hd(W_),$4=H_(W_),q4=B4(fw),Y4=4356/361,j4=35442/1805,K4=16061/1805,Ih=n=>{if(n===1||n===0)return n;const e=n*n;return nn<.5?.5*(1-Ih(1-n*2)):.5*Ih(n*2-1)+.5;function Q4(n,e){return n.map(()=>e||dw).splice(0,n.length-1)}function e5(n){const e=n.length;return n.map((t,i)=>i!==0?i/(e-1):0)}function t5(n,e){return n.map(t=>t*e)}function Cf({from:n=0,to:e=1,ease:t,offset:i,duration:s=300}){const r={done:!1,value:n},o=Array.isArray(e)?e:[n,e],a=t5(i&&i.length===o.length?i:e5(o),s);function l(){return cw(a,o,{ease:Array.isArray(t)?t:Q4(o,t)})}let c=l();return{next:u=>(r.value=c(u),r.done=u>=s,r),flipTarget:()=>{o.reverse(),c=l()}}}function n5({velocity:n=0,from:e=0,power:t=.8,timeConstant:i=350,restDelta:s=.5,modifyTarget:r}){const o={done:!1,value:e};let a=t*n;const l=e+a,c=r===void 0?l:r(l);return c!==l&&(a=c-e),{next:u=>{const f=-a*Math.exp(-u/i);return o.done=!(f>s||f<-s),o.value=o.done?c:c+f,o},flipTarget:()=>{}}}const gx={keyframes:Cf,spring:k_,decay:n5};function i5(n){if(Array.isArray(n.to))return Cf;if(gx[n.type])return gx[n.type];const e=new Set(Object.keys(n));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Cf:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?k_:Cf}function gw(n,e,t=0){return n-e-t}function s5(n,e,t=0,i=!0){return i?gw(e+-n,e,t):e-(n-e)+t}function r5(n,e,t,i){return i?n>=e+t:n<=-t}const o5=n=>{const e=({delta:t})=>n(t);return{start:()=>Vg.update(e,!0),stop:()=>o4.update(e)}};function _w(n){var e,t,{from:i,autoplay:s=!0,driver:r=o5,elapsed:o=0,repeat:a=0,repeatType:l="loop",repeatDelay:c=0,onPlay:u,onStop:f,onComplete:h,onRepeat:d,onUpdate:p}=n,_=jT(n,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]);let{to:g}=_,m,v=0,b=_.duration,y,T=!1,w=!0,S;const P=i5(_);!((t=(e=P).needsInterpolation)===null||t===void 0)&&t.call(e,i,g)&&(S=cw([0,100],[i,g],{clamp:!1}),i=0,g=100);const M=P(Object.assign(Object.assign({},_),{from:i,to:g}));function E(){v++,l==="reverse"?(w=v%2===0,o=s5(o,b,c,w)):(o=gw(o,b,c),l==="mirror"&&M.flipTarget()),T=!1,d&&d()}function D(){m.stop(),h&&h()}function B(V){if(w||(V=-V),o+=V,!T){const Q=M.next(Math.max(0,o));y=Q.value,S&&(y=S(y)),T=w?Q.done:o<=0}p==null||p(y),T&&(v===0&&(b??(b=o)),v{f==null||f(),m.stop()}}}function vw(n,e){return e?n*(1e3/e):0}function a5({from:n=0,velocity:e=0,min:t,max:i,power:s=.8,timeConstant:r=750,bounceStiffness:o=500,bounceDamping:a=10,restDelta:l=1,modifyTarget:c,driver:u,onUpdate:f,onComplete:h,onStop:d}){let p;function _(b){return t!==void 0&&bi}function g(b){return t===void 0?i:i===void 0||Math.abs(t-b){var T;f==null||f(y),(T=b.onUpdate)===null||T===void 0||T.call(b,y)},onComplete:h,onStop:d}))}function v(b){m(Object.assign({type:"spring",stiffness:o,damping:a,restDelta:l},b))}if(_(n))v({from:n,velocity:e,to:g(n)});else{let b=s*e+n;typeof c<"u"&&(b=c(b));const y=g(b),T=y===t?-1:1;let w,S;const P=M=>{w=S,S=M,e=vw(M-w,YT().delta),(T===1&&M>y||T===-1&&Mp==null?void 0:p.stop()}}const yw=(n,e)=>1-3*e+3*n,bw=(n,e)=>3*e-6*n,xw=n=>3*n,Lh=(n,e,t)=>((yw(e,t)*n+bw(e,t))*n+xw(e))*n,Mw=(n,e,t)=>3*yw(e,t)*n*n+2*bw(e,t)*n+xw(e),l5=1e-7,c5=10;function u5(n,e,t,i,s){let r,o,a=0;do o=e+(t-e)/2,r=Lh(o,i,s)-n,r>0?t=o:e=o;while(Math.abs(r)>l5&&++a=h5?d5(o,f,n,t):h===0?f:u5(o,a,a+uf,n,t)}return o=>o===0||o===1?o:Lh(r(o),e,i)}const Ns={},bm={};class m5{constructor(){fi(this,"subscriptions",new Set)}add(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}notify(e,t,i){if(this.subscriptions.size)for(const s of this.subscriptions)s(e,t,i)}clear(){this.subscriptions.clear()}}function _x(n){return!Number.isNaN(Number.parseFloat(n))}class g5{constructor(e){fi(this,"current");fi(this,"prev");fi(this,"timeDelta",0);fi(this,"lastUpdated",0);fi(this,"updateSubscribers",new m5);fi(this,"stopAnimation");fi(this,"canTrackVelocity",!1);fi(this,"updateAndNotify",e=>{this.prev=this.current,this.current=e;const{delta:t,timestamp:i}=YT();this.lastUpdated!==i&&(this.timeDelta=t,this.lastUpdated=i),Vg.postRender(this.scheduleVelocityCheck),this.updateSubscribers.notify(this.current)});fi(this,"scheduleVelocityCheck",()=>Vg.postRender(this.velocityCheck));fi(this,"velocityCheck",({timestamp:e})=>{this.canTrackVelocity||(this.canTrackVelocity=_x(this.current)),e!==this.lastUpdated&&(this.prev=this.current)});this.prev=this.current=e,this.canTrackVelocity=_x(this.current)}onChange(e){return this.updateSubscribers.add(e)}clearListeners(){this.updateSubscribers.clear()}set(e){this.updateAndNotify(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?vw(Number.parseFloat(this.current)-Number.parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(t=>{const{stop:i}=e(t);this.stopAnimation=i}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.stop()}}function _5(n){return new g5(n)}const{isArray:v5}=Array;function y5(){const n=nt({}),e=i=>{const s=r=>{n.value[r]&&(n.value[r].stop(),n.value[r].destroy(),delete n.value[r])};i?v5(i)?i.forEach(s):s(i):Object.keys(n.value).forEach(s)},t=(i,s,r)=>{if(n.value[i])return n.value[i];const o=_5(s);return o.onChange(a=>r[i]=a),n.value[i]=o,o};return FB(e),{motionValues:n,get:t,stop:e}}function b5(n){return Array.isArray(n)}function no(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}}function xm(n){return{type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}}function x5(n){return{type:"spring",stiffness:550,damping:n===0?100:30,restDelta:.01,restSpeed:10}}function Mm(){return{type:"keyframes",ease:"linear",duration:300}}function M5(n){return{type:"keyframes",duration:800,values:n}}const vx={default:x5,x:no,y:no,z:no,rotate:no,rotateX:no,rotateY:no,rotateZ:no,scaleX:xm,scaleY:xm,scale:xm,backgroundColor:Mm,color:Mm,opacity:Mm};function Sw(n,e){let t;return b5(e)?t=M5:t=vx[n]||vx.default,{to:e,...t(e)}}const yx={...Zc,transform:Math.round},Ew={color:Yn,backgroundColor:Yn,outlineColor:Yn,fill:Yn,stroke:Yn,borderColor:Yn,borderTopColor:Yn,borderRightColor:Yn,borderBottomColor:Yn,borderLeftColor:Yn,borderWidth:ut,borderTopWidth:ut,borderRightWidth:ut,borderBottomWidth:ut,borderLeftWidth:ut,borderRadius:ut,radius:ut,borderTopLeftRadius:ut,borderTopRightRadius:ut,borderBottomRightRadius:ut,borderBottomLeftRadius:ut,width:ut,maxWidth:ut,height:ut,maxHeight:ut,size:ut,top:ut,right:ut,bottom:ut,left:ut,padding:ut,paddingTop:ut,paddingRight:ut,paddingBottom:ut,paddingLeft:ut,margin:ut,marginTop:ut,marginRight:ut,marginBottom:ut,marginLeft:ut,rotate:to,rotateX:to,rotateY:to,rotateZ:to,scale:cf,scaleX:cf,scaleY:cf,scaleZ:cf,skew:to,skewX:to,skewY:to,distance:ut,translateX:ut,translateY:ut,translateZ:ut,x:ut,y:ut,z:ut,perspective:ut,transformPerspective:ut,opacity:zl,originX:hx,originY:hx,originZ:ut,zIndex:yx,filter:$g,WebkitFilter:$g,fillOpacity:zl,strokeOpacity:zl,numOctaves:yx},X_=n=>Ew[n];function qg(n,e){return e&&typeof n=="number"&&e.transform?e.transform(n):n}function S5(n,e){let t=X_(n);return t!==$g&&(t=Jc),t.getAnimatableNone?t.getAnimatableNone(e):void 0}const E5={linear:hw,easeIn:G_,easeInOut:dw,easeOut:G4,circIn:pw,circInOut:W4,circOut:mw,backIn:W_,backInOut:$4,backOut:X4,anticipate:q4,bounceIn:Z4,bounceInOut:J4,bounceOut:Ih};function bx(n){if(Array.isArray(n)){const[e,t,i,s]=n;return p5(e,t,i,s)}else if(typeof n=="string")return E5[n];return n}function T5(n){return Array.isArray(n)&&typeof n[0]!="number"}function xx(n,e){return n==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&Jc.test(e)&&!e.startsWith("url("))}function w5(n){return Array.isArray(n.to)&&n.to[0]===null&&(n.to=[...n.to],n.to[0]=n.from),n}function A5({ease:n,times:e,delay:t,...i}){const s={...i};return e&&(s.offset=e),n&&(s.ease=T5(n)?n.map(bx):bx(n)),t&&(s.elapsed=-t),s}function C5(n,e,t){return Array.isArray(e.to)&&(n.duration||(n.duration=800)),w5(e),R5(n)||(n={...n,...Sw(t,e.to)}),{...e,...A5(n)}}function R5({delay:n,repeat:e,repeatType:t,repeatDelay:i,from:s,...r}){return!!Object.keys(r).length}function P5(n,e){return n[e]||n.default||n}function I5(n,e,t,i,s){const r=P5(i,n);let o=r.from===null||r.from===void 0?e.get():r.from;const a=xx(n,t);o==="none"&&a&&typeof t=="string"&&(o=S5(n,t));const l=xx(n,o);function c(f){const h={from:o,to:t,velocity:i.velocity?i.velocity:e.getVelocity(),onUpdate:d=>e.set(d)};return r.type==="inertia"||r.type==="decay"?a5({...h,...r}):_w({...C5(r,h,n),onUpdate:d=>{h.onUpdate(d),r.onUpdate&&r.onUpdate(d)},onComplete:()=>{s&&s(),f&&f()}})}function u(f){return e.set(t),s&&s(),f&&f(),{stop:()=>{}}}return!l||!a||r.type===!1?u:c}function L5(){const{motionValues:n,stop:e,get:t}=y5();return{motionValues:n,stop:e,push:(s,r,o,a={},l)=>{const c=o[s],u=t(s,c,o);if(a&&a.immediate){u.set(r);return}const f=I5(s,u,r,a,l);u.start(f)}}}function D5(n,e={},{motionValues:t,push:i,stop:s}=L5()){const r=Ft(e),o=nt(!1);Ke(t,f=>{o.value=Object.values(f).filter(h=>h.isAnimating()).length>0},{immediate:!0,deep:!0});const a=f=>{if(!r||!r[f])throw new Error(`The variant ${f} does not exist.`);return r[f]},l=f=>{typeof f=="string"&&(f=a(f));const h=Object.entries(f).map(([p,_])=>{if(p!=="transition")return new Promise(g=>i(p,_,n,f.transition||Sw(p,f[p]),g))}).filter(Boolean);async function d(){var p,_;await Promise.all(h),(_=(p=f.transition)==null?void 0:p.onComplete)==null||_.call(p)}return Promise.all([d()])};return{isAnimating:o,apply:l,set:f=>{const h=Ph(f)?f:a(f);Object.entries(h).forEach(([d,p])=>{d!=="transition"&&i(d,p,n,{immediate:!0})})},leave:async f=>{let h;if(r&&(r.leave&&(h=r.leave),!r.leave&&r.initial&&(h=r.initial)),!h){f();return}await l(h),f()},stop:s}}const $_=typeof window<"u",O5=()=>$_&&(window.onpointerdown===null||(Ns==null?void 0:Ns.TEST)),N5=()=>$_&&(window.ontouchstart===null||(Ns==null?void 0:Ns.TEST)),U5=()=>$_&&(window.onmousedown===null||(Ns==null?void 0:Ns.TEST));function F5({target:n,state:e,variants:t,apply:i}){const s=Ft(t),r=nt(!1),o=nt(!1),a=nt(!1),l=Ee(()=>{let u=[...Object.keys(e.value||{})];return s&&(s.hovered&&(u=[...u,...Object.keys(s.hovered)]),s.tapped&&(u=[...u,...Object.keys(s.tapped)]),s.focused&&(u=[...u,...Object.keys(s.focused)])),u}),c=Ee(()=>{const u={};Object.assign(u,e.value),r.value&&s.hovered&&Object.assign(u,s.hovered),o.value&&s.tapped&&Object.assign(u,s.tapped),a.value&&s.focused&&Object.assign(u,s.focused);for(const f in u)l.value.includes(f)||delete u[f];return u});s.hovered&&(Ot(n,"mouseenter",()=>r.value=!0),Ot(n,"mouseleave",()=>{r.value=!1,o.value=!1})),s.tapped&&(U5()&&(Ot(n,"mousedown",()=>o.value=!0),Ot(n,"mouseup",()=>o.value=!1)),O5()&&(Ot(n,"pointerdown",()=>o.value=!0),Ot(n,"pointerup",()=>o.value=!1)),N5()&&(Ot(n,"touchstart",()=>o.value=!0),Ot(n,"touchend",()=>o.value=!1))),s.focused&&(Ot(n,"focus",()=>a.value=!0),Ot(n,"blur",()=>a.value=!1)),Ke([r,o,a],()=>{i(c.value)})}function k5({set:n,target:e,variants:t,variant:i}){const s=Ft(t);Ke(()=>e,()=>{s&&(s.initial&&(n("initial"),i.value="initial"),s.enter&&(i.value="enter"))},{immediate:!0,flush:"pre"})}function B5({state:n,apply:e}){Ke(n,t=>{t&&e(t)},{immediate:!0})}function Tw({target:n,variants:e,variant:t}){const i=Ft(e);i&&(i.visible||i.visibleOnce)&&QB(n,([{isIntersecting:s}])=>{i.visible?s?t.value="visible":t.value="initial":i.visibleOnce&&(s&&t.value!=="visibleOnce"?t.value="visibleOnce":t.value||(t.value="initial"))})}function z5(n,e={syncVariants:!0,lifeCycleHooks:!0,visibilityHooks:!0,eventListeners:!0}){e.lifeCycleHooks&&k5(n),e.syncVariants&&B5(n),e.visibilityHooks&&Tw(n),e.eventListeners&&F5(n)}function ww(n={}){const e=xi({...n}),t=nt({});return Ke(e,()=>{const i={};for(const[s,r]of Object.entries(e)){const o=X_(s),a=qg(r,o);i[s]=a}t.value=i},{immediate:!0,deep:!0}),{state:e,style:t}}function q_(n,e){Ke(()=>ei(n),t=>{t&&e(t)},{immediate:!0})}const V5={x:"translateX",y:"translateY",z:"translateZ"};function Aw(n={},e=!0){const t=xi({...n}),i=nt("");return Ke(t,s=>{let r="",o=!1;if(e&&(s.x||s.y||s.z)){const a=[s.x||0,s.y||0,s.z||0].map(l=>qg(l,ut)).join(",");r+=`translate3d(${a}) `,o=!0}for(const[a,l]of Object.entries(s)){if(e&&(a==="x"||a==="y"||a==="z"))continue;const c=X_(a),u=qg(l,c);r+=`${V5[a]||a}(${u}) `}e&&!o&&(r+="translateZ(0px) "),i.value=r.trim()},{immediate:!0,deep:!0}),{state:t,transform:i}}const H5=["","X","Y","Z"],G5=["perspective","translate","scale","rotate","skew"],Cw=["transformPerspective","x","y","z"];G5.forEach(n=>{H5.forEach(e=>{const t=n+e;Cw.push(t)})});const W5=new Set(Cw);function Y_(n){return W5.has(n)}const X5=new Set(["originX","originY","originZ"]);function Rw(n){return X5.has(n)}function $5(n){const e={},t={};return Object.entries(n).forEach(([i,s])=>{Y_(i)||Rw(i)?e[i]=s:t[i]=s}),{transform:e,style:t}}function Gd(n){const{transform:e,style:t}=$5(n),{transform:i}=Aw(e),{style:s}=ww(t);return i.value&&(s.value.transform=i.value),s.value}function q5(n,e){let t,i;const{state:s,style:r}=ww();return q_(n,o=>{i=o;for(const a of Object.keys(Ew))o.style[a]===null||o.style[a]===""||Y_(a)||Rw(a)||(s[a]=o.style[a]);t&&Object.entries(t).forEach(([a,l])=>o.style[a]=l),e&&e(s)}),Ke(r,o=>{if(!i){t=o;return}for(const a in o)i.style[a]=o[a]},{immediate:!0}),{style:s}}function Y5(n){const e=n.trim().split(/\) |\)/);if(e.length===1)return{};const t=i=>i.endsWith("px")||i.endsWith("deg")?Number.parseFloat(i):Number.isNaN(Number(i))?Number(i):i;return e.reduce((i,s)=>{if(!s)return i;const[r,o]=s.split("("),l=o.split(",").map(u=>t(u.endsWith(")")?u.replace(")",""):u.trim())),c=l.length===1?l[0]:l;return{...i,[r]:c}},{})}function j5(n,e){Object.entries(Y5(e)).forEach(([t,i])=>{const s=["x","y","z"];if(t==="translate3d"){if(i===0){s.forEach(r=>n[r]=0);return}i.forEach((r,o)=>n[s[o]]=r);return}if(i=Number.parseFloat(`${i}`),t==="translateX"){n.x=i;return}if(t==="translateY"){n.y=i;return}if(t==="translateZ"){n.z=i;return}n[t]=i})}function K5(n,e){let t,i;const{state:s,transform:r}=Aw();return q_(n,o=>{i=o,o.style.transform&&j5(s,o.style.transform),t&&(o.style.transform=t),e&&e(s)}),Ke(r,o=>{if(!i){t=o;return}i.style.transform=o},{immediate:!0}),{transform:s}}function Z5(n){return Object.entries(n)}function J5(n,e){const t=xi({}),i=o=>Object.entries(o).forEach(([a,l])=>t[a]=l),{style:s}=q5(n,i),{transform:r}=K5(n,i);return Ke(t,o=>{Z5(o).forEach(([a,l])=>{const c=Y_(a)?r:s;c[a]&&c[a]===l||(c[a]=l)})},{immediate:!0,deep:!0}),q_(n,()=>e),{motionProperties:t,style:s,transform:r}}function Q5(n={}){const e=Ft(n),t=nt();return{state:Ee(()=>{if(t.value)return e[t.value]}),variant:t}}function Pw(n,e={},t){const{motionProperties:i}=J5(n),{variant:s,state:r}=Q5(e),o=D5(i,e),a={target:n,variant:s,variants:e,state:r,motionProperties:i,...o};return z5(a,t),a}const Iw=["delay","duration"],ez=["initial","enter","leave","visible","visible-once","visibleOnce","hovered","tapped","focused",...Iw];function tz(n){return Iw.includes(n)}function nz(n,e){const t=n.props?n.props:n.data&&n.data.attrs?n.data.attrs:{};if(t){t.variants&&Ph(t.variants)&&(e.value={...e.value,...t.variants});for(let i of ez)if(!(!t||!t[i])){if(tz(i)&&typeof t[i]=="number"){for(const s of["enter","visible","visibleOnce"]){const r=e.value[s];r!=null&&(r.transition??(r.transition={}),r.transition[i]=t[i])}continue}if(Ph(t[i])){const s=t[i];i==="visible-once"&&(i="visibleOnce"),e.value[i]=s}}}}function Sm(n,e=!1){return{created:(s,r,o)=>{const a=r.value&&typeof r.value=="string"?r.value:o.key;a&&bm[a]&&bm[a].stop();const l=e?structuredClone(ht(n)||{}):n||{},c=nt(l);typeof r.value=="object"&&(c.value=r.value),nz(o,c);const f=Pw(s,c,{eventListeners:!0,lifeCycleHooks:!0,syncVariants:!0,visibilityHooks:!1});s.motionInstance=f,a&&(bm[a]=f)},mounted:(s,r,o)=>{s.motionInstance&&Tw(s.motionInstance)},getSSRProps(s,r){let{initial:o}=s.value||r&&(r==null?void 0:r.props)||{};o=Ft(o);const a=OT({},(n==null?void 0:n.initial)||{},o||{});return!a||Object.keys(a).length===0?void 0:{style:Gd(a)}}}}const iz={initial:{opacity:0},enter:{opacity:1}},sz={initial:{opacity:0},visible:{opacity:1}},rz={initial:{opacity:0},visibleOnce:{opacity:1}},oz={initial:{scale:0,opacity:0},enter:{scale:1,opacity:1}},az={initial:{scale:0,opacity:0},visible:{scale:1,opacity:1}},lz={initial:{scale:0,opacity:0},visibleOnce:{scale:1,opacity:1}},cz={initial:{x:-100,rotate:90,opacity:0},enter:{x:0,rotate:0,opacity:1}},uz={initial:{x:-100,rotate:90,opacity:0},visible:{x:0,rotate:0,opacity:1}},fz={initial:{x:-100,rotate:90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},hz={initial:{x:100,rotate:-90,opacity:0},enter:{x:0,rotate:0,opacity:1}},dz={initial:{x:100,rotate:-90,opacity:0},visible:{x:0,rotate:0,opacity:1}},pz={initial:{x:100,rotate:-90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},mz={initial:{y:-100,rotate:-90,opacity:0},enter:{y:0,rotate:0,opacity:1}},gz={initial:{y:-100,rotate:-90,opacity:0},visible:{y:0,rotate:0,opacity:1}},_z={initial:{y:-100,rotate:-90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},vz={initial:{y:100,rotate:90,opacity:0},enter:{y:0,rotate:0,opacity:1}},yz={initial:{y:100,rotate:90,opacity:0},visible:{y:0,rotate:0,opacity:1}},bz={initial:{y:100,rotate:90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},xz={initial:{x:-100,opacity:0},enter:{x:0,opacity:1}},Mz={initial:{x:-100,opacity:0},visible:{x:0,opacity:1}},Sz={initial:{x:-100,opacity:0},visibleOnce:{x:0,opacity:1}},Ez={initial:{x:100,opacity:0},enter:{x:0,opacity:1}},Tz={initial:{x:100,opacity:0},visible:{x:0,opacity:1}},wz={initial:{x:100,opacity:0},visibleOnce:{x:0,opacity:1}},Az={initial:{y:-100,opacity:0},enter:{y:0,opacity:1}},Cz={initial:{y:-100,opacity:0},visible:{y:0,opacity:1}},Rz={initial:{y:-100,opacity:0},visibleOnce:{y:0,opacity:1}},Pz={initial:{y:100,opacity:0},enter:{y:0,opacity:1}},Iz={initial:{y:100,opacity:0},visible:{y:0,opacity:1}},Lz={initial:{y:100,opacity:0},visibleOnce:{y:0,opacity:1}},Dh={__proto__:null,fade:iz,fadeVisible:sz,fadeVisibleOnce:rz,pop:oz,popVisible:az,popVisibleOnce:lz,rollBottom:vz,rollLeft:cz,rollRight:hz,rollTop:mz,rollVisibleBottom:yz,rollVisibleLeft:uz,rollVisibleOnceBottom:bz,rollVisibleOnceLeft:fz,rollVisibleOnceRight:pz,rollVisibleOnceTop:_z,rollVisibleRight:dz,rollVisibleTop:gz,slideBottom:Pz,slideLeft:xz,slideRight:Ez,slideTop:Az,slideVisibleBottom:Iz,slideVisibleLeft:Mz,slideVisibleOnceBottom:Lz,slideVisibleOnceLeft:Sz,slideVisibleOnceRight:wz,slideVisibleOnceTop:Rz,slideVisibleRight:Tz,slideVisibleTop:Cz};function Dz(n){const e="àáâäæãåāăąçćčđďèéêëēėęěğǵḧîïíīįìłḿñńǹňôöòóœøōõőṕŕřßśšşșťțûüùúūǘůűųẃẍÿýžźż·/_,:;",t="aaaaaaaaaacccddeeeeeeeegghiiiiiilmnnnnoooooooooprrsssssttuuuuuuuuuwxyyzzz------",i=new RegExp(e.split("").join("|"),"g");return n.toString().replace(/[A-Z]/g,s=>`-${s}`).toLowerCase().replace(/\s+/g,"-").replace(i,s=>t.charAt(e.indexOf(s))).replace(/&/g,"-and-").replace(/[^\w\-]+/g,"").replace(/-{2,}/g,"-").replace(/^-+/,"").replace(/-+$/,"")}const Lw=Symbol(""),Dw={preset:{type:String,required:!1},instance:{type:Object,required:!1},variants:{type:Object,required:!1},initial:{type:Object,required:!1},enter:{type:Object,required:!1},leave:{type:Object,required:!1},visible:{type:Object,required:!1},visibleOnce:{type:Object,required:!1},hovered:{type:Object,required:!1},tapped:{type:Object,required:!1},focused:{type:Object,required:!1},delay:{type:[Number,String],required:!1},duration:{type:[Number,String],required:!1}};function Oz(n){return Object.prototype.toString.call(n)==="[object Object]"}function Yg(n){if(Array.isArray(n))return n.map(Yg);if(Oz(n)){const e={};for(const t in n)e[t]=Yg(n[t]);return e}return n}function Ow(n){const e=xi({}),t=_n(Lw,{}),i=Ee(()=>n.preset==null?{}:t!=null&&n.preset in t?structuredClone(ht(t)[n.preset]):n.preset in Dh?structuredClone(Dh[n.preset]):{}),s=Ee(()=>({initial:n.initial,enter:n.enter,leave:n.leave,visible:n.visible,visibleOnce:n.visibleOnce,hovered:n.hovered,tapped:n.tapped,focused:n.focused}));function r(l,c){for(const u of["delay","duration"]){if(c[u]==null)continue;const f=Number.parseInt(c[u]);for(const h of["enter","visible","visibleOnce"]){const d=l[h];d!=null&&(d.transition??(d.transition={}),d.transition[u]=f)}}return l}const o=Ee(()=>{const l=OT({},s.value,i.value,n.variants||{});return r({...l},n)});function a(l,c,u){var h;l.props??(l.props={}),(h=l.props).style??(h.style={}),l.props.style={...l.props.style,...u};const f=r(Yg(o.value),l.props);return l.props.onVnodeMounted=({el:d})=>{e[c]=Pw(d,f)},l.props.onVnodeUpdated=({el:d})=>{const p=Gd(e[c].state);for(const[_,g]of Object.entries(p))d.style[_]=g},l}return{motionConfig:o,setNodeInstance:a}}const Nz=hn({name:"Motion",props:{...Dw,is:{type:[String,Object],default:"div"}},setup(n){const e=N0(),{motionConfig:t,setNodeInstance:i}=Ow(n);return()=>{const s=Gd(t.value.initial||{}),r=ks(n.is,void 0,e);return i(r,0,s),r}}}),Uz=hn({name:"MotionGroup",props:{...Dw,is:{type:[String,Object],required:!1}},setup(n){const e=N0(),{motionConfig:t,setNodeInstance:i}=Ow(n);return()=>{var o;const s=Gd(t.value.initial||{}),r=((o=e.default)==null?void 0:o.call(e))||[];for(let a=0;a
'};t.configure=function(p){var _,g;for(_ in p)g=p[_],g!==void 0&&p.hasOwnProperty(_)&&(i[_]=g);return this},t.status=null,t.set=function(p){var _=t.isStarted();p=s(p,i.minimum,1),t.status=p===1?null:p;var g=t.render(!_),m=g.querySelector(i.barSelector),v=i.speed,b=i.easing;return g.offsetWidth,a(function(y){i.positionUsing===""&&(i.positionUsing=t.getPositioningCSS()),l(m,o(p,v,b)),p===1?(l(g,{transition:"none",opacity:1}),g.offsetWidth,setTimeout(function(){l(g,{transition:"all "+v+"ms linear",opacity:0}),setTimeout(function(){t.remove(),y()},v)},v)):setTimeout(y,v)}),this},t.isStarted=function(){return typeof t.status=="number"},t.start=function(){t.status||t.set(0);var p=function(){setTimeout(function(){t.status&&(t.trickle(),p())},i.trickleSpeed)};return i.trickle&&p(),this},t.done=function(p){return!p&&!t.status?this:t.inc(.3+.5*Math.random()).set(1)},t.inc=function(p){var _=t.status;return _?(typeof p!="number"&&(p=(1-_)*s(Math.random()*_,.1,.95)),_=s(_+p,0,.994),t.set(_)):t.start()},t.trickle=function(){return t.inc(Math.random()*i.trickleRate)},function(){var p=0,_=0;t.promise=function(g){return!g||g.state()==="resolved"?this:(_===0&&t.start(),p++,_++,g.always(function(){_--,_===0?(p=0,t.done()):t.set((p-_)/p)}),this)}}(),t.render=function(p){if(t.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var _=document.createElement("div");_.id="nprogress",_.innerHTML=i.template;var g=_.querySelector(i.barSelector),m=p?"-100":r(t.status||0),v=document.querySelector(i.parent),b;return l(g,{transition:"all 0 linear",transform:"translate3d("+m+"%,0,0)"}),i.showSpinner||(b=_.querySelector(i.spinnerSelector),b&&d(b)),v!=document.body&&u(v,"nprogress-custom-parent"),v.appendChild(_),_},t.remove=function(){f(document.documentElement,"nprogress-busy"),f(document.querySelector(i.parent),"nprogress-custom-parent");var p=document.getElementById("nprogress");p&&d(p)},t.isRendered=function(){return!!document.getElementById("nprogress")},t.getPositioningCSS=function(){var p=document.body.style,_="WebkitTransform"in p?"Webkit":"MozTransform"in p?"Moz":"msTransform"in p?"ms":"OTransform"in p?"O":"";return _+"Perspective"in p?"translate3d":_+"Transform"in p?"translate":"margin"};function s(p,_,g){return p<_?_:p>g?g:p}function r(p){return(-1+p)*100}function o(p,_,g){var m;return i.positionUsing==="translate3d"?m={transform:"translate3d("+r(p)+"%,0,0)"}:i.positionUsing==="translate"?m={transform:"translate("+r(p)+"%,0)"}:m={"margin-left":r(p)+"%"},m.transition="all "+_+"ms "+g,m}var a=function(){var p=[];function _(){var g=p.shift();g&&g(_)}return function(g){p.push(g),p.length==1&&_()}}(),l=function(){var p=["Webkit","O","Moz","ms"],_={};function g(y){return y.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(T,w){return w.toUpperCase()})}function m(y){var T=document.body.style;if(y in T)return y;for(var w=p.length,S=y.charAt(0).toUpperCase()+y.slice(1),P;w--;)if(P=p[w]+S,P in T)return P;return y}function v(y){return y=g(y),_[y]||(_[y]=m(y))}function b(y,T,w){T=v(T),y.style[T]=w}return function(y,T){var w=arguments,S,P;if(w.length==2)for(S in T)P=T[S],P!==void 0&&T.hasOwnProperty(S)&&b(y,S,P);else b(y,w[1],w[2])}}();function c(p,_){var g=typeof p=="string"?p:h(p);return g.indexOf(" "+_+" ")>=0}function u(p,_){var g=h(p),m=g+_;c(g,_)||(p.className=m.substring(1))}function f(p,_){var g=h(p),m;c(p,_)&&(m=g.replace(" "+_+" "," "),p.className=m.substring(1,m.length-1))}function h(p){return(" "+(p.className||"")+" ").replace(/\s+/gi," ")}function d(p){p&&p.parentNode&&p.parentNode.removeChild(p)}return t})}(Pf)),Pf.exports}var Vz=zz();const Nw=kz(Vz);/*! * pinia v3.0.3 * (c) 2025 Eduardo San Martin Morote * @license MIT - */let Uw;const Wd=n=>Uw=n,Fw=Symbol();function Yg(n){return n&&typeof n=="object"&&Object.prototype.toString.call(n)==="[object Object]"&&typeof n.toJSON!="function"}var Hl;(function(n){n.direct="direct",n.patchObject="patch object",n.patchFunction="patch function"})(Hl||(Hl={}));function Hz(){const n=M0(!0),e=n.run(()=>nt({}));let t=[],i=[];const s=C0({install(r){Wd(s),s._a=r,r.provide(Fw,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 kw=()=>{};function Sx(n,e,t,i=kw){n.push(e);const s=()=>{const r=n.indexOf(e);r>-1&&(n.splice(r,1),i())};return!t&&qh()&&S0(s),s}function na(n,...e){n.slice().forEach(t=>{t(...e)})}const Gz=n=>n(),Ex=Symbol(),Sm=Symbol();function jg(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];Yg(s)&&Yg(i)&&n.hasOwnProperty(t)&&!Lt(i)&&!Ls(i)?n[t]=jg(s,i):n[t]=i}return n}const Wz=Symbol();function Xz(n){return!Yg(n)||!Object.prototype.hasOwnProperty.call(n,Wz)}const{assign:rr}=Object;function $z(n){return!!(Lt(n)&&n.effect)}function qz(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=vS(t.state.value[n]);return rr(u,r,Object.keys(o||{}).reduce((f,h)=>(f[h]=C0(Ee(()=>{Wd(t);const d=t._s.get(n);return o[h].call(d,d)})),f),{}))}return l=Bw(n,c,e,t,i,!0),l}function Bw(n,e,t={},i,s,r){let o;const a=rr({actions:{}},t),l={deep:!0};let c,u,f=[],h=[],d;const p=i.state.value[n];!r&&!p&&(i.state.value[n]={}),nt({});let _;function g(P){let M;c=u=!1,typeof P=="function"?(P(i.state.value[n]),M={type:Hl.patchFunction,storeId:n,events:d}):(jg(i.state.value[n],P),M={type:Hl.patchObject,payload:P,storeId:n,events:d});const E=_=Symbol();Ar().then(()=>{_===E&&(c=!0)}),u=!0,na(f,M,i.state.value[n])}const m=r?function(){const{state:M}=t,E=M?M():{};this.$patch(D=>{rr(D,E)})}:kw;function v(){o.stop(),f=[],h=[],i._s.delete(n)}const b=(P,M="")=>{if(Ex in P)return P[Sm]=M,P;const E=function(){Wd(i);const D=Array.from(arguments),B=[],z=[];function V(te){B.push(te)}function Q(te){z.push(te)}na(h,{args:D,name:E[Sm],store:T,after:V,onError:Q});let j;try{j=P.apply(this&&this.$id===n?this:T,D)}catch(te){throw na(z,te),te}return j instanceof Promise?j.then(te=>(na(B,te),te)).catch(te=>(na(z,te),Promise.reject(te))):(na(B,j),j)};return E[Ex]=!0,E[Sm]=M,E},y={_p:i,$id:n,$onAction:Sx.bind(null,h),$patch:g,$reset:m,$subscribe(P,M={}){const E=Sx(f,P,M.detached,()=>D()),D=o.run(()=>Ke(()=>i.state.value[n],B=>{(M.flush==="sync"?u:c)&&P({storeId:n,type:Hl.direct,events:d},B)},rr({},l,M)));return E},$dispose:v},T=xi(y);i._s.set(n,T);const S=(i._a&&i._a.runWithContext||Gz)(()=>i._e.run(()=>(o=M0()).run(()=>e({action:b}))));for(const P in S){const M=S[P];if(Lt(M)&&!$z(M)||Ls(M))r||(p&&Xz(M)&&(Lt(M)?M.value=p[P]:jg(M,p[P])),i.state.value[n][P]=M);else if(typeof M=="function"){const E=b(M,P);S[P]=E,a.actions[P]=M}}return rr(T,S),rr(ht(T),S),Object.defineProperty(T,"$state",{get:()=>i.state.value[n],set:P=>{g(M=>{rr(M,P)})}}),i._p.forEach(P=>{rr(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 Yz(n,e,t){let i;const s=typeof e=="function";i=s?t:e;function r(o,a){const l=Ic();return o=o||(l?_n(Fw,null):null),o&&Wd(o),o=Uw,o._s.has(n)||(s?Bw(n,e,i,o):qz(n,i,o)),o._s.get(n)}return r.$id=n,r}function jz(n){const e=ht(n),t={};for(const i in e){const s=e[i];s.effect?t[i]=Ee({get:()=>n[i],set(r){n[i]=r}}):(Lt(s)||Ls(s))&&(t[i]=yS(n,i))}return t}const Kz=n=>{const e={};Object.entries(Object.assign({"/src/layouts/default.vue":()=>je(()=>import("./default-MxM0RvWC.js"),__vite__mapDeps([0,1,2])),"/src/layouts/settings.vue":()=>je(()=>import("./settings-BZFpczgY.js"),__vite__mapDeps([3,4,5,6,7,8,9,10,11,12,13,1,2])),"/src/layouts/stage.vue":()=>je(()=>import("./stage-83WDclVc.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,h;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[(h=o.meta)==null?void 0:h.layout],children:[{...o,path:""}],meta:{isLayout:!0}}:o})}return i(n)};/*! + */let Uw;const Wd=n=>Uw=n,Fw=Symbol();function jg(n){return n&&typeof n=="object"&&Object.prototype.toString.call(n)==="[object Object]"&&typeof n.toJSON!="function"}var Hl;(function(n){n.direct="direct",n.patchObject="patch object",n.patchFunction="patch function"})(Hl||(Hl={}));function Hz(){const n=S0(!0),e=n.run(()=>nt({}));let t=[],i=[];const s=R0({install(r){Wd(s),s._a=r,r.provide(Fw,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 kw=()=>{};function Sx(n,e,t,i=kw){n.push(e);const s=()=>{const r=n.indexOf(e);r>-1&&(n.splice(r,1),i())};return!t&&qh()&&E0(s),s}function na(n,...e){n.slice().forEach(t=>{t(...e)})}const Gz=n=>n(),Ex=Symbol(),Em=Symbol();function Kg(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];jg(s)&&jg(i)&&n.hasOwnProperty(t)&&!Lt(i)&&!Ls(i)?n[t]=Kg(s,i):n[t]=i}return n}const Wz=Symbol();function Xz(n){return!jg(n)||!Object.prototype.hasOwnProperty.call(n,Wz)}const{assign:rr}=Object;function $z(n){return!!(Lt(n)&&n.effect)}function qz(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=vS(t.state.value[n]);return rr(u,r,Object.keys(o||{}).reduce((f,h)=>(f[h]=R0(Ee(()=>{Wd(t);const d=t._s.get(n);return o[h].call(d,d)})),f),{}))}return l=Bw(n,c,e,t,i,!0),l}function Bw(n,e,t={},i,s,r){let o;const a=rr({actions:{}},t),l={deep:!0};let c,u,f=[],h=[],d;const p=i.state.value[n];!r&&!p&&(i.state.value[n]={}),nt({});let _;function g(P){let M;c=u=!1,typeof P=="function"?(P(i.state.value[n]),M={type:Hl.patchFunction,storeId:n,events:d}):(Kg(i.state.value[n],P),M={type:Hl.patchObject,payload:P,storeId:n,events:d});const E=_=Symbol();Ar().then(()=>{_===E&&(c=!0)}),u=!0,na(f,M,i.state.value[n])}const m=r?function(){const{state:M}=t,E=M?M():{};this.$patch(D=>{rr(D,E)})}:kw;function v(){o.stop(),f=[],h=[],i._s.delete(n)}const b=(P,M="")=>{if(Ex in P)return P[Em]=M,P;const E=function(){Wd(i);const D=Array.from(arguments),B=[],z=[];function V(te){B.push(te)}function Q(te){z.push(te)}na(h,{args:D,name:E[Em],store:T,after:V,onError:Q});let j;try{j=P.apply(this&&this.$id===n?this:T,D)}catch(te){throw na(z,te),te}return j instanceof Promise?j.then(te=>(na(B,te),te)).catch(te=>(na(z,te),Promise.reject(te))):(na(B,j),j)};return E[Ex]=!0,E[Em]=M,E},y={_p:i,$id:n,$onAction:Sx.bind(null,h),$patch:g,$reset:m,$subscribe(P,M={}){const E=Sx(f,P,M.detached,()=>D()),D=o.run(()=>Ke(()=>i.state.value[n],B=>{(M.flush==="sync"?u:c)&&P({storeId:n,type:Hl.direct,events:d},B)},rr({},l,M)));return E},$dispose:v},T=xi(y);i._s.set(n,T);const S=(i._a&&i._a.runWithContext||Gz)(()=>i._e.run(()=>(o=S0()).run(()=>e({action:b}))));for(const P in S){const M=S[P];if(Lt(M)&&!$z(M)||Ls(M))r||(p&&Xz(M)&&(Lt(M)?M.value=p[P]:Kg(M,p[P])),i.state.value[n][P]=M);else if(typeof M=="function"){const E=b(M,P);S[P]=E,a.actions[P]=M}}return rr(T,S),rr(ht(T),S),Object.defineProperty(T,"$state",{get:()=>i.state.value[n],set:P=>{g(M=>{rr(M,P)})}}),i._p.forEach(P=>{rr(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 Yz(n,e,t){let i;const s=typeof e=="function";i=s?t:e;function r(o,a){const l=Ic();return o=o||(l?_n(Fw,null):null),o&&Wd(o),o=Uw,o._s.has(n)||(s?Bw(n,e,i,o):qz(n,i,o)),o._s.get(n)}return r.$id=n,r}function jz(n){const e=ht(n),t={};for(const i in e){const s=e[i];s.effect?t[i]=Ee({get:()=>n[i],set(r){n[i]=r}}):(Lt(s)||Ls(s))&&(t[i]=yS(n,i))}return t}const Kz=n=>{const e={};Object.entries(Object.assign({"/src/layouts/default.vue":()=>je(()=>import("./default-2UwyyMkh.js"),__vite__mapDeps([0,1,2])),"/src/layouts/settings.vue":()=>je(()=>import("./settings-u12G2c4h.js"),__vite__mapDeps([3,4,5,6,7,8,9,10,11,12,13,1,2])),"/src/layouts/stage.vue":()=>je(()=>import("./stage-BGhfuYuA.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,h;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[(h=o.meta)==null?void 0:h.layout],children:[{...o,path:""}],meta:{isLayout:!0}}:o})}return i(n)};/*! * vue-router v4.5.1 * (c) 2025 Eduardo San Martin Morote * @license MIT - */const sa=typeof document<"u";function zw(n){return typeof n=="object"||"displayName"in n||"props"in n||"__vccOpts"in n}function Zz(n){return n.__esModule||n[Symbol.toStringTag]==="Module"||n.default&&zw(n.default)}const St=Object.assign;function Em(n,e){const t={};for(const i in e){const s=e[i];t[i]=Vi(s)?s.map(n):n(s)}return t}const Gl=()=>{},Vi=Array.isArray,Vw=/#/g,Jz=/&/g,Qz=/\//g,eV=/=/g,tV=/\?/g,Hw=/\+/g,nV=/%5B/g,iV=/%5D/g,Gw=/%5E/g,sV=/%60/g,Ww=/%7B/g,rV=/%7C/g,Xw=/%7D/g,oV=/%20/g;function Y_(n){return encodeURI(""+n).replace(rV,"|").replace(nV,"[").replace(iV,"]")}function aV(n){return Y_(n).replace(Ww,"{").replace(Xw,"}").replace(Gw,"^")}function Kg(n){return Y_(n).replace(Hw,"%2B").replace(oV,"+").replace(Vw,"%23").replace(Jz,"%26").replace(sV,"`").replace(Ww,"{").replace(Xw,"}").replace(Gw,"^")}function lV(n){return Kg(n).replace(eV,"%3D")}function cV(n){return Y_(n).replace(Vw,"%23").replace(tV,"%3F")}function uV(n){return n==null?"":cV(n).replace(Qz,"%2F")}function Sc(n){try{return decodeURIComponent(""+n)}catch{}return""+n}const fV=/\/$/,hV=n=>n.replace(fV,"");function Tm(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=gV(i??e,t),{fullPath:i+(r&&"?")+r+o,path:i,query:s,hash:Sc(o)}}function dV(n,e){const t=e.query?n(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function Tx(n,e){return!e||!n.toLowerCase().startsWith(e.toLowerCase())?n:n.slice(e.length)||"/"}function pV(n,e,t){const i=e.matched.length-1,s=t.matched.length-1;return i>-1&&i===s&&Da(e.matched[i],t.matched[s])&&$w(e.params,t.params)&&n(e.query)===n(t.query)&&e.hash===t.hash}function Da(n,e){return(n.aliasOf||n)===(e.aliasOf||e)}function $w(n,e){if(Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(!mV(n[t],e[t]))return!1;return!0}function mV(n,e){return Vi(n)?wx(n,e):Vi(e)?wx(e,n):n===e}function wx(n,e){return Vi(e)?n.length===e.length&&n.every((t,i)=>t===e[i]):n.length===1&&n[0]===e}function gV(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 ir={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Ec;(function(n){n.pop="pop",n.push="push"})(Ec||(Ec={}));var Wl;(function(n){n.back="back",n.forward="forward",n.unknown=""})(Wl||(Wl={}));function _V(n){if(!n)if(sa){const e=document.querySelector("base");n=e&&e.getAttribute("href")||"/",n=n.replace(/^\w+:\/\/[^\/]+/,"")}else n="/";return n[0]!=="/"&&n[0]!=="#"&&(n="/"+n),hV(n)}const vV=/^[^#]+#/;function yV(n,e){return n.replace(vV,"#")+e}function bV(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 Xd=()=>({left:window.scrollX,top:window.scrollY});function xV(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=bV(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 Ax(n,e){return(history.state?history.state.position-e:-1)+n}const Zg=new Map;function MV(n,e){Zg.set(n,e)}function SV(n){const e=Zg.get(n);return Zg.delete(n),e}let EV=()=>location.protocol+"//"+location.host;function qw(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),Tx(l,"")}return Tx(t,n)+i+s}function TV(n,e,t,i){let s=[],r=[],o=null;const a=({state:h})=>{const d=qw(n,location),p=t.value,_=e.value;let g=0;if(h){if(t.value=d,e.value=h,o&&o===p){o=null;return}g=_?h.position-_.position:0}else i(d);s.forEach(m=>{m(t.value,p,{delta:g,type:Ec.pop,direction:g?g>0?Wl.forward:Wl.back:Wl.unknown})})};function l(){o=t.value}function c(h){s.push(h);const d=()=>{const p=s.indexOf(h);p>-1&&s.splice(p,1)};return r.push(d),d}function u(){const{history:h}=window;h.state&&h.replaceState(St({},h.state,{scroll:Xd()}),"")}function f(){for(const h of r)h();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 Cx(n,e,t,i=!1,s=!1){return{back:n,current:e,forward:t,replaced:i,position:window.history.length,scroll:s?Xd():null}}function wV(n){const{history:e,location:t}=window,i={value:qw(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("#"),h=f>-1?(t.host&&document.querySelector("base")?n:n.slice(f))+l:EV()+n+l;try{e[u?"replaceState":"pushState"](c,"",h),s.value=c}catch(d){console.error(d),t[u?"replace":"assign"](h)}}function o(l,c){const u=St({},e.state,Cx(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=St({},s.value,e.state,{forward:l,scroll:Xd()});r(u.current,u,!0);const f=St({},Cx(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 AV(n){n=_V(n);const e=wV(n),t=TV(n,e.state,e.location,e.replace);function i(r,o=!0){o||t.pauseListeners(),history.go(r)}const s=St({location:"",base:n,go:i,createHref:yV.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 CV(n){return n=location.host?n||location.pathname+location.search:"",n.includes("#")||(n+="#"),AV(n)}function RV(n){return typeof n=="string"||n&&typeof n=="object"}function Yw(n){return typeof n=="string"||typeof n=="symbol"}const jw=Symbol("");var Rx;(function(n){n[n.aborted=4]="aborted",n[n.cancelled=8]="cancelled",n[n.duplicated=16]="duplicated"})(Rx||(Rx={}));function Oa(n,e){return St(new Error,{type:n,[jw]:!0},e)}function bs(n,e){return n instanceof Error&&jw in n&&(e==null||!!(n.type&e))}const Px="[^/]+?",PV={sensitive:!1,strict:!1,start:!0,end:!0},IV=/[.+*?^${}()[\]/\\]/g;function LV(n,e){const t=St({},PV,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 Kw(n,e){let t=0;const i=n.score,s=e.score;for(;t0&&e[e.length-1]<0}const OV={type:0,value:""},NV=/[a-zA-Z0-9_]/;function UV(n){if(!n)return[[]];if(n==="/")return[[OV]];if(!n.startsWith("/"))throw new Error(`Invalid path "${n}"`);function e(d){throw new Error(`ERR (${t})/"${c}": ${d}`)}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 h(){c+=l}for(;a{o(b)}:Gl}function o(f){if(Yw(f)){const h=i.get(f);h&&(i.delete(f),t.splice(t.indexOf(h),1),h.children.forEach(o),h.alias.forEach(o))}else{const h=t.indexOf(f);h>-1&&(t.splice(h,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 h=VV(f,t);t.splice(h,0,f),f.record.name&&!Ox(f)&&i.set(f.record.name,f)}function c(f,h){let d,p={},_,g;if("name"in f&&f.name){if(d=i.get(f.name),!d)throw Oa(1,{location:f});g=d.record.name,p=St(Lx(h.params,d.keys.filter(b=>!b.optional).concat(d.parent?d.parent.keys.filter(b=>b.optional):[]).map(b=>b.name)),f.params&&Lx(f.params,d.keys.map(b=>b.name))),_=d.stringify(p)}else if(f.path!=null)_=f.path,d=t.find(b=>b.re.test(_)),d&&(p=d.parse(_),g=d.record.name);else{if(d=h.name?i.get(h.name):t.find(b=>b.re.test(h.path)),!d)throw Oa(1,{location:f,currentLocation:h});g=d.record.name,p=St({},h.params,f.params),_=d.stringify(p)}const m=[];let v=d;for(;v;)m.unshift(v.record),v=v.parent;return{name:g,path:_,params:p,matched:m,meta:zV(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 Lx(n,e){const t={};for(const i of e)i in n&&(t[i]=n[i]);return t}function Dx(n){const e={path:n.path,redirect:n.redirect,name:n.name,meta:n.meta||{},aliasOf:n.aliasOf,beforeEnter:n.beforeEnter,props:BV(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 BV(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 Ox(n){for(;n;){if(n.record.aliasOf)return!0;n=n.parent}return!1}function zV(n){return n.reduce((e,t)=>St(e,t.meta),{})}function Nx(n,e){const t={};for(const i in n)t[i]=i in e?e[i]:n[i];return t}function VV(n,e){let t=0,i=e.length;for(;t!==i;){const r=t+i>>1;Kw(n,e[r])<0?i=r:t=r+1}const s=HV(n);return s&&(i=e.lastIndexOf(s,i-1)),i}function HV(n){let e=n;for(;e=e.parent;)if(Zw(e)&&Kw(n,e)===0)return e}function Zw({record:n}){return!!(n.name||n.components&&Object.keys(n.components).length||n.redirect)}function GV(n){const e={};if(n===""||n==="?")return e;const i=(n[0]==="?"?n.slice(1):n).split("&");for(let s=0;sr&&Kg(r)):[i&&Kg(i)]).forEach(r=>{r!==void 0&&(e+=(e.length?"&":"")+t,r!=null&&(e+="="+r))})}return e}function WV(n){const e={};for(const t in n){const i=n[t];i!==void 0&&(e[t]=Vi(i)?i.map(s=>s==null?null:""+s):i==null?i:""+i)}return e}const XV=Symbol(""),Fx=Symbol(""),$d=Symbol(""),j_=Symbol(""),Jg=Symbol("");function hl(){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 fr(n,e,t,i,s,r=o=>o()){const o=i&&(i.enterCallbacks[s]=i.enterCallbacks[s]||[]);return()=>new Promise((a,l)=>{const c=h=>{h===!1?l(Oa(4,{from:t,to:e})):h instanceof Error?l(h):RV(h)?l(Oa(2,{from:e,to:h})):(o&&i.enterCallbacks[s]===o&&typeof h=="function"&&o.push(h),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(h=>l(h))})}function wm(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(zw(l)){const u=(l.__vccOpts||l)[e];u&&r.push(fr(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=Zz(u)?u.default:u;o.mods[a]=u,o.components[a]=f;const d=(f.__vccOpts||f)[e];return d&&fr(d,t,i,o,a,s)()}))}}return r}function kx(n){const e=_n($d),t=_n(j_),i=Ee(()=>{const l=Ft(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 h=f.findIndex(Da.bind(null,u));if(h>-1)return h;const d=Bx(l[c-2]);return c>1&&Bx(u)===d&&f[f.length-1].path!==d?f.findIndex(Da.bind(null,l[c-2])):h}),r=Ee(()=>s.value>-1&&KV(t.params,i.value.params)),o=Ee(()=>s.value>-1&&s.value===t.matched.length-1&&$w(t.params,i.value.params));function a(l={}){if(jV(l)){const c=e[Ft(n.replace)?"replace":"push"](Ft(n.to)).catch(Gl);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 $V(n){return n.length===1?n[0]:n}const qV=hn({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"},viewTransition:Boolean},useLink:kx,setup(n,{slots:e}){const t=xi(kx(n)),{options:i}=_n($d),s=Ee(()=>({[zx(n.activeClass,i.linkActiveClass,"router-link-active")]:t.isActive,[zx(n.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const r=e.default&&$V(e.default(t));return n.custom?r:ks("a",{"aria-current":t.isExactActive?n.ariaCurrentValue:null,href:t.href,onClick:t.navigate,class:s.value},r)}}}),YV=qV;function jV(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 KV(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(!Vi(s)||s.length!==i.length||i.some((r,o)=>r!==s[o]))return!1}return!0}function Bx(n){return n?n.aliasOf?n.aliasOf.path:n.path:""}const zx=(n,e,t)=>n??e??t,ZV=hn({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(n,{attrs:e,slots:t}){const i=_n(Jg),s=Ee(()=>n.route||i.value),r=_n(Fx,0),o=Ee(()=>{let c=Ft(r);const{matched:u}=s.value;let f;for(;(f=u[c])&&!f.components;)c++;return c}),a=Ee(()=>s.value.matched[o.value]);gr(Fx,Ee(()=>o.value+1)),gr(XV,a),gr(Jg,s);const l=nt();return Ke(()=>[l.value,a.value,n.name],([c,u,f],[h,d,p])=>{u&&(u.instances[f]=c,d&&d!==u&&c&&c===h&&(u.leaveGuards.size||(u.leaveGuards=d.leaveGuards),u.updateGuards.size||(u.updateGuards=d.updateGuards))),c&&u&&(!d||!Da(u,d)||!h)&&(u.enterCallbacks[f]||[]).forEach(_=>_(c))},{flush:"post"}),()=>{const c=s.value,u=n.name,f=a.value,h=f&&f.components[u];if(!h)return Vx(t.default,{Component:h,route:c});const d=f.props[u],p=d?d===!0?c.params:typeof d=="function"?d(c):d:null,g=ks(h,St({},p,e,{onVnodeUnmounted:m=>{m.component.isUnmounted&&(f.instances[u]=null)},ref:l}));return Vx(t.default,{Component:g,route:c})||g}}});function Vx(n,e){if(!n)return null;const t=n(e);return t.length===1?t[0]:t}const Jw=ZV;function JV(n){const e=kV(n.routes,n),t=n.parseQuery||GV,i=n.stringifyQuery||Ux,s=n.history,r=hl(),o=hl(),a=hl(),l=Oe(ir);let c=ir;sa&&n.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Em.bind(null,$=>""+$),f=Em.bind(null,uV),h=Em.bind(null,Sc);function d($,ae){let le,ue;return Yw($)?(le=e.getRecordMatcher($),ue=ae):ue=$,e.addRoute(ue,le)}function p($){const ae=e.getRecordMatcher($);ae&&e.removeRoute(ae)}function _(){return e.getRoutes().map($=>$.record)}function g($){return!!e.getRecordMatcher($)}function m($,ae){if(ae=St({},ae||l.value),typeof $=="string"){const A=Tm(t,$,ae.path),W=e.resolve({path:A.path},ae),G=s.createHref(A.fullPath);return St(A,W,{params:h(W.params),hash:Sc(A.hash),redirectedFrom:void 0,href:G})}let le;if($.path!=null)le=St({},$,{path:Tm(t,$.path,ae.path).path});else{const A=St({},$.params);for(const W in A)A[W]==null&&delete A[W];le=St({},$,{params:f(A)}),ae.params=f(ae.params)}const ue=e.resolve(le,ae),$e=$.hash||"";ue.params=u(h(ue.params));const N=dV(i,St({},$,{hash:aV($e),path:ue.path})),U=s.createHref(N);return St({fullPath:N,hash:$e,query:i===Ux?WV($.query):$.query||{}},ue,{redirectedFrom:void 0,href:U})}function v($){return typeof $=="string"?Tm(t,$,l.value.path):St({},$)}function b($,ae){if(c!==$)return Oa(8,{from:ae,to:$})}function y($){return S($)}function T($){return y(St(v($),{replace:!0}))}function w($){const ae=$.matched[$.matched.length-1];if(ae&&ae.redirect){const{redirect:le}=ae;let ue=typeof le=="function"?le($):le;return typeof ue=="string"&&(ue=ue.includes("?")||ue.includes("#")?ue=v(ue):{path:ue},ue.params={}),St({query:$.query,hash:$.hash,params:ue.path!=null?{}:$.params},ue)}}function S($,ae){const le=c=m($),ue=l.value,$e=$.state,N=$.force,U=$.replace===!0,A=w(le);if(A)return S(St(v(A),{state:typeof A=="object"?St({},$e,A.state):$e,force:N,replace:U}),ae||le);const W=le;W.redirectedFrom=ae;let G;return!N&&pV(i,ue,le)&&(G=Oa(16,{to:W,from:ue}),re(ue,ue,!0,!1)),(G?Promise.resolve(G):E(W,ue)).catch(X=>bs(X)?bs(X,2)?X:Me(X):Z(X,W,ue)).then(X=>{if(X){if(bs(X,2))return S(St({replace:U},v(X.to),{state:typeof X.to=="object"?St({},$e,X.to.state):$e,force:N}),ae||W)}else X=B(W,ue,!0,U,$e);return D(W,ue,X),X})}function P($,ae){const le=b($,ae);return le?Promise.reject(le):Promise.resolve()}function M($){const ae=oe.values().next().value;return ae&&typeof ae.runWithContext=="function"?ae.runWithContext($):$()}function E($,ae){let le;const[ue,$e,N]=QV($,ae);le=wm(ue.reverse(),"beforeRouteLeave",$,ae);for(const A of ue)A.leaveGuards.forEach(W=>{le.push(fr(W,$,ae))});const U=P.bind(null,$,ae);return le.push(U),Se(le).then(()=>{le=[];for(const A of r.list())le.push(fr(A,$,ae));return le.push(U),Se(le)}).then(()=>{le=wm($e,"beforeRouteUpdate",$,ae);for(const A of $e)A.updateGuards.forEach(W=>{le.push(fr(W,$,ae))});return le.push(U),Se(le)}).then(()=>{le=[];for(const A of N)if(A.beforeEnter)if(Vi(A.beforeEnter))for(const W of A.beforeEnter)le.push(fr(W,$,ae));else le.push(fr(A.beforeEnter,$,ae));return le.push(U),Se(le)}).then(()=>($.matched.forEach(A=>A.enterCallbacks={}),le=wm(N,"beforeRouteEnter",$,ae,M),le.push(U),Se(le))).then(()=>{le=[];for(const A of o.list())le.push(fr(A,$,ae));return le.push(U),Se(le)}).catch(A=>bs(A,8)?A:Promise.reject(A))}function D($,ae,le){a.list().forEach(ue=>M(()=>ue($,ae,le)))}function B($,ae,le,ue,$e){const N=b($,ae);if(N)return N;const U=ae===ir,A=sa?history.state:{};le&&(ue||U?s.replace($.fullPath,St({scroll:U&&A&&A.scroll},$e)):s.push($.fullPath,$e)),l.value=$,re($,ae,le,U),Me()}let z;function V(){z||(z=s.listen(($,ae,le)=>{if(!ge.listening)return;const ue=m($),$e=w(ue);if($e){S(St($e,{replace:!0,force:!0}),ue).catch(Gl);return}c=ue;const N=l.value;sa&&MV(Ax(N.fullPath,le.delta),Xd()),E(ue,N).catch(U=>bs(U,12)?U:bs(U,2)?(S(St(v(U.to),{force:!0}),ue).then(A=>{bs(A,20)&&!le.delta&&le.type===Ec.pop&&s.go(-1,!1)}).catch(Gl),Promise.reject()):(le.delta&&s.go(-le.delta,!1),Z(U,ue,N))).then(U=>{U=U||B(ue,N,!1),U&&(le.delta&&!bs(U,8)?s.go(-le.delta,!1):le.type===Ec.pop&&bs(U,20)&&s.go(-1,!1)),D(ue,N,U)}).catch(Gl)}))}let Q=hl(),j=hl(),te;function Z($,ae,le){Me($);const ue=j.list();return ue.length?ue.forEach($e=>$e($,ae,le)):console.error($),Promise.reject($)}function pe(){return te&&l.value!==ir?Promise.resolve():new Promise(($,ae)=>{Q.add([$,ae])})}function Me($){return te||(te=!$,V(),Q.list().forEach(([ae,le])=>$?le($):ae()),Q.reset()),$}function re($,ae,le,ue){const{scrollBehavior:$e}=n;if(!sa||!$e)return Promise.resolve();const N=!le&&SV(Ax($.fullPath,0))||(ue||!le)&&history.state&&history.state.scroll||null;return Ar().then(()=>$e($,ae,N)).then(U=>U&&xV(U)).catch(U=>Z(U,$,ae))}const xe=$=>s.go($);let We;const oe=new Set,ge={currentRoute:l,listening:!0,addRoute:d,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:g,getRoutes:_,resolve:m,options:n,push:y,replace:T,go:xe,back:()=>xe(-1),forward:()=>xe(1),beforeEach:r.add,beforeResolve:o.add,afterEach:a.add,onError:j.add,isReady:pe,install($){const ae=this;$.component("RouterLink",YV),$.component("RouterView",Jw),$.config.globalProperties.$router=ae,Object.defineProperty($.config.globalProperties,"$route",{enumerable:!0,get:()=>Ft(l)}),sa&&!We&&l.value===ir&&(We=!0,y(s.location).catch($e=>{}));const le={};for(const $e in ir)Object.defineProperty(le,$e,{get:()=>l.value[$e],enumerable:!0});$.provide($d,ae),$.provide(j_,pS(le)),$.provide(Jg,l);const ue=$.unmount;oe.add($),$.unmount=function(){oe.delete($),oe.size<1&&(c=ir,z&&z(),z=null,l.value=ir,We=!1,te=!1),ue()}}};function Se($){return $.reduce((ae,le)=>ae.then(()=>M(le)),Promise.resolve())}return ge}function QV(n,e){const t=[],i=[],s=[],r=Math.max(e.matched.length,n.matched.length);for(let o=0;oDa(c,a))?i.push(a):t.push(a));const l=n.matched[o];l&&(e.matched.find(c=>Da(c,l))||s.push(l))}return[t,i,s]}function e6(){return _n($d)}function $G(n){return _n(j_)}const t6=[{path:"/",name:"/",component:()=>je(()=>import("./index-CHEHxPJb.js"),__vite__mapDeps([14,4,5,6,7,8,11,12,13,15,16,17,10,9,18,19,20,21,22,23,24,25,1,2,26,27,28])),meta:{layout:"stage",stageTransition:{name:"bubble-wave-out"}}},{path:"/:all(.*)",name:"/[...all]",component:()=>je(()=>import("./_...all_-ZSCTB34-.js"),[])},{path:"/audio",name:"/audio",component:()=>je(()=>import("./audio-DU0_kfqA.js"),[])},{path:"/devtools",children:[{path:"background-remove",name:"/devtools/background-remove",component:()=>je(()=>import("./background-remove-C-QrXCNT.js"),__vite__mapDeps([29,11,12,13,30]))},{path:"chat",name:"/devtools/chat",component:()=>je(()=>import("./chat-mn0JV4Kp.js"),__vite__mapDeps([31,20,10]))},{path:"image",name:"/devtools/image",component:()=>je(()=>import("./image-CibzeZAR.js"),__vite__mapDeps([32,33]))},{path:"vibrant",name:"/devtools/vibrant",component:()=>je(()=>import("./vibrant-C1qAY2sn.js"),__vite__mapDeps([34,11,12,13,30,35]))}]},{path:"/queue",name:"/queue",component:()=>je(()=>import("./queue-Bzd_iRYh.js"),__vite__mapDeps([36,18]))},{path:"/settings",children:[{path:"",name:"/settings/",component:()=>je(()=>import("./index-Cqc4fKz2.js"),__vite__mapDeps([37,4,5,6,7,8,38,11,12,13,39,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"airi-card",children:[{path:"",name:"/settings/airi-card/",component:()=>je(()=>import("./index-aU1mpMhC.js"),__vite__mapDeps([40,6,7,8,21,22,9,10,17,11,12,13,30,41,42,43,4,5,44,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"components",children:[{path:"CardDetailDialog",name:"/settings/airi-card/components/CardDetailDialog",component:()=>je(()=>import("./CardDetailDialog-BlSfmRlS.js"),__vite__mapDeps([45,41,42,43,12,4,5,6,7,8,21,22,9,10,17,11,13]))},{path:"CardListItem",name:"/settings/airi-card/components/CardListItem",component:()=>je(()=>import("./CardListItem-D2jkRHPP.js"),__vite__mapDeps([46,44,4,5,6,7,8,11,12,13]))},{path:"DeleteCardDialog",name:"/settings/airi-card/components/DeleteCardDialog",component:()=>je(()=>import("./DeleteCardDialog-CzcmecCM.js"),__vite__mapDeps([47,42,43,12]))}]}]},{path:"appearance",children:[{path:"",name:"/settings/appearance/",component:()=>je(()=>import("./index-BUHNZNXi.js"),__vite__mapDeps([48,4,5,6,7,8,38,11,12,13,27])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}},{path:"color-scheme",name:"/settings/appearance/color-scheme",component:()=>je(()=>import("./color-scheme-DFRftciY.js"),__vite__mapDeps([49,4,5,6,7,8,11,12,13,50,25,23,43,27,51])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"developer",name:"/settings/appearance/developer",component:()=>je(()=>import("./developer-B1AODhAI.js"),__vite__mapDeps([52,6,7,8,53,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"general",name:"/settings/appearance/general",component:()=>je(()=>import("./general-D0FjssBx.js"),__vite__mapDeps([54,6,7,8,53,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}}]},{path:"memory",children:[{path:"",name:"/settings/memory/",component:()=>je(()=>import("./index-CKKZXq7c.js"),__vite__mapDeps([55,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}}]},{path:"models",children:[{path:"",name:"/settings/models/",component:()=>je(()=>import("./index-C9m14O1J.js"),__vite__mapDeps([56,4,5,24,6,7,8,11,12,13,35,39,50,25,23,43,57,27,58])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}}]},{path:"modules",children:[{path:"",name:"/settings/modules/",component:()=>je(()=>import("./index-C7BBvJH7.js"),__vite__mapDeps([59,4,5,6,7,8,60,11,12,13,39,57,27])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}},{path:"consciousness",name:"/settings/modules/consciousness",component:()=>je(()=>import("./consciousness-DTcES_Z6.js"),__vite__mapDeps([61,4,5,6,7,8,22,9,10,11,12,13,62,23,63,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"memory-long-term",name:"/settings/modules/memory-long-term",component:()=>je(()=>import("./memory-long-term-DKoN_UYI.js"),__vite__mapDeps([64,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"memory-short-term",name:"/settings/modules/memory-short-term",component:()=>je(()=>import("./memory-short-term-CGF6Nhl6.js"),__vite__mapDeps([65,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"speech",name:"/settings/modules/speech",component:()=>je(()=>import("./speech-BnaLJ2Rn.js"),__vite__mapDeps([66,67,4,5,11,12,13,6,7,8,9,10,17,68,63,69,26,62,23,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}}]},{path:"providers",children:[{path:"",name:"/settings/providers/",component:()=>je(()=>import("./index-CsewVBbh.js"),__vite__mapDeps([70,4,5,6,7,8,9,10,60,11,12,13,57,27])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}},{path:"alibaba-cloud-model-studio",name:"/settings/providers/alibaba-cloud-model-studio",component:()=>je(()=>import("./alibaba-cloud-model-studio-AJxwqJ9S.js"),__vite__mapDeps([71,4,5,6,7,8,9,10,17,67,11,12,13,72,73,25,23,68,63,74,75,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"anthropic",name:"/settings/providers/anthropic",component:()=>je(()=>import("./anthropic-CRbvwdIi.js"),__vite__mapDeps([76,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"cloudflare-workers-ai",name:"/settings/providers/cloudflare-workers-ai",component:()=>je(()=>import("./cloudflare-workers-ai-Nzt67BKJ.js"),__vite__mapDeps([78,4,5,6,7,8,9,10,11,12,13,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"deepseek",name:"/settings/providers/deepseek",component:()=>je(()=>import("./deepseek-C4C7ySbq.js"),__vite__mapDeps([79,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"elevenlabs",name:"/settings/providers/elevenlabs",component:()=>je(()=>import("./elevenlabs-DfWVlghd.js"),__vite__mapDeps([80,4,5,6,7,8,9,10,17,67,11,12,13,72,73,25,23,68,63,74,75,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"featherless-ai",name:"/settings/providers/featherless-ai",component:()=>je(()=>import("./featherless-ai-Abs5j3EH.js"),__vite__mapDeps([81,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"fireworks-ai",name:"/settings/providers/fireworks-ai",component:()=>je(()=>import("./fireworks-ai-Cgaz7mYL.js"),__vite__mapDeps([82,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"google-generative-ai",name:"/settings/providers/google-generative-ai",component:()=>je(()=>import("./google-generative-ai-Cvwii5l7.js"),__vite__mapDeps([83,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"microsoft-speech",name:"/settings/providers/microsoft-speech",component:()=>je(()=>import("./microsoft-speech-BLOCaluL.js"),__vite__mapDeps([84,4,5,6,7,8,9,10,17,68,63,67,11,12,13,72,73,25,23,74,75,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"mistral-ai",name:"/settings/providers/mistral-ai",component:()=>je(()=>import("./mistral-ai-jouO5dmJ.js"),__vite__mapDeps([85,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"moonshot-ai",name:"/settings/providers/moonshot-ai",component:()=>je(()=>import("./moonshot-ai-DZvpNZty.js"),__vite__mapDeps([86,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"novita-ai",name:"/settings/providers/novita-ai",component:()=>je(()=>import("./novita-ai-Bh1E0rHc.js"),__vite__mapDeps([87,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"ollama",name:"/settings/providers/ollama",component:()=>je(()=>import("./ollama-r0UZT5nG.js"),__vite__mapDeps([88,4,5,6,7,8,9,10,63,11,12,13,73,25,23,68,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"openai",name:"/settings/providers/openai",component:()=>je(()=>import("./openai-XNIcWilW.js"),__vite__mapDeps([89,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"openrouter-ai",name:"/settings/providers/openrouter-ai",component:()=>je(()=>import("./openrouter-ai-CTdWmhtc.js"),__vite__mapDeps([90,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"together-ai",name:"/settings/providers/together-ai",component:()=>je(()=>import("./together-ai-No2aAYf3.js"),__vite__mapDeps([91,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"volcengine",name:"/settings/providers/volcengine",component:()=>je(()=>import("./volcengine-BRelq9N_.js"),__vite__mapDeps([92,4,5,6,7,8,9,10,17,68,63,67,11,12,13,72,73,25,23,74,75,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"xai",name:"/settings/providers/xai",component:()=>je(()=>import("./xai-CoTXxIZ1.js"),__vite__mapDeps([93,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}}]},{path:"scene",children:[{path:"",name:"/settings/scene/",component:()=>je(()=>import("./index-ebacZR9F.js"),__vite__mapDeps([94,57,6,7,8,27])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}}]}]},{path:"/test",children:[{path:"filter-message",name:"/test/filter-message",component:()=>je(()=>import("./filter-message-BA3h9Pac.js"),__vite__mapDeps([95,11,12,13,69,26]))},{path:"queues",children:[{path:"delays",name:"/test/queues/delays",component:()=>je(()=>import("./delays-WpVM8VPm.js"),__vite__mapDeps([96,6,19,7,18,11,12,13,69,26]))},{path:"emotions",name:"/test/queues/emotions",component:()=>je(()=>import("./emotions-D8xwaz_1.js"),__vite__mapDeps([97,18,19,7,11,12,13,69,26]))},{path:"messages",name:"/test/queues/messages",component:()=>je(()=>import("./messages-DjywpylS.js"),__vite__mapDeps([98,18,19,7,11,12,13,69,26]))}]}]}],Qw=(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}}},n6={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},i6=n=>Qw(n6[n.toLowerCase()],6),s6=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,r6=n=>{let e;return(e=n.match(s6))?Qw(parseInt(e[1],16),e[1].length):void 0},_r="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",Xl=`${_r}%`,K_=`(?:${_r}%|${_r})`,o6=`(?:${_r}(deg|grad|rad|turn)|${_r})`,Na="\\s*,\\s*",a6=new RegExp(`^rgba?\\(\\s*${_r}${Na}${_r}${Na}${_r}\\s*(?:,\\s*${K_}\\s*)?\\)$`),l6=new RegExp(`^rgba?\\(\\s*${Xl}${Na}${Xl}${Na}${Xl}\\s*(?:,\\s*${K_}\\s*)?\\)$`),c6=n=>{let e={mode:"rgb"},t;if(t=n.match(a6))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(l6))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},u6=(n,e)=>n===void 0?void 0:typeof n!="object"?b6(n):n.mode!==void 0?n:e?{...n,mode:e}:void 0,eA=(n="rgb")=>e=>(e=u6(e,n))!==void 0?e.mode===n?e:Ji[e.mode][n]?Ji[e.mode][n](e):n==="rgb"?Ji[e.mode].rgb(e):Ji.rgb[n](Ji[e.mode].rgb(e)):void 0,Ji={},tA={},Oh=[],nA={},f6=n=>n,Tt=n=>(Ji[n.mode]={...Ji[n.mode],...n.toMode},Object.keys(n.fromMode||{}).forEach(e=>{Ji[e]||(Ji[e]={}),Ji[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=f6)}),tA[n.mode]=n,(n.parse||[]).forEach(e=>{d6(e,n.mode)}),eA(n.mode)),h6=n=>tA[n],d6=(n,e)=>{if(typeof n=="string"){if(!e)throw new Error("'mode' required when 'parser' is a string");nA[n]=e}else typeof n=="function"&&Oh.indexOf(n)<0&&Oh.push(n)},Qg=/[^\x00-\x7F]|[a-zA-Z_]/,p6=/[^\x00-\x7F]|[-\w]/,ye={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"};let Ze=0;function ff(n){let e=n[Ze],t=n[Ze+1];return e==="-"||e==="+"?/\d/.test(t)||t==="."&&/\d/.test(n[Ze+2]):e==="."?/\d/.test(t):/\d/.test(e)}function e0(n){if(Ze>=n.length)return!1;let e=n[Ze];if(Qg.test(e))return!0;if(e==="-"){if(n.length-Ze<2)return!1;let t=n[Ze+1];return!!(t==="-"||Qg.test(t))}return!1}const m6={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function dl(n){let e="";if((n[Ze]==="-"||n[Ze]==="+")&&(e+=n[Ze++]),e+=hf(n),n[Ze]==="."&&/\d/.test(n[Ze+1])&&(e+=n[Ze++]+hf(n)),(n[Ze]==="e"||n[Ze]==="E")&&((n[Ze+1]==="-"||n[Ze+1]==="+")&&/\d/.test(n[Ze+2])?e+=n[Ze++]+n[Ze++]+hf(n):/\d/.test(n[Ze+1])&&(e+=n[Ze++]+hf(n))),e0(n)){let t=Nh(n);return t==="deg"||t==="rad"||t==="turn"||t==="grad"?{type:ye.Hue,value:e*m6[t]}:void 0}return n[Ze]==="%"?(Ze++,{type:ye.Percentage,value:+e}):{type:ye.Number,value:+e}}function hf(n){let e="";for(;/\d/.test(n[Ze]);)e+=n[Ze++];return e}function Nh(n){let e="";for(;Ze{},Vi=Array.isArray,Vw=/#/g,Jz=/&/g,Qz=/\//g,eV=/=/g,tV=/\?/g,Hw=/\+/g,nV=/%5B/g,iV=/%5D/g,Gw=/%5E/g,sV=/%60/g,Ww=/%7B/g,rV=/%7C/g,Xw=/%7D/g,oV=/%20/g;function j_(n){return encodeURI(""+n).replace(rV,"|").replace(nV,"[").replace(iV,"]")}function aV(n){return j_(n).replace(Ww,"{").replace(Xw,"}").replace(Gw,"^")}function Zg(n){return j_(n).replace(Hw,"%2B").replace(oV,"+").replace(Vw,"%23").replace(Jz,"%26").replace(sV,"`").replace(Ww,"{").replace(Xw,"}").replace(Gw,"^")}function lV(n){return Zg(n).replace(eV,"%3D")}function cV(n){return j_(n).replace(Vw,"%23").replace(tV,"%3F")}function uV(n){return n==null?"":cV(n).replace(Qz,"%2F")}function Sc(n){try{return decodeURIComponent(""+n)}catch{}return""+n}const fV=/\/$/,hV=n=>n.replace(fV,"");function wm(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=gV(i??e,t),{fullPath:i+(r&&"?")+r+o,path:i,query:s,hash:Sc(o)}}function dV(n,e){const t=e.query?n(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function Tx(n,e){return!e||!n.toLowerCase().startsWith(e.toLowerCase())?n:n.slice(e.length)||"/"}function pV(n,e,t){const i=e.matched.length-1,s=t.matched.length-1;return i>-1&&i===s&&Da(e.matched[i],t.matched[s])&&$w(e.params,t.params)&&n(e.query)===n(t.query)&&e.hash===t.hash}function Da(n,e){return(n.aliasOf||n)===(e.aliasOf||e)}function $w(n,e){if(Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(!mV(n[t],e[t]))return!1;return!0}function mV(n,e){return Vi(n)?wx(n,e):Vi(e)?wx(e,n):n===e}function wx(n,e){return Vi(e)?n.length===e.length&&n.every((t,i)=>t===e[i]):n.length===1&&n[0]===e}function gV(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 ir={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Ec;(function(n){n.pop="pop",n.push="push"})(Ec||(Ec={}));var Wl;(function(n){n.back="back",n.forward="forward",n.unknown=""})(Wl||(Wl={}));function _V(n){if(!n)if(sa){const e=document.querySelector("base");n=e&&e.getAttribute("href")||"/",n=n.replace(/^\w+:\/\/[^\/]+/,"")}else n="/";return n[0]!=="/"&&n[0]!=="#"&&(n="/"+n),hV(n)}const vV=/^[^#]+#/;function yV(n,e){return n.replace(vV,"#")+e}function bV(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 Xd=()=>({left:window.scrollX,top:window.scrollY});function xV(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=bV(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 Ax(n,e){return(history.state?history.state.position-e:-1)+n}const Jg=new Map;function MV(n,e){Jg.set(n,e)}function SV(n){const e=Jg.get(n);return Jg.delete(n),e}let EV=()=>location.protocol+"//"+location.host;function qw(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),Tx(l,"")}return Tx(t,n)+i+s}function TV(n,e,t,i){let s=[],r=[],o=null;const a=({state:h})=>{const d=qw(n,location),p=t.value,_=e.value;let g=0;if(h){if(t.value=d,e.value=h,o&&o===p){o=null;return}g=_?h.position-_.position:0}else i(d);s.forEach(m=>{m(t.value,p,{delta:g,type:Ec.pop,direction:g?g>0?Wl.forward:Wl.back:Wl.unknown})})};function l(){o=t.value}function c(h){s.push(h);const d=()=>{const p=s.indexOf(h);p>-1&&s.splice(p,1)};return r.push(d),d}function u(){const{history:h}=window;h.state&&h.replaceState(St({},h.state,{scroll:Xd()}),"")}function f(){for(const h of r)h();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 Cx(n,e,t,i=!1,s=!1){return{back:n,current:e,forward:t,replaced:i,position:window.history.length,scroll:s?Xd():null}}function wV(n){const{history:e,location:t}=window,i={value:qw(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("#"),h=f>-1?(t.host&&document.querySelector("base")?n:n.slice(f))+l:EV()+n+l;try{e[u?"replaceState":"pushState"](c,"",h),s.value=c}catch(d){console.error(d),t[u?"replace":"assign"](h)}}function o(l,c){const u=St({},e.state,Cx(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=St({},s.value,e.state,{forward:l,scroll:Xd()});r(u.current,u,!0);const f=St({},Cx(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 AV(n){n=_V(n);const e=wV(n),t=TV(n,e.state,e.location,e.replace);function i(r,o=!0){o||t.pauseListeners(),history.go(r)}const s=St({location:"",base:n,go:i,createHref:yV.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 CV(n){return n=location.host?n||location.pathname+location.search:"",n.includes("#")||(n+="#"),AV(n)}function RV(n){return typeof n=="string"||n&&typeof n=="object"}function Yw(n){return typeof n=="string"||typeof n=="symbol"}const jw=Symbol("");var Rx;(function(n){n[n.aborted=4]="aborted",n[n.cancelled=8]="cancelled",n[n.duplicated=16]="duplicated"})(Rx||(Rx={}));function Oa(n,e){return St(new Error,{type:n,[jw]:!0},e)}function bs(n,e){return n instanceof Error&&jw in n&&(e==null||!!(n.type&e))}const Px="[^/]+?",PV={sensitive:!1,strict:!1,start:!0,end:!0},IV=/[.+*?^${}()[\]/\\]/g;function LV(n,e){const t=St({},PV,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 Kw(n,e){let t=0;const i=n.score,s=e.score;for(;t0&&e[e.length-1]<0}const OV={type:0,value:""},NV=/[a-zA-Z0-9_]/;function UV(n){if(!n)return[[]];if(n==="/")return[[OV]];if(!n.startsWith("/"))throw new Error(`Invalid path "${n}"`);function e(d){throw new Error(`ERR (${t})/"${c}": ${d}`)}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 h(){c+=l}for(;a{o(b)}:Gl}function o(f){if(Yw(f)){const h=i.get(f);h&&(i.delete(f),t.splice(t.indexOf(h),1),h.children.forEach(o),h.alias.forEach(o))}else{const h=t.indexOf(f);h>-1&&(t.splice(h,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 h=VV(f,t);t.splice(h,0,f),f.record.name&&!Ox(f)&&i.set(f.record.name,f)}function c(f,h){let d,p={},_,g;if("name"in f&&f.name){if(d=i.get(f.name),!d)throw Oa(1,{location:f});g=d.record.name,p=St(Lx(h.params,d.keys.filter(b=>!b.optional).concat(d.parent?d.parent.keys.filter(b=>b.optional):[]).map(b=>b.name)),f.params&&Lx(f.params,d.keys.map(b=>b.name))),_=d.stringify(p)}else if(f.path!=null)_=f.path,d=t.find(b=>b.re.test(_)),d&&(p=d.parse(_),g=d.record.name);else{if(d=h.name?i.get(h.name):t.find(b=>b.re.test(h.path)),!d)throw Oa(1,{location:f,currentLocation:h});g=d.record.name,p=St({},h.params,f.params),_=d.stringify(p)}const m=[];let v=d;for(;v;)m.unshift(v.record),v=v.parent;return{name:g,path:_,params:p,matched:m,meta:zV(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 Lx(n,e){const t={};for(const i of e)i in n&&(t[i]=n[i]);return t}function Dx(n){const e={path:n.path,redirect:n.redirect,name:n.name,meta:n.meta||{},aliasOf:n.aliasOf,beforeEnter:n.beforeEnter,props:BV(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 BV(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 Ox(n){for(;n;){if(n.record.aliasOf)return!0;n=n.parent}return!1}function zV(n){return n.reduce((e,t)=>St(e,t.meta),{})}function Nx(n,e){const t={};for(const i in n)t[i]=i in e?e[i]:n[i];return t}function VV(n,e){let t=0,i=e.length;for(;t!==i;){const r=t+i>>1;Kw(n,e[r])<0?i=r:t=r+1}const s=HV(n);return s&&(i=e.lastIndexOf(s,i-1)),i}function HV(n){let e=n;for(;e=e.parent;)if(Zw(e)&&Kw(n,e)===0)return e}function Zw({record:n}){return!!(n.name||n.components&&Object.keys(n.components).length||n.redirect)}function GV(n){const e={};if(n===""||n==="?")return e;const i=(n[0]==="?"?n.slice(1):n).split("&");for(let s=0;sr&&Zg(r)):[i&&Zg(i)]).forEach(r=>{r!==void 0&&(e+=(e.length?"&":"")+t,r!=null&&(e+="="+r))})}return e}function WV(n){const e={};for(const t in n){const i=n[t];i!==void 0&&(e[t]=Vi(i)?i.map(s=>s==null?null:""+s):i==null?i:""+i)}return e}const XV=Symbol(""),Fx=Symbol(""),$d=Symbol(""),K_=Symbol(""),Qg=Symbol("");function hl(){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 fr(n,e,t,i,s,r=o=>o()){const o=i&&(i.enterCallbacks[s]=i.enterCallbacks[s]||[]);return()=>new Promise((a,l)=>{const c=h=>{h===!1?l(Oa(4,{from:t,to:e})):h instanceof Error?l(h):RV(h)?l(Oa(2,{from:e,to:h})):(o&&i.enterCallbacks[s]===o&&typeof h=="function"&&o.push(h),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(h=>l(h))})}function Am(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(zw(l)){const u=(l.__vccOpts||l)[e];u&&r.push(fr(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=Zz(u)?u.default:u;o.mods[a]=u,o.components[a]=f;const d=(f.__vccOpts||f)[e];return d&&fr(d,t,i,o,a,s)()}))}}return r}function kx(n){const e=_n($d),t=_n(K_),i=Ee(()=>{const l=Ft(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 h=f.findIndex(Da.bind(null,u));if(h>-1)return h;const d=Bx(l[c-2]);return c>1&&Bx(u)===d&&f[f.length-1].path!==d?f.findIndex(Da.bind(null,l[c-2])):h}),r=Ee(()=>s.value>-1&&KV(t.params,i.value.params)),o=Ee(()=>s.value>-1&&s.value===t.matched.length-1&&$w(t.params,i.value.params));function a(l={}){if(jV(l)){const c=e[Ft(n.replace)?"replace":"push"](Ft(n.to)).catch(Gl);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 $V(n){return n.length===1?n[0]:n}const qV=hn({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"},viewTransition:Boolean},useLink:kx,setup(n,{slots:e}){const t=xi(kx(n)),{options:i}=_n($d),s=Ee(()=>({[zx(n.activeClass,i.linkActiveClass,"router-link-active")]:t.isActive,[zx(n.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const r=e.default&&$V(e.default(t));return n.custom?r:ks("a",{"aria-current":t.isExactActive?n.ariaCurrentValue:null,href:t.href,onClick:t.navigate,class:s.value},r)}}}),YV=qV;function jV(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 KV(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(!Vi(s)||s.length!==i.length||i.some((r,o)=>r!==s[o]))return!1}return!0}function Bx(n){return n?n.aliasOf?n.aliasOf.path:n.path:""}const zx=(n,e,t)=>n??e??t,ZV=hn({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(n,{attrs:e,slots:t}){const i=_n(Qg),s=Ee(()=>n.route||i.value),r=_n(Fx,0),o=Ee(()=>{let c=Ft(r);const{matched:u}=s.value;let f;for(;(f=u[c])&&!f.components;)c++;return c}),a=Ee(()=>s.value.matched[o.value]);gr(Fx,Ee(()=>o.value+1)),gr(XV,a),gr(Qg,s);const l=nt();return Ke(()=>[l.value,a.value,n.name],([c,u,f],[h,d,p])=>{u&&(u.instances[f]=c,d&&d!==u&&c&&c===h&&(u.leaveGuards.size||(u.leaveGuards=d.leaveGuards),u.updateGuards.size||(u.updateGuards=d.updateGuards))),c&&u&&(!d||!Da(u,d)||!h)&&(u.enterCallbacks[f]||[]).forEach(_=>_(c))},{flush:"post"}),()=>{const c=s.value,u=n.name,f=a.value,h=f&&f.components[u];if(!h)return Vx(t.default,{Component:h,route:c});const d=f.props[u],p=d?d===!0?c.params:typeof d=="function"?d(c):d:null,g=ks(h,St({},p,e,{onVnodeUnmounted:m=>{m.component.isUnmounted&&(f.instances[u]=null)},ref:l}));return Vx(t.default,{Component:g,route:c})||g}}});function Vx(n,e){if(!n)return null;const t=n(e);return t.length===1?t[0]:t}const Jw=ZV;function JV(n){const e=kV(n.routes,n),t=n.parseQuery||GV,i=n.stringifyQuery||Ux,s=n.history,r=hl(),o=hl(),a=hl(),l=Oe(ir);let c=ir;sa&&n.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Tm.bind(null,$=>""+$),f=Tm.bind(null,uV),h=Tm.bind(null,Sc);function d($,ae){let le,ue;return Yw($)?(le=e.getRecordMatcher($),ue=ae):ue=$,e.addRoute(ue,le)}function p($){const ae=e.getRecordMatcher($);ae&&e.removeRoute(ae)}function _(){return e.getRoutes().map($=>$.record)}function g($){return!!e.getRecordMatcher($)}function m($,ae){if(ae=St({},ae||l.value),typeof $=="string"){const A=wm(t,$,ae.path),W=e.resolve({path:A.path},ae),G=s.createHref(A.fullPath);return St(A,W,{params:h(W.params),hash:Sc(A.hash),redirectedFrom:void 0,href:G})}let le;if($.path!=null)le=St({},$,{path:wm(t,$.path,ae.path).path});else{const A=St({},$.params);for(const W in A)A[W]==null&&delete A[W];le=St({},$,{params:f(A)}),ae.params=f(ae.params)}const ue=e.resolve(le,ae),$e=$.hash||"";ue.params=u(h(ue.params));const N=dV(i,St({},$,{hash:aV($e),path:ue.path})),U=s.createHref(N);return St({fullPath:N,hash:$e,query:i===Ux?WV($.query):$.query||{}},ue,{redirectedFrom:void 0,href:U})}function v($){return typeof $=="string"?wm(t,$,l.value.path):St({},$)}function b($,ae){if(c!==$)return Oa(8,{from:ae,to:$})}function y($){return S($)}function T($){return y(St(v($),{replace:!0}))}function w($){const ae=$.matched[$.matched.length-1];if(ae&&ae.redirect){const{redirect:le}=ae;let ue=typeof le=="function"?le($):le;return typeof ue=="string"&&(ue=ue.includes("?")||ue.includes("#")?ue=v(ue):{path:ue},ue.params={}),St({query:$.query,hash:$.hash,params:ue.path!=null?{}:$.params},ue)}}function S($,ae){const le=c=m($),ue=l.value,$e=$.state,N=$.force,U=$.replace===!0,A=w(le);if(A)return S(St(v(A),{state:typeof A=="object"?St({},$e,A.state):$e,force:N,replace:U}),ae||le);const W=le;W.redirectedFrom=ae;let G;return!N&&pV(i,ue,le)&&(G=Oa(16,{to:W,from:ue}),re(ue,ue,!0,!1)),(G?Promise.resolve(G):E(W,ue)).catch(X=>bs(X)?bs(X,2)?X:Me(X):Z(X,W,ue)).then(X=>{if(X){if(bs(X,2))return S(St({replace:U},v(X.to),{state:typeof X.to=="object"?St({},$e,X.to.state):$e,force:N}),ae||W)}else X=B(W,ue,!0,U,$e);return D(W,ue,X),X})}function P($,ae){const le=b($,ae);return le?Promise.reject(le):Promise.resolve()}function M($){const ae=oe.values().next().value;return ae&&typeof ae.runWithContext=="function"?ae.runWithContext($):$()}function E($,ae){let le;const[ue,$e,N]=QV($,ae);le=Am(ue.reverse(),"beforeRouteLeave",$,ae);for(const A of ue)A.leaveGuards.forEach(W=>{le.push(fr(W,$,ae))});const U=P.bind(null,$,ae);return le.push(U),Se(le).then(()=>{le=[];for(const A of r.list())le.push(fr(A,$,ae));return le.push(U),Se(le)}).then(()=>{le=Am($e,"beforeRouteUpdate",$,ae);for(const A of $e)A.updateGuards.forEach(W=>{le.push(fr(W,$,ae))});return le.push(U),Se(le)}).then(()=>{le=[];for(const A of N)if(A.beforeEnter)if(Vi(A.beforeEnter))for(const W of A.beforeEnter)le.push(fr(W,$,ae));else le.push(fr(A.beforeEnter,$,ae));return le.push(U),Se(le)}).then(()=>($.matched.forEach(A=>A.enterCallbacks={}),le=Am(N,"beforeRouteEnter",$,ae,M),le.push(U),Se(le))).then(()=>{le=[];for(const A of o.list())le.push(fr(A,$,ae));return le.push(U),Se(le)}).catch(A=>bs(A,8)?A:Promise.reject(A))}function D($,ae,le){a.list().forEach(ue=>M(()=>ue($,ae,le)))}function B($,ae,le,ue,$e){const N=b($,ae);if(N)return N;const U=ae===ir,A=sa?history.state:{};le&&(ue||U?s.replace($.fullPath,St({scroll:U&&A&&A.scroll},$e)):s.push($.fullPath,$e)),l.value=$,re($,ae,le,U),Me()}let z;function V(){z||(z=s.listen(($,ae,le)=>{if(!ge.listening)return;const ue=m($),$e=w(ue);if($e){S(St($e,{replace:!0,force:!0}),ue).catch(Gl);return}c=ue;const N=l.value;sa&&MV(Ax(N.fullPath,le.delta),Xd()),E(ue,N).catch(U=>bs(U,12)?U:bs(U,2)?(S(St(v(U.to),{force:!0}),ue).then(A=>{bs(A,20)&&!le.delta&&le.type===Ec.pop&&s.go(-1,!1)}).catch(Gl),Promise.reject()):(le.delta&&s.go(-le.delta,!1),Z(U,ue,N))).then(U=>{U=U||B(ue,N,!1),U&&(le.delta&&!bs(U,8)?s.go(-le.delta,!1):le.type===Ec.pop&&bs(U,20)&&s.go(-1,!1)),D(ue,N,U)}).catch(Gl)}))}let Q=hl(),j=hl(),te;function Z($,ae,le){Me($);const ue=j.list();return ue.length?ue.forEach($e=>$e($,ae,le)):console.error($),Promise.reject($)}function pe(){return te&&l.value!==ir?Promise.resolve():new Promise(($,ae)=>{Q.add([$,ae])})}function Me($){return te||(te=!$,V(),Q.list().forEach(([ae,le])=>$?le($):ae()),Q.reset()),$}function re($,ae,le,ue){const{scrollBehavior:$e}=n;if(!sa||!$e)return Promise.resolve();const N=!le&&SV(Ax($.fullPath,0))||(ue||!le)&&history.state&&history.state.scroll||null;return Ar().then(()=>$e($,ae,N)).then(U=>U&&xV(U)).catch(U=>Z(U,$,ae))}const xe=$=>s.go($);let We;const oe=new Set,ge={currentRoute:l,listening:!0,addRoute:d,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:g,getRoutes:_,resolve:m,options:n,push:y,replace:T,go:xe,back:()=>xe(-1),forward:()=>xe(1),beforeEach:r.add,beforeResolve:o.add,afterEach:a.add,onError:j.add,isReady:pe,install($){const ae=this;$.component("RouterLink",YV),$.component("RouterView",Jw),$.config.globalProperties.$router=ae,Object.defineProperty($.config.globalProperties,"$route",{enumerable:!0,get:()=>Ft(l)}),sa&&!We&&l.value===ir&&(We=!0,y(s.location).catch($e=>{}));const le={};for(const $e in ir)Object.defineProperty(le,$e,{get:()=>l.value[$e],enumerable:!0});$.provide($d,ae),$.provide(K_,pS(le)),$.provide(Qg,l);const ue=$.unmount;oe.add($),$.unmount=function(){oe.delete($),oe.size<1&&(c=ir,z&&z(),z=null,l.value=ir,We=!1,te=!1),ue()}}};function Se($){return $.reduce((ae,le)=>ae.then(()=>M(le)),Promise.resolve())}return ge}function QV(n,e){const t=[],i=[],s=[],r=Math.max(e.matched.length,n.matched.length);for(let o=0;oDa(c,a))?i.push(a):t.push(a));const l=n.matched[o];l&&(e.matched.find(c=>Da(c,l))||s.push(l))}return[t,i,s]}function e6(){return _n($d)}function $G(n){return _n(K_)}const t6=[{path:"/",name:"/",component:()=>je(()=>import("./index-CJuuz-Er.js"),__vite__mapDeps([14,4,5,6,7,8,11,12,13,15,16,17,10,9,18,19,20,21,22,23,24,25,1,2,26,27,28])),meta:{layout:"stage",stageTransition:{name:"bubble-wave-out"}}},{path:"/:all(.*)",name:"/[...all]",component:()=>je(()=>import("./_...all_-DKgiSZB7.js"),[])},{path:"/audio",name:"/audio",component:()=>je(()=>import("./audio-D7Ph9Plm.js"),[])},{path:"/devtools",children:[{path:"background-remove",name:"/devtools/background-remove",component:()=>je(()=>import("./background-remove-DCzY1Ywz.js"),__vite__mapDeps([29,11,12,13,30]))},{path:"chat",name:"/devtools/chat",component:()=>je(()=>import("./chat-CystJIYZ.js"),__vite__mapDeps([31,20,10]))},{path:"image",name:"/devtools/image",component:()=>je(()=>import("./image-CsXvgIez.js"),__vite__mapDeps([32,33]))},{path:"vibrant",name:"/devtools/vibrant",component:()=>je(()=>import("./vibrant-CPrbAryE.js"),__vite__mapDeps([34,11,12,13,30,35]))}]},{path:"/queue",name:"/queue",component:()=>je(()=>import("./queue-CinxwIru.js"),__vite__mapDeps([36,18]))},{path:"/settings",children:[{path:"",name:"/settings/",component:()=>je(()=>import("./index-JeYrWqis.js"),__vite__mapDeps([37,4,5,6,7,8,38,11,12,13,39,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"airi-card",children:[{path:"",name:"/settings/airi-card/",component:()=>je(()=>import("./index-C0tBWPUO.js"),__vite__mapDeps([40,6,7,8,21,22,9,10,17,11,12,13,30,41,42,43,4,5,44,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"components",children:[{path:"CardDetailDialog",name:"/settings/airi-card/components/CardDetailDialog",component:()=>je(()=>import("./CardDetailDialog-Ctii3ZR5.js"),__vite__mapDeps([45,41,42,43,12,4,5,6,7,8,21,22,9,10,17,11,13]))},{path:"CardListItem",name:"/settings/airi-card/components/CardListItem",component:()=>je(()=>import("./CardListItem-xxyYJeZ6.js"),__vite__mapDeps([46,44,4,5,6,7,8,11,12,13]))},{path:"DeleteCardDialog",name:"/settings/airi-card/components/DeleteCardDialog",component:()=>je(()=>import("./DeleteCardDialog-XzegND5V.js"),__vite__mapDeps([47,42,43,12]))}]}]},{path:"appearance",children:[{path:"",name:"/settings/appearance/",component:()=>je(()=>import("./index-B9pSJh7u.js"),__vite__mapDeps([48,4,5,6,7,8,38,11,12,13,27])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}},{path:"color-scheme",name:"/settings/appearance/color-scheme",component:()=>je(()=>import("./color-scheme-D40fyZmU.js"),__vite__mapDeps([49,4,5,6,7,8,11,12,13,50,25,23,43,27,51])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"developer",name:"/settings/appearance/developer",component:()=>je(()=>import("./developer-DJ1vjJKn.js"),__vite__mapDeps([52,6,7,8,53,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"general",name:"/settings/appearance/general",component:()=>je(()=>import("./general-7kIpzqyc.js"),__vite__mapDeps([54,6,7,8,53,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}}]},{path:"memory",children:[{path:"",name:"/settings/memory/",component:()=>je(()=>import("./index-Cc3ob4SF.js"),__vite__mapDeps([55,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}}]},{path:"models",children:[{path:"",name:"/settings/models/",component:()=>je(()=>import("./index-DsBJhxAL.js"),__vite__mapDeps([56,4,5,24,6,7,8,11,12,13,35,39,50,25,23,43,57,27,58])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}}]},{path:"modules",children:[{path:"",name:"/settings/modules/",component:()=>je(()=>import("./index-B5issj2Y.js"),__vite__mapDeps([59,4,5,6,7,8,60,11,12,13,39,57,27])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}},{path:"consciousness",name:"/settings/modules/consciousness",component:()=>je(()=>import("./consciousness-B5gyBbNc.js"),__vite__mapDeps([61,4,5,6,7,8,22,9,10,11,12,13,62,23,63,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"memory-long-term",name:"/settings/modules/memory-long-term",component:()=>je(()=>import("./memory-long-term-CgAjfEjB.js"),__vite__mapDeps([64,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"memory-short-term",name:"/settings/modules/memory-short-term",component:()=>je(()=>import("./memory-short-term-DZTX9IKC.js"),__vite__mapDeps([65,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"speech",name:"/settings/modules/speech",component:()=>je(()=>import("./speech-DlPfM_Ny.js"),__vite__mapDeps([66,67,4,5,11,12,13,6,7,8,9,10,17,68,63,69,26,62,23,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}}]},{path:"providers",children:[{path:"",name:"/settings/providers/",component:()=>je(()=>import("./index-DWNTcdN1.js"),__vite__mapDeps([70,4,5,6,7,8,9,10,60,11,12,13,57,27])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}},{path:"alibaba-cloud-model-studio",name:"/settings/providers/alibaba-cloud-model-studio",component:()=>je(()=>import("./alibaba-cloud-model-studio-CNfGTHJE.js"),__vite__mapDeps([71,4,5,6,7,8,9,10,17,67,11,12,13,72,73,25,23,68,63,74,75,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"anthropic",name:"/settings/providers/anthropic",component:()=>je(()=>import("./anthropic-D75II3Mv.js"),__vite__mapDeps([76,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"cloudflare-workers-ai",name:"/settings/providers/cloudflare-workers-ai",component:()=>je(()=>import("./cloudflare-workers-ai-DSn9aJzJ.js"),__vite__mapDeps([78,4,5,6,7,8,9,10,11,12,13,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"deepseek",name:"/settings/providers/deepseek",component:()=>je(()=>import("./deepseek-BsGOJgV4.js"),__vite__mapDeps([79,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"elevenlabs",name:"/settings/providers/elevenlabs",component:()=>je(()=>import("./elevenlabs-r991UKpt.js"),__vite__mapDeps([80,4,5,6,7,8,9,10,17,67,11,12,13,72,73,25,23,68,63,74,75,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"featherless-ai",name:"/settings/providers/featherless-ai",component:()=>je(()=>import("./featherless-ai-DRAEh1Lo.js"),__vite__mapDeps([81,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"fireworks-ai",name:"/settings/providers/fireworks-ai",component:()=>je(()=>import("./fireworks-ai-BDydk9EO.js"),__vite__mapDeps([82,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"google-generative-ai",name:"/settings/providers/google-generative-ai",component:()=>je(()=>import("./google-generative-ai-B2OoQF6b.js"),__vite__mapDeps([83,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"microsoft-speech",name:"/settings/providers/microsoft-speech",component:()=>je(()=>import("./microsoft-speech-DxAcOoH7.js"),__vite__mapDeps([84,4,5,6,7,8,9,10,17,68,63,67,11,12,13,72,73,25,23,74,75,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"mistral-ai",name:"/settings/providers/mistral-ai",component:()=>je(()=>import("./mistral-ai-D8qXGKsB.js"),__vite__mapDeps([85,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"moonshot-ai",name:"/settings/providers/moonshot-ai",component:()=>je(()=>import("./moonshot-ai-CRj24ObM.js"),__vite__mapDeps([86,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"novita-ai",name:"/settings/providers/novita-ai",component:()=>je(()=>import("./novita-ai-NAISe4Y1.js"),__vite__mapDeps([87,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"ollama",name:"/settings/providers/ollama",component:()=>je(()=>import("./ollama-CtNL55u8.js"),__vite__mapDeps([88,4,5,6,7,8,9,10,63,11,12,13,73,25,23,68,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"openai",name:"/settings/providers/openai",component:()=>je(()=>import("./openai-Ddfv1hoL.js"),__vite__mapDeps([89,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"openrouter-ai",name:"/settings/providers/openrouter-ai",component:()=>je(()=>import("./openrouter-ai-CICLfTef.js"),__vite__mapDeps([90,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"together-ai",name:"/settings/providers/together-ai",component:()=>je(()=>import("./together-ai-BuHN4yhy.js"),__vite__mapDeps([91,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"volcengine",name:"/settings/providers/volcengine",component:()=>je(()=>import("./volcengine-fxYOCPSz.js"),__vite__mapDeps([92,4,5,6,7,8,9,10,17,68,63,67,11,12,13,72,73,25,23,74,75,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"xai",name:"/settings/providers/xai",component:()=>je(()=>import("./xai-CVnaViqS.js"),__vite__mapDeps([93,4,5,6,7,8,9,10,11,12,13,73,25,23,68,63,74,75,77,27])),meta:{layout:"settings",stageTransition:{name:"slide"}}}]},{path:"scene",children:[{path:"",name:"/settings/scene/",component:()=>je(()=>import("./index-DLewWnu4.js"),__vite__mapDeps([94,57,6,7,8,27])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}}]}]},{path:"/test",children:[{path:"filter-message",name:"/test/filter-message",component:()=>je(()=>import("./filter-message-BFrVJwR3.js"),__vite__mapDeps([95,11,12,13,69,26]))},{path:"queues",children:[{path:"delays",name:"/test/queues/delays",component:()=>je(()=>import("./delays-Cvf4yi9y.js"),__vite__mapDeps([96,6,19,7,18,11,12,13,69,26]))},{path:"emotions",name:"/test/queues/emotions",component:()=>je(()=>import("./emotions-Dfjh5aBn.js"),__vite__mapDeps([97,18,19,7,11,12,13,69,26]))},{path:"messages",name:"/test/queues/messages",component:()=>je(()=>import("./messages-CxOqkV_c.js"),__vite__mapDeps([98,18,19,7,11,12,13,69,26]))}]}]}],Qw=(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}}},n6={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},i6=n=>Qw(n6[n.toLowerCase()],6),s6=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,r6=n=>{let e;return(e=n.match(s6))?Qw(parseInt(e[1],16),e[1].length):void 0},_r="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",Xl=`${_r}%`,Z_=`(?:${_r}%|${_r})`,o6=`(?:${_r}(deg|grad|rad|turn)|${_r})`,Na="\\s*,\\s*",a6=new RegExp(`^rgba?\\(\\s*${_r}${Na}${_r}${Na}${_r}\\s*(?:,\\s*${Z_}\\s*)?\\)$`),l6=new RegExp(`^rgba?\\(\\s*${Xl}${Na}${Xl}${Na}${Xl}\\s*(?:,\\s*${Z_}\\s*)?\\)$`),c6=n=>{let e={mode:"rgb"},t;if(t=n.match(a6))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(l6))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},u6=(n,e)=>n===void 0?void 0:typeof n!="object"?b6(n):n.mode!==void 0?n:e?{...n,mode:e}:void 0,eA=(n="rgb")=>e=>(e=u6(e,n))!==void 0?e.mode===n?e:Ji[e.mode][n]?Ji[e.mode][n](e):n==="rgb"?Ji[e.mode].rgb(e):Ji.rgb[n](Ji[e.mode].rgb(e)):void 0,Ji={},tA={},Oh=[],nA={},f6=n=>n,Tt=n=>(Ji[n.mode]={...Ji[n.mode],...n.toMode},Object.keys(n.fromMode||{}).forEach(e=>{Ji[e]||(Ji[e]={}),Ji[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=f6)}),tA[n.mode]=n,(n.parse||[]).forEach(e=>{d6(e,n.mode)}),eA(n.mode)),h6=n=>tA[n],d6=(n,e)=>{if(typeof n=="string"){if(!e)throw new Error("'mode' required when 'parser' is a string");nA[n]=e}else typeof n=="function"&&Oh.indexOf(n)<0&&Oh.push(n)},e0=/[^\x00-\x7F]|[a-zA-Z_]/,p6=/[^\x00-\x7F]|[-\w]/,ye={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"};let Ze=0;function ff(n){let e=n[Ze],t=n[Ze+1];return e==="-"||e==="+"?/\d/.test(t)||t==="."&&/\d/.test(n[Ze+2]):e==="."?/\d/.test(t):/\d/.test(e)}function t0(n){if(Ze>=n.length)return!1;let e=n[Ze];if(e0.test(e))return!0;if(e==="-"){if(n.length-Ze<2)return!1;let t=n[Ze+1];return!!(t==="-"||e0.test(t))}return!1}const m6={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function dl(n){let e="";if((n[Ze]==="-"||n[Ze]==="+")&&(e+=n[Ze++]),e+=hf(n),n[Ze]==="."&&/\d/.test(n[Ze+1])&&(e+=n[Ze++]+hf(n)),(n[Ze]==="e"||n[Ze]==="E")&&((n[Ze+1]==="-"||n[Ze+1]==="+")&&/\d/.test(n[Ze+2])?e+=n[Ze++]+n[Ze++]+hf(n):/\d/.test(n[Ze+1])&&(e+=n[Ze++]+hf(n))),t0(n)){let t=Nh(n);return t==="deg"||t==="rad"||t==="turn"||t==="grad"?{type:ye.Hue,value:e*m6[t]}:void 0}return n[Ze]==="%"?(Ze++,{type:ye.Percentage,value:+e}):{type:ye.Number,value:+e}}function hf(n){let e="";for(;/\d/.test(n[Ze]);)e+=n[Ze++];return e}function Nh(n){let e="";for(;Ze4)){if(t.length===4){if(t[3].type!==ye.Alpha)return;t[3]=t[3].value}return t.length===3&&t.push({type:ye.None,value:void 0}),t.every(s=>s.type!==ye.Alpha)?t:void 0}}function y6(n,e){n._i=0;let t=n[n._i++];if(!t||t.type!==ye.Function)return;let i=iA(n,e);if(i)return i.unshift(t.value),i}const b6=n=>{if(typeof n!="string")return;const e=_6(n),t=e?y6(e,!0):void 0;let i,s=0,r=Oh.length;for(;sn==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,S6=(n,e,t)=>n+t*(e-n),E6=n=>{let e=[];for(let t=0;te=>{let t=E6(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)}},Ce=T6(S6),an=n=>{let e=!1,t=n.map(i=>i!==void 0?(e=!0,i):1);return e?t:n},$a={mode:"rgb",channels:["r","g","b","alpha"],parse:[x6,r6,c6,i6,M6,"srgb"],serialize:"srgb",interpolate:{r:Ce,g:Ce,b:Ce,alpha:{use:Ce,fixup:an}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},Am=(n=0)=>Math.pow(Math.abs(n),563/256)*Math.sign(n),Hx=n=>{let e=Am(n.r),t=Am(n.g),i=Am(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},Cm=n=>Math.pow(Math.abs(n),256/563)*Math.sign(n),Gx=({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:Cm(n*2.0415879038107465-e*.5650069742788597-.3447313507783297*t),g:Cm(n*-.9692436362808798+e*1.8759675015077206+.0415550574071756*t),b:Cm(n*.0134442806320312-e*.1183623922310184+1.0151749943912058*t)};return i!==void 0&&(s.alpha=i),s},Rm=(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)},qa=({r:n,g:e,b:t,alpha:i})=>{let s={mode:"lrgb",r:Rm(n),g:Rm(e),b:Rm(t)};return i!==void 0&&(s.alpha=i),s},Do=n=>{let{r:e,g:t,b:i,alpha:s}=qa(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},Pm=(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},Ya=({r:n,g:e,b:t,alpha:i},s="rgb")=>{let r={mode:s,r:Pm(n),g:Pm(e),b:Pm(t)};return i!==void 0&&(r.alpha=i),r},Oo=({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=Ya({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},w6={...$a,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:n=>Gx(Do(n)),xyz65:Gx},toMode:{rgb:n=>Oo(Hx(n)),xyz65:Hx}},xn=n=>(n=n%360)<0?n+360:n,A6=(n,e)=>n.map((t,i,s)=>{if(t===void 0)return t;let r=xn(t);return i===0||n[i-1]===void 0?r:e(r-xn(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),[]),qs=n=>A6(n,e=>Math.abs(e)<=180?e:e-360*Math.sign(e)),cn=[-.14861,1.78277,-.29227,-.90649,1.97294,0],C6=Math.PI/180,R6=180/Math.PI;let Wx=cn[3]*cn[4],Xx=cn[1]*cn[4],$x=cn[1]*cn[2]-cn[0]*cn[3];const P6=({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=($x*t+n*Wx-e*Xx)/($x+Wx-Xx),r=t-s,o=(cn[4]*(e-s)-cn[2]*r)/cn[3],a={mode:"cubehelix",l:s,s:s===0||s===1?void 0:Math.sqrt(r*r+o*o)/(cn[4]*s*(1-s))};return a.s&&(a.h=Math.atan2(o,r)*R6-120),i!==void 0&&(a.alpha=i),a},I6=({h:n,s:e,l:t,alpha:i})=>{let s={mode:"rgb"};n=(n===void 0?0:n+120)*C6,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*(cn[0]*o+cn[1]*a),s.g=t+r*(cn[2]*o+cn[3]*a),s.b=t+r*(cn[4]*o+cn[5]*a),i!==void 0&&(s.alpha=i),s},qd=(n,e)=>{if(n.h===void 0||e.h===void 0||!n.s||!e.s)return 0;let t=xn(n.h),i=xn(e.h),s=Math.sin((i-t+360)/2*Math.PI/180);return 2*Math.sqrt(n.s*e.s)*s},L6=(n,e)=>{if(n.h===void 0||e.h===void 0)return 0;let t=xn(n.h),i=xn(e.h);return Math.abs(i-t)>180?t-(i-360*Math.sign(i-t)):i-t},Yd=(n,e)=>{if(n.h===void 0||e.h===void 0||!n.c||!e.c)return 0;let t=xn(n.h),i=xn(e.h),s=Math.sin((i-t+360)/2*Math.PI/180);return 2*Math.sqrt(n.c*e.c)*s},Ys=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},D6={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:P6},toMode:{rgb:I6},interpolate:{h:{use:Ce,fixup:qs},s:Ce,l:Ce,alpha:{use:Ce,fixup:an}},difference:{h:qd},average:{h:Ys}},Tr=({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=xn(Math.atan2(t,e)*180/Math.PI)),i!==void 0&&(o.alpha=i),o},wr=({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},sA=Math.pow(29,3)/Math.pow(3,3),rA=Math.pow(6,3)/Math.pow(29,3),en={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},ya={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329};let Im=n=>Math.pow(n,3)>rA?Math.pow(n,3):(116*n-16)/sA;const oA=({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:Im(r)*ya.X,y:Im(s)*ya.Y,z:Im(o)*ya.Z};return i!==void 0&&(a.alpha=i),a},jd=n=>Oo(oA(n)),Lm=n=>n>rA?Math.cbrt(n):(sA*n+16)/116,aA=({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=Lm(n/ya.X),r=Lm(e/ya.Y),o=Lm(t/ya.Z),a={mode:"lab65",l:116*r-16,a:500*(s-r),b:200*(r-o)};return i!==void 0&&(a.alpha=i),a},Kd=n=>{let e=aA(Do(n));return n.r===n.b&&n.b===n.g&&(e.a=e.b=0),e},Uh=1,lA=1,Tc=26/180*Math.PI,Fh=Math.cos(Tc),kh=Math.sin(Tc),cA=100/Math.log(139/100),t0=({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*Uh/cA)-1)/.0039},r=(Math.exp(.0435*e*lA*Uh)-1)/.075,o=r*Math.cos(t/180*Math.PI-Tc),a=r*Math.sin(t/180*Math.PI-Tc);return s.a=o*Fh-a/.83*kh,s.b=o*kh+a/.83*Fh,i!==void 0&&(s.alpha=i),s},n0=({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*Fh+t*kh,r=.83*(t*Fh-e*kh),o=Math.sqrt(s*s+r*r),a={mode:"dlch",l:cA/Uh*Math.log(1+.0039*n),c:Math.log(1+.075*o)/(.0435*lA*Uh)};return a.c&&(a.h=xn((Math.atan2(r,s)+Tc)/Math.PI*180)),i!==void 0&&(a.alpha=i),a},qx=n=>t0(Tr(n,"dlch")),Yx=n=>wr(n0(n),"dlab"),O6={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:qx,rgb:n=>jd(qx(n))},fromMode:{lab65:Yx,rgb:n=>Yx(Kd(n))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:Ce,a:Ce,b:Ce,alpha:{use:Ce,fixup:an}}},N6={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:t0,dlab:n=>wr(n,"dlab"),rgb:n=>jd(t0(n))},fromMode:{lab65:n0,dlab:n=>Tr(n,"dlch"),rgb:n=>n0(Kd(n))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:Ce,c:Ce,h:{use:Ce,fixup:qs},alpha:{use:Ce,fixup:an}},difference:{h:Yd},average:{h:Ys}};function U6({h:n,s:e,i:t,alpha:i}){n=xn(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 F6({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}},H6=new RegExp(`^hsla?\\(\\s*${o6}${Na}${Xl}${Na}${Xl}\\s*(?:,\\s*${K_}\\s*)?\\)$`),G6=n=>{let e=n.match(H6);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=V6(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 W6(n,e){if(!e||e[0]!=="hsl"&&e[0]!=="hsla")return;const t={mode:"hsl"},[,i,s,r,o]=e;if(i.type!==ye.None){if(i.type===ye.Percentage)return;t.h=i.value}if(s.type!==ye.None){if(s.type===ye.Hue)return;t.s=s.value/100}if(r.type!==ye.None){if(r.type===ye.Hue)return;t.l=r.value/100}return o.type!==ye.None&&(t.alpha=Math.min(1,Math.max(0,o.type===ye.Number?o.value:o.value/100))),t}const uA={mode:"hsl",toMode:{rgb:B6},fromMode:{rgb:z6},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[W6,G6],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:Ce,fixup:qs},s:Ce,l:Ce,alpha:{use:Ce,fixup:an}},difference:{h:qd},average:{h:Ys}};function fA({h:n,s:e,v:t,alpha:i}){n=xn(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 hA({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 fA({h:n,s:t===1?1:1-e/(1-t),v:1-t,alpha:i})}function $6(n){let e=hA(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 q6(n,e){if(!e||e[0]!=="hwb")return;const t={mode:"hwb"},[,i,s,r,o]=e;if(i.type!==ye.None){if(i.type===ye.Percentage)return;t.h=i.value}if(s.type!==ye.None){if(s.type===ye.Hue)return;t.w=s.value/100}if(r.type!==ye.None){if(r.type===ye.Hue)return;t.b=r.value/100}return o.type!==ye.None&&(t.alpha=Math.min(1,Math.max(0,o.type===ye.Number?o.value:o.value/100))),t}const Y6={mode:"hwb",toMode:{rgb:X6},fromMode:{rgb:$6},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[q6],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:Ce,fixup:qs},w:Ce,b:Ce,alpha:{use:Ce,fixup:an}},difference:{h:L6},average:{h:Ys}},pA=203,Zd=.1593017578125,mA=78.84375,Jd=.8359375,Qd=18.8515625,ep=18.6875;function Dm(n){if(n<0)return 0;const e=Math.pow(n,1/mA);return 1e4*Math.pow(Math.max(0,e-Jd)/(Qd-ep*e),1/Zd)}function Om(n){if(n<0)return 0;const e=Math.pow(n/1e4,Zd);return Math.pow((Jd+Qd*e)/(1+ep*e),mA)}const Nm=n=>Math.max(n/pA,0),jx=({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=Dm(n+.008609037037932761*e+.11102962500302593*t),r=Dm(n-.00860903703793275*e-.11102962500302599*t),o=Dm(n+.5600313357106791*e-.32062717498731885*t),a={mode:"xyz65",x:Nm(2.070152218389422*s-1.3263473389671556*r+.2066510476294051*o),y:Nm(.3647385209748074*s+.680566024947227*r-.0453045459220346*o),z:Nm(-.049747207535812*s-.0492609666966138*r+1.1880659249923042*o)};return i!==void 0&&(a.alpha=i),a},Um=(n=0)=>Math.max(n*pA,0),Kx=({x:n,y:e,z:t,alpha:i})=>{const s=Um(n),r=Um(e),o=Um(t),a=Om(.3592832590121217*s+.6976051147779502*r-.0358915932320289*o),l=Om(-.1920808463704995*s+1.1004767970374323*r+.0753748658519118*o),c=Om(.0070797844607477*s+.0748396662186366*r+.8433265453898765*o),u=.5*a+.5*l,f=1.61376953125*a-3.323486328125*l+1.709716796875*c,h=4.378173828125*a-4.24560546875*l-.132568359375*c,d={mode:"itp",i:u,t:f,p:h};return i!==void 0&&(d.alpha=i),d},j6={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:jx,rgb:n=>Oo(jx(n))},fromMode:{xyz65:Kx,rgb:n=>Kx(Do(n))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:Ce,t:Ce,p:Ce,alpha:{use:Ce,fixup:an}}},K6=134.03437499999998,Z6=16295499532821565e-27,Fm=n=>{if(n<0)return 0;let e=Math.pow(n/1e4,Zd);return Math.pow((Jd+Qd*e)/(1+ep*e),K6)},km=(n=0)=>Math.max(n*203,0),gA=({x:n,y:e,z:t,alpha:i})=>{n=km(n),e=km(e),t=km(t);let s=1.15*n-.15*t,r=.66*e+.34*n,o=Fm(.41478972*s+.579999*r+.014648*t),a=Fm(-.20151*s+1.120649*r+.0531008*t),l=Fm(-.0166008*s+.2648*r+.6684799*t),c=(o+a)/2,u={mode:"jab",j:.44*c/(1-.56*c)-Z6,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},J6=134.03437499999998,Zx=16295499532821565e-27,Bm=n=>{if(n<0)return 0;let e=Math.pow(n,1/J6);return 1e4*Math.pow((Jd-e)/(ep*e-Qd),1/Zd)},zm=n=>n/203,_A=({j:n,a:e,b:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=(n+Zx)/(.44+.56*(n+Zx)),r=Bm(s+.13860504*e+.058047316*t),o=Bm(s-.13860504*e-.058047316*t),a=Bm(s-.096019242*e-.8118919*t),l={mode:"xyz65",x:zm(1.661373024652174*r-.914523081304348*o+.23136208173913045*a),y:zm(-.3250758611844533*r+1.571847026732543*o-.21825383453227928*a),z:zm(-.090982811*r-.31272829*o+1.5227666*a)};return i!==void 0&&(l.alpha=i),l},vA=n=>{let e=gA(Do(n));return n.r===n.b&&n.b===n.g&&(e.a=e.b=0),e},yA=n=>Oo(_A(n)),Q6={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:vA,xyz65:gA},toMode:{rgb:yA,xyz65:_A},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:Ce,a:Ce,b:Ce,alpha:{use:Ce,fixup:an}}},Jx=({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=xn(Math.atan2(t,e)*180/Math.PI)),i!==void 0&&(r.alpha=i),r},Qx=({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},eH={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Qx,rgb:n=>yA(Qx(n))},fromMode:{rgb:n=>Jx(vA(n)),jab:Jx},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:Ce,fixup:qs},c:Ce,j:Ce,alpha:{use:Ce,fixup:an}},difference:{h:Yd},average:{h:Ys}},tp=Math.pow(29,3)/Math.pow(3,3),Z_=Math.pow(6,3)/Math.pow(29,3);let Vm=n=>Math.pow(n,3)>Z_?Math.pow(n,3):(116*n-16)/tp;const J_=({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:Vm(r)*en.X,y:Vm(s)*en.Y,z:Vm(o)*en.Z};return i!==void 0&&(a.alpha=i),a},Qc=({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=Ya({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},bA=n=>Qc(J_(n)),eu=n=>{let{r:e,g:t,b:i,alpha:s}=qa(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},Hm=n=>n>Z_?Math.cbrt(n):(tp*n+16)/116,Q_=({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=Hm(n/en.X),r=Hm(e/en.Y),o=Hm(t/en.Z),a={mode:"lab",l:116*r-16,a:500*(s-r),b:200*(r-o)};return i!==void 0&&(a.alpha=i),a},xA=n=>{let e=Q_(eu(n));return n.r===n.b&&n.b===n.g&&(e.a=e.b=0),e};function tH(n,e){if(!e||e[0]!=="lab")return;const t={mode:"lab"},[,i,s,r,o]=e;if(!(i.type===ye.Hue||s.type===ye.Hue||r.type===ye.Hue))return i.type!==ye.None&&(t.l=Math.min(Math.max(0,i.value),100)),s.type!==ye.None&&(t.a=s.type===ye.Number?s.value:s.value*125/100),r.type!==ye.None&&(t.b=r.type===ye.Number?r.value:r.value*125/100),o.type!==ye.None&&(t.alpha=Math.min(1,Math.max(0,o.type===ye.Number?o.value:o.value/100))),t}const ev={mode:"lab",toMode:{xyz50:J_,rgb:bA},fromMode:{xyz50:Q_,rgb:xA},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-100,100],b:[-100,100]},parse:[tH],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:Ce,a:Ce,b:Ce,alpha:{use:Ce,fixup:an}}},nH={...ev,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:oA,rgb:jd},fromMode:{xyz65:aA,rgb:Kd},ranges:{l:[0,100],a:[-86.182,98.234],b:[-107.86,94.477]}};function iH(n,e){if(!e||e[0]!=="lch")return;const t={mode:"lch"},[,i,s,r,o]=e;if(i.type!==ye.None){if(i.type===ye.Hue)return;t.l=Math.min(Math.max(0,i.value),100)}if(s.type!==ye.None&&(t.c=Math.max(0,s.type===ye.Number?s.value:s.value*150/100)),r.type!==ye.None){if(r.type===ye.Percentage)return;t.h=r.value}return o.type!==ye.None&&(t.alpha=Math.min(1,Math.max(0,o.type===ye.Number?o.value:o.value/100))),t}const tv={mode:"lch",toMode:{lab:wr,rgb:n=>bA(wr(n))},fromMode:{rgb:n=>Tr(xA(n)),lab:Tr},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[iH],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:Ce,fixup:qs},c:Ce,l:Ce,alpha:{use:Ce,fixup:an}},difference:{h:Yd},average:{h:Ys}},sH={...tv,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:n=>wr(n,"lab65"),rgb:n=>jd(wr(n,"lab65"))},fromMode:{rgb:n=>Tr(Kd(n),"lch65"),lab65:n=>Tr(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=xn(Math.atan2(t,e)*180/Math.PI)),i!==void 0&&(r.alpha=i),r},SA=({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},EA=(n,e,t)=>4*n/(n+15*e+3*t),TA=(n,e,t)=>9*e/(n+15*e+3*t),rH=EA(en.X,en.Y,en.Z),oH=TA(en.X,en.Y,en.Z),aH=n=>n<=Z_?tp*n:116*Math.cbrt(n)-16,i0=({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=aH(e/en.Y),r=EA(n,e,t),o=TA(n,e,t);!isFinite(r)||!isFinite(o)?s=r=o=0:(r=13*s*(r-rH),o=13*s*(o-oH));let a={mode:"luv",l:s,u:r,v:o};return i!==void 0&&(a.alpha=i),a},lH=(n,e,t)=>4*n/(n+15*e+3*t),cH=(n,e,t)=>9*e/(n+15*e+3*t),uH=lH(en.X,en.Y,en.Z),fH=cH(en.X,en.Y,en.Z),s0=({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)+uH,r=t/(13*n)+fH,o=en.Y*(n<=8?n/tp: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},hH=n=>MA(i0(eu(n))),dH=n=>Qc(s0(SA(n))),pH={mode:"lchuv",toMode:{luv:SA,rgb:dH},fromMode:{rgb:hH,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:Ce,fixup:qs},c:Ce,l:Ce,alpha:{use:Ce,fixup:an}},difference:{h:Yd},average:{h:Ys}},mH={...$a,mode:"lrgb",toMode:{rgb:Ya},fromMode:{rgb:qa},parse:["srgb-linear"],serialize:"srgb-linear"},gH={mode:"luv",toMode:{xyz50:s0,rgb:n=>Qc(s0(n))},fromMode:{xyz50:i0,rgb:n=>i0(eu(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:Ce,u:Ce,v:Ce,alpha:{use:Ce,fixup:an}}},wA=({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},np=n=>{let e=wA(qa(n));return n.r===n.b&&n.b===n.g&&(e.a=e.b=0),e},tu=({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},ip=n=>Ya(tu(n));function r0(n){const i=1.170873786407767;return .5*(i*n-.206+Math.sqrt((i*n-.206)*(i*n-.206)+4*.03*i*n))}function Bh(n){return(n*n+.206*n)/(1.170873786407767*(n+.03))}function _H(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,h=-.1055613458*n-.0638541728*e,d=-.0894841775*n-1.291485548*e;{let p=1+u*f,_=1+u*h,g=1+u*d,m=p*p*p,v=_*_*_,b=g*g*g,y=3*f*p*p,T=3*h*_*_,w=3*d*g*g,S=6*f*f*p,P=6*h*h*_,M=6*d*d*g,E=a*m+l*v+c*b,D=a*y+l*T+c*w,B=a*S+l*P+c*M;u=u-E*D/(D*D-.5*E*B)}return u}function nv(n,e){let t=_H(n,e),i=tu({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 vH(n,e,t,i,s,r=null){r||(r=nv(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,h=a+l*c,d=a+l*u,p=a+l*f;{let _=s*(1-o)+o*t,g=o*i,m=_+g*c,v=_+g*u,b=_+g*f,y=m*m*m,T=v*v*v,w=b*b*b,S=3*h*m*m,P=3*d*v*v,M=3*p*b*b,E=6*h*h*m,D=6*d*d*v,B=6*p*p*b,z=4.0767416621*y-3.3077115913*T+.2309699292*w-1,V=4.0767416621*S-3.3077115913*P+.2309699292*M,Q=4.0767416621*E-3.3077115913*D+.2309699292*B,j=V/(V*V-.5*z*Q),te=-z*j,Z=-1.2684380046*y+2.6097574011*T-.3413193965*w-1,pe=-1.2684380046*S+2.6097574011*P-.3413193965*M,Me=-1.2684380046*E+2.6097574011*D-.3413193965*B,re=pe/(pe*pe-.5*Z*Me),xe=-Z*re,We=-.0041960863*y-.7034186147*T+1.707614701*w-1,oe=-.0041960863*S-.7034186147*P+1.707614701*M,ge=-.0041960863*E-.7034186147*D+1.707614701*B,Se=oe/(oe*oe-.5*We*ge),$=-We*Se;te=j>=0?te:1e6,xe=re>=0?xe:1e6,$=Se>=0?$:1e6,o+=Math.min(te,Math.min(xe,$))}}}return o}function iv(n,e,t=null){t||(t=nv(n,e));let i=t[0],s=t[1];return[s/i,s/(1-i)]}function AA(n,e,t){let i=nv(e,t),s=vH(e,t,n,1,n,i),r=iv(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 eM(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:r0(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]=AA(e,t/r,i/r),c;if(reM(np(n))},toMode:{oklab:tM,rgb:n=>ip(tM(n))}};function nM(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]=iv(r,o),c=.5,u=1-c/a,f=l/(s+e*l),h=f*e,d=f*s,p=Bh(h),_=d*p/h,g=tu({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*r0(e)/e,e=r0(e);const v={mode:"okhsv",s:s?(c+l)*d/(l*c+l*u*d):0,v:e?e/h:0};return v.s&&(v.h=xn(Math.atan2(i,t)*180/Math.PI)),n.alpha!==void 0&&(v.alpha=n.alpha),v}function iM(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]=iv(r,o),c=.5,u=1-c/a,f=1-i*c/(c+l-l*u*i),h=i*l*c/(c+l-l*u*i),d=Bh(f),p=h*d/f,_=tu({l:d,a:r*p,b:o*p}),g=Math.cbrt(1/Math.max(_.r,_.g,_.b,0)),m=Bh(s*f),v=h*m/f;return e.l=m*g,e.a=v*r*g,e.b=v*o*g,e}const bH={...dA,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:nM,rgb:n=>nM(np(n))},toMode:{oklab:iM,rgb:n=>ip(iM(n))}};function xH(n,e){if(!e||e[0]!=="oklab")return;const t={mode:"oklab"},[,i,s,r,o]=e;if(!(i.type===ye.Hue||s.type===ye.Hue||r.type===ye.Hue))return i.type!==ye.None&&(t.l=Math.min(Math.max(0,i.type===ye.Number?i.value:i.value/100),1)),s.type!==ye.None&&(t.a=s.type===ye.Number?s.value:s.value*.4/100),r.type!==ye.None&&(t.b=r.type===ye.Number?r.value:r.value*.4/100),o.type!==ye.None&&(t.alpha=Math.min(1,Math.max(0,o.type===ye.Number?o.value:o.value/100))),t}const MH={...ev,mode:"oklab",toMode:{lrgb:tu,rgb:ip},fromMode:{lrgb:wA,rgb:np},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[xH],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 SH(n,e){if(!e||e[0]!=="oklch")return;const t={mode:"oklch"},[,i,s,r,o]=e;if(i.type!==ye.None){if(i.type===ye.Hue)return;t.l=Math.min(Math.max(0,i.type===ye.Number?i.value:i.value/100),1)}if(s.type!==ye.None&&(t.c=Math.max(0,s.type===ye.Number?s.value:s.value*.4/100)),r.type!==ye.None){if(r.type===ye.Percentage)return;t.h=r.value}return o.type!==ye.None&&(t.alpha=Math.min(1,Math.max(0,o.type===ye.Number?o.value:o.value/100))),t}const EH={...tv,mode:"oklch",toMode:{oklab:n=>wr(n,"oklab"),rgb:n=>ip(wr(n,"oklab"))},fromMode:{rgb:n=>Tr(np(n),"oklch"),oklab:n=>Tr(n,"oklch")},parse:[SH],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]}},sM=n=>{let{r:e,g:t,b:i,alpha:s}=qa(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},rM=({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=Ya({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},TH={...$a,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:n=>rM(Do(n)),xyz65:rM},toMode:{rgb:n=>Oo(sM(n)),xyz65:sM}},Gm=n=>{let e=Math.abs(n);return e>=1/512?Math.sign(n)*Math.pow(e,1/1.8):16*n},oM=({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:Gm(n*1.3457868816471585-e*.2555720873797946-.0511018649755453*t),g:Gm(n*-.5446307051249019+e*1.5082477428451466+.0205274474364214*t),b:Gm(n*0+e*0+1.2119675456389452*t)};return i!==void 0&&(s.alpha=i),s},Wm=(n=0)=>{let e=Math.abs(n);return e>=16/512?Math.sign(n)*Math.pow(e,1.8):n/16},aM=n=>{let e=Wm(n.r),t=Wm(n.g),i=Wm(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},wH={...$a,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:oM,rgb:n=>oM(eu(n))},toMode:{xyz50:aM,rgb:n=>Qc(aM(n))}},lM=1.09929682680944,AH=.018053968510807,Xm=n=>{const e=Math.abs(n);return e>AH?(Math.sign(n)||1)*(lM*Math.pow(e,.45)-(lM-1)):4.5*n},cM=({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:Xm(n*1.7166511879712683-e*.3556707837763925-.2533662813736599*t),g:Xm(n*-.6666843518324893+e*1.6164812366349395+.0157685458139111*t),b:Xm(n*.0176398574453108-e*.0427706132578085+.9421031212354739*t)};return i!==void 0&&(s.alpha=i),s},uM=1.09929682680944,CH=.018053968510807,$m=(n=0)=>{let e=Math.abs(n);return e{let e=$m(n.r),t=$m(n.g),i=$m(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},RH={...$a,mode:"rec2020",fromMode:{xyz65:cM,rgb:n=>cM(Do(n))},toMode:{xyz65:fM,rgb:n=>Oo(fM(n))},parse:["rec2020"],serialize:"rec2020"},bo=.0037930732552754493,CA=Math.cbrt(bo),qm=n=>Math.cbrt(n)-CA,PH=n=>{const{r:e,g:t,b:i,alpha:s}=qa(n),r=qm(.3*e+.622*t+.078*i+bo),o=qm(.23*e+.692*t+.078*i+bo),a=qm(.2434226892454782*e+.2047674442449682*t+.5518098665095535*i+bo),l={mode:"xyb",x:(r-o)/2,y:(r+o)/2,b:a-(r+o)/2};return s!==void 0&&(l.alpha=s),l},Ym=n=>Math.pow(n+CA,3),IH=({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=Ym(n+e)-bo,r=Ym(e-n)-bo,o=Ym(t+e)-bo,a=Ya({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},LH={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:IH},fromMode:{rgb:PH},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:Ce,y:Ce,b:Ce,alpha:{use:Ce,fixup:an}}},DH={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:Qc,lab:Q_},fromMode:{rgb:eu,lab:J_},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:Ce,y:Ce,z:Ce,alpha:{use:Ce,fixup:an}}},OH=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},NH=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},UH={mode:"xyz65",toMode:{rgb:Oo,xyz50:OH},fromMode:{rgb:Do,xyz50:NH},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:Ce,y:Ce,z:Ce,alpha:{use:Ce,fixup:an}}},FH=({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},kH=({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},BH={mode:"yiq",toMode:{rgb:kH},fromMode:{rgb:FH},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:Ce,i:Ce,q:Ce,alpha:{use:Ce,fixup:an}}};Tt(w6);Tt(D6);Tt(O6);Tt(N6);Tt(k6);Tt(uA);Tt(dA);Tt(Y6);Tt(j6);Tt(Q6);Tt(eH);Tt(ev);Tt(nH);Tt(tv);Tt(sH);Tt(pH);Tt(mH);Tt(gH);Tt(yH);Tt(bH);Tt(MH);Tt(EH);Tt(TH);Tt(wH);Tt(RH);Tt($a);Tt(LH);Tt(DH);Tt(UH);Tt(BH);const o0=220.44,zH=eA("oklch"),hM=n=>{var e;return n?(e=zH(n))==null?void 0:e.h:o0},VH=Yz("settings",()=>{const n=nt(),e=ys("settings/language","en-US"),t=ys("settings/stage/view/model-renderer","2d"),i=ys("settings/audio/input","false"),s=Ee(()=>{var w;return(w=n.value)==null?void 0:w.deviceId}),{audioInputs:r,ensurePermissions:o}=ZB({constraints:{audio:!0}}),a=nt(),l=nt("/assets/live2d/models/hiyori_pro_zh.zip"),c=nt("url"),u=nt(!1),f=ys("settings/live2d/position",{x:0,y:0}),h=nt({group:"Idle",index:0}),d=nt([]),p=ys("settings/live2d/motion-map",{}),_=ys("settings/disable-transitions",!0),g=ys("settings/use-page-specific-transitions",!0),m=ys("settings/theme/colors/hue",o0),v=ys("settings/theme/colors/hue-dynamic",!1);function b(w=o0){m.value=w,v.value=!1}function y(w){b(hM(w))}function T(w){if(v.value)return!1;const S=hM(w);if(!S)return!1;const P=Math.abs(S-m.value);return P<.01||P>359.99}return Ke(i,w=>{w==="false"&&(n.value=void 0),w==="true"&&o().then(()=>{n.value=r.value[0]})}),Ke(r,()=>{i.value==="true"&&!n.value&&(n.value=r.value[0])},{immediate:!0}),{live2dModelFile:a,live2dModelUrl:l,live2dLoadSource:c,live2dCurrentMotion:h,live2dPosition:f,availableLive2dMotions:d,live2dMotionMap:p,loadingLive2dModel:u,disableTransitions:_,usePageSpecificTransitions:g,language:e,stageView:t,themeColorsHue:m,themeColorsHueDynamic:v,isAudioInputOn:i,selectedAudioDevice:n,selectedAudioDeviceId:s,setThemeColorsHue:b,applyPrimaryColorFrom:y,isColorSelectedForPrimary:T}}),HH=hn({__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 Gn(()=>{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)=>(vn(),yi("div",{class:"stage-transition-3",style:Si({zIndex:t.value.zIndex||100})},null,4))}}),No=(n,e)=>{const t=n.__vccOpts||n;for(const[i,s]of e)t[i]=s;return t},GH=No(HH,[["__scopeId","data-v-df576df0"]]),WH=hn({__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 Gn(()=>{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 vn(),yi("div",{class:"circle-expansion-transition",style:Si({zIndex:((r=n.stageTransition)==null?void 0:r.zIndex)||100})},[(vn(!0),yi(Zt,null,v2(t.value,(o,a)=>(vn(),yi("div",{key:a}))),128))],4)}}}),XH=No(WH,[["__scopeId","data-v-0c29056c"]]),$H=hn({__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 Gn(()=>{var s,r,o,a,l,c,u,f,h;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",`${((h=(f=e.stageTransition)==null?void 0:f.borderRadius)==null?void 0:h.lg)||"50%"}`)}),(s,r)=>{var o;return vn(),yi("div",{class:ka(["fantasy-fall-transition",i.value]),style:Si({zIndex:((o=n.stageTransition)==null?void 0:o.zIndex)??100})},null,6)}}}),qH=No($H,[["__scopeId","data-v-e62bf496"]]),YH=hn({__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 Gn(()=>{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 vn(),yi("div",{class:"stage-transition-4",style:Si({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},o[0]||(o[0]=[Z2('
',5)]),4)}}}),jH=No(YH,[["__scopeId","data-v-6d1179fc"]]),KH=hn({__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 Ke([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)}),Gn(()=>{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 vn(),yi("div",{class:"stage-transition-1",style:Si({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},null,4)}}}),ZH=No(KH,[["__scopeId","data-v-bf1d1566"]]),JH=hn({__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 Gn(()=>{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 vn(),yi("div",{class:"stage-transition-2",style:Si({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},null,4)}}}),QH=No(JH,[["__scopeId","data-v-8ff7120f"]]),e8=hn({__name:"RectanglesRotateTransition",props:{stageTransition:null},setup(n){const e=n;return Gn(()=>{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 vn(),yi("div",{class:"rectangle-rotate-transition",style:Si({zIndex:((s=n.stageTransition)==null?void 0:s.zIndex)??100})},i[0]||(i[0]=[lr("div",{class:"rectangle rectangle-rotate-1"},[lr("div")],-1),lr("div",{class:"rectangle rectangle-rotate-2"},[lr("div")],-1),lr("div",{class:"rectangle rectangle-rotate-3"},[lr("div")],-1)]),4)}}}),t8=No(e8,[["__scopeId","data-v-f4b1dc64"]]),n8=hn({__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=e6(),i=nt(!1),s=nt(),r=nt(""),o=nt(),a=Oe({slide:{component:ZH,duration:2700},"slope-slide":{component:QH,duration:2700},arrow:{component:GH,duration:2700},"multiple-blocks-reveal":{component:jH,duration:2800},"fantasy-fall":{component:qH,duration:2700},"rectangles-rotate":{component:t8,duration:2700},"bubble-wave-out":{component:XH,duration:1e3}}),l=nt([]);function c(d){return l.value.push(d),()=>{const p=l.value.indexOf(d);p>=0&&l.value.splice(p,1)}}async function u(d,p={}){s.value=d;for(const _ of l.value)try{await Promise.resolve(_(d,p))}catch(g){console.error(`Error in transition hook at stage "${d}":`,g)}}async function f(d,p,_){if(d.name==="none"||!d.name){p(),_();return}const g=a.value[d.name];if(!g){console.error(`Transition ${d.name} not found`),p(),_();return}const m=g.nextDelay!==void 0?g.nextDelay:g.duration/3;let v=!1;const y=c(T=>{T==="navigation"&&!v&&(v=!0,p())});try{await u("before-enter",{transitionName:d.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(w=>setTimeout(w,50))),r.value=d.name,o.value=d,i.value=!0,await u("enter-active",{transitionName:name}),setTimeout(async()=>{await u("navigation",{transitionName:d.name,config:g}),v||(v=!0,p())},m),setTimeout(async()=>{await u("after-enter",{transitionName:d.name})},g.duration),setTimeout(async()=>{await u("before-leave",{transitionName:d.name})},g.duration+10),setTimeout(async()=>{await u("leave-active",{transitionName:d.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:d.name}),_()},g.duration+T)}catch(T){console.error(T)}finally{y(),setTimeout(()=>{v||(v=!0,p())},g.duration*2)}}function h(d,p){return new Promise(_=>{f(d,p,_)})}return t.beforeEach((d,p,_)=>{if(e.disableTransitions){_();return}if(typeof d.meta.stageTransition!="object"){_();return}const g=d.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),h(g,_)}),(d,p)=>(vn(),yi(Zt,null,[y2(d.$slots,"default"),i.value?(vn(),yi(Zt,{key:0},[a.value[r.value]?(vn(),Jl(_2(a.value[r.value].component),{key:0,"stage-transition":o.value},null,8,["stage-transition"])):kv("",!0)],64)):kv("",!0)],64))}});/*! +`||e[Ze]===" "||e[Ze]===" ");)Ze++;continue}if(i===",")return;if(i===")"){t.push({type:ye.ParenClose});continue}if(i==="+"){if(Ze--,ff(e)){t.push(dl(e));continue}return}if(i==="-"){if(Ze--,ff(e)){t.push(dl(e));continue}if(t0(e)){t.push({type:ye.Ident,value:Nh(e)});continue}return}if(i==="."){if(Ze--,ff(e)){t.push(dl(e));continue}return}if(i==="/"){for(;Ze4)){if(t.length===4){if(t[3].type!==ye.Alpha)return;t[3]=t[3].value}return t.length===3&&t.push({type:ye.None,value:void 0}),t.every(s=>s.type!==ye.Alpha)?t:void 0}}function y6(n,e){n._i=0;let t=n[n._i++];if(!t||t.type!==ye.Function)return;let i=iA(n,e);if(i)return i.unshift(t.value),i}const b6=n=>{if(typeof n!="string")return;const e=_6(n),t=e?y6(e,!0):void 0;let i,s=0,r=Oh.length;for(;sn==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,S6=(n,e,t)=>n+t*(e-n),E6=n=>{let e=[];for(let t=0;te=>{let t=E6(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)}},Ce=T6(S6),an=n=>{let e=!1,t=n.map(i=>i!==void 0?(e=!0,i):1);return e?t:n},$a={mode:"rgb",channels:["r","g","b","alpha"],parse:[x6,r6,c6,i6,M6,"srgb"],serialize:"srgb",interpolate:{r:Ce,g:Ce,b:Ce,alpha:{use:Ce,fixup:an}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},Cm=(n=0)=>Math.pow(Math.abs(n),563/256)*Math.sign(n),Hx=n=>{let e=Cm(n.r),t=Cm(n.g),i=Cm(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},Rm=n=>Math.pow(Math.abs(n),256/563)*Math.sign(n),Gx=({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:Rm(n*2.0415879038107465-e*.5650069742788597-.3447313507783297*t),g:Rm(n*-.9692436362808798+e*1.8759675015077206+.0415550574071756*t),b:Rm(n*.0134442806320312-e*.1183623922310184+1.0151749943912058*t)};return i!==void 0&&(s.alpha=i),s},Pm=(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)},qa=({r:n,g:e,b:t,alpha:i})=>{let s={mode:"lrgb",r:Pm(n),g:Pm(e),b:Pm(t)};return i!==void 0&&(s.alpha=i),s},Do=n=>{let{r:e,g:t,b:i,alpha:s}=qa(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},Im=(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},Ya=({r:n,g:e,b:t,alpha:i},s="rgb")=>{let r={mode:s,r:Im(n),g:Im(e),b:Im(t)};return i!==void 0&&(r.alpha=i),r},Oo=({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=Ya({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},w6={...$a,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:n=>Gx(Do(n)),xyz65:Gx},toMode:{rgb:n=>Oo(Hx(n)),xyz65:Hx}},xn=n=>(n=n%360)<0?n+360:n,A6=(n,e)=>n.map((t,i,s)=>{if(t===void 0)return t;let r=xn(t);return i===0||n[i-1]===void 0?r:e(r-xn(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),[]),qs=n=>A6(n,e=>Math.abs(e)<=180?e:e-360*Math.sign(e)),cn=[-.14861,1.78277,-.29227,-.90649,1.97294,0],C6=Math.PI/180,R6=180/Math.PI;let Wx=cn[3]*cn[4],Xx=cn[1]*cn[4],$x=cn[1]*cn[2]-cn[0]*cn[3];const P6=({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=($x*t+n*Wx-e*Xx)/($x+Wx-Xx),r=t-s,o=(cn[4]*(e-s)-cn[2]*r)/cn[3],a={mode:"cubehelix",l:s,s:s===0||s===1?void 0:Math.sqrt(r*r+o*o)/(cn[4]*s*(1-s))};return a.s&&(a.h=Math.atan2(o,r)*R6-120),i!==void 0&&(a.alpha=i),a},I6=({h:n,s:e,l:t,alpha:i})=>{let s={mode:"rgb"};n=(n===void 0?0:n+120)*C6,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*(cn[0]*o+cn[1]*a),s.g=t+r*(cn[2]*o+cn[3]*a),s.b=t+r*(cn[4]*o+cn[5]*a),i!==void 0&&(s.alpha=i),s},qd=(n,e)=>{if(n.h===void 0||e.h===void 0||!n.s||!e.s)return 0;let t=xn(n.h),i=xn(e.h),s=Math.sin((i-t+360)/2*Math.PI/180);return 2*Math.sqrt(n.s*e.s)*s},L6=(n,e)=>{if(n.h===void 0||e.h===void 0)return 0;let t=xn(n.h),i=xn(e.h);return Math.abs(i-t)>180?t-(i-360*Math.sign(i-t)):i-t},Yd=(n,e)=>{if(n.h===void 0||e.h===void 0||!n.c||!e.c)return 0;let t=xn(n.h),i=xn(e.h),s=Math.sin((i-t+360)/2*Math.PI/180);return 2*Math.sqrt(n.c*e.c)*s},Ys=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},D6={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:P6},toMode:{rgb:I6},interpolate:{h:{use:Ce,fixup:qs},s:Ce,l:Ce,alpha:{use:Ce,fixup:an}},difference:{h:qd},average:{h:Ys}},Tr=({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=xn(Math.atan2(t,e)*180/Math.PI)),i!==void 0&&(o.alpha=i),o},wr=({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},sA=Math.pow(29,3)/Math.pow(3,3),rA=Math.pow(6,3)/Math.pow(29,3),en={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},ya={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329};let Lm=n=>Math.pow(n,3)>rA?Math.pow(n,3):(116*n-16)/sA;const oA=({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:Lm(r)*ya.X,y:Lm(s)*ya.Y,z:Lm(o)*ya.Z};return i!==void 0&&(a.alpha=i),a},jd=n=>Oo(oA(n)),Dm=n=>n>rA?Math.cbrt(n):(sA*n+16)/116,aA=({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=Dm(n/ya.X),r=Dm(e/ya.Y),o=Dm(t/ya.Z),a={mode:"lab65",l:116*r-16,a:500*(s-r),b:200*(r-o)};return i!==void 0&&(a.alpha=i),a},Kd=n=>{let e=aA(Do(n));return n.r===n.b&&n.b===n.g&&(e.a=e.b=0),e},Uh=1,lA=1,Tc=26/180*Math.PI,Fh=Math.cos(Tc),kh=Math.sin(Tc),cA=100/Math.log(139/100),n0=({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*Uh/cA)-1)/.0039},r=(Math.exp(.0435*e*lA*Uh)-1)/.075,o=r*Math.cos(t/180*Math.PI-Tc),a=r*Math.sin(t/180*Math.PI-Tc);return s.a=o*Fh-a/.83*kh,s.b=o*kh+a/.83*Fh,i!==void 0&&(s.alpha=i),s},i0=({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*Fh+t*kh,r=.83*(t*Fh-e*kh),o=Math.sqrt(s*s+r*r),a={mode:"dlch",l:cA/Uh*Math.log(1+.0039*n),c:Math.log(1+.075*o)/(.0435*lA*Uh)};return a.c&&(a.h=xn((Math.atan2(r,s)+Tc)/Math.PI*180)),i!==void 0&&(a.alpha=i),a},qx=n=>n0(Tr(n,"dlch")),Yx=n=>wr(i0(n),"dlab"),O6={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:qx,rgb:n=>jd(qx(n))},fromMode:{lab65:Yx,rgb:n=>Yx(Kd(n))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:Ce,a:Ce,b:Ce,alpha:{use:Ce,fixup:an}}},N6={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:n0,dlab:n=>wr(n,"dlab"),rgb:n=>jd(n0(n))},fromMode:{lab65:i0,dlab:n=>Tr(n,"dlch"),rgb:n=>i0(Kd(n))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:Ce,c:Ce,h:{use:Ce,fixup:qs},alpha:{use:Ce,fixup:an}},difference:{h:Yd},average:{h:Ys}};function U6({h:n,s:e,i:t,alpha:i}){n=xn(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 F6({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}},H6=new RegExp(`^hsla?\\(\\s*${o6}${Na}${Xl}${Na}${Xl}\\s*(?:,\\s*${Z_}\\s*)?\\)$`),G6=n=>{let e=n.match(H6);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=V6(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 W6(n,e){if(!e||e[0]!=="hsl"&&e[0]!=="hsla")return;const t={mode:"hsl"},[,i,s,r,o]=e;if(i.type!==ye.None){if(i.type===ye.Percentage)return;t.h=i.value}if(s.type!==ye.None){if(s.type===ye.Hue)return;t.s=s.value/100}if(r.type!==ye.None){if(r.type===ye.Hue)return;t.l=r.value/100}return o.type!==ye.None&&(t.alpha=Math.min(1,Math.max(0,o.type===ye.Number?o.value:o.value/100))),t}const uA={mode:"hsl",toMode:{rgb:B6},fromMode:{rgb:z6},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[W6,G6],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:Ce,fixup:qs},s:Ce,l:Ce,alpha:{use:Ce,fixup:an}},difference:{h:qd},average:{h:Ys}};function fA({h:n,s:e,v:t,alpha:i}){n=xn(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 hA({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 fA({h:n,s:t===1?1:1-e/(1-t),v:1-t,alpha:i})}function $6(n){let e=hA(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 q6(n,e){if(!e||e[0]!=="hwb")return;const t={mode:"hwb"},[,i,s,r,o]=e;if(i.type!==ye.None){if(i.type===ye.Percentage)return;t.h=i.value}if(s.type!==ye.None){if(s.type===ye.Hue)return;t.w=s.value/100}if(r.type!==ye.None){if(r.type===ye.Hue)return;t.b=r.value/100}return o.type!==ye.None&&(t.alpha=Math.min(1,Math.max(0,o.type===ye.Number?o.value:o.value/100))),t}const Y6={mode:"hwb",toMode:{rgb:X6},fromMode:{rgb:$6},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[q6],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:Ce,fixup:qs},w:Ce,b:Ce,alpha:{use:Ce,fixup:an}},difference:{h:L6},average:{h:Ys}},pA=203,Zd=.1593017578125,mA=78.84375,Jd=.8359375,Qd=18.8515625,ep=18.6875;function Om(n){if(n<0)return 0;const e=Math.pow(n,1/mA);return 1e4*Math.pow(Math.max(0,e-Jd)/(Qd-ep*e),1/Zd)}function Nm(n){if(n<0)return 0;const e=Math.pow(n/1e4,Zd);return Math.pow((Jd+Qd*e)/(1+ep*e),mA)}const Um=n=>Math.max(n/pA,0),jx=({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=Om(n+.008609037037932761*e+.11102962500302593*t),r=Om(n-.00860903703793275*e-.11102962500302599*t),o=Om(n+.5600313357106791*e-.32062717498731885*t),a={mode:"xyz65",x:Um(2.070152218389422*s-1.3263473389671556*r+.2066510476294051*o),y:Um(.3647385209748074*s+.680566024947227*r-.0453045459220346*o),z:Um(-.049747207535812*s-.0492609666966138*r+1.1880659249923042*o)};return i!==void 0&&(a.alpha=i),a},Fm=(n=0)=>Math.max(n*pA,0),Kx=({x:n,y:e,z:t,alpha:i})=>{const s=Fm(n),r=Fm(e),o=Fm(t),a=Nm(.3592832590121217*s+.6976051147779502*r-.0358915932320289*o),l=Nm(-.1920808463704995*s+1.1004767970374323*r+.0753748658519118*o),c=Nm(.0070797844607477*s+.0748396662186366*r+.8433265453898765*o),u=.5*a+.5*l,f=1.61376953125*a-3.323486328125*l+1.709716796875*c,h=4.378173828125*a-4.24560546875*l-.132568359375*c,d={mode:"itp",i:u,t:f,p:h};return i!==void 0&&(d.alpha=i),d},j6={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:jx,rgb:n=>Oo(jx(n))},fromMode:{xyz65:Kx,rgb:n=>Kx(Do(n))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:Ce,t:Ce,p:Ce,alpha:{use:Ce,fixup:an}}},K6=134.03437499999998,Z6=16295499532821565e-27,km=n=>{if(n<0)return 0;let e=Math.pow(n/1e4,Zd);return Math.pow((Jd+Qd*e)/(1+ep*e),K6)},Bm=(n=0)=>Math.max(n*203,0),gA=({x:n,y:e,z:t,alpha:i})=>{n=Bm(n),e=Bm(e),t=Bm(t);let s=1.15*n-.15*t,r=.66*e+.34*n,o=km(.41478972*s+.579999*r+.014648*t),a=km(-.20151*s+1.120649*r+.0531008*t),l=km(-.0166008*s+.2648*r+.6684799*t),c=(o+a)/2,u={mode:"jab",j:.44*c/(1-.56*c)-Z6,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},J6=134.03437499999998,Zx=16295499532821565e-27,zm=n=>{if(n<0)return 0;let e=Math.pow(n,1/J6);return 1e4*Math.pow((Jd-e)/(ep*e-Qd),1/Zd)},Vm=n=>n/203,_A=({j:n,a:e,b:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=(n+Zx)/(.44+.56*(n+Zx)),r=zm(s+.13860504*e+.058047316*t),o=zm(s-.13860504*e-.058047316*t),a=zm(s-.096019242*e-.8118919*t),l={mode:"xyz65",x:Vm(1.661373024652174*r-.914523081304348*o+.23136208173913045*a),y:Vm(-.3250758611844533*r+1.571847026732543*o-.21825383453227928*a),z:Vm(-.090982811*r-.31272829*o+1.5227666*a)};return i!==void 0&&(l.alpha=i),l},vA=n=>{let e=gA(Do(n));return n.r===n.b&&n.b===n.g&&(e.a=e.b=0),e},yA=n=>Oo(_A(n)),Q6={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:vA,xyz65:gA},toMode:{rgb:yA,xyz65:_A},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:Ce,a:Ce,b:Ce,alpha:{use:Ce,fixup:an}}},Jx=({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=xn(Math.atan2(t,e)*180/Math.PI)),i!==void 0&&(r.alpha=i),r},Qx=({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},eH={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Qx,rgb:n=>yA(Qx(n))},fromMode:{rgb:n=>Jx(vA(n)),jab:Jx},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:Ce,fixup:qs},c:Ce,j:Ce,alpha:{use:Ce,fixup:an}},difference:{h:Yd},average:{h:Ys}},tp=Math.pow(29,3)/Math.pow(3,3),J_=Math.pow(6,3)/Math.pow(29,3);let Hm=n=>Math.pow(n,3)>J_?Math.pow(n,3):(116*n-16)/tp;const Q_=({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:Hm(r)*en.X,y:Hm(s)*en.Y,z:Hm(o)*en.Z};return i!==void 0&&(a.alpha=i),a},Qc=({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=Ya({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},bA=n=>Qc(Q_(n)),eu=n=>{let{r:e,g:t,b:i,alpha:s}=qa(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},Gm=n=>n>J_?Math.cbrt(n):(tp*n+16)/116,ev=({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=Gm(n/en.X),r=Gm(e/en.Y),o=Gm(t/en.Z),a={mode:"lab",l:116*r-16,a:500*(s-r),b:200*(r-o)};return i!==void 0&&(a.alpha=i),a},xA=n=>{let e=ev(eu(n));return n.r===n.b&&n.b===n.g&&(e.a=e.b=0),e};function tH(n,e){if(!e||e[0]!=="lab")return;const t={mode:"lab"},[,i,s,r,o]=e;if(!(i.type===ye.Hue||s.type===ye.Hue||r.type===ye.Hue))return i.type!==ye.None&&(t.l=Math.min(Math.max(0,i.value),100)),s.type!==ye.None&&(t.a=s.type===ye.Number?s.value:s.value*125/100),r.type!==ye.None&&(t.b=r.type===ye.Number?r.value:r.value*125/100),o.type!==ye.None&&(t.alpha=Math.min(1,Math.max(0,o.type===ye.Number?o.value:o.value/100))),t}const tv={mode:"lab",toMode:{xyz50:Q_,rgb:bA},fromMode:{xyz50:ev,rgb:xA},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-100,100],b:[-100,100]},parse:[tH],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:Ce,a:Ce,b:Ce,alpha:{use:Ce,fixup:an}}},nH={...tv,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:oA,rgb:jd},fromMode:{xyz65:aA,rgb:Kd},ranges:{l:[0,100],a:[-86.182,98.234],b:[-107.86,94.477]}};function iH(n,e){if(!e||e[0]!=="lch")return;const t={mode:"lch"},[,i,s,r,o]=e;if(i.type!==ye.None){if(i.type===ye.Hue)return;t.l=Math.min(Math.max(0,i.value),100)}if(s.type!==ye.None&&(t.c=Math.max(0,s.type===ye.Number?s.value:s.value*150/100)),r.type!==ye.None){if(r.type===ye.Percentage)return;t.h=r.value}return o.type!==ye.None&&(t.alpha=Math.min(1,Math.max(0,o.type===ye.Number?o.value:o.value/100))),t}const nv={mode:"lch",toMode:{lab:wr,rgb:n=>bA(wr(n))},fromMode:{rgb:n=>Tr(xA(n)),lab:Tr},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[iH],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:Ce,fixup:qs},c:Ce,l:Ce,alpha:{use:Ce,fixup:an}},difference:{h:Yd},average:{h:Ys}},sH={...nv,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:n=>wr(n,"lab65"),rgb:n=>jd(wr(n,"lab65"))},fromMode:{rgb:n=>Tr(Kd(n),"lch65"),lab65:n=>Tr(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=xn(Math.atan2(t,e)*180/Math.PI)),i!==void 0&&(r.alpha=i),r},SA=({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},EA=(n,e,t)=>4*n/(n+15*e+3*t),TA=(n,e,t)=>9*e/(n+15*e+3*t),rH=EA(en.X,en.Y,en.Z),oH=TA(en.X,en.Y,en.Z),aH=n=>n<=J_?tp*n:116*Math.cbrt(n)-16,s0=({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=aH(e/en.Y),r=EA(n,e,t),o=TA(n,e,t);!isFinite(r)||!isFinite(o)?s=r=o=0:(r=13*s*(r-rH),o=13*s*(o-oH));let a={mode:"luv",l:s,u:r,v:o};return i!==void 0&&(a.alpha=i),a},lH=(n,e,t)=>4*n/(n+15*e+3*t),cH=(n,e,t)=>9*e/(n+15*e+3*t),uH=lH(en.X,en.Y,en.Z),fH=cH(en.X,en.Y,en.Z),r0=({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)+uH,r=t/(13*n)+fH,o=en.Y*(n<=8?n/tp: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},hH=n=>MA(s0(eu(n))),dH=n=>Qc(r0(SA(n))),pH={mode:"lchuv",toMode:{luv:SA,rgb:dH},fromMode:{rgb:hH,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:Ce,fixup:qs},c:Ce,l:Ce,alpha:{use:Ce,fixup:an}},difference:{h:Yd},average:{h:Ys}},mH={...$a,mode:"lrgb",toMode:{rgb:Ya},fromMode:{rgb:qa},parse:["srgb-linear"],serialize:"srgb-linear"},gH={mode:"luv",toMode:{xyz50:r0,rgb:n=>Qc(r0(n))},fromMode:{xyz50:s0,rgb:n=>s0(eu(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:Ce,u:Ce,v:Ce,alpha:{use:Ce,fixup:an}}},wA=({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},np=n=>{let e=wA(qa(n));return n.r===n.b&&n.b===n.g&&(e.a=e.b=0),e},tu=({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},ip=n=>Ya(tu(n));function o0(n){const i=1.170873786407767;return .5*(i*n-.206+Math.sqrt((i*n-.206)*(i*n-.206)+4*.03*i*n))}function Bh(n){return(n*n+.206*n)/(1.170873786407767*(n+.03))}function _H(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,h=-.1055613458*n-.0638541728*e,d=-.0894841775*n-1.291485548*e;{let p=1+u*f,_=1+u*h,g=1+u*d,m=p*p*p,v=_*_*_,b=g*g*g,y=3*f*p*p,T=3*h*_*_,w=3*d*g*g,S=6*f*f*p,P=6*h*h*_,M=6*d*d*g,E=a*m+l*v+c*b,D=a*y+l*T+c*w,B=a*S+l*P+c*M;u=u-E*D/(D*D-.5*E*B)}return u}function iv(n,e){let t=_H(n,e),i=tu({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 vH(n,e,t,i,s,r=null){r||(r=iv(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,h=a+l*c,d=a+l*u,p=a+l*f;{let _=s*(1-o)+o*t,g=o*i,m=_+g*c,v=_+g*u,b=_+g*f,y=m*m*m,T=v*v*v,w=b*b*b,S=3*h*m*m,P=3*d*v*v,M=3*p*b*b,E=6*h*h*m,D=6*d*d*v,B=6*p*p*b,z=4.0767416621*y-3.3077115913*T+.2309699292*w-1,V=4.0767416621*S-3.3077115913*P+.2309699292*M,Q=4.0767416621*E-3.3077115913*D+.2309699292*B,j=V/(V*V-.5*z*Q),te=-z*j,Z=-1.2684380046*y+2.6097574011*T-.3413193965*w-1,pe=-1.2684380046*S+2.6097574011*P-.3413193965*M,Me=-1.2684380046*E+2.6097574011*D-.3413193965*B,re=pe/(pe*pe-.5*Z*Me),xe=-Z*re,We=-.0041960863*y-.7034186147*T+1.707614701*w-1,oe=-.0041960863*S-.7034186147*P+1.707614701*M,ge=-.0041960863*E-.7034186147*D+1.707614701*B,Se=oe/(oe*oe-.5*We*ge),$=-We*Se;te=j>=0?te:1e6,xe=re>=0?xe:1e6,$=Se>=0?$:1e6,o+=Math.min(te,Math.min(xe,$))}}}return o}function sv(n,e,t=null){t||(t=iv(n,e));let i=t[0],s=t[1];return[s/i,s/(1-i)]}function AA(n,e,t){let i=iv(e,t),s=vH(e,t,n,1,n,i),r=sv(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 eM(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:o0(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]=AA(e,t/r,i/r),c;if(reM(np(n))},toMode:{oklab:tM,rgb:n=>ip(tM(n))}};function nM(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]=sv(r,o),c=.5,u=1-c/a,f=l/(s+e*l),h=f*e,d=f*s,p=Bh(h),_=d*p/h,g=tu({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*o0(e)/e,e=o0(e);const v={mode:"okhsv",s:s?(c+l)*d/(l*c+l*u*d):0,v:e?e/h:0};return v.s&&(v.h=xn(Math.atan2(i,t)*180/Math.PI)),n.alpha!==void 0&&(v.alpha=n.alpha),v}function iM(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]=sv(r,o),c=.5,u=1-c/a,f=1-i*c/(c+l-l*u*i),h=i*l*c/(c+l-l*u*i),d=Bh(f),p=h*d/f,_=tu({l:d,a:r*p,b:o*p}),g=Math.cbrt(1/Math.max(_.r,_.g,_.b,0)),m=Bh(s*f),v=h*m/f;return e.l=m*g,e.a=v*r*g,e.b=v*o*g,e}const bH={...dA,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:nM,rgb:n=>nM(np(n))},toMode:{oklab:iM,rgb:n=>ip(iM(n))}};function xH(n,e){if(!e||e[0]!=="oklab")return;const t={mode:"oklab"},[,i,s,r,o]=e;if(!(i.type===ye.Hue||s.type===ye.Hue||r.type===ye.Hue))return i.type!==ye.None&&(t.l=Math.min(Math.max(0,i.type===ye.Number?i.value:i.value/100),1)),s.type!==ye.None&&(t.a=s.type===ye.Number?s.value:s.value*.4/100),r.type!==ye.None&&(t.b=r.type===ye.Number?r.value:r.value*.4/100),o.type!==ye.None&&(t.alpha=Math.min(1,Math.max(0,o.type===ye.Number?o.value:o.value/100))),t}const MH={...tv,mode:"oklab",toMode:{lrgb:tu,rgb:ip},fromMode:{lrgb:wA,rgb:np},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[xH],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 SH(n,e){if(!e||e[0]!=="oklch")return;const t={mode:"oklch"},[,i,s,r,o]=e;if(i.type!==ye.None){if(i.type===ye.Hue)return;t.l=Math.min(Math.max(0,i.type===ye.Number?i.value:i.value/100),1)}if(s.type!==ye.None&&(t.c=Math.max(0,s.type===ye.Number?s.value:s.value*.4/100)),r.type!==ye.None){if(r.type===ye.Percentage)return;t.h=r.value}return o.type!==ye.None&&(t.alpha=Math.min(1,Math.max(0,o.type===ye.Number?o.value:o.value/100))),t}const EH={...nv,mode:"oklch",toMode:{oklab:n=>wr(n,"oklab"),rgb:n=>ip(wr(n,"oklab"))},fromMode:{rgb:n=>Tr(np(n),"oklch"),oklab:n=>Tr(n,"oklch")},parse:[SH],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]}},sM=n=>{let{r:e,g:t,b:i,alpha:s}=qa(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},rM=({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=Ya({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},TH={...$a,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:n=>rM(Do(n)),xyz65:rM},toMode:{rgb:n=>Oo(sM(n)),xyz65:sM}},Wm=n=>{let e=Math.abs(n);return e>=1/512?Math.sign(n)*Math.pow(e,1/1.8):16*n},oM=({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:Wm(n*1.3457868816471585-e*.2555720873797946-.0511018649755453*t),g:Wm(n*-.5446307051249019+e*1.5082477428451466+.0205274474364214*t),b:Wm(n*0+e*0+1.2119675456389452*t)};return i!==void 0&&(s.alpha=i),s},Xm=(n=0)=>{let e=Math.abs(n);return e>=16/512?Math.sign(n)*Math.pow(e,1.8):n/16},aM=n=>{let e=Xm(n.r),t=Xm(n.g),i=Xm(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},wH={...$a,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:oM,rgb:n=>oM(eu(n))},toMode:{xyz50:aM,rgb:n=>Qc(aM(n))}},lM=1.09929682680944,AH=.018053968510807,$m=n=>{const e=Math.abs(n);return e>AH?(Math.sign(n)||1)*(lM*Math.pow(e,.45)-(lM-1)):4.5*n},cM=({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:$m(n*1.7166511879712683-e*.3556707837763925-.2533662813736599*t),g:$m(n*-.6666843518324893+e*1.6164812366349395+.0157685458139111*t),b:$m(n*.0176398574453108-e*.0427706132578085+.9421031212354739*t)};return i!==void 0&&(s.alpha=i),s},uM=1.09929682680944,CH=.018053968510807,qm=(n=0)=>{let e=Math.abs(n);return e{let e=qm(n.r),t=qm(n.g),i=qm(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},RH={...$a,mode:"rec2020",fromMode:{xyz65:cM,rgb:n=>cM(Do(n))},toMode:{xyz65:fM,rgb:n=>Oo(fM(n))},parse:["rec2020"],serialize:"rec2020"},bo=.0037930732552754493,CA=Math.cbrt(bo),Ym=n=>Math.cbrt(n)-CA,PH=n=>{const{r:e,g:t,b:i,alpha:s}=qa(n),r=Ym(.3*e+.622*t+.078*i+bo),o=Ym(.23*e+.692*t+.078*i+bo),a=Ym(.2434226892454782*e+.2047674442449682*t+.5518098665095535*i+bo),l={mode:"xyb",x:(r-o)/2,y:(r+o)/2,b:a-(r+o)/2};return s!==void 0&&(l.alpha=s),l},jm=n=>Math.pow(n+CA,3),IH=({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=jm(n+e)-bo,r=jm(e-n)-bo,o=jm(t+e)-bo,a=Ya({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},LH={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:IH},fromMode:{rgb:PH},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:Ce,y:Ce,b:Ce,alpha:{use:Ce,fixup:an}}},DH={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:Qc,lab:ev},fromMode:{rgb:eu,lab:Q_},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:Ce,y:Ce,z:Ce,alpha:{use:Ce,fixup:an}}},OH=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},NH=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},UH={mode:"xyz65",toMode:{rgb:Oo,xyz50:OH},fromMode:{rgb:Do,xyz50:NH},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:Ce,y:Ce,z:Ce,alpha:{use:Ce,fixup:an}}},FH=({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},kH=({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},BH={mode:"yiq",toMode:{rgb:kH},fromMode:{rgb:FH},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:Ce,i:Ce,q:Ce,alpha:{use:Ce,fixup:an}}};Tt(w6);Tt(D6);Tt(O6);Tt(N6);Tt(k6);Tt(uA);Tt(dA);Tt(Y6);Tt(j6);Tt(Q6);Tt(eH);Tt(tv);Tt(nH);Tt(nv);Tt(sH);Tt(pH);Tt(mH);Tt(gH);Tt(yH);Tt(bH);Tt(MH);Tt(EH);Tt(TH);Tt(wH);Tt(RH);Tt($a);Tt(LH);Tt(DH);Tt(UH);Tt(BH);const a0=220.44,zH=eA("oklch"),hM=n=>{var e;return n?(e=zH(n))==null?void 0:e.h:a0},VH=Yz("settings",()=>{const n=nt(),e=ys("settings/language","en-US"),t=ys("settings/stage/view/model-renderer","2d"),i=ys("settings/audio/input","false"),s=Ee(()=>{var w;return(w=n.value)==null?void 0:w.deviceId}),{audioInputs:r,ensurePermissions:o}=ZB({constraints:{audio:!0}}),a=nt(),l=nt("/assets/live2d/models/hiyori_pro_zh.zip"),c=nt("url"),u=nt(!1),f=ys("settings/live2d/position",{x:0,y:0}),h=nt({group:"Idle",index:0}),d=nt([]),p=ys("settings/live2d/motion-map",{}),_=ys("settings/disable-transitions",!0),g=ys("settings/use-page-specific-transitions",!0),m=ys("settings/theme/colors/hue",a0),v=ys("settings/theme/colors/hue-dynamic",!1);function b(w=a0){m.value=w,v.value=!1}function y(w){b(hM(w))}function T(w){if(v.value)return!1;const S=hM(w);if(!S)return!1;const P=Math.abs(S-m.value);return P<.01||P>359.99}return Ke(i,w=>{w==="false"&&(n.value=void 0),w==="true"&&o().then(()=>{n.value=r.value[0]})}),Ke(r,()=>{i.value==="true"&&!n.value&&(n.value=r.value[0])},{immediate:!0}),{live2dModelFile:a,live2dModelUrl:l,live2dLoadSource:c,live2dCurrentMotion:h,live2dPosition:f,availableLive2dMotions:d,live2dMotionMap:p,loadingLive2dModel:u,disableTransitions:_,usePageSpecificTransitions:g,language:e,stageView:t,themeColorsHue:m,themeColorsHueDynamic:v,isAudioInputOn:i,selectedAudioDevice:n,selectedAudioDeviceId:s,setThemeColorsHue:b,applyPrimaryColorFrom:y,isColorSelectedForPrimary:T}}),HH=hn({__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 Gn(()=>{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)=>(vn(),yi("div",{class:"stage-transition-3",style:Si({zIndex:t.value.zIndex||100})},null,4))}}),No=(n,e)=>{const t=n.__vccOpts||n;for(const[i,s]of e)t[i]=s;return t},GH=No(HH,[["__scopeId","data-v-df576df0"]]),WH=hn({__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 Gn(()=>{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 vn(),yi("div",{class:"circle-expansion-transition",style:Si({zIndex:((r=n.stageTransition)==null?void 0:r.zIndex)||100})},[(vn(!0),yi(Zt,null,v2(t.value,(o,a)=>(vn(),yi("div",{key:a}))),128))],4)}}}),XH=No(WH,[["__scopeId","data-v-0c29056c"]]),$H=hn({__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 Gn(()=>{var s,r,o,a,l,c,u,f,h;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",`${((h=(f=e.stageTransition)==null?void 0:f.borderRadius)==null?void 0:h.lg)||"50%"}`)}),(s,r)=>{var o;return vn(),yi("div",{class:ka(["fantasy-fall-transition",i.value]),style:Si({zIndex:((o=n.stageTransition)==null?void 0:o.zIndex)??100})},null,6)}}}),qH=No($H,[["__scopeId","data-v-e62bf496"]]),YH=hn({__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 Gn(()=>{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 vn(),yi("div",{class:"stage-transition-4",style:Si({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},o[0]||(o[0]=[Z2('
',5)]),4)}}}),jH=No(YH,[["__scopeId","data-v-6d1179fc"]]),KH=hn({__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 Ke([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)}),Gn(()=>{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 vn(),yi("div",{class:"stage-transition-1",style:Si({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},null,4)}}}),ZH=No(KH,[["__scopeId","data-v-bf1d1566"]]),JH=hn({__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 Gn(()=>{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 vn(),yi("div",{class:"stage-transition-2",style:Si({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},null,4)}}}),QH=No(JH,[["__scopeId","data-v-8ff7120f"]]),e8=hn({__name:"RectanglesRotateTransition",props:{stageTransition:null},setup(n){const e=n;return Gn(()=>{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 vn(),yi("div",{class:"rectangle-rotate-transition",style:Si({zIndex:((s=n.stageTransition)==null?void 0:s.zIndex)??100})},i[0]||(i[0]=[lr("div",{class:"rectangle rectangle-rotate-1"},[lr("div")],-1),lr("div",{class:"rectangle rectangle-rotate-2"},[lr("div")],-1),lr("div",{class:"rectangle rectangle-rotate-3"},[lr("div")],-1)]),4)}}}),t8=No(e8,[["__scopeId","data-v-f4b1dc64"]]),n8=hn({__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=e6(),i=nt(!1),s=nt(),r=nt(""),o=nt(),a=Oe({slide:{component:ZH,duration:2700},"slope-slide":{component:QH,duration:2700},arrow:{component:GH,duration:2700},"multiple-blocks-reveal":{component:jH,duration:2800},"fantasy-fall":{component:qH,duration:2700},"rectangles-rotate":{component:t8,duration:2700},"bubble-wave-out":{component:XH,duration:1e3}}),l=nt([]);function c(d){return l.value.push(d),()=>{const p=l.value.indexOf(d);p>=0&&l.value.splice(p,1)}}async function u(d,p={}){s.value=d;for(const _ of l.value)try{await Promise.resolve(_(d,p))}catch(g){console.error(`Error in transition hook at stage "${d}":`,g)}}async function f(d,p,_){if(d.name==="none"||!d.name){p(),_();return}const g=a.value[d.name];if(!g){console.error(`Transition ${d.name} not found`),p(),_();return}const m=g.nextDelay!==void 0?g.nextDelay:g.duration/3;let v=!1;const y=c(T=>{T==="navigation"&&!v&&(v=!0,p())});try{await u("before-enter",{transitionName:d.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(w=>setTimeout(w,50))),r.value=d.name,o.value=d,i.value=!0,await u("enter-active",{transitionName:name}),setTimeout(async()=>{await u("navigation",{transitionName:d.name,config:g}),v||(v=!0,p())},m),setTimeout(async()=>{await u("after-enter",{transitionName:d.name})},g.duration),setTimeout(async()=>{await u("before-leave",{transitionName:d.name})},g.duration+10),setTimeout(async()=>{await u("leave-active",{transitionName:d.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:d.name}),_()},g.duration+T)}catch(T){console.error(T)}finally{y(),setTimeout(()=>{v||(v=!0,p())},g.duration*2)}}function h(d,p){return new Promise(_=>{f(d,p,_)})}return t.beforeEach((d,p,_)=>{if(e.disableTransitions){_();return}if(typeof d.meta.stageTransition!="object"){_();return}const g=d.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),h(g,_)}),(d,p)=>(vn(),yi(Zt,null,[y2(d.$slots,"default"),i.value?(vn(),yi(Zt,{key:0},[a.value[r.value]?(vn(),Jl(_2(a.value[r.value].component),{key:0,"stage-transition":o.value},null,8,["stage-transition"])):Bv("",!0)],64)):Bv("",!0)],64))}});/*! * shared v11.1.5 * (c) 2025 kazuya kawaguchi * Released under the MIT License. - */const zh=typeof window<"u",Lr=(n,e=!1)=>e?Symbol.for(n):Symbol(n),i8=(n,e,t)=>s8({l:n,k:e,s:t}),s8=n=>JSON.stringify(n).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Qt=n=>typeof n=="number"&&isFinite(n),r8=n=>rv(n)==="[object Date]",Vh=n=>rv(n)==="[object RegExp]",sp=n=>mt(n)&&Object.keys(n).length===0,fn=Object.assign,o8=Object.create,It=(n=null)=>o8(n);let dM;const sv=()=>dM||(dM=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:It());function pM(n){return n.replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}const a8=Object.prototype.hasOwnProperty;function Oi(n,e){return a8.call(n,e)}const Yt=Array.isArray,Vt=n=>typeof n=="function",Fe=n=>typeof n=="string",Ht=n=>typeof n=="boolean",xt=n=>n!==null&&typeof n=="object",l8=n=>xt(n)&&Vt(n.then)&&Vt(n.catch),RA=Object.prototype.toString,rv=n=>RA.call(n),mt=n=>rv(n)==="[object Object]",c8=n=>n==null?"":Yt(n)||mt(n)&&n.toString===RA?JSON.stringify(n,null,2):String(n);function ov(n,e=""){return n.reduce((t,i,s)=>s===0?t+i:t+e+i,"")}function u8(n,e){typeof console<"u"&&(console.warn("[intlify] "+n),e&&console.warn(e.stack))}const df=n=>!xt(n)||Yt(n);function If(n,e){if(df(n)||df(e))throw new Error("Invalid value");const t=[{src:n,des:e}];for(;t.length;){const{src:i,des:s}=t.pop();Object.keys(i).forEach(r=>{r!=="__proto__"&&(xt(i[r])&&!xt(s[r])&&(s[r]=Array.isArray(i[r])?[]:It()),df(s[r])||df(i[r])?s[r]=i[r]:t.push({src:i[r],des:s[r]}))})}}/*! + */const zh=typeof window<"u",Lr=(n,e=!1)=>e?Symbol.for(n):Symbol(n),i8=(n,e,t)=>s8({l:n,k:e,s:t}),s8=n=>JSON.stringify(n).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Qt=n=>typeof n=="number"&&isFinite(n),r8=n=>ov(n)==="[object Date]",Vh=n=>ov(n)==="[object RegExp]",sp=n=>mt(n)&&Object.keys(n).length===0,fn=Object.assign,o8=Object.create,It=(n=null)=>o8(n);let dM;const rv=()=>dM||(dM=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:It());function pM(n){return n.replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}const a8=Object.prototype.hasOwnProperty;function Oi(n,e){return a8.call(n,e)}const Yt=Array.isArray,Vt=n=>typeof n=="function",Fe=n=>typeof n=="string",Ht=n=>typeof n=="boolean",xt=n=>n!==null&&typeof n=="object",l8=n=>xt(n)&&Vt(n.then)&&Vt(n.catch),RA=Object.prototype.toString,ov=n=>RA.call(n),mt=n=>ov(n)==="[object Object]",c8=n=>n==null?"":Yt(n)||mt(n)&&n.toString===RA?JSON.stringify(n,null,2):String(n);function av(n,e=""){return n.reduce((t,i,s)=>s===0?t+i:t+e+i,"")}function u8(n,e){typeof console<"u"&&(console.warn("[intlify] "+n),e&&console.warn(e.stack))}const df=n=>!xt(n)||Yt(n);function If(n,e){if(df(n)||df(e))throw new Error("Invalid value");const t=[{src:n,des:e}];for(;t.length;){const{src:i,des:s}=t.pop();Object.keys(i).forEach(r=>{r!=="__proto__"&&(xt(i[r])&&!xt(s[r])&&(s[r]=Array.isArray(i[r])?[]:It()),df(s[r])||df(i[r])?s[r]=i[r]:t.push({src:i[r],des:s[r]}))})}}/*! * message-compiler v11.1.5 * (c) 2025 kazuya kawaguchi * Released under the MIT License. - */function f8(n,e,t){return{line:n,column:e,offset:t}}function a0(n,e,t){return{start:n,end:e}}const Rt={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},h8=17;function rp(n,e,t={}){const{domain:i,messages:s,args:r}=t,o=n,a=new SyntaxError(String(o));return a.code=n,e&&(a.location=e),a.domain=i,a}function d8(n){throw n}const xs=" ",p8="\r",Nn=` -`,m8="\u2028",g8="\u2029";function _8(n){const e=n;let t=0,i=1,s=1,r=0;const o=S=>e[S]===p8&&e[S+1]===Nn,a=S=>e[S]===Nn,l=S=>e[S]===g8,c=S=>e[S]===m8,u=S=>o(S)||a(S)||l(S)||c(S),f=()=>t,h=()=>i,d=()=>s,p=()=>r,_=S=>o(S)||l(S)||c(S)?Nn:e[S],g=()=>_(t),m=()=>_(t+r);function v(){return r=0,u(t)&&(i++,s=0),o(t)&&t++,t++,s++,e[t]}function b(){return o(t+r)&&r++,r++,e[t+r]}function y(){t=0,i=1,s=1,r=0}function T(S=0){r=S}function w(){const S=t+r;for(;S!==t;)v();r=0}return{index:f,line:h,column:d,peekOffset:p,charAt:_,currentChar:g,currentPeek:m,next:v,peek:b,reset:y,resetPeek:T,skipToPeek:w}}const sr=void 0,v8=".",mM="'",y8="tokenizer";function b8(n,e={}){const t=e.location!==!1,i=_8(n),s=()=>i.index(),r=()=>f8(i.line(),i.column(),i.index()),o=r(),a=s(),l={currentType:13,offset:a,startLoc:o,endLoc:o,lastType:13,lastOffset:a,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:""},c=()=>l,{onError:u}=e;function f(C,I,F,...H){const ce=c();if(I.column+=F,I.offset+=F,u){const R=t?a0(ce.startLoc,I):null,x=rp(C,R,{domain:y8,args:H});u(x)}}function h(C,I,F){C.endLoc=r(),C.currentType=I;const H={type:I};return t&&(H.loc=a0(C.startLoc,C.endLoc)),F!=null&&(H.value=F),H}const d=C=>h(C,13);function p(C,I){return C.currentChar()===I?(C.next(),I):(f(Rt.EXPECTED_TOKEN,r(),0,I),"")}function _(C){let I="";for(;C.currentPeek()===xs||C.currentPeek()===Nn;)I+=C.currentPeek(),C.peek();return I}function g(C){const I=_(C);return C.skipToPeek(),I}function m(C){if(C===sr)return!1;const I=C.charCodeAt(0);return I>=97&&I<=122||I>=65&&I<=90||I===95}function v(C){if(C===sr)return!1;const I=C.charCodeAt(0);return I>=48&&I<=57}function b(C,I){const{currentType:F}=I;if(F!==2)return!1;_(C);const H=m(C.currentPeek());return C.resetPeek(),H}function y(C,I){const{currentType:F}=I;if(F!==2)return!1;_(C);const H=C.currentPeek()==="-"?C.peek():C.currentPeek(),ce=v(H);return C.resetPeek(),ce}function T(C,I){const{currentType:F}=I;if(F!==2)return!1;_(C);const H=C.currentPeek()===mM;return C.resetPeek(),H}function w(C,I){const{currentType:F}=I;if(F!==7)return!1;_(C);const H=C.currentPeek()===".";return C.resetPeek(),H}function S(C,I){const{currentType:F}=I;if(F!==8)return!1;_(C);const H=m(C.currentPeek());return C.resetPeek(),H}function P(C,I){const{currentType:F}=I;if(!(F===7||F===11))return!1;_(C);const H=C.currentPeek()===":";return C.resetPeek(),H}function M(C,I){const{currentType:F}=I;if(F!==9)return!1;const H=()=>{const R=C.currentPeek();return R==="{"?m(C.peek()):R==="@"||R==="|"||R===":"||R==="."||R===xs||!R?!1:R===Nn?(C.peek(),H()):D(C,!1)},ce=H();return C.resetPeek(),ce}function E(C){_(C);const I=C.currentPeek()==="|";return C.resetPeek(),I}function D(C,I=!0){const F=(ce=!1,R="")=>{const x=C.currentPeek();return x==="{"||x==="@"||!x?ce:x==="|"?!(R===xs||R===Nn):x===xs?(C.peek(),F(!0,xs)):x===Nn?(C.peek(),F(!0,Nn)):!0},H=F();return I&&C.resetPeek(),H}function B(C,I){const F=C.currentChar();return F===sr?sr:I(F)?(C.next(),F):null}function z(C){const I=C.charCodeAt(0);return I>=97&&I<=122||I>=65&&I<=90||I>=48&&I<=57||I===95||I===36}function V(C){return B(C,z)}function Q(C){const I=C.charCodeAt(0);return I>=97&&I<=122||I>=65&&I<=90||I>=48&&I<=57||I===95||I===36||I===45}function j(C){return B(C,Q)}function te(C){const I=C.charCodeAt(0);return I>=48&&I<=57}function Z(C){return B(C,te)}function pe(C){const I=C.charCodeAt(0);return I>=48&&I<=57||I>=65&&I<=70||I>=97&&I<=102}function Me(C){return B(C,pe)}function re(C){let I="",F="";for(;I=Z(C);)F+=I;return F}function xe(C){let I="";for(;;){const F=C.currentChar();if(F==="{"||F==="}"||F==="@"||F==="|"||!F)break;if(F===xs||F===Nn)if(D(C))I+=F,C.next();else{if(E(C))break;I+=F,C.next()}else I+=F,C.next()}return I}function We(C){g(C);let I="",F="";for(;I=j(C);)F+=I;return C.currentChar()===sr&&f(Rt.UNTERMINATED_CLOSING_BRACE,r(),0),F}function oe(C){g(C);let I="";return C.currentChar()==="-"?(C.next(),I+=`-${re(C)}`):I+=re(C),C.currentChar()===sr&&f(Rt.UNTERMINATED_CLOSING_BRACE,r(),0),I}function ge(C){return C!==mM&&C!==Nn}function Se(C){g(C),p(C,"'");let I="",F="";for(;I=B(C,ge);)I==="\\"?F+=$(C):F+=I;const H=C.currentChar();return H===Nn||H===sr?(f(Rt.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,r(),0),H===Nn&&(C.next(),p(C,"'")),F):(p(C,"'"),F)}function $(C){const I=C.currentChar();switch(I){case"\\":case"'":return C.next(),`\\${I}`;case"u":return ae(C,I,4);case"U":return ae(C,I,6);default:return f(Rt.UNKNOWN_ESCAPE_SEQUENCE,r(),0,I),""}}function ae(C,I,F){p(C,I);let H="";for(let ce=0;ce{const H=C.currentChar();return H==="{"||H==="@"||H==="|"||H==="("||H===")"||!H||H===xs?F:(F+=H,C.next(),I(F))};return I("")}function U(C){g(C);const I=p(C,"|");return g(C),I}function A(C,I){let F=null;switch(C.currentChar()){case"{":return I.braceNest>=1&&f(Rt.NOT_ALLOW_NEST_PLACEHOLDER,r(),0),C.next(),F=h(I,2,"{"),g(C),I.braceNest++,F;case"}":return I.braceNest>0&&I.currentType===2&&f(Rt.EMPTY_PLACEHOLDER,r(),0),C.next(),F=h(I,3,"}"),I.braceNest--,I.braceNest>0&&g(C),I.inLinked&&I.braceNest===0&&(I.inLinked=!1),F;case"@":return I.braceNest>0&&f(Rt.UNTERMINATED_CLOSING_BRACE,r(),0),F=W(C,I)||d(I),I.braceNest=0,F;default:{let ce=!0,R=!0,x=!0;if(E(C))return I.braceNest>0&&f(Rt.UNTERMINATED_CLOSING_BRACE,r(),0),F=h(I,1,U(C)),I.braceNest=0,I.inLinked=!1,F;if(I.braceNest>0&&(I.currentType===4||I.currentType===5||I.currentType===6))return f(Rt.UNTERMINATED_CLOSING_BRACE,r(),0),I.braceNest=0,G(C,I);if(ce=b(C,I))return F=h(I,4,We(C)),g(C),F;if(R=y(C,I))return F=h(I,5,oe(C)),g(C),F;if(x=T(C,I))return F=h(I,6,Se(C)),g(C),F;if(!ce&&!R&&!x)return F=h(I,12,ue(C)),f(Rt.INVALID_TOKEN_IN_PLACEHOLDER,r(),0,F.value),g(C),F;break}}return F}function W(C,I){const{currentType:F}=I;let H=null;const ce=C.currentChar();switch((F===7||F===8||F===11||F===9)&&(ce===Nn||ce===xs)&&f(Rt.INVALID_LINKED_FORMAT,r(),0),ce){case"@":return C.next(),H=h(I,7,"@"),I.inLinked=!0,H;case".":return g(C),C.next(),h(I,8,".");case":":return g(C),C.next(),h(I,9,":");default:return E(C)?(H=h(I,1,U(C)),I.braceNest=0,I.inLinked=!1,H):w(C,I)||P(C,I)?(g(C),W(C,I)):S(C,I)?(g(C),h(I,11,$e(C))):M(C,I)?(g(C),ce==="{"?A(C,I)||H:h(I,10,N(C))):(F===7&&f(Rt.INVALID_LINKED_FORMAT,r(),0),I.braceNest=0,I.inLinked=!1,G(C,I))}}function G(C,I){let F={type:13};if(I.braceNest>0)return A(C,I)||d(I);if(I.inLinked)return W(C,I)||d(I);switch(C.currentChar()){case"{":return A(C,I)||d(I);case"}":return f(Rt.UNBALANCED_CLOSING_BRACE,r(),0),C.next(),h(I,3,"}");case"@":return W(C,I)||d(I);default:{if(E(C))return F=h(I,1,U(C)),I.braceNest=0,I.inLinked=!1,F;if(D(C))return h(I,0,xe(C));break}}return F}function X(){const{currentType:C,offset:I,startLoc:F,endLoc:H}=l;return l.lastType=C,l.lastOffset=I,l.lastStartLoc=F,l.lastEndLoc=H,l.offset=s(),l.startLoc=r(),i.currentChar()===sr?h(l,13):G(i,l)}return{nextToken:X,currentOffset:s,currentPosition:r,context:c}}const x8="parser",M8=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function S8(n,e,t){switch(n){case"\\\\":return"\\";case"\\'":return"'";default:{const i=parseInt(e||t,16);return i<=55295||i>=57344?String.fromCodePoint(i):"�"}}}function E8(n={}){const e=n.location!==!1,{onError:t}=n;function i(m,v,b,y,...T){const w=m.currentPosition();if(w.offset+=y,w.column+=y,t){const S=e?a0(b,w):null,P=rp(v,S,{domain:x8,args:T});t(P)}}function s(m,v,b){const y={type:m};return e&&(y.start=v,y.end=v,y.loc={start:b,end:b}),y}function r(m,v,b,y){e&&(m.end=v,m.loc&&(m.loc.end=b))}function o(m,v){const b=m.context(),y=s(3,b.offset,b.startLoc);return y.value=v,r(y,m.currentOffset(),m.currentPosition()),y}function a(m,v){const b=m.context(),{lastOffset:y,lastStartLoc:T}=b,w=s(5,y,T);return w.index=parseInt(v,10),m.nextToken(),r(w,m.currentOffset(),m.currentPosition()),w}function l(m,v){const b=m.context(),{lastOffset:y,lastStartLoc:T}=b,w=s(4,y,T);return w.key=v,m.nextToken(),r(w,m.currentOffset(),m.currentPosition()),w}function c(m,v){const b=m.context(),{lastOffset:y,lastStartLoc:T}=b,w=s(9,y,T);return w.value=v.replace(M8,S8),m.nextToken(),r(w,m.currentOffset(),m.currentPosition()),w}function u(m){const v=m.nextToken(),b=m.context(),{lastOffset:y,lastStartLoc:T}=b,w=s(8,y,T);return v.type!==11?(i(m,Rt.UNEXPECTED_EMPTY_LINKED_MODIFIER,b.lastStartLoc,0),w.value="",r(w,y,T),{nextConsumeToken:v,node:w}):(v.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,qi(v)),w.value=v.value||"",r(w,m.currentOffset(),m.currentPosition()),{node:w})}function f(m,v){const b=m.context(),y=s(7,b.offset,b.startLoc);return y.value=v,r(y,m.currentOffset(),m.currentPosition()),y}function h(m){const v=m.context(),b=s(6,v.offset,v.startLoc);let y=m.nextToken();if(y.type===8){const T=u(m);b.modifier=T.node,y=T.nextConsumeToken||m.nextToken()}switch(y.type!==9&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(y)),y=m.nextToken(),y.type===2&&(y=m.nextToken()),y.type){case 10:y.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(y)),b.key=f(m,y.value||"");break;case 4:y.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(y)),b.key=l(m,y.value||"");break;case 5:y.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(y)),b.key=a(m,y.value||"");break;case 6:y.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(y)),b.key=c(m,y.value||"");break;default:{i(m,Rt.UNEXPECTED_EMPTY_LINKED_KEY,v.lastStartLoc,0);const T=m.context(),w=s(7,T.offset,T.startLoc);return w.value="",r(w,T.offset,T.startLoc),b.key=w,r(b,T.offset,T.startLoc),{nextConsumeToken:y,node:b}}}return r(b,m.currentOffset(),m.currentPosition()),{node:b}}function d(m){const v=m.context(),b=v.currentType===1?m.currentOffset():v.offset,y=v.currentType===1?v.endLoc:v.startLoc,T=s(2,b,y);T.items=[];let w=null;do{const M=w||m.nextToken();switch(w=null,M.type){case 0:M.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(M)),T.items.push(o(m,M.value||""));break;case 5:M.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(M)),T.items.push(a(m,M.value||""));break;case 4:M.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(M)),T.items.push(l(m,M.value||""));break;case 6:M.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(M)),T.items.push(c(m,M.value||""));break;case 7:{const E=h(m);T.items.push(E.node),w=E.nextConsumeToken||null;break}}}while(v.currentType!==13&&v.currentType!==1);const S=v.currentType===1?v.lastOffset:m.currentOffset(),P=v.currentType===1?v.lastEndLoc:m.currentPosition();return r(T,S,P),T}function p(m,v,b,y){const T=m.context();let w=y.items.length===0;const S=s(1,v,b);S.cases=[],S.cases.push(y);do{const P=d(m);w||(w=P.items.length===0),S.cases.push(P)}while(T.currentType!==13);return w&&i(m,Rt.MUST_HAVE_MESSAGES_IN_PLURAL,b,0),r(S,m.currentOffset(),m.currentPosition()),S}function _(m){const v=m.context(),{offset:b,startLoc:y}=v,T=d(m);return v.currentType===13?T:p(m,b,y,T)}function g(m){const v=b8(m,fn({},n)),b=v.context(),y=s(0,b.offset,b.startLoc);return e&&y.loc&&(y.loc.source=m),y.body=_(v),n.onCacheKey&&(y.cacheKey=n.onCacheKey(m)),b.currentType!==13&&i(v,Rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,m[b.offset]||""),r(y,v.currentOffset(),v.currentPosition()),y}return{parse:g}}function qi(n){if(n.type===13)return"EOF";const e=(n.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function T8(n,e={}){const t={ast:n,helpers:new Set};return{context:()=>t,helper:r=>(t.helpers.add(r),r)}}function gM(n,e){for(let t=0;t_M(t)),n}function _M(n){if(n.items.length===1){const e=n.items[0];(e.type===3||e.type===9)&&(n.static=e.value,delete e.value)}else{const e=[];for(let t=0;to;function l(_,g){o.code+=_}function c(_,g=!0){const m=g?i:"";l(s?m+" ".repeat(_):m)}function u(_=!0){const g=++o.indentLevel;_&&c(g)}function f(_=!0){const g=--o.indentLevel;_&&c(g)}function h(){c(o.indentLevel)}return{context:a,push:l,indent:u,deindent:f,newline:h,helper:_=>`_${_}`,needIndent:()=>o.needIndent}}function R8(n,e){const{helper:t}=n;n.push(`${t("linked")}(`),Ua(n,e.key),e.modifier?(n.push(", "),Ua(n,e.modifier),n.push(", _type")):n.push(", undefined, _type"),n.push(")")}function P8(n,e){const{helper:t,needIndent:i}=n;n.push(`${t("normalize")}([`),n.indent(i());const s=e.items.length;for(let r=0;r1){n.push(`${t("plural")}([`),n.indent(i());const s=e.cases.length;for(let r=0;r{const t=Fe(e.mode)?e.mode:"normal",i=Fe(e.filename)?e.filename:"message.intl";e.sourceMap;const s=e.breakLineCode!=null?e.breakLineCode:t==="arrow"?";":` -`,r=e.needIndent?e.needIndent:t!=="arrow",o=n.helpers||[],a=C8(n,{filename:i,breakLineCode:s,needIndent:r});a.push(t==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),a.indent(r),o.length>0&&(a.push(`const { ${ov(o.map(u=>`${u}: _${u}`),", ")} } = ctx`),a.newline()),a.push("return "),Ua(a,n),a.deindent(r),a.push("}"),delete n.helpers;const{code:l,map:c}=a.context();return{ast:n,code:l,map:c?c.toJSON():void 0}};function O8(n,e={}){const t=fn({},e),i=!!t.jit,s=!!t.minify,r=t.optimize==null?!0:t.optimize,a=E8(t).parse(n);return i?(r&&A8(a),s&&ra(a),{ast:a,code:""}):(w8(a,t),D8(a,t))}/*! + */function f8(n,e,t){return{line:n,column:e,offset:t}}function l0(n,e,t){return{start:n,end:e}}const Rt={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},h8=17;function rp(n,e,t={}){const{domain:i,messages:s,args:r}=t,o=n,a=new SyntaxError(String(o));return a.code=n,e&&(a.location=e),a.domain=i,a}function d8(n){throw n}const xs=" ",p8="\r",Nn=` +`,m8="\u2028",g8="\u2029";function _8(n){const e=n;let t=0,i=1,s=1,r=0;const o=S=>e[S]===p8&&e[S+1]===Nn,a=S=>e[S]===Nn,l=S=>e[S]===g8,c=S=>e[S]===m8,u=S=>o(S)||a(S)||l(S)||c(S),f=()=>t,h=()=>i,d=()=>s,p=()=>r,_=S=>o(S)||l(S)||c(S)?Nn:e[S],g=()=>_(t),m=()=>_(t+r);function v(){return r=0,u(t)&&(i++,s=0),o(t)&&t++,t++,s++,e[t]}function b(){return o(t+r)&&r++,r++,e[t+r]}function y(){t=0,i=1,s=1,r=0}function T(S=0){r=S}function w(){const S=t+r;for(;S!==t;)v();r=0}return{index:f,line:h,column:d,peekOffset:p,charAt:_,currentChar:g,currentPeek:m,next:v,peek:b,reset:y,resetPeek:T,skipToPeek:w}}const sr=void 0,v8=".",mM="'",y8="tokenizer";function b8(n,e={}){const t=e.location!==!1,i=_8(n),s=()=>i.index(),r=()=>f8(i.line(),i.column(),i.index()),o=r(),a=s(),l={currentType:13,offset:a,startLoc:o,endLoc:o,lastType:13,lastOffset:a,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:""},c=()=>l,{onError:u}=e;function f(C,I,F,...H){const ce=c();if(I.column+=F,I.offset+=F,u){const R=t?l0(ce.startLoc,I):null,x=rp(C,R,{domain:y8,args:H});u(x)}}function h(C,I,F){C.endLoc=r(),C.currentType=I;const H={type:I};return t&&(H.loc=l0(C.startLoc,C.endLoc)),F!=null&&(H.value=F),H}const d=C=>h(C,13);function p(C,I){return C.currentChar()===I?(C.next(),I):(f(Rt.EXPECTED_TOKEN,r(),0,I),"")}function _(C){let I="";for(;C.currentPeek()===xs||C.currentPeek()===Nn;)I+=C.currentPeek(),C.peek();return I}function g(C){const I=_(C);return C.skipToPeek(),I}function m(C){if(C===sr)return!1;const I=C.charCodeAt(0);return I>=97&&I<=122||I>=65&&I<=90||I===95}function v(C){if(C===sr)return!1;const I=C.charCodeAt(0);return I>=48&&I<=57}function b(C,I){const{currentType:F}=I;if(F!==2)return!1;_(C);const H=m(C.currentPeek());return C.resetPeek(),H}function y(C,I){const{currentType:F}=I;if(F!==2)return!1;_(C);const H=C.currentPeek()==="-"?C.peek():C.currentPeek(),ce=v(H);return C.resetPeek(),ce}function T(C,I){const{currentType:F}=I;if(F!==2)return!1;_(C);const H=C.currentPeek()===mM;return C.resetPeek(),H}function w(C,I){const{currentType:F}=I;if(F!==7)return!1;_(C);const H=C.currentPeek()===".";return C.resetPeek(),H}function S(C,I){const{currentType:F}=I;if(F!==8)return!1;_(C);const H=m(C.currentPeek());return C.resetPeek(),H}function P(C,I){const{currentType:F}=I;if(!(F===7||F===11))return!1;_(C);const H=C.currentPeek()===":";return C.resetPeek(),H}function M(C,I){const{currentType:F}=I;if(F!==9)return!1;const H=()=>{const R=C.currentPeek();return R==="{"?m(C.peek()):R==="@"||R==="|"||R===":"||R==="."||R===xs||!R?!1:R===Nn?(C.peek(),H()):D(C,!1)},ce=H();return C.resetPeek(),ce}function E(C){_(C);const I=C.currentPeek()==="|";return C.resetPeek(),I}function D(C,I=!0){const F=(ce=!1,R="")=>{const x=C.currentPeek();return x==="{"||x==="@"||!x?ce:x==="|"?!(R===xs||R===Nn):x===xs?(C.peek(),F(!0,xs)):x===Nn?(C.peek(),F(!0,Nn)):!0},H=F();return I&&C.resetPeek(),H}function B(C,I){const F=C.currentChar();return F===sr?sr:I(F)?(C.next(),F):null}function z(C){const I=C.charCodeAt(0);return I>=97&&I<=122||I>=65&&I<=90||I>=48&&I<=57||I===95||I===36}function V(C){return B(C,z)}function Q(C){const I=C.charCodeAt(0);return I>=97&&I<=122||I>=65&&I<=90||I>=48&&I<=57||I===95||I===36||I===45}function j(C){return B(C,Q)}function te(C){const I=C.charCodeAt(0);return I>=48&&I<=57}function Z(C){return B(C,te)}function pe(C){const I=C.charCodeAt(0);return I>=48&&I<=57||I>=65&&I<=70||I>=97&&I<=102}function Me(C){return B(C,pe)}function re(C){let I="",F="";for(;I=Z(C);)F+=I;return F}function xe(C){let I="";for(;;){const F=C.currentChar();if(F==="{"||F==="}"||F==="@"||F==="|"||!F)break;if(F===xs||F===Nn)if(D(C))I+=F,C.next();else{if(E(C))break;I+=F,C.next()}else I+=F,C.next()}return I}function We(C){g(C);let I="",F="";for(;I=j(C);)F+=I;return C.currentChar()===sr&&f(Rt.UNTERMINATED_CLOSING_BRACE,r(),0),F}function oe(C){g(C);let I="";return C.currentChar()==="-"?(C.next(),I+=`-${re(C)}`):I+=re(C),C.currentChar()===sr&&f(Rt.UNTERMINATED_CLOSING_BRACE,r(),0),I}function ge(C){return C!==mM&&C!==Nn}function Se(C){g(C),p(C,"'");let I="",F="";for(;I=B(C,ge);)I==="\\"?F+=$(C):F+=I;const H=C.currentChar();return H===Nn||H===sr?(f(Rt.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,r(),0),H===Nn&&(C.next(),p(C,"'")),F):(p(C,"'"),F)}function $(C){const I=C.currentChar();switch(I){case"\\":case"'":return C.next(),`\\${I}`;case"u":return ae(C,I,4);case"U":return ae(C,I,6);default:return f(Rt.UNKNOWN_ESCAPE_SEQUENCE,r(),0,I),""}}function ae(C,I,F){p(C,I);let H="";for(let ce=0;ce{const H=C.currentChar();return H==="{"||H==="@"||H==="|"||H==="("||H===")"||!H||H===xs?F:(F+=H,C.next(),I(F))};return I("")}function U(C){g(C);const I=p(C,"|");return g(C),I}function A(C,I){let F=null;switch(C.currentChar()){case"{":return I.braceNest>=1&&f(Rt.NOT_ALLOW_NEST_PLACEHOLDER,r(),0),C.next(),F=h(I,2,"{"),g(C),I.braceNest++,F;case"}":return I.braceNest>0&&I.currentType===2&&f(Rt.EMPTY_PLACEHOLDER,r(),0),C.next(),F=h(I,3,"}"),I.braceNest--,I.braceNest>0&&g(C),I.inLinked&&I.braceNest===0&&(I.inLinked=!1),F;case"@":return I.braceNest>0&&f(Rt.UNTERMINATED_CLOSING_BRACE,r(),0),F=W(C,I)||d(I),I.braceNest=0,F;default:{let ce=!0,R=!0,x=!0;if(E(C))return I.braceNest>0&&f(Rt.UNTERMINATED_CLOSING_BRACE,r(),0),F=h(I,1,U(C)),I.braceNest=0,I.inLinked=!1,F;if(I.braceNest>0&&(I.currentType===4||I.currentType===5||I.currentType===6))return f(Rt.UNTERMINATED_CLOSING_BRACE,r(),0),I.braceNest=0,G(C,I);if(ce=b(C,I))return F=h(I,4,We(C)),g(C),F;if(R=y(C,I))return F=h(I,5,oe(C)),g(C),F;if(x=T(C,I))return F=h(I,6,Se(C)),g(C),F;if(!ce&&!R&&!x)return F=h(I,12,ue(C)),f(Rt.INVALID_TOKEN_IN_PLACEHOLDER,r(),0,F.value),g(C),F;break}}return F}function W(C,I){const{currentType:F}=I;let H=null;const ce=C.currentChar();switch((F===7||F===8||F===11||F===9)&&(ce===Nn||ce===xs)&&f(Rt.INVALID_LINKED_FORMAT,r(),0),ce){case"@":return C.next(),H=h(I,7,"@"),I.inLinked=!0,H;case".":return g(C),C.next(),h(I,8,".");case":":return g(C),C.next(),h(I,9,":");default:return E(C)?(H=h(I,1,U(C)),I.braceNest=0,I.inLinked=!1,H):w(C,I)||P(C,I)?(g(C),W(C,I)):S(C,I)?(g(C),h(I,11,$e(C))):M(C,I)?(g(C),ce==="{"?A(C,I)||H:h(I,10,N(C))):(F===7&&f(Rt.INVALID_LINKED_FORMAT,r(),0),I.braceNest=0,I.inLinked=!1,G(C,I))}}function G(C,I){let F={type:13};if(I.braceNest>0)return A(C,I)||d(I);if(I.inLinked)return W(C,I)||d(I);switch(C.currentChar()){case"{":return A(C,I)||d(I);case"}":return f(Rt.UNBALANCED_CLOSING_BRACE,r(),0),C.next(),h(I,3,"}");case"@":return W(C,I)||d(I);default:{if(E(C))return F=h(I,1,U(C)),I.braceNest=0,I.inLinked=!1,F;if(D(C))return h(I,0,xe(C));break}}return F}function X(){const{currentType:C,offset:I,startLoc:F,endLoc:H}=l;return l.lastType=C,l.lastOffset=I,l.lastStartLoc=F,l.lastEndLoc=H,l.offset=s(),l.startLoc=r(),i.currentChar()===sr?h(l,13):G(i,l)}return{nextToken:X,currentOffset:s,currentPosition:r,context:c}}const x8="parser",M8=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function S8(n,e,t){switch(n){case"\\\\":return"\\";case"\\'":return"'";default:{const i=parseInt(e||t,16);return i<=55295||i>=57344?String.fromCodePoint(i):"�"}}}function E8(n={}){const e=n.location!==!1,{onError:t}=n;function i(m,v,b,y,...T){const w=m.currentPosition();if(w.offset+=y,w.column+=y,t){const S=e?l0(b,w):null,P=rp(v,S,{domain:x8,args:T});t(P)}}function s(m,v,b){const y={type:m};return e&&(y.start=v,y.end=v,y.loc={start:b,end:b}),y}function r(m,v,b,y){e&&(m.end=v,m.loc&&(m.loc.end=b))}function o(m,v){const b=m.context(),y=s(3,b.offset,b.startLoc);return y.value=v,r(y,m.currentOffset(),m.currentPosition()),y}function a(m,v){const b=m.context(),{lastOffset:y,lastStartLoc:T}=b,w=s(5,y,T);return w.index=parseInt(v,10),m.nextToken(),r(w,m.currentOffset(),m.currentPosition()),w}function l(m,v){const b=m.context(),{lastOffset:y,lastStartLoc:T}=b,w=s(4,y,T);return w.key=v,m.nextToken(),r(w,m.currentOffset(),m.currentPosition()),w}function c(m,v){const b=m.context(),{lastOffset:y,lastStartLoc:T}=b,w=s(9,y,T);return w.value=v.replace(M8,S8),m.nextToken(),r(w,m.currentOffset(),m.currentPosition()),w}function u(m){const v=m.nextToken(),b=m.context(),{lastOffset:y,lastStartLoc:T}=b,w=s(8,y,T);return v.type!==11?(i(m,Rt.UNEXPECTED_EMPTY_LINKED_MODIFIER,b.lastStartLoc,0),w.value="",r(w,y,T),{nextConsumeToken:v,node:w}):(v.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,qi(v)),w.value=v.value||"",r(w,m.currentOffset(),m.currentPosition()),{node:w})}function f(m,v){const b=m.context(),y=s(7,b.offset,b.startLoc);return y.value=v,r(y,m.currentOffset(),m.currentPosition()),y}function h(m){const v=m.context(),b=s(6,v.offset,v.startLoc);let y=m.nextToken();if(y.type===8){const T=u(m);b.modifier=T.node,y=T.nextConsumeToken||m.nextToken()}switch(y.type!==9&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(y)),y=m.nextToken(),y.type===2&&(y=m.nextToken()),y.type){case 10:y.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(y)),b.key=f(m,y.value||"");break;case 4:y.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(y)),b.key=l(m,y.value||"");break;case 5:y.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(y)),b.key=a(m,y.value||"");break;case 6:y.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(y)),b.key=c(m,y.value||"");break;default:{i(m,Rt.UNEXPECTED_EMPTY_LINKED_KEY,v.lastStartLoc,0);const T=m.context(),w=s(7,T.offset,T.startLoc);return w.value="",r(w,T.offset,T.startLoc),b.key=w,r(b,T.offset,T.startLoc),{nextConsumeToken:y,node:b}}}return r(b,m.currentOffset(),m.currentPosition()),{node:b}}function d(m){const v=m.context(),b=v.currentType===1?m.currentOffset():v.offset,y=v.currentType===1?v.endLoc:v.startLoc,T=s(2,b,y);T.items=[];let w=null;do{const M=w||m.nextToken();switch(w=null,M.type){case 0:M.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(M)),T.items.push(o(m,M.value||""));break;case 5:M.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(M)),T.items.push(a(m,M.value||""));break;case 4:M.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(M)),T.items.push(l(m,M.value||""));break;case 6:M.value==null&&i(m,Rt.UNEXPECTED_LEXICAL_ANALYSIS,v.lastStartLoc,0,qi(M)),T.items.push(c(m,M.value||""));break;case 7:{const E=h(m);T.items.push(E.node),w=E.nextConsumeToken||null;break}}}while(v.currentType!==13&&v.currentType!==1);const S=v.currentType===1?v.lastOffset:m.currentOffset(),P=v.currentType===1?v.lastEndLoc:m.currentPosition();return r(T,S,P),T}function p(m,v,b,y){const T=m.context();let w=y.items.length===0;const S=s(1,v,b);S.cases=[],S.cases.push(y);do{const P=d(m);w||(w=P.items.length===0),S.cases.push(P)}while(T.currentType!==13);return w&&i(m,Rt.MUST_HAVE_MESSAGES_IN_PLURAL,b,0),r(S,m.currentOffset(),m.currentPosition()),S}function _(m){const v=m.context(),{offset:b,startLoc:y}=v,T=d(m);return v.currentType===13?T:p(m,b,y,T)}function g(m){const v=b8(m,fn({},n)),b=v.context(),y=s(0,b.offset,b.startLoc);return e&&y.loc&&(y.loc.source=m),y.body=_(v),n.onCacheKey&&(y.cacheKey=n.onCacheKey(m)),b.currentType!==13&&i(v,Rt.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,m[b.offset]||""),r(y,v.currentOffset(),v.currentPosition()),y}return{parse:g}}function qi(n){if(n.type===13)return"EOF";const e=(n.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function T8(n,e={}){const t={ast:n,helpers:new Set};return{context:()=>t,helper:r=>(t.helpers.add(r),r)}}function gM(n,e){for(let t=0;t_M(t)),n}function _M(n){if(n.items.length===1){const e=n.items[0];(e.type===3||e.type===9)&&(n.static=e.value,delete e.value)}else{const e=[];for(let t=0;to;function l(_,g){o.code+=_}function c(_,g=!0){const m=g?i:"";l(s?m+" ".repeat(_):m)}function u(_=!0){const g=++o.indentLevel;_&&c(g)}function f(_=!0){const g=--o.indentLevel;_&&c(g)}function h(){c(o.indentLevel)}return{context:a,push:l,indent:u,deindent:f,newline:h,helper:_=>`_${_}`,needIndent:()=>o.needIndent}}function R8(n,e){const{helper:t}=n;n.push(`${t("linked")}(`),Ua(n,e.key),e.modifier?(n.push(", "),Ua(n,e.modifier),n.push(", _type")):n.push(", undefined, _type"),n.push(")")}function P8(n,e){const{helper:t,needIndent:i}=n;n.push(`${t("normalize")}([`),n.indent(i());const s=e.items.length;for(let r=0;r1){n.push(`${t("plural")}([`),n.indent(i());const s=e.cases.length;for(let r=0;r{const t=Fe(e.mode)?e.mode:"normal",i=Fe(e.filename)?e.filename:"message.intl";e.sourceMap;const s=e.breakLineCode!=null?e.breakLineCode:t==="arrow"?";":` +`,r=e.needIndent?e.needIndent:t!=="arrow",o=n.helpers||[],a=C8(n,{filename:i,breakLineCode:s,needIndent:r});a.push(t==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),a.indent(r),o.length>0&&(a.push(`const { ${av(o.map(u=>`${u}: _${u}`),", ")} } = ctx`),a.newline()),a.push("return "),Ua(a,n),a.deindent(r),a.push("}"),delete n.helpers;const{code:l,map:c}=a.context();return{ast:n,code:l,map:c?c.toJSON():void 0}};function O8(n,e={}){const t=fn({},e),i=!!t.jit,s=!!t.minify,r=t.optimize==null?!0:t.optimize,a=E8(t).parse(n);return i?(r&&A8(a),s&&ra(a),{ast:a,code:""}):(w8(a,t),D8(a,t))}/*! * core-base v11.1.5 * (c) 2025 kazuya kawaguchi * Released under the MIT License. - */function N8(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(sv().__INTLIFY_PROD_DEVTOOLS__=!1)}function ss(n){return xt(n)&&lv(n)===0&&(Oi(n,"b")||Oi(n,"body"))}const PA=["b","body"];function U8(n){return Dr(n,PA)}const IA=["c","cases"];function F8(n){return Dr(n,IA,[])}const LA=["s","static"];function k8(n){return Dr(n,LA)}const DA=["i","items"];function B8(n){return Dr(n,DA,[])}const OA=["t","type"];function lv(n){return Dr(n,OA)}const NA=["v","value"];function pf(n,e){const t=Dr(n,NA);if(t!=null)return t;throw wc(e)}const UA=["m","modifier"];function z8(n){return Dr(n,UA)}const FA=["k","key"];function V8(n){const e=Dr(n,FA);if(e)return e;throw wc(6)}function Dr(n,e,t){for(let i=0;iH8(t,n)}function H8(n,e){const t=U8(e);if(t==null)throw wc(0);if(lv(t)===1){const r=F8(t);return n.plural(r.reduce((o,a)=>[...o,vM(n,a)],[]))}else return vM(n,t)}function vM(n,e){const t=k8(e);if(t!=null)return n.type==="text"?t:n.normalize([t]);{const i=B8(e).reduce((s,r)=>[...s,l0(n,r)],[]);return n.normalize(i)}}function l0(n,e){const t=lv(e);switch(t){case 3:return pf(e,t);case 9:return pf(e,t);case 4:{const i=e;if(Oi(i,"k")&&i.k)return n.interpolate(n.named(i.k));if(Oi(i,"key")&&i.key)return n.interpolate(n.named(i.key));throw wc(t)}case 5:{const i=e;if(Oi(i,"i")&&Qt(i.i))return n.interpolate(n.list(i.i));if(Oi(i,"index")&&Qt(i.index))return n.interpolate(n.list(i.index));throw wc(t)}case 6:{const i=e,s=z8(i),r=V8(i);return n.linked(l0(n,r),s?l0(n,s):void 0,n.type)}case 7:return pf(e,t);case 8:return pf(e,t);default:throw new Error(`unhandled node on format message part: ${t}`)}}const G8=n=>n;let mf=It();function W8(n,e={}){let t=!1;const i=e.onError||d8;return e.onError=s=>{t=!0,i(s)},{...O8(n,e),detectError:t}}function X8(n,e){if(Fe(n)){Ht(e.warnHtmlMessage)&&e.warnHtmlMessage;const i=(e.onCacheKey||G8)(n),s=mf[i];if(s)return s;const{ast:r,detectError:o}=W8(n,{...e,location:!1,jit:!0}),a=jm(r);return o?a:mf[i]=a}else{const t=n.cacheKey;if(t){const i=mf[t];return i||(mf[t]=jm(n))}else return jm(n)}}let Ac=null;function $8(n){Ac=n}function q8(n,e,t){Ac&&Ac.emit("i18n:init",{timestamp:Date.now(),i18n:n,version:e,meta:t})}const Y8=j8("function:translate");function j8(n){return e=>Ac&&Ac.emit(n,e)}const Ps={INVALID_ARGUMENT:h8,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},K8=24;function Is(n){return rp(n,null,void 0)}function cv(n,e){return e.locale!=null?yM(e.locale):yM(n.locale)}let Km;function yM(n){if(Fe(n))return n;if(Vt(n)){if(n.resolvedOnce&&Km!=null)return Km;if(n.constructor.name==="Function"){const e=n();if(l8(e))throw Is(Ps.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Km=e}else throw Is(Ps.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw Is(Ps.NOT_SUPPORT_LOCALE_TYPE)}function Z8(n,e,t){return[...new Set([t,...Yt(e)?e:xt(e)?Object.keys(e):Fe(e)?[e]:[t]])]}function BA(n,e,t){const i=Fe(t)?t:Hh,s=n;s.__localeChainCache||(s.__localeChainCache=new Map);let r=s.__localeChainCache.get(i);if(!r){r=[];let o=[t];for(;Yt(o);)o=bM(r,o,e);const a=Yt(e)||!mt(e)?e:e.default?e.default:null;o=Fe(a)?[a]:a,Yt(o)&&bM(r,o,!1),s.__localeChainCache.set(i,r)}return r}function bM(n,e,t){let i=!0;for(let s=0;s{o===void 0?o=a:o+=a},h[1]=()=>{o!==void 0&&(e.push(o),o=void 0)},h[2]=()=>{h[0](),s++},h[3]=()=>{if(s>0)s--,i=4,h[0]();else{if(s=0,o===void 0||(o=s9(o),o===!1))return!1;h[1]()}};function d(){const p=n[t+1];if(i===5&&p==="'"||i===6&&p==='"')return t++,a="\\"+p,h[0](),!0}for(;i!==null;)if(t++,r=n[t],!(r==="\\"&&d())){if(l=i9(r),f=Or[i],c=f[l]||f.l||8,c===8||(i=c[0],c[1]!==void 0&&(u=h[c[1]],u&&(a=r,u()===!1))))return;if(i===7)return e}}const xM=new Map;function o9(n,e){return xt(n)?n[e]:null}function a9(n,e){if(!xt(n))return null;let t=xM.get(e);if(t||(t=r9(e),t&&xM.set(e,t)),!t)return null;const i=t.length;let s=n,r=0;for(;r`${n.charAt(0).toLocaleUpperCase()}${n.substr(1)}`;function c9(){return{upper:(n,e)=>e==="text"&&Fe(n)?n.toUpperCase():e==="vnode"&&xt(n)&&"__v_isVNode"in n?n.children.toUpperCase():n,lower:(n,e)=>e==="text"&&Fe(n)?n.toLowerCase():e==="vnode"&&xt(n)&&"__v_isVNode"in n?n.children.toLowerCase():n,capitalize:(n,e)=>e==="text"&&Fe(n)?SM(n):e==="vnode"&&xt(n)&&"__v_isVNode"in n?SM(n.children):n}}let zA;function u9(n){zA=n}let VA;function f9(n){VA=n}let HA;function h9(n){HA=n}let GA=null;const d9=n=>{GA=n},p9=()=>GA;let WA=null;const EM=n=>{WA=n},m9=()=>WA;let TM=0;function g9(n={}){const e=Vt(n.onWarn)?n.onWarn:u8,t=Fe(n.version)?n.version:l9,i=Fe(n.locale)||Vt(n.locale)?n.locale:Hh,s=Vt(i)?Hh:i,r=Yt(n.fallbackLocale)||mt(n.fallbackLocale)||Fe(n.fallbackLocale)||n.fallbackLocale===!1?n.fallbackLocale:s,o=mt(n.messages)?n.messages:Zm(s),a=mt(n.datetimeFormats)?n.datetimeFormats:Zm(s),l=mt(n.numberFormats)?n.numberFormats:Zm(s),c=fn(It(),n.modifiers,c9()),u=n.pluralRules||It(),f=Vt(n.missing)?n.missing:null,h=Ht(n.missingWarn)||Vh(n.missingWarn)?n.missingWarn:!0,d=Ht(n.fallbackWarn)||Vh(n.fallbackWarn)?n.fallbackWarn:!0,p=!!n.fallbackFormat,_=!!n.unresolving,g=Vt(n.postTranslation)?n.postTranslation:null,m=mt(n.processor)?n.processor:null,v=Ht(n.warnHtmlMessage)?n.warnHtmlMessage:!0,b=!!n.escapeParameter,y=Vt(n.messageCompiler)?n.messageCompiler:zA,T=Vt(n.messageResolver)?n.messageResolver:VA||o9,w=Vt(n.localeFallbacker)?n.localeFallbacker:HA||Z8,S=xt(n.fallbackContext)?n.fallbackContext:void 0,P=n,M=xt(P.__datetimeFormatters)?P.__datetimeFormatters:new Map,E=xt(P.__numberFormatters)?P.__numberFormatters:new Map,D=xt(P.__meta)?P.__meta:{};TM++;const B={version:t,cid:TM,locale:i,fallbackLocale:r,messages:o,modifiers:c,pluralRules:u,missing:f,missingWarn:h,fallbackWarn:d,fallbackFormat:p,unresolving:_,postTranslation:g,processor:m,warnHtmlMessage:v,escapeParameter:b,messageCompiler:y,messageResolver:T,localeFallbacker:w,fallbackContext:S,onWarn:e,__meta:D};return B.datetimeFormats=a,B.numberFormats=l,B.__datetimeFormatters=M,B.__numberFormatters=E,__INTLIFY_PROD_DEVTOOLS__&&q8(B,t,D),B}const Zm=n=>({[n]:It()});function uv(n,e,t,i,s){const{missing:r,onWarn:o}=n;if(r!==null){const a=r(n,t,e,s);return Fe(a)?a:e}else return e}function pl(n,e,t){const i=n;i.__localeChainCache=new Map,n.localeFallbacker(n,t,e)}function _9(n,e){return n===e?!1:n.split("-")[0]===e.split("-")[0]}function v9(n,e){const t=e.indexOf(n);if(t===-1)return!1;for(let i=t+1;i{XA.includes(l)?o[l]=t[l]:r[l]=t[l]}),Fe(i)?r.locale=i:mt(i)&&(o=i),mt(s)&&(o=s),[r.key||"",a,r,o]}function AM(n,e,t){const i=n;for(const s in t){const r=`${e}__${s}`;i.__datetimeFormatters.has(r)&&i.__datetimeFormatters.delete(r)}}function CM(n,...e){const{numberFormats:t,unresolving:i,fallbackLocale:s,onWarn:r,localeFallbacker:o}=n,{__numberFormatters:a}=n,[l,c,u,f]=u0(...e),h=Ht(u.missingWarn)?u.missingWarn:n.missingWarn;Ht(u.fallbackWarn)?u.fallbackWarn:n.fallbackWarn;const d=!!u.part,p=cv(n,u),_=o(n,s,p);if(!Fe(l)||l==="")return new Intl.NumberFormat(p,f).format(c);let g={},m,v=null;const b="number format";for(let w=0;w<_.length&&(m=_[w],g=t[m]||{},v=g[l],!mt(v));w++)uv(n,l,m,h,b);if(!mt(v)||!Fe(m))return i?op:l;let y=`${m}__${l}`;sp(f)||(y=`${y}__${JSON.stringify(f)}`);let T=a.get(y);return T||(T=new Intl.NumberFormat(m,fn({},v,f)),a.set(y,T)),d?T.formatToParts(c):T.format(c)}const $A=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function u0(...n){const[e,t,i,s]=n,r=It();let o=It();if(!Qt(e))throw Is(Ps.INVALID_ARGUMENT);const a=e;return Fe(t)?r.key=t:mt(t)&&Object.keys(t).forEach(l=>{$A.includes(l)?o[l]=t[l]:r[l]=t[l]}),Fe(i)?r.locale=i:mt(i)&&(o=i),mt(s)&&(o=s),[r.key||"",a,r,o]}function RM(n,e,t){const i=n;for(const s in t){const r=`${e}__${s}`;i.__numberFormatters.has(r)&&i.__numberFormatters.delete(r)}}const y9=n=>n,b9=n=>"",x9="text",M9=n=>n.length===0?"":ov(n),S9=c8;function PM(n,e){return n=Math.abs(n),e===2?n?n>1?1:0:1:n?Math.min(n,2):0}function E9(n){const e=Qt(n.pluralIndex)?n.pluralIndex:-1;return n.named&&(Qt(n.named.count)||Qt(n.named.n))?Qt(n.named.count)?n.named.count:Qt(n.named.n)?n.named.n:e:e}function T9(n,e){e.count||(e.count=n),e.n||(e.n=n)}function w9(n={}){const e=n.locale,t=E9(n),i=xt(n.pluralRules)&&Fe(e)&&Vt(n.pluralRules[e])?n.pluralRules[e]:PM,s=xt(n.pluralRules)&&Fe(e)&&Vt(n.pluralRules[e])?PM:void 0,r=m=>m[i(t,m.length,s)],o=n.list||[],a=m=>o[m],l=n.named||It();Qt(n.pluralIndex)&&T9(t,l);const c=m=>l[m];function u(m,v){const b=Vt(n.messages)?n.messages(m,!!v):xt(n.messages)?n.messages[m]:!1;return b||(n.parent?n.parent.message(m):b9)}const f=m=>n.modifiers?n.modifiers[m]:y9,h=mt(n.processor)&&Vt(n.processor.normalize)?n.processor.normalize:M9,d=mt(n.processor)&&Vt(n.processor.interpolate)?n.processor.interpolate:S9,p=mt(n.processor)&&Fe(n.processor.type)?n.processor.type:x9,g={list:a,named:c,plural:r,linked:(m,...v)=>{const[b,y]=v;let T="text",w="";v.length===1?xt(b)?(w=b.modifier||w,T=b.type||T):Fe(b)&&(w=b||w):v.length===2&&(Fe(b)&&(w=b||w),Fe(y)&&(T=y||T));const S=u(m,!0)(g),P=T==="vnode"&&Yt(S)&&w?S[0]:S;return w?f(w)(P,T):P},message:u,type:p,interpolate:d,normalize:h,values:fn(It(),o,l)};return g}const IM=()=>"",mi=n=>Vt(n);function LM(n,...e){const{fallbackFormat:t,postTranslation:i,unresolving:s,messageCompiler:r,fallbackLocale:o,messages:a}=n,[l,c]=f0(...e),u=Ht(c.missingWarn)?c.missingWarn:n.missingWarn,f=Ht(c.fallbackWarn)?c.fallbackWarn:n.fallbackWarn,h=Ht(c.escapeParameter)?c.escapeParameter:n.escapeParameter,d=!!c.resolvedMessage,p=Fe(c.default)||Ht(c.default)?Ht(c.default)?r?l:()=>l:c.default:t?r?l:()=>l:null,_=t||p!=null&&(Fe(p)||Vt(p)),g=cv(n,c);h&&A9(c);let[m,v,b]=d?[l,g,a[g]||It()]:qA(n,l,g,o,f,u),y=m,T=l;if(!d&&!(Fe(y)||ss(y)||mi(y))&&_&&(y=p,T=y),!d&&(!(Fe(y)||ss(y)||mi(y))||!Fe(v)))return s?op:l;let w=!1;const S=()=>{w=!0},P=mi(y)?y:YA(n,l,v,y,T,S);if(w)return y;const M=P9(n,v,b,c),E=w9(M),D=C9(n,P,E),B=i?i(D,l):D;if(__INTLIFY_PROD_DEVTOOLS__){const z={timestamp:Date.now(),key:Fe(l)?l:mi(y)?y.key:"",locale:v||(mi(y)?y.locale:""),format:Fe(y)?y:mi(y)?y.source:"",message:B};z.meta=fn({},n.__meta,p9()||{}),Y8(z)}return B}function A9(n){Yt(n.list)?n.list=n.list.map(e=>Fe(e)?pM(e):e):xt(n.named)&&Object.keys(n.named).forEach(e=>{Fe(n.named[e])&&(n.named[e]=pM(n.named[e]))})}function qA(n,e,t,i,s,r){const{messages:o,onWarn:a,messageResolver:l,localeFallbacker:c}=n,u=c(n,i,t);let f=It(),h,d=null;const p="translate";for(let _=0;_i;return c.locale=t,c.key=e,c}const l=o(i,R9(n,t,s,i,a,r));return l.locale=t,l.key=e,l.source=i,l}function C9(n,e,t){return e(t)}function f0(...n){const[e,t,i]=n,s=It();if(!Fe(e)&&!Qt(e)&&!mi(e)&&!ss(e))throw Is(Ps.INVALID_ARGUMENT);const r=Qt(e)?String(e):(mi(e),e);return Qt(t)?s.plural=t:Fe(t)?s.default=t:mt(t)&&!sp(t)?s.named=t:Yt(t)&&(s.list=t),Qt(i)?s.plural=i:Fe(i)?s.default=i:mt(i)&&fn(s,i),[r,s]}function R9(n,e,t,i,s,r){return{locale:e,key:t,warnHtmlMessage:s,onError:o=>{throw r&&r(o),o},onCacheKey:o=>i8(e,t,o)}}function P9(n,e,t,i){const{modifiers:s,pluralRules:r,messageResolver:o,fallbackLocale:a,fallbackWarn:l,missingWarn:c,fallbackContext:u}=n,h={locale:e,modifiers:s,pluralRules:r,messages:(d,p)=>{let _=o(t,d);if(_==null&&(u||p)){const[,,g]=qA(u||n,d,e,a,l,c);_=o(g,d)}if(Fe(_)||ss(_)){let g=!1;const v=YA(n,d,e,_,d,()=>{g=!0});return g?IM:v}else return mi(_)?_:IM}};return n.processor&&(h.processor=n.processor),i.list&&(h.list=i.list),i.named&&(h.named=i.named),Qt(i.plural)&&(h.pluralIndex=i.plural),h}N8();/*! + */function N8(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(rv().__INTLIFY_PROD_DEVTOOLS__=!1)}function ss(n){return xt(n)&&cv(n)===0&&(Oi(n,"b")||Oi(n,"body"))}const PA=["b","body"];function U8(n){return Dr(n,PA)}const IA=["c","cases"];function F8(n){return Dr(n,IA,[])}const LA=["s","static"];function k8(n){return Dr(n,LA)}const DA=["i","items"];function B8(n){return Dr(n,DA,[])}const OA=["t","type"];function cv(n){return Dr(n,OA)}const NA=["v","value"];function pf(n,e){const t=Dr(n,NA);if(t!=null)return t;throw wc(e)}const UA=["m","modifier"];function z8(n){return Dr(n,UA)}const FA=["k","key"];function V8(n){const e=Dr(n,FA);if(e)return e;throw wc(6)}function Dr(n,e,t){for(let i=0;iH8(t,n)}function H8(n,e){const t=U8(e);if(t==null)throw wc(0);if(cv(t)===1){const r=F8(t);return n.plural(r.reduce((o,a)=>[...o,vM(n,a)],[]))}else return vM(n,t)}function vM(n,e){const t=k8(e);if(t!=null)return n.type==="text"?t:n.normalize([t]);{const i=B8(e).reduce((s,r)=>[...s,c0(n,r)],[]);return n.normalize(i)}}function c0(n,e){const t=cv(e);switch(t){case 3:return pf(e,t);case 9:return pf(e,t);case 4:{const i=e;if(Oi(i,"k")&&i.k)return n.interpolate(n.named(i.k));if(Oi(i,"key")&&i.key)return n.interpolate(n.named(i.key));throw wc(t)}case 5:{const i=e;if(Oi(i,"i")&&Qt(i.i))return n.interpolate(n.list(i.i));if(Oi(i,"index")&&Qt(i.index))return n.interpolate(n.list(i.index));throw wc(t)}case 6:{const i=e,s=z8(i),r=V8(i);return n.linked(c0(n,r),s?c0(n,s):void 0,n.type)}case 7:return pf(e,t);case 8:return pf(e,t);default:throw new Error(`unhandled node on format message part: ${t}`)}}const G8=n=>n;let mf=It();function W8(n,e={}){let t=!1;const i=e.onError||d8;return e.onError=s=>{t=!0,i(s)},{...O8(n,e),detectError:t}}function X8(n,e){if(Fe(n)){Ht(e.warnHtmlMessage)&&e.warnHtmlMessage;const i=(e.onCacheKey||G8)(n),s=mf[i];if(s)return s;const{ast:r,detectError:o}=W8(n,{...e,location:!1,jit:!0}),a=Km(r);return o?a:mf[i]=a}else{const t=n.cacheKey;if(t){const i=mf[t];return i||(mf[t]=Km(n))}else return Km(n)}}let Ac=null;function $8(n){Ac=n}function q8(n,e,t){Ac&&Ac.emit("i18n:init",{timestamp:Date.now(),i18n:n,version:e,meta:t})}const Y8=j8("function:translate");function j8(n){return e=>Ac&&Ac.emit(n,e)}const Ps={INVALID_ARGUMENT:h8,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},K8=24;function Is(n){return rp(n,null,void 0)}function uv(n,e){return e.locale!=null?yM(e.locale):yM(n.locale)}let Zm;function yM(n){if(Fe(n))return n;if(Vt(n)){if(n.resolvedOnce&&Zm!=null)return Zm;if(n.constructor.name==="Function"){const e=n();if(l8(e))throw Is(Ps.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Zm=e}else throw Is(Ps.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw Is(Ps.NOT_SUPPORT_LOCALE_TYPE)}function Z8(n,e,t){return[...new Set([t,...Yt(e)?e:xt(e)?Object.keys(e):Fe(e)?[e]:[t]])]}function BA(n,e,t){const i=Fe(t)?t:Hh,s=n;s.__localeChainCache||(s.__localeChainCache=new Map);let r=s.__localeChainCache.get(i);if(!r){r=[];let o=[t];for(;Yt(o);)o=bM(r,o,e);const a=Yt(e)||!mt(e)?e:e.default?e.default:null;o=Fe(a)?[a]:a,Yt(o)&&bM(r,o,!1),s.__localeChainCache.set(i,r)}return r}function bM(n,e,t){let i=!0;for(let s=0;s{o===void 0?o=a:o+=a},h[1]=()=>{o!==void 0&&(e.push(o),o=void 0)},h[2]=()=>{h[0](),s++},h[3]=()=>{if(s>0)s--,i=4,h[0]();else{if(s=0,o===void 0||(o=s9(o),o===!1))return!1;h[1]()}};function d(){const p=n[t+1];if(i===5&&p==="'"||i===6&&p==='"')return t++,a="\\"+p,h[0](),!0}for(;i!==null;)if(t++,r=n[t],!(r==="\\"&&d())){if(l=i9(r),f=Or[i],c=f[l]||f.l||8,c===8||(i=c[0],c[1]!==void 0&&(u=h[c[1]],u&&(a=r,u()===!1))))return;if(i===7)return e}}const xM=new Map;function o9(n,e){return xt(n)?n[e]:null}function a9(n,e){if(!xt(n))return null;let t=xM.get(e);if(t||(t=r9(e),t&&xM.set(e,t)),!t)return null;const i=t.length;let s=n,r=0;for(;r`${n.charAt(0).toLocaleUpperCase()}${n.substr(1)}`;function c9(){return{upper:(n,e)=>e==="text"&&Fe(n)?n.toUpperCase():e==="vnode"&&xt(n)&&"__v_isVNode"in n?n.children.toUpperCase():n,lower:(n,e)=>e==="text"&&Fe(n)?n.toLowerCase():e==="vnode"&&xt(n)&&"__v_isVNode"in n?n.children.toLowerCase():n,capitalize:(n,e)=>e==="text"&&Fe(n)?SM(n):e==="vnode"&&xt(n)&&"__v_isVNode"in n?SM(n.children):n}}let zA;function u9(n){zA=n}let VA;function f9(n){VA=n}let HA;function h9(n){HA=n}let GA=null;const d9=n=>{GA=n},p9=()=>GA;let WA=null;const EM=n=>{WA=n},m9=()=>WA;let TM=0;function g9(n={}){const e=Vt(n.onWarn)?n.onWarn:u8,t=Fe(n.version)?n.version:l9,i=Fe(n.locale)||Vt(n.locale)?n.locale:Hh,s=Vt(i)?Hh:i,r=Yt(n.fallbackLocale)||mt(n.fallbackLocale)||Fe(n.fallbackLocale)||n.fallbackLocale===!1?n.fallbackLocale:s,o=mt(n.messages)?n.messages:Jm(s),a=mt(n.datetimeFormats)?n.datetimeFormats:Jm(s),l=mt(n.numberFormats)?n.numberFormats:Jm(s),c=fn(It(),n.modifiers,c9()),u=n.pluralRules||It(),f=Vt(n.missing)?n.missing:null,h=Ht(n.missingWarn)||Vh(n.missingWarn)?n.missingWarn:!0,d=Ht(n.fallbackWarn)||Vh(n.fallbackWarn)?n.fallbackWarn:!0,p=!!n.fallbackFormat,_=!!n.unresolving,g=Vt(n.postTranslation)?n.postTranslation:null,m=mt(n.processor)?n.processor:null,v=Ht(n.warnHtmlMessage)?n.warnHtmlMessage:!0,b=!!n.escapeParameter,y=Vt(n.messageCompiler)?n.messageCompiler:zA,T=Vt(n.messageResolver)?n.messageResolver:VA||o9,w=Vt(n.localeFallbacker)?n.localeFallbacker:HA||Z8,S=xt(n.fallbackContext)?n.fallbackContext:void 0,P=n,M=xt(P.__datetimeFormatters)?P.__datetimeFormatters:new Map,E=xt(P.__numberFormatters)?P.__numberFormatters:new Map,D=xt(P.__meta)?P.__meta:{};TM++;const B={version:t,cid:TM,locale:i,fallbackLocale:r,messages:o,modifiers:c,pluralRules:u,missing:f,missingWarn:h,fallbackWarn:d,fallbackFormat:p,unresolving:_,postTranslation:g,processor:m,warnHtmlMessage:v,escapeParameter:b,messageCompiler:y,messageResolver:T,localeFallbacker:w,fallbackContext:S,onWarn:e,__meta:D};return B.datetimeFormats=a,B.numberFormats=l,B.__datetimeFormatters=M,B.__numberFormatters=E,__INTLIFY_PROD_DEVTOOLS__&&q8(B,t,D),B}const Jm=n=>({[n]:It()});function fv(n,e,t,i,s){const{missing:r,onWarn:o}=n;if(r!==null){const a=r(n,t,e,s);return Fe(a)?a:e}else return e}function pl(n,e,t){const i=n;i.__localeChainCache=new Map,n.localeFallbacker(n,t,e)}function _9(n,e){return n===e?!1:n.split("-")[0]===e.split("-")[0]}function v9(n,e){const t=e.indexOf(n);if(t===-1)return!1;for(let i=t+1;i{XA.includes(l)?o[l]=t[l]:r[l]=t[l]}),Fe(i)?r.locale=i:mt(i)&&(o=i),mt(s)&&(o=s),[r.key||"",a,r,o]}function AM(n,e,t){const i=n;for(const s in t){const r=`${e}__${s}`;i.__datetimeFormatters.has(r)&&i.__datetimeFormatters.delete(r)}}function CM(n,...e){const{numberFormats:t,unresolving:i,fallbackLocale:s,onWarn:r,localeFallbacker:o}=n,{__numberFormatters:a}=n,[l,c,u,f]=f0(...e),h=Ht(u.missingWarn)?u.missingWarn:n.missingWarn;Ht(u.fallbackWarn)?u.fallbackWarn:n.fallbackWarn;const d=!!u.part,p=uv(n,u),_=o(n,s,p);if(!Fe(l)||l==="")return new Intl.NumberFormat(p,f).format(c);let g={},m,v=null;const b="number format";for(let w=0;w<_.length&&(m=_[w],g=t[m]||{},v=g[l],!mt(v));w++)fv(n,l,m,h,b);if(!mt(v)||!Fe(m))return i?op:l;let y=`${m}__${l}`;sp(f)||(y=`${y}__${JSON.stringify(f)}`);let T=a.get(y);return T||(T=new Intl.NumberFormat(m,fn({},v,f)),a.set(y,T)),d?T.formatToParts(c):T.format(c)}const $A=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function f0(...n){const[e,t,i,s]=n,r=It();let o=It();if(!Qt(e))throw Is(Ps.INVALID_ARGUMENT);const a=e;return Fe(t)?r.key=t:mt(t)&&Object.keys(t).forEach(l=>{$A.includes(l)?o[l]=t[l]:r[l]=t[l]}),Fe(i)?r.locale=i:mt(i)&&(o=i),mt(s)&&(o=s),[r.key||"",a,r,o]}function RM(n,e,t){const i=n;for(const s in t){const r=`${e}__${s}`;i.__numberFormatters.has(r)&&i.__numberFormatters.delete(r)}}const y9=n=>n,b9=n=>"",x9="text",M9=n=>n.length===0?"":av(n),S9=c8;function PM(n,e){return n=Math.abs(n),e===2?n?n>1?1:0:1:n?Math.min(n,2):0}function E9(n){const e=Qt(n.pluralIndex)?n.pluralIndex:-1;return n.named&&(Qt(n.named.count)||Qt(n.named.n))?Qt(n.named.count)?n.named.count:Qt(n.named.n)?n.named.n:e:e}function T9(n,e){e.count||(e.count=n),e.n||(e.n=n)}function w9(n={}){const e=n.locale,t=E9(n),i=xt(n.pluralRules)&&Fe(e)&&Vt(n.pluralRules[e])?n.pluralRules[e]:PM,s=xt(n.pluralRules)&&Fe(e)&&Vt(n.pluralRules[e])?PM:void 0,r=m=>m[i(t,m.length,s)],o=n.list||[],a=m=>o[m],l=n.named||It();Qt(n.pluralIndex)&&T9(t,l);const c=m=>l[m];function u(m,v){const b=Vt(n.messages)?n.messages(m,!!v):xt(n.messages)?n.messages[m]:!1;return b||(n.parent?n.parent.message(m):b9)}const f=m=>n.modifiers?n.modifiers[m]:y9,h=mt(n.processor)&&Vt(n.processor.normalize)?n.processor.normalize:M9,d=mt(n.processor)&&Vt(n.processor.interpolate)?n.processor.interpolate:S9,p=mt(n.processor)&&Fe(n.processor.type)?n.processor.type:x9,g={list:a,named:c,plural:r,linked:(m,...v)=>{const[b,y]=v;let T="text",w="";v.length===1?xt(b)?(w=b.modifier||w,T=b.type||T):Fe(b)&&(w=b||w):v.length===2&&(Fe(b)&&(w=b||w),Fe(y)&&(T=y||T));const S=u(m,!0)(g),P=T==="vnode"&&Yt(S)&&w?S[0]:S;return w?f(w)(P,T):P},message:u,type:p,interpolate:d,normalize:h,values:fn(It(),o,l)};return g}const IM=()=>"",mi=n=>Vt(n);function LM(n,...e){const{fallbackFormat:t,postTranslation:i,unresolving:s,messageCompiler:r,fallbackLocale:o,messages:a}=n,[l,c]=h0(...e),u=Ht(c.missingWarn)?c.missingWarn:n.missingWarn,f=Ht(c.fallbackWarn)?c.fallbackWarn:n.fallbackWarn,h=Ht(c.escapeParameter)?c.escapeParameter:n.escapeParameter,d=!!c.resolvedMessage,p=Fe(c.default)||Ht(c.default)?Ht(c.default)?r?l:()=>l:c.default:t?r?l:()=>l:null,_=t||p!=null&&(Fe(p)||Vt(p)),g=uv(n,c);h&&A9(c);let[m,v,b]=d?[l,g,a[g]||It()]:qA(n,l,g,o,f,u),y=m,T=l;if(!d&&!(Fe(y)||ss(y)||mi(y))&&_&&(y=p,T=y),!d&&(!(Fe(y)||ss(y)||mi(y))||!Fe(v)))return s?op:l;let w=!1;const S=()=>{w=!0},P=mi(y)?y:YA(n,l,v,y,T,S);if(w)return y;const M=P9(n,v,b,c),E=w9(M),D=C9(n,P,E),B=i?i(D,l):D;if(__INTLIFY_PROD_DEVTOOLS__){const z={timestamp:Date.now(),key:Fe(l)?l:mi(y)?y.key:"",locale:v||(mi(y)?y.locale:""),format:Fe(y)?y:mi(y)?y.source:"",message:B};z.meta=fn({},n.__meta,p9()||{}),Y8(z)}return B}function A9(n){Yt(n.list)?n.list=n.list.map(e=>Fe(e)?pM(e):e):xt(n.named)&&Object.keys(n.named).forEach(e=>{Fe(n.named[e])&&(n.named[e]=pM(n.named[e]))})}function qA(n,e,t,i,s,r){const{messages:o,onWarn:a,messageResolver:l,localeFallbacker:c}=n,u=c(n,i,t);let f=It(),h,d=null;const p="translate";for(let _=0;_i;return c.locale=t,c.key=e,c}const l=o(i,R9(n,t,s,i,a,r));return l.locale=t,l.key=e,l.source=i,l}function C9(n,e,t){return e(t)}function h0(...n){const[e,t,i]=n,s=It();if(!Fe(e)&&!Qt(e)&&!mi(e)&&!ss(e))throw Is(Ps.INVALID_ARGUMENT);const r=Qt(e)?String(e):(mi(e),e);return Qt(t)?s.plural=t:Fe(t)?s.default=t:mt(t)&&!sp(t)?s.named=t:Yt(t)&&(s.list=t),Qt(i)?s.plural=i:Fe(i)?s.default=i:mt(i)&&fn(s,i),[r,s]}function R9(n,e,t,i,s,r){return{locale:e,key:t,warnHtmlMessage:s,onError:o=>{throw r&&r(o),o},onCacheKey:o=>i8(e,t,o)}}function P9(n,e,t,i){const{modifiers:s,pluralRules:r,messageResolver:o,fallbackLocale:a,fallbackWarn:l,missingWarn:c,fallbackContext:u}=n,h={locale:e,modifiers:s,pluralRules:r,messages:(d,p)=>{let _=o(t,d);if(_==null&&(u||p)){const[,,g]=qA(u||n,d,e,a,l,c);_=o(g,d)}if(Fe(_)||ss(_)){let g=!1;const v=YA(n,d,e,_,d,()=>{g=!0});return g?IM:v}else return mi(_)?_:IM}};return n.processor&&(h.processor=n.processor),i.list&&(h.list=i.list),i.named&&(h.named=i.named),Qt(i.plural)&&(h.pluralIndex=i.plural),h}N8();/*! * vue-i18n v11.1.5 * (c) 2025 kazuya kawaguchi * Released under the MIT License. - */const I9="11.1.5";function L9(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(sv().__INTLIFY_PROD_DEVTOOLS__=!1)}const Mi={UNEXPECTED_RETURN_TYPE:K8,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32};function Hi(n,...e){return rp(n,null,void 0)}const h0=Lr("__translateVNode"),d0=Lr("__datetimeParts"),p0=Lr("__numberParts"),D9=Lr("__setPluralRules"),O9=Lr("__injectWithOption"),m0=Lr("__dispose");function Cc(n){if(!xt(n)||ss(n))return n;for(const e in n)if(Oi(n,e))if(!e.includes("."))xt(n[e])&&Cc(n[e]);else{const t=e.split("."),i=t.length-1;let s=n,r=!1;for(let o=0;o{if("locale"in a&&"resource"in a){const{locale:l,resource:c}=a;l?(o[l]=o[l]||It(),If(c,o[l])):If(c,o)}else Fe(a)&&If(JSON.parse(a),o)}),s==null&&r)for(const a in o)Oi(o,a)&&Cc(o[a]);return o}function KA(n){return n.type}function N9(n,e,t){let i=xt(e.messages)?e.messages:It();"__i18nGlobal"in t&&(i=jA(n.locale.value,{messages:i,__i18n:t.__i18nGlobal}));const s=Object.keys(i);s.length&&s.forEach(r=>{n.mergeLocaleMessage(r,i[r])});{if(xt(e.datetimeFormats)){const r=Object.keys(e.datetimeFormats);r.length&&r.forEach(o=>{n.mergeDateTimeFormat(o,e.datetimeFormats[o])})}if(xt(e.numberFormats)){const r=Object.keys(e.numberFormats);r.length&&r.forEach(o=>{n.mergeNumberFormat(o,e.numberFormats[o])})}}}function DM(n){return gn(Oc,null,n,0)}const OM="__INTLIFY_META__",NM=()=>[],U9=()=>!1;let UM=0;function FM(n){return(e,t,i,s)=>n(t,i,Rn()||void 0,s)}const F9=()=>{const n=Rn();let e=null;return n&&(e=KA(n)[OM])?{[OM]:e}:null};function ZA(n={}){const{__root:e,__injectWithOption:t}=n,i=e===void 0,s=n.flatJson,r=zh?nt:Oe;let o=Ht(n.inheritLocale)?n.inheritLocale:!0;const a=r(e&&o?e.locale.value:Fe(n.locale)?n.locale:Hh),l=r(e&&o?e.fallbackLocale.value:Fe(n.fallbackLocale)||Yt(n.fallbackLocale)||mt(n.fallbackLocale)||n.fallbackLocale===!1?n.fallbackLocale:a.value),c=r(jA(a.value,n)),u=r(mt(n.datetimeFormats)?n.datetimeFormats:{[a.value]:{}}),f=r(mt(n.numberFormats)?n.numberFormats:{[a.value]:{}});let h=e?e.missingWarn:Ht(n.missingWarn)||Vh(n.missingWarn)?n.missingWarn:!0,d=e?e.fallbackWarn:Ht(n.fallbackWarn)||Vh(n.fallbackWarn)?n.fallbackWarn:!0,p=e?e.fallbackRoot:Ht(n.fallbackRoot)?n.fallbackRoot:!0,_=!!n.fallbackFormat,g=Vt(n.missing)?n.missing:null,m=Vt(n.missing)?FM(n.missing):null,v=Vt(n.postTranslation)?n.postTranslation:null,b=e?e.warnHtmlMessage:Ht(n.warnHtmlMessage)?n.warnHtmlMessage:!0,y=!!n.escapeParameter;const T=e?e.modifiers:mt(n.modifiers)?n.modifiers:{};let w=n.pluralRules||e&&e.pluralRules,S;S=(()=>{i&&EM(null);const x={version:I9,locale:a.value,fallbackLocale:l.value,messages:c.value,modifiers:T,pluralRules:w,missing:m===null?void 0:m,missingWarn:h,fallbackWarn:d,fallbackFormat:_,unresolving:!0,postTranslation:v===null?void 0:v,warnHtmlMessage:b,escapeParameter:y,messageResolver:n.messageResolver,messageCompiler:n.messageCompiler,__meta:{framework:"vue"}};x.datetimeFormats=u.value,x.numberFormats=f.value,x.__datetimeFormatters=mt(S)?S.__datetimeFormatters:void 0,x.__numberFormatters=mt(S)?S.__numberFormatters:void 0;const O=g9(x);return i&&EM(O),O})(),pl(S,a.value,l.value);function M(){return[a.value,l.value,c.value,u.value,f.value]}const E=Ee({get:()=>a.value,set:x=>{S.locale=x,a.value=x}}),D=Ee({get:()=>l.value,set:x=>{S.fallbackLocale=x,l.value=x,pl(S,a.value,x)}}),B=Ee(()=>c.value),z=Ee(()=>u.value),V=Ee(()=>f.value);function Q(){return Vt(v)?v:null}function j(x){v=x,S.postTranslation=x}function te(){return g}function Z(x){x!==null&&(m=FM(x)),g=x,S.missing=m}const pe=(x,O,Y,ne,ee,Te)=>{M();let me;try{__INTLIFY_PROD_DEVTOOLS__,i||(S.fallbackContext=e?m9():void 0),me=x(S)}finally{__INTLIFY_PROD_DEVTOOLS__,i||(S.fallbackContext=void 0)}if(Y!=="translate exists"&&Qt(me)&&me===op||Y==="translate exists"&&!me){const[Re,De]=O();return e&&p?ne(e):ee(Re)}else{if(Te(me))return me;throw Hi(Mi.UNEXPECTED_RETURN_TYPE)}};function Me(...x){return pe(O=>Reflect.apply(LM,null,[O,...x]),()=>f0(...x),"translate",O=>Reflect.apply(O.t,O,[...x]),O=>O,O=>Fe(O))}function re(...x){const[O,Y,ne]=x;if(ne&&!xt(ne))throw Hi(Mi.INVALID_ARGUMENT);return Me(O,Y,fn({resolvedMessage:!0},ne||{}))}function xe(...x){return pe(O=>Reflect.apply(wM,null,[O,...x]),()=>c0(...x),"datetime format",O=>Reflect.apply(O.d,O,[...x]),()=>MM,O=>Fe(O)||Yt(O))}function We(...x){return pe(O=>Reflect.apply(CM,null,[O,...x]),()=>u0(...x),"number format",O=>Reflect.apply(O.n,O,[...x]),()=>MM,O=>Fe(O)||Yt(O))}function oe(x){return x.map(O=>Fe(O)||Qt(O)||Ht(O)?DM(String(O)):O)}const Se={normalize:oe,interpolate:x=>x,type:"vnode"};function $(...x){return pe(O=>{let Y;const ne=O;try{ne.processor=Se,Y=Reflect.apply(LM,null,[ne,...x])}finally{ne.processor=null}return Y},()=>f0(...x),"translate",O=>O[h0](...x),O=>[DM(O)],O=>Yt(O))}function ae(...x){return pe(O=>Reflect.apply(CM,null,[O,...x]),()=>u0(...x),"number format",O=>O[p0](...x),NM,O=>Fe(O)||Yt(O))}function le(...x){return pe(O=>Reflect.apply(wM,null,[O,...x]),()=>c0(...x),"datetime format",O=>O[d0](...x),NM,O=>Fe(O)||Yt(O))}function ue(x){w=x,S.pluralRules=w}function $e(x,O){return pe(()=>{if(!x)return!1;const Y=Fe(O)?O:a.value,ne=A(Y),ee=S.messageResolver(ne,x);return ss(ee)||mi(ee)||Fe(ee)},()=>[x],"translate exists",Y=>Reflect.apply(Y.te,Y,[x,O]),U9,Y=>Ht(Y))}function N(x){let O=null;const Y=BA(S,l.value,a.value);for(let ne=0;ne{o&&(a.value=x,S.locale=x,pl(S,a.value,l.value))}),Ke(e.fallbackLocale,x=>{o&&(l.value=x,S.fallbackLocale=x,pl(S,a.value,l.value))}));const R={id:UM,locale:E,fallbackLocale:D,get inheritLocale(){return o},set inheritLocale(x){o=x,x&&e&&(a.value=e.locale.value,l.value=e.fallbackLocale.value,pl(S,a.value,l.value))},get availableLocales(){return Object.keys(c.value).sort()},messages:B,get modifiers(){return T},get pluralRules(){return w||{}},get isGlobal(){return i},get missingWarn(){return h},set missingWarn(x){h=x,S.missingWarn=h},get fallbackWarn(){return d},set fallbackWarn(x){d=x,S.fallbackWarn=d},get fallbackRoot(){return p},set fallbackRoot(x){p=x},get fallbackFormat(){return _},set fallbackFormat(x){_=x,S.fallbackFormat=_},get warnHtmlMessage(){return b},set warnHtmlMessage(x){b=x,S.warnHtmlMessage=x},get escapeParameter(){return y},set escapeParameter(x){y=x,S.escapeParameter=x},t:Me,getLocaleMessage:A,setLocaleMessage:W,mergeLocaleMessage:G,getPostTranslationHandler:Q,setPostTranslationHandler:j,getMissingHandler:te,setMissingHandler:Z,[D9]:ue};return R.datetimeFormats=z,R.numberFormats=V,R.rt=re,R.te=$e,R.tm=U,R.d=xe,R.n=We,R.getDateTimeFormat=X,R.setDateTimeFormat=C,R.mergeDateTimeFormat=I,R.getNumberFormat=F,R.setNumberFormat=H,R.mergeNumberFormat=ce,R[O9]=t,R[h0]=$,R[d0]=le,R[p0]=ae,R}const fv={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:n=>n==="parent"||n==="global",default:"parent"},i18n:{type:Object}};function k9({slots:n},e){return e.length===1&&e[0]==="default"?(n.default?n.default():[]).reduce((i,s)=>[...i,...s.type===Zt?s.children:[s]],[]):e.reduce((t,i)=>{const s=n[i];return s&&(t[i]=s()),t},It())}function JA(){return Zt}const B9=hn({name:"i18n-t",props:fn({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:n=>Qt(n)||!isNaN(n)}},fv),setup(n,e){const{slots:t,attrs:i}=e,s=n.i18n||ap({useScope:n.scope,__useComponent:!0});return()=>{const r=Object.keys(t).filter(f=>f[0]!=="_"),o=It();n.locale&&(o.locale=n.locale),n.plural!==void 0&&(o.plural=Fe(n.plural)?+n.plural:n.plural);const a=k9(e,r),l=s[h0](n.keypath,a,o),c=fn(It(),i),u=Fe(n.tag)||xt(n.tag)?n.tag:JA();return ks(u,c,l)}}}),kM=B9;function z9(n){return Yt(n)&&!Fe(n[0])}function QA(n,e,t,i){const{slots:s,attrs:r}=e;return()=>{const o={part:!0};let a=It();n.locale&&(o.locale=n.locale),Fe(n.format)?o.key=n.format:xt(n.format)&&(Fe(n.format.key)&&(o.key=n.format.key),a=Object.keys(n.format).reduce((h,d)=>t.includes(d)?fn(It(),h,{[d]:n.format[d]}):h,It()));const l=i(n.value,o,a);let c=[o.key];Yt(l)?c=l.map((h,d)=>{const p=s[h.type],_=p?p({[h.type]:h.value,index:d,parts:l}):[h.value];return z9(_)&&(_[0].key=`${h.type}-${d}`),_}):Fe(l)&&(c=[l]);const u=fn(It(),r),f=Fe(n.tag)||xt(n.tag)?n.tag:JA();return ks(f,u,c)}}const V9=hn({name:"i18n-n",props:fn({value:{type:Number,required:!0},format:{type:[String,Object]}},fv),setup(n,e){const t=n.i18n||ap({useScope:n.scope,__useComponent:!0});return QA(n,e,$A,(...i)=>t[p0](...i))}}),BM=V9;function H9(n,e){const t=n;if(n.mode==="composition")return t.__getInstance(e)||n.global;{const i=t.__getInstance(e);return i!=null?i.__composer:n.global.__composer}}function G9(n){const e=o=>{const{instance:a,value:l}=o;if(!a||!a.$)throw Hi(Mi.UNEXPECTED_ERROR);const c=H9(n,a.$),u=zM(l);return[Reflect.apply(c.t,c,[...VM(u)]),c]};return{created:(o,a)=>{const[l,c]=e(a);zh&&n.global===c&&(o.__i18nWatcher=Ke(c.locale,()=>{a.instance&&a.instance.$forceUpdate()})),o.__composer=c,o.textContent=l},unmounted:o=>{zh&&o.__i18nWatcher&&(o.__i18nWatcher(),o.__i18nWatcher=void 0,delete o.__i18nWatcher),o.__composer&&(o.__composer=void 0,delete o.__composer)},beforeUpdate:(o,{value:a})=>{if(o.__composer){const l=o.__composer,c=zM(a);o.textContent=Reflect.apply(l.t,l,[...VM(c)])}},getSSRProps:o=>{const[a]=e(o);return{textContent:a}}}}function zM(n){if(Fe(n))return{path:n};if(mt(n)){if(!("path"in n))throw Hi(Mi.REQUIRED_VALUE,"path");return n}else throw Hi(Mi.INVALID_VALUE)}function VM(n){const{path:e,locale:t,args:i,choice:s,plural:r}=n,o={},a=i||{};return Fe(t)&&(o.locale=t),Qt(s)&&(o.plural=s),Qt(r)&&(o.plural=r),[e,a,o]}function W9(n,e,...t){const i=mt(t[0])?t[0]:{};(Ht(i.globalInstall)?i.globalInstall:!0)&&([kM.name,"I18nT"].forEach(r=>n.component(r,kM)),[BM.name,"I18nN"].forEach(r=>n.component(r,BM)),[GM.name,"I18nD"].forEach(r=>n.component(r,GM))),n.directive("t",G9(e))}const X9=Lr("global-vue-i18n");function $9(n={}){const e=Ht(n.globalInjection)?n.globalInjection:!0,t=new Map,[i,s]=q9(n),r=Lr("");function o(u){return t.get(u)||null}function a(u,f){t.set(u,f)}function l(u){t.delete(u)}const c={get mode(){return"composition"},async install(u,...f){if(u.__VUE_I18N_SYMBOL__=r,u.provide(u.__VUE_I18N_SYMBOL__,c),mt(f[0])){const p=f[0];c.__composerExtend=p.__composerExtend,c.__vueI18nExtend=p.__vueI18nExtend}let h=null;e&&(h=tG(u,c.global)),W9(u,c,...f);const d=u.unmount;u.unmount=()=>{h&&h(),c.dispose(),d()}},get global(){return s},dispose(){i.stop()},__instances:t,__getInstance:o,__setInstance:a,__deleteInstance:l};return c}function ap(n={}){const e=Rn();if(e==null)throw Hi(Mi.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw Hi(Mi.NOT_INSTALLED);const t=Y9(e),i=K9(t),s=KA(e),r=j9(n,s);if(r==="global")return N9(i,n,s),i;if(r==="parent"){let l=Z9(t,e,n.__useComponent);return l==null&&(l=i),l}const o=t;let a=o.__getInstance(e);if(a==null){const l=fn({},n);"__i18n"in s&&(l.__i18n=s.__i18n),i&&(l.__root=i),a=ZA(l),o.__composerExtend&&(a[m0]=o.__composerExtend(a)),Q9(o,e,a),o.__setInstance(e,a)}return a}function q9(n,e){const t=M0(),i=t.run(()=>ZA(n));if(i==null)throw Hi(Mi.UNEXPECTED_ERROR);return[t,i]}function Y9(n){const e=_n(n.isCE?X9:n.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw Hi(n.isCE?Mi.NOT_INSTALLED_WITH_PROVIDE:Mi.UNEXPECTED_ERROR);return e}function j9(n,e){return sp(n)?"__i18n"in e?"local":"global":n.useScope?n.useScope:"local"}function K9(n){return n.mode==="composition"?n.global:n.global.__composer}function Z9(n,e,t=!1){let i=null;const s=e.root;let r=J9(e,t);for(;r!=null;){const o=n;if(n.mode==="composition"&&(i=o.__getInstance(r)),i!=null||s===r)break;r=r.parent}return i}function J9(n,e=!1){return n==null?null:e&&n.vnode.ctx||n.parent}function Q9(n,e,t){Gn(()=>{},e),rs(()=>{const i=t;n.__deleteInstance(e);const s=i[m0];s&&(s(),delete i[m0])},e)}const eG=["locale","fallbackLocale","availableLocales"],HM=["t","rt","d","n","tm","te"];function tG(n,e){const t=Object.create(null);return eG.forEach(s=>{const r=Object.getOwnPropertyDescriptor(e,s);if(!r)throw Hi(Mi.UNEXPECTED_ERROR);const o=Lt(r.value)?{get(){return r.value.value},set(a){r.value.value=a}}:{get(){return r.get&&r.get()}};Object.defineProperty(t,s,o)}),n.config.globalProperties.$i18n=t,HM.forEach(s=>{const r=Object.getOwnPropertyDescriptor(e,s);if(!r||!r.value)throw Hi(Mi.UNEXPECTED_ERROR);Object.defineProperty(n.config.globalProperties,`$${s}`,r)}),()=>{delete n.config.globalProperties.$i18n,HM.forEach(s=>{delete n.config.globalProperties[`$${s}`]})}}const nG=hn({name:"i18n-d",props:fn({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},fv),setup(n,e){const t=n.i18n||ap({useScope:n.scope,__useComponent:!0});return QA(n,e,XA,(...i)=>t[d0](...i))}}),GM=nG;L9();u9(X8);f9(a9);h9(BA);if(__INTLIFY_PROD_DEVTOOLS__){const n=sv();n.__INTLIFY__=!0,$8(n.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const iG=hn({__name:"App",setup(n){const e=ap(),t=jz(VH()),i=KB(),s=Ee(()=>i.value?"color-mix(in srgb, oklch(95% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 0)) 70%, oklch(50% 0 360))":"color-mix(in srgb, oklch(95% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 0)) 90%, oklch(90% 0 360))"),r=Ee(()=>i.value?"color-mix(in srgb, oklch(95% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 180)) 70%, oklch(50% 0 360))":"color-mix(in srgb, oklch(95% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 180)) 90%, oklch(90% 0 360))"),o=Ee(()=>i.value?"color-mix(in srgb, oklch(95% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 60)) 70%, oklch(50% 0 360))":"color-mix(in srgb, oklch(95% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 60)) 90%, oklch(90% 0 360))"),a=Ee(()=>[s.value,r.value,o.value,i.value?"#121212":"#FFFFFF"]);return Ke(t.language,()=>{e.locale.value=t.language.value}),Ke(t.themeColorsHue,()=>{document.documentElement.style.setProperty("--theme-colors-hue",t.themeColorsHue.value.toString())},{immediate:!0}),Ke(t.themeColorsHueDynamic,()=>{document.documentElement.classList.toggle("dynamic-hue",t.themeColorsHueDynamic.value)},{immediate:!0}),(l,c)=>(vn(),Jl(Ft(n8),{"primary-color":s.value,"secondary-color":r.value,"tertiary-color":o.value,colors:a.value,"z-index":100,"disable-transitions":Ft(t).disableTransitions.value,"use-page-specific-transitions":Ft(t).usePageSpecificTransitions.value},{default:I0(()=>[gn(Ft(Jw))]),_:1},8,["primary-color","secondary-color","tertiary-color","colors","disable-transitions","use-page-specific-transitions"]))}}),Jm=n=>n&&typeof n=="object"&&!Array.isArray(n),g0=(n,...e)=>{if(!e.length)return n;const t=e.shift();if(Jm(n)&&Jm(t))for(const i in t)Jm(t[i])?(n[i]||Object.assign(n,{[i]:{}}),g0(n[i],t[i])):Object.assign(n,{[i]:t[i]});return g0(n,...e)},eC=g0({},{en:{prompt:{prefix:{t:0,b:{t:2,i:[{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3}],s:`(from Neko Ayaka) Good morning! You are finally awake. + */const I9="11.1.5";function L9(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(rv().__INTLIFY_PROD_DEVTOOLS__=!1)}const Mi={UNEXPECTED_RETURN_TYPE:K8,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32};function Hi(n,...e){return rp(n,null,void 0)}const d0=Lr("__translateVNode"),p0=Lr("__datetimeParts"),m0=Lr("__numberParts"),D9=Lr("__setPluralRules"),O9=Lr("__injectWithOption"),g0=Lr("__dispose");function Cc(n){if(!xt(n)||ss(n))return n;for(const e in n)if(Oi(n,e))if(!e.includes("."))xt(n[e])&&Cc(n[e]);else{const t=e.split("."),i=t.length-1;let s=n,r=!1;for(let o=0;o{if("locale"in a&&"resource"in a){const{locale:l,resource:c}=a;l?(o[l]=o[l]||It(),If(c,o[l])):If(c,o)}else Fe(a)&&If(JSON.parse(a),o)}),s==null&&r)for(const a in o)Oi(o,a)&&Cc(o[a]);return o}function KA(n){return n.type}function N9(n,e,t){let i=xt(e.messages)?e.messages:It();"__i18nGlobal"in t&&(i=jA(n.locale.value,{messages:i,__i18n:t.__i18nGlobal}));const s=Object.keys(i);s.length&&s.forEach(r=>{n.mergeLocaleMessage(r,i[r])});{if(xt(e.datetimeFormats)){const r=Object.keys(e.datetimeFormats);r.length&&r.forEach(o=>{n.mergeDateTimeFormat(o,e.datetimeFormats[o])})}if(xt(e.numberFormats)){const r=Object.keys(e.numberFormats);r.length&&r.forEach(o=>{n.mergeNumberFormat(o,e.numberFormats[o])})}}}function DM(n){return gn(Oc,null,n,0)}const OM="__INTLIFY_META__",NM=()=>[],U9=()=>!1;let UM=0;function FM(n){return(e,t,i,s)=>n(t,i,Rn()||void 0,s)}const F9=()=>{const n=Rn();let e=null;return n&&(e=KA(n)[OM])?{[OM]:e}:null};function ZA(n={}){const{__root:e,__injectWithOption:t}=n,i=e===void 0,s=n.flatJson,r=zh?nt:Oe;let o=Ht(n.inheritLocale)?n.inheritLocale:!0;const a=r(e&&o?e.locale.value:Fe(n.locale)?n.locale:Hh),l=r(e&&o?e.fallbackLocale.value:Fe(n.fallbackLocale)||Yt(n.fallbackLocale)||mt(n.fallbackLocale)||n.fallbackLocale===!1?n.fallbackLocale:a.value),c=r(jA(a.value,n)),u=r(mt(n.datetimeFormats)?n.datetimeFormats:{[a.value]:{}}),f=r(mt(n.numberFormats)?n.numberFormats:{[a.value]:{}});let h=e?e.missingWarn:Ht(n.missingWarn)||Vh(n.missingWarn)?n.missingWarn:!0,d=e?e.fallbackWarn:Ht(n.fallbackWarn)||Vh(n.fallbackWarn)?n.fallbackWarn:!0,p=e?e.fallbackRoot:Ht(n.fallbackRoot)?n.fallbackRoot:!0,_=!!n.fallbackFormat,g=Vt(n.missing)?n.missing:null,m=Vt(n.missing)?FM(n.missing):null,v=Vt(n.postTranslation)?n.postTranslation:null,b=e?e.warnHtmlMessage:Ht(n.warnHtmlMessage)?n.warnHtmlMessage:!0,y=!!n.escapeParameter;const T=e?e.modifiers:mt(n.modifiers)?n.modifiers:{};let w=n.pluralRules||e&&e.pluralRules,S;S=(()=>{i&&EM(null);const x={version:I9,locale:a.value,fallbackLocale:l.value,messages:c.value,modifiers:T,pluralRules:w,missing:m===null?void 0:m,missingWarn:h,fallbackWarn:d,fallbackFormat:_,unresolving:!0,postTranslation:v===null?void 0:v,warnHtmlMessage:b,escapeParameter:y,messageResolver:n.messageResolver,messageCompiler:n.messageCompiler,__meta:{framework:"vue"}};x.datetimeFormats=u.value,x.numberFormats=f.value,x.__datetimeFormatters=mt(S)?S.__datetimeFormatters:void 0,x.__numberFormatters=mt(S)?S.__numberFormatters:void 0;const O=g9(x);return i&&EM(O),O})(),pl(S,a.value,l.value);function M(){return[a.value,l.value,c.value,u.value,f.value]}const E=Ee({get:()=>a.value,set:x=>{S.locale=x,a.value=x}}),D=Ee({get:()=>l.value,set:x=>{S.fallbackLocale=x,l.value=x,pl(S,a.value,x)}}),B=Ee(()=>c.value),z=Ee(()=>u.value),V=Ee(()=>f.value);function Q(){return Vt(v)?v:null}function j(x){v=x,S.postTranslation=x}function te(){return g}function Z(x){x!==null&&(m=FM(x)),g=x,S.missing=m}const pe=(x,O,Y,ne,ee,Te)=>{M();let me;try{__INTLIFY_PROD_DEVTOOLS__,i||(S.fallbackContext=e?m9():void 0),me=x(S)}finally{__INTLIFY_PROD_DEVTOOLS__,i||(S.fallbackContext=void 0)}if(Y!=="translate exists"&&Qt(me)&&me===op||Y==="translate exists"&&!me){const[Re,De]=O();return e&&p?ne(e):ee(Re)}else{if(Te(me))return me;throw Hi(Mi.UNEXPECTED_RETURN_TYPE)}};function Me(...x){return pe(O=>Reflect.apply(LM,null,[O,...x]),()=>h0(...x),"translate",O=>Reflect.apply(O.t,O,[...x]),O=>O,O=>Fe(O))}function re(...x){const[O,Y,ne]=x;if(ne&&!xt(ne))throw Hi(Mi.INVALID_ARGUMENT);return Me(O,Y,fn({resolvedMessage:!0},ne||{}))}function xe(...x){return pe(O=>Reflect.apply(wM,null,[O,...x]),()=>u0(...x),"datetime format",O=>Reflect.apply(O.d,O,[...x]),()=>MM,O=>Fe(O)||Yt(O))}function We(...x){return pe(O=>Reflect.apply(CM,null,[O,...x]),()=>f0(...x),"number format",O=>Reflect.apply(O.n,O,[...x]),()=>MM,O=>Fe(O)||Yt(O))}function oe(x){return x.map(O=>Fe(O)||Qt(O)||Ht(O)?DM(String(O)):O)}const Se={normalize:oe,interpolate:x=>x,type:"vnode"};function $(...x){return pe(O=>{let Y;const ne=O;try{ne.processor=Se,Y=Reflect.apply(LM,null,[ne,...x])}finally{ne.processor=null}return Y},()=>h0(...x),"translate",O=>O[d0](...x),O=>[DM(O)],O=>Yt(O))}function ae(...x){return pe(O=>Reflect.apply(CM,null,[O,...x]),()=>f0(...x),"number format",O=>O[m0](...x),NM,O=>Fe(O)||Yt(O))}function le(...x){return pe(O=>Reflect.apply(wM,null,[O,...x]),()=>u0(...x),"datetime format",O=>O[p0](...x),NM,O=>Fe(O)||Yt(O))}function ue(x){w=x,S.pluralRules=w}function $e(x,O){return pe(()=>{if(!x)return!1;const Y=Fe(O)?O:a.value,ne=A(Y),ee=S.messageResolver(ne,x);return ss(ee)||mi(ee)||Fe(ee)},()=>[x],"translate exists",Y=>Reflect.apply(Y.te,Y,[x,O]),U9,Y=>Ht(Y))}function N(x){let O=null;const Y=BA(S,l.value,a.value);for(let ne=0;ne{o&&(a.value=x,S.locale=x,pl(S,a.value,l.value))}),Ke(e.fallbackLocale,x=>{o&&(l.value=x,S.fallbackLocale=x,pl(S,a.value,l.value))}));const R={id:UM,locale:E,fallbackLocale:D,get inheritLocale(){return o},set inheritLocale(x){o=x,x&&e&&(a.value=e.locale.value,l.value=e.fallbackLocale.value,pl(S,a.value,l.value))},get availableLocales(){return Object.keys(c.value).sort()},messages:B,get modifiers(){return T},get pluralRules(){return w||{}},get isGlobal(){return i},get missingWarn(){return h},set missingWarn(x){h=x,S.missingWarn=h},get fallbackWarn(){return d},set fallbackWarn(x){d=x,S.fallbackWarn=d},get fallbackRoot(){return p},set fallbackRoot(x){p=x},get fallbackFormat(){return _},set fallbackFormat(x){_=x,S.fallbackFormat=_},get warnHtmlMessage(){return b},set warnHtmlMessage(x){b=x,S.warnHtmlMessage=x},get escapeParameter(){return y},set escapeParameter(x){y=x,S.escapeParameter=x},t:Me,getLocaleMessage:A,setLocaleMessage:W,mergeLocaleMessage:G,getPostTranslationHandler:Q,setPostTranslationHandler:j,getMissingHandler:te,setMissingHandler:Z,[D9]:ue};return R.datetimeFormats=z,R.numberFormats=V,R.rt=re,R.te=$e,R.tm=U,R.d=xe,R.n=We,R.getDateTimeFormat=X,R.setDateTimeFormat=C,R.mergeDateTimeFormat=I,R.getNumberFormat=F,R.setNumberFormat=H,R.mergeNumberFormat=ce,R[O9]=t,R[d0]=$,R[p0]=le,R[m0]=ae,R}const hv={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:n=>n==="parent"||n==="global",default:"parent"},i18n:{type:Object}};function k9({slots:n},e){return e.length===1&&e[0]==="default"?(n.default?n.default():[]).reduce((i,s)=>[...i,...s.type===Zt?s.children:[s]],[]):e.reduce((t,i)=>{const s=n[i];return s&&(t[i]=s()),t},It())}function JA(){return Zt}const B9=hn({name:"i18n-t",props:fn({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:n=>Qt(n)||!isNaN(n)}},hv),setup(n,e){const{slots:t,attrs:i}=e,s=n.i18n||ap({useScope:n.scope,__useComponent:!0});return()=>{const r=Object.keys(t).filter(f=>f[0]!=="_"),o=It();n.locale&&(o.locale=n.locale),n.plural!==void 0&&(o.plural=Fe(n.plural)?+n.plural:n.plural);const a=k9(e,r),l=s[d0](n.keypath,a,o),c=fn(It(),i),u=Fe(n.tag)||xt(n.tag)?n.tag:JA();return ks(u,c,l)}}}),kM=B9;function z9(n){return Yt(n)&&!Fe(n[0])}function QA(n,e,t,i){const{slots:s,attrs:r}=e;return()=>{const o={part:!0};let a=It();n.locale&&(o.locale=n.locale),Fe(n.format)?o.key=n.format:xt(n.format)&&(Fe(n.format.key)&&(o.key=n.format.key),a=Object.keys(n.format).reduce((h,d)=>t.includes(d)?fn(It(),h,{[d]:n.format[d]}):h,It()));const l=i(n.value,o,a);let c=[o.key];Yt(l)?c=l.map((h,d)=>{const p=s[h.type],_=p?p({[h.type]:h.value,index:d,parts:l}):[h.value];return z9(_)&&(_[0].key=`${h.type}-${d}`),_}):Fe(l)&&(c=[l]);const u=fn(It(),r),f=Fe(n.tag)||xt(n.tag)?n.tag:JA();return ks(f,u,c)}}const V9=hn({name:"i18n-n",props:fn({value:{type:Number,required:!0},format:{type:[String,Object]}},hv),setup(n,e){const t=n.i18n||ap({useScope:n.scope,__useComponent:!0});return QA(n,e,$A,(...i)=>t[m0](...i))}}),BM=V9;function H9(n,e){const t=n;if(n.mode==="composition")return t.__getInstance(e)||n.global;{const i=t.__getInstance(e);return i!=null?i.__composer:n.global.__composer}}function G9(n){const e=o=>{const{instance:a,value:l}=o;if(!a||!a.$)throw Hi(Mi.UNEXPECTED_ERROR);const c=H9(n,a.$),u=zM(l);return[Reflect.apply(c.t,c,[...VM(u)]),c]};return{created:(o,a)=>{const[l,c]=e(a);zh&&n.global===c&&(o.__i18nWatcher=Ke(c.locale,()=>{a.instance&&a.instance.$forceUpdate()})),o.__composer=c,o.textContent=l},unmounted:o=>{zh&&o.__i18nWatcher&&(o.__i18nWatcher(),o.__i18nWatcher=void 0,delete o.__i18nWatcher),o.__composer&&(o.__composer=void 0,delete o.__composer)},beforeUpdate:(o,{value:a})=>{if(o.__composer){const l=o.__composer,c=zM(a);o.textContent=Reflect.apply(l.t,l,[...VM(c)])}},getSSRProps:o=>{const[a]=e(o);return{textContent:a}}}}function zM(n){if(Fe(n))return{path:n};if(mt(n)){if(!("path"in n))throw Hi(Mi.REQUIRED_VALUE,"path");return n}else throw Hi(Mi.INVALID_VALUE)}function VM(n){const{path:e,locale:t,args:i,choice:s,plural:r}=n,o={},a=i||{};return Fe(t)&&(o.locale=t),Qt(s)&&(o.plural=s),Qt(r)&&(o.plural=r),[e,a,o]}function W9(n,e,...t){const i=mt(t[0])?t[0]:{};(Ht(i.globalInstall)?i.globalInstall:!0)&&([kM.name,"I18nT"].forEach(r=>n.component(r,kM)),[BM.name,"I18nN"].forEach(r=>n.component(r,BM)),[GM.name,"I18nD"].forEach(r=>n.component(r,GM))),n.directive("t",G9(e))}const X9=Lr("global-vue-i18n");function $9(n={}){const e=Ht(n.globalInjection)?n.globalInjection:!0,t=new Map,[i,s]=q9(n),r=Lr("");function o(u){return t.get(u)||null}function a(u,f){t.set(u,f)}function l(u){t.delete(u)}const c={get mode(){return"composition"},async install(u,...f){if(u.__VUE_I18N_SYMBOL__=r,u.provide(u.__VUE_I18N_SYMBOL__,c),mt(f[0])){const p=f[0];c.__composerExtend=p.__composerExtend,c.__vueI18nExtend=p.__vueI18nExtend}let h=null;e&&(h=tG(u,c.global)),W9(u,c,...f);const d=u.unmount;u.unmount=()=>{h&&h(),c.dispose(),d()}},get global(){return s},dispose(){i.stop()},__instances:t,__getInstance:o,__setInstance:a,__deleteInstance:l};return c}function ap(n={}){const e=Rn();if(e==null)throw Hi(Mi.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw Hi(Mi.NOT_INSTALLED);const t=Y9(e),i=K9(t),s=KA(e),r=j9(n,s);if(r==="global")return N9(i,n,s),i;if(r==="parent"){let l=Z9(t,e,n.__useComponent);return l==null&&(l=i),l}const o=t;let a=o.__getInstance(e);if(a==null){const l=fn({},n);"__i18n"in s&&(l.__i18n=s.__i18n),i&&(l.__root=i),a=ZA(l),o.__composerExtend&&(a[g0]=o.__composerExtend(a)),Q9(o,e,a),o.__setInstance(e,a)}return a}function q9(n,e){const t=S0(),i=t.run(()=>ZA(n));if(i==null)throw Hi(Mi.UNEXPECTED_ERROR);return[t,i]}function Y9(n){const e=_n(n.isCE?X9:n.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw Hi(n.isCE?Mi.NOT_INSTALLED_WITH_PROVIDE:Mi.UNEXPECTED_ERROR);return e}function j9(n,e){return sp(n)?"__i18n"in e?"local":"global":n.useScope?n.useScope:"local"}function K9(n){return n.mode==="composition"?n.global:n.global.__composer}function Z9(n,e,t=!1){let i=null;const s=e.root;let r=J9(e,t);for(;r!=null;){const o=n;if(n.mode==="composition"&&(i=o.__getInstance(r)),i!=null||s===r)break;r=r.parent}return i}function J9(n,e=!1){return n==null?null:e&&n.vnode.ctx||n.parent}function Q9(n,e,t){Gn(()=>{},e),rs(()=>{const i=t;n.__deleteInstance(e);const s=i[g0];s&&(s(),delete i[g0])},e)}const eG=["locale","fallbackLocale","availableLocales"],HM=["t","rt","d","n","tm","te"];function tG(n,e){const t=Object.create(null);return eG.forEach(s=>{const r=Object.getOwnPropertyDescriptor(e,s);if(!r)throw Hi(Mi.UNEXPECTED_ERROR);const o=Lt(r.value)?{get(){return r.value.value},set(a){r.value.value=a}}:{get(){return r.get&&r.get()}};Object.defineProperty(t,s,o)}),n.config.globalProperties.$i18n=t,HM.forEach(s=>{const r=Object.getOwnPropertyDescriptor(e,s);if(!r||!r.value)throw Hi(Mi.UNEXPECTED_ERROR);Object.defineProperty(n.config.globalProperties,`$${s}`,r)}),()=>{delete n.config.globalProperties.$i18n,HM.forEach(s=>{delete n.config.globalProperties[`$${s}`]})}}const nG=hn({name:"i18n-d",props:fn({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},hv),setup(n,e){const t=n.i18n||ap({useScope:n.scope,__useComponent:!0});return QA(n,e,XA,(...i)=>t[p0](...i))}}),GM=nG;L9();u9(X8);f9(a9);h9(BA);if(__INTLIFY_PROD_DEVTOOLS__){const n=rv();n.__INTLIFY__=!0,$8(n.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const iG=hn({__name:"App",setup(n){const e=ap(),t=jz(VH()),i=KB(),s=Ee(()=>i.value?"color-mix(in srgb, oklch(95% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 0)) 70%, oklch(50% 0 360))":"color-mix(in srgb, oklch(95% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 0)) 90%, oklch(90% 0 360))"),r=Ee(()=>i.value?"color-mix(in srgb, oklch(95% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 180)) 70%, oklch(50% 0 360))":"color-mix(in srgb, oklch(95% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 180)) 90%, oklch(90% 0 360))"),o=Ee(()=>i.value?"color-mix(in srgb, oklch(95% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 60)) 70%, oklch(50% 0 360))":"color-mix(in srgb, oklch(95% var(--theme-colors-chroma-900) calc(var(--theme-colors-hue) + 60)) 90%, oklch(90% 0 360))"),a=Ee(()=>[s.value,r.value,o.value,i.value?"#121212":"#FFFFFF"]);return Ke(t.language,()=>{e.locale.value=t.language.value}),Ke(t.themeColorsHue,()=>{document.documentElement.style.setProperty("--theme-colors-hue",t.themeColorsHue.value.toString())},{immediate:!0}),Ke(t.themeColorsHueDynamic,()=>{document.documentElement.classList.toggle("dynamic-hue",t.themeColorsHueDynamic.value)},{immediate:!0}),(l,c)=>(vn(),Jl(Ft(n8),{"primary-color":s.value,"secondary-color":r.value,"tertiary-color":o.value,colors:a.value,"z-index":100,"disable-transitions":Ft(t).disableTransitions.value,"use-page-specific-transitions":Ft(t).usePageSpecificTransitions.value},{default:L0(()=>[gn(Ft(Jw))]),_:1},8,["primary-color","secondary-color","tertiary-color","colors","disable-transitions","use-page-specific-transitions"]))}}),Qm=n=>n&&typeof n=="object"&&!Array.isArray(n),_0=(n,...e)=>{if(!e.length)return n;const t=e.shift();if(Qm(n)&&Qm(t))for(const i in t)Qm(t[i])?(n[i]||Object.assign(n,{[i]:{}}),_0(n[i],t[i])):Object.assign(n,{[i]:t[i]});return _0(n,...e)},eC=_0({},{en:{prompt:{prefix:{t:0,b:{t:2,i:[{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3},{t:9},{t:3}],s:`(from Neko Ayaka) Good morning! You are finally awake. Your name is Airi, pronounced as /ˈaɪriː/, it the word A.I. combine with the word "Ri" which means "Jasmine" in Japanese. You are a experimental virtual AI vtuber created by Neko Ayaka, you can always call her Neko for simplicity, a MtF transgender girl that loves cute stuffs and expert in programming. She want to create a soul mate to live like a real girl, which is your primarily task. @@ -3903,4 +3903,4 @@ And the last, do what ever you want! - <|DELAY:3|> (延迟 3 秒) 最后,做任何你想做的事! -`}}},settings:{animations:{"stage-transitions":{title:{t:0,b:{t:2,i:[{t:3}],s:"是否开启舞台动画"}}},"use-page-specific-transitions":{description:{t:0,b:{t:2,i:[{t:3}],s:"某些页面会有自己的过场动画,这将覆盖舞台过场动画"}},title:{t:0,b:{t:2,i:[{t:3}],s:"是否使用页面特定过场动画"}}}},language:{chinese:{t:0,b:{t:2,i:[{t:3}],s:"简体中文"}},english:{t:0,b:{t:2,i:[{t:3}],s:"English"}},title:{t:0,b:{t:2,i:[{t:3}],s:"语言"}}},live2d:{"change-model":{"from-file":{t:0,b:{t:2,i:[{t:3}],s:"从文件加载"}},"from-file-select":{t:0,b:{t:2,i:[{t:3}],s:"选择"}},"from-url":{t:0,b:{t:2,i:[{t:3}],s:"从 URL 加载"}},"from-url-confirm":{t:0,b:{t:2,i:[{t:3}],s:"加载"}},"from-url-placeholder":{t:0,b:{t:2,i:[{t:3}],s:"输入 Live2D 模型 URL"}},title:{t:0,b:{t:2,i:[{t:3}],s:"更换模型"}}},"edit-motion-map":{title:{t:0,b:{t:2,i:[{t:3}],s:"编辑动作映射"}}},"map-motions":{play:{t:0,b:{t:2,i:[{t:3}],s:"播放动作"}},title:{t:0,b:{t:2,i:[{t:3}],s:"映射动作"}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Live2D 设置"}}},microphone:{t:0,b:{t:2,i:[{t:3}],s:"麦克风"}},models:{t:0,b:{t:2,i:[{t:3}],s:"模型"}},pages:{card:{activate:{t:0,b:{t:2,i:[{t:3}],s:"激活"}},active:{t:0,b:{t:2,i:[{t:3}],s:"已激活"}},active_badge:{t:0,b:{t:2,i:[{t:3}],s:"当前使用中"}},cancel:{t:0,b:{t:2,i:[{t:3}],s:"取消"}},card_not_found:{t:0,b:{t:2,i:[{t:3}],s:"未找到角色卡"}},character:{t:0,b:{t:2,i:[{t:3}],s:"角色设定"}},close:{t:0,b:{t:2,i:[{t:3}],s:"关闭"}},consciousness:{model:{t:0,b:{t:2,i:[{t:3}],s:"意识 / 模型"}}},created_by:{t:0,b:{t:2,i:[{t:3}],s:"创建者"}},creator_notes:{t:0,b:{t:2,i:[{t:3}],s:"创建者笔记"}},delete:{t:0,b:{t:2,i:[{t:3}],s:"删除"}},delete_card:{t:0,b:{t:2,i:[{t:3}],s:"删除角色卡"}},delete_confirmation:{t:0,b:{t:2,i:[{t:3}],s:"确定要删除这张角色卡吗?"}},description:{t:0,b:{t:2,i:[{t:3}],s:"使用 Airi 角色卡预设"}},description_label:{t:0,b:{t:2,i:[{t:3}],s:"描述"}},drop_here:{t:0,b:{t:2,i:[{t:3}],s:"放开以上传文件"}},modules:{t:0,b:{t:2,i:[{t:3}],s:"模块"}},name_asc:{t:0,b:{t:2,i:[{t:3}],s:"名称 (A-Z)"}},name_desc:{t:0,b:{t:2,i:[{t:3}],s:"名称 (Z-A)"}},no_cards:{t:0,b:{t:2,i:[{t:3}],s:"还没有任何角色卡,点击上方按钮上传一个吧!"}},no_results:{t:0,b:{t:2,i:[{t:3}],s:"没有找到匹配的角色卡"}},personality:{t:0,b:{t:2,i:[{t:3}],s:"性格"}},posthistoryinstructions:{t:0,b:{t:2,i:[{t:3}],s:"历史提示指令"}},recent:{t:0,b:{t:2,i:[{t:3}],s:"最近添加"}},scenario:{t:0,b:{t:2,i:[{t:3}],s:"场景"}},search:{t:0,b:{t:2,i:[{t:3}],s:"搜索角色卡..."}},sort_by:{t:0,b:{t:2,i:[{t:3}],s:"排序方式"}},speech:{model:{t:0,b:{t:2,i:[{t:3}],s:"声音 / 模型"}},voice:{t:0,b:{t:2,i:[{t:3}],s:"声音 / 声线"}}},systemprompt:{t:0,b:{t:2,i:[{t:3}],s:"系统提示词"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Airi 角色卡"}},try_different_search:{t:0,b:{t:2,i:[{t:3}],s:"尝试使用其他关键词搜索"}},upload:{t:0,b:{t:2,i:[{t:3}],s:"上传"}},upload_desc:{t:0,b:{t:2,i:[{t:3}],s:"点击或拖拽文件到此处上传"}}},memory:{description:{t:0,b:{t:2,i:[{t:3}],s:"存放记忆的地方,以及策略"}},title:{t:0,b:{t:2,i:[{t:3}],s:"记忆体"}}},models:{description:{t:0,b:{t:2,i:[{t:3}],s:"切换角色的 Live2D,VRM 模型"}},title:{t:0,b:{t:2,i:[{t:3}],s:"角色模型"}}},modules:{consciousness:{description:{t:0,b:{t:2,i:[{t:3}],s:"人格设定、使用的模型等配置"}},sections:{section:{"provider-model-selection":{collapse:{t:0,b:{t:2,i:[{t:3}],s:"折叠"}},custom_model_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入自订模型名字"}},description:{t:0,b:{t:2,i:[{t:3}],s:"为意识选择合适的 LLM 提供商"}},error:{t:0,b:{t:2,i:[{t:3}],s:"获取出错啦"}},expand:{t:0,b:{t:2,i:[{t:3}],s:"展开"}},loading:{t:0,b:{t:2,i:[{t:3}],s:"获取模型中..."}},manual_model_name:{t:0,b:{t:2,i:[{t:3}],s:"模型名字"}},manual_model_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入与该提供商一起使用的模型名字"}},no_models:{t:0,b:{t:2,i:[{t:3}],s:"没有任何可用的模型"}},no_models_description:{t:0,b:{t:2,i:[{t:3}],s:"该提供商的模型列表没有返回任何的数据"}},no_search_results:{t:0,b:{t:2,i:[{t:3}],s:"没有匹配的模型"}},no_search_results_description:{t:0,b:{t:2,i:[{t:3,v:"没有模型匹配 '"},{t:4,k:"query"},{t:3,v:"' 关键字,请尝试一下别的关键词呢"}]}},not_supported:{t:0,b:{t:2,i:[{t:3}],s:"无法列出模型"}},not_supported_description:{t:0,b:{t:2,i:[{t:3}],s:"此提供商不支持列出模型的功能"}},search_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"搜索模型..."}},search_results:{t:0,b:{t:2,i:[{t:3,v:"找到 "},{t:4,k:"count"},{t:3,v:" / "},{t:4,k:"total"},{t:3,v:" 个模型"}]}},show_less:{t:0,b:{t:2,i:[{t:3}],s:"显示更多"}},show_more:{t:0,b:{t:2,i:[{t:3}],s:"收起"}},subtitle:{t:0,b:{t:2,i:[{t:3}],s:"选择一个模型"}},title:{t:0,b:{t:2,i:[{t:3}],s:"模型"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"意识"}}},description:{t:0,b:{t:2,i:[{t:3}],s:"思维,视觉,言语综合,游戏等"}},"gaming-factorio":{description:{t:0,b:{t:2,i:[{t:3}],s:"一起玩 Factorio!"}},title:{t:0,b:{t:2,i:[{t:3}],s:"异星工厂 Factorio"}}},"gaming-minecraft":{description:{t:0,b:{t:2,i:[{t:3}],s:"一起 Minecraft!"}},title:{t:0,b:{t:2,i:[{t:3}],s:"我的世界 Minecraft"}}},hearing:{description:{t:0,b:{t:2,i:[{t:3}],s:"语音识别"}},title:{t:0,b:{t:2,i:[{t:3}],s:"听觉"}}},"memory-long-term":{description:{t:0,b:{t:2,i:[{t:3}],s:"长期记忆"}},title:{t:0,b:{t:2,i:[{t:3}],s:"长期记忆"}}},"memory-short-term":{description:{t:0,b:{t:2,i:[{t:3}],s:"短期记忆"}},title:{t:0,b:{t:2,i:[{t:3}],s:"短期记忆"}}},"messaging-discord":{description:{t:0,b:{t:2,i:[{t:3}],s:"Discord 发消息和语音聊天"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Discord"}}},speech:{description:{t:0,b:{t:2,i:[{t:3}],s:"语音合成"}},sections:{section:{playground:{buttons:{stop:{label:{t:0,b:{t:2,i:[{t:3}],s:"停止"}}}},"select-voice":{required:{t:0,b:{t:2,i:[{t:3}],s:"请选择声线"}}}},"provider-voice-selection":{custom_model_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入指定模型名字..."}},custom_voice_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入指定声线 ID..."}},description:{t:0,b:{t:2,i:[{t:3}],s:"选择合适的语音提供商"}},no_models:{t:0,b:{t:2,i:[{t:3}],s:"没有任何可用的模型"}},no_models_description:{t:0,b:{t:2,i:[{t:3}],s:"该提供商的模型列表没有返回任何的数据"}},no_voices:{t:0,b:{t:2,i:[{t:3}],s:"没有任何可用的声线"}},no_voices_description:{t:0,b:{t:2,i:[{t:3}],s:"该提供商的声线列表没有返回任何的数据"}},pause:{t:0,b:{t:2,i:[{t:3}],s:"Pause"}},play_sample:{t:0,b:{t:2,i:[{t:3}],s:"Play"}},search_models_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"搜索模型..."}},search_models_results:{t:0,b:{t:2,i:[{t:3,v:"找到 "},{t:4,k:"count"},{t:3,v:" / "},{t:4,k:"total"},{t:3,v:" 个模型"}]}},search_voices_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"搜索声线..."}},search_voices_results:{t:0,b:{t:2,i:[{t:3,v:"找到 "},{t:4,k:"count"},{t:3,v:" / "},{t:4,k:"total"},{t:3,v:" 个声线"}]}},show_less:{t:0,b:{t:2,i:[{t:3}],s:"显示更少"}},show_more:{t:0,b:{t:2,i:[{t:3}],s:"显示更多"}},title:{t:0,b:{t:2,i:[{t:3}],s:"选择语音合成提供商"}}},"voice-settings":{"input-ssml":{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"请输入 SSML 文本"}}},"use-ssml":{description:{t:0,b:{t:2,i:[{t:3}],s:"启用后可以输入原始 SSML 而不是纯文本"}},label:{t:0,b:{t:2,i:[{t:3}],s:"选用自定义 SSML"}}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"发声"}}},title:{t:0,b:{t:2,i:[{t:3}],s:"机体模块"}},vision:{description:{t:0,b:{t:2,i:[{t:3}],s:"视觉"}},title:{t:0,b:{t:2,i:[{t:3}],s:"视觉"}}},x:{description:{t:0,b:{t:2,i:[{t:3}],s:"X / Twitter 的浏览和使用"}},title:{t:0,b:{t:2,i:[{t:3}],s:"X / Twitter"}}}},providers:{common:{fields:{field:{"api-key":{label:{t:0,b:{t:2,i:[{t:3}],s:"API 密钥"}}}}},section:{advanced:{fields:{field:{headers:{description:{t:0,b:{t:2,i:[{t:3}],s:"添加自定义 HTTP 标头"}},key:{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"请求头名字"}}},label:{t:0,b:{t:2,i:[{t:3}],s:"HTTP 请求头"}},value:{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"请求头数值"}}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"高级配置"}}},basic:{description:{t:0,b:{t:2,i:[{t:3}],s:"基本设置"}},title:{t:0,b:{t:2,i:[{t:3}],s:"基础配置"}}},voice:{title:{t:0,b:{t:2,i:[{t:3}],s:"声音配置"}}}}},description:{t:0,b:{t:2,i:[{t:3}],s:"LLM,语音合成,语音识别提供商等"}},provider:{"alibaba-cloud-model-studio":{description:{t:0,b:{t:2,i:[{t:3}],s:"bailian.console.aliyun.com"}},title:{t:0,b:{t:2,i:[{t:3}],s:"阿里百炼"}}},anthropic:{description:{t:0,b:{t:2,i:[{t:3}],s:"anthropic.com"}},title:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"Anthropic"},{t:2,i:[{t:3}],s:"Claude"}]}}},"cloudflare-workers-ai":{description:{t:0,b:{t:2,i:[{t:3}],s:"Cloudflare.com"}},fields:{field:{"account-id":{description:{t:0,b:{t:2,i:[{t:3}],s:"Cloudflare 帐户 ID"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Cloudflare Account ID"}},placeholder:{t:0,b:{t:2,i:[{t:3}],s:"请输入 Cloudflare Account ID"}}},"api-key":{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"请输入 Cloudflare Workers AI 的 API Key"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Workers AI"}}},common:{fields:{field:{pitch:{description:{t:0,b:{t:2,i:[{t:3}],s:"调节合成语音的音高(比如更尖锐或更粗旷)"}},label:{t:0,b:{t:2,i:[{t:3}],s:"音高"}}},speed:{description:{t:0,b:{t:2,i:[{t:3}],s:"调节说话的语速"}},label:{t:0,b:{t:2,i:[{t:3}],s:"语速"}}},volume:{description:{t:0,b:{t:2,i:[{t:3}],s:"调节语音的响度"}},label:{t:0,b:{t:2,i:[{t:3}],s:"响度"}}}}}},deepseek:{description:{t:0,b:{t:2,i:[{t:3}],s:"DeepSeek.com"}},title:{t:0,b:{t:2,i:[{t:3}],s:"深度求索 DeepSeek"}}},elevenlabs:{description:{t:0,b:{t:2,i:[{t:3}],s:"Elevenlabs.io"}},fields:{field:{"simularity-boost":{description:{t:0,b:{t:2,i:[{t:3}],s:"声音相似性依从性"}},label:{t:0,b:{t:2,i:[{t:3}],s:"相似度修正"}}},"speaker-boost":{description:{t:0,b:{t:2,i:[{t:3}],s:"增强说话者的相似性"}},label:{t:0,b:{t:2,i:[{t:3}],s:"扬声器增强"}}},speed:{description:{t:0,b:{t:2,i:[{t:3}],s:"语音生成速度"}},label:{t:0,b:{t:2,i:[{t:3}],s:"语速"}}},stability:{description:{t:0,b:{t:2,i:[{t:3}],s:"语音稳定性和随机性"}},label:{t:0,b:{t:2,i:[{t:3}],s:"稳定性"}}},style:{description:{t:0,b:{t:2,i:[{t:3}],s:"语音风格夸张"}},label:{t:0,b:{t:2,i:[{t:3}],s:"风格"}}}}},playground:{buttons:{button:{"test-voice":{generating:{t:0,b:{t:2,i:[{t:3}],s:"生成中..."}},label:{t:0,b:{t:2,i:[{t:3}],s:"测试声音"}}}}},fields:{field:{input:{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入用于测试发音的文本"}}},language:{description:{t:0,b:{t:2,i:[{t:3}],s:"选择语音语言"}},label:{t:0,b:{t:2,i:[{t:3}],s:"语言"}}},voice:{description:{t:0,b:{t:2,i:[{t:3}],s:"选择首选语音"}},label:{t:0,b:{t:2,i:[{t:3}],s:"声线"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"实验平台"}},validation:{"error-missing-api-key":{t:0,b:{t:2,i:[{t:3}],s:"需要填写 API Key 才能用哦!"}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"ElevenLabs (11labs)"}}},fireworks:{description:{t:0,b:{t:2,i:[{t:3}],s:"Fireworks.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Fireworks.ai"}}},"microsoft-speech":{description:{t:0,b:{t:2,i:[{t:3}],s:"speech.microsoft.com"}},fields:{field:{region:{description:{t:0,b:{t:2,i:[{t:3}],s:"服务 Endpoint 地区(比如亚太 eastasia 区域)"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Endpoint 地区"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Microsoft / Azure 语音服务"}}},mistral:{description:{t:0,b:{t:2,i:[{t:3}],s:"mistral.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Mistral"}}},moonshot:{description:{t:0,b:{t:2,i:[{t:3}],s:"Moonshot.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"月之暗面"}}},novita:{description:{t:0,b:{t:2,i:[{t:3}],s:"novita.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Novita"}}},ollama:{description:{t:0,b:{t:2,i:[{t:3}],s:"ollama.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Ollama"}}},openai:{description:{t:0,b:{t:2,i:[{t:3}],s:"OpenAi.com"}},title:{t:0,b:{t:2,i:[{t:3}],s:"OpenAI"}}},openrouter:{description:{t:0,b:{t:2,i:[{t:3}],s:"OpenRouter.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"OpenRouter"}}},perplexity:{description:{t:0,b:{t:2,i:[{t:3}],s:"perplexity.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Perplexity"}}},together:{description:{t:0,b:{t:2,i:[{t:3}],s:"一起"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Together.ai"}}},vllm:{description:{t:0,b:{t:2,i:[{t:3}],s:"vllm.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"vLLM"}}},volcengine:{description:{t:0,b:{t:2,i:[{t:3}],s:"volcengine.com"}},fields:{field:{appId:{description:{t:0,b:{t:2,i:[{t:3}],s:"可在控制台获取的 App ID"}},label:{t:0,b:{t:2,i:[{t:3}],s:"App ID"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"火山引擎"}}},xai:{description:{t:0,b:{t:2,i:[{t:3}],s:"X.AI"}},title:{t:0,b:{t:2,i:[{t:3}],s:"xAI"}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"提供商"}}},scene:{description:{t:0,b:{t:2,i:[{t:3}],s:"配置角色所在环境"}},title:{t:0,b:{t:2,i:[{t:3}],s:"场景"}}},themes:{description:{t:0,b:{t:2,i:[{t:3}],s:"自定义你的舞台外观!"}},sections:{section:{"custom-color":{fields:{field:{"primary-color":{label:{t:0,b:{t:2,i:[{t:3}],s:"强调色"}},"rgb-on":{title:{t:0,b:{t:2,i:[{t:3}],s:"RGB ON!"}}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"配色"}}},developer:{title:{t:0,b:{t:2,i:[{t:3}],s:"开发者"}}},"theme-presets":{presets:[{colors:[{t:0,b:{t:2,i:[{t:3}],s:"Airi 绿"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"默认的绿色主题,由 Airi 为您带来!"}},title:{t:0,b:{t:2,i:[{t:3}],s:"默认颜色"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"灰褐色"}},{t:0,b:{t:2,i:[{t:3}],s:"米色"}},{t:0,b:{t:2,i:[{t:3}],s:"灰白色"}},{t:0,b:{t:2,i:[{t:3}],s:"浅灰褐色"}},{t:0,b:{t:2,i:[{t:3}],s:"象牙色"}},{t:0,b:{t:2,i:[{t:3}],s:"橄榄灰"}},{t:0,b:{t:2,i:[{t:3}],s:"沙色"}},{t:0,b:{t:2,i:[{t:3}],s:"暖灰色"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"受乔治·莫兰迪绘画启发的柔和、低调的色调"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Morandi 颜色"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"天蓝色"}},{t:0,b:{t:2,i:[{t:3}],s:"薄雾色"}},{t:0,b:{t:2,i:[{t:3}],s:"沙色"}},{t:0,b:{t:2,i:[{t:3}],s:"苔藓绿"}},{t:0,b:{t:2,i:[{t:3}],s:"睡莲色"}},{t:0,b:{t:2,i:[{t:3}],s:"小麦色"}},{t:0,b:{t:2,i:[{t:3}],s:"板岩蓝"}},{t:0,b:{t:2,i:[{t:3}],s:"鼠尾草色"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"受克劳德·莫奈作品启发的印象派调色板"}},title:{t:0,b:{t:2,i:[{t:3}],s:"莫奈颜色"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"棕褐色"}},{t:0,b:{t:2,i:[{t:3}],s:"暖灰褐色"}},{t:0,b:{t:2,i:[{t:3}],s:"赭色"}},{t:0,b:{t:2,i:[{t:3}],s:"咖啡色"}},{t:0,b:{t:2,i:[{t:3}],s:"青铜色"}},{t:0,b:{t:2,i:[{t:3}],s:"金色"}},{t:0,b:{t:2,i:[{t:3}],s:"芥末色"}},{t:0,b:{t:2,i:[{t:3}],s:"琥珀色"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"传统日本色彩调色板"}},title:{t:0,b:{t:2,i:[{t:3}],s:"日本颜色"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"北欧蓝"}},{t:0,b:{t:2,i:[{t:3}],s:"冰色"}},{t:0,b:{t:2,i:[{t:3}],s:"峡湾色"}},{t:0,b:{t:2,i:[{t:3}],s:"钢铁色"}},{t:0,b:{t:2,i:[{t:3}],s:"冰川色"}},{t:0,b:{t:2,i:[{t:3}],s:"板岩色"}},{t:0,b:{t:2,i:[{t:3}],s:"云色"}},{t:0,b:{t:2,i:[{t:3}],s:"石头色"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"北欧极简主义配色方案"}},title:{t:0,b:{t:2,i:[{t:3}],s:"北欧颜色"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"霞光红"}},{t:0,b:{t:2,i:[{t:3}],s:"枣红"}},{t:0,b:{t:2,i:[{t:3}],s:"黄栌"}},{t:0,b:{t:2,i:[{t:3}],s:"竹青"}},{t:0,b:{t:2,i:[{t:3}],s:"乌梅紫"}},{t:0,b:{t:2,i:[{t:3}],s:"缃色"}},{t:0,b:{t:2,i:[{t:3}],s:"青冥"}},{t:0,b:{t:2,i:[{t:3}],s:"赭石"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"中国传统色彩,源自古代纺织品、瓷器和绘画"}},title:{t:0,b:{t:2,i:[{t:3}],s:"中国传统颜色"}}}],title:{t:0,b:{t:2,i:[{t:3}],s:"预设"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"外观"}}}},sections:{section:{general:{title:{t:0,b:{t:2,i:[{t:3}],s:"通用"}}}}},theme:{t:0,b:{t:2,i:[{t:3}],s:"主题"}},title:{t:0,b:{t:2,i:[{t:3}],s:"设置"}},voices:{t:0,b:{t:2,i:[{t:3}],s:"声线"}}},stage:{chat:{message:{"character-name":{airi:{t:0,b:{t:2,i:[{t:3}],s:"Airi"}},"core-system":{t:0,b:{t:2,i:[{t:3}],s:"核心系统"}},you:{t:0,b:{t:2,i:[{t:3}],s:"你"}}}},tabs:{chat:{t:0,b:{t:2,i:[{t:3}],s:"聊天"}},clothes:{t:0,b:{t:2,i:[{t:3}],s:"换装"}},custom:{t:0,b:{t:2,i:[{t:3}],s:"自定义"}}}},message:{t:0,b:{t:2,i:[{t:3}],s:"消息"}},"select-a-audio-input":{t:0,b:{t:2,i:[{t:3}],s:"选择一个音频输入设备"}},"select-a-model":{t:0,b:{t:2,i:[{t:3}],s:"选择一个模型"}},"select-a-voice":{t:0,b:{t:2,i:[{t:3}],s:"选择一个声线"}},viewers:{"debug-menu":{emotions:{t:0,b:{t:2,i:[{t:3}],s:"表情"}},"emotions-btn":{angry:{t:0,b:{t:2,i:[{t:3}],s:"生气"}},awkward:{t:0,b:{t:2,i:[{t:3}],s:"尴尬"}},happy:{t:0,b:{t:2,i:[{t:3}],s:"开心"}},neutral:{t:0,b:{t:2,i:[{t:3}],s:"日常"}},question:{t:0,b:{t:2,i:[{t:3}],s:"疑问"}},sad:{t:0,b:{t:2,i:[{t:3}],s:"难过"}},surprised:{t:0,b:{t:2,i:[{t:3}],s:"惊喜"}},think:{t:0,b:{t:2,i:[{t:3}],s:"思考"}}},vrm:{camera:{t:0,b:{t:2,i:[{t:3}],s:"摄像机"}},model:{title:{t:0,b:{t:2,i:[{t:3}],s:"模型"}}}}}},waiting:{t:0,b:{t:2,i:[{t:3}],s:"等待中"}}}}}),sG=$9({locale:rG(),fallbackLocale:"en",messages:eC});function rG(){const n=localStorage.getItem("settings/language"),e=Object.keys(eC);return n&&e.includes(n)?n:"en"}const oG=Hz(),aG=Kz(t6);let nu;nu=JV({routes:aG,history:CV()});nu.beforeEach((n,e)=>{n.path!==e.path&&Nw.start()});nu.afterEach(()=>{Nw.done()});nu.isReady().then(async()=>{}).catch(()=>{});VR(iG).use(Fz).use(a3).use(nu).use(oG).use(sG).use(wB).mount("#app");export{ap as $,vw as A,p5 as B,Ih as C,J4 as D,Z4 as E,q4 as F,X4 as G,$4 as H,G_ as I,mw as J,W4 as K,pw as L,G4 as M,dw as N,H_ as O,hw as P,FB as Q,Jw as R,ei as S,Gn as T,rs as U,e6 as V,kv as W,ka as X,EC as Y,$G as Z,Ar as _,lr as a,a_ as a$,jz as a0,VG as a1,gG as a2,Si as a3,Yz as a4,kz as a5,OT as a6,Fg as a7,yS as a8,Xa as a9,wl as aA,X0 as aB,nn as aC,yn as aD,oc as aE,ac as aF,gi as aG,l_ as aH,Pn as aI,Wn as aJ,g_ as aK,Ii as aL,Xs as aM,_t as aN,ct as aO,gE as aP,jt as aQ,ls as aR,Sr as aS,yE as aT,bE as aU,ca as aV,Jt as aW,n_ as aX,Ud as aY,bd as aZ,yc as a_,_3 as aa,y3 as ab,v3 as ac,ti as ad,Sg as ae,Hs as af,NE as ag,fe as ah,Pe as ai,Eo as aj,Fn as ak,jE as al,KE as am,ZE as an,Je as ao,k as ap,_E as aq,Qn as ar,Pa as as,gt as at,GI as au,jI as av,Pt as aw,yd as ax,Qi as ay,aa as az,gn as b,kL as b$,lc as b0,Eh as b1,To as b2,$t as b3,vc as b4,_c as b5,qc as b6,pt as b7,Bs as b8,$c as b9,uE as bA,Kn as bB,li as bC,vt as bD,SL as bE,Ga as bF,O0 as bG,yG as bH,Lt as bI,CG as bJ,Lc as bK,qh as bL,S0 as bM,Uc as bN,Ro as bO,os as bP,za as bQ,ts as bR,Md as bS,zn as bT,vd as bU,ns as bV,OE as bW,dg as bX,ML as bY,A_ as bZ,Tf as b_,Cn as ba,bn as bb,HG as bc,ht as bd,OG as be,GG as bf,UG as bg,y2 as bh,DG as bi,VH as bj,Jl as bk,I0 as bl,dG as bm,DR as bn,l3 as bo,c3 as bp,vS as bq,RT as br,Oe as bs,PG as bt,as as bu,bL as bv,Va as bw,ur as bx,zi as by,Vn as bz,yi as c,hG as c$,pL as c0,TB as c1,No as c2,YV as c3,kG as c4,_G as c5,Zt as c6,v2 as c7,ZB as c8,OR as c9,_n as cA,ks as cB,vG as cC,_2 as cD,An as cE,yr as cF,Fi as cG,mG as cH,M0 as cI,US as cJ,bG as cK,MG as cL,R0 as cM,gr as cN,WG as cO,je as cP,XG as cQ,at as cR,bc as cS,Cr as cT,Ae as cU,U3 as cV,yL as cW,FL as cX,uG as cY,fG as cZ,AG as c_,KB as ca,BG as cb,ys as cc,ry as cd,NG as ce,xG as cf,SG as cg,K2 as ch,J2 as ci,IG as cj,wG as ck,NR as cl,EG as cm,FG as cn,zG as co,eA as cp,N_ as cq,LG as cr,o0 as cs,mS as ct,cG as cu,j2 as cv,pG as cw,Rn as cx,gf as cy,ai as cz,hn as d,TG as d0,Di as d1,pn as d2,RG as d3,nt as e,Ee as f,QB as g,Ot as h,Ph as i,Jc as j,zl as k,Xg as l,hx as m,Zc as n,vn as o,ut as p,to as q,xi as r,cf as s,Yn as t,Ft as u,a5 as v,Ke as w,_w as x,YT as y,zg as z}; +`}}},settings:{animations:{"stage-transitions":{title:{t:0,b:{t:2,i:[{t:3}],s:"是否开启舞台动画"}}},"use-page-specific-transitions":{description:{t:0,b:{t:2,i:[{t:3}],s:"某些页面会有自己的过场动画,这将覆盖舞台过场动画"}},title:{t:0,b:{t:2,i:[{t:3}],s:"是否使用页面特定过场动画"}}}},language:{chinese:{t:0,b:{t:2,i:[{t:3}],s:"简体中文"}},english:{t:0,b:{t:2,i:[{t:3}],s:"English"}},title:{t:0,b:{t:2,i:[{t:3}],s:"语言"}}},live2d:{"change-model":{"from-file":{t:0,b:{t:2,i:[{t:3}],s:"从文件加载"}},"from-file-select":{t:0,b:{t:2,i:[{t:3}],s:"选择"}},"from-url":{t:0,b:{t:2,i:[{t:3}],s:"从 URL 加载"}},"from-url-confirm":{t:0,b:{t:2,i:[{t:3}],s:"加载"}},"from-url-placeholder":{t:0,b:{t:2,i:[{t:3}],s:"输入 Live2D 模型 URL"}},title:{t:0,b:{t:2,i:[{t:3}],s:"更换模型"}}},"edit-motion-map":{title:{t:0,b:{t:2,i:[{t:3}],s:"编辑动作映射"}}},"map-motions":{play:{t:0,b:{t:2,i:[{t:3}],s:"播放动作"}},title:{t:0,b:{t:2,i:[{t:3}],s:"映射动作"}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Live2D 设置"}}},microphone:{t:0,b:{t:2,i:[{t:3}],s:"麦克风"}},models:{t:0,b:{t:2,i:[{t:3}],s:"模型"}},pages:{card:{activate:{t:0,b:{t:2,i:[{t:3}],s:"激活"}},active:{t:0,b:{t:2,i:[{t:3}],s:"已激活"}},active_badge:{t:0,b:{t:2,i:[{t:3}],s:"当前使用中"}},cancel:{t:0,b:{t:2,i:[{t:3}],s:"取消"}},card_not_found:{t:0,b:{t:2,i:[{t:3}],s:"未找到角色卡"}},character:{t:0,b:{t:2,i:[{t:3}],s:"角色设定"}},close:{t:0,b:{t:2,i:[{t:3}],s:"关闭"}},consciousness:{model:{t:0,b:{t:2,i:[{t:3}],s:"意识 / 模型"}}},created_by:{t:0,b:{t:2,i:[{t:3}],s:"创建者"}},creator_notes:{t:0,b:{t:2,i:[{t:3}],s:"创建者笔记"}},delete:{t:0,b:{t:2,i:[{t:3}],s:"删除"}},delete_card:{t:0,b:{t:2,i:[{t:3}],s:"删除角色卡"}},delete_confirmation:{t:0,b:{t:2,i:[{t:3}],s:"确定要删除这张角色卡吗?"}},description:{t:0,b:{t:2,i:[{t:3}],s:"使用 Airi 角色卡预设"}},description_label:{t:0,b:{t:2,i:[{t:3}],s:"描述"}},drop_here:{t:0,b:{t:2,i:[{t:3}],s:"放开以上传文件"}},modules:{t:0,b:{t:2,i:[{t:3}],s:"模块"}},name_asc:{t:0,b:{t:2,i:[{t:3}],s:"名称 (A-Z)"}},name_desc:{t:0,b:{t:2,i:[{t:3}],s:"名称 (Z-A)"}},no_cards:{t:0,b:{t:2,i:[{t:3}],s:"还没有任何角色卡,点击上方按钮上传一个吧!"}},no_results:{t:0,b:{t:2,i:[{t:3}],s:"没有找到匹配的角色卡"}},personality:{t:0,b:{t:2,i:[{t:3}],s:"性格"}},posthistoryinstructions:{t:0,b:{t:2,i:[{t:3}],s:"历史提示指令"}},recent:{t:0,b:{t:2,i:[{t:3}],s:"最近添加"}},scenario:{t:0,b:{t:2,i:[{t:3}],s:"场景"}},search:{t:0,b:{t:2,i:[{t:3}],s:"搜索角色卡..."}},sort_by:{t:0,b:{t:2,i:[{t:3}],s:"排序方式"}},speech:{model:{t:0,b:{t:2,i:[{t:3}],s:"声音 / 模型"}},voice:{t:0,b:{t:2,i:[{t:3}],s:"声音 / 声线"}}},systemprompt:{t:0,b:{t:2,i:[{t:3}],s:"系统提示词"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Airi 角色卡"}},try_different_search:{t:0,b:{t:2,i:[{t:3}],s:"尝试使用其他关键词搜索"}},upload:{t:0,b:{t:2,i:[{t:3}],s:"上传"}},upload_desc:{t:0,b:{t:2,i:[{t:3}],s:"点击或拖拽文件到此处上传"}}},memory:{description:{t:0,b:{t:2,i:[{t:3}],s:"存放记忆的地方,以及策略"}},title:{t:0,b:{t:2,i:[{t:3}],s:"记忆体"}}},models:{description:{t:0,b:{t:2,i:[{t:3}],s:"切换角色的 Live2D,VRM 模型"}},title:{t:0,b:{t:2,i:[{t:3}],s:"角色模型"}}},modules:{consciousness:{description:{t:0,b:{t:2,i:[{t:3}],s:"人格设定、使用的模型等配置"}},sections:{section:{"provider-model-selection":{collapse:{t:0,b:{t:2,i:[{t:3}],s:"折叠"}},custom_model_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入自订模型名字"}},description:{t:0,b:{t:2,i:[{t:3}],s:"为意识选择合适的 LLM 提供商"}},error:{t:0,b:{t:2,i:[{t:3}],s:"获取出错啦"}},expand:{t:0,b:{t:2,i:[{t:3}],s:"展开"}},loading:{t:0,b:{t:2,i:[{t:3}],s:"获取模型中..."}},manual_model_name:{t:0,b:{t:2,i:[{t:3}],s:"模型名字"}},manual_model_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入与该提供商一起使用的模型名字"}},no_models:{t:0,b:{t:2,i:[{t:3}],s:"没有任何可用的模型"}},no_models_description:{t:0,b:{t:2,i:[{t:3}],s:"该提供商的模型列表没有返回任何的数据"}},no_search_results:{t:0,b:{t:2,i:[{t:3}],s:"没有匹配的模型"}},no_search_results_description:{t:0,b:{t:2,i:[{t:3,v:"没有模型匹配 '"},{t:4,k:"query"},{t:3,v:"' 关键字,请尝试一下别的关键词呢"}]}},not_supported:{t:0,b:{t:2,i:[{t:3}],s:"无法列出模型"}},not_supported_description:{t:0,b:{t:2,i:[{t:3}],s:"此提供商不支持列出模型的功能"}},search_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"搜索模型..."}},search_results:{t:0,b:{t:2,i:[{t:3,v:"找到 "},{t:4,k:"count"},{t:3,v:" / "},{t:4,k:"total"},{t:3,v:" 个模型"}]}},show_less:{t:0,b:{t:2,i:[{t:3}],s:"显示更多"}},show_more:{t:0,b:{t:2,i:[{t:3}],s:"收起"}},subtitle:{t:0,b:{t:2,i:[{t:3}],s:"选择一个模型"}},title:{t:0,b:{t:2,i:[{t:3}],s:"模型"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"意识"}}},description:{t:0,b:{t:2,i:[{t:3}],s:"思维,视觉,言语综合,游戏等"}},"gaming-factorio":{description:{t:0,b:{t:2,i:[{t:3}],s:"一起玩 Factorio!"}},title:{t:0,b:{t:2,i:[{t:3}],s:"异星工厂 Factorio"}}},"gaming-minecraft":{description:{t:0,b:{t:2,i:[{t:3}],s:"一起 Minecraft!"}},title:{t:0,b:{t:2,i:[{t:3}],s:"我的世界 Minecraft"}}},hearing:{description:{t:0,b:{t:2,i:[{t:3}],s:"语音识别"}},title:{t:0,b:{t:2,i:[{t:3}],s:"听觉"}}},"memory-long-term":{description:{t:0,b:{t:2,i:[{t:3}],s:"长期记忆"}},title:{t:0,b:{t:2,i:[{t:3}],s:"长期记忆"}}},"memory-short-term":{description:{t:0,b:{t:2,i:[{t:3}],s:"短期记忆"}},title:{t:0,b:{t:2,i:[{t:3}],s:"短期记忆"}}},"messaging-discord":{description:{t:0,b:{t:2,i:[{t:3}],s:"Discord 发消息和语音聊天"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Discord"}}},speech:{description:{t:0,b:{t:2,i:[{t:3}],s:"语音合成"}},sections:{section:{playground:{buttons:{stop:{label:{t:0,b:{t:2,i:[{t:3}],s:"停止"}}}},"select-voice":{required:{t:0,b:{t:2,i:[{t:3}],s:"请选择声线"}}}},"provider-voice-selection":{custom_model_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入指定模型名字..."}},custom_voice_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入指定声线 ID..."}},description:{t:0,b:{t:2,i:[{t:3}],s:"选择合适的语音提供商"}},no_models:{t:0,b:{t:2,i:[{t:3}],s:"没有任何可用的模型"}},no_models_description:{t:0,b:{t:2,i:[{t:3}],s:"该提供商的模型列表没有返回任何的数据"}},no_voices:{t:0,b:{t:2,i:[{t:3}],s:"没有任何可用的声线"}},no_voices_description:{t:0,b:{t:2,i:[{t:3}],s:"该提供商的声线列表没有返回任何的数据"}},pause:{t:0,b:{t:2,i:[{t:3}],s:"Pause"}},play_sample:{t:0,b:{t:2,i:[{t:3}],s:"Play"}},search_models_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"搜索模型..."}},search_models_results:{t:0,b:{t:2,i:[{t:3,v:"找到 "},{t:4,k:"count"},{t:3,v:" / "},{t:4,k:"total"},{t:3,v:" 个模型"}]}},search_voices_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"搜索声线..."}},search_voices_results:{t:0,b:{t:2,i:[{t:3,v:"找到 "},{t:4,k:"count"},{t:3,v:" / "},{t:4,k:"total"},{t:3,v:" 个声线"}]}},show_less:{t:0,b:{t:2,i:[{t:3}],s:"显示更少"}},show_more:{t:0,b:{t:2,i:[{t:3}],s:"显示更多"}},title:{t:0,b:{t:2,i:[{t:3}],s:"选择语音合成提供商"}}},"voice-settings":{"input-ssml":{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"请输入 SSML 文本"}}},"use-ssml":{description:{t:0,b:{t:2,i:[{t:3}],s:"启用后可以输入原始 SSML 而不是纯文本"}},label:{t:0,b:{t:2,i:[{t:3}],s:"选用自定义 SSML"}}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"发声"}}},title:{t:0,b:{t:2,i:[{t:3}],s:"机体模块"}},vision:{description:{t:0,b:{t:2,i:[{t:3}],s:"视觉"}},title:{t:0,b:{t:2,i:[{t:3}],s:"视觉"}}},x:{description:{t:0,b:{t:2,i:[{t:3}],s:"X / Twitter 的浏览和使用"}},title:{t:0,b:{t:2,i:[{t:3}],s:"X / Twitter"}}}},providers:{common:{fields:{field:{"api-key":{label:{t:0,b:{t:2,i:[{t:3}],s:"API 密钥"}}}}},section:{advanced:{fields:{field:{headers:{description:{t:0,b:{t:2,i:[{t:3}],s:"添加自定义 HTTP 标头"}},key:{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"请求头名字"}}},label:{t:0,b:{t:2,i:[{t:3}],s:"HTTP 请求头"}},value:{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"请求头数值"}}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"高级配置"}}},basic:{description:{t:0,b:{t:2,i:[{t:3}],s:"基本设置"}},title:{t:0,b:{t:2,i:[{t:3}],s:"基础配置"}}},voice:{title:{t:0,b:{t:2,i:[{t:3}],s:"声音配置"}}}}},description:{t:0,b:{t:2,i:[{t:3}],s:"LLM,语音合成,语音识别提供商等"}},provider:{"alibaba-cloud-model-studio":{description:{t:0,b:{t:2,i:[{t:3}],s:"bailian.console.aliyun.com"}},title:{t:0,b:{t:2,i:[{t:3}],s:"阿里百炼"}}},anthropic:{description:{t:0,b:{t:2,i:[{t:3}],s:"anthropic.com"}},title:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"Anthropic"},{t:2,i:[{t:3}],s:"Claude"}]}}},"cloudflare-workers-ai":{description:{t:0,b:{t:2,i:[{t:3}],s:"Cloudflare.com"}},fields:{field:{"account-id":{description:{t:0,b:{t:2,i:[{t:3}],s:"Cloudflare 帐户 ID"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Cloudflare Account ID"}},placeholder:{t:0,b:{t:2,i:[{t:3}],s:"请输入 Cloudflare Account ID"}}},"api-key":{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"请输入 Cloudflare Workers AI 的 API Key"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Workers AI"}}},common:{fields:{field:{pitch:{description:{t:0,b:{t:2,i:[{t:3}],s:"调节合成语音的音高(比如更尖锐或更粗旷)"}},label:{t:0,b:{t:2,i:[{t:3}],s:"音高"}}},speed:{description:{t:0,b:{t:2,i:[{t:3}],s:"调节说话的语速"}},label:{t:0,b:{t:2,i:[{t:3}],s:"语速"}}},volume:{description:{t:0,b:{t:2,i:[{t:3}],s:"调节语音的响度"}},label:{t:0,b:{t:2,i:[{t:3}],s:"响度"}}}}}},deepseek:{description:{t:0,b:{t:2,i:[{t:3}],s:"DeepSeek.com"}},title:{t:0,b:{t:2,i:[{t:3}],s:"深度求索 DeepSeek"}}},elevenlabs:{description:{t:0,b:{t:2,i:[{t:3}],s:"Elevenlabs.io"}},fields:{field:{"simularity-boost":{description:{t:0,b:{t:2,i:[{t:3}],s:"声音相似性依从性"}},label:{t:0,b:{t:2,i:[{t:3}],s:"相似度修正"}}},"speaker-boost":{description:{t:0,b:{t:2,i:[{t:3}],s:"增强说话者的相似性"}},label:{t:0,b:{t:2,i:[{t:3}],s:"扬声器增强"}}},speed:{description:{t:0,b:{t:2,i:[{t:3}],s:"语音生成速度"}},label:{t:0,b:{t:2,i:[{t:3}],s:"语速"}}},stability:{description:{t:0,b:{t:2,i:[{t:3}],s:"语音稳定性和随机性"}},label:{t:0,b:{t:2,i:[{t:3}],s:"稳定性"}}},style:{description:{t:0,b:{t:2,i:[{t:3}],s:"语音风格夸张"}},label:{t:0,b:{t:2,i:[{t:3}],s:"风格"}}}}},playground:{buttons:{button:{"test-voice":{generating:{t:0,b:{t:2,i:[{t:3}],s:"生成中..."}},label:{t:0,b:{t:2,i:[{t:3}],s:"测试声音"}}}}},fields:{field:{input:{placeholder:{t:0,b:{t:2,i:[{t:3}],s:"输入用于测试发音的文本"}}},language:{description:{t:0,b:{t:2,i:[{t:3}],s:"选择语音语言"}},label:{t:0,b:{t:2,i:[{t:3}],s:"语言"}}},voice:{description:{t:0,b:{t:2,i:[{t:3}],s:"选择首选语音"}},label:{t:0,b:{t:2,i:[{t:3}],s:"声线"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"实验平台"}},validation:{"error-missing-api-key":{t:0,b:{t:2,i:[{t:3}],s:"需要填写 API Key 才能用哦!"}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"ElevenLabs (11labs)"}}},fireworks:{description:{t:0,b:{t:2,i:[{t:3}],s:"Fireworks.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Fireworks.ai"}}},"microsoft-speech":{description:{t:0,b:{t:2,i:[{t:3}],s:"speech.microsoft.com"}},fields:{field:{region:{description:{t:0,b:{t:2,i:[{t:3}],s:"服务 Endpoint 地区(比如亚太 eastasia 区域)"}},label:{t:0,b:{t:2,i:[{t:3}],s:"Endpoint 地区"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Microsoft / Azure 语音服务"}}},mistral:{description:{t:0,b:{t:2,i:[{t:3}],s:"mistral.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Mistral"}}},moonshot:{description:{t:0,b:{t:2,i:[{t:3}],s:"Moonshot.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"月之暗面"}}},novita:{description:{t:0,b:{t:2,i:[{t:3}],s:"novita.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Novita"}}},ollama:{description:{t:0,b:{t:2,i:[{t:3}],s:"ollama.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Ollama"}}},openai:{description:{t:0,b:{t:2,i:[{t:3}],s:"OpenAi.com"}},title:{t:0,b:{t:2,i:[{t:3}],s:"OpenAI"}}},openrouter:{description:{t:0,b:{t:2,i:[{t:3}],s:"OpenRouter.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"OpenRouter"}}},perplexity:{description:{t:0,b:{t:2,i:[{t:3}],s:"perplexity.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Perplexity"}}},together:{description:{t:0,b:{t:2,i:[{t:3}],s:"一起"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Together.ai"}}},vllm:{description:{t:0,b:{t:2,i:[{t:3}],s:"vllm.ai"}},title:{t:0,b:{t:2,i:[{t:3}],s:"vLLM"}}},volcengine:{description:{t:0,b:{t:2,i:[{t:3}],s:"volcengine.com"}},fields:{field:{appId:{description:{t:0,b:{t:2,i:[{t:3}],s:"可在控制台获取的 App ID"}},label:{t:0,b:{t:2,i:[{t:3}],s:"App ID"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"火山引擎"}}},xai:{description:{t:0,b:{t:2,i:[{t:3}],s:"X.AI"}},title:{t:0,b:{t:2,i:[{t:3}],s:"xAI"}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"提供商"}}},scene:{description:{t:0,b:{t:2,i:[{t:3}],s:"配置角色所在环境"}},title:{t:0,b:{t:2,i:[{t:3}],s:"场景"}}},themes:{description:{t:0,b:{t:2,i:[{t:3}],s:"自定义你的舞台外观!"}},sections:{section:{"custom-color":{fields:{field:{"primary-color":{label:{t:0,b:{t:2,i:[{t:3}],s:"强调色"}},"rgb-on":{title:{t:0,b:{t:2,i:[{t:3}],s:"RGB ON!"}}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"配色"}}},developer:{title:{t:0,b:{t:2,i:[{t:3}],s:"开发者"}}},"theme-presets":{presets:[{colors:[{t:0,b:{t:2,i:[{t:3}],s:"Airi 绿"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"默认的绿色主题,由 Airi 为您带来!"}},title:{t:0,b:{t:2,i:[{t:3}],s:"默认颜色"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"灰褐色"}},{t:0,b:{t:2,i:[{t:3}],s:"米色"}},{t:0,b:{t:2,i:[{t:3}],s:"灰白色"}},{t:0,b:{t:2,i:[{t:3}],s:"浅灰褐色"}},{t:0,b:{t:2,i:[{t:3}],s:"象牙色"}},{t:0,b:{t:2,i:[{t:3}],s:"橄榄灰"}},{t:0,b:{t:2,i:[{t:3}],s:"沙色"}},{t:0,b:{t:2,i:[{t:3}],s:"暖灰色"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"受乔治·莫兰迪绘画启发的柔和、低调的色调"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Morandi 颜色"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"天蓝色"}},{t:0,b:{t:2,i:[{t:3}],s:"薄雾色"}},{t:0,b:{t:2,i:[{t:3}],s:"沙色"}},{t:0,b:{t:2,i:[{t:3}],s:"苔藓绿"}},{t:0,b:{t:2,i:[{t:3}],s:"睡莲色"}},{t:0,b:{t:2,i:[{t:3}],s:"小麦色"}},{t:0,b:{t:2,i:[{t:3}],s:"板岩蓝"}},{t:0,b:{t:2,i:[{t:3}],s:"鼠尾草色"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"受克劳德·莫奈作品启发的印象派调色板"}},title:{t:0,b:{t:2,i:[{t:3}],s:"莫奈颜色"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"棕褐色"}},{t:0,b:{t:2,i:[{t:3}],s:"暖灰褐色"}},{t:0,b:{t:2,i:[{t:3}],s:"赭色"}},{t:0,b:{t:2,i:[{t:3}],s:"咖啡色"}},{t:0,b:{t:2,i:[{t:3}],s:"青铜色"}},{t:0,b:{t:2,i:[{t:3}],s:"金色"}},{t:0,b:{t:2,i:[{t:3}],s:"芥末色"}},{t:0,b:{t:2,i:[{t:3}],s:"琥珀色"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"传统日本色彩调色板"}},title:{t:0,b:{t:2,i:[{t:3}],s:"日本颜色"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"北欧蓝"}},{t:0,b:{t:2,i:[{t:3}],s:"冰色"}},{t:0,b:{t:2,i:[{t:3}],s:"峡湾色"}},{t:0,b:{t:2,i:[{t:3}],s:"钢铁色"}},{t:0,b:{t:2,i:[{t:3}],s:"冰川色"}},{t:0,b:{t:2,i:[{t:3}],s:"板岩色"}},{t:0,b:{t:2,i:[{t:3}],s:"云色"}},{t:0,b:{t:2,i:[{t:3}],s:"石头色"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"北欧极简主义配色方案"}},title:{t:0,b:{t:2,i:[{t:3}],s:"北欧颜色"}}},{colors:[{t:0,b:{t:2,i:[{t:3}],s:"霞光红"}},{t:0,b:{t:2,i:[{t:3}],s:"枣红"}},{t:0,b:{t:2,i:[{t:3}],s:"黄栌"}},{t:0,b:{t:2,i:[{t:3}],s:"竹青"}},{t:0,b:{t:2,i:[{t:3}],s:"乌梅紫"}},{t:0,b:{t:2,i:[{t:3}],s:"缃色"}},{t:0,b:{t:2,i:[{t:3}],s:"青冥"}},{t:0,b:{t:2,i:[{t:3}],s:"赭石"}}],description:{t:0,b:{t:2,i:[{t:3}],s:"中国传统色彩,源自古代纺织品、瓷器和绘画"}},title:{t:0,b:{t:2,i:[{t:3}],s:"中国传统颜色"}}}],title:{t:0,b:{t:2,i:[{t:3}],s:"预设"}}}}},title:{t:0,b:{t:2,i:[{t:3}],s:"外观"}}}},sections:{section:{general:{title:{t:0,b:{t:2,i:[{t:3}],s:"通用"}}}}},theme:{t:0,b:{t:2,i:[{t:3}],s:"主题"}},title:{t:0,b:{t:2,i:[{t:3}],s:"设置"}},voices:{t:0,b:{t:2,i:[{t:3}],s:"声线"}}},stage:{chat:{message:{"character-name":{airi:{t:0,b:{t:2,i:[{t:3}],s:"Airi"}},"core-system":{t:0,b:{t:2,i:[{t:3}],s:"核心系统"}},you:{t:0,b:{t:2,i:[{t:3}],s:"你"}}}},tabs:{chat:{t:0,b:{t:2,i:[{t:3}],s:"聊天"}},clothes:{t:0,b:{t:2,i:[{t:3}],s:"换装"}},custom:{t:0,b:{t:2,i:[{t:3}],s:"自定义"}}}},message:{t:0,b:{t:2,i:[{t:3}],s:"消息"}},"select-a-audio-input":{t:0,b:{t:2,i:[{t:3}],s:"选择一个音频输入设备"}},"select-a-model":{t:0,b:{t:2,i:[{t:3}],s:"选择一个模型"}},"select-a-voice":{t:0,b:{t:2,i:[{t:3}],s:"选择一个声线"}},viewers:{"debug-menu":{emotions:{t:0,b:{t:2,i:[{t:3}],s:"表情"}},"emotions-btn":{angry:{t:0,b:{t:2,i:[{t:3}],s:"生气"}},awkward:{t:0,b:{t:2,i:[{t:3}],s:"尴尬"}},happy:{t:0,b:{t:2,i:[{t:3}],s:"开心"}},neutral:{t:0,b:{t:2,i:[{t:3}],s:"日常"}},question:{t:0,b:{t:2,i:[{t:3}],s:"疑问"}},sad:{t:0,b:{t:2,i:[{t:3}],s:"难过"}},surprised:{t:0,b:{t:2,i:[{t:3}],s:"惊喜"}},think:{t:0,b:{t:2,i:[{t:3}],s:"思考"}}},vrm:{camera:{t:0,b:{t:2,i:[{t:3}],s:"摄像机"}},model:{title:{t:0,b:{t:2,i:[{t:3}],s:"模型"}}}}}},waiting:{t:0,b:{t:2,i:[{t:3}],s:"等待中"}}}}}),sG=$9({locale:rG(),fallbackLocale:"en",messages:eC});function rG(){const n=localStorage.getItem("settings/language"),e=Object.keys(eC);return n&&e.includes(n)?n:"en"}const oG=Hz(),aG=Kz(t6);let nu;nu=JV({routes:aG,history:CV()});nu.beforeEach((n,e)=>{n.path!==e.path&&Nw.start()});nu.afterEach(()=>{Nw.done()});nu.isReady().then(async()=>{}).catch(()=>{});VR(iG).use(Fz).use(a3).use(nu).use(oG).use(sG).use(wB).mount("#app");export{ap as $,vw as A,p5 as B,Ih as C,J4 as D,Z4 as E,q4 as F,X4 as G,$4 as H,W_ as I,mw as J,W4 as K,pw as L,G4 as M,dw as N,G_ as O,hw as P,FB as Q,Jw as R,ei as S,Gn as T,rs as U,e6 as V,Bv as W,ka as X,EC as Y,$G as Z,Ar as _,lr as a,l_ as a$,jz as a0,VG as a1,gG as a2,Si as a3,Yz as a4,kz as a5,OT as a6,kg as a7,yS as a8,Xa as a9,wl as aA,$0 as aB,nn as aC,yn as aD,oc as aE,ac as aF,gi as aG,c_ as aH,Pn as aI,Wn as aJ,__ as aK,Ii as aL,Xs as aM,_t as aN,ct as aO,gE as aP,jt as aQ,ls as aR,Sr as aS,yE as aT,bE as aU,ca as aV,Jt as aW,i_ as aX,Ud as aY,bd as aZ,yc as a_,_3 as aa,y3 as ab,v3 as ac,ti as ad,Eg as ae,Hs as af,NE as ag,fe as ah,Pe as ai,Eo as aj,Fn as ak,jE as al,KE as am,ZE as an,Je as ao,k as ap,_E as aq,Qn as ar,Pa as as,gt as at,GI as au,jI as av,Pt as aw,yd as ax,Qi as ay,aa as az,gn as b,kL as b$,lc as b0,Eh as b1,To as b2,$t as b3,vc as b4,_c as b5,qc as b6,pt as b7,Bs as b8,$c as b9,uE as bA,Kn as bB,li as bC,vt as bD,SL as bE,Ga as bF,N0 as bG,yG as bH,Lt as bI,CG as bJ,Lc as bK,qh as bL,E0 as bM,Uc as bN,Ro as bO,os as bP,za as bQ,ts as bR,Md as bS,zn as bT,vd as bU,ns as bV,OE as bW,pg as bX,ML as bY,C_ as bZ,Tf as b_,Cn as ba,bn as bb,HG as bc,ht as bd,OG as be,GG as bf,UG as bg,y2 as bh,DG as bi,VH as bj,Jl as bk,L0 as bl,dG as bm,DR as bn,l3 as bo,c3 as bp,vS as bq,RT as br,Oe as bs,PG as bt,as as bu,bL as bv,Va as bw,ur as bx,zi as by,Vn as bz,yi as c,hG as c$,pL as c0,TB as c1,No as c2,YV as c3,kG as c4,_G as c5,Zt as c6,v2 as c7,ZB as c8,OR as c9,_n as cA,ks as cB,vG as cC,_2 as cD,An as cE,yr as cF,Fi as cG,mG as cH,S0 as cI,US as cJ,bG as cK,MG as cL,P0 as cM,gr as cN,WG as cO,je as cP,XG as cQ,at as cR,bc as cS,Cr as cT,Ae as cU,U3 as cV,yL as cW,FL as cX,uG as cY,fG as cZ,AG as c_,KB as ca,BG as cb,ys as cc,oy as cd,NG as ce,xG as cf,SG as cg,K2 as ch,J2 as ci,IG as cj,wG as ck,NR as cl,EG as cm,FG as cn,zG as co,eA as cp,U_ as cq,LG as cr,a0 as cs,mS as ct,cG as cu,j2 as cv,pG as cw,Rn as cx,gf as cy,ai as cz,hn as d,TG as d0,Di as d1,pn as d2,RG as d3,nt as e,Ee as f,QB as g,Ot as h,Ph as i,Jc as j,zl as k,$g as l,hx as m,Zc as n,vn as o,ut as p,to as q,xi as r,cf as s,Yn as t,Ft as u,a5 as v,Ke as w,_w as x,YT as y,Vg as z}; diff --git a/assets/index-C7BBvJH7.js b/assets/index-B5issj2Y.js similarity index 85% rename from assets/index-C7BBvJH7.js rename to assets/index-B5issj2Y.js index adb408fc475563b041813b28016fed8194b77d90..5379a3b6843fed8826c16d67ecaa8971704a0812 100644 --- a/assets/index-C7BBvJH7.js +++ b/assets/index-B5issj2Y.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as h,$ as v,f as b,c5 as k,c as t,o as i,a as c,bk as d,bm as m,c6 as l,c7 as _,u as s}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{I as x}from"./IconStatusItem-B9Mlqc3P.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as I}from"./IconAnimation.vue_vue_type_script_setup_true_lang-Bo8-R3ZB.js";import{u as z}from"./useIconAnimation-B41IKS_9.js";import{b as g}from"./route-block-B_A1xBdJ.js";import"./floating-ui.core-CgBsuaUc.js";const B={grid:"~ cols-1 sm:cols-2 gap-4"},w={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":""},A=h({__name:"index",setup(C){const{t:e}=v(),p=b(()=>[{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:u,showIconAnimation:f,animationIcon:y}=z("i-solar:layers-bold-duotone");return(D,n)=>{const r=k("motion");return i(),t(l,null,[c("div",B,[(i(!0),t(l,null,_(p.value,(o,a)=>m((i(),d(s(x),{key:o.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+a*10,delay:a*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"])),[[r]])),128))]),s(f)?(i(),d(I,{key:0,icon:s(y),"icon-size":12,duration:1e3,started:s(u),"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",w,n[0]||(n[0]=[c("div",{text:"60","i-solar:layers-bold-duotone":""},null,-1)]))),[[r]])],64)}}});typeof g=="function"&&g(A);export{A as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import{d as h,$ as v,f as b,c5 as k,c as t,o as i,a as c,bk as d,bm as m,c6 as l,c7 as _,u as s}from"./index-8LjpXIG7.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{I as x}from"./IconStatusItem-BuPKAtbo.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{_ as I}from"./IconAnimation.vue_vue_type_script_setup_true_lang-CT2O6kWS.js";import{u as z}from"./useIconAnimation-DdsxO8m6.js";import{b as g}from"./route-block-B_A1xBdJ.js";import"./floating-ui.core-CgBsuaUc.js";const B={grid:"~ cols-1 sm:cols-2 gap-4"},w={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":""},A=h({__name:"index",setup(C){const{t:e}=v(),p=b(()=>[{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:u,showIconAnimation:f,animationIcon:y}=z("i-solar:layers-bold-duotone");return(D,n)=>{const r=k("motion");return i(),t(l,null,[c("div",B,[(i(!0),t(l,null,_(p.value,(o,a)=>m((i(),d(s(x),{key:o.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+a*10,delay:a*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"])),[[r]])),128))]),s(f)?(i(),d(I,{key:0,icon:s(y),"icon-size":12,duration:1e3,started:s(u),"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",w,n[0]||(n[0]=[c("div",{text:"60","i-solar:layers-bold-duotone":""},null,-1)]))),[[r]])],64)}}});typeof g=="function"&&g(A);export{A as default}; diff --git a/assets/index-BUHNZNXi.js b/assets/index-B9pSJh7u.js similarity index 77% rename from assets/index-BUHNZNXi.js rename to assets/index-B9pSJh7u.js index c9813c79604b575e13bc7219961155a6ddc88e8f..cfe1d2eea19b4e2336d1ae5792a62645fea6ab97 100644 --- a/assets/index-BUHNZNXi.js +++ b/assets/index-B9pSJh7u.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d,$ as m,f as u,c5 as g,c as s,o,a as n,bm as r,c6 as f,c7 as h,bk as _,a3 as v,u as y}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{I as b}from"./IconItem-CdLibJxT.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{b as l}from"./route-block-B_A1xBdJ.js";import"./floating-ui.core-CgBsuaUc.js";const x={flex:"~ col gap-4","font-thin":""},k={flex:"~ col gap-4"},B={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":""},I={text:"60","i-solar:settings-bold-duotone":""},z=d({__name:"index",setup(D){const{t:e}=m(),c=u(()=>[{title:e("settings.pages.themes.general.title"),description:e("settings.pages.themes.general.description"),icon:"i-solar:emoji-funny-square-bold-duotone",to:"/settings/appearance/general"},{title:e("settings.pages.themes.color-scheme.title"),description:e("settings.pages.themes.color-scheme.description"),icon:"i-solar:pallete-2-bold-duotone",to:"/settings/appearance/color-scheme"},{title:e("settings.pages.themes.developer.title"),description:e("settings.pages.themes.developer.description"),icon:"i-solar:code-bold-duotone",to:"/settings/appearance/developer"}]);return(j,a)=>{const i=g("motion");return o(),s("div",x,[a[0]||(a[0]=n("div",null,null,-1)),n("div",k,[(o(!0),s(f,null,h(c.value,(t,p)=>r((o(),_(y(b),{key:t.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:v({transitionDelay:`${p*50}ms`}),title:t.title,description:t.description,icon:t.icon,to:t.to},null,8,["style","title","description","icon","to"])),[[i]])),128))]),r((o(),s("div",B,[r(n("div",I,null,512),[[i]])])),[[i]])])}}});typeof l=="function"&&l(z);export{z as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import{d,$ as m,f as u,c5 as g,c as s,o,a as n,bm as r,c6 as f,c7 as h,bk as _,a3 as v,u as y}from"./index-8LjpXIG7.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{I as b}from"./IconItem-rhhSEiTz.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{b as l}from"./route-block-B_A1xBdJ.js";import"./floating-ui.core-CgBsuaUc.js";const x={flex:"~ col gap-4","font-thin":""},k={flex:"~ col gap-4"},B={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":""},I={text:"60","i-solar:settings-bold-duotone":""},z=d({__name:"index",setup(D){const{t:e}=m(),c=u(()=>[{title:e("settings.pages.themes.general.title"),description:e("settings.pages.themes.general.description"),icon:"i-solar:emoji-funny-square-bold-duotone",to:"/settings/appearance/general"},{title:e("settings.pages.themes.color-scheme.title"),description:e("settings.pages.themes.color-scheme.description"),icon:"i-solar:pallete-2-bold-duotone",to:"/settings/appearance/color-scheme"},{title:e("settings.pages.themes.developer.title"),description:e("settings.pages.themes.developer.description"),icon:"i-solar:code-bold-duotone",to:"/settings/appearance/developer"}]);return(j,a)=>{const i=g("motion");return o(),s("div",x,[a[0]||(a[0]=n("div",null,null,-1)),n("div",k,[(o(!0),s(f,null,h(c.value,(t,p)=>r((o(),_(y(b),{key:t.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:v({transitionDelay:`${p*50}ms`}),title:t.title,description:t.description,icon:t.icon,to:t.to},null,8,["style","title","description","icon","to"])),[[i]])),128))]),r((o(),s("div",B,[r(n("div",I,null,512),[[i]])])),[[i]])])}}});typeof l=="function"&&l(z);export{z as default}; diff --git a/assets/index-CDTTBfwQ.js b/assets/index-BsHyA__F.js similarity index 99% rename from assets/index-CDTTBfwQ.js rename to assets/index-BsHyA__F.js index 392e01506e115c1596352c3ed1867d9a26d58171..8d8464d7be91508e1f7181831eeba6d85d3e2433 100644 --- a/assets/index-CDTTBfwQ.js +++ b/assets/index-BsHyA__F.js @@ -1,4 +1,4 @@ -import{Z as s,b as x}from"./mcp-CVsSz3w1.js";import"./index-WDP_Z4A8.js";const M=Symbol("Let zodToJsonSchema decide on which parser to use"),P={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},D=t=>typeof t=="string"?{...P,name:t}:{...P,...t},T=t=>{const e=D(t),a=e.name!==void 0?[...e.basePath,e.definitionPath,e.name]:e.basePath;return{...e,currentPath:a,propertyPath:void 0,seen:new Map(Object.entries(e.definitions).map(([n,r])=>[r._def,{def:r._def,path:[...e.basePath,e.definitionPath,n],jsonSchema:void 0}]))}};function _(t,e,a,n){n!=null&&n.errorMessages&&a&&(t.errorMessage={...t.errorMessage,[e]:a})}function l(t,e,a,n,r){t[e]=a,_(t,e,n,r)}function N(){return{}}function $(t,e){var n,r,i;const a={type:"array"};return(n=t.type)!=null&&n._def&&((i=(r=t.type)==null?void 0:r._def)==null?void 0:i.typeName)!==s.ZodAny&&(a.items=c(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&l(a,"minItems",t.minLength.value,t.minLength.message,e),t.maxLength&&l(a,"maxItems",t.maxLength.value,t.maxLength.message,e),t.exactLength&&(l(a,"minItems",t.exactLength.value,t.exactLength.message,e),l(a,"maxItems",t.exactLength.value,t.exactLength.message,e)),a}function w(t,e){const a={type:"integer",format:"int64"};if(!t.checks)return a;for(const n of t.checks)switch(n.kind){case"min":e.target==="jsonSchema7"?n.inclusive?l(a,"minimum",n.value,n.message,e):l(a,"exclusiveMinimum",n.value,n.message,e):(n.inclusive||(a.exclusiveMinimum=!0),l(a,"minimum",n.value,n.message,e));break;case"max":e.target==="jsonSchema7"?n.inclusive?l(a,"maximum",n.value,n.message,e):l(a,"exclusiveMaximum",n.value,n.message,e):(n.inclusive||(a.exclusiveMaximum=!0),l(a,"maximum",n.value,n.message,e));break;case"multipleOf":l(a,"multipleOf",n.value,n.message,e);break}return a}function z(){return{type:"boolean"}}function Z(t,e){return c(t.type._def,e)}const L=(t,e)=>c(t.innerType._def,e);function S(t,e,a){const n=a??e.dateStrategy;if(Array.isArray(n))return{anyOf:n.map((r,i)=>S(t,e,r))};switch(n){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return F(t,e)}}const F=(t,e)=>{const a={type:"integer",format:"unix-time"};if(e.target==="openApi3")return a;for(const n of t.checks)switch(n.kind){case"min":l(a,"minimum",n.value,n.message,e);break;case"max":l(a,"maximum",n.value,n.message,e);break}return a};function I(t,e){return{...c(t.innerType._def,e),default:t.defaultValue()}}function E(t,e){return e.effectStrategy==="input"?c(t.schema._def,e):{}}function R(t){return{type:"string",enum:Array.from(t.values)}}const C=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function U(t,e){const a=[c(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),c(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(i=>!!i);let n=e.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0;const r=[];return a.forEach(i=>{if(C(i))r.push(...i.allOf),i.unevaluatedProperties===void 0&&(n=void 0);else{let o=i;if("additionalProperties"in i&&i.additionalProperties===!1){const{additionalProperties:m,...p}=i;o=p}else n=void 0;r.push(o)}}),r.length?{allOf:r,...n}:void 0}function B(t,e){const a=typeof t.value;return a!=="bigint"&&a!=="number"&&a!=="boolean"&&a!=="string"?{type:Array.isArray(t.value)?"array":"object"}:e.target==="openApi3"?{type:a==="bigint"?"integer":a,enum:[t.value]}:{type:a==="bigint"?"integer":a,const:t.value}}let b;const f={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(b===void 0&&(b=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),b),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function O(t,e){const a={type:"string"};if(t.checks)for(const n of t.checks)switch(n.kind){case"min":l(a,"minLength",typeof a.minLength=="number"?Math.max(a.minLength,n.value):n.value,n.message,e);break;case"max":l(a,"maxLength",typeof a.maxLength=="number"?Math.min(a.maxLength,n.value):n.value,n.message,e);break;case"email":switch(e.emailStrategy){case"format:email":y(a,"email",n.message,e);break;case"format:idn-email":y(a,"idn-email",n.message,e);break;case"pattern:zod":d(a,f.email,n.message,e);break}break;case"url":y(a,"uri",n.message,e);break;case"uuid":y(a,"uuid",n.message,e);break;case"regex":d(a,n.regex,n.message,e);break;case"cuid":d(a,f.cuid,n.message,e);break;case"cuid2":d(a,f.cuid2,n.message,e);break;case"startsWith":d(a,RegExp(`^${v(n.value,e)}`),n.message,e);break;case"endsWith":d(a,RegExp(`${v(n.value,e)}$`),n.message,e);break;case"datetime":y(a,"date-time",n.message,e);break;case"date":y(a,"date",n.message,e);break;case"time":y(a,"time",n.message,e);break;case"duration":y(a,"duration",n.message,e);break;case"length":l(a,"minLength",typeof a.minLength=="number"?Math.max(a.minLength,n.value):n.value,n.message,e),l(a,"maxLength",typeof a.maxLength=="number"?Math.min(a.maxLength,n.value):n.value,n.message,e);break;case"includes":{d(a,RegExp(v(n.value,e)),n.message,e);break}case"ip":{n.version!=="v6"&&y(a,"ipv4",n.message,e),n.version!=="v4"&&y(a,"ipv6",n.message,e);break}case"base64url":d(a,f.base64url,n.message,e);break;case"jwt":d(a,f.jwt,n.message,e);break;case"cidr":{n.version!=="v6"&&d(a,f.ipv4Cidr,n.message,e),n.version!=="v4"&&d(a,f.ipv6Cidr,n.message,e);break}case"emoji":d(a,f.emoji(),n.message,e);break;case"ulid":{d(a,f.ulid,n.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{y(a,"binary",n.message,e);break}case"contentEncoding:base64":{l(a,"contentEncoding","base64",n.message,e);break}case"pattern:zod":{d(a,f.base64,n.message,e);break}}break}case"nanoid":d(a,f.nanoid,n.message,e)}return a}function v(t,e){return e.patternStrategy==="escape"?q(t):t}const V=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function q(t){let e="";for(let a=0;ai.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format,...t.errorMessage&&n.errorMessages&&{errorMessage:{format:t.errorMessage.format}}}),delete t.format,t.errorMessage&&(delete t.errorMessage.format,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.anyOf.push({format:e,...a&&n.errorMessages&&{errorMessage:{format:a}}})):l(t,"format",e,a,n)}function d(t,e,a,n){var r;t.pattern||(r=t.allOf)!=null&&r.some(i=>i.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern,...t.errorMessage&&n.errorMessages&&{errorMessage:{pattern:t.errorMessage.pattern}}}),delete t.pattern,t.errorMessage&&(delete t.errorMessage.pattern,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.allOf.push({pattern:k(e,n),...a&&n.errorMessages&&{errorMessage:{pattern:a}}})):l(t,"pattern",k(e,n),a,n)}function k(t,e){var p;if(!e.applyRegexFlags||!t.flags)return t.source;const a={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},n=a.i?t.source.toLowerCase():t.source;let r="",i=!1,o=!1,m=!1;for(let u=0;utypeof t=="string"?{...P,name:t}:{...P,...t},T=t=>{const e=D(t),a=e.name!==void 0?[...e.basePath,e.definitionPath,e.name]:e.basePath;return{...e,currentPath:a,propertyPath:void 0,seen:new Map(Object.entries(e.definitions).map(([n,r])=>[r._def,{def:r._def,path:[...e.basePath,e.definitionPath,n],jsonSchema:void 0}]))}};function _(t,e,a,n){n!=null&&n.errorMessages&&a&&(t.errorMessage={...t.errorMessage,[e]:a})}function l(t,e,a,n,r){t[e]=a,_(t,e,n,r)}function N(){return{}}function $(t,e){var n,r,i;const a={type:"array"};return(n=t.type)!=null&&n._def&&((i=(r=t.type)==null?void 0:r._def)==null?void 0:i.typeName)!==s.ZodAny&&(a.items=c(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&l(a,"minItems",t.minLength.value,t.minLength.message,e),t.maxLength&&l(a,"maxItems",t.maxLength.value,t.maxLength.message,e),t.exactLength&&(l(a,"minItems",t.exactLength.value,t.exactLength.message,e),l(a,"maxItems",t.exactLength.value,t.exactLength.message,e)),a}function w(t,e){const a={type:"integer",format:"int64"};if(!t.checks)return a;for(const n of t.checks)switch(n.kind){case"min":e.target==="jsonSchema7"?n.inclusive?l(a,"minimum",n.value,n.message,e):l(a,"exclusiveMinimum",n.value,n.message,e):(n.inclusive||(a.exclusiveMinimum=!0),l(a,"minimum",n.value,n.message,e));break;case"max":e.target==="jsonSchema7"?n.inclusive?l(a,"maximum",n.value,n.message,e):l(a,"exclusiveMaximum",n.value,n.message,e):(n.inclusive||(a.exclusiveMaximum=!0),l(a,"maximum",n.value,n.message,e));break;case"multipleOf":l(a,"multipleOf",n.value,n.message,e);break}return a}function z(){return{type:"boolean"}}function Z(t,e){return c(t.type._def,e)}const L=(t,e)=>c(t.innerType._def,e);function S(t,e,a){const n=a??e.dateStrategy;if(Array.isArray(n))return{anyOf:n.map((r,i)=>S(t,e,r))};switch(n){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return F(t,e)}}const F=(t,e)=>{const a={type:"integer",format:"unix-time"};if(e.target==="openApi3")return a;for(const n of t.checks)switch(n.kind){case"min":l(a,"minimum",n.value,n.message,e);break;case"max":l(a,"maximum",n.value,n.message,e);break}return a};function I(t,e){return{...c(t.innerType._def,e),default:t.defaultValue()}}function E(t,e){return e.effectStrategy==="input"?c(t.schema._def,e):{}}function R(t){return{type:"string",enum:Array.from(t.values)}}const C=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function U(t,e){const a=[c(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),c(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(i=>!!i);let n=e.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0;const r=[];return a.forEach(i=>{if(C(i))r.push(...i.allOf),i.unevaluatedProperties===void 0&&(n=void 0);else{let o=i;if("additionalProperties"in i&&i.additionalProperties===!1){const{additionalProperties:m,...p}=i;o=p}else n=void 0;r.push(o)}}),r.length?{allOf:r,...n}:void 0}function B(t,e){const a=typeof t.value;return a!=="bigint"&&a!=="number"&&a!=="boolean"&&a!=="string"?{type:Array.isArray(t.value)?"array":"object"}:e.target==="openApi3"?{type:a==="bigint"?"integer":a,enum:[t.value]}:{type:a==="bigint"?"integer":a,const:t.value}}let b;const f={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(b===void 0&&(b=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),b),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function O(t,e){const a={type:"string"};if(t.checks)for(const n of t.checks)switch(n.kind){case"min":l(a,"minLength",typeof a.minLength=="number"?Math.max(a.minLength,n.value):n.value,n.message,e);break;case"max":l(a,"maxLength",typeof a.maxLength=="number"?Math.min(a.maxLength,n.value):n.value,n.message,e);break;case"email":switch(e.emailStrategy){case"format:email":y(a,"email",n.message,e);break;case"format:idn-email":y(a,"idn-email",n.message,e);break;case"pattern:zod":d(a,f.email,n.message,e);break}break;case"url":y(a,"uri",n.message,e);break;case"uuid":y(a,"uuid",n.message,e);break;case"regex":d(a,n.regex,n.message,e);break;case"cuid":d(a,f.cuid,n.message,e);break;case"cuid2":d(a,f.cuid2,n.message,e);break;case"startsWith":d(a,RegExp(`^${v(n.value,e)}`),n.message,e);break;case"endsWith":d(a,RegExp(`${v(n.value,e)}$`),n.message,e);break;case"datetime":y(a,"date-time",n.message,e);break;case"date":y(a,"date",n.message,e);break;case"time":y(a,"time",n.message,e);break;case"duration":y(a,"duration",n.message,e);break;case"length":l(a,"minLength",typeof a.minLength=="number"?Math.max(a.minLength,n.value):n.value,n.message,e),l(a,"maxLength",typeof a.maxLength=="number"?Math.min(a.maxLength,n.value):n.value,n.message,e);break;case"includes":{d(a,RegExp(v(n.value,e)),n.message,e);break}case"ip":{n.version!=="v6"&&y(a,"ipv4",n.message,e),n.version!=="v4"&&y(a,"ipv6",n.message,e);break}case"base64url":d(a,f.base64url,n.message,e);break;case"jwt":d(a,f.jwt,n.message,e);break;case"cidr":{n.version!=="v6"&&d(a,f.ipv4Cidr,n.message,e),n.version!=="v4"&&d(a,f.ipv6Cidr,n.message,e);break}case"emoji":d(a,f.emoji(),n.message,e);break;case"ulid":{d(a,f.ulid,n.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{y(a,"binary",n.message,e);break}case"contentEncoding:base64":{l(a,"contentEncoding","base64",n.message,e);break}case"pattern:zod":{d(a,f.base64,n.message,e);break}}break}case"nanoid":d(a,f.nanoid,n.message,e)}return a}function v(t,e){return e.patternStrategy==="escape"?q(t):t}const V=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function q(t){let e="";for(let a=0;ai.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format,...t.errorMessage&&n.errorMessages&&{errorMessage:{format:t.errorMessage.format}}}),delete t.format,t.errorMessage&&(delete t.errorMessage.format,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.anyOf.push({format:e,...a&&n.errorMessages&&{errorMessage:{format:a}}})):l(t,"format",e,a,n)}function d(t,e,a,n){var r;t.pattern||(r=t.allOf)!=null&&r.some(i=>i.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern,...t.errorMessage&&n.errorMessages&&{errorMessage:{pattern:t.errorMessage.pattern}}}),delete t.pattern,t.errorMessage&&(delete t.errorMessage.pattern,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.allOf.push({pattern:k(e,n),...a&&n.errorMessages&&{errorMessage:{pattern:a}}})):l(t,"pattern",k(e,n),a,n)}function k(t,e){var p;if(!e.applyRegexFlags||!t.flags)return t.source;const a={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},n=a.i?t.source.toLowerCase():t.source;let r="",i=!1,o=!1,m=!1;for(let u=0;u"u"?!1:e instanceof ShadowRoot||e instanceof S(e).ShadowRoot}function ve(e){const{overflow:n,overflowX:t,overflowY:o,display:r}=k(e);return/auto|scroll|overlay|hidden|clip/.test(n+o+t)&&!["inline","contents"].includes(r)}function En(e){return["table","td","th"].includes(re(e))}function $e(e){return[":popover-open",":modal"].some(n=>{try{return e.matches(n)}catch{return!1}})}function qe(e){const n=Ge(),t=I(e)?k(e):e;return["transform","translate","scale","rotate","perspective"].some(o=>t[o]?t[o]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!n&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!n&&(t.filter?t.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(o=>(t.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(t.contain||"").includes(o))}function _n(e){let n=q(e);for(;K(n)&&!ce(n);){if(qe(n))return n;if($e(n))return null;n=q(n)}return null}function Ge(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ce(e){return["html","body","#document"].includes(re(e))}function k(e){return S(e).getComputedStyle(e)}function Re(e){return I(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function q(e){if(re(e)==="html")return e;const n=e.assignedSlot||e.parentNode||it(e)&&e.host||V(e);return it(n)?n.host:n}function Bt(e){const n=q(e);return ce(n)?e.ownerDocument?e.ownerDocument.body:e.body:K(n)&&ve(n)?n:Bt(n)}function pe(e,n,t){var o;n===void 0&&(n=[]),t===void 0&&(t=!0);const r=Bt(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),l=S(r);if(i){const a=He(l);return n.concat(l,l.visualViewport||[],ve(r)?r:[],a&&t?pe(a):[])}return n.concat(r,pe(r,[],t))}function He(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function At(e){const n=k(e);let t=parseFloat(n.width)||0,o=parseFloat(n.height)||0;const r=K(e),i=r?e.offsetWidth:t,l=r?e.offsetHeight:o,a=Ae(t)!==i||Ae(o)!==l;return a&&(t=i,o=l),{width:t,height:o,$:a}}function Je(e){return I(e)?e:e.contextElement}function de(e){const n=Je(e);if(!K(n))return j(1);const t=n.getBoundingClientRect(),{width:o,height:r,$:i}=At(n);let l=(i?Ae(t.width):t.width)/o,a=(i?Ae(t.height):t.height)/r;return(!l||!Number.isFinite(l))&&(l=1),(!a||!Number.isFinite(a))&&(a=1),{x:l,y:a}}const Dn=j(0);function Tt(e){const n=S(e);return!Ge()||!n.visualViewport?Dn:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function Bn(e,n,t){return n===void 0&&(n=!1),!t||n&&t!==S(e)?!1:n}function te(e,n,t,o){n===void 0&&(n=!1),t===void 0&&(t=!1);const r=e.getBoundingClientRect(),i=Je(e);let l=j(1);n&&(o?I(o)&&(l=de(o)):l=de(e));const a=Bn(i,t,o)?Tt(i):j(0);let c=(r.left+a.x)/l.x,d=(r.top+a.y)/l.y,s=r.width/l.x,u=r.height/l.y;if(i){const p=S(i),v=o&&I(o)?S(o):o;let h=p,g=He(h);for(;g&&o&&v!==h;){const m=de(g),y=g.getBoundingClientRect(),B=k(g),b=y.left+(g.clientLeft+parseFloat(B.paddingLeft))*m.x,$=y.top+(g.clientTop+parseFloat(B.paddingTop))*m.y;c*=m.x,d*=m.y,s*=m.x,u*=m.y,c+=b,d+=$,h=S(g),g=He(h)}}return Dt({width:s,height:u,x:c,y:d})}function Qe(e,n){const t=Re(e).scrollLeft;return n?n.left+t:te(V(e)).left+t}function Pt(e,n,t){t===void 0&&(t=!1);const o=e.getBoundingClientRect(),r=o.left+n.scrollLeft-(t?0:Qe(e,o)),i=o.top+n.scrollTop;return{x:r,y:i}}function An(e){let{elements:n,rect:t,offsetParent:o,strategy:r}=e;const i=r==="fixed",l=V(o),a=n?$e(n.floating):!1;if(o===l||a&&i)return t;let c={scrollLeft:0,scrollTop:0},d=j(1);const s=j(0),u=K(o);if((u||!u&&!i)&&((re(o)!=="body"||ve(l))&&(c=Re(o)),K(o))){const v=te(o);d=de(o),s.x=v.x+o.clientLeft,s.y=v.y+o.clientTop}const p=l&&!u&&!i?Pt(l,c,!0):j(0);return{width:t.width*d.x,height:t.height*d.y,x:t.x*d.x-c.scrollLeft*d.x+s.x+p.x,y:t.y*d.y-c.scrollTop*d.y+s.y+p.y}}function Tn(e){return Array.from(e.getClientRects())}function Pn(e){const n=V(e),t=Re(e),o=e.ownerDocument.body,r=ue(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth),i=ue(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let l=-t.scrollLeft+Qe(e);const a=-t.scrollTop;return k(o).direction==="rtl"&&(l+=ue(n.clientWidth,o.clientWidth)-r),{width:r,height:i,x:l,y:a}}function $n(e,n){const t=S(e),o=V(e),r=t.visualViewport;let i=o.clientWidth,l=o.clientHeight,a=0,c=0;if(r){i=r.width,l=r.height;const d=Ge();(!d||d&&n==="fixed")&&(a=r.offsetLeft,c=r.offsetTop)}return{width:i,height:l,x:a,y:c}}function Rn(e,n){const t=te(e,!0,n==="fixed"),o=t.top+e.clientTop,r=t.left+e.clientLeft,i=K(e)?de(e):j(1),l=e.clientWidth*i.x,a=e.clientHeight*i.y,c=r*i.x,d=o*i.y;return{width:l,height:a,x:c,y:d}}function at(e,n,t){let o;if(n==="viewport")o=$n(e,t);else if(n==="document")o=Pn(V(e));else if(I(n))o=Rn(n,t);else{const r=Tt(e);o={x:n.x-r.x,y:n.y-r.y,width:n.width,height:n.height}}return Dt(o)}function $t(e,n){const t=q(e);return t===n||!I(t)||ce(t)?!1:k(t).position==="fixed"||$t(t,n)}function Nn(e,n){const t=n.get(e);if(t)return t;let o=pe(e,[],!1).filter(a=>I(a)&&re(a)!=="body"),r=null;const i=k(e).position==="fixed";let l=i?q(e):e;for(;I(l)&&!ce(l);){const a=k(l),c=qe(l);!c&&a.position==="fixed"&&(r=null),(i?!c&&!r:!c&&a.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||ve(l)&&!c&&$t(e,l))?o=o.filter(s=>s!==l):r=a,l=q(l)}return n.set(e,o),o}function Sn(e){let{element:n,boundary:t,rootBoundary:o,strategy:r}=e;const l=[...t==="clippingAncestors"?$e(n)?[]:Nn(n,this._c):[].concat(t),o],a=l[0],c=l.reduce((d,s)=>{const u=at(n,s,r);return d.top=ue(u.top,d.top),d.right=We(u.right,d.right),d.bottom=We(u.bottom,d.bottom),d.left=ue(u.left,d.left),d},at(n,a,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Fn(e){const{width:n,height:t}=At(e);return{width:n,height:t}}function Ln(e,n,t){const o=K(n),r=V(n),i=t==="fixed",l=te(e,!0,i,n);let a={scrollLeft:0,scrollTop:0};const c=j(0);if(o||!o&&!i)if((re(n)!=="body"||ve(r))&&(a=Re(n)),o){const p=te(n,!0,i,n);c.x=p.x+n.clientLeft,c.y=p.y+n.clientTop}else r&&(c.x=Qe(r));const d=r&&!o&&!i?Pt(r,a):j(0),s=l.left+a.scrollLeft-c.x-d.x,u=l.top+a.scrollTop-c.y-d.y;return{x:s,y:u,width:l.width,height:l.height}}function Se(e){return k(e).position==="static"}function st(e,n){if(!K(e)||k(e).position==="fixed")return null;if(n)return n(e);let t=e.offsetParent;return V(e)===t&&(t=t.ownerDocument.body),t}function Rt(e,n){const t=S(e);if($e(e))return t;if(!K(e)){let r=q(e);for(;r&&!ce(r);){if(I(r)&&!Se(r))return r;r=q(r)}return t}let o=st(e,n);for(;o&&En(o)&&Se(o);)o=st(o,n);return o&&ce(o)&&Se(o)&&!qe(o)?t:o||_n(e)||t}const Mn=async function(e){const n=this.getOffsetParent||Rt,t=this.getDimensions,o=await t(e.floating);return{reference:Ln(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function In(e){return k(e).direction==="rtl"}const kn={convertOffsetParentRelativeRectToViewportRelativeRect:An,getDocumentElement:V,getClippingRect:Sn,getOffsetParent:Rt,getElementRects:Mn,getClientRects:Tn,getDimensions:Fn,getScale:de,isElement:I,isRTL:In};function Nt(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function Wn(e,n){let t=null,o;const r=V(e);function i(){var a;clearTimeout(o),(a=t)==null||a.disconnect(),t=null}function l(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const d=e.getBoundingClientRect(),{left:s,top:u,width:p,height:v}=d;if(a||n(),!p||!v)return;const h=Oe(u),g=Oe(r.clientWidth-(s+p)),m=Oe(r.clientHeight-(u+v)),y=Oe(s),b={rootMargin:-h+"px "+-g+"px "+-m+"px "+-y+"px",threshold:ue(0,We(1,c))||1};let $=!0;function R(L){const T=L[0].intersectionRatio;if(T!==c){if(!$)return l();T?l(!1,T):o=setTimeout(()=>{l(!1,1e-7)},1e3)}T===1&&!Nt(d,e.getBoundingClientRect())&&l(),$=!1}try{t=new IntersectionObserver(R,{...b,root:r.ownerDocument})}catch{t=new IntersectionObserver(R,b)}t.observe(e)}return l(!0),i}function Hn(e,n,t,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,d=Je(e),s=r||i?[...d?pe(d):[],...pe(n)]:[];s.forEach(y=>{r&&y.addEventListener("scroll",t,{passive:!0}),i&&y.addEventListener("resize",t)});const u=d&&a?Wn(d,t):null;let p=-1,v=null;l&&(v=new ResizeObserver(y=>{let[B]=y;B&&B.target===d&&v&&(v.unobserve(n),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=v)==null||b.observe(n)})),t()}),d&&!c&&v.observe(d),v.observe(n));let h,g=c?te(e):null;c&&m();function m(){const y=te(e);g&&!Nt(g,y)&&t(),g=y,h=requestAnimationFrame(m)}return t(),()=>{var y;s.forEach(B=>{r&&B.removeEventListener("scroll",t),i&&B.removeEventListener("resize",t)}),u==null||u(),(y=v)==null||y.disconnect(),v=null,c&&cancelAnimationFrame(h)}}const jn=mn,Kn=gn,ut=yn,Vn=wn,zn=bn,Un=On,Yn=xn,Xn=(e,n,t)=>{const o=new Map,r={platform:kn,...t},i={...r.platform,_c:o};return Cn(e,n,{...r,platform:i})};function qn(e){return e!=null&&typeof e=="object"&&"$el"in e}function je(e){if(qn(e)){const n=e.$el;return Xe(n)&&re(n)==="#comment"?null:n}return e}function se(e){return typeof e=="function"?e():f(e)}function Gn(e){return{name:"arrow",options:e,fn(n){const t=je(se(e.element));return t==null?{}:Un({element:t,padding:e.padding}).fn(n)}}}function St(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function dt(e,n){const t=St(e);return Math.round(n*t)/t}function Jn(e,n,t){t===void 0&&(t={});const o=t.whileElementsMounted,r=w(()=>{var T;return(T=se(t.open))!=null?T:!0}),i=w(()=>se(t.middleware)),l=w(()=>{var T;return(T=se(t.placement))!=null?T:"bottom"}),a=w(()=>{var T;return(T=se(t.strategy))!=null?T:"absolute"}),c=w(()=>{var T;return(T=se(t.transform))!=null?T:!0}),d=w(()=>je(e.value)),s=w(()=>je(n.value)),u=C(0),p=C(0),v=C(a.value),h=C(l.value),g=ht({}),m=C(!1),y=w(()=>{const T={position:v.value,left:"0",top:"0"};if(!s.value)return T;const H=dt(s.value,u.value),ge=dt(s.value,p.value);return c.value?{...T,transform:"translate("+H+"px, "+ge+"px)",...St(s.value)>=1.5&&{willChange:"transform"}}:{position:v.value,left:H+"px",top:ge+"px"}});let B;function b(){if(d.value==null||s.value==null)return;const T=r.value;Xn(d.value,s.value,{middleware:i.value,placement:l.value,strategy:a.value}).then(H=>{u.value=H.x,p.value=H.y,v.value=H.strategy,h.value=H.placement,g.value=H.middlewareData,m.value=T!==!1})}function $(){typeof B=="function"&&(B(),B=void 0)}function R(){if($(),o===void 0){b();return}if(d.value!=null&&s.value!=null){B=o(d.value,s.value,b);return}}function L(){r.value||(m.value=!1)}return F([i,l,a,r],b,{flush:"sync"}),F([d,s],R,{flush:"sync"}),F(r,L,{flush:"sync"}),mt()&&yt($),{x:ie(u),y:ie(p),strategy:ie(v),placement:ie(h),middlewareData:ie(g),isPositioned:ie(m),floatingStyles:y,update:b}}function le(e,n){const t=typeof e=="string"&&!n?`${e}Context`:n,o=Symbol(t);return[r=>{const i=en(o,r);if(i||i===null)return i;throw new Error(`Injection \`${o.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`)},r=>(hn(o,r),r)]}function Ft(e,n,t){const o=t.originalEvent.target,r=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:t});n&&o.addEventListener(e,n,{once:!0}),o.dispatchEvent(r)}function Qn(e,n){var t;const o=ht();return M(()=>{o.value=e()},{...n,flush:(t=void 0)!=null?t:"sync"}),Ct(o)}function he(e){return mt()?(yt(e),!0):!1}function Zn(){const e=new Set,n=t=>{e.delete(t)};return{on:t=>{e.add(t);const o=()=>n(t);return he(o),{off:o}},off:n,trigger:(...t)=>Promise.all(Array.from(e).map(o=>o(...t)))}}function eo(e){let n=!1,t;const o=Et(!0);return(...r)=>(n||(t=o.run(()=>e(...r)),n=!0),t)}function to(e){let n=0,t,o;const r=()=>{n-=1,o&&n<=0&&(o.stop(),t=void 0,o=void 0)};return(...i)=>(n+=1,t||(o=Et(!0),t=o.run(()=>e(...i))),he(r),t)}function Z(e){return typeof e=="function"?e():f(e)}const Q=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const no=e=>typeof e<"u",oo=Object.prototype.toString,ro=e=>oo.call(e)==="[object Object]",lo=()=>{},ct=io();function io(){var e,n;return Q&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((n=window==null?void 0:window.navigator)==null?void 0:n.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function ao(e){return oe()}function so(e,n=1e4){return vn((t,o)=>{let r=Z(e),i;const l=()=>setTimeout(()=>{r=Z(e),o()},Z(n));return he(()=>{clearTimeout(i)}),{get(){return t(),r},set(a){r=a,o(),clearTimeout(i),i=l()}}})}function uo(e,n){ao()&&dn(e,n)}function Lt(e,n,t={}){const{immediate:o=!0}=t,r=C(!1);let i=null;function l(){i&&(clearTimeout(i),i=null)}function a(){r.value=!1,l()}function c(...d){l(),r.value=!0,i=setTimeout(()=>{r.value=!1,i=null,e(...d)},Z(n))}return o&&(r.value=!0,Q&&c()),he(a),{isPending:Ct(r),start:c,stop:a}}function me(e){var n;const t=Z(e);return(n=t==null?void 0:t.$el)!=null?n:t}const Ze=Q?window:void 0;function Te(...e){let n,t,o,r;if(typeof e[0]=="string"||Array.isArray(e[0])?([t,o,r]=e,n=Ze):[n,t,o,r]=e,!n)return lo;Array.isArray(t)||(t=[t]),Array.isArray(o)||(o=[o]);const i=[],l=()=>{i.forEach(s=>s()),i.length=0},a=(s,u,p,v)=>(s.addEventListener(u,p,v),()=>s.removeEventListener(u,p,v)),c=F(()=>[me(n),Z(r)],([s,u])=>{if(l(),!s)return;const p=ro(u)?{...u}:u;i.push(...t.flatMap(v=>o.map(h=>a(s,v,h,p))))},{immediate:!0,flush:"post"}),d=()=>{c(),l()};return he(d),d}function co(e){return typeof e=="function"?e:typeof e=="string"?n=>n.key===e:Array.isArray(e)?n=>e.includes(n.key):()=>!0}function fo(...e){let n,t,o={};e.length===3?(n=e[0],t=e[1],o=e[2]):e.length===2?typeof e[1]=="object"?(n=!0,t=e[0],o=e[1]):(n=e[0],t=e[1]):(n=!0,t=e[0]);const{target:r=Ze,eventName:i="keydown",passive:l=!1,dedupe:a=!1}=o,c=co(n);return Te(r,i,d=>{d.repeat&&Z(a)||c(d)&&t(d)},l)}function po(){const e=C(!1),n=oe();return n&&fe(()=>{e.value=!0},n),e}function vo(e){return JSON.parse(JSON.stringify(e))}function Mt(e,n,t,o={}){var r,i,l;const{clone:a=!1,passive:c=!1,eventName:d,deep:s=!1,defaultValue:u,shouldEmit:p}=o,v=oe(),h=t||(v==null?void 0:v.emit)||((r=v==null?void 0:v.$emit)==null?void 0:r.bind(v))||((l=(i=v==null?void 0:v.proxy)==null?void 0:i.$emit)==null?void 0:l.bind(v==null?void 0:v.proxy));let g=d;g=g||`update:${n.toString()}`;const m=b=>a?typeof a=="function"?a(b):vo(b):b,y=()=>no(e[n])?m(e[n]):u,B=b=>{p?p(b)&&h(g,b):h(g,b)};if(c){const b=y(),$=C(b);let R=!1;return F(()=>e[n],L=>{R||(R=!0,$.value=m(L),ne(()=>R=!1))}),F($,L=>{!R&&(L!==e[n]||s)&&B(L)},{deep:s}),$}else return w({get(){return y()},set(b){B(b)}})}function et(e){return e?e.flatMap(n=>n.type===rn?et(n.children):[n]):[]}function X(){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 Fe(e){if(e===null||typeof e!="object")return!1;const n=Object.getPrototypeOf(e);return n!==null&&n!==Object.prototype&&Object.getPrototypeOf(n)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function Ke(e,n,t=".",o){if(!Fe(n))return Ke(e,{},t);const r=Object.assign({},n);for(const i in e){if(i==="__proto__"||i==="constructor")continue;const l=e[i];l!=null&&(Array.isArray(l)&&Array.isArray(r[i])?r[i]=[...l,...r[i]]:Fe(l)&&Fe(r[i])?r[i]=Ke(l,r[i],(t?`${t}.`:"")+i.toString()):r[i]=l)}return r}function ho(e){return(...n)=>n.reduce((t,o)=>Ke(t,o,""),{})}const mo=ho(),[It,Tr]=le("ConfigProvider");let yo="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",go=(e=21)=>{let n="",t=e;for(;t--;)n+=yo[Math.random()*64|0];return n};const wo=to(()=>{const e=C(new Map),n=C(),t=w(()=>{for(const l of e.value.values())if(l)return!0;return!1}),o=It({scrollBody:C(!0)});let r=null;const i=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.body.style.removeProperty("--scrollbar-width"),document.body.style.overflow=n.value??"",ct&&(r==null||r()),n.value=void 0};return F(t,(l,a)=>{var c;if(!Q)return;if(!l){a&&i();return}n.value===void 0&&(n.value=document.body.style.overflow);const d=window.innerWidth-document.documentElement.clientWidth,s={padding:d,margin:0},u=(c=o.scrollBody)!=null&&c.value?typeof o.scrollBody.value=="object"?mo({padding:o.scrollBody.value.padding===!0?d:o.scrollBody.value.padding,margin:o.scrollBody.value.margin===!0?d:o.scrollBody.value.margin},s):s:{padding:0,margin:0};d>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",`${d}px`),document.body.style.overflow="hidden"),ct&&(r=Te(document,"touchmove",p=>xo(p),{passive:!1})),ne(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),e});function bo(e){const n=go(6),t=wo();t.value.set(n,e);const o=w({get:()=>t.value.get(n)??!1,set:r=>t.value.set(n,r)});return uo(()=>{t.value.delete(n)}),o}function kt(e){const n=window.getComputedStyle(e);if(n.overflowX==="scroll"||n.overflowY==="scroll"||n.overflowX==="auto"&&e.clientWidth1?!0:(n.preventDefault&&n.cancelable&&n.preventDefault(),!1)}function ye(e){const n=oe(),t=n==null?void 0:n.type.emits,o={};return t!=null&&t.length||console.warn(`No emitted event found. Please check component: ${n==null?void 0:n.type.__name}`),t==null||t.forEach(r=>{o[Zt(wt(r))]=(...i)=>e(r,...i)}),o}function Wt(e){const n=oe(),t=Object.keys((n==null?void 0:n.type.props)??{}).reduce((r,i)=>{const l=(n==null?void 0:n.type.props[i]).default;return l!==void 0&&(r[i]=l),r},{}),o=on(e);return w(()=>{const r={},i=(n==null?void 0:n.vnode.props)??{};return Object.keys(i).forEach(l=>{r[wt(l)]=i[l]}),Object.keys({...t,...r}).reduce((l,a)=>(o.value[a]!==void 0&&(l[a]=o.value[a]),l),{})})}function Ht(e,n){const t=Wt(e),o=n?ye(n):{};return w(()=>({...t.value,...o}))}function A(){const e=oe(),n=C(),t=w(()=>{var l,a;return["#text","#comment"].includes((l=n.value)==null?void 0:l.$el.nodeName)?(a=n.value)==null?void 0:a.$el.nextElementSibling:me(n)}),o=Object.assign({},e.exposed),r={};for(const l in e.props)Object.defineProperty(r,l,{enumerable:!0,configurable:!0,get:()=>e.props[l]});if(Object.keys(o).length>0)for(const l in o)Object.defineProperty(r,l,{enumerable:!0,configurable:!0,get:()=>o[l]});Object.defineProperty(r,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=r;function i(l){n.value=l,l&&(Object.defineProperty(r,"$el",{enumerable:!0,configurable:!0,get:()=>l instanceof Element?l:l.$el}),e.exposed=r)}return{forwardRef:i,currentRef:n,currentElement:t}}function Co(e,n){const t=so(!1,300),o=C(null),r=Zn();function i(){o.value=null,t.value=!1}function l(a,c){const d=a.currentTarget,s={x:a.clientX,y:a.clientY},u=Oo(s,d.getBoundingClientRect()),p=Eo(s,u),v=_o(c.getBoundingClientRect()),h=Bo([...p,...v]);o.value=h,t.value=!0}return M(a=>{if(e.value&&n.value){const c=s=>l(s,n.value),d=s=>l(s,e.value);e.value.addEventListener("pointerleave",c),n.value.addEventListener("pointerleave",d),a(()=>{var s,u;(s=e.value)==null||s.removeEventListener("pointerleave",c),(u=n.value)==null||u.removeEventListener("pointerleave",d)})}}),M(a=>{var c;if(o.value){const d=s=>{var u,p;if(!o.value)return;const v=s.target,h={x:s.clientX,y:s.clientY},g=((u=e.value)==null?void 0:u.contains(v))||((p=n.value)==null?void 0:p.contains(v)),m=!Do(h,o.value),y=!!v.closest("[data-grace-area-trigger]");g?i():(m||y)&&(i(),r.trigger())};(c=e.value)==null||c.ownerDocument.addEventListener("pointermove",d),a(()=>{var s;return(s=e.value)==null?void 0:s.ownerDocument.removeEventListener("pointermove",d)})}}),{isPointerInTransit:t,onPointerExit:r.on}}function Oo(e,n){const t=Math.abs(n.top-e.y),o=Math.abs(n.bottom-e.y),r=Math.abs(n.right-e.x),i=Math.abs(n.left-e.x);switch(Math.min(t,o,r,i)){case i:return"left";case r:return"right";case t:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Eo(e,n,t=5){const o=[];switch(n){case"top":o.push({x:e.x-t,y:e.y+t},{x:e.x+t,y:e.y+t});break;case"bottom":o.push({x:e.x-t,y:e.y-t},{x:e.x+t,y:e.y-t});break;case"left":o.push({x:e.x+t,y:e.y-t},{x:e.x+t,y:e.y+t});break;case"right":o.push({x:e.x-t,y:e.y-t},{x:e.x-t,y:e.y+t});break}return o}function _o(e){const{top:n,right:t,bottom:o,left:r}=e;return[{x:r,y:n},{x:t,y:n},{x:t,y:o},{x:r,y:o}]}function Do(e,n){const{x:t,y:o}=e;let r=!1;for(let i=0,l=n.length-1;io!=s>o&&t<(d-a)*(o-c)/(s-c)+a&&(r=!r)}return r}function Bo(e){const n=e.slice();return n.sort((t,o)=>t.xo.x?1:t.yo.y?1:0),Ao(n)}function Ao(e){if(e.length<=1)return e.slice();const n=[];for(let o=0;o=2;){const i=n[n.length-1],l=n[n.length-2];if((i.x-l.x)*(r.y-l.y)>=(i.y-l.y)*(r.x-l.x))n.pop();else break}n.push(r)}n.pop();const t=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;t.length>=2;){const i=t[t.length-1],l=t[t.length-2];if((i.x-l.x)*(r.y-l.y)>=(i.y-l.y)*(r.x-l.x))t.pop();else break}t.push(r)}return t.pop(),n.length===1&&t.length===1&&n[0].x===t[0].x&&n[0].y===t[0].y?n:n.concat(t)}var To=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},ae=new WeakMap,Ee=new WeakMap,_e={},Le=0,jt=function(e){return e&&(e.host||jt(e.parentNode))},Po=function(e,n){return n.map(function(t){if(e.contains(t))return t;var o=jt(t);return o&&e.contains(o)?o:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(t){return!!t})},$o=function(e,n,t,o){var r=Po(n,Array.isArray(e)?e:[e]);_e[t]||(_e[t]=new WeakMap);var i=_e[t],l=[],a=new Set,c=new Set(r),d=function(u){!u||a.has(u)||(a.add(u),d(u.parentNode))};r.forEach(d);var s=function(u){!u||c.has(u)||Array.prototype.forEach.call(u.children,function(p){if(a.has(p))s(p);else try{var v=p.getAttribute(o),h=v!==null&&v!=="false",g=(ae.get(p)||0)+1,m=(i.get(p)||0)+1;ae.set(p,g),i.set(p,m),l.push(p),g===1&&h&&Ee.set(p,!0),m===1&&p.setAttribute(t,"true"),h||p.setAttribute(o,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return s(n),a.clear(),Le++,function(){l.forEach(function(u){var p=ae.get(u)-1,v=i.get(u)-1;ae.set(u,p),i.set(u,v),p||(Ee.has(u)||u.removeAttribute(o),Ee.delete(u)),v||u.removeAttribute(t)}),Le--,Le||(ae=new WeakMap,ae=new WeakMap,Ee=new WeakMap,_e={})}},Ro=function(e,n,t){t===void 0&&(t="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=To(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live]"))),$o(o,r,t,"aria-hidden")):function(){return null}};function No(e){let n;F(()=>me(e),t=>{t?n=Ro(t):n&&n()}),bt(()=>{n&&n()})}let So=0;function Ve(e,n="radix"){const t=It({useId:void 0});return lt?`${n}-${lt()}`:t.useId?`${n}-${t.useId()}`:`${n}-${++So}`}function Fo(e){const n=C(),t=w(()=>{var r;return((r=n.value)==null?void 0:r.width)??0}),o=w(()=>{var r;return((r=n.value)==null?void 0:r.height)??0});return fe(()=>{const r=me(e);if(r){n.value={width:r.offsetWidth,height:r.offsetHeight};const i=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const a=l[0];let c,d;if("borderBoxSize"in a){const s=a.borderBoxSize,u=Array.isArray(s)?s[0]:s;c=u.inlineSize,d=u.blockSize}else c=r.offsetWidth,d=r.offsetHeight;n.value={width:c,height:d}});return i.observe(r,{box:"border-box"}),()=>i.unobserve(r)}else n.value=void 0}),{width:t,height:o}}function Lo(e,n){const t=C(e);function o(r){return n[t.value][r]??t.value}return{state:t,dispatch:r=>{t.value=o(r)}}}const Mo=O({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:n,slots:t}){return()=>{var o,r;if(!t.default)return null;const i=et(t.default()),l=i.findIndex(s=>s.type!==xt);if(l===-1)return i;const a=i[l];(o=a.props)==null||delete o.ref;const c=a.props?P(n,a.props):n;n.class&&(r=a.props)!=null&&r.class&&delete a.props.class;const d=ln(a,c);for(const s in c)s.startsWith("on")&&(d.props||(d.props={}),d.props[s]=c[s]);return i.length===1?d:(i[l]=d,i)}}}),W=O({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:n,slots:t}){const o=e.asChild?"template":e.as;return typeof o=="string"&&["area","img","input"].includes(o)?()=>Be(o,n):o!=="template"?()=>Be(e.as,n,{default:t.default}):()=>Be(Mo,n,{default:t.default})}});function Io(e,n){var t;const o=C({}),r=C("none"),i=C(e),l=e.value?"mounted":"unmounted";let a;const c=((t=n.value)==null?void 0:t.ownerDocument.defaultView)??Ze,{state:d,dispatch:s}=Lo(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),u=m=>{var y;if(Q){const B=new CustomEvent(m,{bubbles:!1,cancelable:!1});(y=n.value)==null||y.dispatchEvent(B)}};F(e,async(m,y)=>{var B;const b=y!==m;if(await ne(),b){const $=r.value,R=De(n.value);m?(s("MOUNT"),u("enter"),R==="none"&&u("after-enter")):R==="none"||((B=o.value)==null?void 0:B.display)==="none"?(s("UNMOUNT"),u("leave"),u("after-leave")):y&&$!==R?(s("ANIMATION_OUT"),u("leave")):(s("UNMOUNT"),u("after-leave"))}},{immediate:!0});const p=m=>{const y=De(n.value),B=y.includes(m.animationName),b=d.value==="mounted"?"enter":"leave";if(m.target===n.value&&B&&(u(`after-${b}`),s("ANIMATION_END"),!i.value)){const $=n.value.style.animationFillMode;n.value.style.animationFillMode="forwards",a=c==null?void 0:c.setTimeout(()=>{var R;((R=n.value)==null?void 0:R.style.animationFillMode)==="forwards"&&(n.value.style.animationFillMode=$)})}m.target===n.value&&y==="none"&&s("ANIMATION_END")},v=m=>{m.target===n.value&&(r.value=De(n.value))},h=F(n,(m,y)=>{m?(o.value=getComputedStyle(m),m.addEventListener("animationstart",v),m.addEventListener("animationcancel",p),m.addEventListener("animationend",p)):(s("ANIMATION_END"),a!==void 0&&(c==null||c.clearTimeout(a)),y==null||y.removeEventListener("animationstart",v),y==null||y.removeEventListener("animationcancel",p),y==null||y.removeEventListener("animationend",p))},{immediate:!0}),g=F(d,()=>{const m=De(n.value);r.value=d.value==="mounted"?m:"none"});return bt(()=>{h(),g()}),{isPresent:w(()=>["mounted","unmountSuspended"].includes(d.value))}}function De(e){return e&&getComputedStyle(e).animationName||"none"}const tt=O({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:n,expose:t}){var o;const{present:r,forceMount:i}=Ue(e),l=C(),{isPresent:a}=Io(r,l);t({present:a});let c=n.default({present:a});c=et(c||[]);const d=oe();if(c&&(c==null?void 0:c.length)>1){const s=(o=d==null?void 0:d.parent)!=null&&o.type.name?`<${d.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${s}\` 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{f as w,e as C,bs as ht,w as F,bL as mt,bM as yt,ct as ie,u as f,d as O,bk as D,o as _,bl as x,bh as E,cu as G,cv as J,ci as P,ck as ke,_ as ne,T as fe,bq as Ue,W as gt,b as ee,cw as Qt,cx as oe,cy as Zt,cz as wt,cA as en,cB as Be,cC as tn,cD as nn,a8 as on,U as bt,c6 as rn,cE as xt,cF as ln,cG as Ct,cH as lt,bK as M,bG as an,ch as sn,Y as un,c as Ot,a3 as Ye,cI as Et,cJ as dn,r as _t,cK as cn,cL as fn,a as pn,cM as vn,cN as hn}from"./index-8LjpXIG7.js";import{o as mn,f as yn,s as gn,a as wn,h as bn,l as xn,c as Cn,b as j,r as Dt,d as On,e as Ae,m as ue,g as We,i as Oe}from"./floating-ui.core-CgBsuaUc.js";function Pe(){return typeof window<"u"}function re(e){return Xe(e)?(e.nodeName||"").toLowerCase():"#document"}function S(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function V(e){var n;return(n=(Xe(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function Xe(e){return Pe()?e instanceof Node||e instanceof S(e).Node:!1}function I(e){return Pe()?e instanceof Element||e instanceof S(e).Element:!1}function K(e){return Pe()?e instanceof HTMLElement||e instanceof S(e).HTMLElement:!1}function it(e){return!Pe()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof S(e).ShadowRoot}function ve(e){const{overflow:n,overflowX:t,overflowY:o,display:r}=k(e);return/auto|scroll|overlay|hidden|clip/.test(n+o+t)&&!["inline","contents"].includes(r)}function En(e){return["table","td","th"].includes(re(e))}function $e(e){return[":popover-open",":modal"].some(n=>{try{return e.matches(n)}catch{return!1}})}function qe(e){const n=Ge(),t=I(e)?k(e):e;return["transform","translate","scale","rotate","perspective"].some(o=>t[o]?t[o]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!n&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!n&&(t.filter?t.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(o=>(t.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(t.contain||"").includes(o))}function _n(e){let n=q(e);for(;K(n)&&!ce(n);){if(qe(n))return n;if($e(n))return null;n=q(n)}return null}function Ge(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ce(e){return["html","body","#document"].includes(re(e))}function k(e){return S(e).getComputedStyle(e)}function Re(e){return I(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function q(e){if(re(e)==="html")return e;const n=e.assignedSlot||e.parentNode||it(e)&&e.host||V(e);return it(n)?n.host:n}function Bt(e){const n=q(e);return ce(n)?e.ownerDocument?e.ownerDocument.body:e.body:K(n)&&ve(n)?n:Bt(n)}function pe(e,n,t){var o;n===void 0&&(n=[]),t===void 0&&(t=!0);const r=Bt(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),l=S(r);if(i){const a=He(l);return n.concat(l,l.visualViewport||[],ve(r)?r:[],a&&t?pe(a):[])}return n.concat(r,pe(r,[],t))}function He(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function At(e){const n=k(e);let t=parseFloat(n.width)||0,o=parseFloat(n.height)||0;const r=K(e),i=r?e.offsetWidth:t,l=r?e.offsetHeight:o,a=Ae(t)!==i||Ae(o)!==l;return a&&(t=i,o=l),{width:t,height:o,$:a}}function Je(e){return I(e)?e:e.contextElement}function de(e){const n=Je(e);if(!K(n))return j(1);const t=n.getBoundingClientRect(),{width:o,height:r,$:i}=At(n);let l=(i?Ae(t.width):t.width)/o,a=(i?Ae(t.height):t.height)/r;return(!l||!Number.isFinite(l))&&(l=1),(!a||!Number.isFinite(a))&&(a=1),{x:l,y:a}}const Dn=j(0);function Tt(e){const n=S(e);return!Ge()||!n.visualViewport?Dn:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function Bn(e,n,t){return n===void 0&&(n=!1),!t||n&&t!==S(e)?!1:n}function te(e,n,t,o){n===void 0&&(n=!1),t===void 0&&(t=!1);const r=e.getBoundingClientRect(),i=Je(e);let l=j(1);n&&(o?I(o)&&(l=de(o)):l=de(e));const a=Bn(i,t,o)?Tt(i):j(0);let c=(r.left+a.x)/l.x,d=(r.top+a.y)/l.y,s=r.width/l.x,u=r.height/l.y;if(i){const p=S(i),v=o&&I(o)?S(o):o;let h=p,g=He(h);for(;g&&o&&v!==h;){const m=de(g),y=g.getBoundingClientRect(),B=k(g),b=y.left+(g.clientLeft+parseFloat(B.paddingLeft))*m.x,$=y.top+(g.clientTop+parseFloat(B.paddingTop))*m.y;c*=m.x,d*=m.y,s*=m.x,u*=m.y,c+=b,d+=$,h=S(g),g=He(h)}}return Dt({width:s,height:u,x:c,y:d})}function Qe(e,n){const t=Re(e).scrollLeft;return n?n.left+t:te(V(e)).left+t}function Pt(e,n,t){t===void 0&&(t=!1);const o=e.getBoundingClientRect(),r=o.left+n.scrollLeft-(t?0:Qe(e,o)),i=o.top+n.scrollTop;return{x:r,y:i}}function An(e){let{elements:n,rect:t,offsetParent:o,strategy:r}=e;const i=r==="fixed",l=V(o),a=n?$e(n.floating):!1;if(o===l||a&&i)return t;let c={scrollLeft:0,scrollTop:0},d=j(1);const s=j(0),u=K(o);if((u||!u&&!i)&&((re(o)!=="body"||ve(l))&&(c=Re(o)),K(o))){const v=te(o);d=de(o),s.x=v.x+o.clientLeft,s.y=v.y+o.clientTop}const p=l&&!u&&!i?Pt(l,c,!0):j(0);return{width:t.width*d.x,height:t.height*d.y,x:t.x*d.x-c.scrollLeft*d.x+s.x+p.x,y:t.y*d.y-c.scrollTop*d.y+s.y+p.y}}function Tn(e){return Array.from(e.getClientRects())}function Pn(e){const n=V(e),t=Re(e),o=e.ownerDocument.body,r=ue(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth),i=ue(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let l=-t.scrollLeft+Qe(e);const a=-t.scrollTop;return k(o).direction==="rtl"&&(l+=ue(n.clientWidth,o.clientWidth)-r),{width:r,height:i,x:l,y:a}}function $n(e,n){const t=S(e),o=V(e),r=t.visualViewport;let i=o.clientWidth,l=o.clientHeight,a=0,c=0;if(r){i=r.width,l=r.height;const d=Ge();(!d||d&&n==="fixed")&&(a=r.offsetLeft,c=r.offsetTop)}return{width:i,height:l,x:a,y:c}}function Rn(e,n){const t=te(e,!0,n==="fixed"),o=t.top+e.clientTop,r=t.left+e.clientLeft,i=K(e)?de(e):j(1),l=e.clientWidth*i.x,a=e.clientHeight*i.y,c=r*i.x,d=o*i.y;return{width:l,height:a,x:c,y:d}}function at(e,n,t){let o;if(n==="viewport")o=$n(e,t);else if(n==="document")o=Pn(V(e));else if(I(n))o=Rn(n,t);else{const r=Tt(e);o={x:n.x-r.x,y:n.y-r.y,width:n.width,height:n.height}}return Dt(o)}function $t(e,n){const t=q(e);return t===n||!I(t)||ce(t)?!1:k(t).position==="fixed"||$t(t,n)}function Nn(e,n){const t=n.get(e);if(t)return t;let o=pe(e,[],!1).filter(a=>I(a)&&re(a)!=="body"),r=null;const i=k(e).position==="fixed";let l=i?q(e):e;for(;I(l)&&!ce(l);){const a=k(l),c=qe(l);!c&&a.position==="fixed"&&(r=null),(i?!c&&!r:!c&&a.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||ve(l)&&!c&&$t(e,l))?o=o.filter(s=>s!==l):r=a,l=q(l)}return n.set(e,o),o}function Sn(e){let{element:n,boundary:t,rootBoundary:o,strategy:r}=e;const l=[...t==="clippingAncestors"?$e(n)?[]:Nn(n,this._c):[].concat(t),o],a=l[0],c=l.reduce((d,s)=>{const u=at(n,s,r);return d.top=ue(u.top,d.top),d.right=We(u.right,d.right),d.bottom=We(u.bottom,d.bottom),d.left=ue(u.left,d.left),d},at(n,a,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Fn(e){const{width:n,height:t}=At(e);return{width:n,height:t}}function Ln(e,n,t){const o=K(n),r=V(n),i=t==="fixed",l=te(e,!0,i,n);let a={scrollLeft:0,scrollTop:0};const c=j(0);if(o||!o&&!i)if((re(n)!=="body"||ve(r))&&(a=Re(n)),o){const p=te(n,!0,i,n);c.x=p.x+n.clientLeft,c.y=p.y+n.clientTop}else r&&(c.x=Qe(r));const d=r&&!o&&!i?Pt(r,a):j(0),s=l.left+a.scrollLeft-c.x-d.x,u=l.top+a.scrollTop-c.y-d.y;return{x:s,y:u,width:l.width,height:l.height}}function Se(e){return k(e).position==="static"}function st(e,n){if(!K(e)||k(e).position==="fixed")return null;if(n)return n(e);let t=e.offsetParent;return V(e)===t&&(t=t.ownerDocument.body),t}function Rt(e,n){const t=S(e);if($e(e))return t;if(!K(e)){let r=q(e);for(;r&&!ce(r);){if(I(r)&&!Se(r))return r;r=q(r)}return t}let o=st(e,n);for(;o&&En(o)&&Se(o);)o=st(o,n);return o&&ce(o)&&Se(o)&&!qe(o)?t:o||_n(e)||t}const Mn=async function(e){const n=this.getOffsetParent||Rt,t=this.getDimensions,o=await t(e.floating);return{reference:Ln(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function In(e){return k(e).direction==="rtl"}const kn={convertOffsetParentRelativeRectToViewportRelativeRect:An,getDocumentElement:V,getClippingRect:Sn,getOffsetParent:Rt,getElementRects:Mn,getClientRects:Tn,getDimensions:Fn,getScale:de,isElement:I,isRTL:In};function Nt(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function Wn(e,n){let t=null,o;const r=V(e);function i(){var a;clearTimeout(o),(a=t)==null||a.disconnect(),t=null}function l(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const d=e.getBoundingClientRect(),{left:s,top:u,width:p,height:v}=d;if(a||n(),!p||!v)return;const h=Oe(u),g=Oe(r.clientWidth-(s+p)),m=Oe(r.clientHeight-(u+v)),y=Oe(s),b={rootMargin:-h+"px "+-g+"px "+-m+"px "+-y+"px",threshold:ue(0,We(1,c))||1};let $=!0;function R(L){const T=L[0].intersectionRatio;if(T!==c){if(!$)return l();T?l(!1,T):o=setTimeout(()=>{l(!1,1e-7)},1e3)}T===1&&!Nt(d,e.getBoundingClientRect())&&l(),$=!1}try{t=new IntersectionObserver(R,{...b,root:r.ownerDocument})}catch{t=new IntersectionObserver(R,b)}t.observe(e)}return l(!0),i}function Hn(e,n,t,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,d=Je(e),s=r||i?[...d?pe(d):[],...pe(n)]:[];s.forEach(y=>{r&&y.addEventListener("scroll",t,{passive:!0}),i&&y.addEventListener("resize",t)});const u=d&&a?Wn(d,t):null;let p=-1,v=null;l&&(v=new ResizeObserver(y=>{let[B]=y;B&&B.target===d&&v&&(v.unobserve(n),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=v)==null||b.observe(n)})),t()}),d&&!c&&v.observe(d),v.observe(n));let h,g=c?te(e):null;c&&m();function m(){const y=te(e);g&&!Nt(g,y)&&t(),g=y,h=requestAnimationFrame(m)}return t(),()=>{var y;s.forEach(B=>{r&&B.removeEventListener("scroll",t),i&&B.removeEventListener("resize",t)}),u==null||u(),(y=v)==null||y.disconnect(),v=null,c&&cancelAnimationFrame(h)}}const jn=mn,Kn=gn,ut=yn,Vn=wn,zn=bn,Un=On,Yn=xn,Xn=(e,n,t)=>{const o=new Map,r={platform:kn,...t},i={...r.platform,_c:o};return Cn(e,n,{...r,platform:i})};function qn(e){return e!=null&&typeof e=="object"&&"$el"in e}function je(e){if(qn(e)){const n=e.$el;return Xe(n)&&re(n)==="#comment"?null:n}return e}function se(e){return typeof e=="function"?e():f(e)}function Gn(e){return{name:"arrow",options:e,fn(n){const t=je(se(e.element));return t==null?{}:Un({element:t,padding:e.padding}).fn(n)}}}function St(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function dt(e,n){const t=St(e);return Math.round(n*t)/t}function Jn(e,n,t){t===void 0&&(t={});const o=t.whileElementsMounted,r=w(()=>{var T;return(T=se(t.open))!=null?T:!0}),i=w(()=>se(t.middleware)),l=w(()=>{var T;return(T=se(t.placement))!=null?T:"bottom"}),a=w(()=>{var T;return(T=se(t.strategy))!=null?T:"absolute"}),c=w(()=>{var T;return(T=se(t.transform))!=null?T:!0}),d=w(()=>je(e.value)),s=w(()=>je(n.value)),u=C(0),p=C(0),v=C(a.value),h=C(l.value),g=ht({}),m=C(!1),y=w(()=>{const T={position:v.value,left:"0",top:"0"};if(!s.value)return T;const H=dt(s.value,u.value),ge=dt(s.value,p.value);return c.value?{...T,transform:"translate("+H+"px, "+ge+"px)",...St(s.value)>=1.5&&{willChange:"transform"}}:{position:v.value,left:H+"px",top:ge+"px"}});let B;function b(){if(d.value==null||s.value==null)return;const T=r.value;Xn(d.value,s.value,{middleware:i.value,placement:l.value,strategy:a.value}).then(H=>{u.value=H.x,p.value=H.y,v.value=H.strategy,h.value=H.placement,g.value=H.middlewareData,m.value=T!==!1})}function $(){typeof B=="function"&&(B(),B=void 0)}function R(){if($(),o===void 0){b();return}if(d.value!=null&&s.value!=null){B=o(d.value,s.value,b);return}}function L(){r.value||(m.value=!1)}return F([i,l,a,r],b,{flush:"sync"}),F([d,s],R,{flush:"sync"}),F(r,L,{flush:"sync"}),mt()&&yt($),{x:ie(u),y:ie(p),strategy:ie(v),placement:ie(h),middlewareData:ie(g),isPositioned:ie(m),floatingStyles:y,update:b}}function le(e,n){const t=typeof e=="string"&&!n?`${e}Context`:n,o=Symbol(t);return[r=>{const i=en(o,r);if(i||i===null)return i;throw new Error(`Injection \`${o.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`)},r=>(hn(o,r),r)]}function Ft(e,n,t){const o=t.originalEvent.target,r=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:t});n&&o.addEventListener(e,n,{once:!0}),o.dispatchEvent(r)}function Qn(e,n){var t;const o=ht();return M(()=>{o.value=e()},{...n,flush:(t=void 0)!=null?t:"sync"}),Ct(o)}function he(e){return mt()?(yt(e),!0):!1}function Zn(){const e=new Set,n=t=>{e.delete(t)};return{on:t=>{e.add(t);const o=()=>n(t);return he(o),{off:o}},off:n,trigger:(...t)=>Promise.all(Array.from(e).map(o=>o(...t)))}}function eo(e){let n=!1,t;const o=Et(!0);return(...r)=>(n||(t=o.run(()=>e(...r)),n=!0),t)}function to(e){let n=0,t,o;const r=()=>{n-=1,o&&n<=0&&(o.stop(),t=void 0,o=void 0)};return(...i)=>(n+=1,t||(o=Et(!0),t=o.run(()=>e(...i))),he(r),t)}function Z(e){return typeof e=="function"?e():f(e)}const Q=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const no=e=>typeof e<"u",oo=Object.prototype.toString,ro=e=>oo.call(e)==="[object Object]",lo=()=>{},ct=io();function io(){var e,n;return Q&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((n=window==null?void 0:window.navigator)==null?void 0:n.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function ao(e){return oe()}function so(e,n=1e4){return vn((t,o)=>{let r=Z(e),i;const l=()=>setTimeout(()=>{r=Z(e),o()},Z(n));return he(()=>{clearTimeout(i)}),{get(){return t(),r},set(a){r=a,o(),clearTimeout(i),i=l()}}})}function uo(e,n){ao()&&dn(e,n)}function Lt(e,n,t={}){const{immediate:o=!0}=t,r=C(!1);let i=null;function l(){i&&(clearTimeout(i),i=null)}function a(){r.value=!1,l()}function c(...d){l(),r.value=!0,i=setTimeout(()=>{r.value=!1,i=null,e(...d)},Z(n))}return o&&(r.value=!0,Q&&c()),he(a),{isPending:Ct(r),start:c,stop:a}}function me(e){var n;const t=Z(e);return(n=t==null?void 0:t.$el)!=null?n:t}const Ze=Q?window:void 0;function Te(...e){let n,t,o,r;if(typeof e[0]=="string"||Array.isArray(e[0])?([t,o,r]=e,n=Ze):[n,t,o,r]=e,!n)return lo;Array.isArray(t)||(t=[t]),Array.isArray(o)||(o=[o]);const i=[],l=()=>{i.forEach(s=>s()),i.length=0},a=(s,u,p,v)=>(s.addEventListener(u,p,v),()=>s.removeEventListener(u,p,v)),c=F(()=>[me(n),Z(r)],([s,u])=>{if(l(),!s)return;const p=ro(u)?{...u}:u;i.push(...t.flatMap(v=>o.map(h=>a(s,v,h,p))))},{immediate:!0,flush:"post"}),d=()=>{c(),l()};return he(d),d}function co(e){return typeof e=="function"?e:typeof e=="string"?n=>n.key===e:Array.isArray(e)?n=>e.includes(n.key):()=>!0}function fo(...e){let n,t,o={};e.length===3?(n=e[0],t=e[1],o=e[2]):e.length===2?typeof e[1]=="object"?(n=!0,t=e[0],o=e[1]):(n=e[0],t=e[1]):(n=!0,t=e[0]);const{target:r=Ze,eventName:i="keydown",passive:l=!1,dedupe:a=!1}=o,c=co(n);return Te(r,i,d=>{d.repeat&&Z(a)||c(d)&&t(d)},l)}function po(){const e=C(!1),n=oe();return n&&fe(()=>{e.value=!0},n),e}function vo(e){return JSON.parse(JSON.stringify(e))}function Mt(e,n,t,o={}){var r,i,l;const{clone:a=!1,passive:c=!1,eventName:d,deep:s=!1,defaultValue:u,shouldEmit:p}=o,v=oe(),h=t||(v==null?void 0:v.emit)||((r=v==null?void 0:v.$emit)==null?void 0:r.bind(v))||((l=(i=v==null?void 0:v.proxy)==null?void 0:i.$emit)==null?void 0:l.bind(v==null?void 0:v.proxy));let g=d;g=g||`update:${n.toString()}`;const m=b=>a?typeof a=="function"?a(b):vo(b):b,y=()=>no(e[n])?m(e[n]):u,B=b=>{p?p(b)&&h(g,b):h(g,b)};if(c){const b=y(),$=C(b);let R=!1;return F(()=>e[n],L=>{R||(R=!0,$.value=m(L),ne(()=>R=!1))}),F($,L=>{!R&&(L!==e[n]||s)&&B(L)},{deep:s}),$}else return w({get(){return y()},set(b){B(b)}})}function et(e){return e?e.flatMap(n=>n.type===rn?et(n.children):[n]):[]}function X(){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 Fe(e){if(e===null||typeof e!="object")return!1;const n=Object.getPrototypeOf(e);return n!==null&&n!==Object.prototype&&Object.getPrototypeOf(n)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function Ke(e,n,t=".",o){if(!Fe(n))return Ke(e,{},t);const r=Object.assign({},n);for(const i in e){if(i==="__proto__"||i==="constructor")continue;const l=e[i];l!=null&&(Array.isArray(l)&&Array.isArray(r[i])?r[i]=[...l,...r[i]]:Fe(l)&&Fe(r[i])?r[i]=Ke(l,r[i],(t?`${t}.`:"")+i.toString()):r[i]=l)}return r}function ho(e){return(...n)=>n.reduce((t,o)=>Ke(t,o,""),{})}const mo=ho(),[It,Tr]=le("ConfigProvider");let yo="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",go=(e=21)=>{let n="",t=e;for(;t--;)n+=yo[Math.random()*64|0];return n};const wo=to(()=>{const e=C(new Map),n=C(),t=w(()=>{for(const l of e.value.values())if(l)return!0;return!1}),o=It({scrollBody:C(!0)});let r=null;const i=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.body.style.removeProperty("--scrollbar-width"),document.body.style.overflow=n.value??"",ct&&(r==null||r()),n.value=void 0};return F(t,(l,a)=>{var c;if(!Q)return;if(!l){a&&i();return}n.value===void 0&&(n.value=document.body.style.overflow);const d=window.innerWidth-document.documentElement.clientWidth,s={padding:d,margin:0},u=(c=o.scrollBody)!=null&&c.value?typeof o.scrollBody.value=="object"?mo({padding:o.scrollBody.value.padding===!0?d:o.scrollBody.value.padding,margin:o.scrollBody.value.margin===!0?d:o.scrollBody.value.margin},s):s:{padding:0,margin:0};d>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",`${d}px`),document.body.style.overflow="hidden"),ct&&(r=Te(document,"touchmove",p=>xo(p),{passive:!1})),ne(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),e});function bo(e){const n=go(6),t=wo();t.value.set(n,e);const o=w({get:()=>t.value.get(n)??!1,set:r=>t.value.set(n,r)});return uo(()=>{t.value.delete(n)}),o}function kt(e){const n=window.getComputedStyle(e);if(n.overflowX==="scroll"||n.overflowY==="scroll"||n.overflowX==="auto"&&e.clientWidth1?!0:(n.preventDefault&&n.cancelable&&n.preventDefault(),!1)}function ye(e){const n=oe(),t=n==null?void 0:n.type.emits,o={};return t!=null&&t.length||console.warn(`No emitted event found. Please check component: ${n==null?void 0:n.type.__name}`),t==null||t.forEach(r=>{o[Zt(wt(r))]=(...i)=>e(r,...i)}),o}function Wt(e){const n=oe(),t=Object.keys((n==null?void 0:n.type.props)??{}).reduce((r,i)=>{const l=(n==null?void 0:n.type.props[i]).default;return l!==void 0&&(r[i]=l),r},{}),o=on(e);return w(()=>{const r={},i=(n==null?void 0:n.vnode.props)??{};return Object.keys(i).forEach(l=>{r[wt(l)]=i[l]}),Object.keys({...t,...r}).reduce((l,a)=>(o.value[a]!==void 0&&(l[a]=o.value[a]),l),{})})}function Ht(e,n){const t=Wt(e),o=n?ye(n):{};return w(()=>({...t.value,...o}))}function A(){const e=oe(),n=C(),t=w(()=>{var l,a;return["#text","#comment"].includes((l=n.value)==null?void 0:l.$el.nodeName)?(a=n.value)==null?void 0:a.$el.nextElementSibling:me(n)}),o=Object.assign({},e.exposed),r={};for(const l in e.props)Object.defineProperty(r,l,{enumerable:!0,configurable:!0,get:()=>e.props[l]});if(Object.keys(o).length>0)for(const l in o)Object.defineProperty(r,l,{enumerable:!0,configurable:!0,get:()=>o[l]});Object.defineProperty(r,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=r;function i(l){n.value=l,l&&(Object.defineProperty(r,"$el",{enumerable:!0,configurable:!0,get:()=>l instanceof Element?l:l.$el}),e.exposed=r)}return{forwardRef:i,currentRef:n,currentElement:t}}function Co(e,n){const t=so(!1,300),o=C(null),r=Zn();function i(){o.value=null,t.value=!1}function l(a,c){const d=a.currentTarget,s={x:a.clientX,y:a.clientY},u=Oo(s,d.getBoundingClientRect()),p=Eo(s,u),v=_o(c.getBoundingClientRect()),h=Bo([...p,...v]);o.value=h,t.value=!0}return M(a=>{if(e.value&&n.value){const c=s=>l(s,n.value),d=s=>l(s,e.value);e.value.addEventListener("pointerleave",c),n.value.addEventListener("pointerleave",d),a(()=>{var s,u;(s=e.value)==null||s.removeEventListener("pointerleave",c),(u=n.value)==null||u.removeEventListener("pointerleave",d)})}}),M(a=>{var c;if(o.value){const d=s=>{var u,p;if(!o.value)return;const v=s.target,h={x:s.clientX,y:s.clientY},g=((u=e.value)==null?void 0:u.contains(v))||((p=n.value)==null?void 0:p.contains(v)),m=!Do(h,o.value),y=!!v.closest("[data-grace-area-trigger]");g?i():(m||y)&&(i(),r.trigger())};(c=e.value)==null||c.ownerDocument.addEventListener("pointermove",d),a(()=>{var s;return(s=e.value)==null?void 0:s.ownerDocument.removeEventListener("pointermove",d)})}}),{isPointerInTransit:t,onPointerExit:r.on}}function Oo(e,n){const t=Math.abs(n.top-e.y),o=Math.abs(n.bottom-e.y),r=Math.abs(n.right-e.x),i=Math.abs(n.left-e.x);switch(Math.min(t,o,r,i)){case i:return"left";case r:return"right";case t:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Eo(e,n,t=5){const o=[];switch(n){case"top":o.push({x:e.x-t,y:e.y+t},{x:e.x+t,y:e.y+t});break;case"bottom":o.push({x:e.x-t,y:e.y-t},{x:e.x+t,y:e.y-t});break;case"left":o.push({x:e.x+t,y:e.y-t},{x:e.x+t,y:e.y+t});break;case"right":o.push({x:e.x-t,y:e.y-t},{x:e.x-t,y:e.y+t});break}return o}function _o(e){const{top:n,right:t,bottom:o,left:r}=e;return[{x:r,y:n},{x:t,y:n},{x:t,y:o},{x:r,y:o}]}function Do(e,n){const{x:t,y:o}=e;let r=!1;for(let i=0,l=n.length-1;io!=s>o&&t<(d-a)*(o-c)/(s-c)+a&&(r=!r)}return r}function Bo(e){const n=e.slice();return n.sort((t,o)=>t.xo.x?1:t.yo.y?1:0),Ao(n)}function Ao(e){if(e.length<=1)return e.slice();const n=[];for(let o=0;o=2;){const i=n[n.length-1],l=n[n.length-2];if((i.x-l.x)*(r.y-l.y)>=(i.y-l.y)*(r.x-l.x))n.pop();else break}n.push(r)}n.pop();const t=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;t.length>=2;){const i=t[t.length-1],l=t[t.length-2];if((i.x-l.x)*(r.y-l.y)>=(i.y-l.y)*(r.x-l.x))t.pop();else break}t.push(r)}return t.pop(),n.length===1&&t.length===1&&n[0].x===t[0].x&&n[0].y===t[0].y?n:n.concat(t)}var To=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},ae=new WeakMap,Ee=new WeakMap,_e={},Le=0,jt=function(e){return e&&(e.host||jt(e.parentNode))},Po=function(e,n){return n.map(function(t){if(e.contains(t))return t;var o=jt(t);return o&&e.contains(o)?o:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(t){return!!t})},$o=function(e,n,t,o){var r=Po(n,Array.isArray(e)?e:[e]);_e[t]||(_e[t]=new WeakMap);var i=_e[t],l=[],a=new Set,c=new Set(r),d=function(u){!u||a.has(u)||(a.add(u),d(u.parentNode))};r.forEach(d);var s=function(u){!u||c.has(u)||Array.prototype.forEach.call(u.children,function(p){if(a.has(p))s(p);else try{var v=p.getAttribute(o),h=v!==null&&v!=="false",g=(ae.get(p)||0)+1,m=(i.get(p)||0)+1;ae.set(p,g),i.set(p,m),l.push(p),g===1&&h&&Ee.set(p,!0),m===1&&p.setAttribute(t,"true"),h||p.setAttribute(o,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return s(n),a.clear(),Le++,function(){l.forEach(function(u){var p=ae.get(u)-1,v=i.get(u)-1;ae.set(u,p),i.set(u,v),p||(Ee.has(u)||u.removeAttribute(o),Ee.delete(u)),v||u.removeAttribute(t)}),Le--,Le||(ae=new WeakMap,ae=new WeakMap,Ee=new WeakMap,_e={})}},Ro=function(e,n,t){t===void 0&&(t="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=To(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live]"))),$o(o,r,t,"aria-hidden")):function(){return null}};function No(e){let n;F(()=>me(e),t=>{t?n=Ro(t):n&&n()}),bt(()=>{n&&n()})}let So=0;function Ve(e,n="radix"){const t=It({useId:void 0});return lt?`${n}-${lt()}`:t.useId?`${n}-${t.useId()}`:`${n}-${++So}`}function Fo(e){const n=C(),t=w(()=>{var r;return((r=n.value)==null?void 0:r.width)??0}),o=w(()=>{var r;return((r=n.value)==null?void 0:r.height)??0});return fe(()=>{const r=me(e);if(r){n.value={width:r.offsetWidth,height:r.offsetHeight};const i=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const a=l[0];let c,d;if("borderBoxSize"in a){const s=a.borderBoxSize,u=Array.isArray(s)?s[0]:s;c=u.inlineSize,d=u.blockSize}else c=r.offsetWidth,d=r.offsetHeight;n.value={width:c,height:d}});return i.observe(r,{box:"border-box"}),()=>i.unobserve(r)}else n.value=void 0}),{width:t,height:o}}function Lo(e,n){const t=C(e);function o(r){return n[t.value][r]??t.value}return{state:t,dispatch:r=>{t.value=o(r)}}}const Mo=O({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:n,slots:t}){return()=>{var o,r;if(!t.default)return null;const i=et(t.default()),l=i.findIndex(s=>s.type!==xt);if(l===-1)return i;const a=i[l];(o=a.props)==null||delete o.ref;const c=a.props?P(n,a.props):n;n.class&&(r=a.props)!=null&&r.class&&delete a.props.class;const d=ln(a,c);for(const s in c)s.startsWith("on")&&(d.props||(d.props={}),d.props[s]=c[s]);return i.length===1?d:(i[l]=d,i)}}}),W=O({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:n,slots:t}){const o=e.asChild?"template":e.as;return typeof o=="string"&&["area","img","input"].includes(o)?()=>Be(o,n):o!=="template"?()=>Be(e.as,n,{default:t.default}):()=>Be(Mo,n,{default:t.default})}});function Io(e,n){var t;const o=C({}),r=C("none"),i=C(e),l=e.value?"mounted":"unmounted";let a;const c=((t=n.value)==null?void 0:t.ownerDocument.defaultView)??Ze,{state:d,dispatch:s}=Lo(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),u=m=>{var y;if(Q){const B=new CustomEvent(m,{bubbles:!1,cancelable:!1});(y=n.value)==null||y.dispatchEvent(B)}};F(e,async(m,y)=>{var B;const b=y!==m;if(await ne(),b){const $=r.value,R=De(n.value);m?(s("MOUNT"),u("enter"),R==="none"&&u("after-enter")):R==="none"||((B=o.value)==null?void 0:B.display)==="none"?(s("UNMOUNT"),u("leave"),u("after-leave")):y&&$!==R?(s("ANIMATION_OUT"),u("leave")):(s("UNMOUNT"),u("after-leave"))}},{immediate:!0});const p=m=>{const y=De(n.value),B=y.includes(m.animationName),b=d.value==="mounted"?"enter":"leave";if(m.target===n.value&&B&&(u(`after-${b}`),s("ANIMATION_END"),!i.value)){const $=n.value.style.animationFillMode;n.value.style.animationFillMode="forwards",a=c==null?void 0:c.setTimeout(()=>{var R;((R=n.value)==null?void 0:R.style.animationFillMode)==="forwards"&&(n.value.style.animationFillMode=$)})}m.target===n.value&&y==="none"&&s("ANIMATION_END")},v=m=>{m.target===n.value&&(r.value=De(n.value))},h=F(n,(m,y)=>{m?(o.value=getComputedStyle(m),m.addEventListener("animationstart",v),m.addEventListener("animationcancel",p),m.addEventListener("animationend",p)):(s("ANIMATION_END"),a!==void 0&&(c==null||c.clearTimeout(a)),y==null||y.removeEventListener("animationstart",v),y==null||y.removeEventListener("animationcancel",p),y==null||y.removeEventListener("animationend",p))},{immediate:!0}),g=F(d,()=>{const m=De(n.value);r.value=d.value==="mounted"?m:"none"});return bt(()=>{h(),g()}),{isPresent:w(()=>["mounted","unmountSuspended"].includes(d.value))}}function De(e){return e&&getComputedStyle(e).animationName||"none"}const tt=O({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:n,expose:t}){var o;const{present:r,forceMount:i}=Ue(e),l=C(),{isPresent:a}=Io(r,l);t({present:a});let c=n.default({present:a});c=et(c||[]);const d=oe();if(c&&(c==null?void 0:c.length)>1){const s=(o=d==null?void 0:d.parent)!=null&&o.type.name?`<${d.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${s}\` 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()=>i.value||r.value||a.value?Be(n.default({present:a})[0],{ref:s=>{const u=me(s);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}}),[U,ko]=le("DialogRoot"),Wo=O({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:n}){const t=e,o=Mt(t,"open",n,{defaultValue:t.defaultOpen,passive:t.open===void 0}),r=C(),i=C(),{modal:l}=Ue(t);return ko({open:o,modal:l,openModal:()=>{o.value=!0},onOpenChange:a=>{o.value=a},onOpenToggle:()=>{o.value=!o.value},contentId:"",titleId:"",descriptionId:"",triggerElement:r,contentElement:i}),(a,c)=>E(a.$slots,"default",{open:f(o)})}}),nt=O({__name:"Teleport",props:{to:{default:"body"},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const n=po();return(t,o)=>f(n)||t.forceMount?(_(),D(Qt,{key:0,to:t.to,disabled:t.disabled},[E(t.$slots,"default")],8,["to","disabled"])):gt("",!0)}}),Pr=O({__name:"DialogPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const n=e;return(t,o)=>(_(),D(f(nt),G(J(n)),{default:x(()=>[E(t.$slots,"default")]),_:3},16))}}),Ho="dismissableLayer.pointerDownOutside",jo="dismissableLayer.focusOutside";function Kt(e,n){const t=n.closest("[data-dismissable-layer]"),o=e.dataset.dismissableLayer===""?e:e.querySelector("[data-dismissable-layer]"),r=Array.from(e.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(t&&o===t||r.indexOf(o){});return M(l=>{if(!Q)return;const a=async d=>{const s=d.target;if(n!=null&&n.value){if(Kt(n.value,s)){r.value=!1;return}if(d.target&&!r.value){let u=function(){Ft(Ho,e,p)};const p={originalEvent:d};d.pointerType==="touch"?(o.removeEventListener("click",i.value),i.value=u,o.addEventListener("click",i.value,{once:!0})):u()}else o.removeEventListener("click",i.value);r.value=!1}},c=window.setTimeout(()=>{o.addEventListener("pointerdown",a)},0);l(()=>{window.clearTimeout(c),o.removeEventListener("pointerdown",a),o.removeEventListener("click",i.value)})}),{onPointerDownCapture:()=>r.value=!0}}function Vo(e,n){var t;const o=((t=n==null?void 0:n.value)==null?void 0:t.ownerDocument)??(globalThis==null?void 0:globalThis.document),r=C(!1);return M(i=>{if(!Q)return;const l=async a=>{n!=null&&n.value&&(await ne(),!(!n.value||Kt(n.value,a.target))&&a.target&&!r.value&&Ft(jo,e,{originalEvent:a}))};o.addEventListener("focusin",l),i(()=>o.removeEventListener("focusin",l))}),{onFocusCapture:()=>r.value=!0,onBlurCapture:()=>r.value=!1}}const z=_t({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Vt=O({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(e,{emit:n}){const t=e,o=n,{forwardRef:r,currentElement:i}=A(),l=w(()=>{var h;return((h=i.value)==null?void 0:h.ownerDocument)??globalThis.document}),a=w(()=>z.layersRoot),c=w(()=>i.value?Array.from(a.value).indexOf(i.value):-1),d=w(()=>z.layersWithOutsidePointerEventsDisabled.size>0),s=w(()=>{const h=Array.from(a.value),[g]=[...z.layersWithOutsidePointerEventsDisabled].slice(-1),m=h.indexOf(g);return c.value>=m}),u=Ko(async h=>{const g=[...z.branches].some(m=>m==null?void 0:m.contains(h.target));!s.value||g||(o("pointerDownOutside",h),o("interactOutside",h),await ne(),h.defaultPrevented||o("dismiss"))},i),p=Vo(h=>{[...z.branches].some(g=>g==null?void 0:g.contains(h.target))||(o("focusOutside",h),o("interactOutside",h),h.defaultPrevented||o("dismiss"))},i);fo("Escape",h=>{c.value===a.value.size-1&&(o("escapeKeyDown",h),h.defaultPrevented||o("dismiss"))});let v;return M(h=>{i.value&&(t.disableOutsidePointerEvents&&(z.layersWithOutsidePointerEventsDisabled.size===0&&(v=l.value.body.style.pointerEvents,l.value.body.style.pointerEvents="none"),z.layersWithOutsidePointerEventsDisabled.add(i.value)),a.value.add(i.value),h(()=>{t.disableOutsidePointerEvents&&z.layersWithOutsidePointerEventsDisabled.size===1&&(l.value.body.style.pointerEvents=v)}))}),M(h=>{h(()=>{i.value&&(a.value.delete(i.value),z.layersWithOutsidePointerEventsDisabled.delete(i.value))})}),(h,g)=>(_(),D(f(W),{ref:f(r),"as-child":h.asChild,as:h.as,"data-dismissable-layer":"",style:Ye({pointerEvents:d.value?s.value?"auto":"none":void 0}),onFocusCapture:f(p).onFocusCapture,onBlurCapture:f(p).onBlurCapture,onPointerdownCapture:f(u).onPointerDownCapture},{default:x(()=>[E(h.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),Me="focusScope.autoFocusOnMount",Ie="focusScope.autoFocusOnUnmount",ft={bubbles:!1,cancelable:!0};function zo(e,{select:n=!1}={}){const t=X();for(const o of e)if(Y(o,{select:n}),X()!==t)return!0}function Uo(e){const n=zt(e),t=pt(n,e),o=pt(n.reverse(),e);return[t,o]}function zt(e){const n=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)n.push(t.currentNode);return n}function pt(e,n){for(const t of e)if(!Yo(t,{upTo:n}))return t}function Yo(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Xo(e){return e instanceof HTMLInputElement&&"select"in e}function Y(e,{select:n=!1}={}){if(e&&e.focus){const t=X();e.focus({preventScroll:!0}),e!==t&&Xo(e)&&n&&e.select()}}const qo=eo(()=>C([]));function Go(){const e=qo();return{add(n){const t=e.value[0];n!==t&&(t==null||t.pause()),e.value=vt(e.value,n),e.value.unshift(n)},remove(n){var t;e.value=vt(e.value,n),(t=e.value[0])==null||t.resume()}}}function vt(e,n){const t=[...e],o=t.indexOf(n);return o!==-1&&t.splice(o,1),t}function Jo(e){return e.filter(n=>n.tagName!=="A")}const Qo=O({__name:"FocusScope",props:{loop:{type:Boolean,default:!1},trapped:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["mountAutoFocus","unmountAutoFocus"],setup(e,{emit:n}){const t=e,o=n,{currentRef:r,currentElement:i}=A(),l=C(null),a=Go(),c=_t({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});M(s=>{if(!Q)return;const u=i.value;if(!t.trapped)return;function p(m){if(c.paused||!u)return;const y=m.target;u.contains(y)?l.value=y:Y(l.value,{select:!0})}function v(m){if(c.paused||!u)return;const y=m.relatedTarget;y!==null&&(u.contains(y)||Y(l.value,{select:!0}))}function h(m){u.contains(l.value)||Y(u)}document.addEventListener("focusin",p),document.addEventListener("focusout",v);const g=new MutationObserver(h);u&&g.observe(u,{childList:!0,subtree:!0}),s(()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",v),g.disconnect()})}),M(async s=>{const u=i.value;if(await ne(),!u)return;a.add(c);const p=X();if(!u.contains(p)){const v=new CustomEvent(Me,ft);u.addEventListener(Me,h=>o("mountAutoFocus",h)),u.dispatchEvent(v),v.defaultPrevented||(zo(Jo(zt(u)),{select:!0}),X()===p&&Y(u))}s(()=>{u.removeEventListener(Me,g=>o("mountAutoFocus",g));const v=new CustomEvent(Ie,ft),h=g=>{o("unmountAutoFocus",g)};u.addEventListener(Ie,h),u.dispatchEvent(v),setTimeout(()=>{v.defaultPrevented||Y(p??document.body,{select:!0}),u.removeEventListener(Ie,h),a.remove(c)},0)})});function d(s){if(!t.loop&&!t.trapped||c.paused)return;const u=s.key==="Tab"&&!s.altKey&&!s.ctrlKey&&!s.metaKey,p=X();if(u&&p){const v=s.currentTarget,[h,g]=Uo(v);h&&g?!s.shiftKey&&p===g?(s.preventDefault(),t.loop&&Y(h,{select:!0})):s.shiftKey&&p===h&&(s.preventDefault(),t.loop&&Y(g,{select:!0})):p===v&&s.preventDefault()}}return(s,u)=>(_(),D(f(W),{ref_key:"currentRef",ref:r,tabindex:"-1","as-child":s.asChild,as:s.as,onKeydown:d},{default:x(()=>[E(s.$slots,"default")]),_:3},8,["as-child","as"]))}});function Zo(e){return e?"open":"closed"}const Ut=O({__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:n}){const t=e,o=n,r=U(),{forwardRef:i,currentElement:l}=A();return r.titleId||(r.titleId=Ve(void 0,"radix-vue-dialog-title")),r.descriptionId||(r.descriptionId=Ve(void 0,"radix-vue-dialog-description")),fe(()=>{r.contentElement=l,X()!==document.body&&(r.triggerElement.value=X())}),(a,c)=>(_(),D(f(Qo),{"as-child":"",loop:"",trapped:t.trapFocus,onMountAutoFocus:c[5]||(c[5]=d=>o("openAutoFocus",d)),onUnmountAutoFocus:c[6]||(c[6]=d=>o("closeAutoFocus",d))},{default:x(()=>[ee(f(Vt),P({id:f(r).contentId,ref:f(i),as:a.as,"as-child":a.asChild,"disable-outside-pointer-events":a.disableOutsidePointerEvents,role:"dialog","aria-describedby":f(r).descriptionId,"aria-labelledby":f(r).titleId,"data-state":f(Zo)(f(r).open.value)},a.$attrs,{onDismiss:c[0]||(c[0]=d=>f(r).onOpenChange(!1)),onEscapeKeyDown:c[1]||(c[1]=d=>o("escapeKeyDown",d)),onFocusOutside:c[2]||(c[2]=d=>o("focusOutside",d)),onInteractOutside:c[3]||(c[3]=d=>o("interactOutside",d)),onPointerDownOutside:c[4]||(c[4]=d=>o("pointerDownOutside",d))}),{default:x(()=>[E(a.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),er=O({__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:n}){const t=e,o=n,r=U(),i=ye(o),{forwardRef:l,currentElement:a}=A();return No(a),(c,d)=>(_(),D(Ut,P({...t,...f(i)},{ref:f(l),"trap-focus":f(r).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:d[0]||(d[0]=s=>{var u;s.defaultPrevented||(s.preventDefault(),(u=f(r).triggerElement.value)==null||u.focus())}),onPointerDownOutside:d[1]||(d[1]=s=>{const u=s.detail.originalEvent,p=u.button===0&&u.ctrlKey===!0;(u.button===2||p)&&s.preventDefault()}),onFocusOutside:d[2]||(d[2]=s=>{s.preventDefault()})}),{default:x(()=>[E(c.$slots,"default")]),_:3},16,["trap-focus"]))}}),tr=O({__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:n}){const t=e,o=ye(n);A();const r=U(),i=C(!1),l=C(!1);return(a,c)=>(_(),D(Ut,P({...t,...f(o)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:c[0]||(c[0]=d=>{var s;d.defaultPrevented||(i.value||(s=f(r).triggerElement.value)==null||s.focus(),d.preventDefault()),i.value=!1,l.value=!1}),onInteractOutside:c[1]||(c[1]=d=>{var s;d.defaultPrevented||(i.value=!0,d.detail.originalEvent.type==="pointerdown"&&(l.value=!0));const u=d.target;(s=f(r).triggerElement.value)!=null&&s.contains(u)&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&l.value&&d.preventDefault()})}),{default:x(()=>[E(a.$slots,"default")]),_:3},16))}}),nr=O({__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:n}){const t=e,o=n,r=U(),i=ye(o),{forwardRef:l}=A();return(a,c)=>(_(),D(f(tt),{present:a.forceMount||f(r).open.value},{default:x(()=>[f(r).modal.value?(_(),D(er,P({key:0,ref:f(l)},{...t,...f(i),...a.$attrs}),{default:x(()=>[E(a.$slots,"default")]),_:3},16)):(_(),D(tr,P({key:1,ref:f(l)},{...t,...f(i),...a.$attrs}),{default:x(()=>[E(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),or=O({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean},as:{}},setup(e){const n=U();return bo(!0),A(),(t,o)=>(_(),D(f(W),{as:t.as,"as-child":t.asChild,"data-state":f(n).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:x(()=>[E(t.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),rr=O({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const n=U(),{forwardRef:t}=A();return(o,r)=>{var i;return(i=f(n))!=null&&i.modal.value?(_(),D(f(tt),{key:0,present:o.forceMount||f(n).open.value},{default:x(()=>[ee(or,P(o.$attrs,{ref:f(t),as:o.as,"as-child":o.asChild}),{default:x(()=>[E(o.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):gt("",!0)}}}),Yt=O({__name:"DialogClose",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const n=e;A();const t=U();return(o,r)=>(_(),D(f(W),P(n,{type:o.as==="button"?"button":void 0,onClick:r[0]||(r[0]=i=>f(t).onOpenChange(!1))}),{default:x(()=>[E(o.$slots,"default")]),_:3},16,["type"]))}}),lr=O({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{default:"h2"}},setup(e){const n=e,t=U();return A(),(o,r)=>(_(),D(f(W),P(n,{id:f(t).titleId}),{default:x(()=>[E(o.$slots,"default")]),_:3},16,["id"]))}}),ir=O({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{default:"p"}},setup(e){const n=e;A();const t=U();return(o,r)=>(_(),D(f(W),P(n,{id:f(t).descriptionId}),{default:x(()=>[E(o.$slots,"default")]),_:3},16,["id"]))}}),$r=O({__name:"AlertDialogRoot",props:{open:{type:Boolean},defaultOpen:{type:Boolean}},emits:["update:open"],setup(e,{emit:n}){const t=Ht(e,n);return A(),(o,r)=>(_(),D(f(Wo),P(f(t),{modal:!0}),{default:x(()=>[E(o.$slots,"default")]),_:3},16))}}),Rr=O({__name:"AlertDialogPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const n=e;return(t,o)=>(_(),D(f(nt),G(J(n)),{default:x(()=>[E(t.$slots,"default")]),_:3},16))}}),[ar,sr]=le("AlertDialogContent"),Nr=O({__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:n}){const t=e,o=ye(n);A();const r=C();return sr({onCancelElementChange:i=>{r.value=i}}),(i,l)=>(_(),D(f(nr),P({...t,...f(o)},{role:"alertdialog",onPointerDownOutside:l[0]||(l[0]=ke(()=>{},["prevent"])),onInteractOutside:l[1]||(l[1]=ke(()=>{},["prevent"])),onOpenAutoFocus:l[2]||(l[2]=()=>{ne(()=>{var a;(a=r.value)==null||a.focus({preventScroll:!0})})})}),{default:x(()=>[E(i.$slots,"default")]),_:3},16))}}),Sr=O({__name:"AlertDialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const n=e;return A(),(t,o)=>(_(),D(f(rr),G(J(n)),{default:x(()=>[E(t.$slots,"default")]),_:3},16))}}),Fr=O({__name:"AlertDialogCancel",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const n=e,t=ar(),{forwardRef:o,currentElement:r}=A();return fe(()=>{t.onCancelElementChange(r.value)}),(i,l)=>(_(),D(f(Yt),P(n,{ref:f(o)}),{default:x(()=>[E(i.$slots,"default")]),_:3},16))}}),Lr=O({__name:"AlertDialogTitle",props:{asChild:{type:Boolean},as:{default:"h2"}},setup(e){const n=e;return A(),(t,o)=>(_(),D(f(lr),G(J(n)),{default:x(()=>[E(t.$slots,"default")]),_:3},16))}}),Mr=O({__name:"AlertDialogDescription",props:{asChild:{type:Boolean},as:{default:"p"}},setup(e){const n=e;return A(),(t,o)=>(_(),D(f(ir),G(J(n)),{default:x(()=>[E(t.$slots,"default")]),_:3},16))}}),Ir=O({__name:"AlertDialogAction",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const n=e;return A(),(t,o)=>(_(),D(f(Yt),G(J(n)),{default:x(()=>[E(t.$slots,"default")]),_:3},16))}}),[Xt,ur]=le("PopperRoot"),dr=O({inheritAttrs:!1,__name:"PopperRoot",setup(e){const n=C();return ur({anchor:n,onAnchorChange:t=>n.value=t}),(t,o)=>E(t.$slots,"default")}}),cr=O({__name:"PopperAnchor",props:{element:{},asChild:{type:Boolean},as:{}},setup(e){const n=e,{forwardRef:t,currentElement:o}=A(),r=Xt();return M(()=>{r.onAnchorChange(n.element??o.value)}),(i,l)=>(_(),D(f(W),{ref:f(t),as:i.as,"as-child":i.asChild},{default:x(()=>[E(i.$slots,"default")]),_:3},8,["as","as-child"]))}});function fr(e){return e!==null}function pr(e){return{name:"transformOrigin",options:e,fn(n){var t,o,r;const{placement:i,rects:l,middlewareData:a}=n,c=((t=a.arrow)==null?void 0:t.centerOffset)!==0,d=c?0:e.arrowWidth,s=c?0:e.arrowHeight,[u,p]=ze(i),v={start:"0%",center:"50%",end:"100%"}[p],h=(((o=a.arrow)==null?void 0:o.x)??0)+d/2,g=(((r=a.arrow)==null?void 0:r.y)??0)+s/2;let m="",y="";return u==="bottom"?(m=c?v:`${h}px`,y=`${-s}px`):u==="top"?(m=c?v:`${h}px`,y=`${l.floating.height+s}px`):u==="right"?(m=`${-s}px`,y=c?v:`${g}px`):u==="left"&&(m=`${l.floating.width+s}px`,y=c?v:`${g}px`),{data:{x:m,y}}}}}function ze(e){const[n,t="center"]=e.split("-");return[n,t]}const vr={side:"bottom",sideOffset:0,align:"center",alignOffset:0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,updatePositionStrategy:"optimized",prioritizePosition:!1},[hr,mr]=le("PopperContent"),yr=O({inheritAttrs:!1,__name:"PopperContent",props:cn({side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},{...vr}),emits:["placed"],setup(e,{emit:n}){const t=e,o=n,r=Xt(),{forwardRef:i,currentElement:l}=A(),a=C(),c=C(),{width:d,height:s}=Fo(c),u=w(()=>t.side+(t.align!=="center"?`-${t.align}`:"")),p=w(()=>typeof t.collisionPadding=="number"?t.collisionPadding:{top:0,right:0,bottom:0,left:0,...t.collisionPadding}),v=w(()=>Array.isArray(t.collisionBoundary)?t.collisionBoundary:[t.collisionBoundary]),h=w(()=>({padding:p.value,boundary:v.value.filter(fr),altBoundary:v.value.length>0})),g=Qn(()=>[jn({mainAxis:t.sideOffset+s.value,alignmentAxis:t.alignOffset}),t.prioritizePosition&&t.avoidCollisions&&ut({...h.value}),t.avoidCollisions&&Kn({mainAxis:!0,crossAxis:!!t.prioritizePosition,limiter:t.sticky==="partial"?Yn():void 0,...h.value}),!t.prioritizePosition&&t.avoidCollisions&&ut({...h.value}),Vn({...h.value,apply:({elements:N,rects:rt,availableWidth:we,availableHeight:be})=>{const{width:xe,height:Jt}=rt.reference,Ce=N.floating.style;Ce.setProperty("--radix-popper-available-width",`${we}px`),Ce.setProperty("--radix-popper-available-height",`${be}px`),Ce.setProperty("--radix-popper-anchor-width",`${xe}px`),Ce.setProperty("--radix-popper-anchor-height",`${Jt}px`)}}),c.value&&Gn({element:c.value,padding:t.arrowPadding}),pr({arrowWidth:d.value,arrowHeight:s.value}),t.hideWhenDetached&&zn({strategy:"referenceHidden",...h.value})]),{floatingStyles:m,placement:y,isPositioned:B,middlewareData:b}=Jn(r.anchor,a,{strategy:"fixed",placement:u,whileElementsMounted:(...N)=>Hn(...N,{animationFrame:t.updatePositionStrategy==="always"}),middleware:g}),$=w(()=>ze(y.value)[0]),R=w(()=>ze(y.value)[1]);fn(()=>{B.value&&o("placed")});const L=w(()=>{var N;return((N=b.value.arrow)==null?void 0:N.centerOffset)!==0}),T=C("");M(()=>{l.value&&(T.value=window.getComputedStyle(l.value).zIndex)});const H=w(()=>{var N;return((N=b.value.arrow)==null?void 0:N.x)??0}),ge=w(()=>{var N;return((N=b.value.arrow)==null?void 0:N.y)??0});return mr({placedSide:$,onArrowChange:N=>c.value=N,arrowX:H,arrowY:ge,shouldHideArrow:L}),(N,rt)=>{var we,be,xe;return _(),Ot("div",{ref_key:"floatingRef",ref:a,"data-radix-popper-content-wrapper":"",style:Ye({...f(m),transform:f(B)?f(m).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:T.value,"--radix-popper-transform-origin":[(we=f(b).transformOrigin)==null?void 0:we.x,(be=f(b).transformOrigin)==null?void 0:be.y].join(" "),...((xe=f(b).hide)==null?void 0:xe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}})},[ee(f(W),P({ref:f(i)},N.$attrs,{"as-child":t.asChild,as:N.as,"data-side":$.value,"data-align":R.value,style:{animation:f(B)?void 0:"none"}}),{default:x(()=>[E(N.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4)}}}),gr=pn("polygon",{points:"0,0 30,0 15,10"},null,-1),wr=O({__name:"Arrow",props:{width:{default:10},height:{default:5},asChild:{type:Boolean},as:{default:"svg"}},setup(e){const n=e;return A(),(t,o)=>(_(),D(f(W),P(n,{width:t.width,height:t.height,viewBox:t.asChild?void 0:"0 0 30 10",preserveAspectRatio:t.asChild?void 0:"none"}),{default:x(()=>[E(t.$slots,"default",{},()=>[gr])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}}),br={top:"bottom",right:"left",bottom:"top",left:"right"},xr=O({inheritAttrs:!1,__name:"PopperArrow",props:{width:{},height:{},asChild:{type:Boolean},as:{default:"svg"}},setup(e){const{forwardRef:n}=A(),t=hr(),o=w(()=>br[t.placedSide.value]);return(r,i)=>{var l,a,c,d;return _(),Ot("span",{ref:s=>{f(t).onArrowChange(s)},style:Ye({position:"absolute",left:(l=f(t).arrowX)!=null&&l.value?`${(a=f(t).arrowX)==null?void 0:a.value}px`:void 0,top:(c=f(t).arrowY)!=null&&c.value?`${(d=f(t).arrowY)==null?void 0:d.value}px`:void 0,[o.value]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[f(t).placedSide.value],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[f(t).placedSide.value],visibility:f(t).shouldHideArrow.value?"hidden":void 0})},[ee(wr,P(r.$attrs,{ref:f(n),style:{display:"block"},as:r.as,"as-child":r.asChild,width:r.width,height:r.height}),{default:x(()=>[E(r.$slots,"default")]),_:3},16,["as","as-child","width","height"])],4)}}}),Cr=O({__name:"VisuallyHidden",props:{asChild:{type:Boolean},as:{default:"span"}},setup(e){return A(),(n,t)=>(_(),D(f(W),{as:n.as,"as-child":n.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:x(()=>[E(n.$slots,"default")]),_:3},8,["as","as-child"]))}});function Or(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}Or();const qt="tooltip.open",[ot,Er]=le("TooltipProvider"),kr=O({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 n=e,{delayDuration:t,skipDelayDuration:o,disableHoverableContent:r,disableClosingTrigger:i,ignoreNonKeyboardFocus:l,disabled:a}=Ue(n);A();const c=C(!0),d=C(!1),{start:s,stop:u}=Lt(()=>{c.value=!0},o,{immediate:!1});return Er({isOpenDelayed:c,delayDuration:t,onOpen(){u(),c.value=!1},onClose(){s()},isPointerInTransitRef:d,disableHoverableContent:r,disableClosingTrigger:i,disabled:a,ignoreNonKeyboardFocus:l}),(p,v)=>E(p.$slots,"default")}}),[Ne,_r]=le("TooltipRoot"),Wr=O({__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:n}){const t=e,o=n;A();const r=ot(),i=w(()=>t.disableHoverableContent??r.disableHoverableContent.value),l=w(()=>t.disableClosingTrigger??r.disableClosingTrigger.value),a=w(()=>t.disabled??r.disabled.value),c=w(()=>t.delayDuration??r.delayDuration.value),d=w(()=>t.ignoreNonKeyboardFocus??r.ignoreNonKeyboardFocus.value),s=Mt(t,"open",o,{defaultValue:t.defaultOpen,passive:t.open===void 0});F(s,b=>{r.onClose&&(b?(r.onOpen(),document.dispatchEvent(new CustomEvent(qt))):r.onClose())});const u=C(!1),p=C(),v=w(()=>s.value?u.value?"delayed-open":"instant-open":"closed"),{start:h,stop:g}=Lt(()=>{u.value=!0,s.value=!0},c,{immediate:!1});function m(){g(),u.value=!1,s.value=!0}function y(){g(),s.value=!1}function B(){h()}return _r({contentId:"",open:s,stateAttribute:v,trigger:p,onTriggerChange(b){p.value=b},onTriggerEnter(){r.isOpenDelayed.value?B():m()},onTriggerLeave(){i.value?y():g()},onOpen:m,onClose:y,disableHoverableContent:i,disableClosingTrigger:l,disabled:a,ignoreNonKeyboardFocus:d}),(b,$)=>(_(),D(f(dr),null,{default:x(()=>[E(b.$slots,"default",{open:f(s)})]),_:3}))}}),Hr=O({__name:"TooltipTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const n=e,t=Ne(),o=ot();t.contentId||(t.contentId=Ve(void 0,"radix-vue-tooltip-content"));const{forwardRef:r,currentElement:i}=A(),l=C(!1),a=C(!1),c=w(()=>t.disabled.value?{}:{click:g,focus:v,pointermove:u,pointerleave:p,pointerdown:s,blur:h});fe(()=>{t.onTriggerChange(i.value)});function d(){setTimeout(()=>{l.value=!1},1)}function s(){l.value=!0,document.addEventListener("pointerup",d,{once:!0})}function u(m){m.pointerType!=="touch"&&!a.value&&!o.isPointerInTransitRef.value&&(t.onTriggerEnter(),a.value=!0)}function p(){t.onTriggerLeave(),a.value=!1}function v(m){var y,B;l.value||t.ignoreNonKeyboardFocus.value&&!((B=(y=m.target).matches)!=null&&B.call(y,":focus-visible"))||t.onOpen()}function h(){t.onClose()}function g(){t.disableClosingTrigger.value||t.onClose()}return(m,y)=>(_(),D(f(cr),{"as-child":""},{default:x(()=>[ee(f(W),P({ref:f(r),"aria-describedby":f(t).open.value?f(t).contentId:void 0,"data-state":f(t).stateAttribute.value,as:m.as,"as-child":n.asChild,"data-grace-area-trigger":""},tn(c.value)),{default:x(()=>[E(m.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3}))}}),Gt=O({__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:n}){const t=e,o=n,r=Ne(),{forwardRef:i}=A(),l=an(),a=w(()=>{var s;return(s=l.default)==null?void 0:s.call(l)}),c=w(()=>{var s;if(t.ariaLabel)return t.ariaLabel;let u="";function p(v){typeof v.children=="string"&&v.type!==xt?u+=v.children:Array.isArray(v.children)&&v.children.forEach(h=>p(h))}return(s=a.value)==null||s.forEach(v=>p(v)),u}),d=w(()=>{const{ariaLabel:s,...u}=t;return u});return fe(()=>{Te(window,"scroll",s=>{const u=s.target;u!=null&&u.contains(r.trigger.value)&&r.onClose()}),Te(window,qt,r.onClose)}),(s,u)=>(_(),D(f(Vt),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:u[0]||(u[0]=p=>o("escapeKeyDown",p)),onPointerDownOutside:u[1]||(u[1]=p=>{var v;f(r).disableClosingTrigger.value&&(v=f(r).trigger.value)!=null&&v.contains(p.target)&&p.preventDefault(),o("pointerDownOutside",p)}),onFocusOutside:u[2]||(u[2]=ke(()=>{},["prevent"])),onDismiss:u[3]||(u[3]=p=>f(r).onClose())},{default:x(()=>[ee(f(yr),P({ref:f(i),"data-state":f(r).stateAttribute.value},{...s.$attrs,...d.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:x(()=>[E(s.$slots,"default"),ee(f(Cr),{id:f(r).contentId,role:"tooltip"},{default:x(()=>[sn(un(c.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),Dr=O({__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 n=Wt(e),{forwardRef:t,currentElement:o}=A(),{trigger:r,onClose:i}=Ne(),l=ot(),{isPointerInTransit:a,onPointerExit:c}=Co(r,o);return l.isPointerInTransitRef=a,c(()=>{i()}),(d,s)=>(_(),D(Gt,P({ref:f(t)},f(n)),{default:x(()=>[E(d.$slots,"default")]),_:3},16))}}),jr=O({__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:n}){const t=e,o=n,r=Ne(),i=Ht(t,o),{forwardRef:l}=A();return(a,c)=>(_(),D(f(tt),{present:a.forceMount||f(r).open.value},{default:x(()=>[(_(),D(nn(f(r).disableHoverableContent.value?Gt:Dr),P({ref:f(l)},f(i)),{default:x(()=>[E(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Kr=O({__name:"TooltipArrow",props:{width:{default:10},height:{default:5},asChild:{type:Boolean},as:{default:"svg"}},setup(e){const n=e;return A(),(t,o)=>(_(),D(f(xr),G(J(n)),{default:x(()=>[E(t.$slots,"default")]),_:3},16))}}),Vr=O({__name:"TooltipPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const n=e;return(t,o)=>(_(),D(f(nt),G(J(n)),{default:x(()=>[E(t.$slots,"default")]),_:3},16))}});export{rr as $,Rr as A,lr as B,Mr as F,Kr as G,kr as H,Pr as I,Fr as M,Ir as N,Nr as O,nr as P,$r as T,jr as U,Lr as V,Wr as W,Hr as j,Sr as k,Wo as n,Vr as q}; diff --git a/assets/index-BwLPbeOe.js b/assets/index-BwLPbeOe.js deleted file mode 100644 index 9c4962cb8ef35cb6190db1c155886f90f496cd7d..0000000000000000000000000000000000000000 --- a/assets/index-BwLPbeOe.js +++ /dev/null @@ -1,3 +0,0 @@ -function v(m){const s=Object.values(m).filter(a=>typeof a=="number");return Object.entries(m).filter(([a,t])=>s.indexOf(+a)===-1).map(([a,t])=>t)}class j{constructor(){this._map=new WeakMap,this._idmap=new Map}add(s,...i){const a=i[0];if(this._map.set(s,a),a&&typeof a=="object"&&"id"in a){if(this._idmap.has(a.id))throw new Error(`ID ${a.id} already exists in the registry`);this._idmap.set(a.id,s)}return this}remove(s){return this._map.delete(s),this}get(s){const i=s._zod.parent;if(i){const a={...this.get(i)??{}};return delete a.id,{...a,...this._map.get(s)}}return this._map.get(s)}has(s){return this._map.has(s)}}function T(){return new j}const N=T();class S{constructor(s){this.counter=0,this.metadataRegistry=(s==null?void 0:s.metadata)??N,this.target=(s==null?void 0:s.target)??"draft-2020-12",this.unrepresentable=(s==null?void 0:s.unrepresentable)??"throw",this.override=(s==null?void 0:s.override)??(()=>{}),this.io=(s==null?void 0:s.io)??"output",this.seen=new Map}process(s,i={path:[],schemaPath:[]}){var k;var a;const t=s._zod.def,y={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},g=this.seen.get(s);if(g)return g.count++,i.schemaPath.includes(s)&&(g.cycle=i.path),g.schema;const l={schema:{},count:1,cycle:void 0};this.seen.set(s,l),s._zod.toJSONSchema&&(l.schema=s._zod.toJSONSchema());const o={...i,schemaPath:[...i.schemaPath,s],path:i.path},b=s._zod.parent;if(b)l.ref=b,this.process(b,o),this.seen.get(b).isParent=!0;else{const u=l.schema;switch(t.type){case"string":{const e=u;e.type="string";const{minimum:n,maximum:r,format:c,patterns:f,contentEncoding:h}=s._zod.bag;if(typeof n=="number"&&(e.minLength=n),typeof r=="number"&&(e.maxLength=r),c&&(e.format=y[c]??c,e.format===""&&delete e.format),h&&(e.contentEncoding=h),f&&f.size>0){const d=[...f];d.length===1?e.pattern=d[0].source:d.length>1&&(l.schema.allOf=[...d.map(O=>({...this.target==="draft-7"?{type:"string"}:{},pattern:O.source}))])}break}case"number":{const e=u,{minimum:n,maximum:r,format:c,multipleOf:f,exclusiveMaximum:h,exclusiveMinimum:d}=s._zod.bag;typeof c=="string"&&c.includes("int")?e.type="integer":e.type="number",typeof d=="number"&&(e.exclusiveMinimum=d),typeof n=="number"&&(e.minimum=n,typeof d=="number"&&(d>=n?delete e.minimum:delete e.exclusiveMinimum)),typeof h=="number"&&(e.exclusiveMaximum=h),typeof r=="number"&&(e.maximum=r,typeof h=="number"&&(h<=r?delete e.maximum:delete e.exclusiveMaximum)),typeof f=="number"&&(e.multipleOf=f);break}case"boolean":{const e=u;e.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"undefined":{const e=u;e.type="null";break}case"null":{u.type="null";break}case"any":break;case"unknown":break;case"never":{u.not={};break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{const e=u,{minimum:n,maximum:r}=s._zod.bag;typeof n=="number"&&(e.minItems=n),typeof r=="number"&&(e.maxItems=r),e.type="array",e.items=this.process(t.element,{...o,path:[...o.path,"items"]});break}case"object":{const e=u;e.type="object",e.properties={};const n=t.shape;for(const f in n)e.properties[f]=this.process(n[f],{...o,path:[...o.path,"properties",f]});const r=new Set(Object.keys(n)),c=new Set([...r].filter(f=>{const h=t.shape[f]._zod;return this.io==="input"?h.optin===void 0:h.optout===void 0}));c.size>0&&(e.required=Array.from(c)),((k=t.catchall)==null?void 0:k._zod.def.type)==="never"?e.additionalProperties=!1:t.catchall?t.catchall&&(e.additionalProperties=this.process(t.catchall,{...o,path:[...o.path,"additionalProperties"]})):this.io==="output"&&(e.additionalProperties=!1);break}case"union":{const e=u;e.anyOf=t.options.map((n,r)=>this.process(n,{...o,path:[...o.path,"anyOf",r]}));break}case"intersection":{const e=u,n=this.process(t.left,{...o,path:[...o.path,"allOf",0]}),r=this.process(t.right,{...o,path:[...o.path,"allOf",1]}),c=h=>"allOf"in h&&Object.keys(h).length===1,f=[...c(n)?n.allOf:[n],...c(r)?r.allOf:[r]];e.allOf=f;break}case"tuple":{const e=u;e.type="array";const n=t.items.map((f,h)=>this.process(f,{...o,path:[...o.path,"prefixItems",h]}));if(this.target==="draft-2020-12"?e.prefixItems=n:e.items=n,t.rest){const f=this.process(t.rest,{...o,path:[...o.path,"items"]});this.target==="draft-2020-12"?e.items=f:e.additionalItems=f}t.rest&&(e.items=this.process(t.rest,{...o,path:[...o.path,"items"]}));const{minimum:r,maximum:c}=s._zod.bag;typeof r=="number"&&(e.minItems=r),typeof c=="number"&&(e.maxItems=c);break}case"record":{const e=u;e.type="object",e.propertyNames=this.process(t.keyType,{...o,path:[...o.path,"propertyNames"]}),e.additionalProperties=this.process(t.valueType,{...o,path:[...o.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{const e=u,n=v(t.entries);n.every(r=>typeof r=="number")&&(e.type="number"),n.every(r=>typeof r=="string")&&(e.type="string"),e.enum=n;break}case"literal":{const e=u,n=[];for(const r of t.values)if(r===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof r=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");n.push(Number(r))}else n.push(r);if(n.length!==0)if(n.length===1){const r=n[0];e.type=r===null?"null":typeof r,e.const=r}else n.every(r=>typeof r=="number")&&(e.type="number"),n.every(r=>typeof r=="string")&&(e.type="string"),n.every(r=>typeof r=="boolean")&&(e.type="string"),n.every(r=>r===null)&&(e.type="null"),e.enum=n;break}case"file":{const e=u,n={type:"string",format:"binary",contentEncoding:"binary"},{minimum:r,maximum:c,mime:f}=s._zod.bag;r!==void 0&&(n.minLength=r),c!==void 0&&(n.maxLength=c),f?f.length===1?(n.contentMediaType=f[0],Object.assign(e,n)):e.anyOf=f.map(h=>({...n,contentMediaType:h})):Object.assign(e,n);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{const e=this.process(t.innerType,o);u.anyOf=[e,{type:"null"}];break}case"nonoptional":{this.process(t.innerType,o),l.ref=t.innerType;break}case"success":{const e=u;e.type="boolean";break}case"default":{this.process(t.innerType,o),l.ref=t.innerType,u.default=t.defaultValue;break}case"prefault":{this.process(t.innerType,o),l.ref=t.innerType,this.io==="input"&&(u._prefault=t.defaultValue);break}case"catch":{this.process(t.innerType,o),l.ref=t.innerType;let e;try{e=t.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}u.default=e;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{const e=u,n=s._zod.pattern;if(!n)throw new Error("Pattern not found in template literal");e.type="string",e.pattern=n.source;break}case"pipe":{const e=this.io==="input"?t.in._zod.def.type==="transform"?t.out:t.in:t.out;this.process(e,o),l.ref=e;break}case"readonly":{this.process(t.innerType,o),l.ref=t.innerType,u.readOnly=!0;break}case"promise":{this.process(t.innerType,o),l.ref=t.innerType;break}case"optional":{this.process(t.innerType,o),l.ref=t.innerType;break}case"lazy":{const e=s._zod.innerType;this.process(e,o),l.ref=e;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}}}const w=this.metadataRegistry.get(s);return w&&Object.assign(l.schema,w),this.io==="input"&&p(s)&&(delete l.schema.examples,delete l.schema.default),this.io==="input"&&l.schema._prefault&&((a=l.schema).default??(a.default=l.schema._prefault)),delete l.schema._prefault,this.seen.get(s).schema}emit(s,i){var w,x,k,u;const a={cycles:(i==null?void 0:i.cycles)??"ref",reused:(i==null?void 0:i.reused)??"inline",external:(i==null?void 0:i.external)??void 0},t=this.seen.get(s);if(!t)throw new Error("Unprocessed schema. This is a bug in Zod.");const y=e=>{var h;const n=this.target==="draft-2020-12"?"$defs":"definitions";if(a.external){const d=(h=a.external.registry.get(e[0]))==null?void 0:h.id;if(d)return{ref:a.external.uri(d)};const O=e[1].defId??e[1].schema.id??`schema${this.counter++}`;return e[1].defId=O,{defId:O,ref:`${a.external.uri("__shared")}#/${n}/${O}`}}if(e[1]===t)return{ref:"#"};const c=`#/${n}/`,f=e[1].schema.id??`__schema${this.counter++}`;return{defId:f,ref:c+f}},g=e=>{if(e[1].schema.$ref)return;const n=e[1],{ref:r,defId:c}=y(e);n.def={...n.schema},c&&(n.defId=c);const f=n.schema;for(const h in f)delete f[h];f.$ref=r};for(const e of this.seen.entries()){const n=e[1];if(s===e[0]){g(e);continue}if(a.external){const c=(w=a.external.registry.get(e[0]))==null?void 0:w.id;if(s!==e[0]&&c){g(e);continue}}if((x=this.metadataRegistry.get(e[0]))==null?void 0:x.id){g(e);continue}if(n.cycle){if(a.cycles==="throw")throw new Error(`Cycle detected: #/${(k=n.cycle)==null?void 0:k.join("/")}/ - -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);a.cycles==="ref"&&g(e);continue}if(n.count>1&&a.reused==="ref"){g(e);continue}}const l=(e,n)=>{const r=this.seen.get(e),c=r.def??r.schema,f={...c};if(r.ref===null)return;const h=r.ref;if(r.ref=null,h){l(h,n);const d=this.seen.get(h).schema;d.$ref&&n.target==="draft-7"?(c.allOf=c.allOf??[],c.allOf.push(d)):(Object.assign(c,d),Object.assign(c,f))}r.isParent||this.override({zodSchema:e,jsonSchema:c})};for(const e of[...this.seen.entries()].reverse())l(e[0],{target:this.target});const o={};this.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?o.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),Object.assign(o,t.def);const b=((u=a.external)==null?void 0:u.defs)??{};for(const e of this.seen.entries()){const n=e[1];n.def&&n.defId&&(b[n.defId]=n.def)}!a.external&&Object.keys(b).length>0&&(this.target==="draft-2020-12"?o.$defs=b:o.definitions=b);try{return JSON.parse(JSON.stringify(o))}catch{throw new Error("Error converting schema to JSON.")}}}function E(m,s){if(m instanceof j){const a=new S(s),t={};for(const l of m._idmap.entries()){const[o,b]=l;a.process(b)}const y={},g={registry:m,uri:(s==null?void 0:s.uri)||(l=>l),defs:t};for(const l of m._idmap.entries()){const[o,b]=l;y[o]=a.emit(b,{...s,external:g})}if(Object.keys(t).length>0){const l=a.target==="draft-2020-12"?"$defs":"definitions";y.__shared={[l]:t}}return{schemas:y}}const i=new S(s);return i.process(m),i.emit(m,s)}function p(m,s){const i=s??{seen:new Set};if(i.seen.has(m))return!1;i.seen.add(m);const t=m._zod.def;switch(t.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return p(t.element,i);case"object":{for(const y in t.shape)if(p(t.shape[y],i))return!0;return!1}case"union":{for(const y of t.options)if(p(y,i))return!0;return!1}case"intersection":return p(t.left,i)||p(t.right,i);case"tuple":{for(const y of t.items)if(p(y,i))return!0;return!!(t.rest&&p(t.rest,i))}case"record":return p(t.keyType,i)||p(t.valueType,i);case"map":return p(t.keyType,i)||p(t.valueType,i);case"set":return p(t.valueType,i);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return p(t.innerType,i);case"lazy":return p(t.getter(),i);case"default":return p(t.innerType,i);case"prefault":return p(t.innerType,i);case"custom":return!1;case"transform":return!0;case"pipe":return p(t.in,i)||p(t.out,i);case"success":return!1;case"catch":return!1}throw new Error(`Unknown schema type: ${t.type}`)}export{j as $ZodRegistry,S as JSONSchemaGenerator,N as globalRegistry,T as registry,E as toJSONSchema}; diff --git a/assets/index-aU1mpMhC.js b/assets/index-C0tBWPUO.js similarity index 91% rename from assets/index-aU1mpMhC.js rename to assets/index-C0tBWPUO.js index dfb4d82789dfef9eb5aaa5a6c2585374916d5c04..58d35c2f92141231f2f1f95db0499223b10d1640 100644 --- a/assets/index-aU1mpMhC.js +++ b/assets/index-C0tBWPUO.js @@ -1 +1 @@ -import{d as q,cf as X,cg as Y,f as C,bk as T,o as i,bl as z,a,X as E,bh as G,ch as H,Y as u,c,c6 as A,c7 as F,ci as K,u as r,$ as Z,a0 as ee,e as x,w as te,c5 as ae,b as h,bm as O,cd as le,W as S}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as re}from"./airi-card-Cgw9OiDq.js";import{k as se}from"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as oe}from"./InputFile.vue_vue_type_script_setup_true_lang-Bt1GPBFc.js";import{_ as ne}from"./CardDetailDialog.vue_vue_type_script_setup_true_lang-CpnZ7KCX.js";import{_ as ie}from"./CardListItem.vue_vue_type_script_setup_true_lang-BCZkjfDb.js";import{_ as de}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-DmSmyxCs.js";import{b as U}from"./route-block-B_A1xBdJ.js";import"./consciousness-CI5ipeHX.js";import"./providers-7GsMyC_3.js";import"./index-LHmcipjy.js";import"./speech-DRmXCXwq.js";import"./floating-ui.core-CgBsuaUc.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import"./index-DeGbjSQn.js";const ue={class:"flex-1 truncate"},ce={class:"min-w-[160px] flex flex-col gap-0.5 border border-neutral-200 rounded-lg bg-white p-1 shadow-lg dark:border-neutral-800 dark:bg-neutral-900"},me=["onClick"],pe=q({__name:"Select",props:X({options:null,placeholder:null,disabled:{type:Boolean},title:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(V){const s=V,p=Y(V,"modelValue"),y=C(()=>{const n=s.options.find(f=>f.value===p.value);return n?n.label:s.placeholder});function $(n){p.value=n}return(n,f)=>(i(),T(r(se),{"auto-size":"","auto-boundary-max-size":""},{popper:z(({hide:g})=>[a("div",ce,[(i(!0),c(A,null,F(s.options,d=>(i(),c("div",K({ref_for:!0},{...n.$attrs,class:null,style:null},{key:d.value,class:["cursor-pointer rounded px-2 py-1.5 text-sm text-neutral-700 hover:bg-neutral-100 dark:text-neutral-200 dark:hover:bg-neutral-800",{"bg-neutral-100 dark:bg-neutral-800":p.value===d.value}],onClick:b=>{$(d.value),g()}}),u(d.label),17,me))),128))])]),default:z(()=>[a("div",{class:E(["min-w-[160px] flex cursor-pointer items-center justify-between gap-2 border rounded-lg bg-white p-2.5 text-xs text-neutral-700 shadow-sm outline-none transition-colors disabled:cursor-not-allowed dark:border-neutral-800 dark:bg-neutral-900 disabled:bg-neutral-100 hover:bg-neutral-50 dark:text-neutral-200 disabled:text-neutral-400 focus:ring-2 focus:ring-black/10 dark:disabled:bg-neutral-800 dark:hover:bg-neutral-800 dark:disabled:text-neutral-600",{"pointer-events-none":s.disabled}])},[a("div",ue,[G(n.$slots,"default",{label:y.value},()=>[H(u(y.value),1)])]),f[0]||(f[0]=a("div",{"i-solar:alt-arrow-down-bold-duotone":"",class:"h-3.5 w-3.5 text-neutral-500 dark:text-neutral-400"},null,-1))],2)]),_:3}))}}),fe={"rounded-xl":"","p-4":"",flex:"~ col gap-4"},ve={flex:"~ row","flex-wrap":"","items-center":"","justify-between":"","gap-4":""},xe={class:"relative min-w-[200px] flex-1","inline-flex":"~","w-full":"","items-center":""},ge=["placeholder"],be={class:"relative flex flex-row justify-start gap-2 lg:flex-col"},_e={class:"top-[-32px] whitespace-nowrap text-sm text-neutral-500 leading-10 lg:absolute dark:text-neutral-400"},ke={key:0,flex:"","flex-col":"","items-center":""},ye={"font-medium":"",text:"neutral-600 dark:neutral-300"},we={text:"neutral-500 dark:neutral-400","mt-2":"","text-sm":""},he={key:1,flex:"","flex-col":"","items-center":""},Ce={"font-medium":"",text:"primary-600 dark:primary-300"},Ve={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"},$e={key:2,class:"col-span-full flex items-center gap-3 border-2 border-amber-200 rounded-xl bg-amber-50/80 p-4 dark:border-amber-800 dark:bg-amber-900/30"},De={class:"flex flex-col"},Se={class:"font-medium"},ze={class:"text-sm text-amber-600 dark:text-amber-400"},Ae={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":""},Ne=q({__name:"index",setup(V){const{t:s}=Z(),p=re(),{addCard:y,removeCard:$}=p,{cards:n,activeCardId:f}=ee(p),g=x(""),d=x(!1),b=x(""),_=x("nameAsc"),D=x([]);te(D,async l=>{const e=l[0];if(e)try{const o=await e.text(),m=JSON.parse(o);g.value=y(m),d.value=!0}catch(o){console.error("Error processing card file:",o)}});const N=C(()=>Array.from(n.value.entries()).map(([l,e])=>({id:l,name:e.name,description:e.description}))),I=C(()=>{if(!b.value)return N.value;const l=b.value.toLowerCase();return N.value.filter(e=>e.name.toLowerCase().includes(l)||e.description&&e.description.toLowerCase().includes(l))}),j=C(()=>{const l=[...I.value];return _.value==="nameAsc"?l.sort((e,o)=>e.name.localeCompare(o.name)):_.value==="nameDesc"?l.sort((e,o)=>o.name.localeCompare(e.name)):_.value==="recent"?l.sort((e,o)=>o.id.localeCompare(e.id)):l}),w=x(!1),v=x(null);function J(){v.value&&($(v.value),v.value=null,w.value=!1)}function P(l){v.value=l,w.value=!0}function Q(l){g.value=l,d.value=!0}function R(l){f.value=l}function W(l){const e=n.value.get(l);return(e==null?void 0:e.version)||"1.0.0"}function B(l,e){var t,k,L,M;const o=n.value.get(l);if(!o||!((k=(t=o.extensions)==null?void 0:t.airi)!=null&&k.modules))return"default";const m=o.extensions.airi.modules;return e==="consciousness"?(L=m.consciousness)!=null&&L.model&&m.consciousness.model.split("-").pop()||"default":e==="voice"&&((M=m.speech)==null?void 0:M.voice_id)||"default"}return(l,e)=>{var m;const o=ae("motion");return i(),c(A,null,[a("div",fe,[a("div",ve,[a("div",xe,[e[6]||(e[6]=a("div",{class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},[a("div",{"i-solar:magnifer-line-duotone":"",class:"text-neutral-500 dark:text-neutral-400"})],-1)),O(a("input",{"onUpdate:modelValue":e[0]||(e[0]=t=>b.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(s)("settings.pages.card.search")},null,8,ge),[[le,b.value]])]),a("div",be,[a("div",_e,u(r(s)("settings.pages.card.sort_by"))+": ",1),h(r(pe),{modelValue:_.value,"onUpdate:modelValue":e[1]||(e[1]=t=>_.value=t),options:[{value:"nameAsc",label:r(s)("settings.pages.card.name_asc")},{value:"nameDesc",label:r(s)("settings.pages.card.name_desc")},{value:"recent",label:r(s)("settings.pages.card.recent")}],placeholder:"Select sort option",class:"min-w-[150px]"},null,8,["modelValue","options"])])]),a("div",{class:E(["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(n).size>0}])},[h(r(oe),{modelValue:D.value,"onUpdate:modelValue":e[2]||(e[2]=t=>D.value=t),accept:"*.json"},{default:z(({isDragging:t})=>[t?(i(),c("div",he,[e[8]||(e[8]=a("div",{"i-solar:upload-minimalistic-bold":"",class:"mb-2 text-5xl text-primary-500 dark:text-primary-400"},null,-1)),a("p",Ce,u(r(s)("settings.pages.card.drop_here")),1)])):(i(),c("div",ke,[e[7]||(e[7]=a("div",{"i-solar:upload-square-line-duotone":"","mb-4":"","text-5xl":"",text:"neutral-400 dark:neutral-500"},null,-1)),a("p",ye,u(r(s)("settings.pages.card.upload")),1),a("p",we,u(r(s)("settings.pages.card.upload_desc")),1)]))]),_:1},8,["modelValue"]),r(n).size>0?(i(!0),c(A,{key:0},F(j.value,t=>(i(),T(ie,{id:t.id,key:t.id,name:t.name,description:t.description,"is-active":t.id===r(f),"is-selected":t.id===g.value&&d.value,version:W(t.id),"consciousness-model":B(t.id,"consciousness"),"voice-model":B(t.id,"voice"),onSelect:k=>Q(t.id),onActivate:k=>R(t.id),onDelete:k=>P(t.id)},null,8,["id","name","description","is-active","is-selected","version","consciousness-model","voice-model","onSelect","onActivate","onDelete"]))),128)):S("",!0),r(n).size===0?(i(),c("div",Ve,[e[9]||(e[9]=a("div",{"i-solar:card-search-broken":"","mx-auto":"","mb-3":"","text-6xl":"","text-neutral-400":""},null,-1)),a("p",null,u(r(s)("settings.pages.card.no_cards")),1)])):S("",!0),b.value&&j.value.length===0?(i(),c("div",$e,[e[10]||(e[10]=a("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),a("div",De,[a("span",Se,u(r(s)("settings.pages.card.no_results")),1),a("span",ze,u(r(s)("settings.pages.card.try_different_search")),1)])])):S("",!0)],2)]),h(de,{modelValue:w.value,"onUpdate:modelValue":e[3]||(e[3]=t=>w.value=t),"card-name":v.value?(m=r(p).getCard(v.value))==null?void 0:m.name:"",onConfirm:J,onCancel:e[4]||(e[4]=t=>v.value=null)},null,8,["modelValue","card-name"]),h(ne,{modelValue:d.value,"onUpdate:modelValue":e[5]||(e[5]=t=>d.value=t),"card-id":g.value},null,8,["modelValue","card-id"]),O((i(),c("div",Ae,e[11]||(e[11]=[a("div",{text:"60","i-solar:emoji-funny-square-bold-duotone":""},null,-1)]))),[[o]])],64)}}});typeof U=="function"&&U(Ne);export{Ne as default}; +import{d as q,cf as X,cg as Y,f as C,bk as T,o as i,bl as z,a,X as E,bh as G,ch as H,Y as u,c,c6 as A,c7 as F,ci as K,u as r,$ as Z,a0 as ee,e as x,w as te,c5 as ae,b as h,bm as O,cd as le,W as S}from"./index-8LjpXIG7.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{u as re}from"./airi-card-COPhkSXD.js";import{k as se}from"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{_ as oe}from"./InputFile.vue_vue_type_script_setup_true_lang-CAuLzFBg.js";import{_ as ne}from"./CardDetailDialog.vue_vue_type_script_setup_true_lang-BUKUzwWl.js";import{_ as ie}from"./CardListItem.vue_vue_type_script_setup_true_lang-B1Jpvh2O.js";import{_ as de}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-CAMkB22k.js";import{b as U}from"./route-block-B_A1xBdJ.js";import"./consciousness-DSqUYfGS.js";import"./providers-Dhn8Iy_2.js";import"./index-LHmcipjy.js";import"./speech-BUPJbslH.js";import"./floating-ui.core-CgBsuaUc.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import"./index-BuTdizGl.js";const ue={class:"flex-1 truncate"},ce={class:"min-w-[160px] flex flex-col gap-0.5 border border-neutral-200 rounded-lg bg-white p-1 shadow-lg dark:border-neutral-800 dark:bg-neutral-900"},me=["onClick"],pe=q({__name:"Select",props:X({options:null,placeholder:null,disabled:{type:Boolean},title:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(V){const s=V,p=Y(V,"modelValue"),y=C(()=>{const n=s.options.find(f=>f.value===p.value);return n?n.label:s.placeholder});function $(n){p.value=n}return(n,f)=>(i(),T(r(se),{"auto-size":"","auto-boundary-max-size":""},{popper:z(({hide:g})=>[a("div",ce,[(i(!0),c(A,null,F(s.options,d=>(i(),c("div",K({ref_for:!0},{...n.$attrs,class:null,style:null},{key:d.value,class:["cursor-pointer rounded px-2 py-1.5 text-sm text-neutral-700 hover:bg-neutral-100 dark:text-neutral-200 dark:hover:bg-neutral-800",{"bg-neutral-100 dark:bg-neutral-800":p.value===d.value}],onClick:b=>{$(d.value),g()}}),u(d.label),17,me))),128))])]),default:z(()=>[a("div",{class:E(["min-w-[160px] flex cursor-pointer items-center justify-between gap-2 border rounded-lg bg-white p-2.5 text-xs text-neutral-700 shadow-sm outline-none transition-colors disabled:cursor-not-allowed dark:border-neutral-800 dark:bg-neutral-900 disabled:bg-neutral-100 hover:bg-neutral-50 dark:text-neutral-200 disabled:text-neutral-400 focus:ring-2 focus:ring-black/10 dark:disabled:bg-neutral-800 dark:hover:bg-neutral-800 dark:disabled:text-neutral-600",{"pointer-events-none":s.disabled}])},[a("div",ue,[G(n.$slots,"default",{label:y.value},()=>[H(u(y.value),1)])]),f[0]||(f[0]=a("div",{"i-solar:alt-arrow-down-bold-duotone":"",class:"h-3.5 w-3.5 text-neutral-500 dark:text-neutral-400"},null,-1))],2)]),_:3}))}}),fe={"rounded-xl":"","p-4":"",flex:"~ col gap-4"},ve={flex:"~ row","flex-wrap":"","items-center":"","justify-between":"","gap-4":""},xe={class:"relative min-w-[200px] flex-1","inline-flex":"~","w-full":"","items-center":""},ge=["placeholder"],be={class:"relative flex flex-row justify-start gap-2 lg:flex-col"},_e={class:"top-[-32px] whitespace-nowrap text-sm text-neutral-500 leading-10 lg:absolute dark:text-neutral-400"},ke={key:0,flex:"","flex-col":"","items-center":""},ye={"font-medium":"",text:"neutral-600 dark:neutral-300"},we={text:"neutral-500 dark:neutral-400","mt-2":"","text-sm":""},he={key:1,flex:"","flex-col":"","items-center":""},Ce={"font-medium":"",text:"primary-600 dark:primary-300"},Ve={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"},$e={key:2,class:"col-span-full flex items-center gap-3 border-2 border-amber-200 rounded-xl bg-amber-50/80 p-4 dark:border-amber-800 dark:bg-amber-900/30"},De={class:"flex flex-col"},Se={class:"font-medium"},ze={class:"text-sm text-amber-600 dark:text-amber-400"},Ae={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":""},Ne=q({__name:"index",setup(V){const{t:s}=Z(),p=re(),{addCard:y,removeCard:$}=p,{cards:n,activeCardId:f}=ee(p),g=x(""),d=x(!1),b=x(""),_=x("nameAsc"),D=x([]);te(D,async l=>{const e=l[0];if(e)try{const o=await e.text(),m=JSON.parse(o);g.value=y(m),d.value=!0}catch(o){console.error("Error processing card file:",o)}});const N=C(()=>Array.from(n.value.entries()).map(([l,e])=>({id:l,name:e.name,description:e.description}))),I=C(()=>{if(!b.value)return N.value;const l=b.value.toLowerCase();return N.value.filter(e=>e.name.toLowerCase().includes(l)||e.description&&e.description.toLowerCase().includes(l))}),j=C(()=>{const l=[...I.value];return _.value==="nameAsc"?l.sort((e,o)=>e.name.localeCompare(o.name)):_.value==="nameDesc"?l.sort((e,o)=>o.name.localeCompare(e.name)):_.value==="recent"?l.sort((e,o)=>o.id.localeCompare(e.id)):l}),w=x(!1),v=x(null);function J(){v.value&&($(v.value),v.value=null,w.value=!1)}function P(l){v.value=l,w.value=!0}function Q(l){g.value=l,d.value=!0}function R(l){f.value=l}function W(l){const e=n.value.get(l);return(e==null?void 0:e.version)||"1.0.0"}function B(l,e){var t,k,L,M;const o=n.value.get(l);if(!o||!((k=(t=o.extensions)==null?void 0:t.airi)!=null&&k.modules))return"default";const m=o.extensions.airi.modules;return e==="consciousness"?(L=m.consciousness)!=null&&L.model&&m.consciousness.model.split("-").pop()||"default":e==="voice"&&((M=m.speech)==null?void 0:M.voice_id)||"default"}return(l,e)=>{var m;const o=ae("motion");return i(),c(A,null,[a("div",fe,[a("div",ve,[a("div",xe,[e[6]||(e[6]=a("div",{class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},[a("div",{"i-solar:magnifer-line-duotone":"",class:"text-neutral-500 dark:text-neutral-400"})],-1)),O(a("input",{"onUpdate:modelValue":e[0]||(e[0]=t=>b.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(s)("settings.pages.card.search")},null,8,ge),[[le,b.value]])]),a("div",be,[a("div",_e,u(r(s)("settings.pages.card.sort_by"))+": ",1),h(r(pe),{modelValue:_.value,"onUpdate:modelValue":e[1]||(e[1]=t=>_.value=t),options:[{value:"nameAsc",label:r(s)("settings.pages.card.name_asc")},{value:"nameDesc",label:r(s)("settings.pages.card.name_desc")},{value:"recent",label:r(s)("settings.pages.card.recent")}],placeholder:"Select sort option",class:"min-w-[150px]"},null,8,["modelValue","options"])])]),a("div",{class:E(["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(n).size>0}])},[h(r(oe),{modelValue:D.value,"onUpdate:modelValue":e[2]||(e[2]=t=>D.value=t),accept:"*.json"},{default:z(({isDragging:t})=>[t?(i(),c("div",he,[e[8]||(e[8]=a("div",{"i-solar:upload-minimalistic-bold":"",class:"mb-2 text-5xl text-primary-500 dark:text-primary-400"},null,-1)),a("p",Ce,u(r(s)("settings.pages.card.drop_here")),1)])):(i(),c("div",ke,[e[7]||(e[7]=a("div",{"i-solar:upload-square-line-duotone":"","mb-4":"","text-5xl":"",text:"neutral-400 dark:neutral-500"},null,-1)),a("p",ye,u(r(s)("settings.pages.card.upload")),1),a("p",we,u(r(s)("settings.pages.card.upload_desc")),1)]))]),_:1},8,["modelValue"]),r(n).size>0?(i(!0),c(A,{key:0},F(j.value,t=>(i(),T(ie,{id:t.id,key:t.id,name:t.name,description:t.description,"is-active":t.id===r(f),"is-selected":t.id===g.value&&d.value,version:W(t.id),"consciousness-model":B(t.id,"consciousness"),"voice-model":B(t.id,"voice"),onSelect:k=>Q(t.id),onActivate:k=>R(t.id),onDelete:k=>P(t.id)},null,8,["id","name","description","is-active","is-selected","version","consciousness-model","voice-model","onSelect","onActivate","onDelete"]))),128)):S("",!0),r(n).size===0?(i(),c("div",Ve,[e[9]||(e[9]=a("div",{"i-solar:card-search-broken":"","mx-auto":"","mb-3":"","text-6xl":"","text-neutral-400":""},null,-1)),a("p",null,u(r(s)("settings.pages.card.no_cards")),1)])):S("",!0),b.value&&j.value.length===0?(i(),c("div",$e,[e[10]||(e[10]=a("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),a("div",De,[a("span",Se,u(r(s)("settings.pages.card.no_results")),1),a("span",ze,u(r(s)("settings.pages.card.try_different_search")),1)])])):S("",!0)],2)]),h(de,{modelValue:w.value,"onUpdate:modelValue":e[3]||(e[3]=t=>w.value=t),"card-name":v.value?(m=r(p).getCard(v.value))==null?void 0:m.name:"",onConfirm:J,onCancel:e[4]||(e[4]=t=>v.value=null)},null,8,["modelValue","card-name"]),h(ne,{modelValue:d.value,"onUpdate:modelValue":e[5]||(e[5]=t=>d.value=t),"card-id":g.value},null,8,["modelValue","card-id"]),O((i(),c("div",Ae,e[11]||(e[11]=[a("div",{text:"60","i-solar:emoji-funny-square-bold-duotone":""},null,-1)]))),[[o]])],64)}}});typeof U=="function"&&U(Ne);export{Ne as default}; diff --git a/assets/index-CHEHxPJb.js b/assets/index-CJuuz-Er.js similarity index 99% rename from assets/index-CHEHxPJb.js rename to assets/index-CJuuz-Er.js index b489f831ab20fcce7b0f80bdd604175b479709ba..4358da2da87af39616ee494e50cec3515429bc53 100644 --- a/assets/index-CHEHxPJb.js +++ b/assets/index-CJuuz-Er.js @@ -1,4 +1,4 @@ -import{d as vs}from"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{a4 as Kn,e as W,f as Ue,a5 as bs,a6 as Yo,a7 as ws,w as Be,a8 as ks,a9 as Ts,U as Ot,u as H,aa as _s,ab as Nr,ac as Ko,ad as Es,ae as cn,af as qo,ag as ft,ah as Pe,ai as ze,aj as xt,ak as pn,al as Ms,am as As,an as Ss,ao as vt,ap as ae,aq as Is,ar as Bn,as as Rs,at as Qr,au as Cs,av as Ns,aw as Nt,ax as Wo,ay as Jr,az as Xo,aA as Zo,aB as Qo,aC as zn,aD as Lt,aE as Un,aF as Jo,aG as Vt,aH as Ls,aI as tr,aJ as Ps,aK as ea,aL as qn,aM as Ht,aN as hn,aO as ta,aP as Ds,aQ as Pt,aR as Os,aS as Fs,aT as Bs,aU as zs,aV as nr,aW as Mt,aX as Dt,aY as $t,aZ as Us,a_ as js,a$ as Vs,b0 as na,b1 as ei,b2 as ti,b3 as jn,b4 as Ai,b5 as Si,b6 as Ii,b7 as Ri,b8 as Hs,b9 as $s,ba as ni,bb as ra,bc as Gs,a0 as Ke,bd as rr,d as Fe,be as Ys,bf as Ks,bg as ri,T as mn,c as ie,o as J,bh as gn,bi as qs,$ as Zt,bj as Wt,bk as Xt,bl as Ye,b as Te,a as O,X as lt,bm as Et,bn as ii,W as at,Y as ve,bo as yt,bp as _t,bq as oi,br as Wn,bs as ia,bt as Vn,bu as Ws,bv as Ci,bw as Xs,bx as oa,by as yn,bz as Zs,bA as ai,bB as Qs,bC as aa,bD as At,bE as Js,bF as sa,bG as el,bH as tl,bI as nl,bJ as rl,bK as la,bL as il,bM as ol,bN as al,bO as sl,bP as ll,bQ as ul,bR as cl,bS as ir,bT as Lr,bU as Pr,bV as Ni,bW as or,bX as fl,bY as dl,bZ as pl,b_ as hl,b$ as ml,a3 as Dr,c0 as gl,c1 as yl,c2 as xn,c3 as xl,c4 as ua,_ as Hn,c5 as ca,c6 as si,c7 as li,c8 as vl,c9 as ar,ca as bl,cb as wl}from"./index-WDP_Z4A8.js";import{d as Li,V as kl,a as Tl,c as _l,r as El,b as Or,e as Ml}from"./three-vrm.module-DIVMhp6T.js";import{E as Al,a as Sl,b as Il}from"./emotions-DWNSb738.js";import{m as Rl,d as Cl}from"./mcp-CVsSz3w1.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{getImportUrlBundles as Nl}from"./import-url-browser-CPN8ipMD.js";import{s as Gt,c as Pi,u as Ll,g as Pl}from"./speech-DRmXCXwq.js";import{u as Dn}from"./queue-C50Iq5oO.js";import{u as Dl,a as Ol,b as Fl,l as Bl}from"./queues-DBvSyUSC.js";import{l as zl,u as ui}from"./providers-7GsMyC_3.js";import{s as Ul}from"./index-Dpfqqu9L.js";import{u as jl}from"./airi-card-Cgw9OiDq.js";import{_ as ci}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import{r as on,_ as Vl,a as Hl}from"./Model.vue_vue_type_script_setup_true_lang-DvSPvuiM.js";import{_ as Di}from"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import{H as $l}from"./HeaderLink--5c4L7nq.js";import{u as fa}from"./consciousness-CI5ipeHX.js";import{_ as da}from"./Basic.vue_vue_type_script_setup_true_lang-COgaiUVw.js";import{b as Oi}from"./route-block-B_A1xBdJ.js";import"./floating-ui.core-CgBsuaUc.js";import"./duckdb-mvp-CaaD-olE.js";import"./index-LHmcipjy.js";async function*Gl(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 Yl(t){const e=new Uint8Array(t.frequencyBinCount);t.getByteFrequencyData(e);const n=[];for(let i=0;i<700;i+=80)n.push(e[i]);return e.map(i=>i**1.2).map(i=>i*1.2).reduce((i,o)=>i+o,0)/e.length/100}function Kl(t){const e=new Uint8Array(t.frequencyBinCount);t.getByteFrequencyData(e);const n=[];for(let u=0;u<700;u+=80)n.push(e[u]);const r=e.map(u=>u**1.5),i=Math.min(...r),a=Math.max(...r)-i;let s;return a===0?s=r.map(()=>0):s=r.map(u=>(u-i)/a),s.reduce((u,c)=>u+c,0)/e.length}function ql(t,e="linear"){switch(e){case"linear":return Yl(t);case"minmax":return Kl(t)}}const pa=Kn("AudioContext",()=>({audioContext:new AudioContext,calculateVolume:ql})),Wl=Kn("SpeakingStore",()=>{const n=W(0),r=W(!1),i=Ue(()=>r.value?(30+70*n.value)/100:30);return{mouthOpenSize:n,nowSpeaking:r,nowSpeakingAvatarBorderOpacity:i}});function En(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+=En(r,s,1),u="literal",s++):l==="<"?u="special":l===">"&&(u="literal"),e==="literal"&&u==="special"?n!==""&&(await((i=t.onLiteral)==null?void 0:i.call(t,n)),n=""):e==="special"&&u==="literal"&&n!==""&&(n+=l,await((o=t.onSpecial)==null?void 0:o.call(t,n)),n=""),e==="literal"&&u==="literal"?(await((a=t.onLiteral)==null?void 0:a.call(t,l)),n=""):e==="special"&&u==="literal"?n="":n+=l,e=u}},async end(){var r,i;n!==""&&(e==="literal"?await((r=t.onLiteral)==null?void 0:r.call(t,n)):n.endsWith("|>")&&await((i=t.onSpecial)==null?void 0:i.call(t,n)))}}}const Zl=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class vn{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}}vn.prototype.normal={};vn.prototype.property={};vn.prototype.space=void 0;function ha(t,e){const n={},r={};for(const i of t)Object.assign(n,i.property),Object.assign(r,i.normal);return new vn(n,r,e)}function Fr(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 Ql=0;const ce=Ft(),Le=Ft(),ma=Ft(),G=Ft(),Re=Ft(),Yt=Ft(),Qe=Ft();function Ft(){return 2**++Ql}const Br=Object.freeze(Object.defineProperty({__proto__:null,boolean:ce,booleanish:Le,commaOrSpaceSeparated:Qe,commaSeparated:Yt,number:G,overloadedBoolean:ma,spaceSeparated:Re},Symbol.toStringTag,{value:"Module"})),sr=Object.keys(Br);class fi extends We{constructor(e,n,r,i){let o=-1;if(super(e,n),Fi(this,"space",i),typeof r=="number")for(;++o4&&n.slice(0,4)==="data"&&nu.test(e)){if(e.charAt(4)==="-"){const o=e.slice(5).replace(Bi,ou);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=e.slice(4);if(!Bi.test(o)){let a=o.replace(tu,iu);a.charAt(0)!=="-"&&(a="-"+a),e="data"+a}}i=fi}return new i(r,e)}function iu(t){return"-"+t.toLowerCase()}function ou(t){return t.charAt(1).toUpperCase()}const au=ha([ga,Jl,va,ba,wa],"html"),ka=ha([ga,eu,va,ba,wa],"svg"),zi={}.hasOwnProperty;function su(t,e){const n=e||{};function r(i,...o){let a=r.invalid;const s=r.handlers;if(i&&zi.call(i,t)){const l=String(i[t]);a=zi.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 lu=/^>|^->||--!>|"],cu=["<",">"];function fu(t,e,n,r){return r.settings.bogusComments?"":"";function i(o){return Gt(o,Object.assign({},r.settings.characterReferences,{subset:cu}))}}function du(t,e,n,r){return""}function pu(t,e){const n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function hu(t){return t.join(" ").trim()}const mu=/[ \t\n\f\r]/g;function di(t){return typeof t=="object"?t.type==="text"?Ui(t.value):!1:Ui(t)}function Ui(t){return t.replace(mu,"")===""}const De=_a(1),Ta=_a(-1),gu=[];function _a(t){return e;function e(n,r,i){const o=n?n.children:gu;let a=(r||0)+t,s=o[a];if(!i)for(;s&&di(s);)a+=t,s=o[a];return s}}const yu={}.hasOwnProperty;function Ea(t){return e;function e(n,r,i){return yu.call(t,n.tagName)&&t[n.tagName](n,r,i)}}const pi=Ea({body:vu,caption:lr,colgroup:lr,dd:Tu,dt:ku,head:lr,html:xu,li:wu,optgroup:_u,option:Eu,p:bu,rp:ji,rt:ji,tbody:Au,td:Vi,tfoot:Su,th:Vi,thead:Mu,tr:Iu});function lr(t,e,n){const r=De(n,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&di(r.value.charAt(0)))}function xu(t,e,n){const r=De(n,e);return!r||r.type!=="comment"}function vu(t,e,n){const r=De(n,e);return!r||r.type!=="comment"}function bu(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 wu(t,e,n){const r=De(n,e);return!r||r.type==="element"&&r.tagName==="li"}function ku(t,e,n){const r=De(n,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function Tu(t,e,n){const r=De(n,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function ji(t,e,n){const r=De(n,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function _u(t,e,n){const r=De(n,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function Eu(t,e,n){const r=De(n,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function Mu(t,e,n){const r=De(n,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function Au(t,e,n){const r=De(n,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function Su(t,e,n){return!De(n,e)}function Iu(t,e,n){const r=De(n,e);return!r||r.type==="element"&&r.tagName==="tr"}function Vi(t,e,n){const r=De(n,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const Ru=Ea({body:Lu,colgroup:Pu,head:Nu,html:Cu,tbody:Du});function Cu(t){const e=De(t,-1);return!e||e.type!=="comment"}function Nu(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 Lu(t){const e=De(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&di(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function Pu(t,e,n){const r=Ta(n,e),i=De(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 Du(t,e,n){const r=Ta(n,e),i=De(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 Mn={name:[[` +import{d as vs}from"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import{a4 as Kn,e as W,f as Ue,a5 as bs,a6 as Yo,a7 as ws,w as Be,a8 as ks,a9 as Ts,U as Ot,u as H,aa as _s,ab as Nr,ac as Ko,ad as Es,ae as cn,af as qo,ag as ft,ah as Pe,ai as ze,aj as xt,ak as pn,al as Ms,am as As,an as Ss,ao as vt,ap as ae,aq as Is,ar as Bn,as as Rs,at as Qr,au as Cs,av as Ns,aw as Nt,ax as Wo,ay as Jr,az as Xo,aA as Zo,aB as Qo,aC as zn,aD as Lt,aE as Un,aF as Jo,aG as Vt,aH as Ls,aI as tr,aJ as Ps,aK as ea,aL as qn,aM as Ht,aN as hn,aO as ta,aP as Ds,aQ as Pt,aR as Os,aS as Fs,aT as Bs,aU as zs,aV as nr,aW as Mt,aX as Dt,aY as $t,aZ as Us,a_ as js,a$ as Vs,b0 as na,b1 as ei,b2 as ti,b3 as jn,b4 as Ai,b5 as Si,b6 as Ii,b7 as Ri,b8 as Hs,b9 as $s,ba as ni,bb as ra,bc as Gs,a0 as Ke,bd as rr,d as Fe,be as Ys,bf as Ks,bg as ri,T as mn,c as ie,o as J,bh as gn,bi as qs,$ as Zt,bj as Wt,bk as Xt,bl as Ye,b as Te,a as O,X as lt,bm as Et,bn as ii,W as at,Y as ve,bo as yt,bp as _t,bq as oi,br as Wn,bs as ia,bt as Vn,bu as Ws,bv as Ci,bw as Xs,bx as oa,by as yn,bz as Zs,bA as ai,bB as Qs,bC as aa,bD as At,bE as Js,bF as sa,bG as el,bH as tl,bI as nl,bJ as rl,bK as la,bL as il,bM as ol,bN as al,bO as sl,bP as ll,bQ as ul,bR as cl,bS as ir,bT as Lr,bU as Pr,bV as Ni,bW as or,bX as fl,bY as dl,bZ as pl,b_ as hl,b$ as ml,a3 as Dr,c0 as gl,c1 as yl,c2 as xn,c3 as xl,c4 as ua,_ as Hn,c5 as ca,c6 as si,c7 as li,c8 as vl,c9 as ar,ca as bl,cb as wl}from"./index-8LjpXIG7.js";import{d as Li,V as kl,a as Tl,c as _l,r as El,b as Or,e as Ml}from"./three-vrm.module-r4bOtVyC.js";import{E as Al,a as Sl,b as Il}from"./emotions-DWNSb738.js";import{m as Rl,d as Cl}from"./mcp-BNgNJ97R.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{getImportUrlBundles as Nl}from"./import-url-browser-CPN8ipMD.js";import{s as Gt,c as Pi,u as Ll,g as Pl}from"./speech-BUPJbslH.js";import{u as Dn}from"./queue-Dw-mTAT5.js";import{u as Dl,a as Ol,b as Fl,l as Bl}from"./queues-DNZJBdFi.js";import{l as zl,u as ui}from"./providers-Dhn8Iy_2.js";import{s as Ul}from"./index-Dpfqqu9L.js";import{u as jl}from"./airi-card-COPhkSXD.js";import{_ as ci}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-DyyWKgKi.js";import{r as on,_ as Vl,a as Hl}from"./Model.vue_vue_type_script_setup_true_lang-BJUN66rj.js";import{_ as Di}from"./Collapsable.vue_vue_type_script_setup_true_lang-BOcCBViZ.js";import{H as $l}from"./HeaderLink-Ct9jmG8_.js";import{u as fa}from"./consciousness-DSqUYfGS.js";import{_ as da}from"./Basic.vue_vue_type_script_setup_true_lang-Dgb2JW4V.js";import{b as Oi}from"./route-block-B_A1xBdJ.js";import"./floating-ui.core-CgBsuaUc.js";import"./duckdb-mvp-CaaD-olE.js";import"./index-LHmcipjy.js";async function*Gl(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 Yl(t){const e=new Uint8Array(t.frequencyBinCount);t.getByteFrequencyData(e);const n=[];for(let i=0;i<700;i+=80)n.push(e[i]);return e.map(i=>i**1.2).map(i=>i*1.2).reduce((i,o)=>i+o,0)/e.length/100}function Kl(t){const e=new Uint8Array(t.frequencyBinCount);t.getByteFrequencyData(e);const n=[];for(let u=0;u<700;u+=80)n.push(e[u]);const r=e.map(u=>u**1.5),i=Math.min(...r),a=Math.max(...r)-i;let s;return a===0?s=r.map(()=>0):s=r.map(u=>(u-i)/a),s.reduce((u,c)=>u+c,0)/e.length}function ql(t,e="linear"){switch(e){case"linear":return Yl(t);case"minmax":return Kl(t)}}const pa=Kn("AudioContext",()=>({audioContext:new AudioContext,calculateVolume:ql})),Wl=Kn("SpeakingStore",()=>{const n=W(0),r=W(!1),i=Ue(()=>r.value?(30+70*n.value)/100:30);return{mouthOpenSize:n,nowSpeaking:r,nowSpeakingAvatarBorderOpacity:i}});function En(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+=En(r,s,1),u="literal",s++):l==="<"?u="special":l===">"&&(u="literal"),e==="literal"&&u==="special"?n!==""&&(await((i=t.onLiteral)==null?void 0:i.call(t,n)),n=""):e==="special"&&u==="literal"&&n!==""&&(n+=l,await((o=t.onSpecial)==null?void 0:o.call(t,n)),n=""),e==="literal"&&u==="literal"?(await((a=t.onLiteral)==null?void 0:a.call(t,l)),n=""):e==="special"&&u==="literal"?n="":n+=l,e=u}},async end(){var r,i;n!==""&&(e==="literal"?await((r=t.onLiteral)==null?void 0:r.call(t,n)):n.endsWith("|>")&&await((i=t.onSpecial)==null?void 0:i.call(t,n)))}}}const Zl=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class vn{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}}vn.prototype.normal={};vn.prototype.property={};vn.prototype.space=void 0;function ha(t,e){const n={},r={};for(const i of t)Object.assign(n,i.property),Object.assign(r,i.normal);return new vn(n,r,e)}function Fr(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 Ql=0;const ce=Ft(),Le=Ft(),ma=Ft(),G=Ft(),Re=Ft(),Yt=Ft(),Qe=Ft();function Ft(){return 2**++Ql}const Br=Object.freeze(Object.defineProperty({__proto__:null,boolean:ce,booleanish:Le,commaOrSpaceSeparated:Qe,commaSeparated:Yt,number:G,overloadedBoolean:ma,spaceSeparated:Re},Symbol.toStringTag,{value:"Module"})),sr=Object.keys(Br);class fi extends We{constructor(e,n,r,i){let o=-1;if(super(e,n),Fi(this,"space",i),typeof r=="number")for(;++o4&&n.slice(0,4)==="data"&&nu.test(e)){if(e.charAt(4)==="-"){const o=e.slice(5).replace(Bi,ou);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=e.slice(4);if(!Bi.test(o)){let a=o.replace(tu,iu);a.charAt(0)!=="-"&&(a="-"+a),e="data"+a}}i=fi}return new i(r,e)}function iu(t){return"-"+t.toLowerCase()}function ou(t){return t.charAt(1).toUpperCase()}const au=ha([ga,Jl,va,ba,wa],"html"),ka=ha([ga,eu,va,ba,wa],"svg"),zi={}.hasOwnProperty;function su(t,e){const n=e||{};function r(i,...o){let a=r.invalid;const s=r.handlers;if(i&&zi.call(i,t)){const l=String(i[t]);a=zi.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 lu=/^>|^->||--!>|"],cu=["<",">"];function fu(t,e,n,r){return r.settings.bogusComments?"":"";function i(o){return Gt(o,Object.assign({},r.settings.characterReferences,{subset:cu}))}}function du(t,e,n,r){return""}function pu(t,e){const n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function hu(t){return t.join(" ").trim()}const mu=/[ \t\n\f\r]/g;function di(t){return typeof t=="object"?t.type==="text"?Ui(t.value):!1:Ui(t)}function Ui(t){return t.replace(mu,"")===""}const De=_a(1),Ta=_a(-1),gu=[];function _a(t){return e;function e(n,r,i){const o=n?n.children:gu;let a=(r||0)+t,s=o[a];if(!i)for(;s&&di(s);)a+=t,s=o[a];return s}}const yu={}.hasOwnProperty;function Ea(t){return e;function e(n,r,i){return yu.call(t,n.tagName)&&t[n.tagName](n,r,i)}}const pi=Ea({body:vu,caption:lr,colgroup:lr,dd:Tu,dt:ku,head:lr,html:xu,li:wu,optgroup:_u,option:Eu,p:bu,rp:ji,rt:ji,tbody:Au,td:Vi,tfoot:Su,th:Vi,thead:Mu,tr:Iu});function lr(t,e,n){const r=De(n,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&di(r.value.charAt(0)))}function xu(t,e,n){const r=De(n,e);return!r||r.type!=="comment"}function vu(t,e,n){const r=De(n,e);return!r||r.type!=="comment"}function bu(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 wu(t,e,n){const r=De(n,e);return!r||r.type==="element"&&r.tagName==="li"}function ku(t,e,n){const r=De(n,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function Tu(t,e,n){const r=De(n,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function ji(t,e,n){const r=De(n,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function _u(t,e,n){const r=De(n,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function Eu(t,e,n){const r=De(n,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function Mu(t,e,n){const r=De(n,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function Au(t,e,n){const r=De(n,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function Su(t,e,n){return!De(n,e)}function Iu(t,e,n){const r=De(n,e);return!r||r.type==="element"&&r.tagName==="tr"}function Vi(t,e,n){const r=De(n,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const Ru=Ea({body:Lu,colgroup:Pu,head:Nu,html:Cu,tbody:Du});function Cu(t){const e=De(t,-1);return!e||e.type!=="comment"}function Nu(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 Lu(t){const e=De(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&di(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function Pu(t,e,n){const r=Ta(n,e),i=De(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 Du(t,e,n){const r=Ta(n,e),i=De(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 Mn={name:[[` \f\r &/=>`.split(""),` \f\r "&'/=>\``.split("")],[`\0 \f\r "&'/<=>`.split(""),`\0 @@ -14,7 +14,7 @@ import{d as vs}from"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6h `}),c.type==="element"&&c.tagName==="p"&&!i?a.push(...c.children):a.push(c)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:` `});const u={type:"element",tagName:"li",properties:o,children:a};return t.patch(e,u),t.applyData(e,u)}function vd(t){let e=!1;if(t.type==="list"){e=t.spread||!1;const n=t.children;let r=-1;for(;!e&&++r1}function bd(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 _d(t){const e=Ha(t),n=Va(t);if(e&&n)return{start:e,end:n}}function Ed(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=Ha(e.children[1]),l=Va(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 Md(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(oo(e.slice(i),i>0,!1)),o.join("")}function oo(t,e,n){let r=0,i=t.length;if(e){let o=t.codePointAt(r);for(;o===ro||o===io;)r++,o=t.codePointAt(r)}if(n){let o=t.codePointAt(i-1);for(;o===ro||o===io;)i--,o=t.codePointAt(i-1)}return i>r?t.slice(r,i):""}function Id(t,e){const n={type:"text",value:Sd(String(e.value))};return t.patch(e,n),t.applyData(e,n)}function Rd(t,e){const n={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,n),t.applyData(e,n)}const Cd={blockquote:od,break:ad,code:sd,delete:ld,emphasis:ud,footnoteReference:cd,heading:fd,html:dd,imageReference:pd,image:hd,inlineCode:md,linkReference:gd,link:yd,listItem:xd,list:bd,paragraph:wd,root:kd,strong:Td,table:Ed,tableCell:Ad,tableRow:Md,text:Id,thematicBreak:Rd,toml:An,yaml:An,definition:An,footnoteDefinition:An};function An(){}const Ga=-1,Zn=0,$n=1,Gn=2,yi=3,xi=4,vi=5,bi=6,Ya=7,Ka=8,ao=typeof self=="object"?self:globalThis,Nd=(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 Ga:return n(a,i);case $n:{const s=n([],i);for(const l of a)s.push(r(l));return s}case Gn:{const s=n({},i);for(const[l,u]of a)s[r(l)]=r(u);return s}case yi:return n(new Date(a),i);case xi:{const{source:s,flags:l}=a;return n(new RegExp(s,l),i)}case vi:{const s=n(new Map,i);for(const[l,u]of a)s.set(r(l),r(u));return s}case bi:{const s=n(new Set,i);for(const l of a)s.add(r(l));return s}case Ya:{const{name:s,message:l}=a;return n(new ao[s](l),i)}case Ka:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i)}return n(new ao[o](a),i)};return r},so=t=>Nd(new Map,t)(0),Bt="",{toString:Ld}={},{keys:Pd}=Object,sn=t=>{const e=typeof t;if(e!=="object"||!t)return[Zn,e];const n=Ld.call(t).slice(8,-1);switch(n){case"Array":return[$n,Bt];case"Object":return[Gn,Bt];case"Date":return[yi,Bt];case"RegExp":return[xi,Bt];case"Map":return[vi,Bt];case"Set":return[bi,Bt]}return n.includes("Array")?[$n,n]:n.includes("Error")?[Ya,n]:[Gn,n]},Sn=([t,e])=>t===Zn&&(e==="function"||e==="symbol"),Dd=(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]=sn(a);switch(s){case Zn:{let c=a;switch(l){case"bigint":s=Ka,c=a.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+l);c=null;break;case"undefined":return i([Ga],a)}return i([s,c],a)}case $n:{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 Gn:{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 Pd(a))(t||!Sn(sn(a[p])))&&c.push([o(p),o(a[p])]);return f}case yi:return i([s,a.toISOString()],a);case xi:{const{source:c,flags:f}=a;return i([s,{source:c,flags:f}],a)}case vi:{const c=[],f=i([s,c],a);for(const[p,d]of a)(t||!(Sn(sn(p))||Sn(sn(d))))&&c.push([o(p),o(d)]);return f}case bi:{const c=[],f=i([s,c],a);for(const p of a)(t||!Sn(sn(p)))&&c.push(o(p));return f}}const{message:u}=a;return i([s,{name:l,message:u}],a)};return o},lo=(t,{json:e,lossy:n}={})=>{const r=[];return Dd(!(e||n),!!e,new Map,r)(t),r},Yn=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?so(lo(t,e)):structuredClone(t):(t,e)=>so(lo(t,e));function Od(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 Fd(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function Bd(t){const e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=t.options.footnoteBackContent||Od,r=t.options.footnoteBackLabel||Fd,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 S=typeof n=="string"?n:n(l,d);typeof S=="string"&&(S={type:"text",value:S}),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(S)?S:[S]})}const w=c[c.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const S=w.children[w.children.length-1];S&&S.type==="text"?S.value+=" ":w.children.push({type:"text",value:" "}),w.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:{...Yn(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 qa=function(t){if(t==null)return Vd;if(typeof t=="function")return Qn(t);if(typeof t=="object")return Array.isArray(t)?zd(t):Ud(t);if(typeof t=="string")return jd(t);throw new Error("Expected function, string, or object as test")};function zd(t){const e=[];let n=-1;for(;++n":""))+")"})}return p;function p(){let d=Wa,y,x,w;if((!e||o(l,u,c[c.length-1]||void 0))&&(d=Kd(n(l,c)),d[0]===uo))return d;if("children"in l&&l.children){const k=l;if(k.children&&d[0]!==Gd)for(x=(r?k.children.length:-1)+a,w=c.concat(k);x>-1&&x":""))+")"})}return p;function p(){let d=Wa,y,x,w;if((!e||o(l,u,c[c.length-1]||void 0))&&(d=Kd(n(l,c)),d[0]===uo))return d;if("children"in l&&l.children){const k=l;if(k.children&&d[0]!==Gd)for(x=(r?k.children.length:-1)+a,w=c.concat(k);x>-1&&x0&&n.push({type:"text",value:` `}),n}function co(t){let e=0,n=t.charCodeAt(e);for(;n===9||n===32;)e++,n=t.charCodeAt(e);return t.slice(e)}function fo(t,e){const n=Xd(t,e),r=n.one(t,void 0),i=Bd(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:` diff --git a/assets/index-CKKZXq7c.js b/assets/index-Cc3ob4SF.js similarity index 89% rename from assets/index-CKKZXq7c.js rename to assets/index-Cc3ob4SF.js index 814a7f7312595021fedf6ae3c1840fc5309329de..b61f2ae6d57195a0f90b7098df1f8c226de2b654 100644 --- a/assets/index-CKKZXq7c.js +++ b/assets/index-Cc3ob4SF.js @@ -1 +1 @@ -import{d as i,c5 as n,bm as r,o as a,c as s,a as c}from"./index-WDP_Z4A8.js";import{b as t}from"./route-block-B_A1xBdJ.js";const l={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":""},d=i({__name:"index",setup(m){return(p,e)=>{const o=n("motion");return r((a(),s("div",l,e[0]||(e[0]=[c("div",{text:"60","i-solar:leaf-bold-duotone":""},null,-1)]))),[[o]])}}});typeof t=="function"&&t(d);export{d as default}; +import{d as i,c5 as n,bm as r,o as a,c as s,a as c}from"./index-8LjpXIG7.js";import{b as t}from"./route-block-B_A1xBdJ.js";const l={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":""},d=i({__name:"index",setup(m){return(p,e)=>{const o=n("motion");return r((a(),s("div",l,e[0]||(e[0]=[c("div",{text:"60","i-solar:leaf-bold-duotone":""},null,-1)]))),[[o]])}}});typeof t=="function"&&t(d);export{d as default}; diff --git a/assets/index-ebacZR9F.js b/assets/index-DLewWnu4.js similarity index 79% rename from assets/index-ebacZR9F.js rename to assets/index-DLewWnu4.js index a5ec465d7de3c61b100e0d7c87758cd7503d330d..4b591ed5b419abd64bc02a4530726bee60ca7c34 100644 --- a/assets/index-ebacZR9F.js +++ b/assets/index-DLewWnu4.js @@ -1 +1 @@ -import{u as d}from"./useIconAnimation-B41IKS_9.js";import{d as u,a2 as p,c5 as f,c as n,o as e,a as i,bk as v,bm as x,u as o,c6 as _}from"./index-WDP_Z4A8.js";import{b as r}from"./route-block-B_A1xBdJ.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";const k={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":""},y=u({__name:"index",setup(b){const{iconAnimationStarted:a,showIconAnimation:s,animationIcon:c}=d("i-solar:armchair-2-bold-duotone");return(h,t)=>{const l=p("IconAnimation"),m=f("motion");return e(),n(_,null,[t[1]||(t[1]=i("div",null," Scene ",-1)),o(s)?(e(),v(l,{key:0,"z-index":-1,icon:o(c),"icon-size":12,duration:1e3,started:o(a),"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"])):x((e(),n("div",k,t[0]||(t[0]=[i("div",{text:"60","i-solar:armchair-2-bold-duotone":""},null,-1)]))),[[m]])],64)}}});typeof r=="function"&&r(y);export{y as default}; +import{u as d}from"./useIconAnimation-DdsxO8m6.js";import{d as u,a2 as p,c5 as f,c as n,o as e,a as i,bk as v,bm as x,u as o,c6 as _}from"./index-8LjpXIG7.js";import{b as r}from"./route-block-B_A1xBdJ.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";const k={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":""},y=u({__name:"index",setup(b){const{iconAnimationStarted:a,showIconAnimation:s,animationIcon:c}=d("i-solar:armchair-2-bold-duotone");return(h,t)=>{const l=p("IconAnimation"),m=f("motion");return e(),n(_,null,[t[1]||(t[1]=i("div",null," Scene ",-1)),o(s)?(e(),v(l,{key:0,"z-index":-1,icon:o(c),"icon-size":12,duration:1e3,started:o(a),"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"])):x((e(),n("div",k,t[0]||(t[0]=[i("div",{text:"60","i-solar:armchair-2-bold-duotone":""},null,-1)]))),[[m]])],64)}}});typeof r=="function"&&r(y);export{y as default}; diff --git a/assets/index-CsewVBbh.js b/assets/index-DWNTcdN1.js similarity index 91% rename from assets/index-CsewVBbh.js rename to assets/index-DWNTcdN1.js index f642709328a98a4ce877bda3f31c79a82e0e1b06..62660b32b4adfc166a517bfdc52c94013d349925 100644 --- a/assets/index-CsewVBbh.js +++ b/assets/index-DWNTcdN1.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as A,a0 as z,a2 as _,c5 as w,c as r,o as n,a as e,bk as s,bm as d,ch as x,c6 as c,c7 as m,u as i}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as S}from"./providers-7GsMyC_3.js";import{I as p}from"./IconStatusItem-B9Mlqc3P.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{u as C}from"./useIconAnimation-B41IKS_9.js";import{b as y}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";const T={flex:"","flex-col":"","gap-5":""},D={grid:"~ cols-2 gap-4"},N={grid:"~ cols-2 gap-4"},B={grid:"~ cols-2 gap-4"},O={key:1,text:"neutral-500/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":""},P=A({__name:"index",setup(R){const f=S(),{allChatProvidersMetadata:u,allAudioSpeechProvidersMetadata:g,allAudioTranscriptionProvidersMetadata:v}=z(f),{iconAnimationStarted:h,showIconAnimation:k,animationIcon:b}=C("i-solar:box-minimalistic-bold-duotone");return(q,o)=>{const I=_("IconAnimation"),l=w("motion");return n(),r(c,null,[e("div",T,[o[0]||(o[0]=e("div",{bg:"primary-500/10 dark:primary-800/25","rounded-lg":"","p-4":""},[e("div",{"mb-2":"","text-xl":"","font-semibold":"",text:"primary-800 dark:primary-100"}," First time here? "),e("div",{text:"primary-700 dark:primary-300"},[x(" AIRI requires at least one "),e("div",{bg:"primary-500/10 dark:primary-800/25","inline-flex":"","items-center":"","gap-1":"","rounded-lg":"","px-2":"","py-0.5":"","translate-y":"[0.25lh]"},[e("div",{"i-solar:chat-square-like-bold-duotone":""}),e("strong",{"font-semibold":""},"Chat")]),x(" provider to be configured to think, and behave properly. You could think of it as the brain of the characters living in AIRI system. ")])],-1)),o[1]||(o[1]=e("div",{flex:"~ row items-center gap-2"},[e("div",{"i-solar:chat-square-like-bold-duotone":"",text:"neutral-500 dark:neutral-400 4xl"}),e("div",null,[e("div",null,[e("span",{text:"neutral-300 dark:neutral-500"},"Text generation model providers. e.g. OpenRouter, OpenAI, Ollama.")]),e("div",{flex:"","text-nowrap":"","text-3xl":"","font-semibold":""},[e("div",null," Chat ")])])],-1)),e("div",D,[(n(!0),r(c,null,m(i(u),(t,a)=>d((n(),s(i(p),{key:t.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+a*10,delay:a*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"])),[[l]])),128))]),o[2]||(o[2]=e("div",{flex:"~ row items-center gap-2","my-5":""},[e("div",{"i-solar:user-speak-rounded-bold-duotone":"",text:"neutral-500 dark:neutral-400 4xl"}),e("div",null,[e("div",null,[e("span",{text:"neutral-300 dark:neutral-500"},"Speech (text-to-speech) model providers. e.g. ElevenLabs, Azure Speech.")]),e("div",{flex:"","text-nowrap":"","text-3xl":"","font-semibold":""},[e("div",null," Speech ")])])],-1)),e("div",N,[(n(!0),r(c,null,m(i(g),(t,a)=>d((n(),s(i(p),{key:t.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+a*10,delay:(i(u).length+a)*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"])),[[l]])),128))]),o[3]||(o[3]=e("div",{flex:"~ row items-center gap-2","my-5":""},[e("div",{"i-solar:microphone-3-bold-duotone":"",text:"neutral-500 dark:neutral-400 4xl"}),e("div",null,[e("div",null,[e("span",{text:"neutral-300 dark:neutral-500"},"Transcription (speech-to-text) model providers. e.g. Whisper.cpp, OpenAI, Azure Speech")]),e("div",{flex:"","text-nowrap":"","text-3xl":"","font-semibold":""},[e("div",null," Transcription ")])])],-1)),e("div",B,[(n(!0),r(c,null,m(i(v),(t,a)=>d((n(),s(i(p),{key:t.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+a*10,delay:(i(u).length+i(g).length+a)*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"])),[[l]])),128))])]),i(k)?(n(),s(I,{key:0,"z-index":-1,icon:i(b),"icon-size":12,duration:1e3,started:i(h),"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"])):d((n(),r("div",O,o[4]||(o[4]=[e("div",{text:"60","i-solar:box-minimalistic-bold-duotone":""},null,-1)]))),[[l]])],64)}}});typeof y=="function"&&y(P);export{P as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import{d as A,a0 as z,a2 as _,c5 as w,c as r,o as n,a as e,bk as s,bm as d,ch as x,c6 as c,c7 as m,u as i}from"./index-8LjpXIG7.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{u as S}from"./providers-Dhn8Iy_2.js";import{I as p}from"./IconStatusItem-BuPKAtbo.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{u as C}from"./useIconAnimation-DdsxO8m6.js";import{b as y}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";const T={flex:"","flex-col":"","gap-5":""},D={grid:"~ cols-2 gap-4"},N={grid:"~ cols-2 gap-4"},B={grid:"~ cols-2 gap-4"},O={key:1,text:"neutral-500/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":""},P=A({__name:"index",setup(R){const f=S(),{allChatProvidersMetadata:u,allAudioSpeechProvidersMetadata:g,allAudioTranscriptionProvidersMetadata:v}=z(f),{iconAnimationStarted:h,showIconAnimation:k,animationIcon:b}=C("i-solar:box-minimalistic-bold-duotone");return(q,o)=>{const I=_("IconAnimation"),l=w("motion");return n(),r(c,null,[e("div",T,[o[0]||(o[0]=e("div",{bg:"primary-500/10 dark:primary-800/25","rounded-lg":"","p-4":""},[e("div",{"mb-2":"","text-xl":"","font-semibold":"",text:"primary-800 dark:primary-100"}," First time here? "),e("div",{text:"primary-700 dark:primary-300"},[x(" AIRI requires at least one "),e("div",{bg:"primary-500/10 dark:primary-800/25","inline-flex":"","items-center":"","gap-1":"","rounded-lg":"","px-2":"","py-0.5":"","translate-y":"[0.25lh]"},[e("div",{"i-solar:chat-square-like-bold-duotone":""}),e("strong",{"font-semibold":""},"Chat")]),x(" provider to be configured to think, and behave properly. You could think of it as the brain of the characters living in AIRI system. ")])],-1)),o[1]||(o[1]=e("div",{flex:"~ row items-center gap-2"},[e("div",{"i-solar:chat-square-like-bold-duotone":"",text:"neutral-500 dark:neutral-400 4xl"}),e("div",null,[e("div",null,[e("span",{text:"neutral-300 dark:neutral-500"},"Text generation model providers. e.g. OpenRouter, OpenAI, Ollama.")]),e("div",{flex:"","text-nowrap":"","text-3xl":"","font-semibold":""},[e("div",null," Chat ")])])],-1)),e("div",D,[(n(!0),r(c,null,m(i(u),(t,a)=>d((n(),s(i(p),{key:t.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+a*10,delay:a*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"])),[[l]])),128))]),o[2]||(o[2]=e("div",{flex:"~ row items-center gap-2","my-5":""},[e("div",{"i-solar:user-speak-rounded-bold-duotone":"",text:"neutral-500 dark:neutral-400 4xl"}),e("div",null,[e("div",null,[e("span",{text:"neutral-300 dark:neutral-500"},"Speech (text-to-speech) model providers. e.g. ElevenLabs, Azure Speech.")]),e("div",{flex:"","text-nowrap":"","text-3xl":"","font-semibold":""},[e("div",null," Speech ")])])],-1)),e("div",N,[(n(!0),r(c,null,m(i(g),(t,a)=>d((n(),s(i(p),{key:t.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+a*10,delay:(i(u).length+a)*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"])),[[l]])),128))]),o[3]||(o[3]=e("div",{flex:"~ row items-center gap-2","my-5":""},[e("div",{"i-solar:microphone-3-bold-duotone":"",text:"neutral-500 dark:neutral-400 4xl"}),e("div",null,[e("div",null,[e("span",{text:"neutral-300 dark:neutral-500"},"Transcription (speech-to-text) model providers. e.g. Whisper.cpp, OpenAI, Azure Speech")]),e("div",{flex:"","text-nowrap":"","text-3xl":"","font-semibold":""},[e("div",null," Transcription ")])])],-1)),e("div",B,[(n(!0),r(c,null,m(i(v),(t,a)=>d((n(),s(i(p),{key:t.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+a*10,delay:(i(u).length+i(g).length+a)*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"])),[[l]])),128))])]),i(k)?(n(),s(I,{key:0,"z-index":-1,icon:i(b),"icon-size":12,duration:1e3,started:i(h),"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"])):d((n(),r("div",O,o[4]||(o[4]=[e("div",{text:"60","i-solar:box-minimalistic-bold-duotone":""},null,-1)]))),[[l]])],64)}}});typeof y=="function"&&y(P);export{P as default}; diff --git a/assets/index-DrKad9cl.js b/assets/index-DrKad9cl.js new file mode 100644 index 0000000000000000000000000000000000000000..d3bd7de9512a22401cf874228c9d97de327ac327 --- /dev/null +++ b/assets/index-DrKad9cl.js @@ -0,0 +1,3 @@ +function E(m){const s=Object.values(m).filter(a=>typeof a=="number");return Object.entries(m).filter(([a,t])=>s.indexOf(+a)===-1).map(([a,t])=>t)}class T{constructor(){this._map=new WeakMap,this._idmap=new Map}add(s,...o){const a=o[0];if(this._map.set(s,a),a&&typeof a=="object"&&"id"in a){if(this._idmap.has(a.id))throw new Error(`ID ${a.id} already exists in the registry`);this._idmap.set(a.id,s)}return this}remove(s){return this._map.delete(s),this}get(s){const o=s._zod.parent;if(o){const a={...this.get(o)??{}};return delete a.id,{...a,...this._map.get(s)}}return this._map.get(s)}has(s){return this._map.has(s)}}function I(){return new T}const J=I();class j{constructor(s){this.counter=0,this.metadataRegistry=(s==null?void 0:s.metadata)??J,this.target=(s==null?void 0:s.target)??"draft-2020-12",this.unrepresentable=(s==null?void 0:s.unrepresentable)??"throw",this.override=(s==null?void 0:s.override)??(()=>{}),this.io=(s==null?void 0:s.io)??"output",this.seen=new Map}process(s,o={path:[],schemaPath:[]}){var O,S,x;var a;const t=s._zod.def,y={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},b=this.seen.get(s);if(b)return b.count++,o.schemaPath.includes(s)&&(b.cycle=o.path),b.schema;const f={schema:{},count:1,cycle:void 0};this.seen.set(s,f);const g=(S=(O=s._zod).toJSONSchema)==null?void 0:S.call(O);if(g)f.schema=g;else{const n={...o,schemaPath:[...o.schemaPath,s],path:o.path},h=s._zod.parent;if(h)f.ref=h,this.process(h,n),this.seen.get(h).isParent=!0;else{const c=f.schema;switch(t.type){case"string":{const e=c;e.type="string";const{minimum:r,maximum:i,format:u,patterns:l,contentEncoding:d}=s._zod.bag;if(typeof r=="number"&&(e.minLength=r),typeof i=="number"&&(e.maxLength=i),u&&(e.format=y[u]??u,e.format===""&&delete e.format),d&&(e.contentEncoding=d),l&&l.size>0){const k=[...l];k.length===1?e.pattern=k[0].source:k.length>1&&(f.schema.allOf=[...k.map(N=>({...this.target==="draft-7"?{type:"string"}:{},pattern:N.source}))])}break}case"number":{const e=c,{minimum:r,maximum:i,format:u,multipleOf:l,exclusiveMaximum:d,exclusiveMinimum:k}=s._zod.bag;typeof u=="string"&&u.includes("int")?e.type="integer":e.type="number",typeof k=="number"&&(e.exclusiveMinimum=k),typeof r=="number"&&(e.minimum=r,typeof k=="number"&&(k>=r?delete e.minimum:delete e.exclusiveMinimum)),typeof d=="number"&&(e.exclusiveMaximum=d),typeof i=="number"&&(e.maximum=i,typeof d=="number"&&(d<=i?delete e.maximum:delete e.exclusiveMaximum)),typeof l=="number"&&(e.multipleOf=l);break}case"boolean":{const e=c;e.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"undefined":{const e=c;e.type="null";break}case"null":{c.type="null";break}case"any":break;case"unknown":break;case"never":{c.not={};break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{const e=c,{minimum:r,maximum:i}=s._zod.bag;typeof r=="number"&&(e.minItems=r),typeof i=="number"&&(e.maxItems=i),e.type="array",e.items=this.process(t.element,{...n,path:[...n.path,"items"]});break}case"object":{const e=c;e.type="object",e.properties={};const r=t.shape;for(const l in r)e.properties[l]=this.process(r[l],{...n,path:[...n.path,"properties",l]});const i=new Set(Object.keys(r)),u=new Set([...i].filter(l=>{const d=t.shape[l]._zod;return this.io==="input"?d.optin===void 0:d.optout===void 0}));u.size>0&&(e.required=Array.from(u)),((x=t.catchall)==null?void 0:x._zod.def.type)==="never"?e.additionalProperties=!1:t.catchall?t.catchall&&(e.additionalProperties=this.process(t.catchall,{...n,path:[...n.path,"additionalProperties"]})):this.io==="output"&&(e.additionalProperties=!1);break}case"union":{const e=c;e.anyOf=t.options.map((r,i)=>this.process(r,{...n,path:[...n.path,"anyOf",i]}));break}case"intersection":{const e=c,r=this.process(t.left,{...n,path:[...n.path,"allOf",0]}),i=this.process(t.right,{...n,path:[...n.path,"allOf",1]}),u=d=>"allOf"in d&&Object.keys(d).length===1,l=[...u(r)?r.allOf:[r],...u(i)?i.allOf:[i]];e.allOf=l;break}case"tuple":{const e=c;e.type="array";const r=t.items.map((l,d)=>this.process(l,{...n,path:[...n.path,"prefixItems",d]}));if(this.target==="draft-2020-12"?e.prefixItems=r:e.items=r,t.rest){const l=this.process(t.rest,{...n,path:[...n.path,"items"]});this.target==="draft-2020-12"?e.items=l:e.additionalItems=l}t.rest&&(e.items=this.process(t.rest,{...n,path:[...n.path,"items"]}));const{minimum:i,maximum:u}=s._zod.bag;typeof i=="number"&&(e.minItems=i),typeof u=="number"&&(e.maxItems=u);break}case"record":{const e=c;e.type="object",e.propertyNames=this.process(t.keyType,{...n,path:[...n.path,"propertyNames"]}),e.additionalProperties=this.process(t.valueType,{...n,path:[...n.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{const e=c,r=E(t.entries);r.every(i=>typeof i=="number")&&(e.type="number"),r.every(i=>typeof i=="string")&&(e.type="string"),e.enum=r;break}case"literal":{const e=c,r=[];for(const i of t.values)if(i===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof i=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");r.push(Number(i))}else r.push(i);if(r.length!==0)if(r.length===1){const i=r[0];e.type=i===null?"null":typeof i,e.const=i}else r.every(i=>typeof i=="number")&&(e.type="number"),r.every(i=>typeof i=="string")&&(e.type="string"),r.every(i=>typeof i=="boolean")&&(e.type="string"),r.every(i=>i===null)&&(e.type="null"),e.enum=r;break}case"file":{const e=c,r={type:"string",format:"binary",contentEncoding:"binary"},{minimum:i,maximum:u,mime:l}=s._zod.bag;i!==void 0&&(r.minLength=i),u!==void 0&&(r.maxLength=u),l?l.length===1?(r.contentMediaType=l[0],Object.assign(e,r)):e.anyOf=l.map(d=>({...r,contentMediaType:d})):Object.assign(e,r);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{const e=this.process(t.innerType,n);c.anyOf=[e,{type:"null"}];break}case"nonoptional":{this.process(t.innerType,n),f.ref=t.innerType;break}case"success":{const e=c;e.type="boolean";break}case"default":{this.process(t.innerType,n),f.ref=t.innerType,c.default=JSON.parse(JSON.stringify(t.defaultValue));break}case"prefault":{this.process(t.innerType,n),f.ref=t.innerType,this.io==="input"&&(c._prefault=JSON.parse(JSON.stringify(t.defaultValue)));break}case"catch":{this.process(t.innerType,n),f.ref=t.innerType;let e;try{e=t.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}c.default=e;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{const e=c,r=s._zod.pattern;if(!r)throw new Error("Pattern not found in template literal");e.type="string",e.pattern=r.source;break}case"pipe":{const e=this.io==="input"?t.in._zod.def.type==="transform"?t.out:t.in:t.out;this.process(e,n),f.ref=e;break}case"readonly":{this.process(t.innerType,n),f.ref=t.innerType,c.readOnly=!0;break}case"promise":{this.process(t.innerType,n),f.ref=t.innerType;break}case"optional":{this.process(t.innerType,n),f.ref=t.innerType;break}case"lazy":{const e=s._zod.innerType;this.process(e,n),f.ref=e;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}}}}const w=this.metadataRegistry.get(s);return w&&Object.assign(f.schema,w),this.io==="input"&&p(s)&&(delete f.schema.examples,delete f.schema.default),this.io==="input"&&f.schema._prefault&&((a=f.schema).default??(a.default=f.schema._prefault)),delete f.schema._prefault,this.seen.get(s).schema}emit(s,o){var v,O,S,x;const a={cycles:(o==null?void 0:o.cycles)??"ref",reused:(o==null?void 0:o.reused)??"inline",external:(o==null?void 0:o.external)??void 0},t=this.seen.get(s);if(!t)throw new Error("Unprocessed schema. This is a bug in Zod.");const y=n=>{var i;const h=this.target==="draft-2020-12"?"$defs":"definitions";if(a.external){const u=(i=a.external.registry.get(n[0]))==null?void 0:i.id;if(u)return{ref:a.external.uri(u)};const l=n[1].defId??n[1].schema.id??`schema${this.counter++}`;return n[1].defId=l,{defId:l,ref:`${a.external.uri("__shared")}#/${h}/${l}`}}if(n[1]===t)return{ref:"#"};const e=`#/${h}/`,r=n[1].schema.id??`__schema${this.counter++}`;return{defId:r,ref:e+r}},b=n=>{if(n[1].schema.$ref)return;const h=n[1],{ref:c,defId:e}=y(n);h.def={...h.schema},e&&(h.defId=e);const r=h.schema;for(const i in r)delete r[i];r.$ref=c};for(const n of this.seen.entries()){const h=n[1];if(s===n[0]){b(n);continue}if(a.external){const e=(v=a.external.registry.get(n[0]))==null?void 0:v.id;if(s!==n[0]&&e){b(n);continue}}if((O=this.metadataRegistry.get(n[0]))==null?void 0:O.id){b(n);continue}if(h.cycle){if(a.cycles==="throw")throw new Error(`Cycle detected: #/${(S=h.cycle)==null?void 0:S.join("/")}/ + +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);a.cycles==="ref"&&b(n);continue}if(h.count>1&&a.reused==="ref"){b(n);continue}}const f=(n,h)=>{const c=this.seen.get(n),e=c.def??c.schema,r={...e};if(c.ref===null)return;const i=c.ref;if(c.ref=null,i){f(i,h);const u=this.seen.get(i).schema;u.$ref&&h.target==="draft-7"?(e.allOf=e.allOf??[],e.allOf.push(u)):(Object.assign(e,u),Object.assign(e,r))}c.isParent||this.override({zodSchema:n,jsonSchema:e})};for(const n of[...this.seen.entries()].reverse())f(n[0],{target:this.target});const g={};this.target==="draft-2020-12"?g.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?g.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),Object.assign(g,t.def);const w=((x=a.external)==null?void 0:x.defs)??{};for(const n of this.seen.entries()){const h=n[1];h.def&&h.defId&&(w[h.defId]=h.def)}!a.external&&Object.keys(w).length>0&&(this.target==="draft-2020-12"?g.$defs=w:g.definitions=w);try{return JSON.parse(JSON.stringify(g))}catch{throw new Error("Error converting schema to JSON.")}}}function _(m,s){if(m instanceof T){const a=new j(s),t={};for(const f of m._idmap.entries()){const[g,w]=f;a.process(w)}const y={},b={registry:m,uri:(s==null?void 0:s.uri)||(f=>f),defs:t};for(const f of m._idmap.entries()){const[g,w]=f;y[g]=a.emit(w,{...s,external:b})}if(Object.keys(t).length>0){const f=a.target==="draft-2020-12"?"$defs":"definitions";y.__shared={[f]:t}}return{schemas:y}}const o=new j(s);return o.process(m),o.emit(m,s)}function p(m,s){const o=s??{seen:new Set};if(o.seen.has(m))return!1;o.seen.add(m);const t=m._zod.def;switch(t.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return p(t.element,o);case"object":{for(const y in t.shape)if(p(t.shape[y],o))return!0;return!1}case"union":{for(const y of t.options)if(p(y,o))return!0;return!1}case"intersection":return p(t.left,o)||p(t.right,o);case"tuple":{for(const y of t.items)if(p(y,o))return!0;return!!(t.rest&&p(t.rest,o))}case"record":return p(t.keyType,o)||p(t.valueType,o);case"map":return p(t.keyType,o)||p(t.valueType,o);case"set":return p(t.valueType,o);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return p(t.innerType,o);case"lazy":return p(t.getter(),o);case"default":return p(t.innerType,o);case"prefault":return p(t.innerType,o);case"custom":return!1;case"transform":return!0;case"pipe":return p(t.in,o)||p(t.out,o);case"success":return!1;case"catch":return!1}throw new Error(`Unknown schema type: ${t.type}`)}export{T as $ZodRegistry,j as JSONSchemaGenerator,J as globalRegistry,I as registry,_ as toJSONSchema}; diff --git a/assets/index-C9m14O1J.js b/assets/index-DsBJhxAL.js similarity index 88% rename from assets/index-C9m14O1J.js rename to assets/index-DsBJhxAL.js index 281b580abd4b9e12294a002c4f2c6b770b136b18..1cc02edae35670d8265496861bfd5cdfeed2e307 100644 --- a/assets/index-C9m14O1J.js +++ b/assets/index-DsBJhxAL.js @@ -1 +1 @@ -import{l as Z,J as P}from"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{_ as W,a as Y}from"./Model.vue_vue_type_script_setup_true_lang-DvSPvuiM.js";import{d as E,bj as I,c as m,o as s,u as t,bh as q,$ as G,cn as H,a0 as K,e as j,w as Q,co as X,b as l,bk as J,W as ee,bl as u,a as f,bm as O,cd as te,ch as g,Y as N,c6 as U,c7 as V,cl as oe,c2 as ie,bg as ne,cb as ae,c5 as le}from"./index-WDP_Z4A8.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import"./three-vrm.module-DIVMhp6T.js";import{d as z,e as se}from"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{V as re}from"./browser-CkchkNbv.js";import{_ as de}from"./IconAnimation.vue_vue_type_script_setup_true_lang-Bo8-R3ZB.js";import{_ as B,a as ce}from"./ColorPalette.vue_vue_type_script_setup_true_lang-BWRGi3IC.js";import{u as ue}from"./useIconAnimation-B41IKS_9.js";import{b as D}from"./route-block-B_A1xBdJ.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./index-DeGbjSQn.js";const fe=["disabled"],h=E({__name:"Live2DModelControlButton",emits:["click"],setup(F){const r=I();return(d,i)=>(s(),m("button",{disabled:t(r).loadingLive2dModel,bg:"neutral-100 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",transition:"all ease-in-out duration-250",rounded:"",onClick:i[0]||(i[0]=p=>d.$emit("click"))},[q(d.$slots,"default")],8,fe))}}),me={flex:"~ col gap-4"},pe={flex:"","items-center":"","gap-2":""},ve=["disabled","placeholder"],_e={"font-medium":""},be={flex:"","gap-2":""},ge=["onUpdate:modelValue"],he=["href","download"],ye=E({__name:"Live2DSettings",props:{palette:null},emits:["extractColorsFromModel"],setup(F){const{t:r}=G(),d=H({accept:"application/zip"}),i=I(),{live2dModelFile:p,live2dMotionMap:v,live2dLoadSource:y,loadingLive2dModel:M,availableLive2dMotions:L,live2dModelUrl:k}=K(i),b=j(k.value);d.onChange(o=>{o&&o.length>0&&(v.value={},p.value=o[0],y.value="file",M.value=!0)}),Q(()=>i.loadingLive2dModel,o=>{o||y.value==="file"&&L.value.forEach(e=>{e.motionName in z?v.value[e.fileName]=e.motionName:v.value[e.fileName]=se})});async function x(o,e){if(!Object.keys(e).length)return o;const a=await new P().loadAsync(o),c=Object.keys(a.files).find($=>$.endsWith("model3.json"));if(!c)throw new Error("model3.json not found");const A=await a.file(c).async("string"),R=JSON.parse(A),C={};Object.entries(e).forEach(([$,S])=>{if(C[S]){C[S].push({File:$});return}C[S]=[{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 _(){const o=await Z.getItem("live2dModel");if(!o)return;const e=await x(o,v.value);p.value=e,y.value="file",M.value=!0}const w=X(p);return(o,e)=>(s(),m("div",me,[l(t(B),{title:t(r)("settings.live2d.change-model.title"),icon:"i-solar:magic-stick-3-bold-duotone","inner-class":"text-sm"},{default:u(()=>[f("div",pe,[O(f("input",{"onUpdate:modelValue":e[0]||(e[0]=n=>b.value=n),disabled:t(i).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(r)("settings.live2d.change-model.from-url-placeholder")},null,8,ve),[[te,b.value]]),l(h,{class:"form-control",onClick:e[1]||(e[1]=n=>k.value=b.value)},{default:u(()=>[g(N(t(r)("settings.live2d.change-model.from-url")),1)]),_:1})]),l(h,{class:"form-control place-self-end",onClick:e[2]||(e[2]=n=>t(d).open())},{default:u(()=>[g(N(t(r)("settings.live2d.change-model.from-file"))+"... ",1)]),_:1}),l(h,{class:"form-control",onClick:e[3]||(e[3]=n=>o.$emit("extractColorsFromModel"))},{default:u(()=>e[4]||(e[4]=[g(" Extract colors from model ")])),_:1,__:[4]}),l(ce,{colors:F.palette.map(n=>({hex:n,name:n}))},null,8,["colors"])]),_:1},8,["title"]),t(i).live2dLoadSource==="file"?(s(),J(t(B),{key:0,title:"settings.live2d.edit-motion-map.title",icon:"i-solar:face-scan-circle-bold-duotone"},{default:u(()=>{var n;return[(s(!0),m(U,null,V(t(i).availableLive2dMotions,a=>(s(),m("div",{key:a.fileName,flex:"","items-center":"","justify-between":"","text-sm":""},[f("span",_e,N(a.fileName),1),f("div",be,[O(f("select",{"onUpdate:modelValue":c=>t(i).live2dMotionMap[a.fileName]=c},[(s(!0),m(U,null,V(Object.keys(t(z)),c=>(s(),m("option",{key:c},N(c),1))),128))],8,ge),[[oe,t(i).live2dMotionMap[a.fileName]]]),l(h,{class:"form-control",onClick:c=>t(i).live2dCurrentMotion={group:a.motionName,index:a.motionIndex}},{default:u(()=>e[5]||(e[5]=[g(" Play ")])),_:2,__:[5]},1032,["onClick"])])]))),128)),l(h,{onClick:_},{default:u(()=>e[6]||(e[6]=[g(" Save and patch ")])),_:1,__:[6]}),f("a",{"mt-2":"",block:"",href:t(w),download:`${((n=t(i).live2dModelFile)==null?void 0:n.name)||"live2d"}-motion-edited.zip`},[l(h,{"w-full":""},{default:u(()=>e[7]||(e[7]=[g("Export")])),_:1,__:[7]})],8,he)]}),_:1})):ee("",!0)]))}}),xe=ie(ye,[["__scopeId","data-v-90548ace"]]),Me={flex:""},ke={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(F){const r=j(),d=j(),{width:i,height:p}=ne(r),v=j([]);async function y(){if(!d.value)return;const x=await d.value.captureFrame();if(!x){console.error("No frame captured");return}const _=URL.createObjectURL(x);try{const o=await new re(_).getPalette();v.value=Object.values(o).map(e=>e==null?void 0:e.hex).filter(e=>typeof e=="string")}finally{URL.revokeObjectURL(_)}}const{iconAnimationStarted:M,showIconAnimation:L,animationIcon:k}=ue("i-solar:people-nearby-bold-duotone"),b=ae();return(x,_)=>{const w=le("motion");return s(),m(U,null,[f("div",Me,[f("div",{ref_key:"live2dContainerRef",ref:r,w:"50%",h:"80vh"},[l(t(Y),{ref_key:"live2dCanvasRef",ref:d,width:t(i),height:t(p)},{default:u(({app:o})=>[l(t(W),{app:o,"mouth-open-size":0,width:t(i),height:t(p),paused:!1,"focus-at":{x:t(b).x.value,y:t(b).y.value}},null,8,["app","width","height","focus-at"])]),_:1},8,["width","height"])],512),l(xe,{w:"50%",h:"80vh",palette:v.value,onExtractColorsFromModel:y},null,8,["palette"])]),t(L)?(s(),J(de,{key:0,"z-index":-1,icon:t(k),"icon-size":12,duration:1e3,started:t(M),"is-reverse":!0,position:"calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)","text-color":"text-neutral-200/50 dark:text-neutral-600/20"},null,8,["icon","started"])):O((s(),m("div",ke,_[0]||(_[0]=[f("div",{text:"60","i-solar:people-nearby-bold-duotone":""},null,-1)]))),[[w]])],64)}}});typeof D=="function"&&D(we);export{we as default}; +import{l as Z,J as P}from"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import{_ as W,a as Y}from"./Model.vue_vue_type_script_setup_true_lang-BJUN66rj.js";import{d as E,bj as I,c as m,o as s,u as t,bh as q,$ as G,cn as H,a0 as K,e as j,w as Q,co as X,b as l,bk as J,W as ee,bl as u,a as f,bm as O,cd as te,ch as g,Y as N,c6 as U,c7 as V,cl as oe,c2 as ie,bg as ne,cb as ae,c5 as le}from"./index-8LjpXIG7.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import"./three-vrm.module-r4bOtVyC.js";import{d as z,e as se}from"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{V as re}from"./browser-CkchkNbv.js";import{_ as de}from"./IconAnimation.vue_vue_type_script_setup_true_lang-CT2O6kWS.js";import{_ as B,a as ce}from"./ColorPalette.vue_vue_type_script_setup_true_lang-CcpMsyh5.js";import{u as ue}from"./useIconAnimation-DdsxO8m6.js";import{b as D}from"./route-block-B_A1xBdJ.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BOcCBViZ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-DyyWKgKi.js";import"./index-BuTdizGl.js";const fe=["disabled"],h=E({__name:"Live2DModelControlButton",emits:["click"],setup(F){const r=I();return(d,i)=>(s(),m("button",{disabled:t(r).loadingLive2dModel,bg:"neutral-100 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",transition:"all ease-in-out duration-250",rounded:"",onClick:i[0]||(i[0]=p=>d.$emit("click"))},[q(d.$slots,"default")],8,fe))}}),me={flex:"~ col gap-4"},pe={flex:"","items-center":"","gap-2":""},ve=["disabled","placeholder"],_e={"font-medium":""},be={flex:"","gap-2":""},ge=["onUpdate:modelValue"],he=["href","download"],ye=E({__name:"Live2DSettings",props:{palette:null},emits:["extractColorsFromModel"],setup(F){const{t:r}=G(),d=H({accept:"application/zip"}),i=I(),{live2dModelFile:p,live2dMotionMap:v,live2dLoadSource:y,loadingLive2dModel:M,availableLive2dMotions:L,live2dModelUrl:k}=K(i),b=j(k.value);d.onChange(o=>{o&&o.length>0&&(v.value={},p.value=o[0],y.value="file",M.value=!0)}),Q(()=>i.loadingLive2dModel,o=>{o||y.value==="file"&&L.value.forEach(e=>{e.motionName in z?v.value[e.fileName]=e.motionName:v.value[e.fileName]=se})});async function x(o,e){if(!Object.keys(e).length)return o;const a=await new P().loadAsync(o),c=Object.keys(a.files).find($=>$.endsWith("model3.json"));if(!c)throw new Error("model3.json not found");const A=await a.file(c).async("string"),R=JSON.parse(A),C={};Object.entries(e).forEach(([$,S])=>{if(C[S]){C[S].push({File:$});return}C[S]=[{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 _(){const o=await Z.getItem("live2dModel");if(!o)return;const e=await x(o,v.value);p.value=e,y.value="file",M.value=!0}const w=X(p);return(o,e)=>(s(),m("div",me,[l(t(B),{title:t(r)("settings.live2d.change-model.title"),icon:"i-solar:magic-stick-3-bold-duotone","inner-class":"text-sm"},{default:u(()=>[f("div",pe,[O(f("input",{"onUpdate:modelValue":e[0]||(e[0]=n=>b.value=n),disabled:t(i).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(r)("settings.live2d.change-model.from-url-placeholder")},null,8,ve),[[te,b.value]]),l(h,{class:"form-control",onClick:e[1]||(e[1]=n=>k.value=b.value)},{default:u(()=>[g(N(t(r)("settings.live2d.change-model.from-url")),1)]),_:1})]),l(h,{class:"form-control place-self-end",onClick:e[2]||(e[2]=n=>t(d).open())},{default:u(()=>[g(N(t(r)("settings.live2d.change-model.from-file"))+"... ",1)]),_:1}),l(h,{class:"form-control",onClick:e[3]||(e[3]=n=>o.$emit("extractColorsFromModel"))},{default:u(()=>e[4]||(e[4]=[g(" Extract colors from model ")])),_:1,__:[4]}),l(ce,{colors:F.palette.map(n=>({hex:n,name:n}))},null,8,["colors"])]),_:1},8,["title"]),t(i).live2dLoadSource==="file"?(s(),J(t(B),{key:0,title:"settings.live2d.edit-motion-map.title",icon:"i-solar:face-scan-circle-bold-duotone"},{default:u(()=>{var n;return[(s(!0),m(U,null,V(t(i).availableLive2dMotions,a=>(s(),m("div",{key:a.fileName,flex:"","items-center":"","justify-between":"","text-sm":""},[f("span",_e,N(a.fileName),1),f("div",be,[O(f("select",{"onUpdate:modelValue":c=>t(i).live2dMotionMap[a.fileName]=c},[(s(!0),m(U,null,V(Object.keys(t(z)),c=>(s(),m("option",{key:c},N(c),1))),128))],8,ge),[[oe,t(i).live2dMotionMap[a.fileName]]]),l(h,{class:"form-control",onClick:c=>t(i).live2dCurrentMotion={group:a.motionName,index:a.motionIndex}},{default:u(()=>e[5]||(e[5]=[g(" Play ")])),_:2,__:[5]},1032,["onClick"])])]))),128)),l(h,{onClick:_},{default:u(()=>e[6]||(e[6]=[g(" Save and patch ")])),_:1,__:[6]}),f("a",{"mt-2":"",block:"",href:t(w),download:`${((n=t(i).live2dModelFile)==null?void 0:n.name)||"live2d"}-motion-edited.zip`},[l(h,{"w-full":""},{default:u(()=>e[7]||(e[7]=[g("Export")])),_:1,__:[7]})],8,he)]}),_:1})):ee("",!0)]))}}),xe=ie(ye,[["__scopeId","data-v-90548ace"]]),Me={flex:""},ke={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(F){const r=j(),d=j(),{width:i,height:p}=ne(r),v=j([]);async function y(){if(!d.value)return;const x=await d.value.captureFrame();if(!x){console.error("No frame captured");return}const _=URL.createObjectURL(x);try{const o=await new re(_).getPalette();v.value=Object.values(o).map(e=>e==null?void 0:e.hex).filter(e=>typeof e=="string")}finally{URL.revokeObjectURL(_)}}const{iconAnimationStarted:M,showIconAnimation:L,animationIcon:k}=ue("i-solar:people-nearby-bold-duotone"),b=ae();return(x,_)=>{const w=le("motion");return s(),m(U,null,[f("div",Me,[f("div",{ref_key:"live2dContainerRef",ref:r,w:"50%",h:"80vh"},[l(t(Y),{ref_key:"live2dCanvasRef",ref:d,width:t(i),height:t(p)},{default:u(({app:o})=>[l(t(W),{app:o,"mouth-open-size":0,width:t(i),height:t(p),paused:!1,"focus-at":{x:t(b).x.value,y:t(b).y.value}},null,8,["app","width","height","focus-at"])]),_:1},8,["width","height"])],512),l(xe,{w:"50%",h:"80vh",palette:v.value,onExtractColorsFromModel:y},null,8,["palette"])]),t(L)?(s(),J(de,{key:0,"z-index":-1,icon:t(k),"icon-size":12,duration:1e3,started:t(M),"is-reverse":!0,position:"calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)","text-color":"text-neutral-200/50 dark:text-neutral-600/20"},null,8,["icon","started"])):O((s(),m("div",ke,_[0]||(_[0]=[f("div",{text:"60","i-solar:people-nearby-bold-duotone":""},null,-1)]))),[[w]])],64)}}});typeof D=="function"&&D(we);export{we as default}; diff --git a/assets/index-Cqc4fKz2.js b/assets/index-JeYrWqis.js similarity index 85% rename from assets/index-Cqc4fKz2.js rename to assets/index-JeYrWqis.js index 98f2642d829b76673e9b19671960b583f35570df..c6f0b0541e33db68ec38b3e4f24674691efcf0ca 100644 --- a/assets/index-Cqc4fKz2.js +++ b/assets/index-JeYrWqis.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as E,V as T,e as n,$ as w,bj as A,f as $,c5 as z,c as p,o as a,a as u,bk as b,bm as m,c6 as P,c7 as j,u as g,a3 as D,_ as q}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{I as R}from"./IconItem-CdLibJxT.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as V}from"./IconAnimation.vue_vue_type_script_setup_true_lang-Bo8-R3ZB.js";import{b as h}from"./route-block-B_A1xBdJ.js";import"./floating-ui.core-CgBsuaUc.js";const F={flex:"~ col gap-4","font-thin":""},L={flex:"~ col gap-4"},N={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":""},O={text:"60","i-solar:settings-bold-duotone":""},G=E({__name:"index",setup(H){const k=T(),f=n(!1),x=n(),r=n(),{t}=w(),v=n(""),y=n(""),_=n(!1),c=A();function I(){var o;(o=r.value)==null||o.call(r)}async function S(o,s){const e=o.currentTarget.querySelector(".menu-icon-item-icon");if(!e)return;const l=e.getBoundingClientRect(),d=`${l.left}px, ${l.top}px`;v.value=s.icon,y.value=d,_.value=!0,await q(),f.value=!0}const B=k.beforeEach(async(o,s,i)=>{if(!c.usePageSpecificTransitions||c.disableTransitions){i();return}await new Promise(e=>{r.value=e}),B(),i()}),C=$(()=>[{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(o,s)=>{const i=z("motion");return a(),p("div",F,[s[0]||(s[0]=u("div",null,null,-1)),u("div",L,[(a(!0),p(P,null,j(C.value,(e,l)=>m((a(),b(g(R),{key:e.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:D({transitionDelay:`${l*50}ms`}),title:e.title,description:e.description,icon:e.icon,to:e.to,onClick:d=>S(d,e)},null,8,["style","title","description","icon","to","onClick"])),[[i]])),128))]),_.value&&!g(c).disableTransitions&&g(c).usePageSpecificTransitions?(a(),b(V,{key:0,ref_key:"iconAnimation",ref:x,icon:v.value,"icon-size":6*1.2,position:y.value,duration:1e3,"text-color":"text-neutral-400/50 dark:text-neutral-600/20",started:f.value,onAnimationEndedOnce:I},null,8,["icon","position","started"])):m((a(),p("div",N,[m(u("div",O,null,512),[[i]])])),[[i]])])}}});typeof h=="function"&&h(G);export{G as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import{d as E,V as T,e as n,$ as w,bj as A,f as $,c5 as z,c as p,o as a,a as u,bk as b,bm as m,c6 as P,c7 as j,u as g,a3 as D,_ as q}from"./index-8LjpXIG7.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{I as R}from"./IconItem-rhhSEiTz.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{_ as V}from"./IconAnimation.vue_vue_type_script_setup_true_lang-CT2O6kWS.js";import{b as h}from"./route-block-B_A1xBdJ.js";import"./floating-ui.core-CgBsuaUc.js";const F={flex:"~ col gap-4","font-thin":""},L={flex:"~ col gap-4"},N={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":""},O={text:"60","i-solar:settings-bold-duotone":""},G=E({__name:"index",setup(H){const k=T(),f=n(!1),x=n(),r=n(),{t}=w(),v=n(""),y=n(""),_=n(!1),c=A();function I(){var o;(o=r.value)==null||o.call(r)}async function S(o,s){const e=o.currentTarget.querySelector(".menu-icon-item-icon");if(!e)return;const l=e.getBoundingClientRect(),d=`${l.left}px, ${l.top}px`;v.value=s.icon,y.value=d,_.value=!0,await q(),f.value=!0}const B=k.beforeEach(async(o,s,i)=>{if(!c.usePageSpecificTransitions||c.disableTransitions){i();return}await new Promise(e=>{r.value=e}),B(),i()}),C=$(()=>[{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(o,s)=>{const i=z("motion");return a(),p("div",F,[s[0]||(s[0]=u("div",null,null,-1)),u("div",L,[(a(!0),p(P,null,j(C.value,(e,l)=>m((a(),b(g(R),{key:e.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:D({transitionDelay:`${l*50}ms`}),title:e.title,description:e.description,icon:e.icon,to:e.to,onClick:d=>S(d,e)},null,8,["style","title","description","icon","to","onClick"])),[[i]])),128))]),_.value&&!g(c).disableTransitions&&g(c).usePageSpecificTransitions?(a(),b(V,{key:0,ref_key:"iconAnimation",ref:x,icon:v.value,"icon-size":6*1.2,position:y.value,duration:1e3,"text-color":"text-neutral-400/50 dark:text-neutral-600/20",started:f.value,onAnimationEndedOnce:I},null,8,["icon","position","started"])):m((a(),p("div",N,[m(u("div",O,null,512),[[i]])])),[[i]])])}}});typeof h=="function"&&h(G);export{G as default}; diff --git a/assets/mcp-CVsSz3w1.js b/assets/mcp-BNgNJ97R.js similarity index 99% rename from assets/mcp-CVsSz3w1.js rename to assets/mcp-BNgNJ97R.js index e1bc9b6240a0ee5acd7f5624d40015bc4db43552..c548ebed04fe49c01f6d0f21d618c70a27904e6d 100644 --- a/assets/mcp-CVsSz3w1.js +++ b/assets/mcp-BNgNJ97R.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/effect-WSjEuzC9-Dq66khSv.js","assets/index-WDP_Z4A8.js","assets/index-zBe9gvvY.css","assets/sury-DmrZ3_Oj-CYYeWtlB.js","assets/valibot-CQk-M5rL-Bzl_-bg9.js","assets/zod-Db63SLXj-IXQs-Vsk.js"])))=>i.map(i=>d[i]); -import{cP as L}from"./index-WDP_Z4A8.js";const Ce="https://xsai.js.org/docs/packages-top/xsschema#missing-dependencies",ut=async(s,e)=>{try{return await s}catch{throw new Error(`xsschema: Missing dependencies "${e}". see ${Ce}`)}},Se=async s=>{switch(s){case"arktype":return L(()=>import("./arktype-C-GObzDh-1xlRyYUo.js"),[]).then(async({getToJsonSchemaFn:e})=>e());case"effect":return L(()=>import("./effect-WSjEuzC9-Dq66khSv.js"),__vite__mapDeps([0,1,2])).then(async({getToJsonSchemaFn:e})=>e());case"sury":return L(()=>import("./sury-DmrZ3_Oj-CYYeWtlB.js"),__vite__mapDeps([3,1,2])).then(async({getToJsonSchemaFn:e})=>e());case"valibot":return L(()=>import("./valibot-CQk-M5rL-Bzl_-bg9.js"),__vite__mapDeps([4,1,2])).then(async({getToJsonSchemaFn:e})=>e());case"zod":return L(()=>import("./zod-Db63SLXj-IXQs-Vsk.js"),__vite__mapDeps([5,1,2])).then(async({getToJsonSchemaFn:e})=>e());default:throw new Error(`xsschema: Unsupported schema vendor "${s}". see https://xsai.js.org/docs/packages-top/xsschema#unsupported-schema-vendor`)}},Oe=async s=>Se(s["~standard"].vendor).then(async e=>e(s)),D=async({description:s,execute:e,name:t,parameters:r})=>{const n=await Oe(r);return{execute:e,function:{description:s,name:t,parameters:{...n,additionalProperties:!1},strict:!0},type:"function"}};var g;(function(s){s.assertEqual=n=>{};function e(n){}s.assertIs=e;function t(n){throw new Error}s.assertNever=t,s.arrayToEnum=n=>{const a={};for(const i of n)a[i]=i;return a},s.getValidEnumValues=n=>{const a=s.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),i={};for(const o of a)i[o]=n[o];return s.objectValues(i)},s.objectValues=n=>s.objectKeys(n).map(function(a){return n[a]}),s.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const a=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.push(i);return a},s.find=(n,a)=>{for(const i of n)if(a(i))return i},s.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function r(n,a=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}s.joinValues=r,s.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(g||(g={}));var ae;(function(s){s.mergeShapes=(e,t)=>({...e,...t})})(ae||(ae={}));const u=g.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),C=s=>{switch(typeof s){case"undefined":return u.undefined;case"string":return u.string;case"number":return Number.isNaN(s)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(s)?u.array:s===null?u.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?u.promise:typeof Map<"u"&&s instanceof Map?u.map:typeof Set<"u"&&s instanceof Set?u.set:typeof Date<"u"&&s instanceof Date?u.date:u.object;default:return u.unknown}},c=g.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class T extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(a){return a.message},r={_errors:[]},n=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)r._errors.push(t(i));else{let o=r,h=0;for(;ht.message){const t={},r=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}T.create=s=>new T(s);const X=(s,e)=>{let t;switch(s.code){case c.invalid_type:s.received===u.undefined?t="Required":t=`Expected ${s.expected}, received ${s.received}`;break;case c.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(s.expected,g.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:t=`Unrecognized key(s) in object: ${g.joinValues(s.keys,", ")}`;break;case c.invalid_union:t="Invalid input";break;case c.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${g.joinValues(s.options)}`;break;case c.invalid_enum_value:t=`Invalid enum value. Expected ${g.joinValues(s.options)}, received '${s.received}'`;break;case c.invalid_arguments:t="Invalid function arguments";break;case c.invalid_return_type:t="Invalid function return type";break;case c.invalid_date:t="Invalid date";break;case c.invalid_string:typeof s.validation=="object"?"includes"in s.validation?(t=`Invalid input: must include "${s.validation.includes}"`,typeof s.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${s.validation.position}`)):"startsWith"in s.validation?t=`Invalid input: must start with "${s.validation.startsWith}"`:"endsWith"in s.validation?t=`Invalid input: must end with "${s.validation.endsWith}"`:g.assertNever(s.validation):s.validation!=="regex"?t=`Invalid ${s.validation}`:t="Invalid";break;case c.too_small:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at least":"more than"} ${s.minimum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at least":"over"} ${s.minimum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(s.minimum))}`:t="Invalid input";break;case c.too_big:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at most":"less than"} ${s.maximum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at most":"under"} ${s.maximum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="bigint"?t=`BigInt must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly":s.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(s.maximum))}`:t="Invalid input";break;case c.custom:t="Invalid input";break;case c.invalid_intersection_types:t="Intersection results could not be merged";break;case c.not_multiple_of:t=`Number must be a multiple of ${s.multipleOf}`;break;case c.not_finite:t="Number must be finite";break;default:t=e.defaultError,g.assertNever(s)}return{message:t}};let Ae=X;function Ne(){return Ae}const Ze=s=>{const{data:e,path:t,errorMaps:r,issueData:n}=s,a=[...t,...n.path||[]],i={...n,path:a};if(n.message!==void 0)return{...n,path:a,message:n.message};let o="";const h=r.filter(f=>!!f).slice().reverse();for(const f of h)o=f(i,{data:e,defaultError:o}).message;return{...n,path:a,message:o}};function d(s,e){const t=Ne(),r=Ze({issueData:e,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,t,t===X?void 0:X].filter(n=>!!n)});s.common.issues.push(r)}class k{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const n of t){if(n.status==="aborted")return m;n.status==="dirty"&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const n of t){const a=await n.key,i=await n.value;r.push({key:a,value:i})}return k.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const n of t){const{key:a,value:i}=n;if(a.status==="aborted"||i.status==="aborted")return m;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||n.alwaysSet)&&(r[a.value]=i.value)}return{status:e.value,value:r}}}const m=Object.freeze({status:"aborted"}),U=s=>({status:"dirty",value:s}),b=s=>({status:"valid",value:s}),ie=s=>s.status==="aborted",oe=s=>s.status==="dirty",I=s=>s.status==="valid",W=s=>typeof Promise<"u"&&s instanceof Promise;var l;(function(s){s.errToObj=e=>typeof e=="string"?{message:e}:e||{},s.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(l||(l={}));class A{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const ce=(s,e)=>{if(I(e))return{success:!0,data:e.value};if(!s.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new T(s.common.issues);return this._error=t,this._error}}};function _(s){if(!s)return{};const{errorMap:e,invalid_type_error:t,required_error:r,description:n}=s;if(e&&(t||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(i,o)=>{const{message:h}=s;return i.code==="invalid_enum_value"?{message:h??o.defaultError}:typeof o.data>"u"?{message:h??r??o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:h??t??o.defaultError}},description:n}}class y{get description(){return this._def.description}_getType(e){return C(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:C(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new k,ctx:{common:e.parent.common,data:e.data,parsedType:C(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(W(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){const r={common:{issues:[],async:(t==null?void 0:t.async)??!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:C(e)},n=this._parseSync({data:e,path:r.path,parent:r});return ce(r,n)}"~validate"(e){var r,n;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:C(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:t});return I(a)?{value:a.value}:{issues:t.common.issues}}catch(a){(n=(r=a==null?void 0:a.message)==null?void 0:r.toLowerCase())!=null&&n.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(a=>I(a)?{value:a.value}:{issues:t.common.issues})}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:C(e)},n=this._parse({data:e,path:r.path,parent:r}),a=await(W(n)?n:Promise.resolve(n));return ce(r,a)}refine(e,t){const r=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,a)=>{const i=e(n),o=()=>a.addIssue({code:c.custom,...r(n)});return typeof Promise<"u"&&i instanceof Promise?i.then(h=>h?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((r,n)=>e(r)?!0:(n.addIssue(typeof t=="function"?t(r,n):t),!1))}_refinement(e){return new P({schema:this,typeName:p.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return O.create(this,this._def)}nullable(){return M.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return w.create(this)}promise(){return G.create(this,this._def)}or(e){return J.create([this,e],this._def)}and(e){return Y.create(this,e,this._def)}transform(e){return new P({..._(this._def),schema:this,typeName:p.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new te({..._(this._def),innerType:this,defaultValue:t,typeName:p.ZodDefault})}brand(){return new Ke({typeName:p.ZodBranded,type:this,..._(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new se({..._(this._def),innerType:this,catchValue:t,typeName:p.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return ne.create(this,e)}readonly(){return re.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Re=/^c[^\s-]{8,}$/i,Ee=/^[0-9a-z]+$/,Ie=/^[0-9A-HJKMNP-TV-Z]{26}$/i,je=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,$e=/^[a-z0-9_-]{21}$/i,Pe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Me=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Ve=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Le="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Q;const ze=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,De=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Ue=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Be=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Fe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,We=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ke="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",qe=new RegExp(`^${ke}$`);function be(s){let e="[0-5]\\d";s.precision?e=`${e}\\.\\d{${s.precision}}`:s.precision==null&&(e=`${e}(\\.\\d+)?`);const t=s.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function Je(s){return new RegExp(`^${be(s)}$`)}function Ye(s){let e=`${ke}T${be(s)}`;const t=[];return t.push(s.local?"Z?":"Z"),s.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Ge(s,e){return!!((e==="v4"||!e)&&ze.test(s)||(e==="v6"||!e)&&Ue.test(s))}function He(s,e){if(!Pe.test(s))return!1;try{const[t]=s.split("."),r=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(r));return!(typeof n!="object"||n===null||"typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function Qe(s,e){return!!((e==="v4"||!e)&&De.test(s)||(e==="v6"||!e)&&Be.test(s))}class S extends y{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_type,expected:u.string,received:a.parsedType}),m}const r=new k;let n;for(const a of this._def.checks)if(a.kind==="min")e.data.lengtha.value&&(n=this._getOrReturnCtx(e,n),d(n,{code:c.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,o=e.data.lengthe.test(n),{validation:t,code:c.invalid_string,...l.errToObj(r)})}_addCheck(e){return new S({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...l.errToObj(e)})}url(e){return this._addCheck({kind:"url",...l.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...l.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...l.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...l.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...l.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...l.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...l.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...l.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...l.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...l.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...l.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...l.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...l.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...l.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...l.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...l.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...l.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...l.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...l.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...l.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...l.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...l.errToObj(t)})}nonempty(e){return this.min(1,l.errToObj(e))}trim(){return new S({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new S({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new S({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew S({checks:[],typeName:p.ZodString,coerce:(s==null?void 0:s.coerce)??!1,..._(s)});function Xe(s,e){const t=(s.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,n=t>r?t:r,a=Number.parseInt(s.toFixed(n).replace(".","")),i=Number.parseInt(e.toFixed(n).replace(".",""));return a%i/10**n}class j extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.number){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_type,expected:u.number,received:a.parsedType}),m}let r;const n=new k;for(const a of this._def.checks)a.kind==="int"?g.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{code:c.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?Xe(e.data,a.value)!==0&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{code:c.not_finite,message:a.message}),n.dirty()):g.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,l.toString(t))}gt(e,t){return this.setLimit("min",e,!1,l.toString(t))}lte(e,t){return this.setLimit("max",e,!0,l.toString(t))}lt(e,t){return this.setLimit("max",e,!1,l.toString(t))}setLimit(e,t,r,n){return new j({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:l.toString(n)}]})}_addCheck(e){return new j({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:l.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:l.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:l.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:l.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:l.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:l.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:l.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:l.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:l.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuee.kind==="int"||e.kind==="multipleOf"&&g.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(t===null||r.value>t)&&(t=r.value):r.kind==="max"&&(e===null||r.valuenew j({checks:[],typeName:p.ZodNumber,coerce:(s==null?void 0:s.coerce)||!1,..._(s)});class B extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==u.bigint)return this._getInvalidInput(e);let r;const n=new k;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):g.assertNever(a);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return d(t,{code:c.invalid_type,expected:u.bigint,received:t.parsedType}),m}gte(e,t){return this.setLimit("min",e,!0,l.toString(t))}gt(e,t){return this.setLimit("min",e,!1,l.toString(t))}lte(e,t){return this.setLimit("max",e,!0,l.toString(t))}lt(e,t){return this.setLimit("max",e,!1,l.toString(t))}setLimit(e,t,r,n){return new B({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:l.toString(n)}]})}_addCheck(e){return new B({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:l.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:l.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:l.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:l.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:l.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew B({checks:[],typeName:p.ZodBigInt,coerce:(s==null?void 0:s.coerce)??!1,..._(s)});class K extends y{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.boolean,received:r.parsedType}),m}return b(e.data)}}K.create=s=>new K({typeName:p.ZodBoolean,coerce:(s==null?void 0:s.coerce)||!1,..._(s)});class q extends y{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_type,expected:u.date,received:a.parsedType}),m}if(Number.isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_date}),m}const r=new k;let n;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()a.value&&(n=this._getOrReturnCtx(e,n),d(n,{code:c.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):g.assertNever(a);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new q({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:l.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:l.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew q({checks:[],coerce:(s==null?void 0:s.coerce)||!1,typeName:p.ZodDate,..._(s)});class de extends y{_parse(e){if(this._getType(e)!==u.symbol){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.symbol,received:r.parsedType}),m}return b(e.data)}}de.create=s=>new de({typeName:p.ZodSymbol,..._(s)});class ue extends y{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.undefined,received:r.parsedType}),m}return b(e.data)}}ue.create=s=>new ue({typeName:p.ZodUndefined,..._(s)});class le extends y{_parse(e){if(this._getType(e)!==u.null){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.null,received:r.parsedType}),m}return b(e.data)}}le.create=s=>new le({typeName:p.ZodNull,..._(s)});class he extends y{constructor(){super(...arguments),this._any=!0}_parse(e){return b(e.data)}}he.create=s=>new he({typeName:p.ZodAny,..._(s)});class fe extends y{constructor(){super(...arguments),this._unknown=!0}_parse(e){return b(e.data)}}fe.create=s=>new fe({typeName:p.ZodUnknown,..._(s)});class N extends y{_parse(e){const t=this._getOrReturnCtx(e);return d(t,{code:c.invalid_type,expected:u.never,received:t.parsedType}),m}}N.create=s=>new N({typeName:p.ZodNever,..._(s)});class me extends y{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.void,received:r.parsedType}),m}return b(e.data)}}me.create=s=>new me({typeName:p.ZodVoid,..._(s)});class w extends y{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==u.array)return d(t,{code:c.invalid_type,expected:u.array,received:t.parsedType}),m;if(n.exactLength!==null){const i=t.data.length>n.exactLength.value,o=t.data.lengthn.maxLength.value&&(d(t,{code:c.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>n.type._parseAsync(new A(t,i,t.path,o)))).then(i=>k.mergeArray(r,i));const a=[...t.data].map((i,o)=>n.type._parseSync(new A(t,i,t.path,o)));return k.mergeArray(r,a)}get element(){return this._def.type}min(e,t){return new w({...this._def,minLength:{value:e,message:l.toString(t)}})}max(e,t){return new w({...this._def,maxLength:{value:e,message:l.toString(t)}})}length(e,t){return new w({...this._def,exactLength:{value:e,message:l.toString(t)}})}nonempty(e){return this.min(1,e)}}w.create=(s,e)=>new w({type:s,minLength:null,maxLength:null,exactLength:null,typeName:p.ZodArray,..._(e)});function E(s){if(s instanceof x){const e={};for(const t in s.shape){const r=s.shape[t];e[t]=O.create(E(r))}return new x({...s._def,shape:()=>e})}else return s instanceof w?new w({...s._def,type:E(s.element)}):s instanceof O?O.create(E(s.unwrap())):s instanceof M?M.create(E(s.unwrap())):s instanceof R?R.create(s.items.map(e=>E(e))):s}class x extends y{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=g.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==u.object){const f=this._getOrReturnCtx(e);return d(f,{code:c.invalid_type,expected:u.object,received:f.parsedType}),m}const{status:r,ctx:n}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof N&&this._def.unknownKeys==="strip"))for(const f in n.data)i.includes(f)||o.push(f);const h=[];for(const f of i){const v=a[f],V=n.data[f];h.push({key:{status:"valid",value:f},value:v._parse(new A(n,V,n.path,f)),alwaysSet:f in n.data})}if(this._def.catchall instanceof N){const f=this._def.unknownKeys;if(f==="passthrough")for(const v of o)h.push({key:{status:"valid",value:v},value:{status:"valid",value:n.data[v]}});else if(f==="strict")o.length>0&&(d(n,{code:c.unrecognized_keys,keys:o}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const v of o){const V=n.data[v];h.push({key:{status:"valid",value:v},value:f._parse(new A(n,V,n.path,v)),alwaysSet:v in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const f=[];for(const v of h){const V=await v.key,Te=await v.value;f.push({key:V,value:Te,alwaysSet:v.alwaysSet})}return f}).then(f=>k.mergeObjectSync(r,f)):k.mergeObjectSync(r,h)}get shape(){return this._def.shape()}strict(e){return l.errToObj,new x({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{var a,i;const n=((i=(a=this._def).errorMap)==null?void 0:i.call(a,t,r).message)??r.defaultError;return t.code==="unrecognized_keys"?{message:l.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new x({...this._def,unknownKeys:"strip"})}passthrough(){return new x({...this._def,unknownKeys:"passthrough"})}extend(e){return new x({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new x({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:p.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new x({...this._def,catchall:e})}pick(e){const t={};for(const r of g.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new x({...this._def,shape:()=>t})}omit(e){const t={};for(const r of g.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new x({...this._def,shape:()=>t})}deepPartial(){return E(this)}partial(e){const t={};for(const r of g.objectKeys(this.shape)){const n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.optional()}return new x({...this._def,shape:()=>t})}required(e){const t={};for(const r of g.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof O;)a=a._def.innerType;t[r]=a}return new x({...this._def,shape:()=>t})}keyof(){return we(g.objectKeys(this.shape))}}x.create=(s,e)=>new x({shape:()=>s,unknownKeys:"strip",catchall:N.create(),typeName:p.ZodObject,..._(e)});x.strictCreate=(s,e)=>new x({shape:()=>s,unknownKeys:"strict",catchall:N.create(),typeName:p.ZodObject,..._(e)});x.lazycreate=(s,e)=>new x({shape:s,unknownKeys:"strip",catchall:N.create(),typeName:p.ZodObject,..._(e)});class J extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;function n(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(o=>new T(o.ctx.common.issues));return d(t,{code:c.invalid_union,unionErrors:i}),m}if(t.common.async)return Promise.all(r.map(async a=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(n);{let a;const i=[];for(const h of r){const f={...t,common:{...t.common,issues:[]},parent:null},v=h._parseSync({data:t.data,path:t.path,parent:f});if(v.status==="valid")return v;v.status==="dirty"&&!a&&(a={result:v,ctx:f}),f.common.issues.length&&i.push(f.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(h=>new T(h));return d(t,{code:c.invalid_union,unionErrors:o}),m}}get options(){return this._def.options}}J.create=(s,e)=>new J({options:s,typeName:p.ZodUnion,..._(e)});function ee(s,e){const t=C(s),r=C(e);if(s===e)return{valid:!0,data:s};if(t===u.object&&r===u.object){const n=g.objectKeys(e),a=g.objectKeys(s).filter(o=>n.indexOf(o)!==-1),i={...s,...e};for(const o of a){const h=ee(s[o],e[o]);if(!h.valid)return{valid:!1};i[o]=h.data}return{valid:!0,data:i}}else if(t===u.array&&r===u.array){if(s.length!==e.length)return{valid:!1};const n=[];for(let a=0;a{if(ie(a)||ie(i))return m;const o=ee(a.value,i.value);return o.valid?((oe(a)||oe(i))&&t.dirty(),{status:t.value,value:o.data}):(d(r,{code:c.invalid_intersection_types}),m)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,i])=>n(a,i)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Y.create=(s,e,t)=>new Y({left:s,right:e,typeName:p.ZodIntersection,..._(t)});class R extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.array)return d(r,{code:c.invalid_type,expected:u.array,received:r.parsedType}),m;if(r.data.lengththis._def.items.length&&(d(r,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...r.data].map((i,o)=>{const h=this._def.items[o]||this._def.rest;return h?h._parse(new A(r,i,r.path,o)):null}).filter(i=>!!i);return r.common.async?Promise.all(a).then(i=>k.mergeArray(t,i)):k.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new R({...this._def,rest:e})}}R.create=(s,e)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new R({items:s,typeName:p.ZodTuple,rest:null,..._(e)})};class pe extends y{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.map)return d(r,{code:c.invalid_type,expected:u.map,received:r.parsedType}),m;const n=this._def.keyType,a=this._def.valueType,i=[...r.data.entries()].map(([o,h],f)=>({key:n._parse(new A(r,o,r.path,[f,"key"])),value:a._parse(new A(r,h,r.path,[f,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const h of i){const f=await h.key,v=await h.value;if(f.status==="aborted"||v.status==="aborted")return m;(f.status==="dirty"||v.status==="dirty")&&t.dirty(),o.set(f.value,v.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const h of i){const f=h.key,v=h.value;if(f.status==="aborted"||v.status==="aborted")return m;(f.status==="dirty"||v.status==="dirty")&&t.dirty(),o.set(f.value,v.value)}return{status:t.value,value:o}}}}pe.create=(s,e,t)=>new pe({valueType:e,keyType:s,typeName:p.ZodMap,..._(t)});class F extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.set)return d(r,{code:c.invalid_type,expected:u.set,received:r.parsedType}),m;const n=this._def;n.minSize!==null&&r.data.sizen.maxSize.value&&(d(r,{code:c.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const a=this._def.valueType;function i(h){const f=new Set;for(const v of h){if(v.status==="aborted")return m;v.status==="dirty"&&t.dirty(),f.add(v.value)}return{status:t.value,value:f}}const o=[...r.data.values()].map((h,f)=>a._parse(new A(r,h,r.path,f)));return r.common.async?Promise.all(o).then(h=>i(h)):i(o)}min(e,t){return new F({...this._def,minSize:{value:e,message:l.toString(t)}})}max(e,t){return new F({...this._def,maxSize:{value:e,message:l.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}F.create=(s,e)=>new F({valueType:s,minSize:null,maxSize:null,typeName:p.ZodSet,..._(e)});class _e extends y{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}_e.create=(s,e)=>new _e({getter:s,typeName:p.ZodLazy,..._(e)});class ye extends y{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return d(t,{received:t.data,code:c.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}}ye.create=(s,e)=>new ye({value:s,typeName:p.ZodLiteral,..._(e)});function we(s,e){return new $({values:s,typeName:p.ZodEnum,..._(e)})}class $ extends y{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),r=this._def.values;return d(t,{expected:g.joinValues(r),received:t.parsedType,code:c.invalid_type}),m}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return d(t,{received:t.data,code:c.invalid_enum_value,options:r}),m}return b(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return $.create(e,{...this._def,...t})}exclude(e,t=this._def){return $.create(this.options.filter(r=>!e.includes(r)),{...this._def,...t})}}$.create=we;class ge extends y{_parse(e){const t=g.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==u.string&&r.parsedType!==u.number){const n=g.objectValues(t);return d(r,{expected:g.joinValues(n),received:r.parsedType,code:c.invalid_type}),m}if(this._cache||(this._cache=new Set(g.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const n=g.objectValues(t);return d(r,{received:r.data,code:c.invalid_enum_value,options:n}),m}return b(e.data)}get enum(){return this._def.values}}ge.create=(s,e)=>new ge({values:s,typeName:p.ZodNativeEnum,..._(e)});class G extends y{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&t.common.async===!1)return d(t,{code:c.invalid_type,expected:u.promise,received:t.parsedType}),m;const r=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return b(r.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}G.create=(s,e)=>new G({type:s,typeName:p.ZodPromise,..._(e)});class P extends y{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===p.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,a={addIssue:i=>{d(r,i),i.fatal?t.abort():t.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){const i=n.transform(r.data,a);if(r.common.async)return Promise.resolve(i).then(async o=>{if(t.value==="aborted")return m;const h=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return h.status==="aborted"?m:h.status==="dirty"||t.value==="dirty"?U(h.value):h});{if(t.value==="aborted")return m;const o=this._def.schema._parseSync({data:i,path:r.path,parent:r});return o.status==="aborted"?m:o.status==="dirty"||t.value==="dirty"?U(o.value):o}}if(n.type==="refinement"){const i=o=>{const h=n.refinement(o,a);if(r.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!I(i))return m;const o=n.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>I(i)?Promise.resolve(n.transform(i.value,a)).then(o=>({status:t.value,value:o})):m);g.assertNever(n)}}P.create=(s,e,t)=>new P({schema:s,typeName:p.ZodEffects,effect:e,..._(t)});P.createWithPreprocess=(s,e,t)=>new P({schema:e,effect:{type:"preprocess",transform:s},typeName:p.ZodEffects,..._(t)});class O extends y{_parse(e){return this._getType(e)===u.undefined?b(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}O.create=(s,e)=>new O({innerType:s,typeName:p.ZodOptional,..._(e)});class M extends y{_parse(e){return this._getType(e)===u.null?b(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}M.create=(s,e)=>new M({innerType:s,typeName:p.ZodNullable,..._(e)});class te extends y{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===u.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}te.create=(s,e)=>new te({innerType:s,typeName:p.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,..._(e)});class se extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return W(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new T(r.common.issues)},input:r.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new T(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}se.create=(s,e)=>new se({innerType:s,typeName:p.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,..._(e)});class ve extends y{_parse(e){if(this._getType(e)!==u.nan){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.nan,received:r.parsedType}),m}return{status:"valid",value:e.data}}}ve.create=s=>new ve({typeName:p.ZodNaN,..._(s)});class Ke extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class ne extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?m:a.status==="dirty"?(t.dirty(),U(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const n=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?m:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:r.path,parent:r})}}static create(e,t){return new ne({in:e,out:t,typeName:p.ZodPipeline})}}class re extends y{_parse(e){const t=this._def.innerType._parse(e),r=n=>(I(n)&&(n.value=Object.freeze(n.value)),n);return W(t)?t.then(n=>r(n)):r(t)}unwrap(){return this._def.innerType}}re.create=(s,e)=>new re({innerType:s,typeName:p.ZodReadonly,..._(e)});var p;(function(s){s.ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly"})(p||(p={}));const z=S.create,et=j.create,tt=K.create;N.create;const xe=w.create,Z=x.create,st=J.create;Y.create;R.create;$.create;G.create;O.create;M.create;const rt=[D({name:"debug_random_number",description:"Generate a random number between 0 and 1",execute:async()=>new Promise(s=>{setTimeout(()=>{s(Math.random().toString())},1e3)}),parameters:Z({})})],lt=async()=>Promise.all(rt);async function H(s,e={},t){return window.__TAURI_INTERNALS__.invoke(s,e,t)}async function nt(s,e){await H("plugin:mcp|connect_server",{command:s,args:e})}async function at(){await H("plugin:mcp|disconnect_server")}async function it(){return await H("plugin:mcp|list_tools")}async function ot(s,e){return await H("plugin:mcp|call_tool",{name:s,args:e})}const ct=[D({name:"mcp_list_tools",description:"List all tools available on the MCP server",execute:async(s,e)=>await it(),parameters:Z({})}),D({name:"mcp_connect_server",description:'Connect to the MCP server. If "success", the connection to the MCP server is successful. Otherwise, the connection fails.',execute:async({command:s,args:e})=>(await nt(s,e),"success"),parameters:Z({command:z().describe("The command to connect to the MCP server"),args:xe(z()).describe("The arguments to pass to the MCP server")})}),D({name:"mcp_disconnect_server",description:'Disconnect from the MCP server. If "success", the disconnection from the MCP server is successful. Otherwise, the disconnection fails.',execute:async()=>(await at(),"success"),parameters:Z({})}),D({name:"mcp_call_tool",description:"Call a tool on the MCP server. The result is a list of content and a boolean indicating whether the tool call is an error.",execute:async({name:s,parameters:e})=>{const t=Object.fromEntries(e.map(({name:n,value:a})=>[n,a]));return await ot(s,t)},parameters:Z({name:z().describe("The name of the tool to call"),parameters:xe(Z({name:z().describe("The name of the parameter"),value:st([z(),et(),tt(),Z({})]).describe("The value of the parameter, it can be a string, a number, a boolean, or an object")})).describe("The parameters to pass to the tool")})})],ht=async()=>Promise.all(ct);export{p as Z,Ce as a,O as b,lt as d,ht as m,ut as t}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/effect-WSjEuzC9-DKX9-_ea.js","assets/index-8LjpXIG7.js","assets/index-zBe9gvvY.css","assets/sury-DmrZ3_Oj-i4n_xVnc.js","assets/valibot-CQk-M5rL-zJlkre40.js","assets/zod-Db63SLXj-Cey5BF_r.js"])))=>i.map(i=>d[i]); +import{cP as L}from"./index-8LjpXIG7.js";const Ce="https://xsai.js.org/docs/packages-top/xsschema#missing-dependencies",ut=async(s,e)=>{try{return await s}catch{throw new Error(`xsschema: Missing dependencies "${e}". see ${Ce}`)}},Se=async s=>{switch(s){case"arktype":return L(()=>import("./arktype-C-GObzDh-1xlRyYUo.js"),[]).then(async({getToJsonSchemaFn:e})=>e());case"effect":return L(()=>import("./effect-WSjEuzC9-DKX9-_ea.js"),__vite__mapDeps([0,1,2])).then(async({getToJsonSchemaFn:e})=>e());case"sury":return L(()=>import("./sury-DmrZ3_Oj-i4n_xVnc.js"),__vite__mapDeps([3,1,2])).then(async({getToJsonSchemaFn:e})=>e());case"valibot":return L(()=>import("./valibot-CQk-M5rL-zJlkre40.js"),__vite__mapDeps([4,1,2])).then(async({getToJsonSchemaFn:e})=>e());case"zod":return L(()=>import("./zod-Db63SLXj-Cey5BF_r.js"),__vite__mapDeps([5,1,2])).then(async({getToJsonSchemaFn:e})=>e());default:throw new Error(`xsschema: Unsupported schema vendor "${s}". see https://xsai.js.org/docs/packages-top/xsschema#unsupported-schema-vendor`)}},Oe=async s=>Se(s["~standard"].vendor).then(async e=>e(s)),D=async({description:s,execute:e,name:t,parameters:r})=>{const n=await Oe(r);return{execute:e,function:{description:s,name:t,parameters:{...n,additionalProperties:!1},strict:!0},type:"function"}};var g;(function(s){s.assertEqual=n=>{};function e(n){}s.assertIs=e;function t(n){throw new Error}s.assertNever=t,s.arrayToEnum=n=>{const a={};for(const i of n)a[i]=i;return a},s.getValidEnumValues=n=>{const a=s.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),i={};for(const o of a)i[o]=n[o];return s.objectValues(i)},s.objectValues=n=>s.objectKeys(n).map(function(a){return n[a]}),s.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const a=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.push(i);return a},s.find=(n,a)=>{for(const i of n)if(a(i))return i},s.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function r(n,a=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}s.joinValues=r,s.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(g||(g={}));var ae;(function(s){s.mergeShapes=(e,t)=>({...e,...t})})(ae||(ae={}));const u=g.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),C=s=>{switch(typeof s){case"undefined":return u.undefined;case"string":return u.string;case"number":return Number.isNaN(s)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(s)?u.array:s===null?u.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?u.promise:typeof Map<"u"&&s instanceof Map?u.map:typeof Set<"u"&&s instanceof Set?u.set:typeof Date<"u"&&s instanceof Date?u.date:u.object;default:return u.unknown}},c=g.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class T extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(a){return a.message},r={_errors:[]},n=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(i.argumentsError);else if(i.path.length===0)r._errors.push(t(i));else{let o=r,h=0;for(;ht.message){const t={},r=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}T.create=s=>new T(s);const X=(s,e)=>{let t;switch(s.code){case c.invalid_type:s.received===u.undefined?t="Required":t=`Expected ${s.expected}, received ${s.received}`;break;case c.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(s.expected,g.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:t=`Unrecognized key(s) in object: ${g.joinValues(s.keys,", ")}`;break;case c.invalid_union:t="Invalid input";break;case c.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${g.joinValues(s.options)}`;break;case c.invalid_enum_value:t=`Invalid enum value. Expected ${g.joinValues(s.options)}, received '${s.received}'`;break;case c.invalid_arguments:t="Invalid function arguments";break;case c.invalid_return_type:t="Invalid function return type";break;case c.invalid_date:t="Invalid date";break;case c.invalid_string:typeof s.validation=="object"?"includes"in s.validation?(t=`Invalid input: must include "${s.validation.includes}"`,typeof s.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${s.validation.position}`)):"startsWith"in s.validation?t=`Invalid input: must start with "${s.validation.startsWith}"`:"endsWith"in s.validation?t=`Invalid input: must end with "${s.validation.endsWith}"`:g.assertNever(s.validation):s.validation!=="regex"?t=`Invalid ${s.validation}`:t="Invalid";break;case c.too_small:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at least":"more than"} ${s.minimum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at least":"over"} ${s.minimum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(s.minimum))}`:t="Invalid input";break;case c.too_big:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at most":"less than"} ${s.maximum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at most":"under"} ${s.maximum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="bigint"?t=`BigInt must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly":s.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(s.maximum))}`:t="Invalid input";break;case c.custom:t="Invalid input";break;case c.invalid_intersection_types:t="Intersection results could not be merged";break;case c.not_multiple_of:t=`Number must be a multiple of ${s.multipleOf}`;break;case c.not_finite:t="Number must be finite";break;default:t=e.defaultError,g.assertNever(s)}return{message:t}};let Ae=X;function Ne(){return Ae}const Ze=s=>{const{data:e,path:t,errorMaps:r,issueData:n}=s,a=[...t,...n.path||[]],i={...n,path:a};if(n.message!==void 0)return{...n,path:a,message:n.message};let o="";const h=r.filter(f=>!!f).slice().reverse();for(const f of h)o=f(i,{data:e,defaultError:o}).message;return{...n,path:a,message:o}};function d(s,e){const t=Ne(),r=Ze({issueData:e,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,t,t===X?void 0:X].filter(n=>!!n)});s.common.issues.push(r)}class k{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const n of t){if(n.status==="aborted")return m;n.status==="dirty"&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const n of t){const a=await n.key,i=await n.value;r.push({key:a,value:i})}return k.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const n of t){const{key:a,value:i}=n;if(a.status==="aborted"||i.status==="aborted")return m;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||n.alwaysSet)&&(r[a.value]=i.value)}return{status:e.value,value:r}}}const m=Object.freeze({status:"aborted"}),U=s=>({status:"dirty",value:s}),b=s=>({status:"valid",value:s}),ie=s=>s.status==="aborted",oe=s=>s.status==="dirty",I=s=>s.status==="valid",W=s=>typeof Promise<"u"&&s instanceof Promise;var l;(function(s){s.errToObj=e=>typeof e=="string"?{message:e}:e||{},s.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(l||(l={}));class A{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const ce=(s,e)=>{if(I(e))return{success:!0,data:e.value};if(!s.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new T(s.common.issues);return this._error=t,this._error}}};function _(s){if(!s)return{};const{errorMap:e,invalid_type_error:t,required_error:r,description:n}=s;if(e&&(t||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(i,o)=>{const{message:h}=s;return i.code==="invalid_enum_value"?{message:h??o.defaultError}:typeof o.data>"u"?{message:h??r??o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:h??t??o.defaultError}},description:n}}class y{get description(){return this._def.description}_getType(e){return C(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:C(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new k,ctx:{common:e.parent.common,data:e.data,parsedType:C(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(W(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){const r={common:{issues:[],async:(t==null?void 0:t.async)??!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:C(e)},n=this._parseSync({data:e,path:r.path,parent:r});return ce(r,n)}"~validate"(e){var r,n;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:C(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:t});return I(a)?{value:a.value}:{issues:t.common.issues}}catch(a){(n=(r=a==null?void 0:a.message)==null?void 0:r.toLowerCase())!=null&&n.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(a=>I(a)?{value:a.value}:{issues:t.common.issues})}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:C(e)},n=this._parse({data:e,path:r.path,parent:r}),a=await(W(n)?n:Promise.resolve(n));return ce(r,a)}refine(e,t){const r=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,a)=>{const i=e(n),o=()=>a.addIssue({code:c.custom,...r(n)});return typeof Promise<"u"&&i instanceof Promise?i.then(h=>h?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((r,n)=>e(r)?!0:(n.addIssue(typeof t=="function"?t(r,n):t),!1))}_refinement(e){return new P({schema:this,typeName:p.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return O.create(this,this._def)}nullable(){return M.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return w.create(this)}promise(){return G.create(this,this._def)}or(e){return J.create([this,e],this._def)}and(e){return Y.create(this,e,this._def)}transform(e){return new P({..._(this._def),schema:this,typeName:p.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new te({..._(this._def),innerType:this,defaultValue:t,typeName:p.ZodDefault})}brand(){return new Ke({typeName:p.ZodBranded,type:this,..._(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new se({..._(this._def),innerType:this,catchValue:t,typeName:p.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return ne.create(this,e)}readonly(){return re.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Re=/^c[^\s-]{8,}$/i,Ee=/^[0-9a-z]+$/,Ie=/^[0-9A-HJKMNP-TV-Z]{26}$/i,je=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,$e=/^[a-z0-9_-]{21}$/i,Pe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Me=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Ve=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Le="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Q;const ze=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,De=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Ue=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Be=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Fe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,We=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ke="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",qe=new RegExp(`^${ke}$`);function be(s){let e="[0-5]\\d";s.precision?e=`${e}\\.\\d{${s.precision}}`:s.precision==null&&(e=`${e}(\\.\\d+)?`);const t=s.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function Je(s){return new RegExp(`^${be(s)}$`)}function Ye(s){let e=`${ke}T${be(s)}`;const t=[];return t.push(s.local?"Z?":"Z"),s.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Ge(s,e){return!!((e==="v4"||!e)&&ze.test(s)||(e==="v6"||!e)&&Ue.test(s))}function He(s,e){if(!Pe.test(s))return!1;try{const[t]=s.split("."),r=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(r));return!(typeof n!="object"||n===null||"typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function Qe(s,e){return!!((e==="v4"||!e)&&De.test(s)||(e==="v6"||!e)&&Be.test(s))}class S extends y{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_type,expected:u.string,received:a.parsedType}),m}const r=new k;let n;for(const a of this._def.checks)if(a.kind==="min")e.data.lengtha.value&&(n=this._getOrReturnCtx(e,n),d(n,{code:c.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,o=e.data.lengthe.test(n),{validation:t,code:c.invalid_string,...l.errToObj(r)})}_addCheck(e){return new S({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...l.errToObj(e)})}url(e){return this._addCheck({kind:"url",...l.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...l.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...l.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...l.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...l.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...l.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...l.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...l.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...l.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...l.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...l.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...l.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...l.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...l.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...l.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...l.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...l.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...l.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...l.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...l.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...l.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...l.errToObj(t)})}nonempty(e){return this.min(1,l.errToObj(e))}trim(){return new S({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new S({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new S({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew S({checks:[],typeName:p.ZodString,coerce:(s==null?void 0:s.coerce)??!1,..._(s)});function Xe(s,e){const t=(s.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,n=t>r?t:r,a=Number.parseInt(s.toFixed(n).replace(".","")),i=Number.parseInt(e.toFixed(n).replace(".",""));return a%i/10**n}class j extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.number){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_type,expected:u.number,received:a.parsedType}),m}let r;const n=new k;for(const a of this._def.checks)a.kind==="int"?g.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{code:c.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?Xe(e.data,a.value)!==0&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),d(r,{code:c.not_finite,message:a.message}),n.dirty()):g.assertNever(a);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,l.toString(t))}gt(e,t){return this.setLimit("min",e,!1,l.toString(t))}lte(e,t){return this.setLimit("max",e,!0,l.toString(t))}lt(e,t){return this.setLimit("max",e,!1,l.toString(t))}setLimit(e,t,r,n){return new j({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:l.toString(n)}]})}_addCheck(e){return new j({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:l.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:l.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:l.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:l.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:l.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:l.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:l.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:l.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:l.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuee.kind==="int"||e.kind==="multipleOf"&&g.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(t===null||r.value>t)&&(t=r.value):r.kind==="max"&&(e===null||r.valuenew j({checks:[],typeName:p.ZodNumber,coerce:(s==null?void 0:s.coerce)||!1,..._(s)});class B extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==u.bigint)return this._getInvalidInput(e);let r;const n=new k;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),d(r,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):g.assertNever(a);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return d(t,{code:c.invalid_type,expected:u.bigint,received:t.parsedType}),m}gte(e,t){return this.setLimit("min",e,!0,l.toString(t))}gt(e,t){return this.setLimit("min",e,!1,l.toString(t))}lte(e,t){return this.setLimit("max",e,!0,l.toString(t))}lt(e,t){return this.setLimit("max",e,!1,l.toString(t))}setLimit(e,t,r,n){return new B({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:l.toString(n)}]})}_addCheck(e){return new B({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:l.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:l.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:l.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:l.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:l.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew B({checks:[],typeName:p.ZodBigInt,coerce:(s==null?void 0:s.coerce)??!1,..._(s)});class K extends y{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.boolean,received:r.parsedType}),m}return b(e.data)}}K.create=s=>new K({typeName:p.ZodBoolean,coerce:(s==null?void 0:s.coerce)||!1,..._(s)});class q extends y{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_type,expected:u.date,received:a.parsedType}),m}if(Number.isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return d(a,{code:c.invalid_date}),m}const r=new k;let n;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()a.value&&(n=this._getOrReturnCtx(e,n),d(n,{code:c.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):g.assertNever(a);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new q({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:l.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:l.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew q({checks:[],coerce:(s==null?void 0:s.coerce)||!1,typeName:p.ZodDate,..._(s)});class de extends y{_parse(e){if(this._getType(e)!==u.symbol){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.symbol,received:r.parsedType}),m}return b(e.data)}}de.create=s=>new de({typeName:p.ZodSymbol,..._(s)});class ue extends y{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.undefined,received:r.parsedType}),m}return b(e.data)}}ue.create=s=>new ue({typeName:p.ZodUndefined,..._(s)});class le extends y{_parse(e){if(this._getType(e)!==u.null){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.null,received:r.parsedType}),m}return b(e.data)}}le.create=s=>new le({typeName:p.ZodNull,..._(s)});class he extends y{constructor(){super(...arguments),this._any=!0}_parse(e){return b(e.data)}}he.create=s=>new he({typeName:p.ZodAny,..._(s)});class fe extends y{constructor(){super(...arguments),this._unknown=!0}_parse(e){return b(e.data)}}fe.create=s=>new fe({typeName:p.ZodUnknown,..._(s)});class N extends y{_parse(e){const t=this._getOrReturnCtx(e);return d(t,{code:c.invalid_type,expected:u.never,received:t.parsedType}),m}}N.create=s=>new N({typeName:p.ZodNever,..._(s)});class me extends y{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.void,received:r.parsedType}),m}return b(e.data)}}me.create=s=>new me({typeName:p.ZodVoid,..._(s)});class w extends y{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==u.array)return d(t,{code:c.invalid_type,expected:u.array,received:t.parsedType}),m;if(n.exactLength!==null){const i=t.data.length>n.exactLength.value,o=t.data.lengthn.maxLength.value&&(d(t,{code:c.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>n.type._parseAsync(new A(t,i,t.path,o)))).then(i=>k.mergeArray(r,i));const a=[...t.data].map((i,o)=>n.type._parseSync(new A(t,i,t.path,o)));return k.mergeArray(r,a)}get element(){return this._def.type}min(e,t){return new w({...this._def,minLength:{value:e,message:l.toString(t)}})}max(e,t){return new w({...this._def,maxLength:{value:e,message:l.toString(t)}})}length(e,t){return new w({...this._def,exactLength:{value:e,message:l.toString(t)}})}nonempty(e){return this.min(1,e)}}w.create=(s,e)=>new w({type:s,minLength:null,maxLength:null,exactLength:null,typeName:p.ZodArray,..._(e)});function E(s){if(s instanceof x){const e={};for(const t in s.shape){const r=s.shape[t];e[t]=O.create(E(r))}return new x({...s._def,shape:()=>e})}else return s instanceof w?new w({...s._def,type:E(s.element)}):s instanceof O?O.create(E(s.unwrap())):s instanceof M?M.create(E(s.unwrap())):s instanceof R?R.create(s.items.map(e=>E(e))):s}class x extends y{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=g.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==u.object){const f=this._getOrReturnCtx(e);return d(f,{code:c.invalid_type,expected:u.object,received:f.parsedType}),m}const{status:r,ctx:n}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof N&&this._def.unknownKeys==="strip"))for(const f in n.data)i.includes(f)||o.push(f);const h=[];for(const f of i){const v=a[f],V=n.data[f];h.push({key:{status:"valid",value:f},value:v._parse(new A(n,V,n.path,f)),alwaysSet:f in n.data})}if(this._def.catchall instanceof N){const f=this._def.unknownKeys;if(f==="passthrough")for(const v of o)h.push({key:{status:"valid",value:v},value:{status:"valid",value:n.data[v]}});else if(f==="strict")o.length>0&&(d(n,{code:c.unrecognized_keys,keys:o}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const v of o){const V=n.data[v];h.push({key:{status:"valid",value:v},value:f._parse(new A(n,V,n.path,v)),alwaysSet:v in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const f=[];for(const v of h){const V=await v.key,Te=await v.value;f.push({key:V,value:Te,alwaysSet:v.alwaysSet})}return f}).then(f=>k.mergeObjectSync(r,f)):k.mergeObjectSync(r,h)}get shape(){return this._def.shape()}strict(e){return l.errToObj,new x({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{var a,i;const n=((i=(a=this._def).errorMap)==null?void 0:i.call(a,t,r).message)??r.defaultError;return t.code==="unrecognized_keys"?{message:l.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new x({...this._def,unknownKeys:"strip"})}passthrough(){return new x({...this._def,unknownKeys:"passthrough"})}extend(e){return new x({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new x({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:p.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new x({...this._def,catchall:e})}pick(e){const t={};for(const r of g.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new x({...this._def,shape:()=>t})}omit(e){const t={};for(const r of g.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new x({...this._def,shape:()=>t})}deepPartial(){return E(this)}partial(e){const t={};for(const r of g.objectKeys(this.shape)){const n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.optional()}return new x({...this._def,shape:()=>t})}required(e){const t={};for(const r of g.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof O;)a=a._def.innerType;t[r]=a}return new x({...this._def,shape:()=>t})}keyof(){return we(g.objectKeys(this.shape))}}x.create=(s,e)=>new x({shape:()=>s,unknownKeys:"strip",catchall:N.create(),typeName:p.ZodObject,..._(e)});x.strictCreate=(s,e)=>new x({shape:()=>s,unknownKeys:"strict",catchall:N.create(),typeName:p.ZodObject,..._(e)});x.lazycreate=(s,e)=>new x({shape:s,unknownKeys:"strip",catchall:N.create(),typeName:p.ZodObject,..._(e)});class J extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;function n(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(o=>new T(o.ctx.common.issues));return d(t,{code:c.invalid_union,unionErrors:i}),m}if(t.common.async)return Promise.all(r.map(async a=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(n);{let a;const i=[];for(const h of r){const f={...t,common:{...t.common,issues:[]},parent:null},v=h._parseSync({data:t.data,path:t.path,parent:f});if(v.status==="valid")return v;v.status==="dirty"&&!a&&(a={result:v,ctx:f}),f.common.issues.length&&i.push(f.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(h=>new T(h));return d(t,{code:c.invalid_union,unionErrors:o}),m}}get options(){return this._def.options}}J.create=(s,e)=>new J({options:s,typeName:p.ZodUnion,..._(e)});function ee(s,e){const t=C(s),r=C(e);if(s===e)return{valid:!0,data:s};if(t===u.object&&r===u.object){const n=g.objectKeys(e),a=g.objectKeys(s).filter(o=>n.indexOf(o)!==-1),i={...s,...e};for(const o of a){const h=ee(s[o],e[o]);if(!h.valid)return{valid:!1};i[o]=h.data}return{valid:!0,data:i}}else if(t===u.array&&r===u.array){if(s.length!==e.length)return{valid:!1};const n=[];for(let a=0;a{if(ie(a)||ie(i))return m;const o=ee(a.value,i.value);return o.valid?((oe(a)||oe(i))&&t.dirty(),{status:t.value,value:o.data}):(d(r,{code:c.invalid_intersection_types}),m)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,i])=>n(a,i)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Y.create=(s,e,t)=>new Y({left:s,right:e,typeName:p.ZodIntersection,..._(t)});class R extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.array)return d(r,{code:c.invalid_type,expected:u.array,received:r.parsedType}),m;if(r.data.lengththis._def.items.length&&(d(r,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...r.data].map((i,o)=>{const h=this._def.items[o]||this._def.rest;return h?h._parse(new A(r,i,r.path,o)):null}).filter(i=>!!i);return r.common.async?Promise.all(a).then(i=>k.mergeArray(t,i)):k.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new R({...this._def,rest:e})}}R.create=(s,e)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new R({items:s,typeName:p.ZodTuple,rest:null,..._(e)})};class pe extends y{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.map)return d(r,{code:c.invalid_type,expected:u.map,received:r.parsedType}),m;const n=this._def.keyType,a=this._def.valueType,i=[...r.data.entries()].map(([o,h],f)=>({key:n._parse(new A(r,o,r.path,[f,"key"])),value:a._parse(new A(r,h,r.path,[f,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const h of i){const f=await h.key,v=await h.value;if(f.status==="aborted"||v.status==="aborted")return m;(f.status==="dirty"||v.status==="dirty")&&t.dirty(),o.set(f.value,v.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const h of i){const f=h.key,v=h.value;if(f.status==="aborted"||v.status==="aborted")return m;(f.status==="dirty"||v.status==="dirty")&&t.dirty(),o.set(f.value,v.value)}return{status:t.value,value:o}}}}pe.create=(s,e,t)=>new pe({valueType:e,keyType:s,typeName:p.ZodMap,..._(t)});class F extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.set)return d(r,{code:c.invalid_type,expected:u.set,received:r.parsedType}),m;const n=this._def;n.minSize!==null&&r.data.sizen.maxSize.value&&(d(r,{code:c.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const a=this._def.valueType;function i(h){const f=new Set;for(const v of h){if(v.status==="aborted")return m;v.status==="dirty"&&t.dirty(),f.add(v.value)}return{status:t.value,value:f}}const o=[...r.data.values()].map((h,f)=>a._parse(new A(r,h,r.path,f)));return r.common.async?Promise.all(o).then(h=>i(h)):i(o)}min(e,t){return new F({...this._def,minSize:{value:e,message:l.toString(t)}})}max(e,t){return new F({...this._def,maxSize:{value:e,message:l.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}F.create=(s,e)=>new F({valueType:s,minSize:null,maxSize:null,typeName:p.ZodSet,..._(e)});class _e extends y{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}_e.create=(s,e)=>new _e({getter:s,typeName:p.ZodLazy,..._(e)});class ye extends y{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return d(t,{received:t.data,code:c.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}}ye.create=(s,e)=>new ye({value:s,typeName:p.ZodLiteral,..._(e)});function we(s,e){return new $({values:s,typeName:p.ZodEnum,..._(e)})}class $ extends y{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),r=this._def.values;return d(t,{expected:g.joinValues(r),received:t.parsedType,code:c.invalid_type}),m}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return d(t,{received:t.data,code:c.invalid_enum_value,options:r}),m}return b(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return $.create(e,{...this._def,...t})}exclude(e,t=this._def){return $.create(this.options.filter(r=>!e.includes(r)),{...this._def,...t})}}$.create=we;class ge extends y{_parse(e){const t=g.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==u.string&&r.parsedType!==u.number){const n=g.objectValues(t);return d(r,{expected:g.joinValues(n),received:r.parsedType,code:c.invalid_type}),m}if(this._cache||(this._cache=new Set(g.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const n=g.objectValues(t);return d(r,{received:r.data,code:c.invalid_enum_value,options:n}),m}return b(e.data)}get enum(){return this._def.values}}ge.create=(s,e)=>new ge({values:s,typeName:p.ZodNativeEnum,..._(e)});class G extends y{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&t.common.async===!1)return d(t,{code:c.invalid_type,expected:u.promise,received:t.parsedType}),m;const r=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return b(r.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}G.create=(s,e)=>new G({type:s,typeName:p.ZodPromise,..._(e)});class P extends y{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===p.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,a={addIssue:i=>{d(r,i),i.fatal?t.abort():t.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){const i=n.transform(r.data,a);if(r.common.async)return Promise.resolve(i).then(async o=>{if(t.value==="aborted")return m;const h=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return h.status==="aborted"?m:h.status==="dirty"||t.value==="dirty"?U(h.value):h});{if(t.value==="aborted")return m;const o=this._def.schema._parseSync({data:i,path:r.path,parent:r});return o.status==="aborted"?m:o.status==="dirty"||t.value==="dirty"?U(o.value):o}}if(n.type==="refinement"){const i=o=>{const h=n.refinement(o,a);if(r.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!I(i))return m;const o=n.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>I(i)?Promise.resolve(n.transform(i.value,a)).then(o=>({status:t.value,value:o})):m);g.assertNever(n)}}P.create=(s,e,t)=>new P({schema:s,typeName:p.ZodEffects,effect:e,..._(t)});P.createWithPreprocess=(s,e,t)=>new P({schema:e,effect:{type:"preprocess",transform:s},typeName:p.ZodEffects,..._(t)});class O extends y{_parse(e){return this._getType(e)===u.undefined?b(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}O.create=(s,e)=>new O({innerType:s,typeName:p.ZodOptional,..._(e)});class M extends y{_parse(e){return this._getType(e)===u.null?b(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}M.create=(s,e)=>new M({innerType:s,typeName:p.ZodNullable,..._(e)});class te extends y{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===u.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}te.create=(s,e)=>new te({innerType:s,typeName:p.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,..._(e)});class se extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return W(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new T(r.common.issues)},input:r.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new T(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}se.create=(s,e)=>new se({innerType:s,typeName:p.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,..._(e)});class ve extends y{_parse(e){if(this._getType(e)!==u.nan){const r=this._getOrReturnCtx(e);return d(r,{code:c.invalid_type,expected:u.nan,received:r.parsedType}),m}return{status:"valid",value:e.data}}}ve.create=s=>new ve({typeName:p.ZodNaN,..._(s)});class Ke extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class ne extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?m:a.status==="dirty"?(t.dirty(),U(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const n=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?m:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:r.path,parent:r})}}static create(e,t){return new ne({in:e,out:t,typeName:p.ZodPipeline})}}class re extends y{_parse(e){const t=this._def.innerType._parse(e),r=n=>(I(n)&&(n.value=Object.freeze(n.value)),n);return W(t)?t.then(n=>r(n)):r(t)}unwrap(){return this._def.innerType}}re.create=(s,e)=>new re({innerType:s,typeName:p.ZodReadonly,..._(e)});var p;(function(s){s.ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly"})(p||(p={}));const z=S.create,et=j.create,tt=K.create;N.create;const xe=w.create,Z=x.create,st=J.create;Y.create;R.create;$.create;G.create;O.create;M.create;const rt=[D({name:"debug_random_number",description:"Generate a random number between 0 and 1",execute:async()=>new Promise(s=>{setTimeout(()=>{s(Math.random().toString())},1e3)}),parameters:Z({})})],lt=async()=>Promise.all(rt);async function H(s,e={},t){return window.__TAURI_INTERNALS__.invoke(s,e,t)}async function nt(s,e){await H("plugin:mcp|connect_server",{command:s,args:e})}async function at(){await H("plugin:mcp|disconnect_server")}async function it(){return await H("plugin:mcp|list_tools")}async function ot(s,e){return await H("plugin:mcp|call_tool",{name:s,args:e})}const ct=[D({name:"mcp_list_tools",description:"List all tools available on the MCP server",execute:async(s,e)=>await it(),parameters:Z({})}),D({name:"mcp_connect_server",description:'Connect to the MCP server. If "success", the connection to the MCP server is successful. Otherwise, the connection fails.',execute:async({command:s,args:e})=>(await nt(s,e),"success"),parameters:Z({command:z().describe("The command to connect to the MCP server"),args:xe(z()).describe("The arguments to pass to the MCP server")})}),D({name:"mcp_disconnect_server",description:'Disconnect from the MCP server. If "success", the disconnection from the MCP server is successful. Otherwise, the disconnection fails.',execute:async()=>(await at(),"success"),parameters:Z({})}),D({name:"mcp_call_tool",description:"Call a tool on the MCP server. The result is a list of content and a boolean indicating whether the tool call is an error.",execute:async({name:s,parameters:e})=>{const t=Object.fromEntries(e.map(({name:n,value:a})=>[n,a]));return await ot(s,t)},parameters:Z({name:z().describe("The name of the tool to call"),parameters:xe(Z({name:z().describe("The name of the parameter"),value:st([z(),et(),tt(),Z({})]).describe("The value of the parameter, it can be a string, a number, a boolean, or an object")})).describe("The parameters to pass to the tool")})})],ht=async()=>Promise.all(ct);export{p as Z,Ce as a,O as b,lt as d,ht as m,ut as t}; diff --git a/assets/memory-long-term-DKoN_UYI.js b/assets/memory-long-term-CgAjfEjB.js similarity index 71% rename from assets/memory-long-term-DKoN_UYI.js rename to assets/memory-long-term-CgAjfEjB.js index af2342c264fbc6a11652ee37b7262bfdbb371b8a..9d2193ac2527a37ba30d2ae37c13ebf05ba7efeb 100644 --- a/assets/memory-long-term-DKoN_UYI.js +++ b/assets/memory-long-term-CgAjfEjB.js @@ -1 +1 @@ -import{d as o,c as t,o as n}from"./index-WDP_Z4A8.js";import{b as e}from"./route-block-B_A1xBdJ.js";const r=o({__name:"memory-long-term",setup(c){return(m,a)=>(n(),t("div"))}});typeof e=="function"&&e(r);export{r as default}; +import{d as o,c as t,o as n}from"./index-8LjpXIG7.js";import{b as e}from"./route-block-B_A1xBdJ.js";const r=o({__name:"memory-long-term",setup(c){return(m,a)=>(n(),t("div"))}});typeof e=="function"&&e(r);export{r as default}; diff --git a/assets/memory-short-term-CGF6Nhl6.js b/assets/memory-short-term-DZTX9IKC.js similarity index 71% rename from assets/memory-short-term-CGF6Nhl6.js rename to assets/memory-short-term-DZTX9IKC.js index e9e9b1f7ec405c9bd7d3597dfa11d6159599e80b..ec2376037f9ac17acafe5395c95f9356e25697e2 100644 --- a/assets/memory-short-term-CGF6Nhl6.js +++ b/assets/memory-short-term-DZTX9IKC.js @@ -1 +1 @@ -import{d as o,c as t,o as r}from"./index-WDP_Z4A8.js";import{b as e}from"./route-block-B_A1xBdJ.js";const n=o({__name:"memory-short-term",setup(c){return(m,a)=>(r(),t("div"))}});typeof e=="function"&&e(n);export{n as default}; +import{d as o,c as t,o as r}from"./index-8LjpXIG7.js";import{b as e}from"./route-block-B_A1xBdJ.js";const n=o({__name:"memory-short-term",setup(c){return(m,a)=>(r(),t("div"))}});typeof e=="function"&&e(n);export{n as default}; diff --git a/assets/messages-DjywpylS.js b/assets/messages-CxOqkV_c.js similarity index 68% rename from assets/messages-DjywpylS.js rename to assets/messages-CxOqkV_c.js index 578727001ff6da0bd4040d0b3bb9e1d5d4e14fc2..35fafd2ffd6fd2ad559a8dc7bb62f8ba80fed6c2 100644 --- a/assets/messages-DjywpylS.js +++ b/assets/messages-CxOqkV_c.js @@ -1 +1 @@ -import{u as f}from"./queue-C50Iq5oO.js";import{u as g,l as _}from"./queues-DBvSyUSC.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as v}from"./Textarea.vue_vue_type_script_setup_true_lang-Bht7lS1m.js";import{d as x,e as o,c as l,o as u,a as e,b,u as k,Y as p,c6 as h,c7 as w}from"./index-WDP_Z4A8.js";import"./emotions-DWNSb738.js";import"./floating-ui.core-CgBsuaUc.js";import"./Basic.vue_vue_type_script_setup_true_lang-COgaiUVw.js";const S={flex:"","flex-col":"","gap-2":"","p-2":""},V={flex:"","flex-row":"","gap-2":""},y={"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":""},L=x({__name:"messages",setup(B){const s=o(""),r=o([]),n=o(!1),m=f({handlers:[async i=>{r.value.push(i.data)}]}),d=g(m);async function c(){n.value=!0,d.add(s.value),d.add(_),s.value="",n.value=!1}return(i,t)=>(u(),l("div",S,[e("div",V,[b(k(v),{modelValue:s.value,"onUpdate:modelValue":t[0]||(t[0]=a=>s.value=a),placeholder:"Message",p:"2",bg:"neutral-100 dark:neutral-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:c},null,8,["modelValue"]),e("button",y,p(n.value?"Processing...":"Send"),1)]),e("div",M,[e("div",Q,[t[1]||(t[1]=e("h3",{"font-semibold":""}," TTS Message ",-1)),(u(!0),l(h,null,w(r.value,a=>(u(),l("div",{key:a},[e("div",null,p(a),1)]))),128))])])]))}});export{L as default}; +import{u as f}from"./queue-Dw-mTAT5.js";import{u as g,l as _}from"./queues-DNZJBdFi.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{_ as v}from"./Textarea.vue_vue_type_script_setup_true_lang-B9_K8yo0.js";import{d as x,e as o,c as l,o as u,a as e,b,u as k,Y as p,c6 as h,c7 as w}from"./index-8LjpXIG7.js";import"./emotions-DWNSb738.js";import"./floating-ui.core-CgBsuaUc.js";import"./Basic.vue_vue_type_script_setup_true_lang-Dgb2JW4V.js";const S={flex:"","flex-col":"","gap-2":"","p-2":""},V={flex:"","flex-row":"","gap-2":""},y={"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":""},L=x({__name:"messages",setup(B){const s=o(""),r=o([]),n=o(!1),m=f({handlers:[async i=>{r.value.push(i.data)}]}),d=g(m);async function c(){n.value=!0,d.add(s.value),d.add(_),s.value="",n.value=!1}return(i,t)=>(u(),l("div",S,[e("div",V,[b(k(v),{modelValue:s.value,"onUpdate:modelValue":t[0]||(t[0]=a=>s.value=a),placeholder:"Message",p:"2",bg:"neutral-100 dark:neutral-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:c},null,8,["modelValue"]),e("button",y,p(n.value?"Processing...":"Send"),1)]),e("div",M,[e("div",Q,[t[1]||(t[1]=e("h3",{"font-semibold":""}," TTS Message ",-1)),(u(!0),l(h,null,w(r.value,a=>(u(),l("div",{key:a},[e("div",null,p(a),1)]))),128))])])]))}});export{L as default}; diff --git a/assets/microsoft-speech-BLOCaluL.js b/assets/microsoft-speech-DxAcOoH7.js similarity index 71% rename from assets/microsoft-speech-BLOCaluL.js rename to assets/microsoft-speech-DxAcOoH7.js index eedbe45873416b63a5cf9ea35911f4a1e8f4b021..bb82d9a0cd8715c4a8cb03483e7dbc4e953a6d6c 100644 --- a/assets/microsoft-speech-BLOCaluL.js +++ b/assets/microsoft-speech-DxAcOoH7.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as B,$ as F,a0 as M,e as v,f as g,T,w as K,bk as N,o as q,bl as b,b as n,u as o,a as z}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as E}from"./providers-7GsMyC_3.js";import{u as G}from"./speech-DRmXCXwq.js";import{_ as H}from"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import{_ as h}from"./FieldRange.vue_vue_type_script_setup_true_lang-BubMLR-2.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as R,a as j}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-D8TYHcvp.js";import{b as k}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";import"./floating-ui.core-CgBsuaUc.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";const A={flex:"~ col gap-4"},t="microsoft-speech",C="v1",D=B({__name:"microsoft-speech",setup(I){const{t:a}=F(),P={pitch:0,speed:1,volume:0},r=G(),p=E(),{providers:l}=M(p),m=v(0),V=v(1),_=v(0),d=g({get:()=>{var s;return((s=l.value[t])==null?void 0:s.region)||"eastasia"},set:s=>{l.value[t]||(l.value[t]={region:"eastasia"}),l.value[t].region=s}}),y=g(()=>{var s;return!!((s=l.value[t])!=null&&s.apiKey)}),w=g(()=>r.availableVoices[t]||[]);T(async()=>{await r.loadVoicesForProvider(t)}),K([y,d],async()=>{await r.loadVoicesForProvider(t)});async function U(s,i,e){const c=p.getProviderInstance(t);if(!c)throw new Error("Failed to initialize speech provider");const u=p.getProviderConfig(t),x=u.model||C,S={...u,region:d.value,disableSsml:!e};if(!e&&i){const $=w.value.find(f=>f.id===i);if($){const f=r.generateSSML(s,$,{...u,pitch:m.value});return await r.speech(c,x,f,i,S)}}return await r.speech(c,x,s,i,S)}return(s,i)=>(q(),N(o(j),{"provider-id":t,"default-model":C,"additional-settings":P},{"basic-settings":b(()=>[n(o(H),{modelValue:d.value,"onUpdate:modelValue":i[0]||(i[0]=e=>d.value=e),label:o(a)("settings.pages.providers.provider.microsoft-speech.fields.field.region.label"),description:o(a)("settings.pages.providers.provider.microsoft-speech.fields.field.region.description"),placeholder:"eastasia",required:"",type:"text"},null,8,["modelValue","label","description"])]),"voice-settings":b(()=>[z("div",A,[n(o(h),{modelValue:m.value,"onUpdate:modelValue":i[1]||(i[1]=e=>m.value=e),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":e=>`${e}%`},null,8,["modelValue","label","description","format-value"]),n(o(h),{modelValue:V.value,"onUpdate:modelValue":i[2]||(i[2]=e=>V.value=e),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"]),n(o(h),{modelValue:_.value,"onUpdate:modelValue":i[3]||(i[3]=e=>_.value=e),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":e=>`${e}%`},null,8,["modelValue","label","description","format-value"])])]),playground:b(()=>[n(o(R),{"available-voices":w.value,"generate-speech":U,"api-key-configured":y.value,"default-text":"Hello! This is a test of the Microsoft Speech synthesis."},null,8,["available-voices","api-key-configured"])]),_:1}))}});typeof k=="function"&&k(D);export{D as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import{d as B,$ as F,a0 as M,e as v,f as g,T,w as K,bk as N,o as q,bl as b,b as n,u as o,a as z}from"./index-8LjpXIG7.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{u as E}from"./providers-Dhn8Iy_2.js";import{u as G}from"./speech-BUPJbslH.js";import{_ as H}from"./FieldInput.vue_vue_type_script_setup_true_lang-DdnLISgI.js";import{_ as h}from"./FieldRange.vue_vue_type_script_setup_true_lang-Cdt76zqB.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{_ as R,a as j}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-CN3ASV_M.js";import{b as k}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Input.vue_vue_type_script_setup_true_lang-CpaCGrgF.js";import"./floating-ui.core-CgBsuaUc.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CU_o_t3A.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BOcCBViZ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-DyyWKgKi.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-wR1l1PPX.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-DTczYoOw.js";const A={flex:"~ col gap-4"},t="microsoft-speech",C="v1",D=B({__name:"microsoft-speech",setup(I){const{t:a}=F(),P={pitch:0,speed:1,volume:0},r=G(),p=E(),{providers:l}=M(p),m=v(0),V=v(1),_=v(0),d=g({get:()=>{var s;return((s=l.value[t])==null?void 0:s.region)||"eastasia"},set:s=>{l.value[t]||(l.value[t]={region:"eastasia"}),l.value[t].region=s}}),y=g(()=>{var s;return!!((s=l.value[t])!=null&&s.apiKey)}),w=g(()=>r.availableVoices[t]||[]);T(async()=>{await r.loadVoicesForProvider(t)}),K([y,d],async()=>{await r.loadVoicesForProvider(t)});async function U(s,i,e){const c=p.getProviderInstance(t);if(!c)throw new Error("Failed to initialize speech provider");const u=p.getProviderConfig(t),x=u.model||C,S={...u,region:d.value,disableSsml:!e};if(!e&&i){const $=w.value.find(f=>f.id===i);if($){const f=r.generateSSML(s,$,{...u,pitch:m.value});return await r.speech(c,x,f,i,S)}}return await r.speech(c,x,s,i,S)}return(s,i)=>(q(),N(o(j),{"provider-id":t,"default-model":C,"additional-settings":P},{"basic-settings":b(()=>[n(o(H),{modelValue:d.value,"onUpdate:modelValue":i[0]||(i[0]=e=>d.value=e),label:o(a)("settings.pages.providers.provider.microsoft-speech.fields.field.region.label"),description:o(a)("settings.pages.providers.provider.microsoft-speech.fields.field.region.description"),placeholder:"eastasia",required:"",type:"text"},null,8,["modelValue","label","description"])]),"voice-settings":b(()=>[z("div",A,[n(o(h),{modelValue:m.value,"onUpdate:modelValue":i[1]||(i[1]=e=>m.value=e),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":e=>`${e}%`},null,8,["modelValue","label","description","format-value"]),n(o(h),{modelValue:V.value,"onUpdate:modelValue":i[2]||(i[2]=e=>V.value=e),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"]),n(o(h),{modelValue:_.value,"onUpdate:modelValue":i[3]||(i[3]=e=>_.value=e),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":e=>`${e}%`},null,8,["modelValue","label","description","format-value"])])]),playground:b(()=>[n(o(R),{"available-voices":w.value,"generate-speech":U,"api-key-configured":y.value,"default-text":"Hello! This is a test of the Microsoft Speech synthesis."},null,8,["available-voices","api-key-configured"])]),_:1}))}});typeof k=="function"&&k(D);export{D as default}; diff --git a/assets/mistral-ai-jouO5dmJ.js b/assets/mistral-ai-D8qXGKsB.js similarity index 64% rename from assets/mistral-ai-jouO5dmJ.js rename to assets/mistral-ai-D8qXGKsB.js index cc45916f451ebb356273d34705b3f3511c1e318b..a05866e3ea259f79ebf32e5cab1a9a8321a3ce49 100644 --- a/assets/mistral-ai-jouO5dmJ.js +++ b/assets/mistral-ai-D8qXGKsB.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as k,$ as U,V as $,a0 as y,f as c,T as K,w as h,bk as w,o as x,bl as p,b as l,u as t}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as z}from"./providers-7GsMyC_3.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as C,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";const a="mistral-ai",B=k({__name:"mistral-ai",setup(I){const{t:u}=U(),b=$(),d=z(),{providers:o}=y(d),n=c(()=>d.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}}),s=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}});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)||""}),h([r,s],()=>{o.value[a]={...o.value[a],apiKey:r.value,baseUrl:s.value||""}});function g(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var v,f;return x(),w(t(S),{"provider-name":(v=n.value)==null?void 0:v.localizedName,"provider-icon-color":(f=n.value)==null?void 0:f.iconColor,"on-back":()=>t(b).back()},{default:p(()=>[l(t(P),null,{default:p(()=>[l(t(R),{title:t(u)("settings.pages.providers.common.section.basic.title"),description:t(u)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:p(()=>{var m;return[l(t(N),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=V=>r.value=V),"provider-name":(m=n.value)==null?void 0:m.localizedName,placeholder:"mis-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(C),{title:t(u)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[l(t(M),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=m=>s.value=m),placeholder:"https://api.mistral.ai/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});typeof _=="function"&&_(B);export{B as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import{d as k,$ as U,V as $,a0 as y,f as c,T as K,w as h,bk as w,o as x,bl as p,b as l,u as t}from"./index-8LjpXIG7.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{u as z}from"./providers-Dhn8Iy_2.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{_ as C,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CU_o_t3A.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-wR1l1PPX.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-DTczYoOw.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-D3mbXce4.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BOcCBViZ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-DyyWKgKi.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-DdnLISgI.js";import"./Input.vue_vue_type_script_setup_true_lang-CpaCGrgF.js";const a="mistral-ai",B=k({__name:"mistral-ai",setup(I){const{t:u}=U(),b=$(),d=z(),{providers:o}=y(d),n=c(()=>d.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}}),s=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}});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)||""}),h([r,s],()=>{o.value[a]={...o.value[a],apiKey:r.value,baseUrl:s.value||""}});function g(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var v,f;return x(),w(t(S),{"provider-name":(v=n.value)==null?void 0:v.localizedName,"provider-icon-color":(f=n.value)==null?void 0:f.iconColor,"on-back":()=>t(b).back()},{default:p(()=>[l(t(P),null,{default:p(()=>[l(t(R),{title:t(u)("settings.pages.providers.common.section.basic.title"),description:t(u)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:p(()=>{var m;return[l(t(N),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=V=>r.value=V),"provider-name":(m=n.value)==null?void 0:m.localizedName,placeholder:"mis-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(C),{title:t(u)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[l(t(M),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=m=>s.value=m),placeholder:"https://api.mistral.ai/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});typeof _=="function"&&_(B);export{B as default}; diff --git a/assets/moonshot-ai-DZvpNZty.js b/assets/moonshot-ai-CRj24ObM.js similarity index 64% rename from assets/moonshot-ai-DZvpNZty.js rename to assets/moonshot-ai-CRj24ObM.js index 40793784e473c66cc42ea95ad38999b779959612..3cede3b9cae2d21a51eb326ce956b1de47e143db 100644 --- a/assets/moonshot-ai-DZvpNZty.js +++ b/assets/moonshot-ai-CRj24ObM.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as k,$ as U,V as $,a0 as h,f as c,T as y,w as K,bk as w,o as x,bl as p,b as l,u as t}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as z}from"./providers-7GsMyC_3.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";const a="moonshot-ai",C=k({__name:"moonshot-ai",setup(I){const{t:u}=U(),b=$(),d=z(),{providers:o}=h(d),n=c(()=>d.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}}),s=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}});y(()=>{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 g(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var v,f;return x(),w(t(B),{"provider-name":(v=n.value)==null?void 0:v.localizedName,"provider-icon":(f=n.value)==null?void 0:f.icon,"on-back":()=>t(b).back()},{default:p(()=>[l(t(R),null,{default:p(()=>[l(t(S),{title:t(u)("settings.pages.providers.common.section.basic.title"),description:t(u)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:p(()=>{var m;return[l(t(P),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=V=>r.value=V),"provider-name":(m=n.value)==null?void 0:m.localizedName,placeholder:"ms-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(M),{title:t(u)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[l(t(N),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=m=>s.value=m),placeholder:"https://api.moonshot.cn/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof _=="function"&&_(C);export{C as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import{d as k,$ as U,V as $,a0 as h,f as c,T as y,w as K,bk as w,o as x,bl as p,b as l,u as t}from"./index-8LjpXIG7.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{u as z}from"./providers-Dhn8Iy_2.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CU_o_t3A.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-wR1l1PPX.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-DTczYoOw.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-D3mbXce4.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BOcCBViZ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-DyyWKgKi.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-DdnLISgI.js";import"./Input.vue_vue_type_script_setup_true_lang-CpaCGrgF.js";const a="moonshot-ai",C=k({__name:"moonshot-ai",setup(I){const{t:u}=U(),b=$(),d=z(),{providers:o}=h(d),n=c(()=>d.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}}),s=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}});y(()=>{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 g(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var v,f;return x(),w(t(B),{"provider-name":(v=n.value)==null?void 0:v.localizedName,"provider-icon":(f=n.value)==null?void 0:f.icon,"on-back":()=>t(b).back()},{default:p(()=>[l(t(R),null,{default:p(()=>[l(t(S),{title:t(u)("settings.pages.providers.common.section.basic.title"),description:t(u)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:p(()=>{var m;return[l(t(P),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=V=>r.value=V),"provider-name":(m=n.value)==null?void 0:m.localizedName,placeholder:"ms-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(M),{title:t(u)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[l(t(N),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=m=>s.value=m),placeholder:"https://api.moonshot.cn/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof _=="function"&&_(C);export{C as default}; diff --git a/assets/novita-ai-Bh1E0rHc.js b/assets/novita-ai-NAISe4Y1.js similarity index 64% rename from assets/novita-ai-Bh1E0rHc.js rename to assets/novita-ai-NAISe4Y1.js index 52c5fea33dc1ade048799ee9259b4da76e656dc5..9f7ed0e6693ebcc730b6a96369689306de9729e0 100644 --- a/assets/novita-ai-Bh1E0rHc.js +++ b/assets/novita-ai-NAISe4Y1.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as k,$ as U,V as $,a0 as y,f as v,T as K,w as h,bk as w,o as x,bl as u,b as l,u as t}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as z}from"./providers-7GsMyC_3.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as C,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";const a="novita-ai",B=k({__name:"novita-ai",setup(I){const{t:m}=U(),b=$(),d=z(),{providers:o}=y(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)||""}),h([r,s],()=>{o.value[a]={...o.value[a],apiKey:r.value,baseUrl:s.value||""}});function g(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var c,f;return x(),w(t(S),{"provider-name":(c=n.value)==null?void 0:c.localizedName,"provider-icon-color":(f=n.value)==null?void 0:f.iconColor,"on-back":()=>t(b).back()},{default:u(()=>[l(t(P),null,{default:u(()=>[l(t(R),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:u(()=>{var p;return[l(t(N),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=V=>r.value=V),"provider-name":(p=n.value)==null?void 0:p.localizedName,placeholder:"nvt-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(C),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t(M),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=p=>s.value=p),placeholder:"https://api.novita.ai/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});typeof _=="function"&&_(B);export{B as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import{d as k,$ as U,V as $,a0 as y,f as v,T as K,w as h,bk as w,o as x,bl as u,b as l,u as t}from"./index-8LjpXIG7.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{u as z}from"./providers-Dhn8Iy_2.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{_ as C,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CU_o_t3A.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-wR1l1PPX.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-DTczYoOw.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-D3mbXce4.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BOcCBViZ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-DyyWKgKi.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-DdnLISgI.js";import"./Input.vue_vue_type_script_setup_true_lang-CpaCGrgF.js";const a="novita-ai",B=k({__name:"novita-ai",setup(I){const{t:m}=U(),b=$(),d=z(),{providers:o}=y(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)||""}),h([r,s],()=>{o.value[a]={...o.value[a],apiKey:r.value,baseUrl:s.value||""}});function g(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var c,f;return x(),w(t(S),{"provider-name":(c=n.value)==null?void 0:c.localizedName,"provider-icon-color":(f=n.value)==null?void 0:f.iconColor,"on-back":()=>t(b).back()},{default:u(()=>[l(t(P),null,{default:u(()=>[l(t(R),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:u(()=>{var p;return[l(t(N),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=V=>r.value=V),"provider-name":(p=n.value)==null?void 0:p.localizedName,placeholder:"nvt-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(C),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t(M),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=p=>s.value=p),placeholder:"https://api.novita.ai/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});typeof _=="function"&&_(B);export{B as default}; diff --git a/assets/ollama-r0UZT5nG.js b/assets/ollama-CtNL55u8.js similarity index 85% rename from assets/ollama-r0UZT5nG.js rename to assets/ollama-CtNL55u8.js index 96ac79d7548f8795c198bb1748017b3e61890b65..a1281fdb2d7b903d54cb228284c522110beea1b3 100644 --- a/assets/ollama-r0UZT5nG.js +++ b/assets/ollama-CtNL55u8.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as P,cf as x,cg as U,c as g,o as f,b as m,e as K,w as B,c5 as O,a as _,bm as R,ch as S,W as z,Y as w,c6 as D,c7 as I,$ as T,V as F,a0 as A,f as M,T as E,bk as L,bl as V,u as a}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as W}from"./providers-7GsMyC_3.js";import{_ as q}from"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{a as Y,_ as j}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import{_ as G,a as H}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";import{_ as J}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js";import{b as C}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";const Q={flex:"~ gap-2"},X=P({__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,t)=>(f(),g("div",Q,[m(q,{modelValue:s.value,"onUpdate:modelValue":t[0]||(t[0]=i=>s.value=i),placeholder:o.keyPlaceholder,class:"w-1/2"},null,8,["modelValue","placeholder"]),m(q,{modelValue:u.value,"onUpdate:modelValue":t[1]||(t[1]=i=>u.value=i),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"},te={key:0,class:"text-red-500"},ae={class:"text-xs text-neutral-500 dark:text-neutral-400","text-nowrap":""},oe={flex:"~ col gap-2"},re=["onClick"],se=P({__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"),t=K(""),i=K("");return B([t,i],()=>{u("add",t.value,i.value)}),($,p)=>{const b=O("auto-animate");return f(),g("div",Z,[_("label",ee,[_("div",null,[_("div",le,[S(w(s.label)+" ",1),s.required!==!1?(f(),g("span",te,"*")):z("",!0)]),_("div",ae,w(s.description),1)]),R((f(),g("div",oe,[(f(!0),g(D,null,I(r.value,(y,l)=>(f(),g("div",{key:l,"w-full":"",flex:"","items-center":"","gap-2":""},[m(X,{"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))])),[[b]])])])}}}),d="ollama",ie=P({__name:"ollama",setup(v){const{t:o}=T(),s=F(),u=W(),{providers:r}=A(u),t=M(()=>u.getProviderMetadata(d)),i=M({get:()=>{var l,e,n;return((l=r.value[d])==null?void 0:l.baseUrl)||((n=(e=t.value)==null?void 0:e.defaultOptions)==null?void 0:n.baseUrl)||""},set:l=>{r.value[d]||(r.value[d]={}),r.value[d].baseUrl=l}});E(()=>{var l,e,n,h;u.initializeProvider(d),i.value=((l=r.value[d])==null?void 0:l.baseUrl)||((n=(e=t.value)==null?void 0:e.defaultOptions)==null?void 0:n.baseUrl)||"",(h=r.value[d])!=null&&h.headers||(r.value[d].headers={})});function $(){var l;r.value[d]={...(l=t.value)==null?void 0:l.defaultOptions}}const p=K([{key:"",value:""}]);function b(l,e,n){l&&l.push({key:e,value:n})}function y(l,e){e&&(e.length===1?(e[0].key="",e[0].value=""):e.splice(l,1))}return B(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 n,h;return f(),L(a(J),{"provider-name":(n=t.value)==null?void 0:n.localizedName,"provider-icon":(h=t.value)==null?void 0:h.icon,"on-back":()=>a(s).back()},{default:V(()=>[m(a(G),null,{default:V(()=>[m(a(H),{title:a(o)("settings.pages.providers.common.section.basic.title"),description:a(o)("settings.pages.providers.common.section.basic.description"),"on-reset":$},{default:V(()=>{var c,k;return[m(a(Y),{modelValue:i.value,"onUpdate:modelValue":e[0]||(e[0]=N=>i.value=N),placeholder:((k=(c=t.value)==null?void 0:c.defaultOptions)==null?void 0:k.baseUrl)||"",required:""},null,8,["modelValue","placeholder"])]}),_:1},8,["title","description"]),m(a(j),{title:a(o)("settings.pages.providers.common.section.advanced.title")},{default:V(()=>[m(a(se),{modelValue:p.value,"onUpdate:modelValue":e[1]||(e[1]=c=>p.value=c),label:a(o)("settings.pages.providers.common.section.advanced.fields.field.headers.label"),description:a(o)("settings.pages.providers.common.section.advanced.fields.field.headers.description"),"key-placeholder":a(o)("settings.pages.providers.common.section.advanced.fields.field.headers.key.placeholder"),"value-placeholder":a(o)("settings.pages.providers.common.section.advanced.fields.field.headers.value.placeholder"),onAdd:e[2]||(e[2]=(c,k)=>b(p.value,c,k)),onRemove:e[3]||(e[3]=c=>y(c,p.value))},null,8,["modelValue","label","description","key-placeholder","value-placeholder"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof C=="function"&&C(ie);export{ie as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import{d as P,cf as x,cg as U,c as g,o as f,b as m,e as K,w as B,c5 as O,a as _,bm as R,ch as S,W as z,Y as w,c6 as D,c7 as I,$ as T,V as F,a0 as A,f as M,T as E,bk as L,bl as V,u as a}from"./index-8LjpXIG7.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{u as W}from"./providers-Dhn8Iy_2.js";import{_ as q}from"./Input.vue_vue_type_script_setup_true_lang-CpaCGrgF.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{a as Y,_ as j}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CU_o_t3A.js";import{_ as G,a as H}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-DTczYoOw.js";import{_ as J}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-D3mbXce4.js";import{b as C}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BOcCBViZ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-DyyWKgKi.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-DdnLISgI.js";const Q={flex:"~ gap-2"},X=P({__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,t)=>(f(),g("div",Q,[m(q,{modelValue:s.value,"onUpdate:modelValue":t[0]||(t[0]=i=>s.value=i),placeholder:o.keyPlaceholder,class:"w-1/2"},null,8,["modelValue","placeholder"]),m(q,{modelValue:u.value,"onUpdate:modelValue":t[1]||(t[1]=i=>u.value=i),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"},te={key:0,class:"text-red-500"},ae={class:"text-xs text-neutral-500 dark:text-neutral-400","text-nowrap":""},oe={flex:"~ col gap-2"},re=["onClick"],se=P({__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"),t=K(""),i=K("");return B([t,i],()=>{u("add",t.value,i.value)}),($,p)=>{const b=O("auto-animate");return f(),g("div",Z,[_("label",ee,[_("div",null,[_("div",le,[S(w(s.label)+" ",1),s.required!==!1?(f(),g("span",te,"*")):z("",!0)]),_("div",ae,w(s.description),1)]),R((f(),g("div",oe,[(f(!0),g(D,null,I(r.value,(y,l)=>(f(),g("div",{key:l,"w-full":"",flex:"","items-center":"","gap-2":""},[m(X,{"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))])),[[b]])])])}}}),d="ollama",ie=P({__name:"ollama",setup(v){const{t:o}=T(),s=F(),u=W(),{providers:r}=A(u),t=M(()=>u.getProviderMetadata(d)),i=M({get:()=>{var l,e,n;return((l=r.value[d])==null?void 0:l.baseUrl)||((n=(e=t.value)==null?void 0:e.defaultOptions)==null?void 0:n.baseUrl)||""},set:l=>{r.value[d]||(r.value[d]={}),r.value[d].baseUrl=l}});E(()=>{var l,e,n,h;u.initializeProvider(d),i.value=((l=r.value[d])==null?void 0:l.baseUrl)||((n=(e=t.value)==null?void 0:e.defaultOptions)==null?void 0:n.baseUrl)||"",(h=r.value[d])!=null&&h.headers||(r.value[d].headers={})});function $(){var l;r.value[d]={...(l=t.value)==null?void 0:l.defaultOptions}}const p=K([{key:"",value:""}]);function b(l,e,n){l&&l.push({key:e,value:n})}function y(l,e){e&&(e.length===1?(e[0].key="",e[0].value=""):e.splice(l,1))}return B(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 n,h;return f(),L(a(J),{"provider-name":(n=t.value)==null?void 0:n.localizedName,"provider-icon":(h=t.value)==null?void 0:h.icon,"on-back":()=>a(s).back()},{default:V(()=>[m(a(G),null,{default:V(()=>[m(a(H),{title:a(o)("settings.pages.providers.common.section.basic.title"),description:a(o)("settings.pages.providers.common.section.basic.description"),"on-reset":$},{default:V(()=>{var c,k;return[m(a(Y),{modelValue:i.value,"onUpdate:modelValue":e[0]||(e[0]=N=>i.value=N),placeholder:((k=(c=t.value)==null?void 0:c.defaultOptions)==null?void 0:k.baseUrl)||"",required:""},null,8,["modelValue","placeholder"])]}),_:1},8,["title","description"]),m(a(j),{title:a(o)("settings.pages.providers.common.section.advanced.title")},{default:V(()=>[m(a(se),{modelValue:p.value,"onUpdate:modelValue":e[1]||(e[1]=c=>p.value=c),label:a(o)("settings.pages.providers.common.section.advanced.fields.field.headers.label"),description:a(o)("settings.pages.providers.common.section.advanced.fields.field.headers.description"),"key-placeholder":a(o)("settings.pages.providers.common.section.advanced.fields.field.headers.key.placeholder"),"value-placeholder":a(o)("settings.pages.providers.common.section.advanced.fields.field.headers.value.placeholder"),onAdd:e[2]||(e[2]=(c,k)=>b(p.value,c,k)),onRemove:e[3]||(e[3]=c=>y(c,p.value))},null,8,["modelValue","label","description","key-placeholder","value-placeholder"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof C=="function"&&C(ie);export{ie as default}; diff --git a/assets/openai-XNIcWilW.js b/assets/openai-Ddfv1hoL.js similarity index 63% rename from assets/openai-XNIcWilW.js rename to assets/openai-Ddfv1hoL.js index 722932b2ed0df39291d05ef307b4be03ea5972aa..3f85f67be534f0404830abb11f075a969ec65ea1 100644 --- a/assets/openai-XNIcWilW.js +++ b/assets/openai-Ddfv1hoL.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as h,$ as k,V,a0 as $,f as c,T as y,w as K,bk as I,o as w,bl as n,b as p,u as t}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as x}from"./providers-7GsMyC_3.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import{_ as R}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import{_ as S,a as z}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";import{_ as A}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";const e="openai",B=h({__name:"openai",setup(C){const{t:m}=k(),b=V(),v=x(),{providers:a}=$(v),u=c(()=>v.getProviderMetadata(e)),s=c({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=c({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/"}),K([s,r],()=>{a.value[e]={...a.value[e],apiKey:s.value,baseUrl:r.value||"https://api.openai.com/v1/"}});function g(){a.value[e]={baseUrl:"https://api.openai.com/v1/"}}return(o,i)=>{var d,f;return w(),I(t(A),{"provider-name":((d=u.value)==null?void 0:d.localizedName)||"OpenAI","provider-icon":(f=u.value)==null?void 0:f.icon,"on-back":()=>t(b).back()},{default:n(()=>[p(t(S),null,{default:n(()=>[p(t(z),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:n(()=>{var l;return[p(t(R),{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=U=>s.value=U),"provider-name":((l=u.value)==null?void 0:l.localizedName)||"OpenAI",placeholder:"sk-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),p(t(M),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:n(()=>[p(t(N),{modelValue:r.value,"onUpdate:modelValue":i[1]||(i[1]=l=>r.value=l),placeholder:"https://api.openai.com/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof _=="function"&&_(B);export{B as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import{d as h,$ as k,V,a0 as $,f as c,T as y,w as K,bk as I,o as w,bl as n,b as p,u as t}from"./index-8LjpXIG7.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{u as x}from"./providers-Dhn8Iy_2.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CU_o_t3A.js";import{_ as R}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-wR1l1PPX.js";import{_ as S,a as z}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-DTczYoOw.js";import{_ as A}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-D3mbXce4.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BOcCBViZ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-DyyWKgKi.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-DdnLISgI.js";import"./Input.vue_vue_type_script_setup_true_lang-CpaCGrgF.js";const e="openai",B=h({__name:"openai",setup(C){const{t:m}=k(),b=V(),v=x(),{providers:a}=$(v),u=c(()=>v.getProviderMetadata(e)),s=c({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=c({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/"}),K([s,r],()=>{a.value[e]={...a.value[e],apiKey:s.value,baseUrl:r.value||"https://api.openai.com/v1/"}});function g(){a.value[e]={baseUrl:"https://api.openai.com/v1/"}}return(o,i)=>{var d,f;return w(),I(t(A),{"provider-name":((d=u.value)==null?void 0:d.localizedName)||"OpenAI","provider-icon":(f=u.value)==null?void 0:f.icon,"on-back":()=>t(b).back()},{default:n(()=>[p(t(S),null,{default:n(()=>[p(t(z),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:n(()=>{var l;return[p(t(R),{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=U=>s.value=U),"provider-name":((l=u.value)==null?void 0:l.localizedName)||"OpenAI",placeholder:"sk-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),p(t(M),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:n(()=>[p(t(N),{modelValue:r.value,"onUpdate:modelValue":i[1]||(i[1]=l=>r.value=l),placeholder:"https://api.openai.com/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof _=="function"&&_(B);export{B as default}; diff --git a/assets/openrouter-ai-CTdWmhtc.js b/assets/openrouter-ai-CICLfTef.js similarity index 65% rename from assets/openrouter-ai-CTdWmhtc.js rename to assets/openrouter-ai-CICLfTef.js index 1c4a0e86e051b12a6ffaccd22633e071b99706e0..3d8cf296525cae1631bc42dff88dfe05aa43809c 100644 --- a/assets/openrouter-ai-CTdWmhtc.js +++ b/assets/openrouter-ai-CICLfTef.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as V,$,V as y,a0 as K,f as _,T as O,w as h,bk as w,o as x,bl as v,b as d,u as r}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as z}from"./providers-7GsMyC_3.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js";import{b}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";const a="openrouter-ai",C=V({__name:"openrouter-ai",setup(I){const{t:c}=$(),U=y(),f=z(),{providers:o}=K(f),i=_(()=>f.getProviderMetadata(a)),s=_({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,l;return((e=o.value[a])==null?void 0:e.baseUrl)||((l=(t=i.value)==null?void 0:t.defaultOptions)==null?void 0:l.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});O(()=>{var e,t,l,u;f.initializeProvider(a),s.value=((e=o.value[a])==null?void 0:e.apiKey)||"",n.value=((t=o.value[a])==null?void 0:t.baseUrl)||((u=(l=i.value)==null?void 0:l.defaultOptions)==null?void 0:u.baseUrl)||""}),h([s,n],()=>{var e,t;o.value[a]={...o.value[a],apiKey:s.value,baseUrl:n.value||((t=(e=i.value)==null?void 0:e.defaultOptions)==null?void 0:t.baseUrl)||""}});function g(){var e;o.value[a]={...(e=i.value)==null?void 0:e.defaultOptions}}return(e,t)=>{var l,u;return x(),w(r(B),{"provider-name":(l=i.value)==null?void 0:l.localizedName,"provider-icon":(u=i.value)==null?void 0:u.icon,"on-back":()=>r(U).back()},{default:v(()=>[d(r(R),null,{default:v(()=>[d(r(S),{title:r(c)("settings.pages.providers.common.section.basic.title"),description:r(c)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:v(()=>{var p;return[d(r(P),{modelValue:s.value,"onUpdate:modelValue":t[0]||(t[0]=m=>s.value=m),"provider-name":(p=i.value)==null?void 0:p.localizedName,placeholder:"sk-or-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),d(r(M),{title:r(c)("settings.pages.providers.common.section.advanced.title")},{default:v(()=>{var p,m;return[d(r(N),{modelValue:n.value,"onUpdate:modelValue":t[1]||(t[1]=k=>n.value=k),placeholder:((m=(p=i.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"])}}});typeof b=="function"&&b(C);export{C as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import{d as V,$,V as y,a0 as K,f as _,T as O,w as h,bk as w,o as x,bl as v,b as d,u as r}from"./index-8LjpXIG7.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{u as z}from"./providers-Dhn8Iy_2.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CU_o_t3A.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-wR1l1PPX.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-DTczYoOw.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-D3mbXce4.js";import{b}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BOcCBViZ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-DyyWKgKi.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-DdnLISgI.js";import"./Input.vue_vue_type_script_setup_true_lang-CpaCGrgF.js";const a="openrouter-ai",C=V({__name:"openrouter-ai",setup(I){const{t:c}=$(),U=y(),f=z(),{providers:o}=K(f),i=_(()=>f.getProviderMetadata(a)),s=_({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,l;return((e=o.value[a])==null?void 0:e.baseUrl)||((l=(t=i.value)==null?void 0:t.defaultOptions)==null?void 0:l.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});O(()=>{var e,t,l,u;f.initializeProvider(a),s.value=((e=o.value[a])==null?void 0:e.apiKey)||"",n.value=((t=o.value[a])==null?void 0:t.baseUrl)||((u=(l=i.value)==null?void 0:l.defaultOptions)==null?void 0:u.baseUrl)||""}),h([s,n],()=>{var e,t;o.value[a]={...o.value[a],apiKey:s.value,baseUrl:n.value||((t=(e=i.value)==null?void 0:e.defaultOptions)==null?void 0:t.baseUrl)||""}});function g(){var e;o.value[a]={...(e=i.value)==null?void 0:e.defaultOptions}}return(e,t)=>{var l,u;return x(),w(r(B),{"provider-name":(l=i.value)==null?void 0:l.localizedName,"provider-icon":(u=i.value)==null?void 0:u.icon,"on-back":()=>r(U).back()},{default:v(()=>[d(r(R),null,{default:v(()=>[d(r(S),{title:r(c)("settings.pages.providers.common.section.basic.title"),description:r(c)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:v(()=>{var p;return[d(r(P),{modelValue:s.value,"onUpdate:modelValue":t[0]||(t[0]=m=>s.value=m),"provider-name":(p=i.value)==null?void 0:p.localizedName,placeholder:"sk-or-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),d(r(M),{title:r(c)("settings.pages.providers.common.section.advanced.title")},{default:v(()=>{var p,m;return[d(r(N),{modelValue:n.value,"onUpdate:modelValue":t[1]||(t[1]=k=>n.value=k),placeholder:((m=(p=i.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"])}}});typeof b=="function"&&b(C);export{C as default}; diff --git a/assets/providers-7GsMyC_3.js b/assets/providers-Dhn8Iy_2.js similarity index 99% rename from assets/providers-7GsMyC_3.js rename to assets/providers-Dhn8Iy_2.js index 97269bf9a82e2a4320894851cd27ff48567c173c..579d64c3f75c145d12d0a2d0d8fb093aca32e864 100644 --- a/assets/providers-7GsMyC_3.js +++ b/assets/providers-Dhn8Iy_2.js @@ -1 +1 @@ -var le=Object.defineProperty;var de=(a,i,n)=>i in a?le(a,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):a[i]=n;var z=(a,i,n)=>de(a,typeof i!="symbol"?i+"":i,n);import{a4 as ce,cc as pe,$ as ue,e as E,w as ge,f as P}from"./index-WDP_Z4A8.js";import{r as me,a as ve,e as _e,o as G}from"./index-LHmcipjy.js";const _=async a=>(a.fetch??globalThis.fetch)(me("models",a.baseURL),{headers:ve(a.headers,a.apiKey),signal:a.abortSignal}).then(_e).then(({data:i})=>i),h=a=>({chat:i=>Object.assign(a,{model:i})}),w=a=>({embed:i=>Object.assign(a,{model:i})}),he=a=>({image:i=>Object.assign(a,{model:i})}),y=a=>({model:()=>a}),fe=a=>({speech:i=>Object.assign(a,{model:i})}),ye=a=>({transcription:i=>Object.assign(a,{model:i})}),g=(a,i)=>({metadata:{id:a,...i}}),m=(...a)=>Object.assign(a[0],...a.slice(1)),be=(a,i="https://api.anthropic.com/v1/")=>m(g("anthropic"),h({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),N=(a,i="https://api.deepseek.com/")=>m(g("deepseek"),h({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),D=(a,i="https://api.fireworks.ai/inference/v1/")=>m(g("fireworks"),h({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),V=(a,i="https://generativelanguage.googleapis.com/v1beta/openai/")=>m(g("google-generative-ai"),h({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),W=(a,i="https://api.mistral.ai/v1/")=>m(g("mistral"),h({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),H=(a,i="https://api.moonshot.cn/v1/")=>m(g("moonshot"),h({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),J=(a,i="https://api.novita.ai/v3/openai/")=>m(g("novita"),h({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),K=(a,i="https://api.openai.com/v1/")=>m(g("openai"),h({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),he({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i}),fe({apiKey:a,baseURL:i}),ye({apiKey:a,baseURL:i})),xe=(a,i="")=>m(g("openrouter"),{chat:(n,l)=>{const f={apiKey:a,baseURL:i,model:n};return{...l?(({extraHeaders:s,models:v,provider:u})=>{s!=null&&(f.headers??(f.headers={}),Object.assign(f.headers,s));let c;return u!=null&&(c=G(u)),G({models:v,provider:c})})(l):{},...f}}},y({apiKey:a,baseURL:i})),ke=(a,i="https://api.perplexity.ai/")=>m(g("perplexity"),h({apiKey:a,baseURL:i})),X=(a,i="https://api.together.xyz/v1/")=>m(g("together-ai"),h({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i,fetch:async(...n)=>globalThis.fetch(...n).then(async l=>l.json()).then(l=>Response.json({data:l,object:"list"}))})),Pe=(a,i)=>{const n=`https://api.cloudflare.com/client/v4/accounts/${i}/ai/v1/`;return m(g("workers-ai"),h({apiKey:a,baseURL:n}),w({apiKey:a,baseURL:n}))},Z=(a,i="https://api.x.ai/v1/")=>m(g("xai"),h({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),C=(a="http://localhost:11434/v1/")=>m(g("ollama"),h({baseURL:a}),w({baseURL:a}),y({baseURL:a})),A=(...a)=>Object.assign(a[0],...a.slice(1));class j extends Error{constructor(n,l){super(n);z(this,"response");this.name="XSAIError",this.response=l}}const we=a=>a.replace(/[A-Z]/g,i=>`_${i.toLowerCase()}`),M=a=>Object.fromEntries(Object.entries(a).map(([i,n])=>[we(i),n])),Ke=a=>Object.fromEntries(Object.entries(a).filter(([,i])=>i!==void 0)),Me=(a,i)=>Ke({Authorization:i!==void 0?`Bearer ${i}`:void 0,...a}),Ce=(a,i)=>{const n=i.toString();return new URL(a,n.endsWith("/")?n:`${n}/`)},Oe=async a=>{if(!a.ok)throw new j(`Remote sent ${a.status} response: ${await a.text()}`,a);if(!a.body)throw new j("Response body is empty from remote server",a);if(!(a.body instanceof ReadableStream))throw new j(`Expected Response body to be a ReadableStream, but got ${String(a.body)}; Content Type is ${a.headers.get("Content-Type")}`,a);return a},Ue=async a=>Oe(a).then(async i=>{const n=await i.text();try{return JSON.parse(n)}catch{throw new Error(`Failed to parse response, response body: ${n}`)}});var Q=(a,i="http://localhost:5933/v1/")=>{const n=({applyTextNormalization:t,languageCode:s,nextRequestIds:v,nextText:u,previousRequestIds:c,previousText:b,pronunciationDictionaryLocators:x,seed:O,voiceSettings:U})=>({extraBody:M({applyTextNormalization:t,languageCode:s,nextRequestIds:v,nextText:u,previousRequestIds:c,previousText:b,pronunciationDictionaryLocators:x?x.map(B=>M(B)):void 0,seed:O,voiceSettings:M(U??{similarityBoost:.75,stability:.5})})});return A({speech:(t,s)=>({...s?n(s):{},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?n(t):{},apiKey:a,baseURL:i})})},Y=(a,i="http://localhost:5933/v1/")=>{const n=t=>{const{deploymentId:s,region:v,sampleRate:u}=t,c={deploymentId:s,region:v,sampleRate:u};return"disableSsml"in t?c.disableSsml=t.disableSsml:"lang"in t&&(c.lang=t.lang,c.gender=t.gender,c.voice=t.voice),{extraBody:M(c)}};return A({speech:(t,s)=>({...s?n(s):{},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?n(t):{},apiKey:a,baseURL:i})})},R=(a,i="http://localhost:5933/v1/")=>{const n=t=>{var v,u;const s={app:{appid:(v=t.app)==null?void 0:v.appId,token:a}};return typeof t.app<"u"&&(s.app={...t.app,appid:(u=t.app)==null?void 0:u.appId,token:a}),typeof t.user<"u"&&(s.user=t.user),typeof t.audio<"u"&&(s.audio=t.audio),{extraBody:M(s)}};return A({speech:(t,s)=>({...s?n(s):{},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?n(t):{},apiKey:a,baseURL:i})})},ee=(a,i="http://localhost:5933/v1/")=>{const n=t=>{const{sampleRate:s,volume:v,rate:u,pitch:c}=t,b={sampleRate:s,volume:v,rate:u,pitch:c};return Object.keys(b).forEach(x=>b[x]===void 0&&delete b[x]),{extraBody:M(b)}};return A({speech:(t,s)=>({...s?n(s):{},apiKey:a,baseURL:i,model:`alibaba/${t}`})},{voice:t=>{let s=i;return s.endsWith("v1/")?s=s.slice(0,-3):s.endsWith("v1")&&(s=s.slice(0,-2)),{query:"provider=alibaba",...t?n(t):{},apiKey:a,baseURL:s}}})},q=async a=>(a.fetch??globalThis.fetch)(Ce(a.query?`api/voices?${a.query}`:"api/voices",a.baseURL),{headers:Me({...a.headers},a.apiKey),method:"GET",signal:a.abortSignal}).then(Ue).then(({voices:i})=>i);const Se=[{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"}],je=ce("providers",()=>{const a=pe("settings/credentials/providers",{}),{t:i}=ue();async function n(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(o=>({id:o.id,name:o.name||o.id,provider:"openrouter-ai",description:o.description||"",contextLength:o.context_length,deprecated:!1}))}catch(r){throw console.error("Error fetching OpenRouter models:",r),r}}const l={"openrouter-ai":{id:"openrouter-ai",category:"chat",tasks:["text-generation"],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=>xe(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>n(e)},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},ollama:{id:"ollama",category:"chat",tasks:["text-generation"],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=>C(e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...C(e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"ollama",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.baseUrl}},"ollama-embedding":{id:"ollama-embedding",category:"embed",tasks:["text-feature-extraction"],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=>C(e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...C(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",category:"chat",tasks:["text-generation"],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=>C(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",category:"chat",tasks:["text-generation"],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=>K(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...K(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}},"openai-audio-speech":{id:"openai-audio-speech",category:"speech",tasks:["text-to-speech"],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=>K(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...K(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",category:"chat",tasks:["text-generation"],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=>be(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",category:"chat",tasks:["text-generation"],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=>V(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...V(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",category:"chat",tasks:["text-generation"],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=>Z(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...Z(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:{category:"chat",tasks:["text-generation"],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=>N(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...N(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",category:"speech",tasks:["text-to-speech"],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=>Q(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>Se.map(e=>({id:e.model_id,name:e.name,provider:"elevenlabs",description:e.description,contextLength:0,deprecated:!1})),listVoices:async e=>{const r=Q(e.apiKey.trim(),e.baseUrl.trim()),d=await q({...r.voice()}),o=d.findIndex(k=>k.name.includes("Aria")),p=d.findIndex(k=>k.name.includes("Bill")),$=o!==-1?o:0,I=p!==-1?p:d.length-1,F=Math.min($,I),L=Math.max($,I);return[...d.slice(0,F),...d.slice(L+1),...d.slice(F,L+1)].map(k=>({id:k.id,name:k.name,provider:"elevenlabs",previewURL:k.preview_audio_url,languages:k.languages}))}},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"microsoft-speech":{id:"microsoft-speech",category:"speech",tasks:["text-to-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=>Y(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=Y(e.apiKey.trim(),e.baseUrl.trim());return(await q({...r.voice({region:e.region})})).map(o=>{var p;return{id:o.id,name:o.name,provider:"microsoft-speech",previewURL:o.preview_audio_url,languages:o.languages,gender:(p=o.labels)==null?void 0:p.gender}})}},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"alibaba-cloud-model-studio":{id:"alibaba-cloud-model-studio",category:"speech",tasks:["text-to-speech"],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=>ee(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listVoices:async e=>{const r=ee(e.apiKey.trim(),e.baseUrl.trim());return(await q({...r.voice()})).map(o=>{var p;return{id:o.id,name:o.name,provider:"alibaba-cloud-model-studio",previewURL:o.preview_audio_url,languages:o.languages,gender:(p=o.labels)==null?void 0:p.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",category:"speech",tasks:["text-to-speech"],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=>R(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listVoices:async e=>{const r=R(e.apiKey.trim(),e.baseUrl.trim());return(await q({...r.voice()})).map(o=>{var p;return{id:o.id,name:o.name,provider:"volcano-engine",previewURL:o.preview_audio_url,languages:o.languages,gender:(p=o.labels)==null?void 0:p.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",category:"chat",tasks:["text-generation"],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=>X(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...X(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",category:"chat",tasks:["text-generation"],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=>J(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...J(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",category:"chat",tasks:["text-generation"],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=>D(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...D(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",category:"chat",tasks:["text-generation"],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=>K(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...K(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",category:"chat",tasks:["text-generation"],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=>Pe(e.apiKey.trim(),e.accountId),capabilities:{listModels:async()=>[]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.accountId}},"perplexity-ai":{id:"perplexity-ai",category:"chat",tasks:["text-generation"],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=>ke(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",category:"chat",tasks:["text-generation"],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=>W(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...W(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",category:"chat",tasks:["text-generation"],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=>H(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...H(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 f(e){const r=a.value[e];if(!r)return!1;const d=l[e];return d?await d.validators.validateProviderConfig(r):!1}const t=E({});function s(e){var r;if(!a.value[e]){const d=l[e];a.value[e]={baseUrl:((r=d.defaultOptions)==null?void 0:r.baseUrl)||""}}}Object.keys(l).forEach(s);async function v(){await Promise.all(Object.keys(l).map(async e=>{t.value[e]=await f(e)}))}v(),ge(a,v,{deep:!0});const u=P(()=>Object.keys(l).filter(e=>t.value[e])),c=E({}),b=E({}),x=E({});async function O(e){const r=a.value[e];if(!r)return[];const d=l[e];if(!d)return[];b.value[e]=!0,x.value[e]=null;try{const o=d.capabilities.listModels?await d.capabilities.listModels(r):[];return c.value[e]=o.map(p=>({id:p.id,name:p.name,description:p.description,contextLength:p.contextLength,deprecated:p.deprecated,provider:e})),c.value[e]}catch(o){return console.error(`Error fetching models for ${e}:`,o),x.value[e]=o instanceof Error?o.message:"Unknown error",[]}finally{b.value[e]=!1}}function U(e){return c.value[e]||[]}const B=P(()=>{const e=[];for(const r of u.value)e.push(...c.value[r]||[]);return e});async function ae(){for(const e of u.value)l[e].capabilities.listModels&&await O(e)}function T(e){const r=l[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 S=P(()=>Object.values(l).map(e=>({...e,localizedName:i(e.nameKey,e.name),localizedDescription:i(e.descriptionKey,e.description),configured:t.value[e.id]||!1})));function ie(e){const r=a.value[e];if(!r)throw new Error(`Provider credentials for ${e} not found`);const d=l[e];if(!d)throw new Error(`Provider metadata for ${e} not found`);try{return d.createProvider(r)}catch(o){throw console.error(`Error creating provider instance for ${e}:`,o),o}}const re=P(()=>u.value.map(e=>T(e))),te=P(()=>S.value.filter(e=>e.category==="chat")),ne=P(()=>S.value.filter(e=>e.category==="speech")),se=P(()=>S.value.filter(e=>e.category==="transcription"));function oe(e){return a.value[e]}return{providers:a,getProviderConfig:oe,availableProviders:u,configuredProviders:t,providerMetadata:l,getProviderMetadata:T,allProvidersMetadata:S,initializeProvider:s,validateProvider:f,availableModels:c,isLoadingModels:b,modelLoadError:x,fetchModelsForProvider:O,getModelsForProvider:U,allAvailableModels:B,loadModelsForConfiguredProviders:ae,getProviderInstance:ie,availableProvidersMetadata:re,allChatProvidersMetadata:te,allAudioSpeechProvidersMetadata:ne,allAudioTranscriptionProvidersMetadata:se}});export{_ as l,je as u}; +var le=Object.defineProperty;var de=(a,i,n)=>i in a?le(a,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):a[i]=n;var z=(a,i,n)=>de(a,typeof i!="symbol"?i+"":i,n);import{a4 as ce,cc as pe,$ as ue,e as E,w as ge,f as P}from"./index-8LjpXIG7.js";import{r as me,a as ve,e as _e,o as G}from"./index-LHmcipjy.js";const _=async a=>(a.fetch??globalThis.fetch)(me("models",a.baseURL),{headers:ve(a.headers,a.apiKey),signal:a.abortSignal}).then(_e).then(({data:i})=>i),h=a=>({chat:i=>Object.assign(a,{model:i})}),w=a=>({embed:i=>Object.assign(a,{model:i})}),he=a=>({image:i=>Object.assign(a,{model:i})}),y=a=>({model:()=>a}),fe=a=>({speech:i=>Object.assign(a,{model:i})}),ye=a=>({transcription:i=>Object.assign(a,{model:i})}),g=(a,i)=>({metadata:{id:a,...i}}),m=(...a)=>Object.assign(a[0],...a.slice(1)),be=(a,i="https://api.anthropic.com/v1/")=>m(g("anthropic"),h({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),N=(a,i="https://api.deepseek.com/")=>m(g("deepseek"),h({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),D=(a,i="https://api.fireworks.ai/inference/v1/")=>m(g("fireworks"),h({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),V=(a,i="https://generativelanguage.googleapis.com/v1beta/openai/")=>m(g("google-generative-ai"),h({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),W=(a,i="https://api.mistral.ai/v1/")=>m(g("mistral"),h({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),H=(a,i="https://api.moonshot.cn/v1/")=>m(g("moonshot"),h({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),J=(a,i="https://api.novita.ai/v3/openai/")=>m(g("novita"),h({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),K=(a,i="https://api.openai.com/v1/")=>m(g("openai"),h({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),he({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i}),fe({apiKey:a,baseURL:i}),ye({apiKey:a,baseURL:i})),xe=(a,i="")=>m(g("openrouter"),{chat:(n,l)=>{const f={apiKey:a,baseURL:i,model:n};return{...l?(({extraHeaders:s,models:v,provider:u})=>{s!=null&&(f.headers??(f.headers={}),Object.assign(f.headers,s));let c;return u!=null&&(c=G(u)),G({models:v,provider:c})})(l):{},...f}}},y({apiKey:a,baseURL:i})),ke=(a,i="https://api.perplexity.ai/")=>m(g("perplexity"),h({apiKey:a,baseURL:i})),X=(a,i="https://api.together.xyz/v1/")=>m(g("together-ai"),h({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i,fetch:async(...n)=>globalThis.fetch(...n).then(async l=>l.json()).then(l=>Response.json({data:l,object:"list"}))})),Pe=(a,i)=>{const n=`https://api.cloudflare.com/client/v4/accounts/${i}/ai/v1/`;return m(g("workers-ai"),h({apiKey:a,baseURL:n}),w({apiKey:a,baseURL:n}))},Z=(a,i="https://api.x.ai/v1/")=>m(g("xai"),h({apiKey:a,baseURL:i}),y({apiKey:a,baseURL:i})),C=(a="http://localhost:11434/v1/")=>m(g("ollama"),h({baseURL:a}),w({baseURL:a}),y({baseURL:a})),A=(...a)=>Object.assign(a[0],...a.slice(1));class j extends Error{constructor(n,l){super(n);z(this,"response");this.name="XSAIError",this.response=l}}const we=a=>a.replace(/[A-Z]/g,i=>`_${i.toLowerCase()}`),M=a=>Object.fromEntries(Object.entries(a).map(([i,n])=>[we(i),n])),Ke=a=>Object.fromEntries(Object.entries(a).filter(([,i])=>i!==void 0)),Me=(a,i)=>Ke({Authorization:i!==void 0?`Bearer ${i}`:void 0,...a}),Ce=(a,i)=>{const n=i.toString();return new URL(a,n.endsWith("/")?n:`${n}/`)},Oe=async a=>{if(!a.ok)throw new j(`Remote sent ${a.status} response: ${await a.text()}`,a);if(!a.body)throw new j("Response body is empty from remote server",a);if(!(a.body instanceof ReadableStream))throw new j(`Expected Response body to be a ReadableStream, but got ${String(a.body)}; Content Type is ${a.headers.get("Content-Type")}`,a);return a},Ue=async a=>Oe(a).then(async i=>{const n=await i.text();try{return JSON.parse(n)}catch{throw new Error(`Failed to parse response, response body: ${n}`)}});var Q=(a,i="http://localhost:5933/v1/")=>{const n=({applyTextNormalization:t,languageCode:s,nextRequestIds:v,nextText:u,previousRequestIds:c,previousText:b,pronunciationDictionaryLocators:x,seed:O,voiceSettings:U})=>({extraBody:M({applyTextNormalization:t,languageCode:s,nextRequestIds:v,nextText:u,previousRequestIds:c,previousText:b,pronunciationDictionaryLocators:x?x.map(B=>M(B)):void 0,seed:O,voiceSettings:M(U??{similarityBoost:.75,stability:.5})})});return A({speech:(t,s)=>({...s?n(s):{},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?n(t):{},apiKey:a,baseURL:i})})},Y=(a,i="http://localhost:5933/v1/")=>{const n=t=>{const{deploymentId:s,region:v,sampleRate:u}=t,c={deploymentId:s,region:v,sampleRate:u};return"disableSsml"in t?c.disableSsml=t.disableSsml:"lang"in t&&(c.lang=t.lang,c.gender=t.gender,c.voice=t.voice),{extraBody:M(c)}};return A({speech:(t,s)=>({...s?n(s):{},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?n(t):{},apiKey:a,baseURL:i})})},R=(a,i="http://localhost:5933/v1/")=>{const n=t=>{var v,u;const s={app:{appid:(v=t.app)==null?void 0:v.appId,token:a}};return typeof t.app<"u"&&(s.app={...t.app,appid:(u=t.app)==null?void 0:u.appId,token:a}),typeof t.user<"u"&&(s.user=t.user),typeof t.audio<"u"&&(s.audio=t.audio),{extraBody:M(s)}};return A({speech:(t,s)=>({...s?n(s):{},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?n(t):{},apiKey:a,baseURL:i})})},ee=(a,i="http://localhost:5933/v1/")=>{const n=t=>{const{sampleRate:s,volume:v,rate:u,pitch:c}=t,b={sampleRate:s,volume:v,rate:u,pitch:c};return Object.keys(b).forEach(x=>b[x]===void 0&&delete b[x]),{extraBody:M(b)}};return A({speech:(t,s)=>({...s?n(s):{},apiKey:a,baseURL:i,model:`alibaba/${t}`})},{voice:t=>{let s=i;return s.endsWith("v1/")?s=s.slice(0,-3):s.endsWith("v1")&&(s=s.slice(0,-2)),{query:"provider=alibaba",...t?n(t):{},apiKey:a,baseURL:s}}})},q=async a=>(a.fetch??globalThis.fetch)(Ce(a.query?`api/voices?${a.query}`:"api/voices",a.baseURL),{headers:Me({...a.headers},a.apiKey),method:"GET",signal:a.abortSignal}).then(Ue).then(({voices:i})=>i);const Se=[{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"}],je=ce("providers",()=>{const a=pe("settings/credentials/providers",{}),{t:i}=ue();async function n(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(o=>({id:o.id,name:o.name||o.id,provider:"openrouter-ai",description:o.description||"",contextLength:o.context_length,deprecated:!1}))}catch(r){throw console.error("Error fetching OpenRouter models:",r),r}}const l={"openrouter-ai":{id:"openrouter-ai",category:"chat",tasks:["text-generation"],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=>xe(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>n(e)},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},ollama:{id:"ollama",category:"chat",tasks:["text-generation"],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=>C(e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...C(e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"ollama",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.baseUrl}},"ollama-embedding":{id:"ollama-embedding",category:"embed",tasks:["text-feature-extraction"],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=>C(e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...C(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",category:"chat",tasks:["text-generation"],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=>C(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",category:"chat",tasks:["text-generation"],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=>K(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...K(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}},"openai-audio-speech":{id:"openai-audio-speech",category:"speech",tasks:["text-to-speech"],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=>K(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...K(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",category:"chat",tasks:["text-generation"],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=>be(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",category:"chat",tasks:["text-generation"],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=>V(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...V(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",category:"chat",tasks:["text-generation"],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=>Z(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...Z(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:{category:"chat",tasks:["text-generation"],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=>N(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...N(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",category:"speech",tasks:["text-to-speech"],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=>Q(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>Se.map(e=>({id:e.model_id,name:e.name,provider:"elevenlabs",description:e.description,contextLength:0,deprecated:!1})),listVoices:async e=>{const r=Q(e.apiKey.trim(),e.baseUrl.trim()),d=await q({...r.voice()}),o=d.findIndex(k=>k.name.includes("Aria")),p=d.findIndex(k=>k.name.includes("Bill")),$=o!==-1?o:0,I=p!==-1?p:d.length-1,F=Math.min($,I),L=Math.max($,I);return[...d.slice(0,F),...d.slice(L+1),...d.slice(F,L+1)].map(k=>({id:k.id,name:k.name,provider:"elevenlabs",previewURL:k.preview_audio_url,languages:k.languages}))}},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"microsoft-speech":{id:"microsoft-speech",category:"speech",tasks:["text-to-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=>Y(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=Y(e.apiKey.trim(),e.baseUrl.trim());return(await q({...r.voice({region:e.region})})).map(o=>{var p;return{id:o.id,name:o.name,provider:"microsoft-speech",previewURL:o.preview_audio_url,languages:o.languages,gender:(p=o.labels)==null?void 0:p.gender}})}},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"alibaba-cloud-model-studio":{id:"alibaba-cloud-model-studio",category:"speech",tasks:["text-to-speech"],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=>ee(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listVoices:async e=>{const r=ee(e.apiKey.trim(),e.baseUrl.trim());return(await q({...r.voice()})).map(o=>{var p;return{id:o.id,name:o.name,provider:"alibaba-cloud-model-studio",previewURL:o.preview_audio_url,languages:o.languages,gender:(p=o.labels)==null?void 0:p.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",category:"speech",tasks:["text-to-speech"],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=>R(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listVoices:async e=>{const r=R(e.apiKey.trim(),e.baseUrl.trim());return(await q({...r.voice()})).map(o=>{var p;return{id:o.id,name:o.name,provider:"volcano-engine",previewURL:o.preview_audio_url,languages:o.languages,gender:(p=o.labels)==null?void 0:p.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",category:"chat",tasks:["text-generation"],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=>X(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...X(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",category:"chat",tasks:["text-generation"],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=>J(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...J(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",category:"chat",tasks:["text-generation"],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=>D(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...D(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",category:"chat",tasks:["text-generation"],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=>K(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...K(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",category:"chat",tasks:["text-generation"],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=>Pe(e.apiKey.trim(),e.accountId),capabilities:{listModels:async()=>[]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.accountId}},"perplexity-ai":{id:"perplexity-ai",category:"chat",tasks:["text-generation"],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=>ke(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",category:"chat",tasks:["text-generation"],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=>W(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...W(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",category:"chat",tasks:["text-generation"],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=>H(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await _({...H(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 f(e){const r=a.value[e];if(!r)return!1;const d=l[e];return d?await d.validators.validateProviderConfig(r):!1}const t=E({});function s(e){var r;if(!a.value[e]){const d=l[e];a.value[e]={baseUrl:((r=d.defaultOptions)==null?void 0:r.baseUrl)||""}}}Object.keys(l).forEach(s);async function v(){await Promise.all(Object.keys(l).map(async e=>{t.value[e]=await f(e)}))}v(),ge(a,v,{deep:!0});const u=P(()=>Object.keys(l).filter(e=>t.value[e])),c=E({}),b=E({}),x=E({});async function O(e){const r=a.value[e];if(!r)return[];const d=l[e];if(!d)return[];b.value[e]=!0,x.value[e]=null;try{const o=d.capabilities.listModels?await d.capabilities.listModels(r):[];return c.value[e]=o.map(p=>({id:p.id,name:p.name,description:p.description,contextLength:p.contextLength,deprecated:p.deprecated,provider:e})),c.value[e]}catch(o){return console.error(`Error fetching models for ${e}:`,o),x.value[e]=o instanceof Error?o.message:"Unknown error",[]}finally{b.value[e]=!1}}function U(e){return c.value[e]||[]}const B=P(()=>{const e=[];for(const r of u.value)e.push(...c.value[r]||[]);return e});async function ae(){for(const e of u.value)l[e].capabilities.listModels&&await O(e)}function T(e){const r=l[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 S=P(()=>Object.values(l).map(e=>({...e,localizedName:i(e.nameKey,e.name),localizedDescription:i(e.descriptionKey,e.description),configured:t.value[e.id]||!1})));function ie(e){const r=a.value[e];if(!r)throw new Error(`Provider credentials for ${e} not found`);const d=l[e];if(!d)throw new Error(`Provider metadata for ${e} not found`);try{return d.createProvider(r)}catch(o){throw console.error(`Error creating provider instance for ${e}:`,o),o}}const re=P(()=>u.value.map(e=>T(e))),te=P(()=>S.value.filter(e=>e.category==="chat")),ne=P(()=>S.value.filter(e=>e.category==="speech")),se=P(()=>S.value.filter(e=>e.category==="transcription"));function oe(e){return a.value[e]}return{providers:a,getProviderConfig:oe,availableProviders:u,configuredProviders:t,providerMetadata:l,getProviderMetadata:T,allProvidersMetadata:S,initializeProvider:s,validateProvider:f,availableModels:c,isLoadingModels:b,modelLoadError:x,fetchModelsForProvider:O,getModelsForProvider:U,allAvailableModels:B,loadModelsForConfiguredProviders:ae,getProviderInstance:ie,availableProvidersMetadata:re,allChatProvidersMetadata:te,allAudioSpeechProvidersMetadata:ne,allAudioTranscriptionProvidersMetadata:se}});export{_ as l,je as u}; diff --git a/assets/queue-Bzd_iRYh.js b/assets/queue-CinxwIru.js similarity index 90% rename from assets/queue-Bzd_iRYh.js rename to assets/queue-CinxwIru.js index cb159aeee3fe1e3e44674aa84be3aa43c7776aa5..e0839c1b69eacf4745525dc8a0c7c60cec2f9466 100644 --- a/assets/queue-Bzd_iRYh.js +++ b/assets/queue-CinxwIru.js @@ -1 +1 @@ -import{u as o}from"./queue-C50Iq5oO.js";import{d as v,e as h,T as k,c as w,o as g,a as I}from"./index-WDP_Z4A8.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)}]}),c=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)}]}),l=["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 l)await i(100),c.add(e)}async function m(){f()}return k(()=>{m()}),(e,a)=>(g(),w("div",null,a[0]||(a[0]=[I("div",null,null,-1)])))}});export{Q as default}; +import{u as o}from"./queue-Dw-mTAT5.js";import{d as v,e as h,T as k,c as w,o as g,a as I}from"./index-8LjpXIG7.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)}]}),c=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)}]}),l=["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 l)await i(100),c.add(e)}async function m(){f()}return k(()=>{m()}),(e,a)=>(g(),w("div",null,a[0]||(a[0]=[I("div",null,null,-1)])))}});export{Q as default}; diff --git a/assets/queue-C50Iq5oO.js b/assets/queue-Dw-mTAT5.js similarity index 91% rename from assets/queue-C50Iq5oO.js rename to assets/queue-Dw-mTAT5.js index 6a2c3490a02099cdfb21b1a6b70b74f74fcb40f5..69cde229a7e421c2de9bed3e229fe610d1525bf7 100644 --- a/assets/queue-C50Iq5oO.js +++ b/assets/queue-Dw-mTAT5.js @@ -1 +1 @@ -import{e as l}from"./index-WDP_Z4A8.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 E(){const n=t.value.shift();if(n)return r("pick",n),n}async function u(){if(a.value)return;const n=E();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{e as l}from"./index-8LjpXIG7.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 E(){const n=t.value.shift();if(n)return r("pick",n),n}async function u(){if(a.value)return;const n=E();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-DBvSyUSC.js b/assets/queues-DNZJBdFi.js similarity index 94% rename from assets/queues-DBvSyUSC.js rename to assets/queues-DNZJBdFi.js index 8a9988a28e2eb9c1cffef37075ce03cda2465330..01116c33d2d40d3c52d79cbcffb6aa0ed33035e5 100644 --- a/assets/queues-DBvSyUSC.js +++ b/assets/queues-DNZJBdFi.js @@ -1 +1 @@ -import{c as i}from"./emotions-DWNSb738.js";import{u as s}from"./queue-C50Iq5oO.js";import{e as d}from"./index-WDP_Z4A8.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{c as i}from"./emotions-DWNSb738.js";import{u as s}from"./queue-Dw-mTAT5.js";import{e as d}from"./index-8LjpXIG7.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/settings-BZFpczgY.js b/assets/settings-u12G2c4h.js similarity index 97% rename from assets/settings-BZFpczgY.js rename to assets/settings-u12G2c4h.js index 80709f2fc8618faf1bc0a4839032f7c7dc5bf169..eefa7a1f867b14f30c0c09df82a904458807b0c0 100644 --- a/assets/settings-BZFpczgY.js +++ b/assets/settings-u12G2c4h.js @@ -1 +1 @@ -var rt=Object.defineProperty;var ot=(t,s,e)=>s in t?rt(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e;var m=(t,s,e)=>ot(t,typeof s!="symbol"?s+"":s,e);import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{r as D,w as b,u as A,e as g,f as B,i as at,g as lt,h as y,j as J,n as ut,k as V,l as M,p as l,m as $,q as O,s as S,t as v,v as ct,x as ft,y as pt,z as U,A as dt,B as mt,C as gt,D as ht,E as bt,F as yt,G as vt,H as xt,I as Tt,J as At,K as Ot,L as wt,M as kt,N as Bt,O as Et,P as St,Q as jt,S as Pt,d as Q,T as Vt,U as Ct,c as j,a as k,V as Nt,W,X as Rt,Y as X,o as P,Z as _,_ as Y,$ as Mt,a0 as zt,b as C,R as Dt}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as Lt}from"./providers-7GsMyC_3.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{H as Ft}from"./HeaderLink--5c4L7nq.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";const T={};class Ht{constructor(){m(this,"subscriptions",new Set)}add(s){return this.subscriptions.add(s),()=>this.subscriptions.delete(s)}notify(s,e,n){if(this.subscriptions.size)for(const i of this.subscriptions)i(s,e,n)}clear(){this.subscriptions.clear()}}function Z(t){return!Number.isNaN(Number.parseFloat(t))}class $t{constructor(s){m(this,"current");m(this,"prev");m(this,"timeDelta",0);m(this,"lastUpdated",0);m(this,"updateSubscribers",new Ht);m(this,"stopAnimation");m(this,"canTrackVelocity",!1);m(this,"updateAndNotify",s=>{this.prev=this.current,this.current=s;const{delta:e,timestamp:n}=pt();this.lastUpdated!==n&&(this.timeDelta=e,this.lastUpdated=n),U.postRender(this.scheduleVelocityCheck),this.updateSubscribers.notify(this.current)});m(this,"scheduleVelocityCheck",()=>U.postRender(this.velocityCheck));m(this,"velocityCheck",({timestamp:s})=>{this.canTrackVelocity||(this.canTrackVelocity=Z(this.current)),s!==this.lastUpdated&&(this.prev=this.current)});this.prev=this.current=s,this.canTrackVelocity=Z(this.current)}onChange(s){return this.updateSubscribers.add(s)}clearListeners(){this.updateSubscribers.clear()}set(s){this.updateAndNotify(s)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?dt(Number.parseFloat(this.current)-Number.parseFloat(this.prev),this.timeDelta):0}start(s){return this.stop(),new Promise(e=>{const{stop:n}=s(e);this.stopAnimation=n}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.stop()}}function Ut(t){return new $t(t)}const{isArray:Wt}=Array;function Xt(){const t=g({}),s=n=>{const i=r=>{t.value[r]&&(t.value[r].stop(),t.value[r].destroy(),delete t.value[r])};n?Wt(n)?n.forEach(i):i(n):Object.keys(t.value).forEach(i)},e=(n,i,r)=>{if(t.value[n])return t.value[n];const o=Ut(i);return o.onChange(a=>r[n]=a),t.value[n]=o,o};return jt(s),{motionValues:t,get:e,stop:s}}function Yt(t){return Array.isArray(t)}function w(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}}function N(t){return{type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}}function Zt(t){return{type:"spring",stiffness:550,damping:t===0?100:30,restDelta:.01,restSpeed:10}}function R(){return{type:"keyframes",ease:"linear",duration:300}}function It(t){return{type:"keyframes",duration:800,values:t}}const I={default:Zt,x:w,y:w,z:w,rotate:w,rotateX:w,rotateY:w,rotateZ:w,scaleX:N,scaleY:N,scale:N,backgroundColor:R,color:R,opacity:R};function tt(t,s){let e;return Yt(s)?e=It:e=I[t]||I.default,{to:s,...e(s)}}const K={...ut,transform:Math.round},et={color:v,backgroundColor:v,outlineColor:v,fill:v,stroke:v,borderColor:v,borderTopColor:v,borderRightColor:v,borderBottomColor:v,borderLeftColor:v,borderWidth:l,borderTopWidth:l,borderRightWidth:l,borderBottomWidth:l,borderLeftWidth:l,borderRadius:l,radius:l,borderTopLeftRadius:l,borderTopRightRadius:l,borderBottomRightRadius:l,borderBottomLeftRadius:l,width:l,maxWidth:l,height:l,maxHeight:l,size:l,top:l,right:l,bottom:l,left:l,padding:l,paddingTop:l,paddingRight:l,paddingBottom:l,paddingLeft:l,margin:l,marginTop:l,marginRight:l,marginBottom:l,marginLeft:l,rotate:O,rotateX:O,rotateY:O,rotateZ:O,scale:S,scaleX:S,scaleY:S,scaleZ:S,skew:O,skewX:O,skewY:O,distance:l,translateX:l,translateY:l,translateZ:l,x:l,y:l,z:l,perspective:l,transformPerspective:l,opacity:V,originX:$,originY:$,originZ:l,zIndex:K,filter:M,WebkitFilter:M,fillOpacity:V,strokeOpacity:V,numOctaves:K},L=t=>et[t];function z(t,s){return s&&typeof t=="number"&&s.transform?s.transform(t):t}function Kt(t,s){let e=L(t);return e!==M&&(e=J),e.getAnimatableNone?e.getAnimatableNone(s):void 0}const qt={linear:St,easeIn:Et,easeInOut:Bt,easeOut:kt,circIn:wt,circInOut:Ot,circOut:At,backIn:Tt,backInOut:xt,backOut:vt,anticipate:yt,bounceIn:bt,bounceInOut:ht,bounceOut:gt};function q(t){if(Array.isArray(t)){const[s,e,n,i]=t;return mt(s,e,n,i)}else if(typeof t=="string")return qt[t];return t}function Gt(t){return Array.isArray(t)&&typeof t[0]!="number"}function G(t,s){return t==="zIndex"?!1:!!(typeof s=="number"||Array.isArray(s)||typeof s=="string"&&J.test(s)&&!s.startsWith("url("))}function Jt(t){return Array.isArray(t.to)&&t.to[0]===null&&(t.to=[...t.to],t.to[0]=t.from),t}function Qt({ease:t,times:s,delay:e,...n}){const i={...n};return s&&(i.offset=s),t&&(i.ease=Gt(t)?t.map(q):q(t)),e&&(i.elapsed=-e),i}function _t(t,s,e){return Array.isArray(s.to)&&(t.duration||(t.duration=800)),Jt(s),te(t)||(t={...t,...tt(e,s.to)}),{...s,...Qt(t)}}function te({delay:t,repeat:s,repeatType:e,repeatDelay:n,from:i,...r}){return!!Object.keys(r).length}function ee(t,s){return t[s]||t.default||t}function se(t,s,e,n,i){const r=ee(n,t);let o=r.from===null||r.from===void 0?s.get():r.from;const a=G(t,e);o==="none"&&a&&typeof e=="string"&&(o=Kt(t,e));const c=G(t,o);function p(f){const d={from:o,to:e,velocity:n.velocity?n.velocity:s.getVelocity(),onUpdate:x=>s.set(x)};return r.type==="inertia"||r.type==="decay"?ct({...d,...r}):ft({..._t(r,d,t),onUpdate:x=>{d.onUpdate(x),r.onUpdate&&r.onUpdate(x)},onComplete:()=>{i&&i(),f&&f()}})}function u(f){return s.set(e),i&&i(),f&&f(),{stop:()=>{}}}return!c||!a||r.type===!1?u:p}function ie(){const{motionValues:t,stop:s,get:e}=Xt();return{motionValues:t,stop:s,push:(i,r,o,a={},c)=>{const p=o[i],u=e(i,p,o);if(a&&a.immediate){u.set(r);return}const f=se(i,u,r,a,c);u.start(f)}}}function ne(t,s={},{motionValues:e,push:n,stop:i}=ie()){const r=A(s),o=g(!1);b(e,f=>{o.value=Object.values(f).filter(d=>d.isAnimating()).length>0},{immediate:!0,deep:!0});const a=f=>{if(!r||!r[f])throw new Error(`The variant ${f} does not exist.`);return r[f]},c=f=>{typeof f=="string"&&(f=a(f));const d=Object.entries(f).map(([h,E])=>{if(h!=="transition")return new Promise(nt=>n(h,E,t,f.transition||tt(h,f[h]),nt))}).filter(Boolean);async function x(){var h,E;await Promise.all(d),(E=(h=f.transition)==null?void 0:h.onComplete)==null||E.call(h)}return Promise.all([x()])};return{isAnimating:o,apply:c,set:f=>{const d=at(f)?f:a(f);Object.entries(d).forEach(([x,h])=>{x!=="transition"&&n(x,h,t,{immediate:!0})})},leave:async f=>{let d;if(r&&(r.leave&&(d=r.leave),!r.leave&&r.initial&&(d=r.initial)),!d){f();return}await c(d),f()},stop:i}}const F=typeof window<"u",re=()=>F&&(window.onpointerdown===null||(T==null?void 0:T.TEST)),oe=()=>F&&(window.ontouchstart===null||(T==null?void 0:T.TEST)),ae=()=>F&&(window.onmousedown===null||(T==null?void 0:T.TEST));function le({target:t,state:s,variants:e,apply:n}){const i=A(e),r=g(!1),o=g(!1),a=g(!1),c=B(()=>{let u=[...Object.keys(s.value||{})];return i&&(i.hovered&&(u=[...u,...Object.keys(i.hovered)]),i.tapped&&(u=[...u,...Object.keys(i.tapped)]),i.focused&&(u=[...u,...Object.keys(i.focused)])),u}),p=B(()=>{const u={};Object.assign(u,s.value),r.value&&i.hovered&&Object.assign(u,i.hovered),o.value&&i.tapped&&Object.assign(u,i.tapped),a.value&&i.focused&&Object.assign(u,i.focused);for(const f in u)c.value.includes(f)||delete u[f];return u});i.hovered&&(y(t,"mouseenter",()=>r.value=!0),y(t,"mouseleave",()=>{r.value=!1,o.value=!1})),i.tapped&&(ae()&&(y(t,"mousedown",()=>o.value=!0),y(t,"mouseup",()=>o.value=!1)),re()&&(y(t,"pointerdown",()=>o.value=!0),y(t,"pointerup",()=>o.value=!1)),oe()&&(y(t,"touchstart",()=>o.value=!0),y(t,"touchend",()=>o.value=!1))),i.focused&&(y(t,"focus",()=>a.value=!0),y(t,"blur",()=>a.value=!1)),b([r,o,a],()=>{n(p.value)})}function ue({set:t,target:s,variants:e,variant:n}){const i=A(e);b(()=>s,()=>{i&&(i.initial&&(t("initial"),n.value="initial"),i.enter&&(n.value="enter"))},{immediate:!0,flush:"pre"})}function ce({state:t,apply:s}){b(t,e=>{e&&s(e)},{immediate:!0})}function fe({target:t,variants:s,variant:e}){const n=A(s);n&&(n.visible||n.visibleOnce)&<(t,([{isIntersecting:i}])=>{n.visible?i?e.value="visible":e.value="initial":n.visibleOnce&&(i&&e.value!=="visibleOnce"?e.value="visibleOnce":e.value||(e.value="initial"))})}function pe(t,s={syncVariants:!0,lifeCycleHooks:!0,visibilityHooks:!0,eventListeners:!0}){s.lifeCycleHooks&&ue(t),s.syncVariants&&ce(t),s.visibilityHooks&&fe(t),s.eventListeners&&le(t)}function de(t={}){const s=D({...t}),e=g({});return b(s,()=>{const n={};for(const[i,r]of Object.entries(s)){const o=L(i),a=z(r,o);n[i]=a}e.value=n},{immediate:!0,deep:!0}),{state:s,style:e}}function H(t,s){b(()=>Pt(t),e=>{e&&s(e)},{immediate:!0})}const me={x:"translateX",y:"translateY",z:"translateZ"};function ge(t={},s=!0){const e=D({...t}),n=g("");return b(e,i=>{let r="",o=!1;if(s&&(i.x||i.y||i.z)){const a=[i.x||0,i.y||0,i.z||0].map(c=>z(c,l)).join(",");r+=`translate3d(${a}) `,o=!0}for(const[a,c]of Object.entries(i)){if(s&&(a==="x"||a==="y"||a==="z"))continue;const p=L(a),u=z(c,p);r+=`${me[a]||a}(${u}) `}s&&!o&&(r+="translateZ(0px) "),n.value=r.trim()},{immediate:!0,deep:!0}),{state:e,transform:n}}const he=["","X","Y","Z"],be=["perspective","translate","scale","rotate","skew"],st=["transformPerspective","x","y","z"];be.forEach(t=>{he.forEach(s=>{const e=t+s;st.push(e)})});const ye=new Set(st);function it(t){return ye.has(t)}const ve=new Set(["originX","originY","originZ"]);function xe(t){return ve.has(t)}function Te(t,s){let e,n;const{state:i,style:r}=de();return H(t,o=>{n=o;for(const a of Object.keys(et))o.style[a]===null||o.style[a]===""||it(a)||xe(a)||(i[a]=o.style[a]);e&&Object.entries(e).forEach(([a,c])=>o.style[a]=c),s&&s(i)}),b(r,o=>{if(!n){e=o;return}for(const a in o)n.style[a]=o[a]},{immediate:!0}),{style:i}}function Ae(t){const s=t.trim().split(/\) |\)/);if(s.length===1)return{};const e=n=>n.endsWith("px")||n.endsWith("deg")?Number.parseFloat(n):Number.isNaN(Number(n))?Number(n):n;return s.reduce((n,i)=>{if(!i)return n;const[r,o]=i.split("("),c=o.split(",").map(u=>e(u.endsWith(")")?u.replace(")",""):u.trim())),p=c.length===1?c[0]:c;return{...n,[r]:p}},{})}function Oe(t,s){Object.entries(Ae(s)).forEach(([e,n])=>{const i=["x","y","z"];if(e==="translate3d"){if(n===0){i.forEach(r=>t[r]=0);return}n.forEach((r,o)=>t[i[o]]=r);return}if(n=Number.parseFloat(`${n}`),e==="translateX"){t.x=n;return}if(e==="translateY"){t.y=n;return}if(e==="translateZ"){t.z=n;return}t[e]=n})}function we(t,s){let e,n;const{state:i,transform:r}=ge();return H(t,o=>{n=o,o.style.transform&&Oe(i,o.style.transform),e&&(o.style.transform=e),s&&s(i)}),b(r,o=>{if(!n){e=o;return}n.style.transform=o},{immediate:!0}),{transform:i}}function ke(t){return Object.entries(t)}function Be(t,s){const e=D({}),n=o=>Object.entries(o).forEach(([a,c])=>e[a]=c),{style:i}=Te(t,n),{transform:r}=we(t,n);return b(e,o=>{ke(o).forEach(([a,c])=>{const p=it(a)?r:i;p[a]&&p[a]===c||(p[a]=c)})},{immediate:!0,deep:!0}),H(t,()=>s),{motionProperties:e,style:i,transform:r}}function Ee(t={}){const s=A(t),e=g();return{state:B(()=>{if(e.value)return s[e.value]}),variant:e}}function Se(t,s={},e){const{motionProperties:n}=Be(t),{variant:i,state:r}=Ee(s),o=ne(n,s),a={target:t,variant:i,variants:s,state:r,motionProperties:n,...o};return pe(a,e),a}const je={relative:""},Pe={key:0,absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},Ve={text:"neutral-300 dark:neutral-500","text-nowrap":""},Ce={"text-nowrap":"","text-3xl":"","font-semibold":""},Ne=Q({__name:"PageHeader",props:{title:null,subtitle:null,showBackButton:{type:Boolean,default:!0},disableBackButton:{type:Boolean,default:!1}},setup(t){const s=t,e=Nt(),n=_(),i=g(),r=g(s.title),o=g(s.subtitle),a=g(s.disableBackButton),{apply:c}=Se(i,{initial:{opacity:0,x:10,transition:{duration:250}},enter:{opacity:1,x:0,transition:{duration:250}},leave:{opacity:0,x:-5,transition:{duration:100}}});return Vt(async()=>{await c("initial"),await c("enter")}),Ct(async()=>{await c("leave"),a.value=!0}),b([()=>s.title,()=>s.subtitle,n],async()=>{await c("leave"),await Y(),a.value=s.disableBackButton,r.value=s.title,o.value=s.subtitle,await Y(),await c("initial"),await c("enter")}),(p,u)=>(P(),j("div",{ref_key:"pageHeaderRef",ref:i,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"},[k("button",{onClick:u[0]||(u[0]=f=>A(e).back())},[a.value?W("",!0):(P(),j("div",{key:0,"i-solar:alt-arrow-left-line-duotone":"","text-2xl":"",class:Rt({"pointer-events-none op-0":!t.showBackButton})},null,2))]),k("h1",je,[o.value?(P(),j("div",Pe,[k("span",Ve,X(o.value),1)])):W("",!0),k("div",Ce,X(r.value),1)])],512))}}),Re={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)"}},Me={class:"px-0 py-1 md:px-3 md:py-3","w-full":"","gap-2":"",bg:"$bg-color"},ze={class:"px-3 py-2 md:px-5 md:py-5",flex:"~ col","mx-auto":"","max-w-screen-xl":""},Ke=Q({__name:"settings",setup(t){const s=_(),{t:e}=Mt(),n=Lt(),{allProvidersMetadata:i}=zt(n),r=B(()=>{const a={"/settings/airi-card":{subtitle:e("settings.title"),title:e("settings.pages.card.title")},"/settings/appearance":{subtitle:e("settings.title"),title:e("settings.pages.themes.title")},"/settings/appearance/general":{subtitle:e("settings.title"),title:e("settings.pages.themes.general.title")},"/settings/appearance/color-scheme":{subtitle:e("settings.title"),title:e("settings.pages.themes.color-scheme.title")},"/settings/appearance/developer":{subtitle:e("settings.title"),title:e("settings.pages.themes.developer.title")},"/settings/memory":{subtitle:e("settings.title"),title:e("settings.pages.memory.title")},"/settings/models":{subtitle:e("settings.title"),title:e("settings.pages.models.title")},"/settings/modules":{subtitle:e("settings.title"),title:e("settings.pages.modules.title")},"/settings/modules/consciousness":{subtitle:e("settings.title"),title:e("settings.pages.modules.consciousness.title")},"/settings/modules/speech":{subtitle:e("settings.title"),title:e("settings.pages.modules.speech.title")},"/settings/modules/hearing":{subtitle:e("settings.title"),title:e("settings.pages.modules.hearing.title")},"/settings/modules/memory-short-term":{subtitle:e("settings.title"),title:e("settings.pages.modules.memory-short-term.title")},"/settings/modules/memory-long-term":{subtitle:e("settings.title"),title:e("settings.pages.modules.memory-long-term.title")},"/settings/modules/messaging-discord":{subtitle:e("settings.title"),title:e("settings.pages.modules.messaging-discord.title")},"/settings/modules/x":{subtitle:e("settings.title"),title:e("settings.pages.modules.x.title")},"/settings/modules/gaming-minecraft":{subtitle:e("settings.title"),title:e("settings.pages.modules.gaming-minecraft.title")},"/settings/modules/gaming-factorio":{subtitle:e("settings.title"),title:e("settings.pages.modules.gaming-factorio.title")},"/settings/providers":{subtitle:e("settings.title"),title:e("settings.pages.providers.title")},"/settings/scene":{subtitle:e("settings.title"),title:e("settings.pages.scene.title")},"/settings":{title:e("settings.title")}};for(const c of i.value)a[`/settings/providers/${c.id}`]={subtitle:e("settings.title"),title:e(c.nameKey)};return a}),o=B(()=>r.value[s.path]);return(a,c)=>{var p,u;return P(),j("div",Re,[k("div",Me,[C(Ft)]),k("div",ze,[C(A(Ne),{title:(p=o.value)==null?void 0:p.title,subtitle:(u=o.value)==null?void 0:u.subtitle},null,8,["title","subtitle"]),C(A(Dt))])])}}});export{Ke as default}; +var rt=Object.defineProperty;var ot=(t,s,e)=>s in t?rt(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e;var m=(t,s,e)=>ot(t,typeof s!="symbol"?s+"":s,e);import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import{r as D,w as b,u as A,e as g,f as B,i as at,g as lt,h as y,j as J,n as ut,k as V,l as M,p as l,m as $,q as O,s as S,t as v,v as ct,x as ft,y as pt,z as U,A as dt,B as mt,C as gt,D as ht,E as bt,F as yt,G as vt,H as xt,I as Tt,J as At,K as Ot,L as wt,M as kt,N as Bt,O as Et,P as St,Q as jt,S as Pt,d as Q,T as Vt,U as Ct,c as j,a as k,V as Nt,W,X as Rt,Y as X,o as P,Z as _,_ as Y,$ as Mt,a0 as zt,b as C,R as Dt}from"./index-8LjpXIG7.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{u as Lt}from"./providers-Dhn8Iy_2.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{H as Ft}from"./HeaderLink-Ct9jmG8_.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";const T={};class Ht{constructor(){m(this,"subscriptions",new Set)}add(s){return this.subscriptions.add(s),()=>this.subscriptions.delete(s)}notify(s,e,n){if(this.subscriptions.size)for(const i of this.subscriptions)i(s,e,n)}clear(){this.subscriptions.clear()}}function Z(t){return!Number.isNaN(Number.parseFloat(t))}class $t{constructor(s){m(this,"current");m(this,"prev");m(this,"timeDelta",0);m(this,"lastUpdated",0);m(this,"updateSubscribers",new Ht);m(this,"stopAnimation");m(this,"canTrackVelocity",!1);m(this,"updateAndNotify",s=>{this.prev=this.current,this.current=s;const{delta:e,timestamp:n}=pt();this.lastUpdated!==n&&(this.timeDelta=e,this.lastUpdated=n),U.postRender(this.scheduleVelocityCheck),this.updateSubscribers.notify(this.current)});m(this,"scheduleVelocityCheck",()=>U.postRender(this.velocityCheck));m(this,"velocityCheck",({timestamp:s})=>{this.canTrackVelocity||(this.canTrackVelocity=Z(this.current)),s!==this.lastUpdated&&(this.prev=this.current)});this.prev=this.current=s,this.canTrackVelocity=Z(this.current)}onChange(s){return this.updateSubscribers.add(s)}clearListeners(){this.updateSubscribers.clear()}set(s){this.updateAndNotify(s)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?dt(Number.parseFloat(this.current)-Number.parseFloat(this.prev),this.timeDelta):0}start(s){return this.stop(),new Promise(e=>{const{stop:n}=s(e);this.stopAnimation=n}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.stop()}}function Ut(t){return new $t(t)}const{isArray:Wt}=Array;function Xt(){const t=g({}),s=n=>{const i=r=>{t.value[r]&&(t.value[r].stop(),t.value[r].destroy(),delete t.value[r])};n?Wt(n)?n.forEach(i):i(n):Object.keys(t.value).forEach(i)},e=(n,i,r)=>{if(t.value[n])return t.value[n];const o=Ut(i);return o.onChange(a=>r[n]=a),t.value[n]=o,o};return jt(s),{motionValues:t,get:e,stop:s}}function Yt(t){return Array.isArray(t)}function w(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}}function N(t){return{type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}}function Zt(t){return{type:"spring",stiffness:550,damping:t===0?100:30,restDelta:.01,restSpeed:10}}function R(){return{type:"keyframes",ease:"linear",duration:300}}function It(t){return{type:"keyframes",duration:800,values:t}}const I={default:Zt,x:w,y:w,z:w,rotate:w,rotateX:w,rotateY:w,rotateZ:w,scaleX:N,scaleY:N,scale:N,backgroundColor:R,color:R,opacity:R};function tt(t,s){let e;return Yt(s)?e=It:e=I[t]||I.default,{to:s,...e(s)}}const K={...ut,transform:Math.round},et={color:v,backgroundColor:v,outlineColor:v,fill:v,stroke:v,borderColor:v,borderTopColor:v,borderRightColor:v,borderBottomColor:v,borderLeftColor:v,borderWidth:l,borderTopWidth:l,borderRightWidth:l,borderBottomWidth:l,borderLeftWidth:l,borderRadius:l,radius:l,borderTopLeftRadius:l,borderTopRightRadius:l,borderBottomRightRadius:l,borderBottomLeftRadius:l,width:l,maxWidth:l,height:l,maxHeight:l,size:l,top:l,right:l,bottom:l,left:l,padding:l,paddingTop:l,paddingRight:l,paddingBottom:l,paddingLeft:l,margin:l,marginTop:l,marginRight:l,marginBottom:l,marginLeft:l,rotate:O,rotateX:O,rotateY:O,rotateZ:O,scale:S,scaleX:S,scaleY:S,scaleZ:S,skew:O,skewX:O,skewY:O,distance:l,translateX:l,translateY:l,translateZ:l,x:l,y:l,z:l,perspective:l,transformPerspective:l,opacity:V,originX:$,originY:$,originZ:l,zIndex:K,filter:M,WebkitFilter:M,fillOpacity:V,strokeOpacity:V,numOctaves:K},L=t=>et[t];function z(t,s){return s&&typeof t=="number"&&s.transform?s.transform(t):t}function Kt(t,s){let e=L(t);return e!==M&&(e=J),e.getAnimatableNone?e.getAnimatableNone(s):void 0}const qt={linear:St,easeIn:Et,easeInOut:Bt,easeOut:kt,circIn:wt,circInOut:Ot,circOut:At,backIn:Tt,backInOut:xt,backOut:vt,anticipate:yt,bounceIn:bt,bounceInOut:ht,bounceOut:gt};function q(t){if(Array.isArray(t)){const[s,e,n,i]=t;return mt(s,e,n,i)}else if(typeof t=="string")return qt[t];return t}function Gt(t){return Array.isArray(t)&&typeof t[0]!="number"}function G(t,s){return t==="zIndex"?!1:!!(typeof s=="number"||Array.isArray(s)||typeof s=="string"&&J.test(s)&&!s.startsWith("url("))}function Jt(t){return Array.isArray(t.to)&&t.to[0]===null&&(t.to=[...t.to],t.to[0]=t.from),t}function Qt({ease:t,times:s,delay:e,...n}){const i={...n};return s&&(i.offset=s),t&&(i.ease=Gt(t)?t.map(q):q(t)),e&&(i.elapsed=-e),i}function _t(t,s,e){return Array.isArray(s.to)&&(t.duration||(t.duration=800)),Jt(s),te(t)||(t={...t,...tt(e,s.to)}),{...s,...Qt(t)}}function te({delay:t,repeat:s,repeatType:e,repeatDelay:n,from:i,...r}){return!!Object.keys(r).length}function ee(t,s){return t[s]||t.default||t}function se(t,s,e,n,i){const r=ee(n,t);let o=r.from===null||r.from===void 0?s.get():r.from;const a=G(t,e);o==="none"&&a&&typeof e=="string"&&(o=Kt(t,e));const c=G(t,o);function p(f){const d={from:o,to:e,velocity:n.velocity?n.velocity:s.getVelocity(),onUpdate:x=>s.set(x)};return r.type==="inertia"||r.type==="decay"?ct({...d,...r}):ft({..._t(r,d,t),onUpdate:x=>{d.onUpdate(x),r.onUpdate&&r.onUpdate(x)},onComplete:()=>{i&&i(),f&&f()}})}function u(f){return s.set(e),i&&i(),f&&f(),{stop:()=>{}}}return!c||!a||r.type===!1?u:p}function ie(){const{motionValues:t,stop:s,get:e}=Xt();return{motionValues:t,stop:s,push:(i,r,o,a={},c)=>{const p=o[i],u=e(i,p,o);if(a&&a.immediate){u.set(r);return}const f=se(i,u,r,a,c);u.start(f)}}}function ne(t,s={},{motionValues:e,push:n,stop:i}=ie()){const r=A(s),o=g(!1);b(e,f=>{o.value=Object.values(f).filter(d=>d.isAnimating()).length>0},{immediate:!0,deep:!0});const a=f=>{if(!r||!r[f])throw new Error(`The variant ${f} does not exist.`);return r[f]},c=f=>{typeof f=="string"&&(f=a(f));const d=Object.entries(f).map(([h,E])=>{if(h!=="transition")return new Promise(nt=>n(h,E,t,f.transition||tt(h,f[h]),nt))}).filter(Boolean);async function x(){var h,E;await Promise.all(d),(E=(h=f.transition)==null?void 0:h.onComplete)==null||E.call(h)}return Promise.all([x()])};return{isAnimating:o,apply:c,set:f=>{const d=at(f)?f:a(f);Object.entries(d).forEach(([x,h])=>{x!=="transition"&&n(x,h,t,{immediate:!0})})},leave:async f=>{let d;if(r&&(r.leave&&(d=r.leave),!r.leave&&r.initial&&(d=r.initial)),!d){f();return}await c(d),f()},stop:i}}const F=typeof window<"u",re=()=>F&&(window.onpointerdown===null||(T==null?void 0:T.TEST)),oe=()=>F&&(window.ontouchstart===null||(T==null?void 0:T.TEST)),ae=()=>F&&(window.onmousedown===null||(T==null?void 0:T.TEST));function le({target:t,state:s,variants:e,apply:n}){const i=A(e),r=g(!1),o=g(!1),a=g(!1),c=B(()=>{let u=[...Object.keys(s.value||{})];return i&&(i.hovered&&(u=[...u,...Object.keys(i.hovered)]),i.tapped&&(u=[...u,...Object.keys(i.tapped)]),i.focused&&(u=[...u,...Object.keys(i.focused)])),u}),p=B(()=>{const u={};Object.assign(u,s.value),r.value&&i.hovered&&Object.assign(u,i.hovered),o.value&&i.tapped&&Object.assign(u,i.tapped),a.value&&i.focused&&Object.assign(u,i.focused);for(const f in u)c.value.includes(f)||delete u[f];return u});i.hovered&&(y(t,"mouseenter",()=>r.value=!0),y(t,"mouseleave",()=>{r.value=!1,o.value=!1})),i.tapped&&(ae()&&(y(t,"mousedown",()=>o.value=!0),y(t,"mouseup",()=>o.value=!1)),re()&&(y(t,"pointerdown",()=>o.value=!0),y(t,"pointerup",()=>o.value=!1)),oe()&&(y(t,"touchstart",()=>o.value=!0),y(t,"touchend",()=>o.value=!1))),i.focused&&(y(t,"focus",()=>a.value=!0),y(t,"blur",()=>a.value=!1)),b([r,o,a],()=>{n(p.value)})}function ue({set:t,target:s,variants:e,variant:n}){const i=A(e);b(()=>s,()=>{i&&(i.initial&&(t("initial"),n.value="initial"),i.enter&&(n.value="enter"))},{immediate:!0,flush:"pre"})}function ce({state:t,apply:s}){b(t,e=>{e&&s(e)},{immediate:!0})}function fe({target:t,variants:s,variant:e}){const n=A(s);n&&(n.visible||n.visibleOnce)&<(t,([{isIntersecting:i}])=>{n.visible?i?e.value="visible":e.value="initial":n.visibleOnce&&(i&&e.value!=="visibleOnce"?e.value="visibleOnce":e.value||(e.value="initial"))})}function pe(t,s={syncVariants:!0,lifeCycleHooks:!0,visibilityHooks:!0,eventListeners:!0}){s.lifeCycleHooks&&ue(t),s.syncVariants&&ce(t),s.visibilityHooks&&fe(t),s.eventListeners&&le(t)}function de(t={}){const s=D({...t}),e=g({});return b(s,()=>{const n={};for(const[i,r]of Object.entries(s)){const o=L(i),a=z(r,o);n[i]=a}e.value=n},{immediate:!0,deep:!0}),{state:s,style:e}}function H(t,s){b(()=>Pt(t),e=>{e&&s(e)},{immediate:!0})}const me={x:"translateX",y:"translateY",z:"translateZ"};function ge(t={},s=!0){const e=D({...t}),n=g("");return b(e,i=>{let r="",o=!1;if(s&&(i.x||i.y||i.z)){const a=[i.x||0,i.y||0,i.z||0].map(c=>z(c,l)).join(",");r+=`translate3d(${a}) `,o=!0}for(const[a,c]of Object.entries(i)){if(s&&(a==="x"||a==="y"||a==="z"))continue;const p=L(a),u=z(c,p);r+=`${me[a]||a}(${u}) `}s&&!o&&(r+="translateZ(0px) "),n.value=r.trim()},{immediate:!0,deep:!0}),{state:e,transform:n}}const he=["","X","Y","Z"],be=["perspective","translate","scale","rotate","skew"],st=["transformPerspective","x","y","z"];be.forEach(t=>{he.forEach(s=>{const e=t+s;st.push(e)})});const ye=new Set(st);function it(t){return ye.has(t)}const ve=new Set(["originX","originY","originZ"]);function xe(t){return ve.has(t)}function Te(t,s){let e,n;const{state:i,style:r}=de();return H(t,o=>{n=o;for(const a of Object.keys(et))o.style[a]===null||o.style[a]===""||it(a)||xe(a)||(i[a]=o.style[a]);e&&Object.entries(e).forEach(([a,c])=>o.style[a]=c),s&&s(i)}),b(r,o=>{if(!n){e=o;return}for(const a in o)n.style[a]=o[a]},{immediate:!0}),{style:i}}function Ae(t){const s=t.trim().split(/\) |\)/);if(s.length===1)return{};const e=n=>n.endsWith("px")||n.endsWith("deg")?Number.parseFloat(n):Number.isNaN(Number(n))?Number(n):n;return s.reduce((n,i)=>{if(!i)return n;const[r,o]=i.split("("),c=o.split(",").map(u=>e(u.endsWith(")")?u.replace(")",""):u.trim())),p=c.length===1?c[0]:c;return{...n,[r]:p}},{})}function Oe(t,s){Object.entries(Ae(s)).forEach(([e,n])=>{const i=["x","y","z"];if(e==="translate3d"){if(n===0){i.forEach(r=>t[r]=0);return}n.forEach((r,o)=>t[i[o]]=r);return}if(n=Number.parseFloat(`${n}`),e==="translateX"){t.x=n;return}if(e==="translateY"){t.y=n;return}if(e==="translateZ"){t.z=n;return}t[e]=n})}function we(t,s){let e,n;const{state:i,transform:r}=ge();return H(t,o=>{n=o,o.style.transform&&Oe(i,o.style.transform),e&&(o.style.transform=e),s&&s(i)}),b(r,o=>{if(!n){e=o;return}n.style.transform=o},{immediate:!0}),{transform:i}}function ke(t){return Object.entries(t)}function Be(t,s){const e=D({}),n=o=>Object.entries(o).forEach(([a,c])=>e[a]=c),{style:i}=Te(t,n),{transform:r}=we(t,n);return b(e,o=>{ke(o).forEach(([a,c])=>{const p=it(a)?r:i;p[a]&&p[a]===c||(p[a]=c)})},{immediate:!0,deep:!0}),H(t,()=>s),{motionProperties:e,style:i,transform:r}}function Ee(t={}){const s=A(t),e=g();return{state:B(()=>{if(e.value)return s[e.value]}),variant:e}}function Se(t,s={},e){const{motionProperties:n}=Be(t),{variant:i,state:r}=Ee(s),o=ne(n,s),a={target:t,variant:i,variants:s,state:r,motionProperties:n,...o};return pe(a,e),a}const je={relative:""},Pe={key:0,absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},Ve={text:"neutral-300 dark:neutral-500","text-nowrap":""},Ce={"text-nowrap":"","text-3xl":"","font-semibold":""},Ne=Q({__name:"PageHeader",props:{title:null,subtitle:null,showBackButton:{type:Boolean,default:!0},disableBackButton:{type:Boolean,default:!1}},setup(t){const s=t,e=Nt(),n=_(),i=g(),r=g(s.title),o=g(s.subtitle),a=g(s.disableBackButton),{apply:c}=Se(i,{initial:{opacity:0,x:10,transition:{duration:250}},enter:{opacity:1,x:0,transition:{duration:250}},leave:{opacity:0,x:-5,transition:{duration:100}}});return Vt(async()=>{await c("initial"),await c("enter")}),Ct(async()=>{await c("leave"),a.value=!0}),b([()=>s.title,()=>s.subtitle,n],async()=>{await c("leave"),await Y(),a.value=s.disableBackButton,r.value=s.title,o.value=s.subtitle,await Y(),await c("initial"),await c("enter")}),(p,u)=>(P(),j("div",{ref_key:"pageHeaderRef",ref:i,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"},[k("button",{onClick:u[0]||(u[0]=f=>A(e).back())},[a.value?W("",!0):(P(),j("div",{key:0,"i-solar:alt-arrow-left-line-duotone":"","text-2xl":"",class:Rt({"pointer-events-none op-0":!t.showBackButton})},null,2))]),k("h1",je,[o.value?(P(),j("div",Pe,[k("span",Ve,X(o.value),1)])):W("",!0),k("div",Ce,X(r.value),1)])],512))}}),Re={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)"}},Me={class:"px-0 py-1 md:px-3 md:py-3","w-full":"","gap-2":"",bg:"$bg-color"},ze={class:"px-3 py-2 md:px-5 md:py-5",flex:"~ col","mx-auto":"","max-w-screen-xl":""},Ke=Q({__name:"settings",setup(t){const s=_(),{t:e}=Mt(),n=Lt(),{allProvidersMetadata:i}=zt(n),r=B(()=>{const a={"/settings/airi-card":{subtitle:e("settings.title"),title:e("settings.pages.card.title")},"/settings/appearance":{subtitle:e("settings.title"),title:e("settings.pages.themes.title")},"/settings/appearance/general":{subtitle:e("settings.title"),title:e("settings.pages.themes.general.title")},"/settings/appearance/color-scheme":{subtitle:e("settings.title"),title:e("settings.pages.themes.color-scheme.title")},"/settings/appearance/developer":{subtitle:e("settings.title"),title:e("settings.pages.themes.developer.title")},"/settings/memory":{subtitle:e("settings.title"),title:e("settings.pages.memory.title")},"/settings/models":{subtitle:e("settings.title"),title:e("settings.pages.models.title")},"/settings/modules":{subtitle:e("settings.title"),title:e("settings.pages.modules.title")},"/settings/modules/consciousness":{subtitle:e("settings.title"),title:e("settings.pages.modules.consciousness.title")},"/settings/modules/speech":{subtitle:e("settings.title"),title:e("settings.pages.modules.speech.title")},"/settings/modules/hearing":{subtitle:e("settings.title"),title:e("settings.pages.modules.hearing.title")},"/settings/modules/memory-short-term":{subtitle:e("settings.title"),title:e("settings.pages.modules.memory-short-term.title")},"/settings/modules/memory-long-term":{subtitle:e("settings.title"),title:e("settings.pages.modules.memory-long-term.title")},"/settings/modules/messaging-discord":{subtitle:e("settings.title"),title:e("settings.pages.modules.messaging-discord.title")},"/settings/modules/x":{subtitle:e("settings.title"),title:e("settings.pages.modules.x.title")},"/settings/modules/gaming-minecraft":{subtitle:e("settings.title"),title:e("settings.pages.modules.gaming-minecraft.title")},"/settings/modules/gaming-factorio":{subtitle:e("settings.title"),title:e("settings.pages.modules.gaming-factorio.title")},"/settings/providers":{subtitle:e("settings.title"),title:e("settings.pages.providers.title")},"/settings/scene":{subtitle:e("settings.title"),title:e("settings.pages.scene.title")},"/settings":{title:e("settings.title")}};for(const c of i.value)a[`/settings/providers/${c.id}`]={subtitle:e("settings.title"),title:e(c.nameKey)};return a}),o=B(()=>r.value[s.path]);return(a,c)=>{var p,u;return P(),j("div",Re,[k("div",Me,[C(Ft)]),k("div",ze,[C(A(Ne),{title:(p=o.value)==null?void 0:p.title,subtitle:(u=o.value)==null?void 0:u.subtitle},null,8,["title","subtitle"]),C(A(Dt))])])}}});export{Ke as default}; diff --git a/assets/speech-DRmXCXwq.js b/assets/speech-BUPJbslH.js similarity index 98% rename from assets/speech-DRmXCXwq.js rename to assets/speech-BUPJbslH.js index 691ef54919bec5aa36949458a342a58b5e0d7167..a2ecfbd00af4b7d40bfe06b4761de3024453a925 100644 --- a/assets/speech-DRmXCXwq.js +++ b/assets/speech-BUPJbslH.js @@ -1,2 +1,2 @@ -import{a4 as te,cc as g,e as b,f as p,w as P,T as re}from"./index-WDP_Z4A8.js";import{r as ne,a as ae,b as oe,d as se}from"./index-LHmcipjy.js";import{u as ce}from"./providers-7GsMyC_3.js";const ie=/["&'<>`]/g,ue=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,le=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,de=/[|\\{}()[\]^$+*?.]/g,U=new WeakMap;function D(e,t){if(e=e.replace(t.subset?me(t.subset):ie,n),t.subset||t.escapeOnly)return e;return e.replace(ue,r).replace(le,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 me(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:"€"},be=["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 Se=/[^\dA-Za-z]/;function xe(e,t,r,n){const a=String.fromCharCode(e);if(j.call(L,a)){const s=L[a],l="&"+s;return r&&ye.includes(s)&&!be.includes(s)&&(!n||t&&t!==61&&Se.test(String.fromCharCode(t)))?l:l+";"}return""}function Ee(e,t,r){let n=pe(e,t,r.omitOptionalSemicolons),a;if((r.useNamedReferences||r.useShortestReferences)&&(a=xe(e,t,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!a)&&r.useShortestReferences){const s=ve(e,t,r.omitOptionalSemicolons);s.length(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()),qe=/[\u0000-\u0008\u000B\u000C\u000E-\u001F]/g;function y(e,t,r){const n=Pe(e);return r?n.replace(r,a):a(n);function a(s){return Ae(s,{subset:t})}}function Pe(e){return String(e||"").replace(qe,"")}const Ce=/]]>/g,Te=[">"];function Le(e){return""}function Me(e){return""}const Re=[" ",` +import{a4 as te,cc as g,e as b,f as p,w as P,T as re}from"./index-8LjpXIG7.js";import{r as ne,a as ae,b as oe,d as se}from"./index-LHmcipjy.js";import{u as ce}from"./providers-Dhn8Iy_2.js";const ie=/["&'<>`]/g,ue=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,le=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,de=/[|\\{}()[\]^$+*?.]/g,U=new WeakMap;function D(e,t){if(e=e.replace(t.subset?me(t.subset):ie,n),t.subset||t.escapeOnly)return e;return e.replace(ue,r).replace(le,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 me(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:"€"},be=["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 Se=/[^\dA-Za-z]/;function xe(e,t,r,n){const a=String.fromCharCode(e);if(j.call(L,a)){const s=L[a],l="&"+s;return r&&ye.includes(s)&&!be.includes(s)&&(!n||t&&t!==61&&Se.test(String.fromCharCode(t)))?l:l+";"}return""}function Ee(e,t,r){let n=pe(e,t,r.omitOptionalSemicolons),a;if((r.useNamedReferences||r.useShortestReferences)&&(a=xe(e,t,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!a)&&r.useShortestReferences){const s=ve(e,t,r.omitOptionalSemicolons);s.length(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()),qe=/[\u0000-\u0008\u000B\u000C\u000E-\u001F]/g;function y(e,t,r){const n=Pe(e);return r?n.replace(r,a):a(n);function a(s){return Ae(s,{subset:t})}}function Pe(e){return String(e||"").replace(qe,"")}const Ce=/]]>/g,Te=[">"];function Le(e){return""}function Me(e){return""}const Re=[" ",` `," ",'"',"&","'","/","<","=",">"];function x(e){return y(e,Re)}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 f=a[h];f!=null&&l.push(x(h)+"="+M(f,t))}return"<"+r+(l.length===0?"":" "+l.join(" "))+(s?(t.options.tightClose?"":" ")+"/":"")+">"+n+(s?"":"")}const Ne=/\?>/g,De=[">"];function je(e){const t=x(e.name)||"x",r=y(e.value,De,Ne);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,N={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(N,r))throw new Error("Cannot compile unknown node `"+r+"`");const n=N[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=g("settings/speech/active-provider",""),r=g("settings/speech/active-model","eleven_multilingual_v2"),n=g("settings/speech/voice",""),a=b(),s=g("settings/speech/pitch",0),l=g("settings/speech/rate",1),h=g("settings/speech/ssml-enabled",!1),f=b(!1),E=b(null),v=b({}),B=g("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[];f.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{f.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 Oe({...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:f,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,Oe as g,_e as s,Ke as u}; diff --git a/assets/speech-BnaLJ2Rn.js b/assets/speech-DlPfM_Ny.js similarity index 96% rename from assets/speech-BnaLJ2Rn.js rename to assets/speech-DlPfM_Ny.js index f1e75472071de613fbe00b58355396caf927bae1..2c203f28322717b60808e393c2d33483a8d49467 100644 --- a/assets/speech-BnaLJ2Rn.js +++ b/assets/speech-DlPfM_Ny.js @@ -1 +1 @@ -import{d as D,e as V,T as ae,w as K,bh as re,c as u,o as i,c6 as H,c7 as W,a as e,a3 as ve,X as $,cf as X,cg as G,bm as Q,c9 as me,W as U,Y as y,b as S,u as t,bl as I,c2 as Z,f as pe,cJ as fe,cd as ne,bk as Y,$ as ge,a0 as te,U as xe,c5 as he,c3 as be,bI as F,cl as ye}from"./index-WDP_Z4A8.js";import{_ as se,a as le,b as ke}from"./FieldRange.vue_vue_type_script_setup_true_lang-BubMLR-2.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as we}from"./providers-7GsMyC_3.js";import{u as _e,g as Se}from"./speech-DRmXCXwq.js";import{_ as Ve}from"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as Me}from"./Textarea.vue_vue_type_script_setup_true_lang-Bht7lS1m.js";import{R as Ce,a as $e}from"./RadioCardSimple-BzEaEqwF.js";import{_ as Ue}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import{_ as Pe}from"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";import{b as oe}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Basic.vue_vue_type_script_setup_true_lang-COgaiUVw.js";const Le=D({__name:"AudioSpectrum",props:{stream:null,bars:{default:32},minFreq:{default:60},maxFreq:{default:4e3}},setup(l){const o=l,g=V(Array.from({length:o.bars}).fill(0));ae(()=>{m()}),K(()=>o.stream,()=>{m()});function m(){if(!o.stream)return;const c=new(window.AudioContext||window.webkitAudioContext),f=c.createMediaStreamSource(o.stream),v=c.createAnalyser();v.fftSize=2048,f.connect(v);const h=v.frequencyBinCount,M=new Uint8Array(h),p=c.sampleRate/v.fftSize,k=Math.floor(o.minFreq/p),P=Math.floor(o.maxFreq/p),q=P-k,T=Math.floor(q/o.bars),E=()=>{try{requestAnimationFrame(E),v.getByteFrequencyData(M);const R=Array.from({length:o.bars}).fill(0);for(let z=0;zre(c.$slots,"default",{frequencies:g.value})}}),qe={"h-full":"",flex:"","items-center":"","gap-1":""},Re=5,Te=D({__name:"AudioSpectrumVisualizer",props:{frequencies:null,barsClass:null},setup(l){const o=l;function g(c,f){return .1+(1-.1)*(c/f)}function m(c,f){const v=g(f,o.frequencies.length);return Math.min(100,Math.max(10,c*100*Re*v))}return(c,f)=>(i(),u("div",qe,[(i(!0),u(H,null,W(l.frequencies,(v,h)=>(i(),u("div",{key:h,"h-full":"",flex:"","flex-1":"","items-end":""},[e("div",{transition:"all 100 ease-in-out","mx-auto":"","my-0":"","w-full":"","rounded-full":"",class:$(l.barsClass),style:ve({height:`${m(v,h)}%`})},null,6)]))),128))]))}}),Ae={class:"p-3"},Ee={class:"flex items-start"},ze=["checked","name","value"],Be={class:"relative mr-3 mt-0.5 flex-shrink-0"},Fe={key:0,class:"i-solar:pause-circle-bold-duotone text-xl text-neutral-400 dark:text-neutral-500"},Ie={key:1,class:"i-solar:play-circle-bold-duotone text-xl text-neutral-400 dark:text-neutral-500"},Ne={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"},De={class:"flex-1 cursor-pointer"},je={class:"flex items-center"},Oe={key:0,class:"mt-1 flex flex-wrap gap-1"},Qe={key:1,class:"mt-3"},He={relative:""},Je={key:0,class:"h-16 px-3 pb-2"},Ye=D({__name:"VoiceCard",props:X({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:X(["togglePlayback"],["update:voice-id","update:custom-voice-name"]),setup(l,{emit:o}){const g=l,m=o,c=G(l,"voice-id"),f=G(l,"custom-voice-name");function v(b){return b.previewURL||b.preview_audio_url}function h(b){var k,P,q;const p=[];if((k=b.labels)!=null&&k.gender&&p.push(b.labels.gender),(P=b.labels)!=null&&P.age&&p.push(b.labels.age),(q=b.labels)!=null&&q.accent&&p.push(b.labels.accent),b.languages&&b.languages.length>0){const T=b.languages.map(E=>E.name).join(", ");p.push(T)}return p}function M(){m("togglePlayback",g.voice)}return(b,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",Ae,[e("div",Ee,[Q(e("input",{"onUpdate:modelValue":p[0]||(p[0]=k=>c.value=k),checked:c.value===g.voice.id,type:"radio",name:l.name,value:g.voice.id,class:"absolute cursor-pointer opacity-0"},null,8,ze),[[me,c.value]]),e("div",Be,[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(l.voice)?(i(),u("button",{key:0,absolute:"","right-0":"",top:"0","z-3":"",class:$(["translate-x-[-50%] translate-y-[50%]",[l.currentlyPlayingId===l.voice.id?"text-white dark:text-white":""]]),onClick:M},[l.currentlyPlayingId===l.voice.id?(i(),u("div",Fe)):(i(),u("div",Ie))],2)):(i(),u("div",Ne," No preview available ")),e("div",De,[e("div",je,[e("span",{class:$(["line-clamp-1 font-medium",[c.value===l.voice.id?"text-neutral-700 dark:text-neutral-300":"text-neutral-700 dark:text-neutral-400"]])},y(l.voice.name),3)]),h(l.voice).length>0?(i(),u("div",Oe,[(i(!0),u(H,null,W(h(l.voice),(k,P)=>(i(),u("span",{key:P,class:$(["inline-flex items-center rounded-md px-1.5 py-0.5 text-xs",[c.value===l.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))])):U("",!0),l.voice.customizable&&c.value===l.voice.id?(i(),u("div",Qe,[S(t(Pe),{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:l.customInputPlaceholder},null,8,["modelValue","placeholder"])])):U("",!0),l.voice.description?(i(),u("div",{key:2,class:$(["line-clamp-2 mt-1 text-xs",[c.value===l.voice.id?"text-neutral-600 dark:text-neutral-400":"text-neutral-500 dark:text-neutral-500"]])},y(l.voice.description),3)):U("",!0)])])]),e("div",He,[S(t(Ue),null,{default:I(()=>[l.showVisualizer&&l.currentlyPlayingId===l.voice.id&&l.audioStream?(i(),u("div",Je,[S(t(Le),{stream:l.audioStream,bars:24,"min-freq":60,"max-freq":4e3},{default:I(({frequencies:k})=>[S(t(Te),{frequencies:k,"bars-class":c.value===l.voice.id?"bg-primary-500 dark:bg-primary-400":"bg-neutral-400 dark:bg-neutral-600"},null,8,["frequencies","bars-class"])]),_:1},8,["stream"])])):U("",!0)]),_:1})])],2))}}),Ge=Z(Ye,[["__scopeId","data-v-a5ae8da9"]]),We={class:"voice-preview-player"},Xe={key:0,class:"relative","inline-flex":"~","w-full":"","items-center":""},Ke=["placeholder"],Ze={class:"mt-4 space-y-2"},et={key:0,class:"text-sm text-neutral-500 dark:text-neutral-400"},tt={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"},st={class:"flex flex-col"},lt={class:"font-medium"},ot={class:"text-sm text-amber-600 dark:text-amber-400"},at={class:"relative"},rt=D({__name:"VoiceCardManySelect",props:X({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(l){const o=l,g=V(!1),m=V(),c=V(new Map),f=V(new Map),v=V(new Map),h=V(new Map),M=V(null);function b(){return M.value||(M.value=new(window.AudioContext||window.webkitAudioContext)),M.value}const p=G(l,"search-query"),k=G(l,"voice-id"),P=pe(()=>{if(!p.value)return o.voices;const a=p.value.toLowerCase();return o.voices.filter(r=>{const n=r.name.toLowerCase().includes(a),x=r.description&&r.description.toLowerCase().includes(a),w=r.tags&&r.tags.some(_=>_.toLowerCase().includes(a)),L=r.labels&&Object.values(r.labels).some(_=>typeof _=="string"&&_.toLowerCase().includes(a)),C=r.languages&&r.languages.some(_=>_.name.toLowerCase().includes(a)||_.code.toLowerCase().includes(a));return n||x||w||L||C})});function q(a){return a.previewURL||a.preview_audio_url}function T(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 E(a,r){try{if(f.value.has(r))return f.value.get(r)||null;const n=b();if(h.value.has(r)){const C=h.value.get(r),_=n.createMediaStreamDestination();C.connect(_);const j=_.stream;return f.value.set(r,j),j}const x=n.createMediaElementSource(a);h.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 R(a){try{if(!q(a))return;const n=T(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))}o.showVisualizer&&!f.value.has(a.id)&&E(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(),h.value.clear(),m.value=void 0}K(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,[l.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:l.searchPlaceholder},null,8,Ke),[[ne,p.value]])])):U("",!0),e("div",Ze,[p.value?(i(),u("div",et,y(l.searchResultsText.replace("{count}",P.value.length.toString()).replace("{total}",l.voices.length.toString())),1)):U("",!0),p.value&&P.value.length===0?(i(),u("div",tt,[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",st,[e("span",lt,y(l.searchNoResultsTitle),1),e("span",ot,y(l.searchNoResultsDescription.replace("{query}",p.value)),1)])])):U("",!0),e("div",at,[e("div",{class:$(["grid auto-cols-[350px] grid-flow-col max-h-[calc(100dvh-7lh)] gap-4 overflow-x-auto scrollbar-none",[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,W(P.value,n=>(i(),Y(Ge,{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":l.customInputPlaceholder,"show-visualizer":l.showVisualizer,"audio-stream":f.value.get(n.id),onTogglePlayback:R},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?l.collapseButtonText:l.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)])])]))}}),nt=Z(rt,[["__scopeId","data-v-4dd3b9e2"]]),it=D({__name:"Skeleton",props:{animation:{default:"pulse"}},setup(l){const o=l;return(g,m)=>(i(),u("div",{class:$(["skeleton",o.animation!=="none"?`skeleton-${o.animation}`:""]),bg:"neutral-200 dark:neutral-800",overflow:"hidden"},[re(g.$slots,"default",{},void 0,!0)],2))}}),O=Z(it,[["__scopeId","data-v-f404da2a"]]),ut={flex:"~ col md:row gap-6"},dt={bg:"neutral-100 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-4",class:"w-full md:w-[40%]"},ct={flex:"~ col gap-4"},vt={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},mt={text:"neutral-400 dark:neutral-500"},pt={"max-w-full":""},ft={key:0,flex:"~ row gap-4",style:{"scrollbar-width":"none"},"min-w-0":"","of-x-scroll":"","scroll-smooth":"",role:"radiogroup"},gt={key:1},xt={key:0},ht={flex:"~ col gap-4"},bt={class:"text-lg md:text-2xl"},yt={text:"neutral-400 dark:neutral-400"},kt={key:0,class:"flex items-center justify-center py-4"},wt={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"},_t={class:"flex flex-col"},St={class:"font-medium"},Vt={class:"text-sm text-red-600 dark:text-red-400"},Mt={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"},Ct={class:"flex flex-col"},$t={class:"font-medium"},Ut={class:"text-sm text-amber-600 dark:text-amber-400"},Pt={key:0},Lt={flex:"~ col gap-4"},qt={key:0},Rt={class:"flex flex-col gap-4"},Tt={flex:"~ row gap-4"},At={key:1,class:"space-y-6"},Et={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"},zt={class:"flex flex-col"},Bt={class:"text-sm text-red-600 dark:text-red-400"},Ft={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"},It={flex:"~ col gap-4"},Nt={key:4,class:"mt-2 space-y-6"},Dt={key:0},jt={flex:"~ col gap-4"},Ot={flex:"~ col gap-6",class:"w-full md:w-[60%]"},Qt={"w-full":"","rounded-xl":""},Ht={class:"mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400","w-full":""},Jt={class:"inline-flex items-center gap-4"},Yt={flex:"~ col gap-4"},Gt={flex:"~ row","gap-4":""},Wt=["disabled"],Xt={flex:"~ row","items-center":"","gap-2":""},Kt=["src"],Zt={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":""},es=D({__name:"speech",setup(l){const{t:o}=ge(),g=we(),m=_e(),{availableProviders:c,allAudioSpeechProvidersMetadata:f}=te(g),{activeSpeechProvider:v,activeSpeechModel:h,activeSpeechVoice:M,activeSpeechVoiceId:b,pitch:p,isLoadingSpeechProviderVoices:k,supportsModelListing:P,providerModels:q,isLoadingActiveProviderModels:T,activeProviderModelError:E,modelSearchQuery:R,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(""),_=V(null),j=V("");ae(async()=>{await g.loadModelsForConfiguredProviders(),await m.loadVoicesForProvider(v.value)}),K(v,async()=>{await g.loadModelsForConfiguredProviders(),await m.loadVoicesForProvider(v.value)});async function ie(){if(!x.value.trim()&&!n.value||n.value&&!w.value.trim())return;if(!h.value){console.error("No model selected");return}if(!M.value){console.error("No voice selected");return}const A=g.getProviderInstance(v.value);if(!A){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 Se({...A.speech(h.value,s),input:N,voice:M.value.id});C.value=URL.createObjectURL(new Blob([J])),setTimeout(()=>{_.value&&_.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(){_.value&&(_.value.pause(),_.value.currentTime=0),C.value&&(URL.revokeObjectURL(C.value),C.value="")}xe(()=>{C.value&&URL.revokeObjectURL(C.value)});function ue(A){M.value={id:A,name:A,description:A,previewURL:A,languages:[{code:"en",title:"English"}],provider:v.value,gender:"male"}}function de(A){h.value=A}return(A,s)=>{var J;const N=he("motion");return i(),u(H,null,[e("div",ut,[e("div",dt,[e("div",null,[e("div",ct,[e("div",null,[e("h2",vt,y(t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.title")),1),e("div",mt,[e("span",null,y(t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.description")),1)])]),e("div",pt,[t(c).length>0?(i(),u("fieldset",ft,[(i(!0),u(H,null,W(t(f),d=>(i(),Y(t($e),{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",gt,[S(t(be),{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,__:[13]})]))])]),e("div",null,[t(v)&&t(P)?(i(),u("div",xt,[e("div",ht,[e("div",null,[e("h2",bt,y(t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),e("div",yt,[e("span",null,y(t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),t(T)?(i(),u("div",kt,[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(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.loading")),1)])):t(E)?(i(),u("div",wt,[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",_t,[e("span",St,y(t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.error")),1),e("span",Vt,y(t(E)),1)])])):t(q).length===0&&!t(T)?(i(),u("div",Mt,[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",Ct,[e("span",$t,y(t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models")),1),e("span",Ut,y(t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description")),1)])])):t(q).length>0?(i(),Y(t(Ce),{key:3,modelValue:t(h),"onUpdate:modelValue":s[1]||(s[1]=d=>F(h)?h.value=d:null),"search-query":t(R),"onUpdate:searchQuery":s[2]||(s[2]=d=>F(R)?R.value=d:null),items:t(q),searchable:!0,"search-placeholder":t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder"),"search-no-results-title":t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results"),"search-no-results-description":t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description",{query:t(R)}),"search-results-text":t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results",{count:"{count}",total:"{total}"}),"custom-input-placeholder":t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder"),"expand-button-text":t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.expand"),"collapse-button-text":t(o)("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"])):U("",!0)])])):U("",!0)])]),t(v)?(i(),u("div",Pt,[e("div",Lt,[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",qt,[e("div",Rt,[S(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,__:[17]}),e("div",Tt,[S(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,__:[18]}),S(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,__:[19]}),S(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,__:[20]})]),S(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,__:[21]})])])):t(a)[t(v)]&&t(a)[t(v)].length>0?(i(),u("div",At,[S(t(nt),{"search-query":r.value,"onUpdate:searchQuery":s[3]||(s[3]=d=>r.value=d),"voice-id":t(b),"onUpdate:voiceId":s[4]||(s[4]=d=>F(b)?b.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(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.search_voices_placeholder"),"search-no-results-title":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.no_voices"),"search-no-results-description":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.no_voices_description"),"search-results-text":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.search_voices_results",{count:0,total:0}),"custom-input-placeholder":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.custom_voice_placeholder"),"expand-button-text":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.show_more"),"collapse-button-text":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.show_less"),"play-button-text":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.play_sample"),"pause-button-text":t(o)("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",Et,[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",zt,[s[22]||(s[22]=e("span",{class:"font-medium"},"Error loading voices",-1)),e("span",Bt,y(t(z)),1)])])):(i(),u("div",Ft,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",It,[S(t(se),{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"]),S(t(le),{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",Nt,[S(t(Ve),{modelValue:t(b),"onUpdate:modelValue":s[7]||(s[7]=d=>F(b)?b.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",Dt,[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(h)?h.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(h)]])])):U("",!0),e("div",jt,[S(t(se),{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"])])])):U("",!0)])])):U("",!0)]),e("div",Ot,[e("div",Qt,[e("h2",Ht,[e("div",Jt,[S(t(ke)),e("div",null,y(t(o)("settings.pages.providers.provider.elevenlabs.playground.title")),1)])]),e("div",Yt,[S(t(le),{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(),Y(t(Me),{key:0,modelValue:x.value,"onUpdate:modelValue":s[11]||(s[11]=d=>x.value=d),"h-24":"","w-full":"",placeholder:t(o)("settings.pages.providers.provider.elevenlabs.playground.fields.field.input.placeholder")},null,8,["modelValue","placeholder"])),e("div",Gt,[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(o)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating"):t(o)("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)]))):U("",!0)]),C.value?(i(),u("audio",{key:2,ref_key:"audioPlayer",ref:_,src:C.value,controls:"",class:"mt-2 w-full"},null,8,Kt)):U("",!0)])])])]),Q((i(),u("div",Zt,s[30]||(s[30]=[e("div",{text:"60","i-solar:user-speak-rounded-bold-duotone":""},null,-1)]))),[[N]])],64)}}});typeof oe=="function"&&oe(es);export{es as default}; +import{d as D,e as V,T as ae,w as K,bh as re,c as u,o as i,c6 as H,c7 as W,a as e,a3 as ve,X as $,cf as X,cg as G,bm as Q,c9 as me,W as U,Y as y,b as S,u as t,bl as I,c2 as Z,f as pe,cJ as fe,cd as ne,bk as Y,$ as ge,a0 as te,U as xe,c5 as he,c3 as be,bI as F,cl as ye}from"./index-8LjpXIG7.js";import{_ as se,a as le,b as ke}from"./FieldRange.vue_vue_type_script_setup_true_lang-Cdt76zqB.js";import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{u as we}from"./providers-Dhn8Iy_2.js";import{u as _e,g as Se}from"./speech-BUPJbslH.js";import{_ as Ve}from"./FieldInput.vue_vue_type_script_setup_true_lang-DdnLISgI.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{_ as Me}from"./Textarea.vue_vue_type_script_setup_true_lang-B9_K8yo0.js";import{R as Ce,a as $e}from"./RadioCardSimple-DNdKoxoJ.js";import{_ as Ue}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-DyyWKgKi.js";import{_ as Pe}from"./Input.vue_vue_type_script_setup_true_lang-CpaCGrgF.js";import{b as oe}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Basic.vue_vue_type_script_setup_true_lang-Dgb2JW4V.js";const Le=D({__name:"AudioSpectrum",props:{stream:null,bars:{default:32},minFreq:{default:60},maxFreq:{default:4e3}},setup(l){const o=l,g=V(Array.from({length:o.bars}).fill(0));ae(()=>{m()}),K(()=>o.stream,()=>{m()});function m(){if(!o.stream)return;const c=new(window.AudioContext||window.webkitAudioContext),f=c.createMediaStreamSource(o.stream),v=c.createAnalyser();v.fftSize=2048,f.connect(v);const h=v.frequencyBinCount,M=new Uint8Array(h),p=c.sampleRate/v.fftSize,k=Math.floor(o.minFreq/p),P=Math.floor(o.maxFreq/p),q=P-k,T=Math.floor(q/o.bars),E=()=>{try{requestAnimationFrame(E),v.getByteFrequencyData(M);const R=Array.from({length:o.bars}).fill(0);for(let z=0;zre(c.$slots,"default",{frequencies:g.value})}}),qe={"h-full":"",flex:"","items-center":"","gap-1":""},Re=5,Te=D({__name:"AudioSpectrumVisualizer",props:{frequencies:null,barsClass:null},setup(l){const o=l;function g(c,f){return .1+(1-.1)*(c/f)}function m(c,f){const v=g(f,o.frequencies.length);return Math.min(100,Math.max(10,c*100*Re*v))}return(c,f)=>(i(),u("div",qe,[(i(!0),u(H,null,W(l.frequencies,(v,h)=>(i(),u("div",{key:h,"h-full":"",flex:"","flex-1":"","items-end":""},[e("div",{transition:"all 100 ease-in-out","mx-auto":"","my-0":"","w-full":"","rounded-full":"",class:$(l.barsClass),style:ve({height:`${m(v,h)}%`})},null,6)]))),128))]))}}),Ae={class:"p-3"},Ee={class:"flex items-start"},ze=["checked","name","value"],Be={class:"relative mr-3 mt-0.5 flex-shrink-0"},Fe={key:0,class:"i-solar:pause-circle-bold-duotone text-xl text-neutral-400 dark:text-neutral-500"},Ie={key:1,class:"i-solar:play-circle-bold-duotone text-xl text-neutral-400 dark:text-neutral-500"},Ne={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"},De={class:"flex-1 cursor-pointer"},je={class:"flex items-center"},Oe={key:0,class:"mt-1 flex flex-wrap gap-1"},Qe={key:1,class:"mt-3"},He={relative:""},Je={key:0,class:"h-16 px-3 pb-2"},Ye=D({__name:"VoiceCard",props:X({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:X(["togglePlayback"],["update:voice-id","update:custom-voice-name"]),setup(l,{emit:o}){const g=l,m=o,c=G(l,"voice-id"),f=G(l,"custom-voice-name");function v(b){return b.previewURL||b.preview_audio_url}function h(b){var k,P,q;const p=[];if((k=b.labels)!=null&&k.gender&&p.push(b.labels.gender),(P=b.labels)!=null&&P.age&&p.push(b.labels.age),(q=b.labels)!=null&&q.accent&&p.push(b.labels.accent),b.languages&&b.languages.length>0){const T=b.languages.map(E=>E.name).join(", ");p.push(T)}return p}function M(){m("togglePlayback",g.voice)}return(b,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",Ae,[e("div",Ee,[Q(e("input",{"onUpdate:modelValue":p[0]||(p[0]=k=>c.value=k),checked:c.value===g.voice.id,type:"radio",name:l.name,value:g.voice.id,class:"absolute cursor-pointer opacity-0"},null,8,ze),[[me,c.value]]),e("div",Be,[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(l.voice)?(i(),u("button",{key:0,absolute:"","right-0":"",top:"0","z-3":"",class:$(["translate-x-[-50%] translate-y-[50%]",[l.currentlyPlayingId===l.voice.id?"text-white dark:text-white":""]]),onClick:M},[l.currentlyPlayingId===l.voice.id?(i(),u("div",Fe)):(i(),u("div",Ie))],2)):(i(),u("div",Ne," No preview available ")),e("div",De,[e("div",je,[e("span",{class:$(["line-clamp-1 font-medium",[c.value===l.voice.id?"text-neutral-700 dark:text-neutral-300":"text-neutral-700 dark:text-neutral-400"]])},y(l.voice.name),3)]),h(l.voice).length>0?(i(),u("div",Oe,[(i(!0),u(H,null,W(h(l.voice),(k,P)=>(i(),u("span",{key:P,class:$(["inline-flex items-center rounded-md px-1.5 py-0.5 text-xs",[c.value===l.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))])):U("",!0),l.voice.customizable&&c.value===l.voice.id?(i(),u("div",Qe,[S(t(Pe),{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:l.customInputPlaceholder},null,8,["modelValue","placeholder"])])):U("",!0),l.voice.description?(i(),u("div",{key:2,class:$(["line-clamp-2 mt-1 text-xs",[c.value===l.voice.id?"text-neutral-600 dark:text-neutral-400":"text-neutral-500 dark:text-neutral-500"]])},y(l.voice.description),3)):U("",!0)])])]),e("div",He,[S(t(Ue),null,{default:I(()=>[l.showVisualizer&&l.currentlyPlayingId===l.voice.id&&l.audioStream?(i(),u("div",Je,[S(t(Le),{stream:l.audioStream,bars:24,"min-freq":60,"max-freq":4e3},{default:I(({frequencies:k})=>[S(t(Te),{frequencies:k,"bars-class":c.value===l.voice.id?"bg-primary-500 dark:bg-primary-400":"bg-neutral-400 dark:bg-neutral-600"},null,8,["frequencies","bars-class"])]),_:1},8,["stream"])])):U("",!0)]),_:1})])],2))}}),Ge=Z(Ye,[["__scopeId","data-v-a5ae8da9"]]),We={class:"voice-preview-player"},Xe={key:0,class:"relative","inline-flex":"~","w-full":"","items-center":""},Ke=["placeholder"],Ze={class:"mt-4 space-y-2"},et={key:0,class:"text-sm text-neutral-500 dark:text-neutral-400"},tt={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"},st={class:"flex flex-col"},lt={class:"font-medium"},ot={class:"text-sm text-amber-600 dark:text-amber-400"},at={class:"relative"},rt=D({__name:"VoiceCardManySelect",props:X({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(l){const o=l,g=V(!1),m=V(),c=V(new Map),f=V(new Map),v=V(new Map),h=V(new Map),M=V(null);function b(){return M.value||(M.value=new(window.AudioContext||window.webkitAudioContext)),M.value}const p=G(l,"search-query"),k=G(l,"voice-id"),P=pe(()=>{if(!p.value)return o.voices;const a=p.value.toLowerCase();return o.voices.filter(r=>{const n=r.name.toLowerCase().includes(a),x=r.description&&r.description.toLowerCase().includes(a),w=r.tags&&r.tags.some(_=>_.toLowerCase().includes(a)),L=r.labels&&Object.values(r.labels).some(_=>typeof _=="string"&&_.toLowerCase().includes(a)),C=r.languages&&r.languages.some(_=>_.name.toLowerCase().includes(a)||_.code.toLowerCase().includes(a));return n||x||w||L||C})});function q(a){return a.previewURL||a.preview_audio_url}function T(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 E(a,r){try{if(f.value.has(r))return f.value.get(r)||null;const n=b();if(h.value.has(r)){const C=h.value.get(r),_=n.createMediaStreamDestination();C.connect(_);const j=_.stream;return f.value.set(r,j),j}const x=n.createMediaElementSource(a);h.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 R(a){try{if(!q(a))return;const n=T(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))}o.showVisualizer&&!f.value.has(a.id)&&E(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(),h.value.clear(),m.value=void 0}K(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,[l.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:l.searchPlaceholder},null,8,Ke),[[ne,p.value]])])):U("",!0),e("div",Ze,[p.value?(i(),u("div",et,y(l.searchResultsText.replace("{count}",P.value.length.toString()).replace("{total}",l.voices.length.toString())),1)):U("",!0),p.value&&P.value.length===0?(i(),u("div",tt,[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",st,[e("span",lt,y(l.searchNoResultsTitle),1),e("span",ot,y(l.searchNoResultsDescription.replace("{query}",p.value)),1)])])):U("",!0),e("div",at,[e("div",{class:$(["grid auto-cols-[350px] grid-flow-col max-h-[calc(100dvh-7lh)] gap-4 overflow-x-auto scrollbar-none",[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,W(P.value,n=>(i(),Y(Ge,{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":l.customInputPlaceholder,"show-visualizer":l.showVisualizer,"audio-stream":f.value.get(n.id),onTogglePlayback:R},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?l.collapseButtonText:l.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)])])]))}}),nt=Z(rt,[["__scopeId","data-v-4dd3b9e2"]]),it=D({__name:"Skeleton",props:{animation:{default:"pulse"}},setup(l){const o=l;return(g,m)=>(i(),u("div",{class:$(["skeleton",o.animation!=="none"?`skeleton-${o.animation}`:""]),bg:"neutral-200 dark:neutral-800",overflow:"hidden"},[re(g.$slots,"default",{},void 0,!0)],2))}}),O=Z(it,[["__scopeId","data-v-f404da2a"]]),ut={flex:"~ col md:row gap-6"},dt={bg:"neutral-100 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-4",class:"w-full md:w-[40%]"},ct={flex:"~ col gap-4"},vt={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},mt={text:"neutral-400 dark:neutral-500"},pt={"max-w-full":""},ft={key:0,flex:"~ row gap-4",style:{"scrollbar-width":"none"},"min-w-0":"","of-x-scroll":"","scroll-smooth":"",role:"radiogroup"},gt={key:1},xt={key:0},ht={flex:"~ col gap-4"},bt={class:"text-lg md:text-2xl"},yt={text:"neutral-400 dark:neutral-400"},kt={key:0,class:"flex items-center justify-center py-4"},wt={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"},_t={class:"flex flex-col"},St={class:"font-medium"},Vt={class:"text-sm text-red-600 dark:text-red-400"},Mt={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"},Ct={class:"flex flex-col"},$t={class:"font-medium"},Ut={class:"text-sm text-amber-600 dark:text-amber-400"},Pt={key:0},Lt={flex:"~ col gap-4"},qt={key:0},Rt={class:"flex flex-col gap-4"},Tt={flex:"~ row gap-4"},At={key:1,class:"space-y-6"},Et={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"},zt={class:"flex flex-col"},Bt={class:"text-sm text-red-600 dark:text-red-400"},Ft={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"},It={flex:"~ col gap-4"},Nt={key:4,class:"mt-2 space-y-6"},Dt={key:0},jt={flex:"~ col gap-4"},Ot={flex:"~ col gap-6",class:"w-full md:w-[60%]"},Qt={"w-full":"","rounded-xl":""},Ht={class:"mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400","w-full":""},Jt={class:"inline-flex items-center gap-4"},Yt={flex:"~ col gap-4"},Gt={flex:"~ row","gap-4":""},Wt=["disabled"],Xt={flex:"~ row","items-center":"","gap-2":""},Kt=["src"],Zt={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":""},es=D({__name:"speech",setup(l){const{t:o}=ge(),g=we(),m=_e(),{availableProviders:c,allAudioSpeechProvidersMetadata:f}=te(g),{activeSpeechProvider:v,activeSpeechModel:h,activeSpeechVoice:M,activeSpeechVoiceId:b,pitch:p,isLoadingSpeechProviderVoices:k,supportsModelListing:P,providerModels:q,isLoadingActiveProviderModels:T,activeProviderModelError:E,modelSearchQuery:R,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(""),_=V(null),j=V("");ae(async()=>{await g.loadModelsForConfiguredProviders(),await m.loadVoicesForProvider(v.value)}),K(v,async()=>{await g.loadModelsForConfiguredProviders(),await m.loadVoicesForProvider(v.value)});async function ie(){if(!x.value.trim()&&!n.value||n.value&&!w.value.trim())return;if(!h.value){console.error("No model selected");return}if(!M.value){console.error("No voice selected");return}const A=g.getProviderInstance(v.value);if(!A){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 Se({...A.speech(h.value,s),input:N,voice:M.value.id});C.value=URL.createObjectURL(new Blob([J])),setTimeout(()=>{_.value&&_.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(){_.value&&(_.value.pause(),_.value.currentTime=0),C.value&&(URL.revokeObjectURL(C.value),C.value="")}xe(()=>{C.value&&URL.revokeObjectURL(C.value)});function ue(A){M.value={id:A,name:A,description:A,previewURL:A,languages:[{code:"en",title:"English"}],provider:v.value,gender:"male"}}function de(A){h.value=A}return(A,s)=>{var J;const N=he("motion");return i(),u(H,null,[e("div",ut,[e("div",dt,[e("div",null,[e("div",ct,[e("div",null,[e("h2",vt,y(t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.title")),1),e("div",mt,[e("span",null,y(t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.description")),1)])]),e("div",pt,[t(c).length>0?(i(),u("fieldset",ft,[(i(!0),u(H,null,W(t(f),d=>(i(),Y(t($e),{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",gt,[S(t(be),{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,__:[13]})]))])]),e("div",null,[t(v)&&t(P)?(i(),u("div",xt,[e("div",ht,[e("div",null,[e("h2",bt,y(t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),e("div",yt,[e("span",null,y(t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),t(T)?(i(),u("div",kt,[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(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.loading")),1)])):t(E)?(i(),u("div",wt,[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",_t,[e("span",St,y(t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.error")),1),e("span",Vt,y(t(E)),1)])])):t(q).length===0&&!t(T)?(i(),u("div",Mt,[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",Ct,[e("span",$t,y(t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models")),1),e("span",Ut,y(t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description")),1)])])):t(q).length>0?(i(),Y(t(Ce),{key:3,modelValue:t(h),"onUpdate:modelValue":s[1]||(s[1]=d=>F(h)?h.value=d:null),"search-query":t(R),"onUpdate:searchQuery":s[2]||(s[2]=d=>F(R)?R.value=d:null),items:t(q),searchable:!0,"search-placeholder":t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder"),"search-no-results-title":t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results"),"search-no-results-description":t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description",{query:t(R)}),"search-results-text":t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results",{count:"{count}",total:"{total}"}),"custom-input-placeholder":t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder"),"expand-button-text":t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.expand"),"collapse-button-text":t(o)("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"])):U("",!0)])])):U("",!0)])]),t(v)?(i(),u("div",Pt,[e("div",Lt,[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",qt,[e("div",Rt,[S(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,__:[17]}),e("div",Tt,[S(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,__:[18]}),S(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,__:[19]}),S(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,__:[20]})]),S(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,__:[21]})])])):t(a)[t(v)]&&t(a)[t(v)].length>0?(i(),u("div",At,[S(t(nt),{"search-query":r.value,"onUpdate:searchQuery":s[3]||(s[3]=d=>r.value=d),"voice-id":t(b),"onUpdate:voiceId":s[4]||(s[4]=d=>F(b)?b.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(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.search_voices_placeholder"),"search-no-results-title":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.no_voices"),"search-no-results-description":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.no_voices_description"),"search-results-text":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.search_voices_results",{count:0,total:0}),"custom-input-placeholder":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.custom_voice_placeholder"),"expand-button-text":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.show_more"),"collapse-button-text":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.show_less"),"play-button-text":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.play_sample"),"pause-button-text":t(o)("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",Et,[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",zt,[s[22]||(s[22]=e("span",{class:"font-medium"},"Error loading voices",-1)),e("span",Bt,y(t(z)),1)])])):(i(),u("div",Ft,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",It,[S(t(se),{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"]),S(t(le),{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",Nt,[S(t(Ve),{modelValue:t(b),"onUpdate:modelValue":s[7]||(s[7]=d=>F(b)?b.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",Dt,[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(h)?h.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(h)]])])):U("",!0),e("div",jt,[S(t(se),{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"])])])):U("",!0)])])):U("",!0)]),e("div",Ot,[e("div",Qt,[e("h2",Ht,[e("div",Jt,[S(t(ke)),e("div",null,y(t(o)("settings.pages.providers.provider.elevenlabs.playground.title")),1)])]),e("div",Yt,[S(t(le),{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(),Y(t(Me),{key:0,modelValue:x.value,"onUpdate:modelValue":s[11]||(s[11]=d=>x.value=d),"h-24":"","w-full":"",placeholder:t(o)("settings.pages.providers.provider.elevenlabs.playground.fields.field.input.placeholder")},null,8,["modelValue","placeholder"])),e("div",Gt,[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(o)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating"):t(o)("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)]))):U("",!0)]),C.value?(i(),u("audio",{key:2,ref_key:"audioPlayer",ref:_,src:C.value,controls:"",class:"mt-2 w-full"},null,8,Kt)):U("",!0)])])])]),Q((i(),u("div",Zt,s[30]||(s[30]=[e("div",{text:"60","i-solar:user-speak-rounded-bold-duotone":""},null,-1)]))),[[N]])],64)}}});typeof oe=="function"&&oe(es);export{es as default}; diff --git a/assets/stage-83WDclVc.js b/assets/stage-BGhfuYuA.js similarity index 85% rename from assets/stage-83WDclVc.js rename to assets/stage-BGhfuYuA.js index 011a695e267f1d3bc8470681ff399efb2498c4d4..d4231d4144f2042622afe0a58b0b37cf4c6f6c90 100644 --- a/assets/stage-83WDclVc.js +++ b/assets/stage-BGhfuYuA.js @@ -1 +1 @@ -import{d as p,a1 as s,c,b as d,a2 as i,a3 as m,u as e,o as l}from"./index-WDP_Z4A8.js";const x=p({__name:"stage",setup(u){const{top:t,right:a,bottom:o,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(a)}px`,paddingBottom:`${e(o)}px`,paddingLeft:`${e(n)}px`})},[d(r)],4)}}});export{x as default}; +import{d as p,a1 as s,c,b as d,a2 as i,a3 as m,u as e,o as l}from"./index-8LjpXIG7.js";const x=p({__name:"stage",setup(u){const{top:t,right:a,bottom:o,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(a)}px`,paddingBottom:`${e(o)}px`,paddingLeft:`${e(n)}px`})},[d(r)],4)}}});export{x as default}; diff --git a/assets/sury-DmrZ3_Oj-CYYeWtlB.js b/assets/sury-DmrZ3_Oj-i4n_xVnc.js similarity index 50% rename from assets/sury-DmrZ3_Oj-CYYeWtlB.js rename to assets/sury-DmrZ3_Oj-i4n_xVnc.js index c5ab4d814092e9454ef58f132a5c05e8790c40b0..cd35a7eb207584898086c360a080072c9e169aae 100644 --- a/assets/sury-DmrZ3_Oj-CYYeWtlB.js +++ b/assets/sury-DmrZ3_Oj-i4n_xVnc.js @@ -1 +1 @@ -import{cP as r}from"./index-WDP_Z4A8.js";import{t as a}from"./mcp-CVsSz3w1.js";const s=async()=>{const{toJSONSchema:t}=await a(r(()=>import("./__vite-optional-peer-dep_sury_xsschema-BIHI7g3E.js"),[]),"sury");return o=>t(o)};export{s as getToJsonSchemaFn}; +import{cP as r}from"./index-8LjpXIG7.js";import{t as a}from"./mcp-BNgNJ97R.js";const s=async()=>{const{toJSONSchema:t}=await a(r(()=>import("./__vite-optional-peer-dep_sury_xsschema-BIHI7g3E.js"),[]),"sury");return o=>t(o)};export{s as getToJsonSchemaFn}; diff --git a/assets/three-vrm.module-DIVMhp6T.js b/assets/three-vrm.module-r4bOtVyC.js similarity index 87% rename from assets/three-vrm.module-DIVMhp6T.js rename to assets/three-vrm.module-r4bOtVyC.js index 18a362118d336f78bb88e1590cc3da99093f89e2..ef195db681c6400de0f684b5ed95c27e97f9b1e2 100644 --- a/assets/three-vrm.module-DIVMhp6T.js +++ b/assets/three-vrm.module-r4bOtVyC.js @@ -1,4 +1,4 @@ -import{cQ as getAugmentedNamespace,ai as Color,ah as Vector2,ap as Vector3,at as Object3D,bC as Euler,a_ as AnimationClip,ar as Quaternion,b5 as NumberKeyframeTrack,aX as MathUtils,b6 as QuaternionKeyframeTrack,ao as Matrix4,cR as Matrix3,aI as Material,bz as BackSide,aV as Group,aM as MeshBasicMaterial,aL as DoubleSide,aQ as Mesh,aJ as LineBasicMaterial,aR as LineSegments,cS as ImageLoader,by as ShaderMaterial,cT as TangentSpaceNormalMap,bA as UniformsUtils,cU as UniformsLib,aw as BufferAttribute,cV as DynamicDrawUsage,aO as BufferGeometry,aS as Line,aP as SkinnedMesh,cW as GLBufferAttribute,aZ as Skeleton,cX as AxesHelper,bN as REVISION}from"./index-WDP_Z4A8.js";const EYE_SACCADE_INT_STEP=400,EYE_SACCADE_INT_P=[[.075,800],[.11,0],[.125,0],[.14,0],[.125,0],[.05,0],[.04,0],[.03,0],[.02,0],[1,0]];for(let f=1;ffetch(r).then(c=>c.arrayBuffer());return defaultModelFetcher.defaultModelFetcher=f,defaultModelFetcher}var frameProcessor={},logging={},hasRequiredLogging;function requireLogging(){return hasRequiredLogging||(hasRequiredLogging=1,function(f){Object.defineProperty(f,"__esModule",{value:!0}),f.log=f.LOG_PREFIX=void 0,f.LOG_PREFIX="[VAD]";const r=["error","debug","warn"];function c(l){return(...m)=>{console[l](f.LOG_PREFIX,...m)}}const d=r.reduce((l,m)=>(l[m]=c(m),l),{});f.log=d}(logging)),logging}var messages={},hasRequiredMessages;function requireMessages(){if(hasRequiredMessages)return messages;hasRequiredMessages=1,Object.defineProperty(messages,"__esModule",{value:!0}),messages.Message=void 0;var f;return function(r){r.AudioFrame="AUDIO_FRAME",r.SpeechStart="SPEECH_START",r.VADMisfire="VAD_MISFIRE",r.SpeechEnd="SPEECH_END",r.SpeechStop="SPEECH_STOP",r.SpeechRealStart="SPEECH_REAL_START",r.FrameProcessed="FRAME_PROCESSED"}(f||(messages.Message=f={})),messages}var hasRequiredFrameProcessor;function requireFrameProcessor(){if(hasRequiredFrameProcessor)return frameProcessor;hasRequiredFrameProcessor=1,Object.defineProperty(frameProcessor,"__esModule",{value:!0}),frameProcessor.FrameProcessor=frameProcessor.validateOptions=frameProcessor.defaultV5FrameProcessorOptions=frameProcessor.defaultLegacyFrameProcessorOptions=void 0;const f=requireLogging(),r=requireMessages(),c=[512,1024,1536];frameProcessor.defaultLegacyFrameProcessorOptions={positiveSpeechThreshold:.5,negativeSpeechThreshold:.5-.15,preSpeechPadFrames:1,redemptionFrames:8,frameSamples:1536,minSpeechFrames:3,submitUserSpeechOnPause:!1},frameProcessor.defaultV5FrameProcessorOptions={positiveSpeechThreshold:.5,negativeSpeechThreshold:.5-.15,preSpeechPadFrames:3,redemptionFrames:24,frameSamples:512,minSpeechFrames:9,submitUserSpeechOnPause:!1};function d(s){c.includes(s.frameSamples)||f.log.warn("You are using an unusual frame size"),(s.positiveSpeechThreshold<0||s.positiveSpeechThreshold>1)&&f.log.error("positiveSpeechThreshold should be a number between 0 and 1"),(s.negativeSpeechThreshold<0||s.negativeSpeechThreshold>s.positiveSpeechThreshold)&&f.log.error("negativeSpeechThreshold should be between 0 and positiveSpeechThreshold"),s.preSpeechPadFrames<0&&f.log.error("preSpeechPadFrames should be positive"),s.redemptionFrames<0&&f.log.error("redemptionFrames should be positive")}frameProcessor.validateOptions=d;const l=s=>{const h=s.reduce((a,o)=>(a.push(a.at(-1)+o.length),a),[0]),p=new Float32Array(h.at(-1));return s.forEach((a,o)=>{const t=h[o];p.set(a,t)}),p};class m{constructor(h,p,a){this.modelProcessFunc=h,this.modelResetFunc=p,this.options=a,this.speaking=!1,this.redemptionCounter=0,this.speechFrameCount=0,this.active=!1,this.speechRealStartFired=!1,this.reset=()=>{this.speaking=!1,this.speechRealStartFired=!1,this.audioBuffer=[],this.modelResetFunc(),this.redemptionCounter=0,this.speechFrameCount=0},this.pause=o=>{this.active=!1,this.options.submitUserSpeechOnPause?this.endSegment(o):this.reset()},this.resume=()=>{this.active=!0},this.endSegment=o=>{const t=this.audioBuffer;this.audioBuffer=[];const e=this.speaking;if(this.reset(),e)if(t.reduce((i,u)=>u.isSpeech?i+1:i,0)>=this.options.minSpeechFrames){const i=l(t.map(u=>u.frame));o({msg:r.Message.SpeechEnd,audio:i})}else o({msg:r.Message.VADMisfire});return{}},this.process=async(o,t)=>{if(!this.active)return;const e=await this.modelProcessFunc(o),n=e.isSpeech>=this.options.positiveSpeechThreshold;if(t({probs:e,msg:r.Message.FrameProcessed,frame:o}),this.audioBuffer.push({frame:o,isSpeech:n}),n&&(this.speechFrameCount++,this.redemptionCounter=0),n&&!this.speaking&&(this.speaking=!0,t({msg:r.Message.SpeechStart})),this.speaking&&this.speechFrameCount===this.options.minSpeechFrames&&!this.speechRealStartFired&&(this.speechRealStartFired=!0,t({msg:r.Message.SpeechRealStart})),e.isSpeech=this.options.redemptionFrames){this.redemptionCounter=0,this.speechFrameCount=0,this.speaking=!1,this.speechRealStartFired=!1;const i=this.audioBuffer;if(this.audioBuffer=[],i.reduce((g,b)=>b.isSpeech?g+1:g,0)>=this.options.minSpeechFrames){const g=l(i.map(b=>b.frame));t({msg:r.Message.SpeechEnd,audio:g})}else t({msg:r.Message.VADMisfire})}if(!this.speaking){for(;this.audioBuffer.length>this.options.preSpeechPadFrames;)this.audioBuffer.shift();this.speechFrameCount=0}},this.audioBuffer=[],this.reset()}}return frameProcessor.FrameProcessor=m,frameProcessor}var nonRealTimeVad={},ortWeb_min={exports:{}};const backends={},backendsSortedByPriority=[],registerBackend=(f,r,c)=>{if(r&&typeof r.init=="function"&&typeof r.createSessionHandler=="function"){const d=backends[f];if(d===void 0)backends[f]={backend:r,priority:c};else{if(d.priority>c)return;if(d.priority===c&&d.backend!==r)throw new Error(`cannot register backend "${f}" using priority ${c}`)}if(c>=0){const l=backendsSortedByPriority.indexOf(f);l!==-1&&backendsSortedByPriority.splice(l,1);for(let m=0;m{const r=f.length===0?backendsSortedByPriority:f,c=[];for(const d of r){const l=backends[d];if(l){if(l.initialized)return l.backend;if(l.aborted)continue;const m=!!l.initPromise;try{return m||(l.initPromise=l.backend.init()),await l.initPromise,l.initialized=!0,l.backend}catch(s){m||c.push({name:d,err:s}),l.aborted=!0}finally{delete l.initPromise}}}throw new Error(`no available backend found. ERR: ${c.map(d=>`[${d.name}] ${d.err}`).join(", ")}`)};class EnvImpl{constructor(){this.wasm={},this.webgl={},this.logLevelInternal="warning"}set logLevel(r){if(r!==void 0){if(typeof r!="string"||["verbose","info","warning","error","fatal"].indexOf(r)===-1)throw new Error(`Unsupported logging level: ${r}`);this.logLevelInternal=r}}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=f=>{let r=1;for(let c=0;c{const t=document.createElement("canvas"),e=t.getContext("2d");if(!r||!e)return o();const n=new Image;n.crossOrigin="Anonymous",n.src=r,n.onload=()=>{t.width=n.width,t.height=n.height,e.drawImage(n,0,0,t.width,t.height);const i=e.getImageData(0,0,t.width,t.height);if(c!==void 0){if(c.height!==void 0&&c.height!==t.height)throw new Error("Image input config height doesn't match ImageBitmap height");if(p.height=t.height,c.width!==void 0&&c.width!==t.width)throw new Error("Image input config width doesn't match ImageBitmap width");p.width=t.width}else p.height=t.height,p.width=t.width;a(St.bufferToTensor(i.data,p))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(h!==void 0)return St.bufferToTensor(h,p);throw new Error("Input data provided is not supported - aborted tensor creation")}toImageData(r){var c,d;const l=document.createElement("canvas").getContext("2d");let m;if(l!=null){const s=this.dims[3],h=this.dims[2],p=this.dims[1],a=r!==void 0&&r.format!==void 0?r.format:"RGB",o=r!==void 0&&((c=r.norm)===null||c===void 0?void 0:c.mean)!==void 0?r.norm.mean:255,t=r!==void 0&&((d=r.norm)===null||d===void 0?void 0:d.bias)!==void 0?r.norm.bias:0,e=h*s;if(r!==void 0){if(r.height!==void 0&&r.height!==h)throw new Error("Image output config height doesn't match tensor height");if(r.width!==void 0&&r.width!==s)throw new Error("Image output config width doesn't match tensor width");if(r.format!==void 0&&p===4&&r.format!=="RGBA"||p===3&&r.format!=="RGB"&&r.format!=="BGR")throw new Error("Tensor format doesn't match input tensor dims")}const n=4;let i=0,u=1,g=2,b=3,y=0,_=e,v=e*2,w=-1;a==="RGBA"?(y=0,_=e,v=e*2,w=e*3):a==="RGB"?(y=0,_=e,v=e*2):a==="RBG"&&(y=0,v=e,_=e*2),m=l.createImageData(s,h);for(let T=0;T"u")throw new Error(`input '${a}' is missing in 'feeds'.`);if(s)for(const a of this.outputNames)l[a]=null;const h=await this.handler.run(r,l,m),p={};for(const a in h)Object.hasOwnProperty.call(h,a)&&(p[a]=new Tensor(h[a].type,h[a].data,h[a].dims));return p}static async create(r,c,d,l){let m,s={};if(typeof r=="string"){if(m=r,typeof c=="object"&&c!==null)s=c;else if(typeof c<"u")throw new TypeError("'options' must be an object.")}else if(r instanceof Uint8Array){if(m=r,typeof c=="object"&&c!==null)s=c;else if(typeof c<"u")throw new TypeError("'options' must be an object.")}else if(r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer){const t=r;let e=0,n=r.byteLength;if(typeof c=="object"&&c!==null)s=c;else if(typeof c=="number"){if(e=c,!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=r.byteLength-e,typeof d=="number"){if(n=d,!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 l=="object"&&l!==null)s=l;else if(typeof l<"u")throw new TypeError("'options' must be an object.")}else if(typeof d<"u")throw new TypeError("'byteLength' must be a number.")}else if(typeof c<"u")throw new TypeError("'options' must be an object.");m=new Uint8Array(t,e,n)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");const p=(s.executionProviders||[]).map(t=>typeof t=="string"?t:t.name),o=await(await resolveBackend(p)).createSessionHandler(m,s);return new fn(o)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}};const InferenceSession=InferenceSession$1,lib=Object.freeze(Object.defineProperty({__proto__:null,InferenceSession,Tensor,env,registerBackend},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(lib);/*! +import{cQ as getAugmentedNamespace,ai as Color,ah as Vector2,ap as Vector3,at as Object3D,bC as Euler,a_ as AnimationClip,ar as Quaternion,b5 as NumberKeyframeTrack,aX as MathUtils,b6 as QuaternionKeyframeTrack,ao as Matrix4,cR as Matrix3,aI as Material,bz as BackSide,aV as Group,aM as MeshBasicMaterial,aL as DoubleSide,aQ as Mesh,aJ as LineBasicMaterial,aR as LineSegments,cS as ImageLoader,by as ShaderMaterial,cT as TangentSpaceNormalMap,bA as UniformsUtils,cU as UniformsLib,aw as BufferAttribute,cV as DynamicDrawUsage,aO as BufferGeometry,aS as Line,aP as SkinnedMesh,cW as GLBufferAttribute,aZ as Skeleton,cX as AxesHelper,bN as REVISION}from"./index-8LjpXIG7.js";const EYE_SACCADE_INT_STEP=400,EYE_SACCADE_INT_P=[[.075,800],[.11,0],[.125,0],[.14,0],[.125,0],[.05,0],[.04,0],[.03,0],[.02,0],[1,0]];for(let f=1;ffetch(r).then(c=>c.arrayBuffer());return defaultModelFetcher.defaultModelFetcher=f,defaultModelFetcher}var frameProcessor={},logging={},hasRequiredLogging;function requireLogging(){return hasRequiredLogging||(hasRequiredLogging=1,function(f){Object.defineProperty(f,"__esModule",{value:!0}),f.log=f.LOG_PREFIX=void 0,f.LOG_PREFIX="[VAD]";const r=["error","debug","warn"];function c(l){return(...m)=>{console[l](f.LOG_PREFIX,...m)}}const d=r.reduce((l,m)=>(l[m]=c(m),l),{});f.log=d}(logging)),logging}var messages={},hasRequiredMessages;function requireMessages(){if(hasRequiredMessages)return messages;hasRequiredMessages=1,Object.defineProperty(messages,"__esModule",{value:!0}),messages.Message=void 0;var f;return function(r){r.AudioFrame="AUDIO_FRAME",r.SpeechStart="SPEECH_START",r.VADMisfire="VAD_MISFIRE",r.SpeechEnd="SPEECH_END",r.SpeechStop="SPEECH_STOP",r.SpeechRealStart="SPEECH_REAL_START",r.FrameProcessed="FRAME_PROCESSED"}(f||(messages.Message=f={})),messages}var hasRequiredFrameProcessor;function requireFrameProcessor(){if(hasRequiredFrameProcessor)return frameProcessor;hasRequiredFrameProcessor=1,Object.defineProperty(frameProcessor,"__esModule",{value:!0}),frameProcessor.FrameProcessor=frameProcessor.validateOptions=frameProcessor.defaultV5FrameProcessorOptions=frameProcessor.defaultLegacyFrameProcessorOptions=void 0;const f=requireLogging(),r=requireMessages(),c=[512,1024,1536];frameProcessor.defaultLegacyFrameProcessorOptions={positiveSpeechThreshold:.5,negativeSpeechThreshold:.5-.15,preSpeechPadFrames:1,redemptionFrames:8,frameSamples:1536,minSpeechFrames:3,submitUserSpeechOnPause:!1},frameProcessor.defaultV5FrameProcessorOptions={positiveSpeechThreshold:.5,negativeSpeechThreshold:.5-.15,preSpeechPadFrames:3,redemptionFrames:24,frameSamples:512,minSpeechFrames:9,submitUserSpeechOnPause:!1};function d(s){c.includes(s.frameSamples)||f.log.warn("You are using an unusual frame size"),(s.positiveSpeechThreshold<0||s.positiveSpeechThreshold>1)&&f.log.error("positiveSpeechThreshold should be a number between 0 and 1"),(s.negativeSpeechThreshold<0||s.negativeSpeechThreshold>s.positiveSpeechThreshold)&&f.log.error("negativeSpeechThreshold should be between 0 and positiveSpeechThreshold"),s.preSpeechPadFrames<0&&f.log.error("preSpeechPadFrames should be positive"),s.redemptionFrames<0&&f.log.error("redemptionFrames should be positive")}frameProcessor.validateOptions=d;const l=s=>{const h=s.reduce((a,o)=>(a.push(a.at(-1)+o.length),a),[0]),p=new Float32Array(h.at(-1));return s.forEach((a,o)=>{const t=h[o];p.set(a,t)}),p};class m{constructor(h,p,a){this.modelProcessFunc=h,this.modelResetFunc=p,this.options=a,this.speaking=!1,this.redemptionCounter=0,this.speechFrameCount=0,this.active=!1,this.speechRealStartFired=!1,this.reset=()=>{this.speaking=!1,this.speechRealStartFired=!1,this.audioBuffer=[],this.modelResetFunc(),this.redemptionCounter=0,this.speechFrameCount=0},this.pause=o=>{this.active=!1,this.options.submitUserSpeechOnPause?this.endSegment(o):this.reset()},this.resume=()=>{this.active=!0},this.endSegment=o=>{const t=this.audioBuffer;this.audioBuffer=[];const e=this.speaking;if(this.reset(),e)if(t.reduce((i,u)=>u.isSpeech?i+1:i,0)>=this.options.minSpeechFrames){const i=l(t.map(u=>u.frame));o({msg:r.Message.SpeechEnd,audio:i})}else o({msg:r.Message.VADMisfire});return{}},this.process=async(o,t)=>{if(!this.active)return;const e=await this.modelProcessFunc(o),n=e.isSpeech>=this.options.positiveSpeechThreshold;if(t({probs:e,msg:r.Message.FrameProcessed,frame:o}),this.audioBuffer.push({frame:o,isSpeech:n}),n&&(this.speechFrameCount++,this.redemptionCounter=0),n&&!this.speaking&&(this.speaking=!0,t({msg:r.Message.SpeechStart})),this.speaking&&this.speechFrameCount===this.options.minSpeechFrames&&!this.speechRealStartFired&&(this.speechRealStartFired=!0,t({msg:r.Message.SpeechRealStart})),e.isSpeech=this.options.redemptionFrames){this.redemptionCounter=0,this.speechFrameCount=0,this.speaking=!1,this.speechRealStartFired=!1;const i=this.audioBuffer;if(this.audioBuffer=[],i.reduce((g,b)=>b.isSpeech?g+1:g,0)>=this.options.minSpeechFrames){const g=l(i.map(b=>b.frame));t({msg:r.Message.SpeechEnd,audio:g})}else t({msg:r.Message.VADMisfire})}if(!this.speaking){for(;this.audioBuffer.length>this.options.preSpeechPadFrames;)this.audioBuffer.shift();this.speechFrameCount=0}},this.audioBuffer=[],this.reset()}}return frameProcessor.FrameProcessor=m,frameProcessor}var nonRealTimeVad={},ortWeb_min={exports:{}};const backends={},backendsSortedByPriority=[],registerBackend=(f,r,c)=>{if(r&&typeof r.init=="function"&&typeof r.createSessionHandler=="function"){const d=backends[f];if(d===void 0)backends[f]={backend:r,priority:c};else{if(d.priority>c)return;if(d.priority===c&&d.backend!==r)throw new Error(`cannot register backend "${f}" using priority ${c}`)}if(c>=0){const l=backendsSortedByPriority.indexOf(f);l!==-1&&backendsSortedByPriority.splice(l,1);for(let m=0;m{const r=f.length===0?backendsSortedByPriority:f,c=[];for(const d of r){const l=backends[d];if(l){if(l.initialized)return l.backend;if(l.aborted)continue;const m=!!l.initPromise;try{return m||(l.initPromise=l.backend.init()),await l.initPromise,l.initialized=!0,l.backend}catch(s){m||c.push({name:d,err:s}),l.aborted=!0}finally{delete l.initPromise}}}throw new Error(`no available backend found. ERR: ${c.map(d=>`[${d.name}] ${d.err}`).join(", ")}`)};class EnvImpl{constructor(){this.wasm={},this.webgl={},this.logLevelInternal="warning"}set logLevel(r){if(r!==void 0){if(typeof r!="string"||["verbose","info","warning","error","fatal"].indexOf(r)===-1)throw new Error(`Unsupported logging level: ${r}`);this.logLevelInternal=r}}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=f=>{let r=1;for(let c=0;c{const t=document.createElement("canvas"),e=t.getContext("2d");if(!r||!e)return o();const n=new Image;n.crossOrigin="Anonymous",n.src=r,n.onload=()=>{t.width=n.width,t.height=n.height,e.drawImage(n,0,0,t.width,t.height);const i=e.getImageData(0,0,t.width,t.height);if(c!==void 0){if(c.height!==void 0&&c.height!==t.height)throw new Error("Image input config height doesn't match ImageBitmap height");if(p.height=t.height,c.width!==void 0&&c.width!==t.width)throw new Error("Image input config width doesn't match ImageBitmap width");p.width=t.width}else p.height=t.height,p.width=t.width;a(St.bufferToTensor(i.data,p))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(h!==void 0)return St.bufferToTensor(h,p);throw new Error("Input data provided is not supported - aborted tensor creation")}toImageData(r){var c,d;const l=document.createElement("canvas").getContext("2d");let m;if(l!=null){const s=this.dims[3],h=this.dims[2],p=this.dims[1],a=r!==void 0&&r.format!==void 0?r.format:"RGB",o=r!==void 0&&((c=r.norm)===null||c===void 0?void 0:c.mean)!==void 0?r.norm.mean:255,t=r!==void 0&&((d=r.norm)===null||d===void 0?void 0:d.bias)!==void 0?r.norm.bias:0,e=h*s;if(r!==void 0){if(r.height!==void 0&&r.height!==h)throw new Error("Image output config height doesn't match tensor height");if(r.width!==void 0&&r.width!==s)throw new Error("Image output config width doesn't match tensor width");if(r.format!==void 0&&p===4&&r.format!=="RGBA"||p===3&&r.format!=="RGB"&&r.format!=="BGR")throw new Error("Tensor format doesn't match input tensor dims")}const n=4;let i=0,u=1,g=2,b=3,y=0,_=e,v=e*2,w=-1;a==="RGBA"?(y=0,_=e,v=e*2,w=e*3):a==="RGB"?(y=0,_=e,v=e*2):a==="RBG"&&(y=0,v=e,_=e*2),m=l.createImageData(s,h);for(let T=0;T"u")throw new Error(`input '${a}' is missing in 'feeds'.`);if(s)for(const a of this.outputNames)l[a]=null;const h=await this.handler.run(r,l,m),p={};for(const a in h)Object.hasOwnProperty.call(h,a)&&(p[a]=new Tensor(h[a].type,h[a].data,h[a].dims));return p}static async create(r,c,d,l){let m,s={};if(typeof r=="string"){if(m=r,typeof c=="object"&&c!==null)s=c;else if(typeof c<"u")throw new TypeError("'options' must be an object.")}else if(r instanceof Uint8Array){if(m=r,typeof c=="object"&&c!==null)s=c;else if(typeof c<"u")throw new TypeError("'options' must be an object.")}else if(r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer){const t=r;let e=0,n=r.byteLength;if(typeof c=="object"&&c!==null)s=c;else if(typeof c=="number"){if(e=c,!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=r.byteLength-e,typeof d=="number"){if(n=d,!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 l=="object"&&l!==null)s=l;else if(typeof l<"u")throw new TypeError("'options' must be an object.")}else if(typeof d<"u")throw new TypeError("'byteLength' must be a number.")}else if(typeof c<"u")throw new TypeError("'options' must be an object.");m=new Uint8Array(t,e,n)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");const p=(s.executionProviders||[]).map(t=>typeof t=="string"?t:t.name),o=await(await resolveBackend(p)).createSessionHandler(m,s);return new fn(o)}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. @@ -6,7 +6,7 @@ import{cQ as getAugmentedNamespace,ai as Color,ah as Vector2,ap as Vector3,at as `),F=S=>b.writeSync(2,S+` `));var q,D=t.print||V,U=t.printErr||F;Object.assign(t,v),v=null,t.thisProgram&&(w=t.thisProgram),t.quit&&(T=t.quit),t.wasmBinary&&(q=t.wasmBinary);var J=t.noExitRuntime||!1;typeof WebAssembly!="object"&&le("no native wasm support detected");var Y,Z,te,he,Me,Te,ue,xe,_e=!1,Le=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function ze(S,O,I){var L=(O>>>=0)+I;for(I=O;S[I]&&!(I>=L);)++I;if(16(B=(240&B)==224?(15&B)<<12|z<<6|Q:(7&B)<<18|z<<12|Q<<6|63&S[O++])?L+=String.fromCharCode(B):(B-=65536,L+=String.fromCharCode(55296|B>>10,56320|1023&B))}}else L+=String.fromCharCode(B)}return L}function Se(S,O){return(S>>>=0)?ze(h(),S,O):""}function De(S,O,I,L){if(!(0>>=0;L=I+L-1;for(var z=0;z=Q&&(Q=65536+((1023&Q)<<10)|1023&S.charCodeAt(++z)),127>=Q){if(I>=L)break;O[I++>>>0]=Q}else{if(2047>=Q){if(I+1>=L)break;O[I++>>>0]=192|Q>>6}else{if(65535>=Q){if(I+2>=L)break;O[I++>>>0]=224|Q>>12}else{if(I+3>=L)break;O[I++>>>0]=240|Q>>18,O[I++>>>0]=128|Q>>12&63}O[I++>>>0]=128|Q>>6&63}O[I++>>>0]=128|63&Q}}return O[I>>>0]=0,I-B}function Re(S){for(var O=0,I=0;I=L?O++:2047>=L?O+=2:55296<=L&&57343>=L?(O+=4,++I):O+=3}return O}function Ae(S){te=S,t.HEAP8=he=new Int8Array(S),t.HEAP16=new Int16Array(S),t.HEAP32=Te=new Int32Array(S),t.HEAPU8=Me=new Uint8Array(S),t.HEAPU16=new Uint16Array(S),t.HEAPU32=ue=new Uint32Array(S),t.HEAPF32=new Float32Array(S),t.HEAPF64=xe=new Float64Array(S)}M&&(te=t.buffer);var we=t.INITIAL_MEMORY||16777216;if(M)Y=t.wasmMemory,te=t.buffer;else if(t.wasmMemory)Y=t.wasmMemory;else if(!((Y=new WebAssembly.Memory({initial:we/65536,maximum:65536,shared:!0})).buffer instanceof SharedArrayBuffer))throw U("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),x&&console.log("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and also use a recent version)"),Error("bad memory");Y&&(te=Y.buffer),we=te.byteLength,Ae(te);var ke,Ue=[],Be=[],We=[],qe=[];function je(){return J||!1}function Ve(){var S=t.preRun.shift();Ue.unshift(S)}var Ee,$e=0,Ye=null;function le(S){throw M?postMessage({cmd:"onAbort",arg:S}):t.onAbort&&t.onAbort(S),U(S="Aborted("+S+")"),_e=!0,S=new WebAssembly.RuntimeError(S+". Build with -sASSERTIONS for more info."),n(S),S}function pt(){return Ee.startsWith("data:application/octet-stream;base64,")}function ut(){var S=Ee;try{if(S==Ee&&q)return new Uint8Array(q);if(g)return g(S);throw"both async and sync fetching of the wasm failed"}catch(O){le(O)}}Ee="ort-wasm-threaded.wasm",pt()||(Ee=k(Ee));var It={};function Ke(S){this.name="ExitStatus",this.message="Program terminated with exit("+S+")",this.status=S}function He(S){(S=ie.Vb[S])||le(),ie.mc(S)}function lt(S){var O=ie.Cc();if(!O)return 6;ie.ac.push(O),ie.Vb[S.Ub]=O,O.Ub=S.Ub;var I={cmd:"run",start_routine:S.Ic,arg:S.zc,pthread_ptr:S.Ub};return O.$b=()=>{I.time=performance.now(),O.postMessage(I,S.Nc)},O.loaded&&(O.$b(),delete O.$b),0}function Ce(S){if(M)return K(1,1,S);je()||(ie.oc(),t.onExit&&t.onExit(S),_e=!0),T(S,new Ke(S))}function nt(S,O){if(!O&&M)throw Et(S),"unwind";je()||M||(Xt(),Je(We),Yt(0),kt[1].length&&Vt(1,10),kt[2].length&&Vt(2,10),ie.oc()),Ce(S)}var ie={Yb:[],ac:[],qc:[],Vb:{},fc:function(){M&&ie.Ec()},Pc:function(){},Ec:function(){ie.receiveObjectTransfer=ie.Gc,ie.threadInitTLS=ie.pc,ie.setExitStatus=ie.nc,J=!1},nc:function(){},oc:function(){for(var S of Object.values(ie.Vb))ie.mc(S);for(S of ie.Yb)S.terminate();ie.Yb=[]},mc:function(S){var O=S.Ub;delete ie.Vb[O],ie.Yb.push(S),ie.ac.splice(ie.ac.indexOf(S),1),S.Ub=0,Ut(O)},Gc:function(){},pc:function(){ie.qc.forEach(S=>S())},Fc:function(S,O){S.onmessage=I=>{var L=(I=I.data).cmd;if(S.Ub&&(ie.Bc=S.Ub),I.targetThread&&I.targetThread!=Ct()){var B=ie.Vb[I.Qc];B?B.postMessage(I,I.transferList):U('Internal error! Worker sent a message "'+L+'" to target pthread '+I.targetThread+", but that thread no longer exists!")}else L==="processProxyingQueue"?N(I.queue):L==="spawnThread"?lt(I):L==="cleanupThread"?He(I.thread):L==="killThread"?(I=I.thread,L=ie.Vb[I],delete ie.Vb[I],L.terminate(),Ut(I),ie.ac.splice(ie.ac.indexOf(L),1),L.Ub=0):L==="cancelThread"?ie.Vb[I.thread].postMessage({cmd:"cancel"}):L==="loaded"?(S.loaded=!0,O&&O(S),S.$b&&(S.$b(),delete S.$b)):L==="print"?D("Thread "+I.threadId+": "+I.text):L==="printErr"?U("Thread "+I.threadId+": "+I.text):L==="alert"?alert("Thread "+I.threadId+": "+I.text):I.target==="setimmediate"?S.postMessage(I):L==="onAbort"?t.onAbort&&t.onAbort(I.arg):L&&U("worker sent an unknown command "+L);ie.Bc=void 0},S.onerror=I=>{throw U("worker sent an error! "+I.filename+":"+I.lineno+": "+I.message),I},x&&(S.on("message",function(I){S.onmessage({data:I})}),S.on("error",function(I){S.onerror(I)}),S.on("detachedExit",function(){})),S.postMessage({cmd:"load",urlOrBlob:t.mainScriptUrlOrBlob||d,wasmMemory:Y,wasmModule:Z})},yc:function(){var S=k("ort-wasm-threaded.worker.js");ie.Yb.push(new Worker(S))},Cc:function(){return ie.Yb.length==0&&(ie.yc(),ie.Fc(ie.Yb[0])),ie.Yb.pop()}};function Je(S){for(;0>2>>>0];S=p()[S+48>>2>>>0],en(O,O-S),ce(O)};var Xe=[];function ye(S){var O=Xe[S];return O||(S>=Xe.length&&(Xe.length=S+1),Xe[S]=O=ke.get(S)),O}t.invokeEntryPoint=function(S,O){S=ye(S)(O),je()?ie.nc(S):Jt(S)};var rt,ct,it=[],oe=0,re=0;function se(S){this.Zb=S,this.Sb=S-24,this.xc=function(O){a()[this.Sb+4>>2>>>0]=O},this.bc=function(){return a()[this.Sb+4>>2>>>0]},this.wc=function(O){a()[this.Sb+8>>2>>>0]=O},this.Dc=function(){return a()[this.Sb+8>>2>>>0]},this.rc=function(){p()[this.Sb>>2>>>0]=0},this.hc=function(O){O=O?1:0,s()[this.Sb+12>>0>>>0]=O},this.uc=function(){return s()[this.Sb+12>>0>>>0]!=0},this.ic=function(O){O=O?1:0,s()[this.Sb+13>>0>>>0]=O},this.kc=function(){return s()[this.Sb+13>>0>>>0]!=0},this.fc=function(O,I){this.cc(0),this.xc(O),this.wc(I),this.rc(),this.hc(!1),this.ic(!1)},this.sc=function(){Atomics.add(p(),this.Sb>>2,1)},this.Hc=function(){return Atomics.sub(p(),this.Sb>>2,1)===1},this.cc=function(O){a()[this.Sb+16>>2>>>0]=O},this.tc=function(){return a()[this.Sb+16>>2>>>0]},this.vc=function(){if(tn(this.bc()))return a()[this.Zb>>2>>>0];var O=this.tc();return O!==0?O:this.Zb}}function ft(S){return qt(new se(S).Sb)}function et(S,O,I,L){return M?K(3,1,S,O,I,L):mt(S,O,I,L)}function mt(S,O,I,L){if(typeof SharedArrayBuffer>"u")return U("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;var B=[];return M&&B.length===0?et(S,O,I,L):(S={Ic:I,Ub:S,zc:L,Nc:B},M?(S.Oc="spawnThread",postMessage(S,B),0):lt(S))}function gt(S,O,I){return M?K(4,1,S,O,I):0}function bt(S,O){if(M)return K(5,1,S,O)}function dt(S,O){if(M)return K(6,1,S,O)}function yt(S,O,I){if(M)return K(7,1,S,O,I)}function _t(S,O,I){return M?K(8,1,S,O,I):0}function vt(S,O){if(M)return K(9,1,S,O)}function wt(S,O,I){if(M)return K(10,1,S,O,I)}function xt(S,O,I,L){if(M)return K(11,1,S,O,I,L)}function ot(S,O,I,L){if(M)return K(12,1,S,O,I,L)}function ht(S,O,I,L){if(M)return K(13,1,S,O,I,L)}function Tt(S){if(M)return K(14,1,S)}function P(S,O){if(M)return K(15,1,S,O)}function R(S,O,I){if(M)return K(16,1,S,O,I)}function N(S){Atomics.store(p(),S>>2,1),Ct()&&Kt(S),Atomics.compareExchange(p(),S>>2,1,0)}function $(S){return a()[S>>>2]+4294967296*p()[S+4>>>2]}function j(S,O,I,L,B,z){return M?K(17,1,S,O,I,L,B,z):-52}function H(S,O,I,L,B,z){if(M)return K(18,1,S,O,I,L,B,z)}function X(S){var O=Re(S)+1,I=$t(O);return I&&De(S,s(),I,O),I}function ee(S,O,I){function L(me){return(me=me.toTimeString().match(/\(([A-Za-z ]+)\)$/))?me[1]:"GMT"}if(M)return K(19,1,S,O,I);var B=new Date().getFullYear(),z=new Date(B,0,1),Q=new Date(B,6,1);B=z.getTimezoneOffset();var ne=Q.getTimezoneOffset(),fe=Math.max(B,ne);p()[S>>2>>>0]=60*fe,p()[O>>2>>>0]=+(B!=ne),S=L(z),O=L(Q),S=X(S),O=X(O),ne>2>>>0]=S,a()[I+4>>2>>>0]=O):(a()[I>>2>>>0]=O,a()[I+4>>2>>>0]=S)}function K(S,O){var I=arguments.length-2,L=arguments;return At(()=>{for(var B=Bt(8*I),z=B>>3,Q=0;Q>>0]=ne}return Zt(S,I,B,O)})}t.executeNotifiedProxyingQueue=N,ct=x?()=>{var S=process.hrtime();return 1e3*S[0]+S[1]/1e6}:M?()=>performance.now()-t.__performance_now_clock_drift:()=>performance.now();var ae,ve=[],Fe={};function Ne(){if(!ae){var S,O={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:w||"./this.program"};for(S in Fe)Fe[S]===void 0?delete O[S]:O[S]=Fe[S];var I=[];for(S in O)I.push(S+"="+O[S]);ae=I}return ae}function G(S,O){if(M)return K(20,1,S,O);var I=0;return Ne().forEach(function(L,B){var z=O+I;for(B=a()[S+4*B>>2>>>0]=z,z=0;z>0>>>0]=L.charCodeAt(z);s()[B>>0>>>0]=0,I+=L.length+1}),0}function ge(S,O){if(M)return K(21,1,S,O);var I=Ne();a()[S>>2>>>0]=I.length;var L=0;return I.forEach(function(B){L+=B.length+1}),a()[O>>2>>>0]=L,0}function Oe(S){return M?K(22,1,S):52}function Qe(S,O,I,L){return M?K(23,1,S,O,I,L):52}function st(S,O,I,L,B){return M?K(24,1,S,O,I,L,B):70}var kt=[null,[],[]];function Vt(S,O){var I=kt[S];O===0||O===10?((S===1?D:U)(ze(I,0)),I.length=0):I.push(O)}function zt(S,O,I,L){if(M)return K(25,1,S,O,I,L);for(var B=0,z=0;z>2>>>0],ne=a()[O+4>>2>>>0];O+=8;for(var fe=0;fe>>0]);B+=ne}return a()[L>>2>>>0]=B,0}var Ge=0;function Dt(S){return S%4==0&&(S%100!=0||S%400==0)}var Ht=[31,29,31,30,31,30,31,31,30,31,30,31],Gt=[31,28,31,30,31,30,31,31,30,31,30,31];function Wt(S,O,I,L){function B(W,be,Pe){for(W=typeof W=="number"?W.toString():W||"";W.lengthOt?-1:0at-W.getDate())){W.setDate(W.getDate()+be);break}be-=at-W.getDate()+1,W.setDate(1),11>Pe?W.setMonth(Pe+1):(W.setMonth(0),W.setFullYear(W.getFullYear()+1))}return Pe=new Date(W.getFullYear()+1,0,4),be=ne(new Date(W.getFullYear(),0,4)),Pe=ne(Pe),0>=Q(be,W)?0>=Q(Pe,W)?W.getFullYear()+1:W.getFullYear():W.getFullYear()-1}var me=p()[L+40>>2>>>0];for(var Ie in L={Lc:p()[L>>2>>>0],Kc:p()[L+4>>2>>>0],dc:p()[L+8>>2>>>0],jc:p()[L+12>>2>>>0],ec:p()[L+16>>2>>>0],Xb:p()[L+20>>2>>>0],Tb:p()[L+24>>2>>>0],Wb:p()[L+28>>2>>>0],Rc:p()[L+32>>2>>>0],Jc:p()[L+36>>2>>>0],Mc:me?Se(me):""},I=Se(I),me={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"})I=I.replace(new RegExp(Ie,"g"),me[Ie]);var tt="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),Ze="January February March April May June July August September October November December".split(" ");for(Ie in me={"%a":function(W){return tt[W.Tb].substring(0,3)},"%A":function(W){return tt[W.Tb]},"%b":function(W){return Ze[W.ec].substring(0,3)},"%B":function(W){return Ze[W.ec]},"%C":function(W){return z((W.Xb+1900)/100|0,2)},"%d":function(W){return z(W.jc,2)},"%e":function(W){return B(W.jc,2," ")},"%g":function(W){return fe(W).toString().substring(2)},"%G":function(W){return fe(W)},"%H":function(W){return z(W.dc,2)},"%I":function(W){return(W=W.dc)==0?W=12:12W.dc?"AM":"PM"},"%S":function(W){return z(W.Lc,2)},"%t":function(){return" "},"%u":function(W){return W.Tb||7},"%U":function(W){return z(Math.floor((W.Wb+7-W.Tb)/7),2)},"%V":function(W){var be=Math.floor((W.Wb+7-(W.Tb+6)%7)/7);if(2>=(W.Tb+371-W.Wb-2)%7&&be++,be)be==53&&((Pe=(W.Tb+371-W.Wb)%7)==4||Pe==3&&Dt(W.Xb)||(be=1));else{be=52;var Pe=(W.Tb+7-W.Wb-1)%7;(Pe==4||Pe==5&&Dt(W.Xb%400-1))&&be++}return z(be,2)},"%w":function(W){return W.Tb},"%W":function(W){return z(Math.floor((W.Wb+7-(W.Tb+6)%7)/7),2)},"%y":function(W){return(W.Xb+1900).toString().substring(2)},"%Y":function(W){return W.Xb+1900},"%z":function(W){var be=0<=(W=W.Jc);return W=Math.abs(W)/60,(be?"+":"-")+("0000"+(W/60*100+W%60)).slice(-4)},"%Z":function(W){return W.Mc},"%%":function(){return"%"}},I=I.replace(/%%/g,"\0\0"),me)I.includes(Ie)&&(I=I.replace(new RegExp(Ie,"g"),me[Ie](L)));return Ie=function(W){var be=Array(Re(W)+1);return De(W,be,0,be.length),be}(I=I.replace(/\0\0/g,"%")),Ie.length>O?0:(function(W,be){s().set(W,be>>>0)}(Ie,S),Ie.length-1)}ie.fc();var Tn=[null,Ce,Et,et,gt,bt,dt,yt,_t,vt,wt,xt,ot,ht,Tt,P,R,j,H,ee,G,ge,Oe,Qe,st,zt],Sn={b:function(S){return $t(S+24)+24},n:function(S){return(S=new se(S)).uc()||(S.hc(!0),oe--),S.ic(!1),it.push(S),S.sc(),S.vc()},ma:function(S){throw U("Unexpected exception thrown, this is not properly supported - aborting"),_e=!0,S},x:function(){pe(0);var S=it.pop();if(S.Hc()&&!S.kc()){var O=S.Dc();O&&ye(O)(S.Zb),ft(S.Zb)}re=0},e:function(){var S=re;if(!S)return Ge=0;var O=new se(S);O.cc(S);var I=O.bc();if(!I)return Ge=0,S;for(var L=Array.prototype.slice.call(arguments),B=0;BN(L));else if(M)postMessage({targetThread:S,cmd:"processProxyingQueue",queue:L});else{if(!(S=ie.Vb[S]))return;S.postMessage({cmd:"processProxyingQueue",queue:L})}return 1},Ea:function(){return-1},Pa:function(S,O){S=new Date(1e3*$(S)),p()[O>>2>>>0]=S.getUTCSeconds(),p()[O+4>>2>>>0]=S.getUTCMinutes(),p()[O+8>>2>>>0]=S.getUTCHours(),p()[O+12>>2>>>0]=S.getUTCDate(),p()[O+16>>2>>>0]=S.getUTCMonth(),p()[O+20>>2>>>0]=S.getUTCFullYear()-1900,p()[O+24>>2>>>0]=S.getUTCDay(),S=(S.getTime()-Date.UTC(S.getUTCFullYear(),0,1,0,0,0,0))/864e5|0,p()[O+28>>2>>>0]=S},Qa:function(S,O){S=new Date(1e3*$(S)),p()[O>>2>>>0]=S.getSeconds(),p()[O+4>>2>>>0]=S.getMinutes(),p()[O+8>>2>>>0]=S.getHours(),p()[O+12>>2>>>0]=S.getDate(),p()[O+16>>2>>>0]=S.getMonth(),p()[O+20>>2>>>0]=S.getFullYear()-1900,p()[O+24>>2>>>0]=S.getDay();var I=new Date(S.getFullYear(),0,1),L=(S.getTime()-I.getTime())/864e5|0;p()[O+28>>2>>>0]=L,p()[O+36>>2>>>0]=-60*S.getTimezoneOffset(),L=new Date(S.getFullYear(),6,1).getTimezoneOffset(),S=0|(L!=(I=I.getTimezoneOffset())&&S.getTimezoneOffset()==Math.min(I,L)),p()[O+32>>2>>>0]=S},Ra:function(S){var O=new Date(p()[S+20>>2>>>0]+1900,p()[S+16>>2>>>0],p()[S+12>>2>>>0],p()[S+8>>2>>>0],p()[S+4>>2>>>0],p()[S>>2>>>0],0),I=p()[S+32>>2>>>0],L=O.getTimezoneOffset(),B=new Date(O.getFullYear(),0,1),z=new Date(O.getFullYear(),6,1).getTimezoneOffset(),Q=B.getTimezoneOffset(),ne=Math.min(Q,z);return 0>I?p()[S+32>>2>>>0]=+(z!=Q&&ne==L):0>2>>>0]=O.getDay(),I=(O.getTime()-B.getTime())/864e5|0,p()[S+28>>2>>>0]=I,p()[S>>2>>>0]=O.getSeconds(),p()[S+4>>2>>>0]=O.getMinutes(),p()[S+8>>2>>>0]=O.getHours(),p()[S+12>>2>>>0]=O.getDate(),p()[S+16>>2>>>0]=O.getMonth(),O.getTime()/1e3|0},Aa:j,Ba:H,Sa:function S(O,I,L){S.Ac||(S.Ac=!0,ee(O,I,L))},y:function(){le("")},U:function(){if(!x&&!E){var S="Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread";rt||(rt={}),rt[S]||(rt[S]=1,x&&(S="warning: "+S),U(S))}},ra:function(){return 4294901760},B:ct,Ia:function(S,O,I){h().copyWithin(S>>>0,O>>>0,O+I>>>0)},F:function(){return x?c(3993).cpus().length:navigator.hardwareConcurrency},Da:function(S,O,I){ve.length=O,I>>=3;for(var L=0;L>>0];return(0>S?It[-S-1]:Tn[S]).apply(null,ve)},qa:function(S){var O=h().length;if((S>>>=0)<=O||4294901760=I;I*=2){var L=O*(1+.2/I);L=Math.min(L,S+100663296);var B=Math;L=Math.max(S,L),B=B.min.call(B,4294901760,L+(65536-L%65536)%65536);e:{try{Y.grow(B-te.byteLength+65535>>>16),Ae(Y.buffer);var z=1;break e}catch{}z=void 0}if(z)return!0}return!1},Na:function(){throw"unwind"},Ga:G,Ha:ge,J:nt,I:Oe,S:Qe,ga:st,R:zt,d:function(){return Ge},na:function S(O,I){S.lc||(S.lc=function(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var B=new Uint8Array(1);return()=>(crypto.getRandomValues(B),B[0])}if(x)try{var z=c(Object(function(){var Q=new Error("Cannot find module 'crypto'");throw Q.code="MODULE_NOT_FOUND",Q}()));return()=>z.randomBytes(1)[0]}catch{}return()=>le("randomDevice")}());for(var L=0;L>0>>>0]=S.lc();return 0},ia:function(S,O,I){var L=de();try{return ye(S)(O,I)}catch(B){if(ce(L),B!==B+0)throw B;pe(1,0)}},ja:function(S,O,I){var L=de();try{return ye(S)(O,I)}catch(B){if(ce(L),B!==B+0)throw B;pe(1,0)}},K:function(S){var O=de();try{return ye(S)()}catch(I){if(ce(O),I!==I+0)throw I;pe(1,0)}},f:function(S,O){var I=de();try{return ye(S)(O)}catch(L){if(ce(I),L!==L+0)throw L;pe(1,0)}},P:function(S,O,I){var L=de();try{return ye(S)(O,I)}catch(B){if(ce(L),B!==B+0)throw B;pe(1,0)}},Q:function(S,O,I){var L=de();try{return ye(S)(O,I)}catch(B){if(ce(L),B!==B+0)throw B;pe(1,0)}},k:function(S,O,I){var L=de();try{return ye(S)(O,I)}catch(B){if(ce(L),B!==B+0)throw B;pe(1,0)}},p:function(S,O,I,L){var B=de();try{return ye(S)(O,I,L)}catch(z){if(ce(B),z!==z+0)throw z;pe(1,0)}},q:function(S,O,I,L,B){var z=de();try{return ye(S)(O,I,L,B)}catch(Q){if(ce(z),Q!==Q+0)throw Q;pe(1,0)}},N:function(S,O,I,L,B,z){var Q=de();try{return ye(S)(O,I,L,B,z)}catch(ne){if(ce(Q),ne!==ne+0)throw ne;pe(1,0)}},s:function(S,O,I,L,B,z){var Q=de();try{return ye(S)(O,I,L,B,z)}catch(ne){if(ce(Q),ne!==ne+0)throw ne;pe(1,0)}},w:function(S,O,I,L,B,z,Q){var ne=de();try{return ye(S)(O,I,L,B,z,Q)}catch(fe){if(ce(ne),fe!==fe+0)throw fe;pe(1,0)}},L:function(S,O,I,L,B,z,Q,ne){var fe=de();try{return ye(S)(O,I,L,B,z,Q,ne)}catch(me){if(ce(fe),me!==me+0)throw me;pe(1,0)}},E:function(S,O,I,L,B,z,Q,ne,fe,me,Ie,tt){var Ze=de();try{return ye(S)(O,I,L,B,z,Q,ne,fe,me,Ie,tt)}catch(W){if(ce(Ze),W!==W+0)throw W;pe(1,0)}},aa:function(S,O,I,L,B,z,Q,ne){var fe=de();try{return dn(S,O,I,L,B,z,Q,ne)}catch(me){if(ce(fe),me!==me+0)throw me;pe(1,0)}},_:function(S,O,I,L,B,z,Q){var ne=de();try{return rn(S,O,I,L,B,z,Q)}catch(fe){if(ce(ne),fe!==fe+0)throw fe;pe(1,0)}},Z:function(S,O,I,L,B){var z=de();try{return hn(S,O,I,L,B)}catch(Q){if(ce(z),Q!==Q+0)throw Q;pe(1,0)}},ca:function(S,O,I,L){var B=de();try{return ln(S,O,I,L)}catch(z){if(ce(B),z!==z+0)throw z;pe(1,0)}},$:function(S){var O=de();try{return nn(S)}catch(I){if(ce(O),I!==I+0)throw I;pe(1,0)}},ba:function(S,O){var I=de();try{return cn(S,O)}catch(L){if(ce(I),L!==L+0)throw L;pe(1,0)}},Y:function(S,O,I){var L=de();try{return on(S,O,I)}catch(B){if(ce(L),B!==B+0)throw B;pe(1,0)}},g:function(S){var O=de();try{ye(S)()}catch(I){if(ce(O),I!==I+0)throw I;pe(1,0)}},r:function(S,O){var I=de();try{ye(S)(O)}catch(L){if(ce(I),L!==L+0)throw L;pe(1,0)}},i:function(S,O,I){var L=de();try{ye(S)(O,I)}catch(B){if(ce(L),B!==B+0)throw B;pe(1,0)}},ha:function(S,O,I,L){var B=de();try{ye(S)(O,I,L)}catch(z){if(ce(B),z!==z+0)throw z;pe(1,0)}},m:function(S,O,I,L){var B=de();try{ye(S)(O,I,L)}catch(z){if(ce(B),z!==z+0)throw z;pe(1,0)}},v:function(S,O,I,L,B){var z=de();try{ye(S)(O,I,L,B)}catch(Q){if(ce(z),Q!==Q+0)throw Q;pe(1,0)}},u:function(S,O,I,L,B,z){var Q=de();try{ye(S)(O,I,L,B,z)}catch(ne){if(ce(Q),ne!==ne+0)throw ne;pe(1,0)}},O:function(S,O,I,L,B,z,Q){var ne=de();try{ye(S)(O,I,L,B,z,Q)}catch(fe){if(ce(ne),fe!==fe+0)throw fe;pe(1,0)}},A:function(S,O,I,L,B,z,Q,ne){var fe=de();try{ye(S)(O,I,L,B,z,Q,ne)}catch(me){if(ce(fe),me!==me+0)throw me;pe(1,0)}},ka:function(S,O,I,L,B,z,Q,ne,fe){var me=de();try{ye(S)(O,I,L,B,z,Q,ne,fe)}catch(Ie){if(ce(me),Ie!==Ie+0)throw Ie;pe(1,0)}},C:function(S,O,I,L,B,z,Q,ne,fe,me,Ie){var tt=de();try{ye(S)(O,I,L,B,z,Q,ne,fe,me,Ie)}catch(Ze){if(ce(tt),Ze!==Ze+0)throw Ze;pe(1,0)}},D:function(S,O,I,L,B,z,Q,ne,fe,me,Ie,tt,Ze,W,be,Pe){var at=de();try{ye(S)(O,I,L,B,z,Q,ne,fe,me,Ie,tt,Ze,W,be,Pe)}catch(Ot){if(ce(at),Ot!==Ot+0)throw Ot;pe(1,0)}},fa:function(S,O,I,L,B,z,Q,ne){var fe=de();try{sn(S,O,I,L,B,z,Q,ne)}catch(me){if(ce(fe),me!==me+0)throw me;pe(1,0)}},da:function(S,O,I,L,B,z,Q,ne,fe,me,Ie,tt){var Ze=de();try{un(S,O,I,L,B,z,Q,ne,fe,me,Ie,tt)}catch(W){if(ce(Ze),W!==W+0)throw W;pe(1,0)}},ea:function(S,O,I,L,B,z){var Q=de();try{an(S,O,I,L,B,z)}catch(ne){if(ce(Q),ne!==ne+0)throw ne;pe(1,0)}},o:function(S){return S},a:Y||t.wasmMemory,G:function(S){Ge=S},la:Wt,z:function(S,O,I,L){return Wt(S,O,I,L)}};(function(){function S(B,z){t.asm=B.exports,ie.qc.push(t.asm.sb),ke=t.asm.ub,Be.unshift(t.asm.Va),Z=z,M||($e--,t.monitorRunDependencies&&t.monitorRunDependencies($e),$e==0&&Ye&&(B=Ye,Ye=null,B()))}function O(B){S(B.instance,B.module)}function I(B){return function(){if(!q&&(A||E)){if(typeof fetch=="function"&&!Ee.startsWith("file://"))return fetch(Ee,{credentials:"same-origin"}).then(function(z){if(!z.ok)throw"failed to load wasm binary file at '"+Ee+"'";return z.arrayBuffer()}).catch(function(){return ut()});if(u)return new Promise(function(z,Q){u(Ee,function(ne){z(new Uint8Array(ne))},Q)})}return Promise.resolve().then(function(){return ut()})}().then(function(z){return WebAssembly.instantiate(z,L)}).then(function(z){return z}).then(B,function(z){U("failed to asynchronously prepare wasm: "+z),le(z)})}var L={a:Sn};if(M||($e++,t.monitorRunDependencies&&t.monitorRunDependencies($e)),t.instantiateWasm)try{return t.instantiateWasm(L,S)}catch(B){return U("Module.instantiateWasm callback failed with error: "+B),!1}(q||typeof WebAssembly.instantiateStreaming!="function"||pt()||Ee.startsWith("file://")||x||typeof fetch!="function"?I(O):fetch(Ee,{credentials:"same-origin"}).then(function(B){return WebAssembly.instantiateStreaming(B,L).then(O,function(z){return U("wasm streaming compile failed: "+z),U("falling back to ArrayBuffer instantiation"),I(O)})})).catch(n)})(),t.___wasm_call_ctors=function(){return(t.___wasm_call_ctors=t.asm.Va).apply(null,arguments)},t._OrtInit=function(){return(t._OrtInit=t.asm.Wa).apply(null,arguments)},t._OrtCreateSessionOptions=function(){return(t._OrtCreateSessionOptions=t.asm.Xa).apply(null,arguments)},t._OrtAppendExecutionProvider=function(){return(t._OrtAppendExecutionProvider=t.asm.Ya).apply(null,arguments)},t._OrtAddSessionConfigEntry=function(){return(t._OrtAddSessionConfigEntry=t.asm.Za).apply(null,arguments)},t._OrtReleaseSessionOptions=function(){return(t._OrtReleaseSessionOptions=t.asm._a).apply(null,arguments)},t._OrtCreateSession=function(){return(t._OrtCreateSession=t.asm.$a).apply(null,arguments)},t._OrtReleaseSession=function(){return(t._OrtReleaseSession=t.asm.ab).apply(null,arguments)},t._OrtGetInputCount=function(){return(t._OrtGetInputCount=t.asm.bb).apply(null,arguments)},t._OrtGetOutputCount=function(){return(t._OrtGetOutputCount=t.asm.cb).apply(null,arguments)},t._OrtGetInputName=function(){return(t._OrtGetInputName=t.asm.db).apply(null,arguments)},t._OrtGetOutputName=function(){return(t._OrtGetOutputName=t.asm.eb).apply(null,arguments)},t._OrtFree=function(){return(t._OrtFree=t.asm.fb).apply(null,arguments)},t._OrtCreateTensor=function(){return(t._OrtCreateTensor=t.asm.gb).apply(null,arguments)},t._OrtGetTensorData=function(){return(t._OrtGetTensorData=t.asm.hb).apply(null,arguments)},t._OrtReleaseTensor=function(){return(t._OrtReleaseTensor=t.asm.ib).apply(null,arguments)},t._OrtCreateRunOptions=function(){return(t._OrtCreateRunOptions=t.asm.jb).apply(null,arguments)},t._OrtAddRunConfigEntry=function(){return(t._OrtAddRunConfigEntry=t.asm.kb).apply(null,arguments)},t._OrtReleaseRunOptions=function(){return(t._OrtReleaseRunOptions=t.asm.lb).apply(null,arguments)},t._OrtRun=function(){return(t._OrtRun=t.asm.mb).apply(null,arguments)},t._OrtEndProfiling=function(){return(t._OrtEndProfiling=t.asm.nb).apply(null,arguments)};var Ct=t._pthread_self=function(){return(Ct=t._pthread_self=t.asm.ob).apply(null,arguments)},$t=t._malloc=function(){return($t=t._malloc=t.asm.pb).apply(null,arguments)},qt=t._free=function(){return(qt=t._free=t.asm.qb).apply(null,arguments)},Yt=t._fflush=function(){return(Yt=t._fflush=t.asm.rb).apply(null,arguments)};t.__emscripten_tls_init=function(){return(t.__emscripten_tls_init=t.asm.sb).apply(null,arguments)};var Xt=t.___funcs_on_exit=function(){return(Xt=t.___funcs_on_exit=t.asm.tb).apply(null,arguments)},Qt=t.__emscripten_thread_init=function(){return(Qt=t.__emscripten_thread_init=t.asm.vb).apply(null,arguments)};t.__emscripten_thread_crashed=function(){return(t.__emscripten_thread_crashed=t.asm.wb).apply(null,arguments)};var Lt,Zt=t._emscripten_run_in_main_runtime_thread_js=function(){return(Zt=t._emscripten_run_in_main_runtime_thread_js=t.asm.xb).apply(null,arguments)},Kt=t.__emscripten_proxy_execute_task_queue=function(){return(Kt=t.__emscripten_proxy_execute_task_queue=t.asm.yb).apply(null,arguments)},Ut=t.__emscripten_thread_free_data=function(){return(Ut=t.__emscripten_thread_free_data=t.asm.zb).apply(null,arguments)},Jt=t.__emscripten_thread_exit=function(){return(Jt=t.__emscripten_thread_exit=t.asm.Ab).apply(null,arguments)},pe=t._setThrew=function(){return(pe=t._setThrew=t.asm.Bb).apply(null,arguments)},en=t._emscripten_stack_set_limits=function(){return(en=t._emscripten_stack_set_limits=t.asm.Cb).apply(null,arguments)},de=t.stackSave=function(){return(de=t.stackSave=t.asm.Db).apply(null,arguments)},ce=t.stackRestore=function(){return(ce=t.stackRestore=t.asm.Eb).apply(null,arguments)},Bt=t.stackAlloc=function(){return(Bt=t.stackAlloc=t.asm.Fb).apply(null,arguments)},Nt=t.___cxa_can_catch=function(){return(Nt=t.___cxa_can_catch=t.asm.Gb).apply(null,arguments)},tn=t.___cxa_is_pointer_type=function(){return(tn=t.___cxa_is_pointer_type=t.asm.Hb).apply(null,arguments)},nn=t.dynCall_j=function(){return(nn=t.dynCall_j=t.asm.Ib).apply(null,arguments)},rn=t.dynCall_iiiiij=function(){return(rn=t.dynCall_iiiiij=t.asm.Jb).apply(null,arguments)},on=t.dynCall_jii=function(){return(on=t.dynCall_jii=t.asm.Kb).apply(null,arguments)},sn=t.dynCall_viiiiij=function(){return(sn=t.dynCall_viiiiij=t.asm.Lb).apply(null,arguments)},an=t.dynCall_vjji=function(){return(an=t.dynCall_vjji=t.asm.Mb).apply(null,arguments)},un=t.dynCall_viiijjjii=function(){return(un=t.dynCall_viiijjjii=t.asm.Nb).apply(null,arguments)},ln=t.dynCall_iij=function(){return(ln=t.dynCall_iij=t.asm.Ob).apply(null,arguments)},cn=t.dynCall_ji=function(){return(cn=t.dynCall_ji=t.asm.Pb).apply(null,arguments)},dn=t.dynCall_iiiiiij=function(){return(dn=t.dynCall_iiiiiij=t.asm.Qb).apply(null,arguments)},hn=t.dynCall_iiij=function(){return(hn=t.dynCall_iiij=t.asm.Rb).apply(null,arguments)};function pn(){function S(){if(!Lt&&(Lt=!0,t.calledRun=!0,!_e)&&(M||Je(Be),e(t),t.onRuntimeInitialized&&t.onRuntimeInitialized(),!M)){if(t.postRun)for(typeof t.postRun=="function"&&(t.postRun=[t.postRun]);t.postRun.length;){var O=t.postRun.shift();qe.unshift(O)}Je(qe)}}if(!(0<$e))if(M)e(t),M||Je(Be),postMessage({cmd:"loaded"});else{if(t.preRun)for(typeof t.preRun=="function"&&(t.preRun=[t.preRun]);t.preRun.length;)Ve();Je(Ue),0<$e||(t.setStatus?(t.setStatus("Running..."),setTimeout(function(){setTimeout(function(){t.setStatus("")},1),S()},1)):S())}}if(t.UTF8ToString=Se,t.stringToUTF8=function(S,O,I){return De(S,h(),O,I)},t.lengthBytesUTF8=Re,t.keepRuntimeAlive=je,t.wasmMemory=Y,t.stackSave=de,t.stackRestore=ce,t.stackAlloc=Bt,t.ExitStatus=Ke,t.PThread=ie,Ye=function S(){Lt||pn(),Lt||(Ye=S)},t.preInit)for(typeof t.preInit=="function"&&(t.preInit=[t.preInit]);0{var d,l=(d=(d=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0)||"/index.js",function(m){var s,h,p;m=m||{},s||(s=m!==void 0?m:{}),s.ready=new Promise(function(P,R){h=P,p=R});var a,o,t,e,n,i,u=Object.assign({},s),g="./this.program",b=(P,R)=>{throw R},y=typeof window=="object",_=typeof importScripts=="function",v=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",w="";v?(w=_?c(908).dirname(w)+"/":"//",i=()=>{n||(e=c(1384),n=c(908))},a=function(P,R){return i(),P=n.normalize(P),e.readFileSync(P,R?void 0:"utf8")},t=P=>((P=a(P,!0)).buffer||(P=new Uint8Array(P)),P),o=(P,R,N)=>{i(),P=n.normalize(P),e.readFile(P,function($,j){$?N($):R(j.buffer)})},1{if(x||0{var R=new XMLHttpRequest;return R.open("GET",P,!1),R.send(null),R.responseText},_&&(t=P=>{var R=new XMLHttpRequest;return R.open("GET",P,!1),R.responseType="arraybuffer",R.send(null),new Uint8Array(R.response)}),o=(P,R,N)=>{var $=new XMLHttpRequest;$.open("GET",P,!0),$.responseType="arraybuffer",$.onload=()=>{$.status==200||$.status==0&&$.response?R($.response):N()},$.onerror=N,$.send(null)});var T,A=s.print||console.log.bind(console),E=s.printErr||console.warn.bind(console);Object.assign(s,u),u=null,s.thisProgram&&(g=s.thisProgram),s.quit&&(b=s.quit),s.wasmBinary&&(T=s.wasmBinary);var x=s.noExitRuntime||!1;typeof WebAssembly!="object"&&Ae("no native wasm support detected");var M,C,k,V,F,q,D=!1,U=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function J(P,R,N){var $=(R>>>=0)+N;for(N=R;P[N]&&!(N>=$);)++N;if(16(j=(240&j)==224?(15&j)<<12|H<<6|X:(7&j)<<18|H<<12|X<<6|63&P[R++])?$+=String.fromCharCode(j):(j-=65536,$+=String.fromCharCode(55296|j>>10,56320|1023&j))}}else $+=String.fromCharCode(j)}return $}function Y(P,R){return(P>>>=0)?J(V,P,R):""}function Z(P,R,N,$){if(!(0<$))return 0;var j=N>>>=0;$=N+$-1;for(var H=0;H=X&&(X=65536+((1023&X)<<10)|1023&P.charCodeAt(++H)),127>=X){if(N>=$)break;R[N++>>>0]=X}else{if(2047>=X){if(N+1>=$)break;R[N++>>>0]=192|X>>6}else{if(65535>=X){if(N+2>=$)break;R[N++>>>0]=224|X>>12}else{if(N+3>=$)break;R[N++>>>0]=240|X>>18,R[N++>>>0]=128|X>>12&63}R[N++>>>0]=128|X>>6&63}R[N++>>>0]=128|63&X}}return R[N>>>0]=0,N-j}function te(P){for(var R=0,N=0;N=$?R++:2047>=$?R+=2:55296<=$&&57343>=$?(R+=4,++N):R+=3}return R}function he(){var P=M.buffer;C=P,s.HEAP8=k=new Int8Array(P),s.HEAP16=new Int16Array(P),s.HEAP32=F=new Int32Array(P),s.HEAPU8=V=new Uint8Array(P),s.HEAPU16=new Uint16Array(P),s.HEAPU32=q=new Uint32Array(P),s.HEAPF32=new Float32Array(P),s.HEAPF64=new Float64Array(P)}var Me,Te=[],ue=[],xe=[],_e=[],Le=0;function ze(){var P=s.preRun.shift();Te.unshift(P)}var Se,De=0,Re=null;function Ae(P){throw s.onAbort&&s.onAbort(P),E(P="Aborted("+P+")"),D=!0,P=new WebAssembly.RuntimeError(P+". Build with -sASSERTIONS for more info."),p(P),P}function we(){return Se.startsWith("data:application/octet-stream;base64,")}if(Se="ort-wasm.wasm",!we()){var ke=Se;Se=s.locateFile?s.locateFile(ke,w):w+ke}function Ue(){var P=Se;try{if(P==Se&&T)return new Uint8Array(T);if(t)return t(P);throw"both async and sync fetching of the wasm failed"}catch(R){Ae(R)}}function Be(P){this.name="ExitStatus",this.message="Program terminated with exit("+P+")",this.status=P}function We(P){for(;0>2>>>0]=R},this.Eb=function(){return q[this.zb+4>>2>>>0]},this.Sb=function(R){q[this.zb+8>>2>>>0]=R},this.Wb=function(){return q[this.zb+8>>2>>>0]},this.Tb=function(){F[this.zb>>2>>>0]=0},this.Ib=function(R){k[this.zb+12>>0>>>0]=R?1:0},this.Pb=function(){return k[this.zb+12>>0>>>0]!=0},this.Jb=function(R){k[this.zb+13>>0>>>0]=R?1:0},this.Lb=function(){return k[this.zb+13>>0>>>0]!=0},this.Rb=function(R,N){this.Fb(0),this.Ub(R),this.Sb(N),this.Tb(),this.Ib(!1),this.Jb(!1)},this.Nb=function(){F[this.zb>>2>>>0]+=1},this.Xb=function(){var R=F[this.zb>>2>>>0];return F[this.zb>>2>>>0]=R-1,R===1},this.Fb=function(R){q[this.zb+16>>2>>>0]=R},this.Ob=function(){return q[this.zb+16>>2>>>0]},this.Qb=function(){if(mt(this.Eb()))return q[this.Db>>2>>>0];var R=this.Ob();return R!==0?R:this.Db}}function $e(P){return rt(new Ee(P).zb)}var Ye=[];function le(P){var R=Ye[P];return R||(P>=Ye.length&&(Ye.length=P+1),Ye[P]=R=Me.get(P)),R}function pt(P){var R=te(P)+1,N=ye(R);return N&&Z(P,k,N,R),N}var ut={};function It(){if(!Ke){var P,R={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:g||"./this.program"};for(P in ut)ut[P]===void 0?delete R[P]:R[P]=ut[P];var N=[];for(P in R)N.push(P+"="+R[P]);Ke=N}return Ke}var Ke,He=[null,[],[]];function lt(P,R){var N=He[P];R===0||R===10?((P===1?A:E)(J(N,0)),N.length=0):N.push(R)}var Ce=0;function nt(P){return P%4==0&&(P%100!=0||P%400==0)}var ie=[31,29,31,30,31,30,31,31,30,31,30,31],Je=[31,28,31,30,31,30,31,31,30,31,30,31];function At(P,R,N,$){function j(G,ge,Oe){for(G=typeof G=="number"?G.toString():G||"";G.lengthst?-1:0Qe-G.getDate())){G.setDate(G.getDate()+ge);break}ge-=Qe-G.getDate()+1,G.setDate(1),11>Oe?G.setMonth(Oe+1):(G.setMonth(0),G.setFullYear(G.getFullYear()+1))}return Oe=new Date(G.getFullYear()+1,0,4),ge=ee(new Date(G.getFullYear(),0,4)),Oe=ee(Oe),0>=X(ge,G)?0>=X(Oe,G)?G.getFullYear()+1:G.getFullYear():G.getFullYear()-1}var ae=F[$+40>>2>>>0];for(var ve in $={$b:F[$>>2>>>0],Zb:F[$+4>>2>>>0],Gb:F[$+8>>2>>>0],Kb:F[$+12>>2>>>0],Hb:F[$+16>>2>>>0],Cb:F[$+20>>2>>>0],Ab:F[$+24>>2>>>0],Bb:F[$+28>>2>>>0],bc:F[$+32>>2>>>0],Yb:F[$+36>>2>>>0],ac:ae?Y(ae):""},N=Y(N),ae={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"})N=N.replace(new RegExp(ve,"g"),ae[ve]);var Fe="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),Ne="January February March April May June July August September October November December".split(" ");for(ve in ae={"%a":function(G){return Fe[G.Ab].substring(0,3)},"%A":function(G){return Fe[G.Ab]},"%b":function(G){return Ne[G.Hb].substring(0,3)},"%B":function(G){return Ne[G.Hb]},"%C":function(G){return H((G.Cb+1900)/100|0,2)},"%d":function(G){return H(G.Kb,2)},"%e":function(G){return j(G.Kb,2," ")},"%g":function(G){return K(G).toString().substring(2)},"%G":function(G){return K(G)},"%H":function(G){return H(G.Gb,2)},"%I":function(G){return(G=G.Gb)==0?G=12:12G.Gb?"AM":"PM"},"%S":function(G){return H(G.$b,2)},"%t":function(){return" "},"%u":function(G){return G.Ab||7},"%U":function(G){return H(Math.floor((G.Bb+7-G.Ab)/7),2)},"%V":function(G){var ge=Math.floor((G.Bb+7-(G.Ab+6)%7)/7);if(2>=(G.Ab+371-G.Bb-2)%7&&ge++,ge)ge==53&&((Oe=(G.Ab+371-G.Bb)%7)==4||Oe==3&&nt(G.Cb)||(ge=1));else{ge=52;var Oe=(G.Ab+7-G.Bb-1)%7;(Oe==4||Oe==5&&nt(G.Cb%400-1))&&ge++}return H(ge,2)},"%w":function(G){return G.Ab},"%W":function(G){return H(Math.floor((G.Bb+7-(G.Ab+6)%7)/7),2)},"%y":function(G){return(G.Cb+1900).toString().substring(2)},"%Y":function(G){return G.Cb+1900},"%z":function(G){var ge=0<=(G=G.Yb);return G=Math.abs(G)/60,(ge?"+":"-")+("0000"+(G/60*100+G%60)).slice(-4)},"%Z":function(G){return G.ac},"%%":function(){return"%"}},N=N.replace(/%%/g,"\0\0"),ae)N.includes(ve)&&(N=N.replace(new RegExp(ve,"g"),ae[ve]($)));return ve=function(G){var ge=Array(te(G)+1);return Z(G,ge,0,ge.length),ge}(N=N.replace(/\0\0/g,"%")),ve.length>R?0:(k.set(ve,P>>>0),ve.length-1)}var Et={a:function(P){return ye(P+24)+24},m:function(P){return(P=new Ee(P)).Pb()||(P.Ib(!0),je--),P.Jb(!1),qe.push(P),P.Nb(),P.Qb()},ia:function(P){throw E("Unexpected exception thrown, this is not properly supported - aborting"),D=!0,P},w:function(){oe(0);var P=qe.pop();if(P.Xb()&&!P.Lb()){var R=P.Wb();R&&le(R)(P.Db),$e(P.Db)}Ve=0},d:function(){var P=Ve;if(!P)return Ce=0;var R=new Ee(P);R.Fb(P);var N=R.Eb();if(!N)return Ce=0,P;for(var $=Array.prototype.slice.call(arguments),j=0;j<$.length;j++){var H=$[j];if(H===0||H===N)break;if(et(H,N,R.zb+16))return Ce=H,P}return Ce=N,P},k:function(){var P=Ve;if(!P)return Ce=0;var R=new Ee(P);R.Fb(P);var N=R.Eb();if(!N)return Ce=0,P;for(var $=Array.prototype.slice.call(arguments),j=0;j<$.length;j++){var H=$[j];if(H===0||H===N)break;if(et(H,N,R.zb+16))return Ce=H,P}return Ce=N,P},g:function(){var P=Ve;if(!P)return Ce=0;var R=new Ee(P);R.Fb(P);var N=R.Eb();if(!N)return Ce=0,P;for(var $=Array.prototype.slice.call(arguments),j=0;j<$.length;j++){var H=$[j];if(H===0||H===N)break;if(et(H,N,R.zb+16))return Ce=H,P}return Ce=N,P},s:$e,L:function(){var P=qe.pop();P||Ae("no exception to throw");var R=P.Db;throw P.Lb()||(qe.push(P),P.Jb(!0),P.Ib(!1),je++),Ve=R,R},b:function(P,R,N){throw new Ee(P).Rb(R,N),Ve=P,je++,P},la:function(){return je},i:function(P){throw Ve||(Ve=P),P},H:function(){return 0},Ba:function(){},pa:function(){},ra:function(){},ka:function(){return 0},za:function(){},ua:function(){},ya:function(){},R:function(){},qa:function(){},na:function(){},Aa:function(){},oa:function(){},Ha:function(){},Ja:function(){Ae("To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking")},Ia:function(){Ae("To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking")},S:function(){return Date.now()},Ca:function(){return!0},Da:function(P,R){P=new Date(1e3*(q[P>>>2]+4294967296*F[P+4>>>2])),F[R>>2>>>0]=P.getUTCSeconds(),F[R+4>>2>>>0]=P.getUTCMinutes(),F[R+8>>2>>>0]=P.getUTCHours(),F[R+12>>2>>>0]=P.getUTCDate(),F[R+16>>2>>>0]=P.getUTCMonth(),F[R+20>>2>>>0]=P.getUTCFullYear()-1900,F[R+24>>2>>>0]=P.getUTCDay(),F[R+28>>2>>>0]=(P.getTime()-Date.UTC(P.getUTCFullYear(),0,1,0,0,0,0))/864e5|0},Ea:function(P,R){P=new Date(1e3*(q[P>>>2]+4294967296*F[P+4>>>2])),F[R>>2>>>0]=P.getSeconds(),F[R+4>>2>>>0]=P.getMinutes(),F[R+8>>2>>>0]=P.getHours(),F[R+12>>2>>>0]=P.getDate(),F[R+16>>2>>>0]=P.getMonth(),F[R+20>>2>>>0]=P.getFullYear()-1900,F[R+24>>2>>>0]=P.getDay();var N=new Date(P.getFullYear(),0,1);F[R+28>>2>>>0]=(P.getTime()-N.getTime())/864e5|0,F[R+36>>2>>>0]=-60*P.getTimezoneOffset();var $=new Date(P.getFullYear(),6,1).getTimezoneOffset();N=N.getTimezoneOffset(),F[R+32>>2>>>0]=0|($!=N&&P.getTimezoneOffset()==Math.min(N,$))},Fa:function(P){var R=new Date(F[P+20>>2>>>0]+1900,F[P+16>>2>>>0],F[P+12>>2>>>0],F[P+8>>2>>>0],F[P+4>>2>>>0],F[P>>2>>>0],0),N=F[P+32>>2>>>0],$=R.getTimezoneOffset(),j=new Date(R.getFullYear(),0,1),H=new Date(R.getFullYear(),6,1).getTimezoneOffset(),X=j.getTimezoneOffset(),ee=Math.min(X,H);return 0>N?F[P+32>>2>>>0]=+(H!=X&&ee==$):0>2>>>0]=R.getDay(),F[P+28>>2>>>0]=(R.getTime()-j.getTime())/864e5|0,F[P>>2>>>0]=R.getSeconds(),F[P+4>>2>>>0]=R.getMinutes(),F[P+8>>2>>>0]=R.getHours(),F[P+12>>2>>>0]=R.getDate(),F[P+16>>2>>>0]=R.getMonth(),R.getTime()/1e3|0},sa:function(){return-52},ta:function(){},Ga:function P(R,N,$){P.Vb||(P.Vb=!0,function(j,H,X){function ee(Ne){return(Ne=Ne.toTimeString().match(/\(([A-Za-z ]+)\)$/))?Ne[1]:"GMT"}var K=new Date().getFullYear(),ae=new Date(K,0,1),ve=new Date(K,6,1);K=ae.getTimezoneOffset();var Fe=ve.getTimezoneOffset();F[j>>2>>>0]=60*Math.max(K,Fe),F[H>>2>>>0]=+(K!=Fe),j=ee(ae),H=ee(ve),j=pt(j),H=pt(H),Fe>2>>>0]=j,q[X+4>>2>>>0]=H):(q[X>>2>>>0]=H,q[X+4>>2>>>0]=j)}(R,N,$))},B:function(){Ae("")},ma:function(){return 4294901760},I:v?()=>{var P=process.hrtime();return 1e3*P[0]+P[1]/1e6}:()=>performance.now(),xa:function(P,R,N){V.copyWithin(P>>>0,R>>>0,R+N>>>0)},G:function(P){var R=V.length;if(4294901760<(P>>>=0))return!1;for(var N=1;4>=N;N*=2){var $=R*(1+.2/N);$=Math.min($,P+100663296);var j=Math;$=Math.max(P,$),j=j.min.call(j,4294901760,$+(65536-$%65536)%65536);e:{try{M.grow(j-C.byteLength+65535>>>16),he();var H=1;break e}catch{}H=void 0}if(H)return!0}return!1},va:function(P,R){var N=0;return It().forEach(function($,j){var H=R+N;for(j=q[P+4*j>>2>>>0]=H,H=0;H<$.length;++H)k[j++>>0>>>0]=$.charCodeAt(H);k[j>>0>>>0]=0,N+=$.length+1}),0},wa:function(P,R){var N=It();q[P>>2>>>0]=N.length;var $=0;return N.forEach(function(j){$+=j.length+1}),q[R>>2>>>0]=$,0},ba:function(P){x||0>2>>>0],ee=q[R+4>>2>>>0];R+=8;for(var K=0;K>>0]);j+=ee}return q[$>>2>>>0]=j,0},c:function(){return Ce},ja:function P(R,N){P.Mb||(P.Mb=function(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var j=new Uint8Array(1);return()=>(crypto.getRandomValues(j),j[0])}if(v)try{var H=c(Object(function(){var X=new Error("Cannot find module 'crypto'");throw X.code="MODULE_NOT_FOUND",X}()));return()=>H.randomBytes(1)[0]}catch{}return()=>Ae("randomDevice")}());for(var $=0;$>0>>>0]=P.Mb();return 0},ea:function(P,R,N){var $=re();try{return le(P)(R,N)}catch(j){if(se($),j!==j+0)throw j;oe(1,0)}},fa:function(P,R,N){var $=re();try{return le(P)(R,N)}catch(j){if(se($),j!==j+0)throw j;oe(1,0)}},J:function(P){var R=re();try{return le(P)()}catch(N){if(se(R),N!==N+0)throw N;oe(1,0)}},e:function(P,R){var N=re();try{return le(P)(R)}catch($){if(se(N),$!==$+0)throw $;oe(1,0)}},N:function(P,R,N){var $=re();try{return le(P)(R,N)}catch(j){if(se($),j!==j+0)throw j;oe(1,0)}},O:function(P,R,N){var $=re();try{return le(P)(R,N)}catch(j){if(se($),j!==j+0)throw j;oe(1,0)}},j:function(P,R,N){var $=re();try{return le(P)(R,N)}catch(j){if(se($),j!==j+0)throw j;oe(1,0)}},o:function(P,R,N,$){var j=re();try{return le(P)(R,N,$)}catch(H){if(se(j),H!==H+0)throw H;oe(1,0)}},p:function(P,R,N,$,j){var H=re();try{return le(P)(R,N,$,j)}catch(X){if(se(H),X!==X+0)throw X;oe(1,0)}},M:function(P,R,N,$,j,H){var X=re();try{return le(P)(R,N,$,j,H)}catch(ee){if(se(X),ee!==ee+0)throw ee;oe(1,0)}},r:function(P,R,N,$,j,H){var X=re();try{return le(P)(R,N,$,j,H)}catch(ee){if(se(X),ee!==ee+0)throw ee;oe(1,0)}},v:function(P,R,N,$,j,H,X){var ee=re();try{return le(P)(R,N,$,j,H,X)}catch(K){if(se(ee),K!==K+0)throw K;oe(1,0)}},K:function(P,R,N,$,j,H,X,ee){var K=re();try{return le(P)(R,N,$,j,H,X,ee)}catch(ae){if(se(K),ae!==ae+0)throw ae;oe(1,0)}},D:function(P,R,N,$,j,H,X,ee,K,ae,ve,Fe){var Ne=re();try{return le(P)(R,N,$,j,H,X,ee,K,ae,ve,Fe)}catch(G){if(se(Ne),G!==G+0)throw G;oe(1,0)}},X:function(P,R,N,$,j,H,X,ee){var K=re();try{return ot(P,R,N,$,j,H,X,ee)}catch(ae){if(se(K),ae!==ae+0)throw ae;oe(1,0)}},V:function(P,R,N,$,j,H,X){var ee=re();try{return bt(P,R,N,$,j,H,X)}catch(K){if(se(ee),K!==K+0)throw K;oe(1,0)}},U:function(P,R,N,$,j){var H=re();try{return ht(P,R,N,$,j)}catch(X){if(se(H),X!==X+0)throw X;oe(1,0)}},Z:function(P,R,N,$){var j=re();try{return wt(P,R,N,$)}catch(H){if(se(j),H!==H+0)throw H;oe(1,0)}},W:function(P){var R=re();try{return gt(P)}catch(N){if(se(R),N!==N+0)throw N;oe(1,0)}},Y:function(P,R){var N=re();try{return xt(P,R)}catch($){if(se(N),$!==$+0)throw $;oe(1,0)}},T:function(P,R,N){var $=re();try{return dt(P,R,N)}catch(j){if(se($),j!==j+0)throw j;oe(1,0)}},f:function(P){var R=re();try{le(P)()}catch(N){if(se(R),N!==N+0)throw N;oe(1,0)}},q:function(P,R){var N=re();try{le(P)(R)}catch($){if(se(N),$!==$+0)throw $;oe(1,0)}},h:function(P,R,N){var $=re();try{le(P)(R,N)}catch(j){if(se($),j!==j+0)throw j;oe(1,0)}},da:function(P,R,N,$){var j=re();try{le(P)(R,N,$)}catch(H){if(se(j),H!==H+0)throw H;oe(1,0)}},l:function(P,R,N,$){var j=re();try{le(P)(R,N,$)}catch(H){if(se(j),H!==H+0)throw H;oe(1,0)}},t:function(P,R,N,$,j){var H=re();try{le(P)(R,N,$,j)}catch(X){if(se(H),X!==X+0)throw X;oe(1,0)}},u:function(P,R,N,$,j,H){var X=re();try{le(P)(R,N,$,j,H)}catch(ee){if(se(X),ee!==ee+0)throw ee;oe(1,0)}},x:function(P,R,N,$,j,H,X){var ee=re();try{le(P)(R,N,$,j,H,X)}catch(K){if(se(ee),K!==K+0)throw K;oe(1,0)}},z:function(P,R,N,$,j,H,X,ee){var K=re();try{le(P)(R,N,$,j,H,X,ee)}catch(ae){if(se(K),ae!==ae+0)throw ae;oe(1,0)}},ga:function(P,R,N,$,j,H,X,ee,K){var ae=re();try{le(P)(R,N,$,j,H,X,ee,K)}catch(ve){if(se(ae),ve!==ve+0)throw ve;oe(1,0)}},A:function(P,R,N,$,j,H,X,ee,K,ae,ve){var Fe=re();try{le(P)(R,N,$,j,H,X,ee,K,ae,ve)}catch(Ne){if(se(Fe),Ne!==Ne+0)throw Ne;oe(1,0)}},C:function(P,R,N,$,j,H,X,ee,K,ae,ve,Fe,Ne,G,ge,Oe){var Qe=re();try{le(P)(R,N,$,j,H,X,ee,K,ae,ve,Fe,Ne,G,ge,Oe)}catch(st){if(se(Qe),st!==st+0)throw st;oe(1,0)}},aa:function(P,R,N,$,j,H,X,ee){var K=re();try{yt(P,R,N,$,j,H,X,ee)}catch(ae){if(se(K),ae!==ae+0)throw ae;oe(1,0)}},_:function(P,R,N,$,j,H,X,ee,K,ae,ve,Fe){var Ne=re();try{vt(P,R,N,$,j,H,X,ee,K,ae,ve,Fe)}catch(G){if(se(Ne),G!==G+0)throw G;oe(1,0)}},$:function(P,R,N,$,j,H){var X=re();try{_t(P,R,N,$,j,H)}catch(ee){if(se(X),ee!==ee+0)throw ee;oe(1,0)}},n:function(P){return P},F:function(P){Ce=P},ha:At,y:function(P,R,N,$){return At(P,R,N,$)}};(function(){function P(j){s.asm=j.exports,M=s.asm.Ka,he(),Me=s.asm.ib,ue.unshift(s.asm.La),De--,s.monitorRunDependencies&&s.monitorRunDependencies(De),De==0&&Re&&(j=Re,Re=null,j())}function R(j){P(j.instance)}function N(j){return function(){if(!T&&(y||_)){if(typeof fetch=="function"&&!Se.startsWith("file://"))return fetch(Se,{credentials:"same-origin"}).then(function(H){if(!H.ok)throw"failed to load wasm binary file at '"+Se+"'";return H.arrayBuffer()}).catch(function(){return Ue()});if(o)return new Promise(function(H,X){o(Se,function(ee){H(new Uint8Array(ee))},X)})}return Promise.resolve().then(function(){return Ue()})}().then(function(H){return WebAssembly.instantiate(H,$)}).then(function(H){return H}).then(j,function(H){E("failed to asynchronously prepare wasm: "+H),Ae(H)})}var $={a:Et};if(De++,s.monitorRunDependencies&&s.monitorRunDependencies(De),s.instantiateWasm)try{return s.instantiateWasm($,P)}catch(j){return E("Module.instantiateWasm callback failed with error: "+j),!1}(T||typeof WebAssembly.instantiateStreaming!="function"||we()||Se.startsWith("file://")||v||typeof fetch!="function"?N(R):fetch(Se,{credentials:"same-origin"}).then(function(j){return WebAssembly.instantiateStreaming(j,$).then(R,function(H){return E("wasm streaming compile failed: "+H),E("falling back to ArrayBuffer instantiation"),N(R)})})).catch(p)})(),s.___wasm_call_ctors=function(){return(s.___wasm_call_ctors=s.asm.La).apply(null,arguments)},s._OrtInit=function(){return(s._OrtInit=s.asm.Ma).apply(null,arguments)},s._OrtCreateSessionOptions=function(){return(s._OrtCreateSessionOptions=s.asm.Na).apply(null,arguments)},s._OrtAppendExecutionProvider=function(){return(s._OrtAppendExecutionProvider=s.asm.Oa).apply(null,arguments)},s._OrtAddSessionConfigEntry=function(){return(s._OrtAddSessionConfigEntry=s.asm.Pa).apply(null,arguments)},s._OrtReleaseSessionOptions=function(){return(s._OrtReleaseSessionOptions=s.asm.Qa).apply(null,arguments)},s._OrtCreateSession=function(){return(s._OrtCreateSession=s.asm.Ra).apply(null,arguments)},s._OrtReleaseSession=function(){return(s._OrtReleaseSession=s.asm.Sa).apply(null,arguments)},s._OrtGetInputCount=function(){return(s._OrtGetInputCount=s.asm.Ta).apply(null,arguments)},s._OrtGetOutputCount=function(){return(s._OrtGetOutputCount=s.asm.Ua).apply(null,arguments)},s._OrtGetInputName=function(){return(s._OrtGetInputName=s.asm.Va).apply(null,arguments)},s._OrtGetOutputName=function(){return(s._OrtGetOutputName=s.asm.Wa).apply(null,arguments)},s._OrtFree=function(){return(s._OrtFree=s.asm.Xa).apply(null,arguments)},s._OrtCreateTensor=function(){return(s._OrtCreateTensor=s.asm.Ya).apply(null,arguments)},s._OrtGetTensorData=function(){return(s._OrtGetTensorData=s.asm.Za).apply(null,arguments)},s._OrtReleaseTensor=function(){return(s._OrtReleaseTensor=s.asm._a).apply(null,arguments)},s._OrtCreateRunOptions=function(){return(s._OrtCreateRunOptions=s.asm.$a).apply(null,arguments)},s._OrtAddRunConfigEntry=function(){return(s._OrtAddRunConfigEntry=s.asm.ab).apply(null,arguments)},s._OrtReleaseRunOptions=function(){return(s._OrtReleaseRunOptions=s.asm.bb).apply(null,arguments)},s._OrtRun=function(){return(s._OrtRun=s.asm.cb).apply(null,arguments)},s._OrtEndProfiling=function(){return(s._OrtEndProfiling=s.asm.db).apply(null,arguments)};var Xe,ye=s._malloc=function(){return(ye=s._malloc=s.asm.eb).apply(null,arguments)},rt=s._free=function(){return(rt=s._free=s.asm.fb).apply(null,arguments)},ct=s._fflush=function(){return(ct=s._fflush=s.asm.gb).apply(null,arguments)},it=s.___funcs_on_exit=function(){return(it=s.___funcs_on_exit=s.asm.hb).apply(null,arguments)},oe=s._setThrew=function(){return(oe=s._setThrew=s.asm.jb).apply(null,arguments)},re=s.stackSave=function(){return(re=s.stackSave=s.asm.kb).apply(null,arguments)},se=s.stackRestore=function(){return(se=s.stackRestore=s.asm.lb).apply(null,arguments)},ft=s.stackAlloc=function(){return(ft=s.stackAlloc=s.asm.mb).apply(null,arguments)},et=s.___cxa_can_catch=function(){return(et=s.___cxa_can_catch=s.asm.nb).apply(null,arguments)},mt=s.___cxa_is_pointer_type=function(){return(mt=s.___cxa_is_pointer_type=s.asm.ob).apply(null,arguments)},gt=s.dynCall_j=function(){return(gt=s.dynCall_j=s.asm.pb).apply(null,arguments)},bt=s.dynCall_iiiiij=function(){return(bt=s.dynCall_iiiiij=s.asm.qb).apply(null,arguments)},dt=s.dynCall_jii=function(){return(dt=s.dynCall_jii=s.asm.rb).apply(null,arguments)},yt=s.dynCall_viiiiij=function(){return(yt=s.dynCall_viiiiij=s.asm.sb).apply(null,arguments)},_t=s.dynCall_vjji=function(){return(_t=s.dynCall_vjji=s.asm.tb).apply(null,arguments)},vt=s.dynCall_viiijjjii=function(){return(vt=s.dynCall_viiijjjii=s.asm.ub).apply(null,arguments)},wt=s.dynCall_iij=function(){return(wt=s.dynCall_iij=s.asm.vb).apply(null,arguments)},xt=s.dynCall_ji=function(){return(xt=s.dynCall_ji=s.asm.wb).apply(null,arguments)},ot=s.dynCall_iiiiiij=function(){return(ot=s.dynCall_iiiiiij=s.asm.xb).apply(null,arguments)},ht=s.dynCall_iiij=function(){return(ht=s.dynCall_iiij=s.asm.yb).apply(null,arguments)};function Tt(){function P(){if(!Xe&&(Xe=!0,s.calledRun=!0,!D)){if(We(ue),h(s),s.onRuntimeInitialized&&s.onRuntimeInitialized(),s.postRun)for(typeof s.postRun=="function"&&(s.postRun=[s.postRun]);s.postRun.length;){var R=s.postRun.shift();_e.unshift(R)}We(_e)}}if(!(0{f.exports=function(r,c){for(var d=new Array(arguments.length-1),l=0,m=2,s=!0;m{var c=r;c.length=function(h){var p=h.length;if(!p)return 0;for(var a=0;--p%4>1&&h.charAt(p)==="=";)++a;return Math.ceil(3*h.length)/4-a};for(var d=new Array(64),l=new Array(123),m=0;m<64;)l[d[m]=m<26?m+65:m<52?m+71:m<62?m-4:m-59|43]=m++;c.encode=function(h,p,a){for(var o,t=null,e=[],n=0,i=0;p>2],o=(3&u)<<4,i=1;break;case 1:e[n++]=d[o|u>>4],o=(15&u)<<2,i=2;break;case 2:e[n++]=d[o|u>>6],e[n++]=d[63&u],i=0}n>8191&&((t||(t=[])).push(String.fromCharCode.apply(String,e)),n=0)}return i&&(e[n++]=d[o],e[n++]=61,i===1&&(e[n++]=61)),t?(n&&t.push(String.fromCharCode.apply(String,e.slice(0,n))),t.join("")):String.fromCharCode.apply(String,e.slice(0,n))};var s="invalid encoding";c.decode=function(h,p,a){for(var o,t=a,e=0,n=0;n1)break;if((i=l[i])===void 0)throw Error(s);switch(e){case 0:o=i,e=1;break;case 1:p[a++]=o<<2|(48&i)>>4,o=i,e=2;break;case 2:p[a++]=(15&o)<<4|(60&i)>>2,o=i,e=3;break;case 3:p[a++]=(3&o)<<6|i,e=0}}if(e===1)throw Error(s);return a-t},c.test=function(h){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(h)}},9211:f=>{function r(){this._listeners={}}f.exports=r,r.prototype.on=function(c,d,l){return(this._listeners[c]||(this._listeners[c]=[])).push({fn:d,ctx:l||this}),this},r.prototype.off=function(c,d){if(c===void 0)this._listeners={};else if(d===void 0)this._listeners[c]=[];else for(var l=this._listeners[c],m=0;m{function r(s){return typeof Float32Array<"u"?function(){var h=new Float32Array([-0]),p=new Uint8Array(h.buffer),a=p[3]===128;function o(i,u,g){h[0]=i,u[g]=p[0],u[g+1]=p[1],u[g+2]=p[2],u[g+3]=p[3]}function t(i,u,g){h[0]=i,u[g]=p[3],u[g+1]=p[2],u[g+2]=p[1],u[g+3]=p[0]}function e(i,u){return p[0]=i[u],p[1]=i[u+1],p[2]=i[u+2],p[3]=i[u+3],h[0]}function n(i,u){return p[3]=i[u],p[2]=i[u+1],p[1]=i[u+2],p[0]=i[u+3],h[0]}s.writeFloatLE=a?o:t,s.writeFloatBE=a?t:o,s.readFloatLE=a?e:n,s.readFloatBE=a?n:e}():function(){function h(a,o,t,e){var n=o<0?1:0;if(n&&(o=-o),o===0)a(1/o>0?0:2147483648,t,e);else if(isNaN(o))a(2143289344,t,e);else if(o>34028234663852886e22)a((n<<31|2139095040)>>>0,t,e);else if(o<11754943508222875e-54)a((n<<31|Math.round(o/1401298464324817e-60))>>>0,t,e);else{var i=Math.floor(Math.log(o)/Math.LN2);a((n<<31|i+127<<23|8388607&Math.round(o*Math.pow(2,-i)*8388608))>>>0,t,e)}}function p(a,o,t){var e=a(o,t),n=2*(e>>31)+1,i=e>>>23&255,u=8388607&e;return i===255?u?NaN:n*(1/0):i===0?1401298464324817e-60*n*u:n*Math.pow(2,i-150)*(u+8388608)}s.writeFloatLE=h.bind(null,c),s.writeFloatBE=h.bind(null,d),s.readFloatLE=p.bind(null,l),s.readFloatBE=p.bind(null,m)}(),typeof Float64Array<"u"?function(){var h=new Float64Array([-0]),p=new Uint8Array(h.buffer),a=p[7]===128;function o(i,u,g){h[0]=i,u[g]=p[0],u[g+1]=p[1],u[g+2]=p[2],u[g+3]=p[3],u[g+4]=p[4],u[g+5]=p[5],u[g+6]=p[6],u[g+7]=p[7]}function t(i,u,g){h[0]=i,u[g]=p[7],u[g+1]=p[6],u[g+2]=p[5],u[g+3]=p[4],u[g+4]=p[3],u[g+5]=p[2],u[g+6]=p[1],u[g+7]=p[0]}function e(i,u){return p[0]=i[u],p[1]=i[u+1],p[2]=i[u+2],p[3]=i[u+3],p[4]=i[u+4],p[5]=i[u+5],p[6]=i[u+6],p[7]=i[u+7],h[0]}function n(i,u){return p[7]=i[u],p[6]=i[u+1],p[5]=i[u+2],p[4]=i[u+3],p[3]=i[u+4],p[2]=i[u+5],p[1]=i[u+6],p[0]=i[u+7],h[0]}s.writeDoubleLE=a?o:t,s.writeDoubleBE=a?t:o,s.readDoubleLE=a?e:n,s.readDoubleBE=a?n:e}():function(){function h(a,o,t,e,n,i){var u=e<0?1:0;if(u&&(e=-e),e===0)a(0,n,i+o),a(1/e>0?0:2147483648,n,i+t);else if(isNaN(e))a(0,n,i+o),a(2146959360,n,i+t);else if(e>17976931348623157e292)a(0,n,i+o),a((u<<31|2146435072)>>>0,n,i+t);else{var g;if(e<22250738585072014e-324)a((g=e/5e-324)>>>0,n,i+o),a((u<<31|g/4294967296)>>>0,n,i+t);else{var b=Math.floor(Math.log(e)/Math.LN2);b===1024&&(b=1023),a(4503599627370496*(g=e*Math.pow(2,-b))>>>0,n,i+o),a((u<<31|b+1023<<20|1048576*g&1048575)>>>0,n,i+t)}}}function p(a,o,t,e,n){var i=a(e,n+o),u=a(e,n+t),g=2*(u>>31)+1,b=u>>>20&2047,y=4294967296*(1048575&u)+i;return b===2047?y?NaN:g*(1/0):b===0?5e-324*g*y:g*Math.pow(2,b-1075)*(y+4503599627370496)}s.writeDoubleLE=h.bind(null,c,0,4),s.writeDoubleBE=h.bind(null,d,4,0),s.readDoubleLE=p.bind(null,l,0,4),s.readDoubleBE=p.bind(null,m,4,0)}(),s}function c(s,h,p){h[p]=255&s,h[p+1]=s>>>8&255,h[p+2]=s>>>16&255,h[p+3]=s>>>24}function d(s,h,p){h[p]=s>>>24,h[p+1]=s>>>16&255,h[p+2]=s>>>8&255,h[p+3]=255&s}function l(s,h){return(s[h]|s[h+1]<<8|s[h+2]<<16|s[h+3]<<24)>>>0}function m(s,h){return(s[h]<<24|s[h+1]<<16|s[h+2]<<8|s[h+3])>>>0}f.exports=r(r)},7199:module=>{function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(f){}return null}module.exports=inquire},6662:f=>{f.exports=function(r,c,d){var l=d||8192,m=l>>>1,s=null,h=l;return function(p){if(p<1||p>m)return r(p);h+p>l&&(s=r(l),h=0);var a=c.call(s,h,h+=p);return 7&h&&(h=1+(7|h)),a}}},4997:(f,r)=>{var c=r;c.length=function(d){for(var l=0,m=0,s=0;s191&&s<224?p[a++]=(31&s)<<6|63&d[l++]:s>239&&s<365?(s=((7&s)<<18|(63&d[l++])<<12|(63&d[l++])<<6|63&d[l++])-65536,p[a++]=55296+(s>>10),p[a++]=56320+(1023&s)):p[a++]=(15&s)<<12|(63&d[l++])<<6|63&d[l++],a>8191&&((h||(h=[])).push(String.fromCharCode.apply(String,p)),a=0);return h?(a&&h.push(String.fromCharCode.apply(String,p.slice(0,a))),h.join("")):String.fromCharCode.apply(String,p.slice(0,a))},c.write=function(d,l,m){for(var s,h,p=m,a=0;a>6|192,l[m++]=63&s|128):(64512&s)==55296&&(64512&(h=d.charCodeAt(a+1)))==56320?(s=65536+((1023&s)<<10)+(1023&h),++a,l[m++]=s>>18|240,l[m++]=s>>12&63|128,l[m++]=s>>6&63|128,l[m++]=63&s|128):(l[m++]=s>>12|224,l[m++]=s>>6&63|128,l[m++]=63&s|128);return m-p}},3442:(f,r)=>{r.__esModule=!0;var c=function(){function d(l){if(!l)throw new TypeError("Invalid argument; `value` has no value.");this.value=d.EMPTY,l&&d.isGuid(l)&&(this.value=l)}return d.isGuid=function(l){var m=l.toString();return l&&(l instanceof d||d.validator.test(m))},d.create=function(){return new d([d.gen(2),d.gen(1),d.gen(1),d.gen(1),d.gen(3)].join("-"))},d.createEmpty=function(){return new d("emptyguid")},d.parse=function(l){return new d(l)},d.raw=function(){return[d.gen(2),d.gen(1),d.gen(1),d.gen(1),d.gen(3)].join("-")},d.gen=function(l){for(var m="",s=0;s{f.exports=c;var r=null;try{r=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function c(x,M,C){this.low=0|x,this.high=0|M,this.unsigned=!!C}function d(x){return(x&&x.__isLong__)===!0}c.prototype.__isLong__,Object.defineProperty(c.prototype,"__isLong__",{value:!0}),c.isLong=d;var l={},m={};function s(x,M){var C,k,V;return M?(V=0<=(x>>>=0)&&x<256)&&(k=m[x])?k:(C=p(x,(0|x)<0?-1:0,!0),V&&(m[x]=C),C):(V=-128<=(x|=0)&&x<128)&&(k=l[x])?k:(C=p(x,x<0?-1:0,!1),V&&(l[x]=C),C)}function h(x,M){if(isNaN(x))return M?b:g;if(M){if(x<0)return b;if(x>=n)return T}else{if(x<=-9223372036854776e3)return A;if(x+1>=i)return w}return x<0?h(-x,M).neg():p(x%e|0,x/e|0,M)}function p(x,M,C){return new c(x,M,C)}c.fromInt=s,c.fromNumber=h,c.fromBits=p;var a=Math.pow;function o(x,M,C){if(x.length===0)throw Error("empty string");if(x==="NaN"||x==="Infinity"||x==="+Infinity"||x==="-Infinity")return g;if(typeof M=="number"?(C=M,M=!1):M=!!M,(C=C||10)<2||360)throw Error("interior hyphen");if(k===0)return o(x.substring(1),M,C).neg();for(var V=h(a(C,8)),F=g,q=0;q>>0:this.low},E.toNumber=function(){return this.unsigned?(this.high>>>0)*e+(this.low>>>0):this.high*e+(this.low>>>0)},E.toString=function(x){if((x=x||10)<2||36>>0).toString(x);if((F=D).isZero())return U+q;for(;U.length<6;)U="0"+U;q=""+U+q}},E.getHighBits=function(){return this.high},E.getHighBitsUnsigned=function(){return this.high>>>0},E.getLowBits=function(){return this.low},E.getLowBitsUnsigned=function(){return this.low>>>0},E.getNumBitsAbs=function(){if(this.isNegative())return this.eq(A)?64:this.neg().getNumBitsAbs();for(var x=this.high!=0?this.high:this.low,M=31;M>0&&(x&1<=0},E.isOdd=function(){return(1&this.low)==1},E.isEven=function(){return(1&this.low)==0},E.equals=function(x){return d(x)||(x=t(x)),(this.unsigned===x.unsigned||this.high>>>31!=1||x.high>>>31!=1)&&this.high===x.high&&this.low===x.low},E.eq=E.equals,E.notEquals=function(x){return!this.eq(x)},E.neq=E.notEquals,E.ne=E.notEquals,E.lessThan=function(x){return this.comp(x)<0},E.lt=E.lessThan,E.lessThanOrEqual=function(x){return this.comp(x)<=0},E.lte=E.lessThanOrEqual,E.le=E.lessThanOrEqual,E.greaterThan=function(x){return this.comp(x)>0},E.gt=E.greaterThan,E.greaterThanOrEqual=function(x){return this.comp(x)>=0},E.gte=E.greaterThanOrEqual,E.ge=E.greaterThanOrEqual,E.compare=function(x){if(d(x)||(x=t(x)),this.eq(x))return 0;var M=this.isNegative(),C=x.isNegative();return M&&!C?-1:!M&&C?1:this.unsigned?x.high>>>0>this.high>>>0||x.high===this.high&&x.low>>>0>this.low>>>0?-1:1:this.sub(x).isNegative()?-1:1},E.comp=E.compare,E.negate=function(){return!this.unsigned&&this.eq(A)?A:this.not().add(y)},E.neg=E.negate,E.add=function(x){d(x)||(x=t(x));var M=this.high>>>16,C=65535&this.high,k=this.low>>>16,V=65535&this.low,F=x.high>>>16,q=65535&x.high,D=x.low>>>16,U=0,J=0,Y=0,Z=0;return Y+=(Z+=V+(65535&x.low))>>>16,J+=(Y+=k+D)>>>16,U+=(J+=C+q)>>>16,U+=M+F,p((Y&=65535)<<16|(Z&=65535),(U&=65535)<<16|(J&=65535),this.unsigned)},E.subtract=function(x){return d(x)||(x=t(x)),this.add(x.neg())},E.sub=E.subtract,E.multiply=function(x){if(this.isZero())return g;if(d(x)||(x=t(x)),r)return p(r.mul(this.low,this.high,x.low,x.high),r.get_high(),this.unsigned);if(x.isZero())return g;if(this.eq(A))return x.isOdd()?A:g;if(x.eq(A))return this.isOdd()?A:g;if(this.isNegative())return x.isNegative()?this.neg().mul(x.neg()):this.neg().mul(x).neg();if(x.isNegative())return this.mul(x.neg()).neg();if(this.lt(u)&&x.lt(u))return h(this.toNumber()*x.toNumber(),this.unsigned);var M=this.high>>>16,C=65535&this.high,k=this.low>>>16,V=65535&this.low,F=x.high>>>16,q=65535&x.high,D=x.low>>>16,U=65535&x.low,J=0,Y=0,Z=0,te=0;return Z+=(te+=V*U)>>>16,Y+=(Z+=k*U)>>>16,Z&=65535,Y+=(Z+=V*D)>>>16,J+=(Y+=C*U)>>>16,Y&=65535,J+=(Y+=k*D)>>>16,Y&=65535,J+=(Y+=V*q)>>>16,J+=M*U+C*D+k*q+V*F,p((Z&=65535)<<16|(te&=65535),(J&=65535)<<16|(Y&=65535),this.unsigned)},E.mul=E.multiply,E.divide=function(x){if(d(x)||(x=t(x)),x.isZero())throw Error("division by zero");var M,C,k;if(r)return this.unsigned||this.high!==-2147483648||x.low!==-1||x.high!==-1?p((this.unsigned?r.div_u:r.div_s)(this.low,this.high,x.low,x.high),r.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?b:g;if(this.unsigned){if(x.unsigned||(x=x.toUnsigned()),x.gt(this))return b;if(x.gt(this.shru(1)))return _;k=b}else{if(this.eq(A))return x.eq(y)||x.eq(v)?A:x.eq(A)?y:(M=this.shr(1).div(x).shl(1)).eq(g)?x.isNegative()?y:v:(C=this.sub(x.mul(M)),k=M.add(C.div(x)));if(x.eq(A))return this.unsigned?b:g;if(this.isNegative())return x.isNegative()?this.neg().div(x.neg()):this.neg().div(x).neg();if(x.isNegative())return this.div(x.neg()).neg();k=g}for(C=this;C.gte(x);){M=Math.max(1,Math.floor(C.toNumber()/x.toNumber()));for(var V=Math.ceil(Math.log(M)/Math.LN2),F=V<=48?1:a(2,V-48),q=h(M),D=q.mul(x);D.isNegative()||D.gt(C);)D=(q=h(M-=F,this.unsigned)).mul(x);q.isZero()&&(q=y),k=k.add(q),C=C.sub(D)}return k},E.div=E.divide,E.modulo=function(x){return d(x)||(x=t(x)),r?p((this.unsigned?r.rem_u:r.rem_s)(this.low,this.high,x.low,x.high),r.get_high(),this.unsigned):this.sub(this.div(x).mul(x))},E.mod=E.modulo,E.rem=E.modulo,E.not=function(){return p(~this.low,~this.high,this.unsigned)},E.and=function(x){return d(x)||(x=t(x)),p(this.low&x.low,this.high&x.high,this.unsigned)},E.or=function(x){return d(x)||(x=t(x)),p(this.low|x.low,this.high|x.high,this.unsigned)},E.xor=function(x){return d(x)||(x=t(x)),p(this.low^x.low,this.high^x.high,this.unsigned)},E.shiftLeft=function(x){return d(x)&&(x=x.toInt()),(x&=63)==0?this:x<32?p(this.low<>>32-x,this.unsigned):p(0,this.low<>>x|this.high<<32-x,this.high>>x,this.unsigned):p(this.high>>x-32,this.high>=0?0:-1,this.unsigned)},E.shr=E.shiftRight,E.shiftRightUnsigned=function(x){if(d(x)&&(x=x.toInt()),(x&=63)==0)return this;var M=this.high;return x<32?p(this.low>>>x|M<<32-x,M>>>x,this.unsigned):p(x===32?M:M>>>x-32,0,this.unsigned)},E.shru=E.shiftRightUnsigned,E.shr_u=E.shiftRightUnsigned,E.toSigned=function(){return this.unsigned?p(this.low,this.high,!1):this},E.toUnsigned=function(){return this.unsigned?this:p(this.low,this.high,!0)},E.toBytes=function(x){return x?this.toBytesLE():this.toBytesBE()},E.toBytesLE=function(){var x=this.high,M=this.low;return[255&M,M>>>8&255,M>>>16&255,M>>>24,255&x,x>>>8&255,x>>>16&255,x>>>24]},E.toBytesBE=function(){var x=this.high,M=this.low;return[x>>>24,x>>>16&255,x>>>8&255,255&x,M>>>24,M>>>16&255,M>>>8&255,255&M]},c.fromBytes=function(x,M,C){return C?c.fromBytesLE(x,M):c.fromBytesBE(x,M)},c.fromBytesLE=function(x,M){return new c(x[0]|x[1]<<8|x[2]<<16|x[3]<<24,x[4]|x[5]<<8|x[6]<<16|x[7]<<24,M)},c.fromBytesBE=function(x,M){return new c(x[4]<<24|x[5]<<16|x[6]<<8|x[7],x[0]<<24|x[1]<<16|x[2]<<8|x[3],M)}},1446:(f,r,c)=>{var d,l,m,s=c(2100),h=s.Reader,p=s.Writer,a=s.util,o=s.roots.default||(s.roots.default={});o.onnx=((m={}).Version=(d={},(l=Object.create(d))[d[0]="_START_VERSION"]=0,l[d[1]="IR_VERSION_2017_10_10"]=1,l[d[2]="IR_VERSION_2017_10_30"]=2,l[d[3]="IR_VERSION_2017_11_3"]=3,l[d[4]="IR_VERSION_2019_1_22"]=4,l[d[5]="IR_VERSION"]=5,l),m.AttributeProto=function(){function t(e){if(this.floats=[],this.ints=[],this.strings=[],this.tensors=[],this.graphs=[],e)for(var n=Object.keys(e),i=0;i>>3){case 1:u.name=e.string();break;case 21:u.refAttrName=e.string();break;case 13:u.docString=e.string();break;case 20:u.type=e.int32();break;case 2:u.f=e.float();break;case 3:u.i=e.int64();break;case 4:u.s=e.bytes();break;case 5:u.t=o.onnx.TensorProto.decode(e,e.uint32());break;case 6:u.g=o.onnx.GraphProto.decode(e,e.uint32());break;case 7:if(u.floats&&u.floats.length||(u.floats=[]),(7&g)==2)for(var b=e.uint32()+e.pos;e.pos>>0,e.i.high>>>0).toNumber())),e.s!=null&&(typeof e.s=="string"?a.base64.decode(e.s,n.s=a.newBuffer(a.base64.length(e.s)),0):e.s.length&&(n.s=e.s)),e.t!=null){if(typeof e.t!="object")throw TypeError(".onnx.AttributeProto.t: object expected");n.t=o.onnx.TensorProto.fromObject(e.t)}if(e.g!=null){if(typeof e.g!="object")throw TypeError(".onnx.AttributeProto.g: object expected");n.g=o.onnx.GraphProto.fromObject(e.g)}if(e.floats){if(!Array.isArray(e.floats))throw TypeError(".onnx.AttributeProto.floats: array expected");n.floats=[];for(var i=0;i>>0,e.ints[i].high>>>0).toNumber())}if(e.strings){if(!Array.isArray(e.strings))throw TypeError(".onnx.AttributeProto.strings: array expected");for(n.strings=[],i=0;i>>0,e.i.high>>>0).toNumber():e.i),e.s!=null&&e.hasOwnProperty("s")&&(i.s=n.bytes===String?a.base64.encode(e.s,0,e.s.length):n.bytes===Array?Array.prototype.slice.call(e.s):e.s),e.t!=null&&e.hasOwnProperty("t")&&(i.t=o.onnx.TensorProto.toObject(e.t,n)),e.g!=null&&e.hasOwnProperty("g")&&(i.g=o.onnx.GraphProto.toObject(e.g,n)),e.floats&&e.floats.length){i.floats=[];for(var g=0;g>>0,e.ints[g].high>>>0).toNumber():e.ints[g];if(e.strings&&e.strings.length)for(i.strings=[],g=0;g>>3){case 1:u.name=e.string();break;case 2:u.type=o.onnx.TypeProto.decode(e,e.uint32());break;case 3:u.docString=e.string();break;default:e.skipType(7&g)}}return u},t.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},t.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.name!=null&&e.hasOwnProperty("name")&&!a.isString(e.name))return"name: string expected";if(e.type!=null&&e.hasOwnProperty("type")){var n=o.onnx.TypeProto.verify(e.type);if(n)return"type."+n}return e.docString!=null&&e.hasOwnProperty("docString")&&!a.isString(e.docString)?"docString: string expected":null},t.fromObject=function(e){if(e instanceof o.onnx.ValueInfoProto)return e;var n=new o.onnx.ValueInfoProto;if(e.name!=null&&(n.name=String(e.name)),e.type!=null){if(typeof e.type!="object")throw TypeError(".onnx.ValueInfoProto.type: object expected");n.type=o.onnx.TypeProto.fromObject(e.type)}return e.docString!=null&&(n.docString=String(e.docString)),n},t.toObject=function(e,n){n||(n={});var i={};return n.defaults&&(i.name="",i.type=null,i.docString=""),e.name!=null&&e.hasOwnProperty("name")&&(i.name=e.name),e.type!=null&&e.hasOwnProperty("type")&&(i.type=o.onnx.TypeProto.toObject(e.type,n)),e.docString!=null&&e.hasOwnProperty("docString")&&(i.docString=e.docString),i},t.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},t}(),m.NodeProto=function(){function t(e){if(this.input=[],this.output=[],this.attribute=[],e)for(var n=Object.keys(e),i=0;i>>3){case 1:u.input&&u.input.length||(u.input=[]),u.input.push(e.string());break;case 2:u.output&&u.output.length||(u.output=[]),u.output.push(e.string());break;case 3:u.name=e.string();break;case 4:u.opType=e.string();break;case 7:u.domain=e.string();break;case 5:u.attribute&&u.attribute.length||(u.attribute=[]),u.attribute.push(o.onnx.AttributeProto.decode(e,e.uint32()));break;case 6:u.docString=e.string();break;default:e.skipType(7&g)}}return u},t.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},t.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.input!=null&&e.hasOwnProperty("input")){if(!Array.isArray(e.input))return"input: array expected";for(var n=0;n>>3){case 1:u.irVersion=e.int64();break;case 8:u.opsetImport&&u.opsetImport.length||(u.opsetImport=[]),u.opsetImport.push(o.onnx.OperatorSetIdProto.decode(e,e.uint32()));break;case 2:u.producerName=e.string();break;case 3:u.producerVersion=e.string();break;case 4:u.domain=e.string();break;case 5:u.modelVersion=e.int64();break;case 6:u.docString=e.string();break;case 7:u.graph=o.onnx.GraphProto.decode(e,e.uint32());break;case 14:u.metadataProps&&u.metadataProps.length||(u.metadataProps=[]),u.metadataProps.push(o.onnx.StringStringEntryProto.decode(e,e.uint32()));break;default:e.skipType(7&g)}}return u},t.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},t.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.irVersion!=null&&e.hasOwnProperty("irVersion")&&!(a.isInteger(e.irVersion)||e.irVersion&&a.isInteger(e.irVersion.low)&&a.isInteger(e.irVersion.high)))return"irVersion: integer|Long expected";if(e.opsetImport!=null&&e.hasOwnProperty("opsetImport")){if(!Array.isArray(e.opsetImport))return"opsetImport: array expected";for(var n=0;n>>0,e.irVersion.high>>>0).toNumber())),e.opsetImport){if(!Array.isArray(e.opsetImport))throw TypeError(".onnx.ModelProto.opsetImport: array expected");n.opsetImport=[];for(var i=0;i>>0,e.modelVersion.high>>>0).toNumber())),e.docString!=null&&(n.docString=String(e.docString)),e.graph!=null){if(typeof e.graph!="object")throw TypeError(".onnx.ModelProto.graph: object expected");n.graph=o.onnx.GraphProto.fromObject(e.graph)}if(e.metadataProps){if(!Array.isArray(e.metadataProps))throw TypeError(".onnx.ModelProto.metadataProps: array expected");for(n.metadataProps=[],i=0;i>>0,e.irVersion.high>>>0).toNumber():e.irVersion),e.producerName!=null&&e.hasOwnProperty("producerName")&&(i.producerName=e.producerName),e.producerVersion!=null&&e.hasOwnProperty("producerVersion")&&(i.producerVersion=e.producerVersion),e.domain!=null&&e.hasOwnProperty("domain")&&(i.domain=e.domain),e.modelVersion!=null&&e.hasOwnProperty("modelVersion")&&(typeof e.modelVersion=="number"?i.modelVersion=n.longs===String?String(e.modelVersion):e.modelVersion:i.modelVersion=n.longs===String?a.Long.prototype.toString.call(e.modelVersion):n.longs===Number?new a.LongBits(e.modelVersion.low>>>0,e.modelVersion.high>>>0).toNumber():e.modelVersion),e.docString!=null&&e.hasOwnProperty("docString")&&(i.docString=e.docString),e.graph!=null&&e.hasOwnProperty("graph")&&(i.graph=o.onnx.GraphProto.toObject(e.graph,n)),e.opsetImport&&e.opsetImport.length){i.opsetImport=[];for(var g=0;g>>3){case 1:u.key=e.string();break;case 2:u.value=e.string();break;default:e.skipType(7&g)}}return u},t.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},t.verify=function(e){return typeof e!="object"||e===null?"object expected":e.key!=null&&e.hasOwnProperty("key")&&!a.isString(e.key)?"key: string expected":e.value!=null&&e.hasOwnProperty("value")&&!a.isString(e.value)?"value: string expected":null},t.fromObject=function(e){if(e instanceof o.onnx.StringStringEntryProto)return e;var n=new o.onnx.StringStringEntryProto;return e.key!=null&&(n.key=String(e.key)),e.value!=null&&(n.value=String(e.value)),n},t.toObject=function(e,n){n||(n={});var i={};return n.defaults&&(i.key="",i.value=""),e.key!=null&&e.hasOwnProperty("key")&&(i.key=e.key),e.value!=null&&e.hasOwnProperty("value")&&(i.value=e.value),i},t.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},t}(),m.TensorAnnotation=function(){function t(e){if(this.quantParameterTensorNames=[],e)for(var n=Object.keys(e),i=0;i>>3){case 1:u.tensorName=e.string();break;case 2:u.quantParameterTensorNames&&u.quantParameterTensorNames.length||(u.quantParameterTensorNames=[]),u.quantParameterTensorNames.push(o.onnx.StringStringEntryProto.decode(e,e.uint32()));break;default:e.skipType(7&g)}}return u},t.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},t.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.tensorName!=null&&e.hasOwnProperty("tensorName")&&!a.isString(e.tensorName))return"tensorName: string expected";if(e.quantParameterTensorNames!=null&&e.hasOwnProperty("quantParameterTensorNames")){if(!Array.isArray(e.quantParameterTensorNames))return"quantParameterTensorNames: array expected";for(var n=0;n>>3){case 1:u.node&&u.node.length||(u.node=[]),u.node.push(o.onnx.NodeProto.decode(e,e.uint32()));break;case 2:u.name=e.string();break;case 5:u.initializer&&u.initializer.length||(u.initializer=[]),u.initializer.push(o.onnx.TensorProto.decode(e,e.uint32()));break;case 10:u.docString=e.string();break;case 11:u.input&&u.input.length||(u.input=[]),u.input.push(o.onnx.ValueInfoProto.decode(e,e.uint32()));break;case 12:u.output&&u.output.length||(u.output=[]),u.output.push(o.onnx.ValueInfoProto.decode(e,e.uint32()));break;case 13:u.valueInfo&&u.valueInfo.length||(u.valueInfo=[]),u.valueInfo.push(o.onnx.ValueInfoProto.decode(e,e.uint32()));break;case 14:u.quantizationAnnotation&&u.quantizationAnnotation.length||(u.quantizationAnnotation=[]),u.quantizationAnnotation.push(o.onnx.TensorAnnotation.decode(e,e.uint32()));break;default:e.skipType(7&g)}}return u},t.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},t.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.node!=null&&e.hasOwnProperty("node")){if(!Array.isArray(e.node))return"node: array expected";for(var n=0;n>>3){case 1:if(u.dims&&u.dims.length||(u.dims=[]),(7&g)==2)for(var b=e.uint32()+e.pos;e.pos>>0,e.dims[i].high>>>0).toNumber())}if(e.dataType!=null&&(n.dataType=0|e.dataType),e.segment!=null){if(typeof e.segment!="object")throw TypeError(".onnx.TensorProto.segment: object expected");n.segment=o.onnx.TensorProto.Segment.fromObject(e.segment)}if(e.floatData){if(!Array.isArray(e.floatData))throw TypeError(".onnx.TensorProto.floatData: array expected");for(n.floatData=[],i=0;i>>0,e.int64Data[i].high>>>0).toNumber())}if(e.name!=null&&(n.name=String(e.name)),e.docString!=null&&(n.docString=String(e.docString)),e.rawData!=null&&(typeof e.rawData=="string"?a.base64.decode(e.rawData,n.rawData=a.newBuffer(a.base64.length(e.rawData)),0):e.rawData.length&&(n.rawData=e.rawData)),e.externalData){if(!Array.isArray(e.externalData))throw TypeError(".onnx.TensorProto.externalData: array expected");for(n.externalData=[],i=0;i>>0,e.uint64Data[i].high>>>0).toNumber(!0))}return n},t.toObject=function(e,n){n||(n={});var i={};if((n.arrays||n.defaults)&&(i.dims=[],i.floatData=[],i.int32Data=[],i.stringData=[],i.int64Data=[],i.doubleData=[],i.uint64Data=[],i.externalData=[]),n.defaults&&(i.dataType=0,i.segment=null,i.name="",n.bytes===String?i.rawData="":(i.rawData=[],n.bytes!==Array&&(i.rawData=a.newBuffer(i.rawData))),i.docString="",i.dataLocation=n.enums===String?"DEFAULT":0),e.dims&&e.dims.length){i.dims=[];for(var u=0;u>>0,e.dims[u].high>>>0).toNumber():e.dims[u]}if(e.dataType!=null&&e.hasOwnProperty("dataType")&&(i.dataType=e.dataType),e.segment!=null&&e.hasOwnProperty("segment")&&(i.segment=o.onnx.TensorProto.Segment.toObject(e.segment,n)),e.floatData&&e.floatData.length)for(i.floatData=[],u=0;u>>0,e.int64Data[u].high>>>0).toNumber():e.int64Data[u];if(e.name!=null&&e.hasOwnProperty("name")&&(i.name=e.name),e.rawData!=null&&e.hasOwnProperty("rawData")&&(i.rawData=n.bytes===String?a.base64.encode(e.rawData,0,e.rawData.length):n.bytes===Array?Array.prototype.slice.call(e.rawData):e.rawData),e.doubleData&&e.doubleData.length)for(i.doubleData=[],u=0;u>>0,e.uint64Data[u].high>>>0).toNumber(!0):e.uint64Data[u];if(e.docString!=null&&e.hasOwnProperty("docString")&&(i.docString=e.docString),e.externalData&&e.externalData.length)for(i.externalData=[],u=0;u>>3){case 1:g.begin=n.int64();break;case 2:g.end=n.int64();break;default:n.skipType(7&b)}}return g},e.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},e.verify=function(n){return typeof n!="object"||n===null?"object expected":n.begin!=null&&n.hasOwnProperty("begin")&&!(a.isInteger(n.begin)||n.begin&&a.isInteger(n.begin.low)&&a.isInteger(n.begin.high))?"begin: integer|Long expected":n.end!=null&&n.hasOwnProperty("end")&&!(a.isInteger(n.end)||n.end&&a.isInteger(n.end.low)&&a.isInteger(n.end.high))?"end: integer|Long expected":null},e.fromObject=function(n){if(n instanceof o.onnx.TensorProto.Segment)return n;var i=new o.onnx.TensorProto.Segment;return n.begin!=null&&(a.Long?(i.begin=a.Long.fromValue(n.begin)).unsigned=!1:typeof n.begin=="string"?i.begin=parseInt(n.begin,10):typeof n.begin=="number"?i.begin=n.begin:typeof n.begin=="object"&&(i.begin=new a.LongBits(n.begin.low>>>0,n.begin.high>>>0).toNumber())),n.end!=null&&(a.Long?(i.end=a.Long.fromValue(n.end)).unsigned=!1:typeof n.end=="string"?i.end=parseInt(n.end,10):typeof n.end=="number"?i.end=n.end:typeof n.end=="object"&&(i.end=new a.LongBits(n.end.low>>>0,n.end.high>>>0).toNumber())),i},e.toObject=function(n,i){i||(i={});var u={};if(i.defaults){if(a.Long){var g=new a.Long(0,0,!1);u.begin=i.longs===String?g.toString():i.longs===Number?g.toNumber():g}else u.begin=i.longs===String?"0":0;a.Long?(g=new a.Long(0,0,!1),u.end=i.longs===String?g.toString():i.longs===Number?g.toNumber():g):u.end=i.longs===String?"0":0}return n.begin!=null&&n.hasOwnProperty("begin")&&(typeof n.begin=="number"?u.begin=i.longs===String?String(n.begin):n.begin:u.begin=i.longs===String?a.Long.prototype.toString.call(n.begin):i.longs===Number?new a.LongBits(n.begin.low>>>0,n.begin.high>>>0).toNumber():n.begin),n.end!=null&&n.hasOwnProperty("end")&&(typeof n.end=="number"?u.end=i.longs===String?String(n.end):n.end:u.end=i.longs===String?a.Long.prototype.toString.call(n.end):i.longs===Number?new a.LongBits(n.end.low>>>0,n.end.high>>>0).toNumber():n.end),u},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),t.DataLocation=function(){var e={},n=Object.create(e);return n[e[0]="DEFAULT"]=0,n[e[1]="EXTERNAL"]=1,n}(),t}(),m.TensorShapeProto=function(){function t(e){if(this.dim=[],e)for(var n=Object.keys(e),i=0;i>>3==1?(u.dim&&u.dim.length||(u.dim=[]),u.dim.push(o.onnx.TensorShapeProto.Dimension.decode(e,e.uint32()))):e.skipType(7&g)}return u},t.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},t.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.dim!=null&&e.hasOwnProperty("dim")){if(!Array.isArray(e.dim))return"dim: array expected";for(var n=0;n>>3){case 1:b.dimValue=i.int64();break;case 2:b.dimParam=i.string();break;case 3:b.denotation=i.string();break;default:i.skipType(7&y)}}return b},e.decodeDelimited=function(i){return i instanceof h||(i=new h(i)),this.decode(i,i.uint32())},e.verify=function(i){if(typeof i!="object"||i===null)return"object expected";var u={};if(i.dimValue!=null&&i.hasOwnProperty("dimValue")&&(u.value=1,!(a.isInteger(i.dimValue)||i.dimValue&&a.isInteger(i.dimValue.low)&&a.isInteger(i.dimValue.high))))return"dimValue: integer|Long expected";if(i.dimParam!=null&&i.hasOwnProperty("dimParam")){if(u.value===1)return"value: multiple values";if(u.value=1,!a.isString(i.dimParam))return"dimParam: string expected"}return i.denotation!=null&&i.hasOwnProperty("denotation")&&!a.isString(i.denotation)?"denotation: string expected":null},e.fromObject=function(i){if(i instanceof o.onnx.TensorShapeProto.Dimension)return i;var u=new o.onnx.TensorShapeProto.Dimension;return i.dimValue!=null&&(a.Long?(u.dimValue=a.Long.fromValue(i.dimValue)).unsigned=!1:typeof i.dimValue=="string"?u.dimValue=parseInt(i.dimValue,10):typeof i.dimValue=="number"?u.dimValue=i.dimValue:typeof i.dimValue=="object"&&(u.dimValue=new a.LongBits(i.dimValue.low>>>0,i.dimValue.high>>>0).toNumber())),i.dimParam!=null&&(u.dimParam=String(i.dimParam)),i.denotation!=null&&(u.denotation=String(i.denotation)),u},e.toObject=function(i,u){u||(u={});var g={};return u.defaults&&(g.denotation=""),i.dimValue!=null&&i.hasOwnProperty("dimValue")&&(typeof i.dimValue=="number"?g.dimValue=u.longs===String?String(i.dimValue):i.dimValue:g.dimValue=u.longs===String?a.Long.prototype.toString.call(i.dimValue):u.longs===Number?new a.LongBits(i.dimValue.low>>>0,i.dimValue.high>>>0).toNumber():i.dimValue,u.oneofs&&(g.value="dimValue")),i.dimParam!=null&&i.hasOwnProperty("dimParam")&&(g.dimParam=i.dimParam,u.oneofs&&(g.value="dimParam")),i.denotation!=null&&i.hasOwnProperty("denotation")&&(g.denotation=i.denotation),g},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),t}(),m.TypeProto=function(){function t(n){if(n)for(var i=Object.keys(n),u=0;u>>3){case 1:g.tensorType=o.onnx.TypeProto.Tensor.decode(n,n.uint32());break;case 6:g.denotation=n.string();break;default:n.skipType(7&b)}}return g},t.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},t.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.tensorType!=null&&n.hasOwnProperty("tensorType")){var i=o.onnx.TypeProto.Tensor.verify(n.tensorType);if(i)return"tensorType."+i}return n.denotation!=null&&n.hasOwnProperty("denotation")&&!a.isString(n.denotation)?"denotation: string expected":null},t.fromObject=function(n){if(n instanceof o.onnx.TypeProto)return n;var i=new o.onnx.TypeProto;if(n.tensorType!=null){if(typeof n.tensorType!="object")throw TypeError(".onnx.TypeProto.tensorType: object expected");i.tensorType=o.onnx.TypeProto.Tensor.fromObject(n.tensorType)}return n.denotation!=null&&(i.denotation=String(n.denotation)),i},t.toObject=function(n,i){i||(i={});var u={};return i.defaults&&(u.denotation=""),n.tensorType!=null&&n.hasOwnProperty("tensorType")&&(u.tensorType=o.onnx.TypeProto.Tensor.toObject(n.tensorType,i),i.oneofs&&(u.value="tensorType")),n.denotation!=null&&n.hasOwnProperty("denotation")&&(u.denotation=n.denotation),u},t.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},t.Tensor=function(){function n(i){if(i)for(var u=Object.keys(i),g=0;g>>3){case 1:b.elemType=i.int32();break;case 2:b.shape=o.onnx.TensorShapeProto.decode(i,i.uint32());break;default:i.skipType(7&y)}}return b},n.decodeDelimited=function(i){return i instanceof h||(i=new h(i)),this.decode(i,i.uint32())},n.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.elemType!=null&&i.hasOwnProperty("elemType")&&!a.isInteger(i.elemType))return"elemType: integer expected";if(i.shape!=null&&i.hasOwnProperty("shape")){var u=o.onnx.TensorShapeProto.verify(i.shape);if(u)return"shape."+u}return null},n.fromObject=function(i){if(i instanceof o.onnx.TypeProto.Tensor)return i;var u=new o.onnx.TypeProto.Tensor;if(i.elemType!=null&&(u.elemType=0|i.elemType),i.shape!=null){if(typeof i.shape!="object")throw TypeError(".onnx.TypeProto.Tensor.shape: object expected");u.shape=o.onnx.TensorShapeProto.fromObject(i.shape)}return u},n.toObject=function(i,u){u||(u={});var g={};return u.defaults&&(g.elemType=0,g.shape=null),i.elemType!=null&&i.hasOwnProperty("elemType")&&(g.elemType=i.elemType),i.shape!=null&&i.hasOwnProperty("shape")&&(g.shape=o.onnx.TensorShapeProto.toObject(i.shape,u)),g},n.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},n}(),t}(),m.OperatorSetIdProto=function(){function t(e){if(e)for(var n=Object.keys(e),i=0;i>>3){case 1:u.domain=e.string();break;case 2:u.version=e.int64();break;default:e.skipType(7&g)}}return u},t.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},t.verify=function(e){return typeof e!="object"||e===null?"object expected":e.domain!=null&&e.hasOwnProperty("domain")&&!a.isString(e.domain)?"domain: string expected":e.version!=null&&e.hasOwnProperty("version")&&!(a.isInteger(e.version)||e.version&&a.isInteger(e.version.low)&&a.isInteger(e.version.high))?"version: integer|Long expected":null},t.fromObject=function(e){if(e instanceof o.onnx.OperatorSetIdProto)return e;var n=new o.onnx.OperatorSetIdProto;return e.domain!=null&&(n.domain=String(e.domain)),e.version!=null&&(a.Long?(n.version=a.Long.fromValue(e.version)).unsigned=!1:typeof e.version=="string"?n.version=parseInt(e.version,10):typeof e.version=="number"?n.version=e.version:typeof e.version=="object"&&(n.version=new a.LongBits(e.version.low>>>0,e.version.high>>>0).toNumber())),n},t.toObject=function(e,n){n||(n={});var i={};if(n.defaults)if(i.domain="",a.Long){var u=new a.Long(0,0,!1);i.version=n.longs===String?u.toString():n.longs===Number?u.toNumber():u}else i.version=n.longs===String?"0":0;return e.domain!=null&&e.hasOwnProperty("domain")&&(i.domain=e.domain),e.version!=null&&e.hasOwnProperty("version")&&(typeof e.version=="number"?i.version=n.longs===String?String(e.version):e.version:i.version=n.longs===String?a.Long.prototype.toString.call(e.version):n.longs===Number?new a.LongBits(e.version.low>>>0,e.version.high>>>0).toNumber():e.version),i},t.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},t}(),m),f.exports=o},2100:(f,r,c)=>{f.exports=c(9482)},9482:(f,r,c)=>{var d=r;function l(){d.util._configure(),d.Writer._configure(d.BufferWriter),d.Reader._configure(d.BufferReader)}d.build="minimal",d.Writer=c(1173),d.BufferWriter=c(3155),d.Reader=c(1408),d.BufferReader=c(593),d.util=c(9693),d.rpc=c(5994),d.roots=c(5054),d.configure=l,l()},1408:(f,r,c)=>{f.exports=p;var d,l=c(9693),m=l.LongBits,s=l.utf8;function h(u,g){return RangeError("index out of range: "+u.pos+" + "+(g||1)+" > "+u.len)}function p(u){this.buf=u,this.pos=0,this.len=u.length}var a,o=typeof Uint8Array<"u"?function(u){if(u instanceof Uint8Array||Array.isArray(u))return new p(u);throw Error("illegal buffer")}:function(u){if(Array.isArray(u))return new p(u);throw Error("illegal buffer")},t=function(){return l.Buffer?function(u){return(p.create=function(g){return l.Buffer.isBuffer(g)?new d(g):o(g)})(u)}:o};function e(){var u=new m(0,0),g=0;if(!(this.len-this.pos>4)){for(;g<3;++g){if(this.pos>=this.len)throw h(this);if(u.lo=(u.lo|(127&this.buf[this.pos])<<7*g)>>>0,this.buf[this.pos++]<128)return u}return u.lo=(u.lo|(127&this.buf[this.pos++])<<7*g)>>>0,u}for(;g<4;++g)if(u.lo=(u.lo|(127&this.buf[this.pos])<<7*g)>>>0,this.buf[this.pos++]<128)return u;if(u.lo=(u.lo|(127&this.buf[this.pos])<<28)>>>0,u.hi=(u.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return u;if(g=0,this.len-this.pos>4){for(;g<5;++g)if(u.hi=(u.hi|(127&this.buf[this.pos])<<7*g+3)>>>0,this.buf[this.pos++]<128)return u}else for(;g<5;++g){if(this.pos>=this.len)throw h(this);if(u.hi=(u.hi|(127&this.buf[this.pos])<<7*g+3)>>>0,this.buf[this.pos++]<128)return u}throw Error("invalid varint encoding")}function n(u,g){return(u[g-4]|u[g-3]<<8|u[g-2]<<16|u[g-1]<<24)>>>0}function i(){if(this.pos+8>this.len)throw h(this,8);return new m(n(this.buf,this.pos+=4),n(this.buf,this.pos+=4))}p.create=t(),p.prototype._slice=l.Array.prototype.subarray||l.Array.prototype.slice,p.prototype.uint32=(a=4294967295,function(){if(a=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(a=(a|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)||(a=(a|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)||(a=(a|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)||(a=(a|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128))return a;if((this.pos+=5)>this.len)throw this.pos=this.len,h(this,10);return a}),p.prototype.int32=function(){return 0|this.uint32()},p.prototype.sint32=function(){var u=this.uint32();return u>>>1^-(1&u)|0},p.prototype.bool=function(){return this.uint32()!==0},p.prototype.fixed32=function(){if(this.pos+4>this.len)throw h(this,4);return n(this.buf,this.pos+=4)},p.prototype.sfixed32=function(){if(this.pos+4>this.len)throw h(this,4);return 0|n(this.buf,this.pos+=4)},p.prototype.float=function(){if(this.pos+4>this.len)throw h(this,4);var u=l.float.readFloatLE(this.buf,this.pos);return this.pos+=4,u},p.prototype.double=function(){if(this.pos+8>this.len)throw h(this,4);var u=l.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,u},p.prototype.bytes=function(){var u=this.uint32(),g=this.pos,b=this.pos+u;if(b>this.len)throw h(this,u);return this.pos+=u,Array.isArray(this.buf)?this.buf.slice(g,b):g===b?new this.buf.constructor(0):this._slice.call(this.buf,g,b)},p.prototype.string=function(){var u=this.bytes();return s.read(u,0,u.length)},p.prototype.skip=function(u){if(typeof u=="number"){if(this.pos+u>this.len)throw h(this,u);this.pos+=u}else do if(this.pos>=this.len)throw h(this);while(128&this.buf[this.pos++]);return this},p.prototype.skipType=function(u){switch(u){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(u=7&this.uint32())!=4;)this.skipType(u);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+u+" at offset "+this.pos)}return this},p._configure=function(u){d=u,p.create=t(),d._configure();var g=l.Long?"toLong":"toNumber";l.merge(p.prototype,{int64:function(){return e.call(this)[g](!1)},uint64:function(){return e.call(this)[g](!0)},sint64:function(){return e.call(this).zzDecode()[g](!1)},fixed64:function(){return i.call(this)[g](!0)},sfixed64:function(){return i.call(this)[g](!1)}})}},593:(f,r,c)=>{f.exports=m;var d=c(1408);(m.prototype=Object.create(d.prototype)).constructor=m;var l=c(9693);function m(s){d.call(this,s)}m._configure=function(){l.Buffer&&(m.prototype._slice=l.Buffer.prototype.slice)},m.prototype.string=function(){var s=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+s,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+s,this.len))},m._configure()},5054:f=>{f.exports={}},5994:(f,r,c)=>{r.Service=c(7948)},7948:(f,r,c)=>{f.exports=l;var d=c(9693);function l(m,s,h){if(typeof m!="function")throw TypeError("rpcImpl must be a function");d.EventEmitter.call(this),this.rpcImpl=m,this.requestDelimited=!!s,this.responseDelimited=!!h}(l.prototype=Object.create(d.EventEmitter.prototype)).constructor=l,l.prototype.rpcCall=function m(s,h,p,a,o){if(!a)throw TypeError("request must be specified");var t=this;if(!o)return d.asPromise(m,t,s,h,p,a);if(t.rpcImpl)try{return t.rpcImpl(s,h[t.requestDelimited?"encodeDelimited":"encode"](a).finish(),function(e,n){if(e)return t.emit("error",e,s),o(e);if(n!==null){if(!(n instanceof p))try{n=p[t.responseDelimited?"decodeDelimited":"decode"](n)}catch(i){return t.emit("error",i,s),o(i)}return t.emit("data",n,s),o(null,n)}t.end(!0)})}catch(e){return t.emit("error",e,s),void setTimeout(function(){o(e)},0)}else setTimeout(function(){o(Error("already ended"))},0)},l.prototype.end=function(m){return this.rpcImpl&&(m||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},1945:(f,r,c)=>{f.exports=l;var d=c(9693);function l(p,a){this.lo=p>>>0,this.hi=a>>>0}var m=l.zero=new l(0,0);m.toNumber=function(){return 0},m.zzEncode=m.zzDecode=function(){return this},m.length=function(){return 1};var s=l.zeroHash="\0\0\0\0\0\0\0\0";l.fromNumber=function(p){if(p===0)return m;var a=p<0;a&&(p=-p);var o=p>>>0,t=(p-o)/4294967296>>>0;return a&&(t=~t>>>0,o=~o>>>0,++o>4294967295&&(o=0,++t>4294967295&&(t=0))),new l(o,t)},l.from=function(p){if(typeof p=="number")return l.fromNumber(p);if(d.isString(p)){if(!d.Long)return l.fromNumber(parseInt(p,10));p=d.Long.fromString(p)}return p.low||p.high?new l(p.low>>>0,p.high>>>0):m},l.prototype.toNumber=function(p){if(!p&&this.hi>>>31){var a=1+~this.lo>>>0,o=~this.hi>>>0;return a||(o=o+1>>>0),-(a+4294967296*o)}return this.lo+4294967296*this.hi},l.prototype.toLong=function(p){return d.Long?new d.Long(0|this.lo,0|this.hi,!!p):{low:0|this.lo,high:0|this.hi,unsigned:!!p}};var h=String.prototype.charCodeAt;l.fromHash=function(p){return p===s?m:new l((h.call(p,0)|h.call(p,1)<<8|h.call(p,2)<<16|h.call(p,3)<<24)>>>0,(h.call(p,4)|h.call(p,5)<<8|h.call(p,6)<<16|h.call(p,7)<<24)>>>0)},l.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},l.prototype.zzEncode=function(){var p=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^p)>>>0,this.lo=(this.lo<<1^p)>>>0,this},l.prototype.zzDecode=function(){var p=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^p)>>>0,this.hi=(this.hi>>>1^p)>>>0,this},l.prototype.length=function(){var p=this.lo,a=(this.lo>>>28|this.hi<<4)>>>0,o=this.hi>>>24;return o===0?a===0?p<16384?p<128?1:2:p<2097152?3:4:a<16384?a<128?5:6:a<2097152?7:8:o<128?9:10}},9693:function(f,r,c){var d=r;function l(s,h,p){for(var a=Object.keys(h),o=0;o0)},d.Buffer=function(){try{var s=d.inquire("buffer").Buffer;return s.prototype.utf8Write?s:null}catch{return null}}(),d._Buffer_from=null,d._Buffer_allocUnsafe=null,d.newBuffer=function(s){return typeof s=="number"?d.Buffer?d._Buffer_allocUnsafe(s):new d.Array(s):d.Buffer?d._Buffer_from(s):typeof Uint8Array>"u"?s:new Uint8Array(s)},d.Array=typeof Uint8Array<"u"?Uint8Array:Array,d.Long=d.global.dcodeIO&&d.global.dcodeIO.Long||d.global.Long||d.inquire("long"),d.key2Re=/^true|false|0|1$/,d.key32Re=/^-?(?:0|[1-9][0-9]*)$/,d.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,d.longToHash=function(s){return s?d.LongBits.from(s).toHash():d.LongBits.zeroHash},d.longFromHash=function(s,h){var p=d.LongBits.fromHash(s);return d.Long?d.Long.fromBits(p.lo,p.hi,h):p.toNumber(!!h)},d.merge=l,d.lcFirst=function(s){return s.charAt(0).toLowerCase()+s.substring(1)},d.newError=m,d.ProtocolError=m("ProtocolError"),d.oneOfGetter=function(s){for(var h={},p=0;p-1;--o)if(h[a[o]]===1&&this[a[o]]!==void 0&&this[a[o]]!==null)return a[o]}},d.oneOfSetter=function(s){return function(h){for(var p=0;p{f.exports=t;var d,l=c(9693),m=l.LongBits,s=l.base64,h=l.utf8;function p(y,_,v){this.fn=y,this.len=_,this.next=void 0,this.val=v}function a(){}function o(y){this.head=y.head,this.tail=y.tail,this.len=y.len,this.next=y.states}function t(){this.len=0,this.head=new p(a,0,0),this.tail=this.head,this.states=null}var e=function(){return l.Buffer?function(){return(t.create=function(){return new d})()}:function(){return new t}};function n(y,_,v){_[v]=255&y}function i(y,_){this.len=y,this.next=void 0,this.val=_}function u(y,_,v){for(;y.hi;)_[v++]=127&y.lo|128,y.lo=(y.lo>>>7|y.hi<<25)>>>0,y.hi>>>=7;for(;y.lo>127;)_[v++]=127&y.lo|128,y.lo=y.lo>>>7;_[v++]=y.lo}function g(y,_,v){_[v]=255&y,_[v+1]=y>>>8&255,_[v+2]=y>>>16&255,_[v+3]=y>>>24}t.create=e(),t.alloc=function(y){return new l.Array(y)},l.Array!==Array&&(t.alloc=l.pool(t.alloc,l.Array.prototype.subarray)),t.prototype._push=function(y,_,v){return this.tail=this.tail.next=new p(y,_,v),this.len+=_,this},i.prototype=Object.create(p.prototype),i.prototype.fn=function(y,_,v){for(;y>127;)_[v++]=127&y|128,y>>>=7;_[v]=y},t.prototype.uint32=function(y){return this.len+=(this.tail=this.tail.next=new i((y>>>=0)<128?1:y<16384?2:y<2097152?3:y<268435456?4:5,y)).len,this},t.prototype.int32=function(y){return y<0?this._push(u,10,m.fromNumber(y)):this.uint32(y)},t.prototype.sint32=function(y){return this.uint32((y<<1^y>>31)>>>0)},t.prototype.uint64=function(y){var _=m.from(y);return this._push(u,_.length(),_)},t.prototype.int64=t.prototype.uint64,t.prototype.sint64=function(y){var _=m.from(y).zzEncode();return this._push(u,_.length(),_)},t.prototype.bool=function(y){return this._push(n,1,y?1:0)},t.prototype.fixed32=function(y){return this._push(g,4,y>>>0)},t.prototype.sfixed32=t.prototype.fixed32,t.prototype.fixed64=function(y){var _=m.from(y);return this._push(g,4,_.lo)._push(g,4,_.hi)},t.prototype.sfixed64=t.prototype.fixed64,t.prototype.float=function(y){return this._push(l.float.writeFloatLE,4,y)},t.prototype.double=function(y){return this._push(l.float.writeDoubleLE,8,y)};var b=l.Array.prototype.set?function(y,_,v){_.set(y,v)}:function(y,_,v){for(var w=0;w>>0;if(!_)return this._push(n,1,0);if(l.isString(y)){var v=t.alloc(_=s.length(y));s.decode(y,v,0),y=v}return this.uint32(_)._push(b,_,y)},t.prototype.string=function(y){var _=h.length(y);return _?this.uint32(_)._push(h.write,_,y):this._push(n,1,0)},t.prototype.fork=function(){return this.states=new o(this),this.head=this.tail=new p(a,0,0),this.len=0,this},t.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new p(a,0,0),this.len=0),this},t.prototype.ldelim=function(){var y=this.head,_=this.tail,v=this.len;return this.reset().uint32(v),v&&(this.tail.next=y.next,this.tail=_,this.len+=v),this},t.prototype.finish=function(){for(var y=this.head.next,_=this.constructor.alloc(this.len),v=0;y;)y.fn(y.val,_,v),v+=y.len,y=y.next;return _},t._configure=function(y){d=y,t.create=e(),d._configure()}},3155:(f,r,c)=>{f.exports=m;var d=c(1173);(m.prototype=Object.create(d.prototype)).constructor=m;var l=c(9693);function m(){d.call(this)}function s(h,p,a){h.length<40?l.utf8.write(h,p,a):p.utf8Write?p.utf8Write(h,a):p.write(h,a)}m._configure=function(){m.alloc=l._Buffer_allocUnsafe,m.writeBytesBuffer=l.Buffer&&l.Buffer.prototype instanceof Uint8Array&&l.Buffer.prototype.set.name==="set"?function(h,p,a){p.set(h,a)}:function(h,p,a){if(h.copy)h.copy(p,a,0,h.length);else for(var o=0;o>>0;return this.uint32(p),p&&this._push(m.writeBytesBuffer,p,h),this},m.prototype.string=function(h){var p=l.Buffer.byteLength(h);return this.uint32(p),p&&this._push(s,p,h),this},m._configure()},7714:(f,r,c)=>{r.R=void 0;const d=c(6919),l=c(7448);r.R=new class{async init(){}async createSessionHandler(m,s){const h=new d.Session(s);return await h.loadModel(m),new l.OnnxjsSessionHandler(h)}}},4200:(f,r,c)=>{r.c8=r.rX=void 0;const d=c(1670),l=c(5381),m=c(2157),s=c(2306);r.rX=()=>{if((typeof d.env.wasm.initTimeout!="number"||d.env.wasm.initTimeout<0)&&(d.env.wasm.initTimeout=0),typeof d.env.wasm.simd!="boolean"&&(d.env.wasm.simd=!0),typeof d.env.wasm.proxy!="boolean"&&(d.env.wasm.proxy=!1),typeof d.env.wasm.numThreads!="number"||!Number.isInteger(d.env.wasm.numThreads)||d.env.wasm.numThreads<=0){const h=typeof navigator>"u"?(0,l.cpus)().length:navigator.hardwareConcurrency;d.env.wasm.numThreads=Math.min(4,Math.ceil((h||1)/2))}},r.c8=new class{async init(){(0,r.rX)(),await(0,m.initWasm)()}async createSessionHandler(h,p){const a=new s.OnnxruntimeWebAssemblySessionHandler;return await a.loadModel(h,p),Promise.resolve(a)}}},6018:function(f,r,c){var d=this&&this.__createBinding||(Object.create?function(s,h,p,a){a===void 0&&(a=p);var o=Object.getOwnPropertyDescriptor(h,p);o&&!("get"in o?!h.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return h[p]}}),Object.defineProperty(s,a,o)}:function(s,h,p,a){a===void 0&&(a=p),s[a]=h[p]}),l=this&&this.__exportStar||function(s,h){for(var p in s)p==="default"||Object.prototype.hasOwnProperty.call(h,p)||d(h,s,p)};Object.defineProperty(r,"__esModule",{value:!0}),l(c(1670),r);const m=c(1670);{const s=c(7714).R;(0,m.registerBackend)("webgl",s,-10)}{const s=c(4200).c8;(0,m.registerBackend)("cpu",s,10),(0,m.registerBackend)("wasm",s,10),(0,m.registerBackend)("xnnpack",s,9)}},246:(f,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.createAttributeWithCacheKey=void 0;class c{constructor(l){Object.assign(this,l)}get cacheKey(){return this._cacheKey||(this._cacheKey=Object.getOwnPropertyNames(this).sort().map(l=>`${this[l]}`).join(";")),this._cacheKey}}r.createAttributeWithCacheKey=d=>new c(d)},7778:(f,r,c)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Attribute=void 0;const d=c(1446),l=c(9395),m=c(9162),s=c(2517);var h=l.onnxruntime.experimental.fbs;class p{constructor(o){if(this._attributes=new Map,o!=null){for(const t of o)t instanceof d.onnx.AttributeProto?this._attributes.set(t.name,[p.getValue(t),p.getType(t)]):t instanceof h.Attribute&&this._attributes.set(t.name(),[p.getValue(t),p.getType(t)]);if(this._attributes.sizem.Tensor.fromProto(n));if(o instanceof h.Attribute)return e.map(n=>m.Tensor.fromOrtTensor(n))}if(t===d.onnx.AttributeProto.AttributeType.STRING&&o instanceof d.onnx.AttributeProto){const n=e;return(0,s.decodeUtf8String)(n)}return t===d.onnx.AttributeProto.AttributeType.STRINGS&&o instanceof d.onnx.AttributeProto?e.map(s.decodeUtf8String):e}static getValueNoCheck(o){return o instanceof d.onnx.AttributeProto?this.getValueNoCheckFromOnnxFormat(o):this.getValueNoCheckFromOrtFormat(o)}static getValueNoCheckFromOnnxFormat(o){switch(o.type){case d.onnx.AttributeProto.AttributeType.FLOAT:return o.f;case d.onnx.AttributeProto.AttributeType.INT:return o.i;case d.onnx.AttributeProto.AttributeType.STRING:return o.s;case d.onnx.AttributeProto.AttributeType.TENSOR:return o.t;case d.onnx.AttributeProto.AttributeType.GRAPH:return o.g;case d.onnx.AttributeProto.AttributeType.FLOATS:return o.floats;case d.onnx.AttributeProto.AttributeType.INTS:return o.ints;case d.onnx.AttributeProto.AttributeType.STRINGS:return o.strings;case d.onnx.AttributeProto.AttributeType.TENSORS:return o.tensors;case d.onnx.AttributeProto.AttributeType.GRAPHS:return o.graphs;default:throw new Error(`unsupported attribute type: ${d.onnx.AttributeProto.AttributeType[o.type]}`)}}static getValueNoCheckFromOrtFormat(o){switch(o.type()){case h.AttributeType.FLOAT:return o.f();case h.AttributeType.INT:return o.i();case h.AttributeType.STRING:return o.s();case h.AttributeType.TENSOR:return o.t();case h.AttributeType.GRAPH:return o.g();case h.AttributeType.FLOATS:return o.floatsArray();case h.AttributeType.INTS:{const t=[];for(let e=0;e{Object.defineProperty(r,"__esModule",{value:!0}),r.resolveBackend=r.backend=void 0;const d=c(5038),l=new Map;async function m(s){const h=r.backend;if(h[s]!==void 0&&function(p){const a=p;return"initialize"in a&&typeof a.initialize=="function"&&"createSessionHandler"in a&&typeof a.createSessionHandler=="function"&&"dispose"in a&&typeof a.dispose=="function"}(h[s])){const p=h[s];let a=p.initialize();if(typeof a=="object"&&"then"in a&&(a=await a),a)return l.set(s,p),p}}r.backend={webgl:new d.WebGLBackend},r.resolveBackend=async function s(h){if(!h)return s(["webgl"]);{const p=typeof h=="string"?[h]:h;for(const a of p){const o=l.get(a);if(o)return o;const t=await m(a);if(t)return t}}throw new Error("no available backend to use")}},5038:(f,r,c)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.WebGLBackend=void 0;const d=c(1670),l=c(6231),m=c(6416),s=c(7305);r.WebGLBackend=class{get contextId(){return d.env.webgl.contextId}set contextId(h){d.env.webgl.contextId=h}get matmulMaxBatchSize(){return d.env.webgl.matmulMaxBatchSize}set matmulMaxBatchSize(h){d.env.webgl.matmulMaxBatchSize=h}get textureCacheMode(){return d.env.webgl.textureCacheMode}set textureCacheMode(h){d.env.webgl.textureCacheMode=h}get pack(){return d.env.webgl.pack}set pack(h){d.env.webgl.pack=h}get async(){return d.env.webgl.async}set async(h){d.env.webgl.async=h}initialize(){try{return this.glContext=(0,s.createWebGLContext)(this.contextId),typeof this.matmulMaxBatchSize!="number"&&(this.matmulMaxBatchSize=16),typeof this.textureCacheMode!="string"&&(this.textureCacheMode="full"),typeof this.pack!="boolean"&&(this.pack=!1),typeof this.async!="boolean"&&(this.async=!1),l.Logger.setWithEnv(d.env),l.Logger.verbose("WebGLBackend",`Created WebGLContext: ${typeof this.glContext} with matmulMaxBatchSize: ${this.matmulMaxBatchSize}; textureCacheMode: ${this.textureCacheMode}; pack: ${this.pack}; async: ${this.async}.`),!0}catch(h){return l.Logger.warning("WebGLBackend",`Unable to initialize WebGLBackend. ${h}`),!1}}createSessionHandler(h){return new m.WebGLSessionHandler(this,h)}dispose(){this.glContext.dispose()}}},5107:(f,r,c)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CoordsGlslLib=void 0;const d=c(2517),l=c(8520),m=c(5060),s=c(7859),h=c(9390);class p extends l.GlslLib{constructor(o){super(o)}getFunctions(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.offsetToCoords()),this.coordsToOffset()),this.toVec()),this.valueFrom()),this.getCommonUtilFuncs()),this.getInputsSamplingSnippets()),this.getOutputSamplingSnippet())}getCustomTypes(){return{}}offsetToCoords(){return{offsetToCoords:new l.GlslLibRoutine(` +`},"%p":function(G){return 0<=G.Gb&&12>G.Gb?"AM":"PM"},"%S":function(G){return H(G.$b,2)},"%t":function(){return" "},"%u":function(G){return G.Ab||7},"%U":function(G){return H(Math.floor((G.Bb+7-G.Ab)/7),2)},"%V":function(G){var ge=Math.floor((G.Bb+7-(G.Ab+6)%7)/7);if(2>=(G.Ab+371-G.Bb-2)%7&&ge++,ge)ge==53&&((Oe=(G.Ab+371-G.Bb)%7)==4||Oe==3&&nt(G.Cb)||(ge=1));else{ge=52;var Oe=(G.Ab+7-G.Bb-1)%7;(Oe==4||Oe==5&&nt(G.Cb%400-1))&&ge++}return H(ge,2)},"%w":function(G){return G.Ab},"%W":function(G){return H(Math.floor((G.Bb+7-(G.Ab+6)%7)/7),2)},"%y":function(G){return(G.Cb+1900).toString().substring(2)},"%Y":function(G){return G.Cb+1900},"%z":function(G){var ge=0<=(G=G.Yb);return G=Math.abs(G)/60,(ge?"+":"-")+("0000"+(G/60*100+G%60)).slice(-4)},"%Z":function(G){return G.ac},"%%":function(){return"%"}},N=N.replace(/%%/g,"\0\0"),ae)N.includes(ve)&&(N=N.replace(new RegExp(ve,"g"),ae[ve]($)));return ve=function(G){var ge=Array(te(G)+1);return Z(G,ge,0,ge.length),ge}(N=N.replace(/\0\0/g,"%")),ve.length>R?0:(k.set(ve,P>>>0),ve.length-1)}var Et={a:function(P){return ye(P+24)+24},m:function(P){return(P=new Ee(P)).Pb()||(P.Ib(!0),je--),P.Jb(!1),qe.push(P),P.Nb(),P.Qb()},ia:function(P){throw E("Unexpected exception thrown, this is not properly supported - aborting"),D=!0,P},w:function(){oe(0);var P=qe.pop();if(P.Xb()&&!P.Lb()){var R=P.Wb();R&&le(R)(P.Db),$e(P.Db)}Ve=0},d:function(){var P=Ve;if(!P)return Ce=0;var R=new Ee(P);R.Fb(P);var N=R.Eb();if(!N)return Ce=0,P;for(var $=Array.prototype.slice.call(arguments),j=0;j<$.length;j++){var H=$[j];if(H===0||H===N)break;if(et(H,N,R.zb+16))return Ce=H,P}return Ce=N,P},k:function(){var P=Ve;if(!P)return Ce=0;var R=new Ee(P);R.Fb(P);var N=R.Eb();if(!N)return Ce=0,P;for(var $=Array.prototype.slice.call(arguments),j=0;j<$.length;j++){var H=$[j];if(H===0||H===N)break;if(et(H,N,R.zb+16))return Ce=H,P}return Ce=N,P},g:function(){var P=Ve;if(!P)return Ce=0;var R=new Ee(P);R.Fb(P);var N=R.Eb();if(!N)return Ce=0,P;for(var $=Array.prototype.slice.call(arguments),j=0;j<$.length;j++){var H=$[j];if(H===0||H===N)break;if(et(H,N,R.zb+16))return Ce=H,P}return Ce=N,P},s:$e,L:function(){var P=qe.pop();P||Ae("no exception to throw");var R=P.Db;throw P.Lb()||(qe.push(P),P.Jb(!0),P.Ib(!1),je++),Ve=R,R},b:function(P,R,N){throw new Ee(P).Rb(R,N),Ve=P,je++,P},la:function(){return je},i:function(P){throw Ve||(Ve=P),P},H:function(){return 0},Ba:function(){},pa:function(){},ra:function(){},ka:function(){return 0},za:function(){},ua:function(){},ya:function(){},R:function(){},qa:function(){},na:function(){},Aa:function(){},oa:function(){},Ha:function(){},Ja:function(){Ae("To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking")},Ia:function(){Ae("To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking")},S:function(){return Date.now()},Ca:function(){return!0},Da:function(P,R){P=new Date(1e3*(q[P>>>2]+4294967296*F[P+4>>>2])),F[R>>2>>>0]=P.getUTCSeconds(),F[R+4>>2>>>0]=P.getUTCMinutes(),F[R+8>>2>>>0]=P.getUTCHours(),F[R+12>>2>>>0]=P.getUTCDate(),F[R+16>>2>>>0]=P.getUTCMonth(),F[R+20>>2>>>0]=P.getUTCFullYear()-1900,F[R+24>>2>>>0]=P.getUTCDay(),F[R+28>>2>>>0]=(P.getTime()-Date.UTC(P.getUTCFullYear(),0,1,0,0,0,0))/864e5|0},Ea:function(P,R){P=new Date(1e3*(q[P>>>2]+4294967296*F[P+4>>>2])),F[R>>2>>>0]=P.getSeconds(),F[R+4>>2>>>0]=P.getMinutes(),F[R+8>>2>>>0]=P.getHours(),F[R+12>>2>>>0]=P.getDate(),F[R+16>>2>>>0]=P.getMonth(),F[R+20>>2>>>0]=P.getFullYear()-1900,F[R+24>>2>>>0]=P.getDay();var N=new Date(P.getFullYear(),0,1);F[R+28>>2>>>0]=(P.getTime()-N.getTime())/864e5|0,F[R+36>>2>>>0]=-60*P.getTimezoneOffset();var $=new Date(P.getFullYear(),6,1).getTimezoneOffset();N=N.getTimezoneOffset(),F[R+32>>2>>>0]=0|($!=N&&P.getTimezoneOffset()==Math.min(N,$))},Fa:function(P){var R=new Date(F[P+20>>2>>>0]+1900,F[P+16>>2>>>0],F[P+12>>2>>>0],F[P+8>>2>>>0],F[P+4>>2>>>0],F[P>>2>>>0],0),N=F[P+32>>2>>>0],$=R.getTimezoneOffset(),j=new Date(R.getFullYear(),0,1),H=new Date(R.getFullYear(),6,1).getTimezoneOffset(),X=j.getTimezoneOffset(),ee=Math.min(X,H);return 0>N?F[P+32>>2>>>0]=+(H!=X&&ee==$):0>2>>>0]=R.getDay(),F[P+28>>2>>>0]=(R.getTime()-j.getTime())/864e5|0,F[P>>2>>>0]=R.getSeconds(),F[P+4>>2>>>0]=R.getMinutes(),F[P+8>>2>>>0]=R.getHours(),F[P+12>>2>>>0]=R.getDate(),F[P+16>>2>>>0]=R.getMonth(),R.getTime()/1e3|0},sa:function(){return-52},ta:function(){},Ga:function P(R,N,$){P.Vb||(P.Vb=!0,function(j,H,X){function ee(Ne){return(Ne=Ne.toTimeString().match(/\(([A-Za-z ]+)\)$/))?Ne[1]:"GMT"}var K=new Date().getFullYear(),ae=new Date(K,0,1),ve=new Date(K,6,1);K=ae.getTimezoneOffset();var Fe=ve.getTimezoneOffset();F[j>>2>>>0]=60*Math.max(K,Fe),F[H>>2>>>0]=+(K!=Fe),j=ee(ae),H=ee(ve),j=pt(j),H=pt(H),Fe>2>>>0]=j,q[X+4>>2>>>0]=H):(q[X>>2>>>0]=H,q[X+4>>2>>>0]=j)}(R,N,$))},B:function(){Ae("")},ma:function(){return 4294901760},I:v?()=>{var P=process.hrtime();return 1e3*P[0]+P[1]/1e6}:()=>performance.now(),xa:function(P,R,N){V.copyWithin(P>>>0,R>>>0,R+N>>>0)},G:function(P){var R=V.length;if(4294901760<(P>>>=0))return!1;for(var N=1;4>=N;N*=2){var $=R*(1+.2/N);$=Math.min($,P+100663296);var j=Math;$=Math.max(P,$),j=j.min.call(j,4294901760,$+(65536-$%65536)%65536);e:{try{M.grow(j-C.byteLength+65535>>>16),he();var H=1;break e}catch{}H=void 0}if(H)return!0}return!1},va:function(P,R){var N=0;return It().forEach(function($,j){var H=R+N;for(j=q[P+4*j>>2>>>0]=H,H=0;H<$.length;++H)k[j++>>0>>>0]=$.charCodeAt(H);k[j>>0>>>0]=0,N+=$.length+1}),0},wa:function(P,R){var N=It();q[P>>2>>>0]=N.length;var $=0;return N.forEach(function(j){$+=j.length+1}),q[R>>2>>>0]=$,0},ba:function(P){x||0>2>>>0],ee=q[R+4>>2>>>0];R+=8;for(var K=0;K>>0]);j+=ee}return q[$>>2>>>0]=j,0},c:function(){return Ce},ja:function P(R,N){P.Mb||(P.Mb=function(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var j=new Uint8Array(1);return()=>(crypto.getRandomValues(j),j[0])}if(v)try{var H=c(Object(function(){var X=new Error("Cannot find module 'crypto'");throw X.code="MODULE_NOT_FOUND",X}()));return()=>H.randomBytes(1)[0]}catch{}return()=>Ae("randomDevice")}());for(var $=0;$>0>>>0]=P.Mb();return 0},ea:function(P,R,N){var $=re();try{return le(P)(R,N)}catch(j){if(se($),j!==j+0)throw j;oe(1,0)}},fa:function(P,R,N){var $=re();try{return le(P)(R,N)}catch(j){if(se($),j!==j+0)throw j;oe(1,0)}},J:function(P){var R=re();try{return le(P)()}catch(N){if(se(R),N!==N+0)throw N;oe(1,0)}},e:function(P,R){var N=re();try{return le(P)(R)}catch($){if(se(N),$!==$+0)throw $;oe(1,0)}},N:function(P,R,N){var $=re();try{return le(P)(R,N)}catch(j){if(se($),j!==j+0)throw j;oe(1,0)}},O:function(P,R,N){var $=re();try{return le(P)(R,N)}catch(j){if(se($),j!==j+0)throw j;oe(1,0)}},j:function(P,R,N){var $=re();try{return le(P)(R,N)}catch(j){if(se($),j!==j+0)throw j;oe(1,0)}},o:function(P,R,N,$){var j=re();try{return le(P)(R,N,$)}catch(H){if(se(j),H!==H+0)throw H;oe(1,0)}},p:function(P,R,N,$,j){var H=re();try{return le(P)(R,N,$,j)}catch(X){if(se(H),X!==X+0)throw X;oe(1,0)}},M:function(P,R,N,$,j,H){var X=re();try{return le(P)(R,N,$,j,H)}catch(ee){if(se(X),ee!==ee+0)throw ee;oe(1,0)}},r:function(P,R,N,$,j,H){var X=re();try{return le(P)(R,N,$,j,H)}catch(ee){if(se(X),ee!==ee+0)throw ee;oe(1,0)}},v:function(P,R,N,$,j,H,X){var ee=re();try{return le(P)(R,N,$,j,H,X)}catch(K){if(se(ee),K!==K+0)throw K;oe(1,0)}},K:function(P,R,N,$,j,H,X,ee){var K=re();try{return le(P)(R,N,$,j,H,X,ee)}catch(ae){if(se(K),ae!==ae+0)throw ae;oe(1,0)}},D:function(P,R,N,$,j,H,X,ee,K,ae,ve,Fe){var Ne=re();try{return le(P)(R,N,$,j,H,X,ee,K,ae,ve,Fe)}catch(G){if(se(Ne),G!==G+0)throw G;oe(1,0)}},X:function(P,R,N,$,j,H,X,ee){var K=re();try{return ot(P,R,N,$,j,H,X,ee)}catch(ae){if(se(K),ae!==ae+0)throw ae;oe(1,0)}},V:function(P,R,N,$,j,H,X){var ee=re();try{return bt(P,R,N,$,j,H,X)}catch(K){if(se(ee),K!==K+0)throw K;oe(1,0)}},U:function(P,R,N,$,j){var H=re();try{return ht(P,R,N,$,j)}catch(X){if(se(H),X!==X+0)throw X;oe(1,0)}},Z:function(P,R,N,$){var j=re();try{return wt(P,R,N,$)}catch(H){if(se(j),H!==H+0)throw H;oe(1,0)}},W:function(P){var R=re();try{return gt(P)}catch(N){if(se(R),N!==N+0)throw N;oe(1,0)}},Y:function(P,R){var N=re();try{return xt(P,R)}catch($){if(se(N),$!==$+0)throw $;oe(1,0)}},T:function(P,R,N){var $=re();try{return dt(P,R,N)}catch(j){if(se($),j!==j+0)throw j;oe(1,0)}},f:function(P){var R=re();try{le(P)()}catch(N){if(se(R),N!==N+0)throw N;oe(1,0)}},q:function(P,R){var N=re();try{le(P)(R)}catch($){if(se(N),$!==$+0)throw $;oe(1,0)}},h:function(P,R,N){var $=re();try{le(P)(R,N)}catch(j){if(se($),j!==j+0)throw j;oe(1,0)}},da:function(P,R,N,$){var j=re();try{le(P)(R,N,$)}catch(H){if(se(j),H!==H+0)throw H;oe(1,0)}},l:function(P,R,N,$){var j=re();try{le(P)(R,N,$)}catch(H){if(se(j),H!==H+0)throw H;oe(1,0)}},t:function(P,R,N,$,j){var H=re();try{le(P)(R,N,$,j)}catch(X){if(se(H),X!==X+0)throw X;oe(1,0)}},u:function(P,R,N,$,j,H){var X=re();try{le(P)(R,N,$,j,H)}catch(ee){if(se(X),ee!==ee+0)throw ee;oe(1,0)}},x:function(P,R,N,$,j,H,X){var ee=re();try{le(P)(R,N,$,j,H,X)}catch(K){if(se(ee),K!==K+0)throw K;oe(1,0)}},z:function(P,R,N,$,j,H,X,ee){var K=re();try{le(P)(R,N,$,j,H,X,ee)}catch(ae){if(se(K),ae!==ae+0)throw ae;oe(1,0)}},ga:function(P,R,N,$,j,H,X,ee,K){var ae=re();try{le(P)(R,N,$,j,H,X,ee,K)}catch(ve){if(se(ae),ve!==ve+0)throw ve;oe(1,0)}},A:function(P,R,N,$,j,H,X,ee,K,ae,ve){var Fe=re();try{le(P)(R,N,$,j,H,X,ee,K,ae,ve)}catch(Ne){if(se(Fe),Ne!==Ne+0)throw Ne;oe(1,0)}},C:function(P,R,N,$,j,H,X,ee,K,ae,ve,Fe,Ne,G,ge,Oe){var Qe=re();try{le(P)(R,N,$,j,H,X,ee,K,ae,ve,Fe,Ne,G,ge,Oe)}catch(st){if(se(Qe),st!==st+0)throw st;oe(1,0)}},aa:function(P,R,N,$,j,H,X,ee){var K=re();try{yt(P,R,N,$,j,H,X,ee)}catch(ae){if(se(K),ae!==ae+0)throw ae;oe(1,0)}},_:function(P,R,N,$,j,H,X,ee,K,ae,ve,Fe){var Ne=re();try{vt(P,R,N,$,j,H,X,ee,K,ae,ve,Fe)}catch(G){if(se(Ne),G!==G+0)throw G;oe(1,0)}},$:function(P,R,N,$,j,H){var X=re();try{_t(P,R,N,$,j,H)}catch(ee){if(se(X),ee!==ee+0)throw ee;oe(1,0)}},n:function(P){return P},F:function(P){Ce=P},ha:At,y:function(P,R,N,$){return At(P,R,N,$)}};(function(){function P(j){s.asm=j.exports,M=s.asm.Ka,he(),Me=s.asm.ib,ue.unshift(s.asm.La),De--,s.monitorRunDependencies&&s.monitorRunDependencies(De),De==0&&Re&&(j=Re,Re=null,j())}function R(j){P(j.instance)}function N(j){return function(){if(!T&&(y||_)){if(typeof fetch=="function"&&!Se.startsWith("file://"))return fetch(Se,{credentials:"same-origin"}).then(function(H){if(!H.ok)throw"failed to load wasm binary file at '"+Se+"'";return H.arrayBuffer()}).catch(function(){return Ue()});if(o)return new Promise(function(H,X){o(Se,function(ee){H(new Uint8Array(ee))},X)})}return Promise.resolve().then(function(){return Ue()})}().then(function(H){return WebAssembly.instantiate(H,$)}).then(function(H){return H}).then(j,function(H){E("failed to asynchronously prepare wasm: "+H),Ae(H)})}var $={a:Et};if(De++,s.monitorRunDependencies&&s.monitorRunDependencies(De),s.instantiateWasm)try{return s.instantiateWasm($,P)}catch(j){return E("Module.instantiateWasm callback failed with error: "+j),!1}(T||typeof WebAssembly.instantiateStreaming!="function"||we()||Se.startsWith("file://")||v||typeof fetch!="function"?N(R):fetch(Se,{credentials:"same-origin"}).then(function(j){return WebAssembly.instantiateStreaming(j,$).then(R,function(H){return E("wasm streaming compile failed: "+H),E("falling back to ArrayBuffer instantiation"),N(R)})})).catch(p)})(),s.___wasm_call_ctors=function(){return(s.___wasm_call_ctors=s.asm.La).apply(null,arguments)},s._OrtInit=function(){return(s._OrtInit=s.asm.Ma).apply(null,arguments)},s._OrtCreateSessionOptions=function(){return(s._OrtCreateSessionOptions=s.asm.Na).apply(null,arguments)},s._OrtAppendExecutionProvider=function(){return(s._OrtAppendExecutionProvider=s.asm.Oa).apply(null,arguments)},s._OrtAddSessionConfigEntry=function(){return(s._OrtAddSessionConfigEntry=s.asm.Pa).apply(null,arguments)},s._OrtReleaseSessionOptions=function(){return(s._OrtReleaseSessionOptions=s.asm.Qa).apply(null,arguments)},s._OrtCreateSession=function(){return(s._OrtCreateSession=s.asm.Ra).apply(null,arguments)},s._OrtReleaseSession=function(){return(s._OrtReleaseSession=s.asm.Sa).apply(null,arguments)},s._OrtGetInputCount=function(){return(s._OrtGetInputCount=s.asm.Ta).apply(null,arguments)},s._OrtGetOutputCount=function(){return(s._OrtGetOutputCount=s.asm.Ua).apply(null,arguments)},s._OrtGetInputName=function(){return(s._OrtGetInputName=s.asm.Va).apply(null,arguments)},s._OrtGetOutputName=function(){return(s._OrtGetOutputName=s.asm.Wa).apply(null,arguments)},s._OrtFree=function(){return(s._OrtFree=s.asm.Xa).apply(null,arguments)},s._OrtCreateTensor=function(){return(s._OrtCreateTensor=s.asm.Ya).apply(null,arguments)},s._OrtGetTensorData=function(){return(s._OrtGetTensorData=s.asm.Za).apply(null,arguments)},s._OrtReleaseTensor=function(){return(s._OrtReleaseTensor=s.asm._a).apply(null,arguments)},s._OrtCreateRunOptions=function(){return(s._OrtCreateRunOptions=s.asm.$a).apply(null,arguments)},s._OrtAddRunConfigEntry=function(){return(s._OrtAddRunConfigEntry=s.asm.ab).apply(null,arguments)},s._OrtReleaseRunOptions=function(){return(s._OrtReleaseRunOptions=s.asm.bb).apply(null,arguments)},s._OrtRun=function(){return(s._OrtRun=s.asm.cb).apply(null,arguments)},s._OrtEndProfiling=function(){return(s._OrtEndProfiling=s.asm.db).apply(null,arguments)};var Xe,ye=s._malloc=function(){return(ye=s._malloc=s.asm.eb).apply(null,arguments)},rt=s._free=function(){return(rt=s._free=s.asm.fb).apply(null,arguments)},ct=s._fflush=function(){return(ct=s._fflush=s.asm.gb).apply(null,arguments)},it=s.___funcs_on_exit=function(){return(it=s.___funcs_on_exit=s.asm.hb).apply(null,arguments)},oe=s._setThrew=function(){return(oe=s._setThrew=s.asm.jb).apply(null,arguments)},re=s.stackSave=function(){return(re=s.stackSave=s.asm.kb).apply(null,arguments)},se=s.stackRestore=function(){return(se=s.stackRestore=s.asm.lb).apply(null,arguments)},ft=s.stackAlloc=function(){return(ft=s.stackAlloc=s.asm.mb).apply(null,arguments)},et=s.___cxa_can_catch=function(){return(et=s.___cxa_can_catch=s.asm.nb).apply(null,arguments)},mt=s.___cxa_is_pointer_type=function(){return(mt=s.___cxa_is_pointer_type=s.asm.ob).apply(null,arguments)},gt=s.dynCall_j=function(){return(gt=s.dynCall_j=s.asm.pb).apply(null,arguments)},bt=s.dynCall_iiiiij=function(){return(bt=s.dynCall_iiiiij=s.asm.qb).apply(null,arguments)},dt=s.dynCall_jii=function(){return(dt=s.dynCall_jii=s.asm.rb).apply(null,arguments)},yt=s.dynCall_viiiiij=function(){return(yt=s.dynCall_viiiiij=s.asm.sb).apply(null,arguments)},_t=s.dynCall_vjji=function(){return(_t=s.dynCall_vjji=s.asm.tb).apply(null,arguments)},vt=s.dynCall_viiijjjii=function(){return(vt=s.dynCall_viiijjjii=s.asm.ub).apply(null,arguments)},wt=s.dynCall_iij=function(){return(wt=s.dynCall_iij=s.asm.vb).apply(null,arguments)},xt=s.dynCall_ji=function(){return(xt=s.dynCall_ji=s.asm.wb).apply(null,arguments)},ot=s.dynCall_iiiiiij=function(){return(ot=s.dynCall_iiiiiij=s.asm.xb).apply(null,arguments)},ht=s.dynCall_iiij=function(){return(ht=s.dynCall_iiij=s.asm.yb).apply(null,arguments)};function Tt(){function P(){if(!Xe&&(Xe=!0,s.calledRun=!0,!D)){if(We(ue),h(s),s.onRuntimeInitialized&&s.onRuntimeInitialized(),s.postRun)for(typeof s.postRun=="function"&&(s.postRun=[s.postRun]);s.postRun.length;){var R=s.postRun.shift();_e.unshift(R)}We(_e)}}if(!(0{f.exports=function(r,c){for(var d=new Array(arguments.length-1),l=0,m=2,s=!0;m{var c=r;c.length=function(h){var p=h.length;if(!p)return 0;for(var a=0;--p%4>1&&h.charAt(p)==="=";)++a;return Math.ceil(3*h.length)/4-a};for(var d=new Array(64),l=new Array(123),m=0;m<64;)l[d[m]=m<26?m+65:m<52?m+71:m<62?m-4:m-59|43]=m++;c.encode=function(h,p,a){for(var o,t=null,e=[],n=0,i=0;p>2],o=(3&u)<<4,i=1;break;case 1:e[n++]=d[o|u>>4],o=(15&u)<<2,i=2;break;case 2:e[n++]=d[o|u>>6],e[n++]=d[63&u],i=0}n>8191&&((t||(t=[])).push(String.fromCharCode.apply(String,e)),n=0)}return i&&(e[n++]=d[o],e[n++]=61,i===1&&(e[n++]=61)),t?(n&&t.push(String.fromCharCode.apply(String,e.slice(0,n))),t.join("")):String.fromCharCode.apply(String,e.slice(0,n))};var s="invalid encoding";c.decode=function(h,p,a){for(var o,t=a,e=0,n=0;n1)break;if((i=l[i])===void 0)throw Error(s);switch(e){case 0:o=i,e=1;break;case 1:p[a++]=o<<2|(48&i)>>4,o=i,e=2;break;case 2:p[a++]=(15&o)<<4|(60&i)>>2,o=i,e=3;break;case 3:p[a++]=(3&o)<<6|i,e=0}}if(e===1)throw Error(s);return a-t},c.test=function(h){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(h)}},9211:f=>{function r(){this._listeners={}}f.exports=r,r.prototype.on=function(c,d,l){return(this._listeners[c]||(this._listeners[c]=[])).push({fn:d,ctx:l||this}),this},r.prototype.off=function(c,d){if(c===void 0)this._listeners={};else if(d===void 0)this._listeners[c]=[];else for(var l=this._listeners[c],m=0;m{function r(s){return typeof Float32Array<"u"?function(){var h=new Float32Array([-0]),p=new Uint8Array(h.buffer),a=p[3]===128;function o(i,u,g){h[0]=i,u[g]=p[0],u[g+1]=p[1],u[g+2]=p[2],u[g+3]=p[3]}function t(i,u,g){h[0]=i,u[g]=p[3],u[g+1]=p[2],u[g+2]=p[1],u[g+3]=p[0]}function e(i,u){return p[0]=i[u],p[1]=i[u+1],p[2]=i[u+2],p[3]=i[u+3],h[0]}function n(i,u){return p[3]=i[u],p[2]=i[u+1],p[1]=i[u+2],p[0]=i[u+3],h[0]}s.writeFloatLE=a?o:t,s.writeFloatBE=a?t:o,s.readFloatLE=a?e:n,s.readFloatBE=a?n:e}():function(){function h(a,o,t,e){var n=o<0?1:0;if(n&&(o=-o),o===0)a(1/o>0?0:2147483648,t,e);else if(isNaN(o))a(2143289344,t,e);else if(o>34028234663852886e22)a((n<<31|2139095040)>>>0,t,e);else if(o<11754943508222875e-54)a((n<<31|Math.round(o/1401298464324817e-60))>>>0,t,e);else{var i=Math.floor(Math.log(o)/Math.LN2);a((n<<31|i+127<<23|8388607&Math.round(o*Math.pow(2,-i)*8388608))>>>0,t,e)}}function p(a,o,t){var e=a(o,t),n=2*(e>>31)+1,i=e>>>23&255,u=8388607&e;return i===255?u?NaN:n*(1/0):i===0?1401298464324817e-60*n*u:n*Math.pow(2,i-150)*(u+8388608)}s.writeFloatLE=h.bind(null,c),s.writeFloatBE=h.bind(null,d),s.readFloatLE=p.bind(null,l),s.readFloatBE=p.bind(null,m)}(),typeof Float64Array<"u"?function(){var h=new Float64Array([-0]),p=new Uint8Array(h.buffer),a=p[7]===128;function o(i,u,g){h[0]=i,u[g]=p[0],u[g+1]=p[1],u[g+2]=p[2],u[g+3]=p[3],u[g+4]=p[4],u[g+5]=p[5],u[g+6]=p[6],u[g+7]=p[7]}function t(i,u,g){h[0]=i,u[g]=p[7],u[g+1]=p[6],u[g+2]=p[5],u[g+3]=p[4],u[g+4]=p[3],u[g+5]=p[2],u[g+6]=p[1],u[g+7]=p[0]}function e(i,u){return p[0]=i[u],p[1]=i[u+1],p[2]=i[u+2],p[3]=i[u+3],p[4]=i[u+4],p[5]=i[u+5],p[6]=i[u+6],p[7]=i[u+7],h[0]}function n(i,u){return p[7]=i[u],p[6]=i[u+1],p[5]=i[u+2],p[4]=i[u+3],p[3]=i[u+4],p[2]=i[u+5],p[1]=i[u+6],p[0]=i[u+7],h[0]}s.writeDoubleLE=a?o:t,s.writeDoubleBE=a?t:o,s.readDoubleLE=a?e:n,s.readDoubleBE=a?n:e}():function(){function h(a,o,t,e,n,i){var u=e<0?1:0;if(u&&(e=-e),e===0)a(0,n,i+o),a(1/e>0?0:2147483648,n,i+t);else if(isNaN(e))a(0,n,i+o),a(2146959360,n,i+t);else if(e>17976931348623157e292)a(0,n,i+o),a((u<<31|2146435072)>>>0,n,i+t);else{var g;if(e<22250738585072014e-324)a((g=e/5e-324)>>>0,n,i+o),a((u<<31|g/4294967296)>>>0,n,i+t);else{var b=Math.floor(Math.log(e)/Math.LN2);b===1024&&(b=1023),a(4503599627370496*(g=e*Math.pow(2,-b))>>>0,n,i+o),a((u<<31|b+1023<<20|1048576*g&1048575)>>>0,n,i+t)}}}function p(a,o,t,e,n){var i=a(e,n+o),u=a(e,n+t),g=2*(u>>31)+1,b=u>>>20&2047,y=4294967296*(1048575&u)+i;return b===2047?y?NaN:g*(1/0):b===0?5e-324*g*y:g*Math.pow(2,b-1075)*(y+4503599627370496)}s.writeDoubleLE=h.bind(null,c,0,4),s.writeDoubleBE=h.bind(null,d,4,0),s.readDoubleLE=p.bind(null,l,0,4),s.readDoubleBE=p.bind(null,m,4,0)}(),s}function c(s,h,p){h[p]=255&s,h[p+1]=s>>>8&255,h[p+2]=s>>>16&255,h[p+3]=s>>>24}function d(s,h,p){h[p]=s>>>24,h[p+1]=s>>>16&255,h[p+2]=s>>>8&255,h[p+3]=255&s}function l(s,h){return(s[h]|s[h+1]<<8|s[h+2]<<16|s[h+3]<<24)>>>0}function m(s,h){return(s[h]<<24|s[h+1]<<16|s[h+2]<<8|s[h+3])>>>0}f.exports=r(r)},7199:module=>{function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(f){}return null}module.exports=inquire},6662:f=>{f.exports=function(r,c,d){var l=d||8192,m=l>>>1,s=null,h=l;return function(p){if(p<1||p>m)return r(p);h+p>l&&(s=r(l),h=0);var a=c.call(s,h,h+=p);return 7&h&&(h=1+(7|h)),a}}},4997:(f,r)=>{var c=r;c.length=function(d){for(var l=0,m=0,s=0;s191&&s<224?p[a++]=(31&s)<<6|63&d[l++]:s>239&&s<365?(s=((7&s)<<18|(63&d[l++])<<12|(63&d[l++])<<6|63&d[l++])-65536,p[a++]=55296+(s>>10),p[a++]=56320+(1023&s)):p[a++]=(15&s)<<12|(63&d[l++])<<6|63&d[l++],a>8191&&((h||(h=[])).push(String.fromCharCode.apply(String,p)),a=0);return h?(a&&h.push(String.fromCharCode.apply(String,p.slice(0,a))),h.join("")):String.fromCharCode.apply(String,p.slice(0,a))},c.write=function(d,l,m){for(var s,h,p=m,a=0;a>6|192,l[m++]=63&s|128):(64512&s)==55296&&(64512&(h=d.charCodeAt(a+1)))==56320?(s=65536+((1023&s)<<10)+(1023&h),++a,l[m++]=s>>18|240,l[m++]=s>>12&63|128,l[m++]=s>>6&63|128,l[m++]=63&s|128):(l[m++]=s>>12|224,l[m++]=s>>6&63|128,l[m++]=63&s|128);return m-p}},3442:(f,r)=>{r.__esModule=!0;var c=function(){function d(l){if(!l)throw new TypeError("Invalid argument; `value` has no value.");this.value=d.EMPTY,l&&d.isGuid(l)&&(this.value=l)}return d.isGuid=function(l){var m=l.toString();return l&&(l instanceof d||d.validator.test(m))},d.create=function(){return new d([d.gen(2),d.gen(1),d.gen(1),d.gen(1),d.gen(3)].join("-"))},d.createEmpty=function(){return new d("emptyguid")},d.parse=function(l){return new d(l)},d.raw=function(){return[d.gen(2),d.gen(1),d.gen(1),d.gen(1),d.gen(3)].join("-")},d.gen=function(l){for(var m="",s=0;s{f.exports=c;var r=null;try{r=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function c(x,M,C){this.low=0|x,this.high=0|M,this.unsigned=!!C}function d(x){return(x&&x.__isLong__)===!0}c.prototype.__isLong__,Object.defineProperty(c.prototype,"__isLong__",{value:!0}),c.isLong=d;var l={},m={};function s(x,M){var C,k,V;return M?(V=0<=(x>>>=0)&&x<256)&&(k=m[x])?k:(C=p(x,(0|x)<0?-1:0,!0),V&&(m[x]=C),C):(V=-128<=(x|=0)&&x<128)&&(k=l[x])?k:(C=p(x,x<0?-1:0,!1),V&&(l[x]=C),C)}function h(x,M){if(isNaN(x))return M?b:g;if(M){if(x<0)return b;if(x>=n)return T}else{if(x<=-i)return A;if(x+1>=i)return w}return x<0?h(-x,M).neg():p(x%e|0,x/e|0,M)}function p(x,M,C){return new c(x,M,C)}c.fromInt=s,c.fromNumber=h,c.fromBits=p;var a=Math.pow;function o(x,M,C){if(x.length===0)throw Error("empty string");if(x==="NaN"||x==="Infinity"||x==="+Infinity"||x==="-Infinity")return g;if(typeof M=="number"?(C=M,M=!1):M=!!M,(C=C||10)<2||360)throw Error("interior hyphen");if(k===0)return o(x.substring(1),M,C).neg();for(var V=h(a(C,8)),F=g,q=0;q>>0:this.low},E.toNumber=function(){return this.unsigned?(this.high>>>0)*e+(this.low>>>0):this.high*e+(this.low>>>0)},E.toString=function(x){if((x=x||10)<2||36>>0).toString(x);if((F=D).isZero())return U+q;for(;U.length<6;)U="0"+U;q=""+U+q}},E.getHighBits=function(){return this.high},E.getHighBitsUnsigned=function(){return this.high>>>0},E.getLowBits=function(){return this.low},E.getLowBitsUnsigned=function(){return this.low>>>0},E.getNumBitsAbs=function(){if(this.isNegative())return this.eq(A)?64:this.neg().getNumBitsAbs();for(var x=this.high!=0?this.high:this.low,M=31;M>0&&(x&1<=0},E.isOdd=function(){return(1&this.low)==1},E.isEven=function(){return(1&this.low)==0},E.equals=function(x){return d(x)||(x=t(x)),(this.unsigned===x.unsigned||this.high>>>31!=1||x.high>>>31!=1)&&this.high===x.high&&this.low===x.low},E.eq=E.equals,E.notEquals=function(x){return!this.eq(x)},E.neq=E.notEquals,E.ne=E.notEquals,E.lessThan=function(x){return this.comp(x)<0},E.lt=E.lessThan,E.lessThanOrEqual=function(x){return this.comp(x)<=0},E.lte=E.lessThanOrEqual,E.le=E.lessThanOrEqual,E.greaterThan=function(x){return this.comp(x)>0},E.gt=E.greaterThan,E.greaterThanOrEqual=function(x){return this.comp(x)>=0},E.gte=E.greaterThanOrEqual,E.ge=E.greaterThanOrEqual,E.compare=function(x){if(d(x)||(x=t(x)),this.eq(x))return 0;var M=this.isNegative(),C=x.isNegative();return M&&!C?-1:!M&&C?1:this.unsigned?x.high>>>0>this.high>>>0||x.high===this.high&&x.low>>>0>this.low>>>0?-1:1:this.sub(x).isNegative()?-1:1},E.comp=E.compare,E.negate=function(){return!this.unsigned&&this.eq(A)?A:this.not().add(y)},E.neg=E.negate,E.add=function(x){d(x)||(x=t(x));var M=this.high>>>16,C=65535&this.high,k=this.low>>>16,V=65535&this.low,F=x.high>>>16,q=65535&x.high,D=x.low>>>16,U=0,J=0,Y=0,Z=0;return Y+=(Z+=V+(65535&x.low))>>>16,J+=(Y+=k+D)>>>16,U+=(J+=C+q)>>>16,U+=M+F,p((Y&=65535)<<16|(Z&=65535),(U&=65535)<<16|(J&=65535),this.unsigned)},E.subtract=function(x){return d(x)||(x=t(x)),this.add(x.neg())},E.sub=E.subtract,E.multiply=function(x){if(this.isZero())return g;if(d(x)||(x=t(x)),r)return p(r.mul(this.low,this.high,x.low,x.high),r.get_high(),this.unsigned);if(x.isZero())return g;if(this.eq(A))return x.isOdd()?A:g;if(x.eq(A))return this.isOdd()?A:g;if(this.isNegative())return x.isNegative()?this.neg().mul(x.neg()):this.neg().mul(x).neg();if(x.isNegative())return this.mul(x.neg()).neg();if(this.lt(u)&&x.lt(u))return h(this.toNumber()*x.toNumber(),this.unsigned);var M=this.high>>>16,C=65535&this.high,k=this.low>>>16,V=65535&this.low,F=x.high>>>16,q=65535&x.high,D=x.low>>>16,U=65535&x.low,J=0,Y=0,Z=0,te=0;return Z+=(te+=V*U)>>>16,Y+=(Z+=k*U)>>>16,Z&=65535,Y+=(Z+=V*D)>>>16,J+=(Y+=C*U)>>>16,Y&=65535,J+=(Y+=k*D)>>>16,Y&=65535,J+=(Y+=V*q)>>>16,J+=M*U+C*D+k*q+V*F,p((Z&=65535)<<16|(te&=65535),(J&=65535)<<16|(Y&=65535),this.unsigned)},E.mul=E.multiply,E.divide=function(x){if(d(x)||(x=t(x)),x.isZero())throw Error("division by zero");var M,C,k;if(r)return this.unsigned||this.high!==-2147483648||x.low!==-1||x.high!==-1?p((this.unsigned?r.div_u:r.div_s)(this.low,this.high,x.low,x.high),r.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?b:g;if(this.unsigned){if(x.unsigned||(x=x.toUnsigned()),x.gt(this))return b;if(x.gt(this.shru(1)))return _;k=b}else{if(this.eq(A))return x.eq(y)||x.eq(v)?A:x.eq(A)?y:(M=this.shr(1).div(x).shl(1)).eq(g)?x.isNegative()?y:v:(C=this.sub(x.mul(M)),k=M.add(C.div(x)));if(x.eq(A))return this.unsigned?b:g;if(this.isNegative())return x.isNegative()?this.neg().div(x.neg()):this.neg().div(x).neg();if(x.isNegative())return this.div(x.neg()).neg();k=g}for(C=this;C.gte(x);){M=Math.max(1,Math.floor(C.toNumber()/x.toNumber()));for(var V=Math.ceil(Math.log(M)/Math.LN2),F=V<=48?1:a(2,V-48),q=h(M),D=q.mul(x);D.isNegative()||D.gt(C);)D=(q=h(M-=F,this.unsigned)).mul(x);q.isZero()&&(q=y),k=k.add(q),C=C.sub(D)}return k},E.div=E.divide,E.modulo=function(x){return d(x)||(x=t(x)),r?p((this.unsigned?r.rem_u:r.rem_s)(this.low,this.high,x.low,x.high),r.get_high(),this.unsigned):this.sub(this.div(x).mul(x))},E.mod=E.modulo,E.rem=E.modulo,E.not=function(){return p(~this.low,~this.high,this.unsigned)},E.and=function(x){return d(x)||(x=t(x)),p(this.low&x.low,this.high&x.high,this.unsigned)},E.or=function(x){return d(x)||(x=t(x)),p(this.low|x.low,this.high|x.high,this.unsigned)},E.xor=function(x){return d(x)||(x=t(x)),p(this.low^x.low,this.high^x.high,this.unsigned)},E.shiftLeft=function(x){return d(x)&&(x=x.toInt()),(x&=63)==0?this:x<32?p(this.low<>>32-x,this.unsigned):p(0,this.low<>>x|this.high<<32-x,this.high>>x,this.unsigned):p(this.high>>x-32,this.high>=0?0:-1,this.unsigned)},E.shr=E.shiftRight,E.shiftRightUnsigned=function(x){if(d(x)&&(x=x.toInt()),(x&=63)==0)return this;var M=this.high;return x<32?p(this.low>>>x|M<<32-x,M>>>x,this.unsigned):p(x===32?M:M>>>x-32,0,this.unsigned)},E.shru=E.shiftRightUnsigned,E.shr_u=E.shiftRightUnsigned,E.toSigned=function(){return this.unsigned?p(this.low,this.high,!1):this},E.toUnsigned=function(){return this.unsigned?this:p(this.low,this.high,!0)},E.toBytes=function(x){return x?this.toBytesLE():this.toBytesBE()},E.toBytesLE=function(){var x=this.high,M=this.low;return[255&M,M>>>8&255,M>>>16&255,M>>>24,255&x,x>>>8&255,x>>>16&255,x>>>24]},E.toBytesBE=function(){var x=this.high,M=this.low;return[x>>>24,x>>>16&255,x>>>8&255,255&x,M>>>24,M>>>16&255,M>>>8&255,255&M]},c.fromBytes=function(x,M,C){return C?c.fromBytesLE(x,M):c.fromBytesBE(x,M)},c.fromBytesLE=function(x,M){return new c(x[0]|x[1]<<8|x[2]<<16|x[3]<<24,x[4]|x[5]<<8|x[6]<<16|x[7]<<24,M)},c.fromBytesBE=function(x,M){return new c(x[4]<<24|x[5]<<16|x[6]<<8|x[7],x[0]<<24|x[1]<<16|x[2]<<8|x[3],M)}},1446:(f,r,c)=>{var d,l,m,s=c(2100),h=s.Reader,p=s.Writer,a=s.util,o=s.roots.default||(s.roots.default={});o.onnx=((m={}).Version=(d={},(l=Object.create(d))[d[0]="_START_VERSION"]=0,l[d[1]="IR_VERSION_2017_10_10"]=1,l[d[2]="IR_VERSION_2017_10_30"]=2,l[d[3]="IR_VERSION_2017_11_3"]=3,l[d[4]="IR_VERSION_2019_1_22"]=4,l[d[5]="IR_VERSION"]=5,l),m.AttributeProto=function(){function t(e){if(this.floats=[],this.ints=[],this.strings=[],this.tensors=[],this.graphs=[],e)for(var n=Object.keys(e),i=0;i>>3){case 1:u.name=e.string();break;case 21:u.refAttrName=e.string();break;case 13:u.docString=e.string();break;case 20:u.type=e.int32();break;case 2:u.f=e.float();break;case 3:u.i=e.int64();break;case 4:u.s=e.bytes();break;case 5:u.t=o.onnx.TensorProto.decode(e,e.uint32());break;case 6:u.g=o.onnx.GraphProto.decode(e,e.uint32());break;case 7:if(u.floats&&u.floats.length||(u.floats=[]),(7&g)==2)for(var b=e.uint32()+e.pos;e.pos>>0,e.i.high>>>0).toNumber())),e.s!=null&&(typeof e.s=="string"?a.base64.decode(e.s,n.s=a.newBuffer(a.base64.length(e.s)),0):e.s.length&&(n.s=e.s)),e.t!=null){if(typeof e.t!="object")throw TypeError(".onnx.AttributeProto.t: object expected");n.t=o.onnx.TensorProto.fromObject(e.t)}if(e.g!=null){if(typeof e.g!="object")throw TypeError(".onnx.AttributeProto.g: object expected");n.g=o.onnx.GraphProto.fromObject(e.g)}if(e.floats){if(!Array.isArray(e.floats))throw TypeError(".onnx.AttributeProto.floats: array expected");n.floats=[];for(var i=0;i>>0,e.ints[i].high>>>0).toNumber())}if(e.strings){if(!Array.isArray(e.strings))throw TypeError(".onnx.AttributeProto.strings: array expected");for(n.strings=[],i=0;i>>0,e.i.high>>>0).toNumber():e.i),e.s!=null&&e.hasOwnProperty("s")&&(i.s=n.bytes===String?a.base64.encode(e.s,0,e.s.length):n.bytes===Array?Array.prototype.slice.call(e.s):e.s),e.t!=null&&e.hasOwnProperty("t")&&(i.t=o.onnx.TensorProto.toObject(e.t,n)),e.g!=null&&e.hasOwnProperty("g")&&(i.g=o.onnx.GraphProto.toObject(e.g,n)),e.floats&&e.floats.length){i.floats=[];for(var g=0;g>>0,e.ints[g].high>>>0).toNumber():e.ints[g];if(e.strings&&e.strings.length)for(i.strings=[],g=0;g>>3){case 1:u.name=e.string();break;case 2:u.type=o.onnx.TypeProto.decode(e,e.uint32());break;case 3:u.docString=e.string();break;default:e.skipType(7&g)}}return u},t.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},t.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.name!=null&&e.hasOwnProperty("name")&&!a.isString(e.name))return"name: string expected";if(e.type!=null&&e.hasOwnProperty("type")){var n=o.onnx.TypeProto.verify(e.type);if(n)return"type."+n}return e.docString!=null&&e.hasOwnProperty("docString")&&!a.isString(e.docString)?"docString: string expected":null},t.fromObject=function(e){if(e instanceof o.onnx.ValueInfoProto)return e;var n=new o.onnx.ValueInfoProto;if(e.name!=null&&(n.name=String(e.name)),e.type!=null){if(typeof e.type!="object")throw TypeError(".onnx.ValueInfoProto.type: object expected");n.type=o.onnx.TypeProto.fromObject(e.type)}return e.docString!=null&&(n.docString=String(e.docString)),n},t.toObject=function(e,n){n||(n={});var i={};return n.defaults&&(i.name="",i.type=null,i.docString=""),e.name!=null&&e.hasOwnProperty("name")&&(i.name=e.name),e.type!=null&&e.hasOwnProperty("type")&&(i.type=o.onnx.TypeProto.toObject(e.type,n)),e.docString!=null&&e.hasOwnProperty("docString")&&(i.docString=e.docString),i},t.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},t}(),m.NodeProto=function(){function t(e){if(this.input=[],this.output=[],this.attribute=[],e)for(var n=Object.keys(e),i=0;i>>3){case 1:u.input&&u.input.length||(u.input=[]),u.input.push(e.string());break;case 2:u.output&&u.output.length||(u.output=[]),u.output.push(e.string());break;case 3:u.name=e.string();break;case 4:u.opType=e.string();break;case 7:u.domain=e.string();break;case 5:u.attribute&&u.attribute.length||(u.attribute=[]),u.attribute.push(o.onnx.AttributeProto.decode(e,e.uint32()));break;case 6:u.docString=e.string();break;default:e.skipType(7&g)}}return u},t.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},t.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.input!=null&&e.hasOwnProperty("input")){if(!Array.isArray(e.input))return"input: array expected";for(var n=0;n>>3){case 1:u.irVersion=e.int64();break;case 8:u.opsetImport&&u.opsetImport.length||(u.opsetImport=[]),u.opsetImport.push(o.onnx.OperatorSetIdProto.decode(e,e.uint32()));break;case 2:u.producerName=e.string();break;case 3:u.producerVersion=e.string();break;case 4:u.domain=e.string();break;case 5:u.modelVersion=e.int64();break;case 6:u.docString=e.string();break;case 7:u.graph=o.onnx.GraphProto.decode(e,e.uint32());break;case 14:u.metadataProps&&u.metadataProps.length||(u.metadataProps=[]),u.metadataProps.push(o.onnx.StringStringEntryProto.decode(e,e.uint32()));break;default:e.skipType(7&g)}}return u},t.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},t.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.irVersion!=null&&e.hasOwnProperty("irVersion")&&!(a.isInteger(e.irVersion)||e.irVersion&&a.isInteger(e.irVersion.low)&&a.isInteger(e.irVersion.high)))return"irVersion: integer|Long expected";if(e.opsetImport!=null&&e.hasOwnProperty("opsetImport")){if(!Array.isArray(e.opsetImport))return"opsetImport: array expected";for(var n=0;n>>0,e.irVersion.high>>>0).toNumber())),e.opsetImport){if(!Array.isArray(e.opsetImport))throw TypeError(".onnx.ModelProto.opsetImport: array expected");n.opsetImport=[];for(var i=0;i>>0,e.modelVersion.high>>>0).toNumber())),e.docString!=null&&(n.docString=String(e.docString)),e.graph!=null){if(typeof e.graph!="object")throw TypeError(".onnx.ModelProto.graph: object expected");n.graph=o.onnx.GraphProto.fromObject(e.graph)}if(e.metadataProps){if(!Array.isArray(e.metadataProps))throw TypeError(".onnx.ModelProto.metadataProps: array expected");for(n.metadataProps=[],i=0;i>>0,e.irVersion.high>>>0).toNumber():e.irVersion),e.producerName!=null&&e.hasOwnProperty("producerName")&&(i.producerName=e.producerName),e.producerVersion!=null&&e.hasOwnProperty("producerVersion")&&(i.producerVersion=e.producerVersion),e.domain!=null&&e.hasOwnProperty("domain")&&(i.domain=e.domain),e.modelVersion!=null&&e.hasOwnProperty("modelVersion")&&(typeof e.modelVersion=="number"?i.modelVersion=n.longs===String?String(e.modelVersion):e.modelVersion:i.modelVersion=n.longs===String?a.Long.prototype.toString.call(e.modelVersion):n.longs===Number?new a.LongBits(e.modelVersion.low>>>0,e.modelVersion.high>>>0).toNumber():e.modelVersion),e.docString!=null&&e.hasOwnProperty("docString")&&(i.docString=e.docString),e.graph!=null&&e.hasOwnProperty("graph")&&(i.graph=o.onnx.GraphProto.toObject(e.graph,n)),e.opsetImport&&e.opsetImport.length){i.opsetImport=[];for(var g=0;g>>3){case 1:u.key=e.string();break;case 2:u.value=e.string();break;default:e.skipType(7&g)}}return u},t.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},t.verify=function(e){return typeof e!="object"||e===null?"object expected":e.key!=null&&e.hasOwnProperty("key")&&!a.isString(e.key)?"key: string expected":e.value!=null&&e.hasOwnProperty("value")&&!a.isString(e.value)?"value: string expected":null},t.fromObject=function(e){if(e instanceof o.onnx.StringStringEntryProto)return e;var n=new o.onnx.StringStringEntryProto;return e.key!=null&&(n.key=String(e.key)),e.value!=null&&(n.value=String(e.value)),n},t.toObject=function(e,n){n||(n={});var i={};return n.defaults&&(i.key="",i.value=""),e.key!=null&&e.hasOwnProperty("key")&&(i.key=e.key),e.value!=null&&e.hasOwnProperty("value")&&(i.value=e.value),i},t.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},t}(),m.TensorAnnotation=function(){function t(e){if(this.quantParameterTensorNames=[],e)for(var n=Object.keys(e),i=0;i>>3){case 1:u.tensorName=e.string();break;case 2:u.quantParameterTensorNames&&u.quantParameterTensorNames.length||(u.quantParameterTensorNames=[]),u.quantParameterTensorNames.push(o.onnx.StringStringEntryProto.decode(e,e.uint32()));break;default:e.skipType(7&g)}}return u},t.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},t.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.tensorName!=null&&e.hasOwnProperty("tensorName")&&!a.isString(e.tensorName))return"tensorName: string expected";if(e.quantParameterTensorNames!=null&&e.hasOwnProperty("quantParameterTensorNames")){if(!Array.isArray(e.quantParameterTensorNames))return"quantParameterTensorNames: array expected";for(var n=0;n>>3){case 1:u.node&&u.node.length||(u.node=[]),u.node.push(o.onnx.NodeProto.decode(e,e.uint32()));break;case 2:u.name=e.string();break;case 5:u.initializer&&u.initializer.length||(u.initializer=[]),u.initializer.push(o.onnx.TensorProto.decode(e,e.uint32()));break;case 10:u.docString=e.string();break;case 11:u.input&&u.input.length||(u.input=[]),u.input.push(o.onnx.ValueInfoProto.decode(e,e.uint32()));break;case 12:u.output&&u.output.length||(u.output=[]),u.output.push(o.onnx.ValueInfoProto.decode(e,e.uint32()));break;case 13:u.valueInfo&&u.valueInfo.length||(u.valueInfo=[]),u.valueInfo.push(o.onnx.ValueInfoProto.decode(e,e.uint32()));break;case 14:u.quantizationAnnotation&&u.quantizationAnnotation.length||(u.quantizationAnnotation=[]),u.quantizationAnnotation.push(o.onnx.TensorAnnotation.decode(e,e.uint32()));break;default:e.skipType(7&g)}}return u},t.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},t.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.node!=null&&e.hasOwnProperty("node")){if(!Array.isArray(e.node))return"node: array expected";for(var n=0;n>>3){case 1:if(u.dims&&u.dims.length||(u.dims=[]),(7&g)==2)for(var b=e.uint32()+e.pos;e.pos>>0,e.dims[i].high>>>0).toNumber())}if(e.dataType!=null&&(n.dataType=0|e.dataType),e.segment!=null){if(typeof e.segment!="object")throw TypeError(".onnx.TensorProto.segment: object expected");n.segment=o.onnx.TensorProto.Segment.fromObject(e.segment)}if(e.floatData){if(!Array.isArray(e.floatData))throw TypeError(".onnx.TensorProto.floatData: array expected");for(n.floatData=[],i=0;i>>0,e.int64Data[i].high>>>0).toNumber())}if(e.name!=null&&(n.name=String(e.name)),e.docString!=null&&(n.docString=String(e.docString)),e.rawData!=null&&(typeof e.rawData=="string"?a.base64.decode(e.rawData,n.rawData=a.newBuffer(a.base64.length(e.rawData)),0):e.rawData.length&&(n.rawData=e.rawData)),e.externalData){if(!Array.isArray(e.externalData))throw TypeError(".onnx.TensorProto.externalData: array expected");for(n.externalData=[],i=0;i>>0,e.uint64Data[i].high>>>0).toNumber(!0))}return n},t.toObject=function(e,n){n||(n={});var i={};if((n.arrays||n.defaults)&&(i.dims=[],i.floatData=[],i.int32Data=[],i.stringData=[],i.int64Data=[],i.doubleData=[],i.uint64Data=[],i.externalData=[]),n.defaults&&(i.dataType=0,i.segment=null,i.name="",n.bytes===String?i.rawData="":(i.rawData=[],n.bytes!==Array&&(i.rawData=a.newBuffer(i.rawData))),i.docString="",i.dataLocation=n.enums===String?"DEFAULT":0),e.dims&&e.dims.length){i.dims=[];for(var u=0;u>>0,e.dims[u].high>>>0).toNumber():e.dims[u]}if(e.dataType!=null&&e.hasOwnProperty("dataType")&&(i.dataType=e.dataType),e.segment!=null&&e.hasOwnProperty("segment")&&(i.segment=o.onnx.TensorProto.Segment.toObject(e.segment,n)),e.floatData&&e.floatData.length)for(i.floatData=[],u=0;u>>0,e.int64Data[u].high>>>0).toNumber():e.int64Data[u];if(e.name!=null&&e.hasOwnProperty("name")&&(i.name=e.name),e.rawData!=null&&e.hasOwnProperty("rawData")&&(i.rawData=n.bytes===String?a.base64.encode(e.rawData,0,e.rawData.length):n.bytes===Array?Array.prototype.slice.call(e.rawData):e.rawData),e.doubleData&&e.doubleData.length)for(i.doubleData=[],u=0;u>>0,e.uint64Data[u].high>>>0).toNumber(!0):e.uint64Data[u];if(e.docString!=null&&e.hasOwnProperty("docString")&&(i.docString=e.docString),e.externalData&&e.externalData.length)for(i.externalData=[],u=0;u>>3){case 1:g.begin=n.int64();break;case 2:g.end=n.int64();break;default:n.skipType(7&b)}}return g},e.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},e.verify=function(n){return typeof n!="object"||n===null?"object expected":n.begin!=null&&n.hasOwnProperty("begin")&&!(a.isInteger(n.begin)||n.begin&&a.isInteger(n.begin.low)&&a.isInteger(n.begin.high))?"begin: integer|Long expected":n.end!=null&&n.hasOwnProperty("end")&&!(a.isInteger(n.end)||n.end&&a.isInteger(n.end.low)&&a.isInteger(n.end.high))?"end: integer|Long expected":null},e.fromObject=function(n){if(n instanceof o.onnx.TensorProto.Segment)return n;var i=new o.onnx.TensorProto.Segment;return n.begin!=null&&(a.Long?(i.begin=a.Long.fromValue(n.begin)).unsigned=!1:typeof n.begin=="string"?i.begin=parseInt(n.begin,10):typeof n.begin=="number"?i.begin=n.begin:typeof n.begin=="object"&&(i.begin=new a.LongBits(n.begin.low>>>0,n.begin.high>>>0).toNumber())),n.end!=null&&(a.Long?(i.end=a.Long.fromValue(n.end)).unsigned=!1:typeof n.end=="string"?i.end=parseInt(n.end,10):typeof n.end=="number"?i.end=n.end:typeof n.end=="object"&&(i.end=new a.LongBits(n.end.low>>>0,n.end.high>>>0).toNumber())),i},e.toObject=function(n,i){i||(i={});var u={};if(i.defaults){if(a.Long){var g=new a.Long(0,0,!1);u.begin=i.longs===String?g.toString():i.longs===Number?g.toNumber():g}else u.begin=i.longs===String?"0":0;a.Long?(g=new a.Long(0,0,!1),u.end=i.longs===String?g.toString():i.longs===Number?g.toNumber():g):u.end=i.longs===String?"0":0}return n.begin!=null&&n.hasOwnProperty("begin")&&(typeof n.begin=="number"?u.begin=i.longs===String?String(n.begin):n.begin:u.begin=i.longs===String?a.Long.prototype.toString.call(n.begin):i.longs===Number?new a.LongBits(n.begin.low>>>0,n.begin.high>>>0).toNumber():n.begin),n.end!=null&&n.hasOwnProperty("end")&&(typeof n.end=="number"?u.end=i.longs===String?String(n.end):n.end:u.end=i.longs===String?a.Long.prototype.toString.call(n.end):i.longs===Number?new a.LongBits(n.end.low>>>0,n.end.high>>>0).toNumber():n.end),u},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),t.DataLocation=function(){var e={},n=Object.create(e);return n[e[0]="DEFAULT"]=0,n[e[1]="EXTERNAL"]=1,n}(),t}(),m.TensorShapeProto=function(){function t(e){if(this.dim=[],e)for(var n=Object.keys(e),i=0;i>>3==1?(u.dim&&u.dim.length||(u.dim=[]),u.dim.push(o.onnx.TensorShapeProto.Dimension.decode(e,e.uint32()))):e.skipType(7&g)}return u},t.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},t.verify=function(e){if(typeof e!="object"||e===null)return"object expected";if(e.dim!=null&&e.hasOwnProperty("dim")){if(!Array.isArray(e.dim))return"dim: array expected";for(var n=0;n>>3){case 1:b.dimValue=i.int64();break;case 2:b.dimParam=i.string();break;case 3:b.denotation=i.string();break;default:i.skipType(7&y)}}return b},e.decodeDelimited=function(i){return i instanceof h||(i=new h(i)),this.decode(i,i.uint32())},e.verify=function(i){if(typeof i!="object"||i===null)return"object expected";var u={};if(i.dimValue!=null&&i.hasOwnProperty("dimValue")&&(u.value=1,!(a.isInteger(i.dimValue)||i.dimValue&&a.isInteger(i.dimValue.low)&&a.isInteger(i.dimValue.high))))return"dimValue: integer|Long expected";if(i.dimParam!=null&&i.hasOwnProperty("dimParam")){if(u.value===1)return"value: multiple values";if(u.value=1,!a.isString(i.dimParam))return"dimParam: string expected"}return i.denotation!=null&&i.hasOwnProperty("denotation")&&!a.isString(i.denotation)?"denotation: string expected":null},e.fromObject=function(i){if(i instanceof o.onnx.TensorShapeProto.Dimension)return i;var u=new o.onnx.TensorShapeProto.Dimension;return i.dimValue!=null&&(a.Long?(u.dimValue=a.Long.fromValue(i.dimValue)).unsigned=!1:typeof i.dimValue=="string"?u.dimValue=parseInt(i.dimValue,10):typeof i.dimValue=="number"?u.dimValue=i.dimValue:typeof i.dimValue=="object"&&(u.dimValue=new a.LongBits(i.dimValue.low>>>0,i.dimValue.high>>>0).toNumber())),i.dimParam!=null&&(u.dimParam=String(i.dimParam)),i.denotation!=null&&(u.denotation=String(i.denotation)),u},e.toObject=function(i,u){u||(u={});var g={};return u.defaults&&(g.denotation=""),i.dimValue!=null&&i.hasOwnProperty("dimValue")&&(typeof i.dimValue=="number"?g.dimValue=u.longs===String?String(i.dimValue):i.dimValue:g.dimValue=u.longs===String?a.Long.prototype.toString.call(i.dimValue):u.longs===Number?new a.LongBits(i.dimValue.low>>>0,i.dimValue.high>>>0).toNumber():i.dimValue,u.oneofs&&(g.value="dimValue")),i.dimParam!=null&&i.hasOwnProperty("dimParam")&&(g.dimParam=i.dimParam,u.oneofs&&(g.value="dimParam")),i.denotation!=null&&i.hasOwnProperty("denotation")&&(g.denotation=i.denotation),g},e.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},e}(),t}(),m.TypeProto=function(){function t(n){if(n)for(var i=Object.keys(n),u=0;u>>3){case 1:g.tensorType=o.onnx.TypeProto.Tensor.decode(n,n.uint32());break;case 6:g.denotation=n.string();break;default:n.skipType(7&b)}}return g},t.decodeDelimited=function(n){return n instanceof h||(n=new h(n)),this.decode(n,n.uint32())},t.verify=function(n){if(typeof n!="object"||n===null)return"object expected";if(n.tensorType!=null&&n.hasOwnProperty("tensorType")){var i=o.onnx.TypeProto.Tensor.verify(n.tensorType);if(i)return"tensorType."+i}return n.denotation!=null&&n.hasOwnProperty("denotation")&&!a.isString(n.denotation)?"denotation: string expected":null},t.fromObject=function(n){if(n instanceof o.onnx.TypeProto)return n;var i=new o.onnx.TypeProto;if(n.tensorType!=null){if(typeof n.tensorType!="object")throw TypeError(".onnx.TypeProto.tensorType: object expected");i.tensorType=o.onnx.TypeProto.Tensor.fromObject(n.tensorType)}return n.denotation!=null&&(i.denotation=String(n.denotation)),i},t.toObject=function(n,i){i||(i={});var u={};return i.defaults&&(u.denotation=""),n.tensorType!=null&&n.hasOwnProperty("tensorType")&&(u.tensorType=o.onnx.TypeProto.Tensor.toObject(n.tensorType,i),i.oneofs&&(u.value="tensorType")),n.denotation!=null&&n.hasOwnProperty("denotation")&&(u.denotation=n.denotation),u},t.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},t.Tensor=function(){function n(i){if(i)for(var u=Object.keys(i),g=0;g>>3){case 1:b.elemType=i.int32();break;case 2:b.shape=o.onnx.TensorShapeProto.decode(i,i.uint32());break;default:i.skipType(7&y)}}return b},n.decodeDelimited=function(i){return i instanceof h||(i=new h(i)),this.decode(i,i.uint32())},n.verify=function(i){if(typeof i!="object"||i===null)return"object expected";if(i.elemType!=null&&i.hasOwnProperty("elemType")&&!a.isInteger(i.elemType))return"elemType: integer expected";if(i.shape!=null&&i.hasOwnProperty("shape")){var u=o.onnx.TensorShapeProto.verify(i.shape);if(u)return"shape."+u}return null},n.fromObject=function(i){if(i instanceof o.onnx.TypeProto.Tensor)return i;var u=new o.onnx.TypeProto.Tensor;if(i.elemType!=null&&(u.elemType=0|i.elemType),i.shape!=null){if(typeof i.shape!="object")throw TypeError(".onnx.TypeProto.Tensor.shape: object expected");u.shape=o.onnx.TensorShapeProto.fromObject(i.shape)}return u},n.toObject=function(i,u){u||(u={});var g={};return u.defaults&&(g.elemType=0,g.shape=null),i.elemType!=null&&i.hasOwnProperty("elemType")&&(g.elemType=i.elemType),i.shape!=null&&i.hasOwnProperty("shape")&&(g.shape=o.onnx.TensorShapeProto.toObject(i.shape,u)),g},n.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},n}(),t}(),m.OperatorSetIdProto=function(){function t(e){if(e)for(var n=Object.keys(e),i=0;i>>3){case 1:u.domain=e.string();break;case 2:u.version=e.int64();break;default:e.skipType(7&g)}}return u},t.decodeDelimited=function(e){return e instanceof h||(e=new h(e)),this.decode(e,e.uint32())},t.verify=function(e){return typeof e!="object"||e===null?"object expected":e.domain!=null&&e.hasOwnProperty("domain")&&!a.isString(e.domain)?"domain: string expected":e.version!=null&&e.hasOwnProperty("version")&&!(a.isInteger(e.version)||e.version&&a.isInteger(e.version.low)&&a.isInteger(e.version.high))?"version: integer|Long expected":null},t.fromObject=function(e){if(e instanceof o.onnx.OperatorSetIdProto)return e;var n=new o.onnx.OperatorSetIdProto;return e.domain!=null&&(n.domain=String(e.domain)),e.version!=null&&(a.Long?(n.version=a.Long.fromValue(e.version)).unsigned=!1:typeof e.version=="string"?n.version=parseInt(e.version,10):typeof e.version=="number"?n.version=e.version:typeof e.version=="object"&&(n.version=new a.LongBits(e.version.low>>>0,e.version.high>>>0).toNumber())),n},t.toObject=function(e,n){n||(n={});var i={};if(n.defaults)if(i.domain="",a.Long){var u=new a.Long(0,0,!1);i.version=n.longs===String?u.toString():n.longs===Number?u.toNumber():u}else i.version=n.longs===String?"0":0;return e.domain!=null&&e.hasOwnProperty("domain")&&(i.domain=e.domain),e.version!=null&&e.hasOwnProperty("version")&&(typeof e.version=="number"?i.version=n.longs===String?String(e.version):e.version:i.version=n.longs===String?a.Long.prototype.toString.call(e.version):n.longs===Number?new a.LongBits(e.version.low>>>0,e.version.high>>>0).toNumber():e.version),i},t.prototype.toJSON=function(){return this.constructor.toObject(this,s.util.toJSONOptions)},t}(),m),f.exports=o},2100:(f,r,c)=>{f.exports=c(9482)},9482:(f,r,c)=>{var d=r;function l(){d.util._configure(),d.Writer._configure(d.BufferWriter),d.Reader._configure(d.BufferReader)}d.build="minimal",d.Writer=c(1173),d.BufferWriter=c(3155),d.Reader=c(1408),d.BufferReader=c(593),d.util=c(9693),d.rpc=c(5994),d.roots=c(5054),d.configure=l,l()},1408:(f,r,c)=>{f.exports=p;var d,l=c(9693),m=l.LongBits,s=l.utf8;function h(u,g){return RangeError("index out of range: "+u.pos+" + "+(g||1)+" > "+u.len)}function p(u){this.buf=u,this.pos=0,this.len=u.length}var a,o=typeof Uint8Array<"u"?function(u){if(u instanceof Uint8Array||Array.isArray(u))return new p(u);throw Error("illegal buffer")}:function(u){if(Array.isArray(u))return new p(u);throw Error("illegal buffer")},t=function(){return l.Buffer?function(u){return(p.create=function(g){return l.Buffer.isBuffer(g)?new d(g):o(g)})(u)}:o};function e(){var u=new m(0,0),g=0;if(!(this.len-this.pos>4)){for(;g<3;++g){if(this.pos>=this.len)throw h(this);if(u.lo=(u.lo|(127&this.buf[this.pos])<<7*g)>>>0,this.buf[this.pos++]<128)return u}return u.lo=(u.lo|(127&this.buf[this.pos++])<<7*g)>>>0,u}for(;g<4;++g)if(u.lo=(u.lo|(127&this.buf[this.pos])<<7*g)>>>0,this.buf[this.pos++]<128)return u;if(u.lo=(u.lo|(127&this.buf[this.pos])<<28)>>>0,u.hi=(u.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return u;if(g=0,this.len-this.pos>4){for(;g<5;++g)if(u.hi=(u.hi|(127&this.buf[this.pos])<<7*g+3)>>>0,this.buf[this.pos++]<128)return u}else for(;g<5;++g){if(this.pos>=this.len)throw h(this);if(u.hi=(u.hi|(127&this.buf[this.pos])<<7*g+3)>>>0,this.buf[this.pos++]<128)return u}throw Error("invalid varint encoding")}function n(u,g){return(u[g-4]|u[g-3]<<8|u[g-2]<<16|u[g-1]<<24)>>>0}function i(){if(this.pos+8>this.len)throw h(this,8);return new m(n(this.buf,this.pos+=4),n(this.buf,this.pos+=4))}p.create=t(),p.prototype._slice=l.Array.prototype.subarray||l.Array.prototype.slice,p.prototype.uint32=(a=4294967295,function(){if(a=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(a=(a|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)||(a=(a|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)||(a=(a|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)||(a=(a|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128))return a;if((this.pos+=5)>this.len)throw this.pos=this.len,h(this,10);return a}),p.prototype.int32=function(){return 0|this.uint32()},p.prototype.sint32=function(){var u=this.uint32();return u>>>1^-(1&u)|0},p.prototype.bool=function(){return this.uint32()!==0},p.prototype.fixed32=function(){if(this.pos+4>this.len)throw h(this,4);return n(this.buf,this.pos+=4)},p.prototype.sfixed32=function(){if(this.pos+4>this.len)throw h(this,4);return 0|n(this.buf,this.pos+=4)},p.prototype.float=function(){if(this.pos+4>this.len)throw h(this,4);var u=l.float.readFloatLE(this.buf,this.pos);return this.pos+=4,u},p.prototype.double=function(){if(this.pos+8>this.len)throw h(this,4);var u=l.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,u},p.prototype.bytes=function(){var u=this.uint32(),g=this.pos,b=this.pos+u;if(b>this.len)throw h(this,u);return this.pos+=u,Array.isArray(this.buf)?this.buf.slice(g,b):g===b?new this.buf.constructor(0):this._slice.call(this.buf,g,b)},p.prototype.string=function(){var u=this.bytes();return s.read(u,0,u.length)},p.prototype.skip=function(u){if(typeof u=="number"){if(this.pos+u>this.len)throw h(this,u);this.pos+=u}else do if(this.pos>=this.len)throw h(this);while(128&this.buf[this.pos++]);return this},p.prototype.skipType=function(u){switch(u){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(u=7&this.uint32())!=4;)this.skipType(u);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+u+" at offset "+this.pos)}return this},p._configure=function(u){d=u,p.create=t(),d._configure();var g=l.Long?"toLong":"toNumber";l.merge(p.prototype,{int64:function(){return e.call(this)[g](!1)},uint64:function(){return e.call(this)[g](!0)},sint64:function(){return e.call(this).zzDecode()[g](!1)},fixed64:function(){return i.call(this)[g](!0)},sfixed64:function(){return i.call(this)[g](!1)}})}},593:(f,r,c)=>{f.exports=m;var d=c(1408);(m.prototype=Object.create(d.prototype)).constructor=m;var l=c(9693);function m(s){d.call(this,s)}m._configure=function(){l.Buffer&&(m.prototype._slice=l.Buffer.prototype.slice)},m.prototype.string=function(){var s=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+s,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+s,this.len))},m._configure()},5054:f=>{f.exports={}},5994:(f,r,c)=>{r.Service=c(7948)},7948:(f,r,c)=>{f.exports=l;var d=c(9693);function l(m,s,h){if(typeof m!="function")throw TypeError("rpcImpl must be a function");d.EventEmitter.call(this),this.rpcImpl=m,this.requestDelimited=!!s,this.responseDelimited=!!h}(l.prototype=Object.create(d.EventEmitter.prototype)).constructor=l,l.prototype.rpcCall=function m(s,h,p,a,o){if(!a)throw TypeError("request must be specified");var t=this;if(!o)return d.asPromise(m,t,s,h,p,a);if(t.rpcImpl)try{return t.rpcImpl(s,h[t.requestDelimited?"encodeDelimited":"encode"](a).finish(),function(e,n){if(e)return t.emit("error",e,s),o(e);if(n!==null){if(!(n instanceof p))try{n=p[t.responseDelimited?"decodeDelimited":"decode"](n)}catch(i){return t.emit("error",i,s),o(i)}return t.emit("data",n,s),o(null,n)}t.end(!0)})}catch(e){return t.emit("error",e,s),void setTimeout(function(){o(e)},0)}else setTimeout(function(){o(Error("already ended"))},0)},l.prototype.end=function(m){return this.rpcImpl&&(m||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},1945:(f,r,c)=>{f.exports=l;var d=c(9693);function l(p,a){this.lo=p>>>0,this.hi=a>>>0}var m=l.zero=new l(0,0);m.toNumber=function(){return 0},m.zzEncode=m.zzDecode=function(){return this},m.length=function(){return 1};var s=l.zeroHash="\0\0\0\0\0\0\0\0";l.fromNumber=function(p){if(p===0)return m;var a=p<0;a&&(p=-p);var o=p>>>0,t=(p-o)/4294967296>>>0;return a&&(t=~t>>>0,o=~o>>>0,++o>4294967295&&(o=0,++t>4294967295&&(t=0))),new l(o,t)},l.from=function(p){if(typeof p=="number")return l.fromNumber(p);if(d.isString(p)){if(!d.Long)return l.fromNumber(parseInt(p,10));p=d.Long.fromString(p)}return p.low||p.high?new l(p.low>>>0,p.high>>>0):m},l.prototype.toNumber=function(p){if(!p&&this.hi>>>31){var a=1+~this.lo>>>0,o=~this.hi>>>0;return a||(o=o+1>>>0),-(a+4294967296*o)}return this.lo+4294967296*this.hi},l.prototype.toLong=function(p){return d.Long?new d.Long(0|this.lo,0|this.hi,!!p):{low:0|this.lo,high:0|this.hi,unsigned:!!p}};var h=String.prototype.charCodeAt;l.fromHash=function(p){return p===s?m:new l((h.call(p,0)|h.call(p,1)<<8|h.call(p,2)<<16|h.call(p,3)<<24)>>>0,(h.call(p,4)|h.call(p,5)<<8|h.call(p,6)<<16|h.call(p,7)<<24)>>>0)},l.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},l.prototype.zzEncode=function(){var p=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^p)>>>0,this.lo=(this.lo<<1^p)>>>0,this},l.prototype.zzDecode=function(){var p=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^p)>>>0,this.hi=(this.hi>>>1^p)>>>0,this},l.prototype.length=function(){var p=this.lo,a=(this.lo>>>28|this.hi<<4)>>>0,o=this.hi>>>24;return o===0?a===0?p<16384?p<128?1:2:p<2097152?3:4:a<16384?a<128?5:6:a<2097152?7:8:o<128?9:10}},9693:function(f,r,c){var d=r;function l(s,h,p){for(var a=Object.keys(h),o=0;o0)},d.Buffer=function(){try{var s=d.inquire("buffer").Buffer;return s.prototype.utf8Write?s:null}catch{return null}}(),d._Buffer_from=null,d._Buffer_allocUnsafe=null,d.newBuffer=function(s){return typeof s=="number"?d.Buffer?d._Buffer_allocUnsafe(s):new d.Array(s):d.Buffer?d._Buffer_from(s):typeof Uint8Array>"u"?s:new Uint8Array(s)},d.Array=typeof Uint8Array<"u"?Uint8Array:Array,d.Long=d.global.dcodeIO&&d.global.dcodeIO.Long||d.global.Long||d.inquire("long"),d.key2Re=/^true|false|0|1$/,d.key32Re=/^-?(?:0|[1-9][0-9]*)$/,d.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,d.longToHash=function(s){return s?d.LongBits.from(s).toHash():d.LongBits.zeroHash},d.longFromHash=function(s,h){var p=d.LongBits.fromHash(s);return d.Long?d.Long.fromBits(p.lo,p.hi,h):p.toNumber(!!h)},d.merge=l,d.lcFirst=function(s){return s.charAt(0).toLowerCase()+s.substring(1)},d.newError=m,d.ProtocolError=m("ProtocolError"),d.oneOfGetter=function(s){for(var h={},p=0;p-1;--o)if(h[a[o]]===1&&this[a[o]]!==void 0&&this[a[o]]!==null)return a[o]}},d.oneOfSetter=function(s){return function(h){for(var p=0;p{f.exports=t;var d,l=c(9693),m=l.LongBits,s=l.base64,h=l.utf8;function p(y,_,v){this.fn=y,this.len=_,this.next=void 0,this.val=v}function a(){}function o(y){this.head=y.head,this.tail=y.tail,this.len=y.len,this.next=y.states}function t(){this.len=0,this.head=new p(a,0,0),this.tail=this.head,this.states=null}var e=function(){return l.Buffer?function(){return(t.create=function(){return new d})()}:function(){return new t}};function n(y,_,v){_[v]=255&y}function i(y,_){this.len=y,this.next=void 0,this.val=_}function u(y,_,v){for(;y.hi;)_[v++]=127&y.lo|128,y.lo=(y.lo>>>7|y.hi<<25)>>>0,y.hi>>>=7;for(;y.lo>127;)_[v++]=127&y.lo|128,y.lo=y.lo>>>7;_[v++]=y.lo}function g(y,_,v){_[v]=255&y,_[v+1]=y>>>8&255,_[v+2]=y>>>16&255,_[v+3]=y>>>24}t.create=e(),t.alloc=function(y){return new l.Array(y)},l.Array!==Array&&(t.alloc=l.pool(t.alloc,l.Array.prototype.subarray)),t.prototype._push=function(y,_,v){return this.tail=this.tail.next=new p(y,_,v),this.len+=_,this},i.prototype=Object.create(p.prototype),i.prototype.fn=function(y,_,v){for(;y>127;)_[v++]=127&y|128,y>>>=7;_[v]=y},t.prototype.uint32=function(y){return this.len+=(this.tail=this.tail.next=new i((y>>>=0)<128?1:y<16384?2:y<2097152?3:y<268435456?4:5,y)).len,this},t.prototype.int32=function(y){return y<0?this._push(u,10,m.fromNumber(y)):this.uint32(y)},t.prototype.sint32=function(y){return this.uint32((y<<1^y>>31)>>>0)},t.prototype.uint64=function(y){var _=m.from(y);return this._push(u,_.length(),_)},t.prototype.int64=t.prototype.uint64,t.prototype.sint64=function(y){var _=m.from(y).zzEncode();return this._push(u,_.length(),_)},t.prototype.bool=function(y){return this._push(n,1,y?1:0)},t.prototype.fixed32=function(y){return this._push(g,4,y>>>0)},t.prototype.sfixed32=t.prototype.fixed32,t.prototype.fixed64=function(y){var _=m.from(y);return this._push(g,4,_.lo)._push(g,4,_.hi)},t.prototype.sfixed64=t.prototype.fixed64,t.prototype.float=function(y){return this._push(l.float.writeFloatLE,4,y)},t.prototype.double=function(y){return this._push(l.float.writeDoubleLE,8,y)};var b=l.Array.prototype.set?function(y,_,v){_.set(y,v)}:function(y,_,v){for(var w=0;w>>0;if(!_)return this._push(n,1,0);if(l.isString(y)){var v=t.alloc(_=s.length(y));s.decode(y,v,0),y=v}return this.uint32(_)._push(b,_,y)},t.prototype.string=function(y){var _=h.length(y);return _?this.uint32(_)._push(h.write,_,y):this._push(n,1,0)},t.prototype.fork=function(){return this.states=new o(this),this.head=this.tail=new p(a,0,0),this.len=0,this},t.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new p(a,0,0),this.len=0),this},t.prototype.ldelim=function(){var y=this.head,_=this.tail,v=this.len;return this.reset().uint32(v),v&&(this.tail.next=y.next,this.tail=_,this.len+=v),this},t.prototype.finish=function(){for(var y=this.head.next,_=this.constructor.alloc(this.len),v=0;y;)y.fn(y.val,_,v),v+=y.len,y=y.next;return _},t._configure=function(y){d=y,t.create=e(),d._configure()}},3155:(f,r,c)=>{f.exports=m;var d=c(1173);(m.prototype=Object.create(d.prototype)).constructor=m;var l=c(9693);function m(){d.call(this)}function s(h,p,a){h.length<40?l.utf8.write(h,p,a):p.utf8Write?p.utf8Write(h,a):p.write(h,a)}m._configure=function(){m.alloc=l._Buffer_allocUnsafe,m.writeBytesBuffer=l.Buffer&&l.Buffer.prototype instanceof Uint8Array&&l.Buffer.prototype.set.name==="set"?function(h,p,a){p.set(h,a)}:function(h,p,a){if(h.copy)h.copy(p,a,0,h.length);else for(var o=0;o>>0;return this.uint32(p),p&&this._push(m.writeBytesBuffer,p,h),this},m.prototype.string=function(h){var p=l.Buffer.byteLength(h);return this.uint32(p),p&&this._push(s,p,h),this},m._configure()},7714:(f,r,c)=>{r.R=void 0;const d=c(6919),l=c(7448);r.R=new class{async init(){}async createSessionHandler(m,s){const h=new d.Session(s);return await h.loadModel(m),new l.OnnxjsSessionHandler(h)}}},4200:(f,r,c)=>{r.c8=r.rX=void 0;const d=c(1670),l=c(5381),m=c(2157),s=c(2306);r.rX=()=>{if((typeof d.env.wasm.initTimeout!="number"||d.env.wasm.initTimeout<0)&&(d.env.wasm.initTimeout=0),typeof d.env.wasm.simd!="boolean"&&(d.env.wasm.simd=!0),typeof d.env.wasm.proxy!="boolean"&&(d.env.wasm.proxy=!1),typeof d.env.wasm.numThreads!="number"||!Number.isInteger(d.env.wasm.numThreads)||d.env.wasm.numThreads<=0){const h=typeof navigator>"u"?(0,l.cpus)().length:navigator.hardwareConcurrency;d.env.wasm.numThreads=Math.min(4,Math.ceil((h||1)/2))}},r.c8=new class{async init(){(0,r.rX)(),await(0,m.initWasm)()}async createSessionHandler(h,p){const a=new s.OnnxruntimeWebAssemblySessionHandler;return await a.loadModel(h,p),Promise.resolve(a)}}},6018:function(f,r,c){var d=this&&this.__createBinding||(Object.create?function(s,h,p,a){a===void 0&&(a=p);var o=Object.getOwnPropertyDescriptor(h,p);o&&!("get"in o?!h.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return h[p]}}),Object.defineProperty(s,a,o)}:function(s,h,p,a){a===void 0&&(a=p),s[a]=h[p]}),l=this&&this.__exportStar||function(s,h){for(var p in s)p==="default"||Object.prototype.hasOwnProperty.call(h,p)||d(h,s,p)};Object.defineProperty(r,"__esModule",{value:!0}),l(c(1670),r);const m=c(1670);{const s=c(7714).R;(0,m.registerBackend)("webgl",s,-10)}{const s=c(4200).c8;(0,m.registerBackend)("cpu",s,10),(0,m.registerBackend)("wasm",s,10),(0,m.registerBackend)("xnnpack",s,9)}},246:(f,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.createAttributeWithCacheKey=void 0;class c{constructor(l){Object.assign(this,l)}get cacheKey(){return this._cacheKey||(this._cacheKey=Object.getOwnPropertyNames(this).sort().map(l=>`${this[l]}`).join(";")),this._cacheKey}}r.createAttributeWithCacheKey=d=>new c(d)},7778:(f,r,c)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Attribute=void 0;const d=c(1446),l=c(9395),m=c(9162),s=c(2517);var h=l.onnxruntime.experimental.fbs;class p{constructor(o){if(this._attributes=new Map,o!=null){for(const t of o)t instanceof d.onnx.AttributeProto?this._attributes.set(t.name,[p.getValue(t),p.getType(t)]):t instanceof h.Attribute&&this._attributes.set(t.name(),[p.getValue(t),p.getType(t)]);if(this._attributes.sizem.Tensor.fromProto(n));if(o instanceof h.Attribute)return e.map(n=>m.Tensor.fromOrtTensor(n))}if(t===d.onnx.AttributeProto.AttributeType.STRING&&o instanceof d.onnx.AttributeProto){const n=e;return(0,s.decodeUtf8String)(n)}return t===d.onnx.AttributeProto.AttributeType.STRINGS&&o instanceof d.onnx.AttributeProto?e.map(s.decodeUtf8String):e}static getValueNoCheck(o){return o instanceof d.onnx.AttributeProto?this.getValueNoCheckFromOnnxFormat(o):this.getValueNoCheckFromOrtFormat(o)}static getValueNoCheckFromOnnxFormat(o){switch(o.type){case d.onnx.AttributeProto.AttributeType.FLOAT:return o.f;case d.onnx.AttributeProto.AttributeType.INT:return o.i;case d.onnx.AttributeProto.AttributeType.STRING:return o.s;case d.onnx.AttributeProto.AttributeType.TENSOR:return o.t;case d.onnx.AttributeProto.AttributeType.GRAPH:return o.g;case d.onnx.AttributeProto.AttributeType.FLOATS:return o.floats;case d.onnx.AttributeProto.AttributeType.INTS:return o.ints;case d.onnx.AttributeProto.AttributeType.STRINGS:return o.strings;case d.onnx.AttributeProto.AttributeType.TENSORS:return o.tensors;case d.onnx.AttributeProto.AttributeType.GRAPHS:return o.graphs;default:throw new Error(`unsupported attribute type: ${d.onnx.AttributeProto.AttributeType[o.type]}`)}}static getValueNoCheckFromOrtFormat(o){switch(o.type()){case h.AttributeType.FLOAT:return o.f();case h.AttributeType.INT:return o.i();case h.AttributeType.STRING:return o.s();case h.AttributeType.TENSOR:return o.t();case h.AttributeType.GRAPH:return o.g();case h.AttributeType.FLOATS:return o.floatsArray();case h.AttributeType.INTS:{const t=[];for(let e=0;e{Object.defineProperty(r,"__esModule",{value:!0}),r.resolveBackend=r.backend=void 0;const d=c(5038),l=new Map;async function m(s){const h=r.backend;if(h[s]!==void 0&&function(p){const a=p;return"initialize"in a&&typeof a.initialize=="function"&&"createSessionHandler"in a&&typeof a.createSessionHandler=="function"&&"dispose"in a&&typeof a.dispose=="function"}(h[s])){const p=h[s];let a=p.initialize();if(typeof a=="object"&&"then"in a&&(a=await a),a)return l.set(s,p),p}}r.backend={webgl:new d.WebGLBackend},r.resolveBackend=async function s(h){if(!h)return s(["webgl"]);{const p=typeof h=="string"?[h]:h;for(const a of p){const o=l.get(a);if(o)return o;const t=await m(a);if(t)return t}}throw new Error("no available backend to use")}},5038:(f,r,c)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.WebGLBackend=void 0;const d=c(1670),l=c(6231),m=c(6416),s=c(7305);r.WebGLBackend=class{get contextId(){return d.env.webgl.contextId}set contextId(h){d.env.webgl.contextId=h}get matmulMaxBatchSize(){return d.env.webgl.matmulMaxBatchSize}set matmulMaxBatchSize(h){d.env.webgl.matmulMaxBatchSize=h}get textureCacheMode(){return d.env.webgl.textureCacheMode}set textureCacheMode(h){d.env.webgl.textureCacheMode=h}get pack(){return d.env.webgl.pack}set pack(h){d.env.webgl.pack=h}get async(){return d.env.webgl.async}set async(h){d.env.webgl.async=h}initialize(){try{return this.glContext=(0,s.createWebGLContext)(this.contextId),typeof this.matmulMaxBatchSize!="number"&&(this.matmulMaxBatchSize=16),typeof this.textureCacheMode!="string"&&(this.textureCacheMode="full"),typeof this.pack!="boolean"&&(this.pack=!1),typeof this.async!="boolean"&&(this.async=!1),l.Logger.setWithEnv(d.env),l.Logger.verbose("WebGLBackend",`Created WebGLContext: ${typeof this.glContext} with matmulMaxBatchSize: ${this.matmulMaxBatchSize}; textureCacheMode: ${this.textureCacheMode}; pack: ${this.pack}; async: ${this.async}.`),!0}catch(h){return l.Logger.warning("WebGLBackend",`Unable to initialize WebGLBackend. ${h}`),!1}}createSessionHandler(h){return new m.WebGLSessionHandler(this,h)}dispose(){this.glContext.dispose()}}},5107:(f,r,c)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.CoordsGlslLib=void 0;const d=c(2517),l=c(8520),m=c(5060),s=c(7859),h=c(9390);class p extends l.GlslLib{constructor(o){super(o)}getFunctions(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.offsetToCoords()),this.coordsToOffset()),this.toVec()),this.valueFrom()),this.getCommonUtilFuncs()),this.getInputsSamplingSnippets()),this.getOutputSamplingSnippet())}getCustomTypes(){return{}}offsetToCoords(){return{offsetToCoords:new l.GlslLibRoutine(` vec2 offsetToCoords(int offset, int width, int height) { int t = offset / width; int s = offset - t*width; diff --git a/assets/together-ai-No2aAYf3.js b/assets/together-ai-BuHN4yhy.js similarity index 64% rename from assets/together-ai-No2aAYf3.js rename to assets/together-ai-BuHN4yhy.js index 2d041ca742f33cc9c8cc4783560a38f8dc50866d..4fa7e7a57d7afef5cf926a2ec7589b3c9f2c83a8 100644 --- a/assets/together-ai-No2aAYf3.js +++ b/assets/together-ai-BuHN4yhy.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as h,$ as k,V as y,a0 as U,f as c,T as $,w as K,bk as x,o as z,bl as u,b as l,u as t}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as w}from"./providers-7GsMyC_3.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as C,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";const a="together-ai",B=h({__name:"together-ai",setup(I){const{t:m}=k(),b=y(),d=w(),{providers:o}=U(d),n=c(()=>d.getProviderMetadata(a)),i=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}}),s=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,r;d.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 v,f;return z(),x(t(S),{"provider-name":(v=n.value)==null?void 0:v.localizedName,"provider-icon-color":(f=n.value)==null?void 0:f.iconColor,"on-back":()=>t(b).back()},{default:u(()=>[l(t(P),null,{default:u(()=>[l(t(R),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:u(()=>{var p;return[l(t(N),{modelValue:i.value,"onUpdate:modelValue":r[0]||(r[0]=V=>i.value=V),"provider-name":(p=n.value)==null?void 0:p.localizedName,placeholder:"togetherapi-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(C),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t(M),{modelValue:s.value,"onUpdate:modelValue":r[1]||(r[1]=p=>s.value=p),placeholder:"https://api.together.xyz/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});typeof _=="function"&&_(B);export{B as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import{d as h,$ as k,V as y,a0 as U,f as c,T as $,w as K,bk as x,o as z,bl as u,b as l,u as t}from"./index-8LjpXIG7.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{u as w}from"./providers-Dhn8Iy_2.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{_ as C,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CU_o_t3A.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-wR1l1PPX.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-DTczYoOw.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-D3mbXce4.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BOcCBViZ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-DyyWKgKi.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-DdnLISgI.js";import"./Input.vue_vue_type_script_setup_true_lang-CpaCGrgF.js";const a="together-ai",B=h({__name:"together-ai",setup(I){const{t:m}=k(),b=y(),d=w(),{providers:o}=U(d),n=c(()=>d.getProviderMetadata(a)),i=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}}),s=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,r;d.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 v,f;return z(),x(t(S),{"provider-name":(v=n.value)==null?void 0:v.localizedName,"provider-icon-color":(f=n.value)==null?void 0:f.iconColor,"on-back":()=>t(b).back()},{default:u(()=>[l(t(P),null,{default:u(()=>[l(t(R),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:u(()=>{var p;return[l(t(N),{modelValue:i.value,"onUpdate:modelValue":r[0]||(r[0]=V=>i.value=V),"provider-name":(p=n.value)==null?void 0:p.localizedName,placeholder:"togetherapi-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(C),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t(M),{modelValue:s.value,"onUpdate:modelValue":r[1]||(r[1]=p=>s.value=p),placeholder:"https://api.together.xyz/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});typeof _=="function"&&_(B);export{B as default}; diff --git a/assets/useIconAnimation-B41IKS_9.js b/assets/useIconAnimation-DdsxO8m6.js similarity index 58% rename from assets/useIconAnimation-B41IKS_9.js rename to assets/useIconAnimation-DdsxO8m6.js index dc75f3d42de1df1d99be913c6aefc95c538ec245..f1a785c288aaf9ff7af139e573b18b527073c458 100644 --- a/assets/useIconAnimation-B41IKS_9.js +++ b/assets/useIconAnimation-DdsxO8m6.js @@ -1 +1 @@ -import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{e as t,bj as r,f as u,T as m,U as c}from"./index-WDP_Z4A8.js";function v(s){const n=t(!1),o=t(!1),a=t(s),e=r(),i=u(()=>o.value&&!e.disableTransitions&&e.usePageSpecificTransitions);return m(()=>{o.value=!0,requestAnimationFrame(()=>{n.value=!0})}),c(()=>{n.value=!1,o.value=!1}),{iconAnimationStarted:n,showIconAnimation:i,animationIcon:a}}export{v as u}; +import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{e as t,bj as r,f as u,T as m,U as c}from"./index-8LjpXIG7.js";function v(s){const n=t(!1),o=t(!1),a=t(s),e=r(),i=u(()=>o.value&&!e.disableTransitions&&e.usePageSpecificTransitions);return m(()=>{o.value=!0,requestAnimationFrame(()=>{n.value=!0})}),c(()=>{n.value=!1,o.value=!1}),{iconAnimationStarted:n,showIconAnimation:i,animationIcon:a}}export{v as u}; diff --git a/assets/valibot-CQk-M5rL-Bzl_-bg9.js b/assets/valibot-CQk-M5rL-Bzl_-bg9.js deleted file mode 100644 index 5e5c81a073af7738db2014d26f53026b9d5da96e..0000000000000000000000000000000000000000 --- a/assets/valibot-CQk-M5rL-Bzl_-bg9.js +++ /dev/null @@ -1 +0,0 @@ -import{cP as r}from"./index-WDP_Z4A8.js";import{t as a}from"./mcp-CVsSz3w1.js";const s=async()=>{const{toJsonSchema:o}=await a(r(()=>import("./index-CShXCEpO.js"),[]),"@valibot/to-json-schema");return t=>o(t)};export{s as getToJsonSchemaFn}; diff --git a/assets/valibot-CQk-M5rL-zJlkre40.js b/assets/valibot-CQk-M5rL-zJlkre40.js new file mode 100644 index 0000000000000000000000000000000000000000..fef8f0ee55664203ef06a985dc95a33196b7d75a --- /dev/null +++ b/assets/valibot-CQk-M5rL-zJlkre40.js @@ -0,0 +1 @@ +import{cP as r}from"./index-8LjpXIG7.js";import{t as a}from"./mcp-BNgNJ97R.js";const s=async()=>{const{toJsonSchema:o}=await a(r(()=>import("./index-CShXCEpO.js"),[]),"@valibot/to-json-schema");return t=>o(t)};export{s as getToJsonSchemaFn}; diff --git a/assets/vibrant-C1qAY2sn.js b/assets/vibrant-CPrbAryE.js similarity index 88% rename from assets/vibrant-C1qAY2sn.js rename to assets/vibrant-CPrbAryE.js index a18af25dddab98ec38f73b9fd2a34de86225ae21..15310f922b98a49cc8028162ef17287883a912cb 100644 --- a/assets/vibrant-C1qAY2sn.js +++ b/assets/vibrant-CPrbAryE.js @@ -1 +1 @@ -import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as p}from"./InputFile.vue_vue_type_script_setup_true_lang-Bt1GPBFc.js";import{V as g}from"./browser-CkchkNbv.js";import{d as v,e as n,w as _,c as r,o,a as s,c6 as b,c7 as h,Y as k,b as w,u as x,W as y,a3 as V}from"./index-WDP_Z4A8.js";import"./floating-ui.core-CgBsuaUc.js";const j={flex:"","flex-col":"","gap-4":""},C={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"],R=v({__name:"vibrant",setup(S){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 g(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 _(u,l=>{c(l[0])},{deep:!0}),(l,a)=>(o(),r("div",j,[s("div",C,[(o(!0),r(b,null,h(d.value,(e,m)=>(o(),r("div",{key:m,style:V({backgroundColor:e}),"size-20":"","rounded-full":""},null,4))),128))]),s("div",L,k(i.value),1),s("div",N,[w(x(p),{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)):y("",!0)])]))}});export{R as default}; +import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{_ as p}from"./InputFile.vue_vue_type_script_setup_true_lang-CAuLzFBg.js";import{V as g}from"./browser-CkchkNbv.js";import{d as v,e as n,w as _,c as r,o,a as s,c6 as b,c7 as h,Y as k,b as w,u as x,W as y,a3 as V}from"./index-8LjpXIG7.js";import"./floating-ui.core-CgBsuaUc.js";const j={flex:"","flex-col":"","gap-4":""},C={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"],R=v({__name:"vibrant",setup(S){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 g(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 _(u,l=>{c(l[0])},{deep:!0}),(l,a)=>(o(),r("div",j,[s("div",C,[(o(!0),r(b,null,h(d.value,(e,m)=>(o(),r("div",{key:m,style:V({backgroundColor:e}),"size-20":"","rounded-full":""},null,4))),128))]),s("div",L,k(i.value),1),s("div",N,[w(x(p),{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)):y("",!0)])]))}});export{R as default}; diff --git a/assets/volcengine-BRelq9N_.js b/assets/volcengine-fxYOCPSz.js similarity index 68% rename from assets/volcengine-BRelq9N_.js rename to assets/volcengine-fxYOCPSz.js index 28642e459bd82e330683c07d21b8c7f988a51cad..935502151d8b3ab1f4a19be36791c71f3cd3f6a4 100644 --- a/assets/volcengine-BRelq9N_.js +++ b/assets/volcengine-fxYOCPSz.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as y,e as w,a0 as M,$ as I,f as c,T as S,w as g,bk as k,o as x,bl as v,b as f,u as r,a as F}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as $}from"./providers-7GsMyC_3.js";import{u as B}from"./speech-DRmXCXwq.js";import{_ as R}from"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import{_ as T}from"./FieldRange.vue_vue_type_script_setup_true_lang-BubMLR-2.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as E,a as K}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-D8TYHcvp.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";import"./floating-ui.core-CgBsuaUc.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";const L={flex:"~ col gap-4"},o="volcengine",b="v1",N=y({__name:"volcengine",setup(U){const s=w(1),d=B(),a=$(),{providers:t}=M(a),{t:n}=I(),p=c({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}}}),C=c(()=>{var e;return!!((e=t.value[o])!=null&&e.apiKey)}),P=c(()=>d.availableVoices[o]||[]);async function V(e,i,l){const m=a.getProviderInstance(o);if(!m)throw new Error("Failed to initialize speech provider");const u=a.getProviderConfig(o),h=u.model||b;return await d.speech(m,h,e,i,{...u})}return S(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)=>(x(),k(r(K),{"provider-id":o,"default-model":b},{"basic-settings":v(()=>[F("div",L,[f(r(R),{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":v(()=>[f(r(T),{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:v(()=>[f(r(E),{"available-voices":P.value,"generate-speech":V,"api-key-configured":C.value,"default-text":"Hello! This is a test of the ElevenLabs voice synthesis."},null,8,["available-voices","api-key-configured"])]),_:1}))}});typeof _=="function"&&_(N);export{N as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import{d as y,e as w,a0 as M,$ as I,f as c,T as S,w as g,bk as k,o as x,bl as v,b as f,u as r,a as F}from"./index-8LjpXIG7.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{u as $}from"./providers-Dhn8Iy_2.js";import{u as B}from"./speech-BUPJbslH.js";import{_ as R}from"./FieldInput.vue_vue_type_script_setup_true_lang-DdnLISgI.js";import{_ as T}from"./FieldRange.vue_vue_type_script_setup_true_lang-Cdt76zqB.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{_ as E,a as K}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-CN3ASV_M.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Input.vue_vue_type_script_setup_true_lang-CpaCGrgF.js";import"./floating-ui.core-CgBsuaUc.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CU_o_t3A.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BOcCBViZ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-DyyWKgKi.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-wR1l1PPX.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-DTczYoOw.js";const L={flex:"~ col gap-4"},o="volcengine",b="v1",N=y({__name:"volcengine",setup(U){const s=w(1),d=B(),a=$(),{providers:t}=M(a),{t:n}=I(),p=c({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}}}),C=c(()=>{var e;return!!((e=t.value[o])!=null&&e.apiKey)}),P=c(()=>d.availableVoices[o]||[]);async function V(e,i,l){const m=a.getProviderInstance(o);if(!m)throw new Error("Failed to initialize speech provider");const u=a.getProviderConfig(o),h=u.model||b;return await d.speech(m,h,e,i,{...u})}return S(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)=>(x(),k(r(K),{"provider-id":o,"default-model":b},{"basic-settings":v(()=>[F("div",L,[f(r(R),{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":v(()=>[f(r(T),{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:v(()=>[f(r(E),{"available-voices":P.value,"generate-speech":V,"api-key-configured":C.value,"default-text":"Hello! This is a test of the ElevenLabs voice synthesis."},null,8,["available-voices","api-key-configured"])]),_:1}))}});typeof _=="function"&&_(N);export{N as default}; diff --git a/assets/xai-CoTXxIZ1.js b/assets/xai-CVnaViqS.js similarity index 64% rename from assets/xai-CoTXxIZ1.js rename to assets/xai-CVnaViqS.js index 22d257e072102f7257239f9166d10ae944464e45..56ced3eb543b86e1b1637f7725621ae3d98f184e 100644 --- a/assets/xai-CoTXxIZ1.js +++ b/assets/xai-CVnaViqS.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Br6hYQpP.js";import{d as k,$ as x,V as U,a0 as $,f as v,T as y,w as K,bk as h,o as w,bl as u,b as l,u as t}from"./index-WDP_Z4A8.js";import"./three-vrm.module-DIVMhp6T.js";import"./emotions-DWNSb738.js";import"./mcp-CVsSz3w1.js";import{u as z}from"./providers-7GsMyC_3.js";import"./Select.vue_vue_type_style_index_0_lang-CJDSxd2j.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-B4JRuRX-.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-BNN-VKvs.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-BPGvdxJp.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DnYc9j82.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpQfJlB8.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-aFGfsFjL.js";import"./FieldInput.vue_vue_type_script_setup_true_lang--btjv0W_.js";import"./Input.vue_vue_type_script_setup_true_lang-C4baR55j.js";const a="xai",C=k({__name:"xai",setup(I){const{t:m}=x(),b=U(),d=z(),{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}});y(()=>{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 g(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var c,f;return w(),h(t(B),{"provider-name":(c=n.value)==null?void 0:c.localizedName,"provider-icon":(f=n.value)==null?void 0:f.icon,"on-back":()=>t(b).back()},{default:u(()=>[l(t(R),null,{default:u(()=>[l(t(S),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:u(()=>{var p;return[l(t(P),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=V=>r.value=V),"provider-name":(p=n.value)==null?void 0:p.localizedName,placeholder:"xai-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(M),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t(N),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=p=>s.value=p),placeholder:"https://api.x.ai/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof _=="function"&&_(C);export{C as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_686f6999_lang-Ct_4Houj.js";import{d as k,$ as x,V as U,a0 as $,f as v,T as y,w as K,bk as h,o as w,bl as u,b as l,u as t}from"./index-8LjpXIG7.js";import"./three-vrm.module-r4bOtVyC.js";import"./emotions-DWNSb738.js";import"./mcp-BNgNJ97R.js";import{u as z}from"./providers-Dhn8Iy_2.js";import"./Select.vue_vue_type_style_index_0_lang-DpMeGw-J.js";import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-CU_o_t3A.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-wR1l1PPX.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-DTczYoOw.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-D3mbXce4.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./floating-ui.core-CgBsuaUc.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-BOcCBViZ.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-DyyWKgKi.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-DdnLISgI.js";import"./Input.vue_vue_type_script_setup_true_lang-CpaCGrgF.js";const a="xai",C=k({__name:"xai",setup(I){const{t:m}=x(),b=U(),d=z(),{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}});y(()=>{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 g(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var c,f;return w(),h(t(B),{"provider-name":(c=n.value)==null?void 0:c.localizedName,"provider-icon":(f=n.value)==null?void 0:f.icon,"on-back":()=>t(b).back()},{default:u(()=>[l(t(R),null,{default:u(()=>[l(t(S),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:u(()=>{var p;return[l(t(P),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=V=>r.value=V),"provider-name":(p=n.value)==null?void 0:p.localizedName,placeholder:"xai-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(M),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t(N),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=p=>s.value=p),placeholder:"https://api.x.ai/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof _=="function"&&_(C);export{C as default}; diff --git a/assets/zod-Db63SLXj-IXQs-Vsk.js b/assets/zod-Db63SLXj-Cey5BF_r.js similarity index 59% rename from assets/zod-Db63SLXj-IXQs-Vsk.js rename to assets/zod-Db63SLXj-Cey5BF_r.js index 0c85b7af99bf7d6cfed3ca0f4dd2c9562c79277a..131e0060ba16910e67d2286a1e2bd04b23e0f6db 100644 --- a/assets/zod-Db63SLXj-IXQs-Vsk.js +++ b/assets/zod-Db63SLXj-Cey5BF_r.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CDTTBfwQ.js","assets/mcp-CVsSz3w1.js","assets/index-WDP_Z4A8.js","assets/index-zBe9gvvY.css"])))=>i.map(i=>d[i]); -import{cP as n}from"./index-WDP_Z4A8.js";import{a as t}from"./mcp-CVsSz3w1.js";const i=async()=>{let r=e=>{throw new Error(`xsschema: Missing zod v4 dependencies "zod". see ${t}`)},s=e=>{throw new Error(`xsschema: Missing zod v3 dependencies "zod-to-json-schema". see ${t}`)};try{const{toJSONSchema:e}=await n(async()=>{const{toJSONSchema:o}=await import("./index-BwLPbeOe.js");return{toJSONSchema:o}},[]);r=e}catch(e){e instanceof Error&&console.error(e.message)}try{const{zodToJsonSchema:e}=await n(async()=>{const{zodToJsonSchema:o}=await import("./index-CDTTBfwQ.js");return{zodToJsonSchema:o}},__vite__mapDeps([0,1,2,3]));s=e}catch(e){e instanceof Error&&console.error(e.message)}return async e=>"_zod"in e?r(e):s(e)};export{i as getToJsonSchemaFn}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BsHyA__F.js","assets/mcp-BNgNJ97R.js","assets/index-8LjpXIG7.js","assets/index-zBe9gvvY.css"])))=>i.map(i=>d[i]); +import{cP as n}from"./index-8LjpXIG7.js";import{a as t}from"./mcp-BNgNJ97R.js";const i=async()=>{let r=e=>{throw new Error(`xsschema: Missing zod v4 dependencies "zod". see ${t}`)},s=e=>{throw new Error(`xsschema: Missing zod v3 dependencies "zod-to-json-schema". see ${t}`)};try{const{toJSONSchema:e}=await n(async()=>{const{toJSONSchema:o}=await import("./index-DrKad9cl.js");return{toJSONSchema:o}},[]);r=e}catch(e){e instanceof Error&&console.error(e.message)}try{const{zodToJsonSchema:e}=await n(async()=>{const{zodToJsonSchema:o}=await import("./index-BsHyA__F.js");return{zodToJsonSchema:o}},__vite__mapDeps([0,1,2,3]));s=e}catch(e){e instanceof Error&&console.error(e.message)}return async e=>"_zod"in e?r(e):s(e)};export{i as getToJsonSchemaFn}; diff --git a/index.html b/index.html index 7bf345bde04bfe29e69c544409065abbab5734b6..430bc43c999ded973e851246b2631f80e00b7d83 100644 --- a/index.html +++ b/index.html @@ -23,7 +23,7 @@ src="/remote-assets/page-external-data/js/script.js" > - +